OPAL
Version 3.10.10
|
#include <pres_ent.h>
Public Member Functions | |
Overrides from OpalPresentity | |
virtual bool | SendCommand (OpalPresentityCommand *cmd) |
new functions | |
void | StartThread (bool startQueue=true) |
void | StopThread () |
void | StartQueue (bool startQueue=true) |
![]() | |
virtual void | SetAOR (const PURL &aor) |
void | Internal_SendMessageToCommand (const OpalSendMessageToCommand &cmd) |
virtual bool | Open () |
virtual bool | IsOpen () const |
virtual bool | Close () |
~OpalPresentity () | |
PStringOptions & | GetAttributes () |
< Get the attributes for this presentity. | |
virtual PStringArray | GetAttributeNames () const =0 |
Get all attribute types for this presentity class. | |
virtual PStringArray | GetAttributeTypes () const =0 |
const PURL & | GetAOR () const |
virtual bool | SubscribeToPresence (const PURL &presentity, bool subscribe=true, const PString ¬e=PString::Empty()) |
virtual bool | UnsubscribeFromPresence (const PURL &presentity) |
virtual bool | SetPresenceAuthorisation (const PURL &presentity, Authorisation authorisation) |
virtual bool | SetLocalPresence (OpalPresenceInfo::State state, const PString ¬e=PString::Empty()) |
virtual bool | GetLocalPresence (OpalPresenceInfo::State &state, PString ¬e) |
template<class cls > | |
__inline cls * | CreateCommand () |
virtual void | OnAuthorisationRequest (const AuthorisationRequest &request) |
void | SetAuthorisationRequestNotifier (const AuthorisationRequestNotifier ¬ifier) |
Set the notifier for the OnAuthorisationRequest() function. | |
virtual void | OnPresenceChange (const OpalPresenceInfo &info) |
void | SetPresenceChangeNotifier (const PresenceChangeNotifier ¬ifier) |
Set the notifier for the OnPresenceChange() function. | |
virtual BuddyStatus | GetBuddyListEx (BuddyList &buddies) |
virtual bool | GetBuddyList (BuddyList &buddies) |
virtual BuddyStatus | SetBuddyListEx (const BuddyList &buddies) |
virtual bool | SetBuddyList (const BuddyList &buddies) |
virtual BuddyStatus | DeleteBuddyListEx () |
virtual bool | DeleteBuddyList () |
virtual BuddyStatus | GetBuddyEx (BuddyInfo &buddy) |
virtual bool | GetBuddy (BuddyInfo &buddy) |
virtual BuddyStatus | SetBuddyEx (const BuddyInfo &buddy) |
virtual bool | SetBuddy (const BuddyInfo &buddy) |
virtual BuddyStatus | DeleteBuddyEx (const PURL &presentity) |
virtual bool | DeleteBuddy (const PURL &presentity) |
virtual BuddyStatus | SubscribeBuddyListEx (PINDEX &successfulCount, bool subscribe=true) |
virtual bool | SubscribeBuddyList (bool subscribe=true) |
virtual BuddyStatus | UnsubscribeBuddyListEx () |
virtual bool | UnsubscribeBuddyList () |
virtual bool | SendMessageTo (const OpalIM &message) |
virtual void | OnReceivedMessage (const OpalIM &message) |
void | SetReceivedMessageNotifier (const ReceivedMessageNotifier ¬ifier) |
Set the notifier for the OnPresenceChange() function. |
Protected Types | |
typedef std::queue < OpalPresentityCommand * > | CommandQueue |
Protected Member Functions | |
void | ThreadMain () |
![]() | |
OpalPresentityCommand * | InternalCreateCommand (const char *cmdName) |
OpalPresentity () | |
Construct the presentity class. | |
OpalPresentity (const OpalPresentity &other) |
Protected Attributes | |
CommandQueue | m_commandQueue |
PMutex | m_commandQueueMutex |
PAtomicInteger | m_commandSequence |
PSyncPoint | m_commandQueueSync |
bool | m_threadRunning |
bool | m_queueRunning |
PThread * | m_thread |
![]() | |
OpalManager * | m_manager |
PGloballyUniqueID | m_guid |
PURL | m_aor |
PStringOptions | m_attributes |
AuthorisationRequestNotifier | m_onAuthorisationRequestNotifier |
PresenceChangeNotifier | m_onPresenceChangeNotifier |
ReceivedMessageNotifier | m_onReceivedMessageNotifier |
PAtomicBoolean | m_open |
PMutex | m_notificationMutex |
bool | m_temporarilyUnavailable |
OpalPresenceInfo::State | m_localState |
our presentity state | |
PString | m_localStateNote |
Additional note attached to the. |
Construction | |
OpalPresentityWithCommandThread () | |
Construct the presentity class that uses a command thread. | |
OpalPresentityWithCommandThread (const OpalPresentityWithCommandThread &other) | |
~OpalPresentityWithCommandThread () |
Representation of a presence identity that uses a background thread to process commands.
|
protected |
|
protected |
Construct the presentity class that uses a command thread.
|
protected |
OpalPresentityWithCommandThread::~OpalPresentityWithCommandThread | ( | ) |
Destory the presentity class that uses a command thread. Note this will block until the background thread has stopped.
|
virtual |
Lowlevel function to send a command to the presentity handler. All commands are asynchronous. They will usually initiate an action for which an indication (callback) will give a result.
The default implementation queues the command for the background thread to handle.
Returns true if the command was queued. Note that this does not mean the command succeeded, only that the underlying protocol is processing commands, that is the backgrund thread is running
cmd | Command to execute |
Reimplemented from OpalPresentity.
void OpalPresentityWithCommandThread::StartQueue | ( | bool | startQueue = true | ) |
Start/resume processing of queue commands
void OpalPresentityWithCommandThread::StartThread | ( | bool | startQueue = true | ) |
Start the background thread to handle commands. This is typically called from the concrete classes Open() function.
If the argument is true (the default) then the thread starts processing queue entries ASAP.
If the argument is false, the thread is still created and still runs, but it does not process queue entries. This allows for presenties that may need to allow commands to be paused, for example during initialisation
void OpalPresentityWithCommandThread::StopThread | ( | ) |
Stop the background thread to handle commands. This is typically called from the concrete classes Close() function. It is also called fro the destructor to be sure the thread has stopped before the object is destroyed.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |