Yate
|
An abstract call endpoint. More...
#include <yatephone.h>
Public Member Functions | |
virtual void | destroyed () |
virtual void * | getObject (const String &name) const |
virtual const String & | toString () const |
const String & | id () const |
CallEndpoint * | getPeer () const |
bool | getPeerId (String &id) const |
String | getPeerId () const |
bool | getLastPeerId (String &id) const |
void | setLastPeerId () |
Mutex * | mutex () const |
bool | connect (CallEndpoint *peer, const char *reason=0, bool notify=true) |
bool | disconnect (const char *reason=0, bool notify=true, const NamedList *params=0) |
bool | disconnect (const char *reason, const NamedList ¶ms) |
DataEndpoint * | getEndpoint (const String &type=CallEndpoint::audioType()) const |
DataEndpoint * | setEndpoint (const String &type=CallEndpoint::audioType()) |
void | clearEndpoint (const String &type=String::empty()) |
void | setSource (DataSource *source=0, const String &type=CallEndpoint::audioType()) |
DataSource * | getSource (const String &type=CallEndpoint::audioType()) const |
void | setConsumer (DataConsumer *consumer=0, const String &type=CallEndpoint::audioType()) |
DataConsumer * | getConsumer (const String &type=CallEndpoint::audioType()) const |
bool | clearData (DataNode *node, const String &type=CallEndpoint::audioType()) |
Public Member Functions inherited from RefObject | |
RefObject () | |
virtual | ~RefObject () |
virtual bool | alive () const |
bool | ref () |
bool | deref () |
int | refcount () const |
virtual void | destruct () |
Public Member Functions inherited from GenObject | |
GenObject () | |
virtual | ~GenObject () |
NamedCounter * | getObjCounter () const |
NamedCounter * | setObjCounter (NamedCounter *counter) |
Static Public Member Functions | |
static Mutex & | commonMutex () |
static const String & | audioType () |
Static Public Member Functions inherited from RefObject | |
static bool | alive (const RefObject *obj) |
static bool | efficientIncDec () |
Static Public Member Functions inherited from GenObject | |
static void * | getObject (const String &name, const GenObject *obj) |
static bool | getObjCounting () |
static void | setObjCounting (bool enable) |
static NamedCounter * | getObjCounter (const String &name, bool create=true) |
static ObjList & | getObjCounters () |
Protected Member Functions | |
CallEndpoint (const char *id=0) | |
virtual void | connected (const char *reason) |
virtual void | disconnected (bool final, const char *reason) |
virtual void | setDisconnect (const NamedList *params) |
void | setPeer (CallEndpoint *peer, const char *reason=0, bool notify=true, const NamedList *params=0) |
void | setEndpoint (DataEndpoint *endPoint) |
virtual void | setId (const char *newId) |
Protected Member Functions inherited from RefObject | |
virtual void | zeroRefs () |
bool | resurrect () |
Protected Attributes | |
ObjList | m_data |
Mutex * | m_mutex |
Friends | |
class | DataEndpoint |
An abstract call endpoint.
A class that holds common call control and data related features
|
protected |
Constructor
|
static |
Return the defaul audio type "audio"
bool clearData | ( | DataNode * | node, |
const String & | type = CallEndpoint::audioType() |
||
) |
Clear a data node from any slot of a DataEndpoint of this object
node | Pointer to DataSource or DataConsumer to clear |
type | Type of data node: "audio", "video", "text" |
void clearEndpoint | ( | const String & | type = String::empty() | ) |
Clear one or all data endpoints of this object
type | Type of data endpoint: "audio", "video", "text", NULL to clear all |
|
static |
Get the big mutex that serializes access to all call endpoints
bool connect | ( | CallEndpoint * | peer, |
const char * | reason = 0 , |
||
bool | notify = true |
||
) |
Connect the call endpoint to a peer.
peer | Pointer to the peer call endpoint. |
reason | Text that describes connect reason. |
notify | Call disconnected() notification method on old peer |
|
inlineprotectedvirtual |
Connect notification method.
reason | Text that describes connect reason. |
Reimplemented in ClientChannel, and Channel.
|
virtual |
Destruct notification, performs cleanups
Reimplemented from RefObject.
Reimplemented in ClientChannel.
|
inline |
Disconnect from the connected peer call endpoint.
reason | Text that describes disconnect reason. |
notify | Call disconnected() notification method on old peer |
params | Optional pointer to extra parameters for disconnect cause |
Referenced by CallEndpoint::disconnect().
|
inline |
Disconnect from the connected peer call endpoint and notify old peer.
reason | Text that describes disconnect reason. |
params | Extra parameters for disconnect cause |
References CallEndpoint::disconnect().
|
inlineprotectedvirtual |
Disconnect notification method.
final | True if this disconnect was called from the destructor. |
reason | Text that describes disconnect reason. |
Reimplemented in ClientChannel, and Channel.
DataConsumer* getConsumer | ( | const String & | type = CallEndpoint::audioType() | ) | const |
Get the data consumer of this object
type | Type of data node: "audio", "video", "text" |
DataEndpoint* getEndpoint | ( | const String & | type = CallEndpoint::audioType() | ) | const |
Get a data endpoint of this object
type | Type of data endpoint: "audio", "video", "text" |
bool getLastPeerId | ( | String & | id | ) | const |
|
virtual |
|
inline |
Get the connected peer call
bool getPeerId | ( | String & | id | ) | const |
String getPeerId | ( | ) | const |
Get the connected peer call id
DataSource* getSource | ( | const String & | type = CallEndpoint::audioType() | ) | const |
Get a data source of this object
type | Type of data node: "audio", "video", "text" |
|
inline |
Get the unique channel identifier
|
inline |
Get the mutex that serializes access to this call endpoint, if any
void setConsumer | ( | DataConsumer * | consumer = 0 , |
const String & | type = CallEndpoint::audioType() |
||
) |
Set the data consumer of this object
consumer | A pointer to the new consumer or NULL |
type | Type of data node: "audio", "video", "text" |
|
inlineprotectedvirtual |
Set disconnect parameters
params | Pointer to disconnect cause parameters, NULL to reset them |
Reimplemented in Channel.
DataEndpoint* setEndpoint | ( | const String & | type = CallEndpoint::audioType() | ) |
Get a data endpoint of this object, create if required
type | Type of data endpoint: "audio", "video", "text" |
|
protected |
Set a foreign data endpoint in this object
endPoint | Data endpoint to set, will replace one with same type |
|
protectedvirtual |
Set a new ID for this call endpoint
newId | New ID to set to this call |
Reimplemented in Channel.
void setLastPeerId | ( | ) |
Copy the current peer ID as the last connected peer ID, does nothing if not connected
|
protected |
Set the peer call endpoint pointer.
peer | A pointer to the new peer or NULL. |
reason | Text describing the reason in case of disconnect. |
notify | Call notification methods - connected() or disconnected() |
params | Optional pointer to extra parameters for disconnect cause |
void setSource | ( | DataSource * | source = 0 , |
const String & | type = CallEndpoint::audioType() |
||
) |
Set a data source of this object
source | A pointer to the new source or NULL |
type | Type of data node: "audio", "video", "text" |
|
inlinevirtual |
Get a string representation of this channel
Reimplemented from GenObject.