pres_ent.h
Go to the documentation of this file.
/*
* prese_ent.h
*
* Presence Entity classes for Opal
*
* Open Phone Abstraction Library (OPAL)
*
* Copyright (c) 2009 Post Increment
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Open Phone Abstraction Library.
*
* The Initial Developer of the Original Code is Post Increment
*
* Contributor(s): ______________________________________.
*
* $Revision: 28081 $
* $Author: rjongbloed $
* $Date: 2012-07-22 07:24:14 -0500 (Sun, 22 Jul 2012) $
*/
#ifndef OPAL_IM_PRES_ENT_H
#define OPAL_IM_PRES_ENT_H
#include <ptlib.h>
#include <opal/buildopts.h>
#include <ptlib/pfactory.h>
#include <ptlib/safecoll.h>
#include <ptclib/url.h>
#include <ptclib/guid.h>
#include <ptclib/vcard.h>
#include <im/im.h>
#include <list>
#include <queue>
class OpalManager;
class OpalPresentityCommand;
class OpalPresenceInfo : public PObject
{
public:
enum State {
InternalError = -3, // something bad happened
Forbidden = -2, // access to presence information was specifically forbidden
NoPresence = -1, // remove presence status - not the same as Unavailable or Away
// basic states (from RFC 3863)
Unchanged,
Available,
Unavailable,
// extended states (from RFC 4480)
// if this is changed, also change the tables in sippres.cxx and handlers.cxx - look for RFC 4480
ExtendedBase = 100,
UnknownExtended = ExtendedBase,
Appointment,
Away,
Breakfast,
Busy,
Dinner,
Holiday,
InTransit,
LookingForWork,
Lunch,
Meal,
Meeting,
OnThePhone,
Other,
Performance,
PermanentAbsence,
Playing,
Presentation,
Shopping,
Sleeping,
Spectator,
Steering,
Travel,
TV,
Vacation,
Working,
Worship
};
State m_state;
PString m_note;
PURL m_entity;
PURL m_target;
PTime m_when;
OpalPresenceInfo(State state = Unchanged) : m_state(state) { }
static PString AsString(State state);
static State FromString(const PString & str);
PString AsString() const;
Comparison Compare(const PObject & other) const;
};
ostream & operator<<(ostream & strm, OpalPresenceInfo::State state);
class OpalSetLocalPresenceCommand;
class OpalSubscribeToPresenceCommand;
class OpalAuthorisationRequestCommand;
class OpalSendMessageToCommand;
class OpalPresentity : public PSafeObject
{
PCLASSINFO(OpalPresentity, PSafeObject);
protected:
OpalPresentity();
OpalPresentity(const OpalPresentity & other);
public:
~OpalPresentity();
static OpalPresentity * Create(
OpalManager & manager,
const PURL & url,
const PString & scheme = PString::Empty()
);
virtual bool Open();
virtual bool IsOpen() const { return m_open; }
virtual bool Close();
PStringOptions & GetAttributes() { return m_attributes; }
virtual PStringArray GetAttributeNames() const = 0;
virtual PStringArray GetAttributeTypes() const = 0;
static const PCaselessString & AuthNameKey();
static const PCaselessString & AuthPasswordKey();
static const PCaselessString & TimeToLiveKey();
const PURL & GetAOR() const { return m_aor; }
virtual bool SubscribeToPresence(
const PURL & presentity,
bool subscribe = true,
const PString & note = PString::Empty()
);
virtual bool UnsubscribeFromPresence(
const PURL & presentity
);
enum Authorisation {
AuthorisationPermitted,
AuthorisationDenied,
AuthorisationDeniedPolitely,
AuthorisationConfirming,
AuthorisationRemove,
NumAuthorisations
};
virtual bool SetPresenceAuthorisation(
const PURL & presentity,
Authorisation authorisation
);
virtual bool SetLocalPresence(
OpalPresenceInfo::State state,
const PString & note = PString::Empty()
);
virtual bool GetLocalPresence(
OpalPresenceInfo::State & state,
PString & note
);
template <class cls>
__inline cls * CreateCommand()
{
return dynamic_cast<cls *>(InternalCreateCommand(typeid(cls).name()));
}
virtual bool SendCommand(
OpalPresentityCommand * cmd
);
struct AuthorisationRequest
{
PURL m_presentity;
PString m_note;
};
virtual void OnAuthorisationRequest(
const AuthorisationRequest & request
);
typedef PNotifierTemplate<const AuthorisationRequest &> AuthorisationRequestNotifier;
#define PDECLARE_AuthorisationRequestNotifier(cls, fn) PDECLARE_NOTIFIER2(OpalPresentity, cls, fn, const OpalPresentity::AuthorisationRequest &)
#define PCREATE_AuthorisationRequestNotifier(fn) PCREATE_NOTIFIER2(fn, const OpalPresentity::AuthorisationRequest &)
void SetAuthorisationRequestNotifier(
const AuthorisationRequestNotifier & notifier
);
virtual void OnPresenceChange(
const OpalPresenceInfo & info
);
typedef PNotifierTemplate<const OpalPresenceInfo &> PresenceChangeNotifier;
#define PDECLARE_PresenceChangeNotifier(cls, fn) PDECLARE_NOTIFIER2(OpalPresentity, cls, fn, const OpalPresenceInfo &)
#define PCREATE_PresenceChangeNotifier(fn) PCREATE_NOTIFIER2(fn, const OpalPresenceInfo &)
void SetPresenceChangeNotifier(
const PresenceChangeNotifier & notifier
);
struct BuddyInfo {
BuddyInfo(
const PURL & presentity = PString::Empty(),
const PString & displayName = PString::Empty()
) : m_presentity(presentity)
, m_displayName(displayName)
{ }
PURL m_presentity;
PString m_displayName;
// RFC4482 contact fields, note most of these are duplicated
// in the vCard structure
PvCard m_vCard;
PURL m_icon;
PURL m_map;
PURL m_sound;
PURL m_homePage;
// Extra field for protocol dependent "get out of gaol" card
PString m_contentType;
PString m_rawXML;
};
typedef std::list<BuddyInfo> BuddyList;
enum BuddyStatus {
BuddyStatus_GenericFailure = -1,
BuddyStatus_OK = 0,
BuddyStatus_SpecifiedBuddyNotFound,
BuddyStatus_ListFeatureNotImplemented,
BuddyStatus_ListTemporarilyUnavailable,
BuddyStatus_ListMayBeIncomplete,
BuddyStatus_BadBuddySpecification,
BuddyStatus_ListSubscribeFailed,
BuddyStatus_AccountNotLoggedIn
};
virtual BuddyStatus GetBuddyListEx(
BuddyList & buddies
);
virtual bool GetBuddyList(
BuddyList & buddies
)
{ return GetBuddyListEx(buddies) == BuddyStatus_OK; }
virtual BuddyStatus SetBuddyListEx(
const BuddyList & buddies
);
virtual bool SetBuddyList(
const BuddyList & buddies
)
{ return SetBuddyListEx(buddies) == BuddyStatus_OK; }
virtual BuddyStatus DeleteBuddyListEx();
virtual bool DeleteBuddyList() { return DeleteBuddyListEx() == BuddyStatus_OK; }
virtual BuddyStatus GetBuddyEx(
BuddyInfo & buddy
);
virtual bool GetBuddy(
BuddyInfo & buddy
)
{ return GetBuddyEx(buddy) == BuddyStatus_OK; }
virtual BuddyStatus SetBuddyEx(
const BuddyInfo & buddy
);
virtual bool SetBuddy(
const BuddyInfo & buddy
)
{ return SetBuddyEx(buddy) == BuddyStatus_OK; }
virtual BuddyStatus DeleteBuddyEx(
const PURL & presentity
);
virtual bool DeleteBuddy(
const PURL & presentity
)
{ return DeleteBuddyEx(presentity) == BuddyStatus_OK; }
virtual BuddyStatus SubscribeBuddyListEx(
PINDEX & successfulCount,
bool subscribe = true
);
virtual bool SubscribeBuddyList(
bool subscribe = true
)
{ PINDEX successfulCount; return SubscribeBuddyListEx(successfulCount, subscribe) == BuddyStatus_OK; }
virtual BuddyStatus UnsubscribeBuddyListEx();
virtual bool UnsubscribeBuddyList()
{ return UnsubscribeBuddyListEx() == BuddyStatus_OK; }
virtual bool SendMessageTo(
const OpalIM & message
);
virtual void OnReceivedMessage(
const OpalIM & message
);
typedef PNotifierTemplate<const OpalIM &> ReceivedMessageNotifier;
#define PDECLARE_ReceivedMessageNotifier(cls, fn) PDECLARE_NOTIFIER2(OpalPresentity, cls, fn, const OpalIM &)
#define PCREATE_ReceivedMessageNotifier(fn) PCREATE_NOTIFIER2(fn, const OpalIM &)
void SetReceivedMessageNotifier(
const ReceivedMessageNotifier & notifier
);
virtual void SetAOR(
const PURL & aor
);
void Internal_SendMessageToCommand(const OpalSendMessageToCommand & cmd);
protected:
OpalPresentityCommand * InternalCreateCommand(const char * cmdName);
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;
PString m_localStateNote;
};
class OpalPresentityWithCommandThread : public OpalPresentity
{
PCLASSINFO(OpalPresentityWithCommandThread, OpalPresentity);
protected:
OpalPresentityWithCommandThread();
OpalPresentityWithCommandThread(const OpalPresentityWithCommandThread & other);
public:
~OpalPresentityWithCommandThread();
virtual bool SendCommand(
OpalPresentityCommand * cmd
);
void StartThread(
bool startQueue = true
);
void StopThread();
void StartQueue(
bool startQueue = true
);
protected:
void ThreadMain();
typedef std::queue<OpalPresentityCommand *> CommandQueue;
CommandQueue m_commandQueue;
PMutex m_commandQueueMutex;
PAtomicInteger m_commandSequence;
PSyncPoint m_commandQueueSync;
bool m_threadRunning;
bool m_queueRunning;
PThread * m_thread;
};
class OpalPresentityCommand {
public:
OpalPresentityCommand(bool responseNeeded = false)
: m_responseNeeded(responseNeeded)
{ }
virtual ~OpalPresentityCommand() { }
virtual void Process(
OpalPresentity & presentity
) = 0;
typedef PAtomicInteger::IntegerType CmdSeqType;
CmdSeqType m_sequence;
bool m_responseNeeded;
PURL m_presentity;
};
#define OPAL_DEFINE_COMMAND(command, entity, func) \
class entity##_##command : public command \
{ \
public: virtual void Process(OpalPresentity & presentity) { dynamic_cast<entity &>(presentity).func(*this); } \
}; \
static PFactory<OpalPresentityCommand>::Worker<entity##_##command> \
s_##entity##_##command(PDefaultPFactoryKey(entity::Class())+typeid(command).name())
class OpalSubscribeToPresenceCommand : public OpalPresentityCommand {
public:
OpalSubscribeToPresenceCommand(bool subscribe = true) : m_subscribe(subscribe) { }
bool m_subscribe;
PString m_note;
};
class OpalAuthorisationRequestCommand : public OpalPresentityCommand {
public:
OpalAuthorisationRequestCommand() : m_authorisation(OpalPresentity::AuthorisationPermitted) { }
OpalPresentity::Authorisation m_authorisation;
PString m_note;
};
class OpalSetLocalPresenceCommand : public OpalPresentityCommand, public OpalPresenceInfo {
public:
OpalSetLocalPresenceCommand(State state = NoPresence) : OpalPresenceInfo(state) { }
};
class OpalSendMessageToCommand : public OpalPresentityCommand
{
public:
OpalSendMessageToCommand() { }
OpalIM m_message;
};
// Include concrete classes here so the factories are initialised
#if OPAL_SIP && OPAL_PTLIB_EXPAT
PFACTORY_LOAD(SIP_Presentity);
#endif
#endif // OPAL_IM_PRES_ENT_H
OpalPresenceInfo::m_state
State m_state
New state for presentity.
Definition: pres_ent.h:102
OpalPresentity::BuddyInfo::BuddyInfo
BuddyInfo(const PURL &presentity=PString::Empty(), const PString &displayName=PString::Empty())
Definition: pres_ent.h:358
OpalManager
Definition: manager.h:74
OpalPresentity::m_temporarilyUnavailable
bool m_temporarilyUnavailable
Definition: pres_ent.h:536
OpalPresenceInfo::Unchanged
Definition: pres_ent.h:66
OpalPresentity::m_onReceivedMessageNotifier
ReceivedMessageNotifier m_onReceivedMessageNotifier
Definition: pres_ent.h:532
OpalSubscribeToPresenceCommand::OpalSubscribeToPresenceCommand
OpalSubscribeToPresenceCommand(bool subscribe=true)
Definition: pres_ent.h:667
OpalPresentity::BuddyStatus_SpecifiedBuddyNotFound
Definition: pres_ent.h:396
operator<<
ostream & operator<<(ostream &strm, OpalPresenceInfo::State state)
OpalPresentity::Internal_SendMessageToCommand
void Internal_SendMessageToCommand(const OpalSendMessageToCommand &cmd)
OpalPresentity::SetReceivedMessageNotifier
void SetReceivedMessageNotifier(const ReceivedMessageNotifier &notifier)
Set the notifier for the OnPresenceChange() function.
OpalPresenceInfo::InternalError
Definition: pres_ent.h:61
OpalPresentity::SetBuddy
virtual bool SetBuddy(const BuddyInfo &buddy)
Definition: pres_ent.h:448
OpalPresentity::SendMessageTo
virtual bool SendMessageTo(const OpalIM &message)
OpalPresentity::SetLocalPresence
virtual bool SetLocalPresence(OpalPresenceInfo::State state, const PString &note=PString::Empty())
OpalPresenceInfo::Meeting
Definition: pres_ent.h:84
OpalPresentity::BuddyStatus_ListFeatureNotImplemented
Definition: pres_ent.h:397
OpalPresentityCommand::OpalPresentityCommand
OpalPresentityCommand(bool responseNeeded=false)
Definition: pres_ent.h:634
OpalPresentity::AuthorisationRequest::m_presentity
PURL m_presentity
Other presentity requesting our presence.
Definition: pres_ent.h:305
OpalPresentity::DeleteBuddyListEx
virtual BuddyStatus DeleteBuddyListEx()
OpalPresentityWithCommandThread::StartThread
void StartThread(bool startQueue=true)
OpalPresentityCommand::Process
virtual void Process(OpalPresentity &presentity)=0
OpalPresentityWithCommandThread::ThreadMain
void ThreadMain()
OpalPresentity::UnsubscribeFromPresence
virtual bool UnsubscribeFromPresence(const PURL &presentity)
OpalPresentity::Create
static OpalPresentity * Create(OpalManager &manager, const PURL &url, const PString &scheme=PString::Empty())
OpalPresentity::BuddyStatus_GenericFailure
Definition: pres_ent.h:394
OpalPresenceInfo::LookingForWork
Definition: pres_ent.h:81
buildopts.h
OpalAuthorisationRequestCommand
Definition: pres_ent.h:680
OpalPresenceInfo::Compare
Comparison Compare(const PObject &other) const
OpalPresenceInfo::TV
Definition: pres_ent.h:96
im.h
OpalPresentity::SetPresenceAuthorisation
virtual bool SetPresenceAuthorisation(const PURL &presentity, Authorisation authorisation)
OpalPresentity::AuthorisationDeniedPolitely
Definition: pres_ent.h:234
OpalPresentity::SetAOR
virtual void SetAOR(const PURL &aor)
OpalPresentityWithCommandThread::~OpalPresentityWithCommandThread
~OpalPresentityWithCommandThread()
OpalPresenceInfo::ExtendedBase
Definition: pres_ent.h:72
OpalPresentity::CreateCommand
__inline cls * CreateCommand()
Definition: pres_ent.h:280
OpalPresenceInfo::UnknownExtended
Definition: pres_ent.h:73
OpalPresentityWithCommandThread::m_commandQueue
CommandQueue m_commandQueue
Definition: pres_ent.h:618
OpalPresentityWithCommandThread::SendCommand
virtual bool SendCommand(OpalPresentityCommand *cmd)
OpalPresentity::UnsubscribeBuddyList
virtual bool UnsubscribeBuddyList()
Definition: pres_ent.h:483
OpalPresentity::BuddyInfo::m_vCard
PvCard m_vCard
Definition: pres_ent.h:370
OpalPresentity::NumAuthorisations
Definition: pres_ent.h:237
OpalPresentity::SetBuddyListEx
virtual BuddyStatus SetBuddyListEx(const BuddyList &buddies)
OpalPresentity::GetBuddy
virtual bool GetBuddy(BuddyInfo &buddy)
Definition: pres_ent.h:438
OpalPresentity::GetAttributes
PStringOptions & GetAttributes()
< Get the attributes for this presentity.
Definition: pres_ent.h:183
OpalPresentity::AuthorisationRequest
Definition: pres_ent.h:303
OpalPresentity::GetAOR
const PURL & GetAOR() const
Definition: pres_ent.h:199
OpalPresentity::BuddyStatus
BuddyStatus
Definition: pres_ent.h:393
OpalPresentity::AuthorisationRequest::m_note
PString m_note
Optional extra note attached to request.
Definition: pres_ent.h:306
OpalPresenceInfo::Breakfast
Definition: pres_ent.h:76
OpalPresenceInfo::OnThePhone
Definition: pres_ent.h:85
OpalPresentityWithCommandThread::m_queueRunning
bool m_queueRunning
Definition: pres_ent.h:624
OpalPresentity::Open
virtual bool Open()
OpalPresentity::BuddyInfo
Definition: pres_ent.h:357
OpalAuthorisationRequestCommand::m_note
PString m_note
Optional extra note attached to subscription request.
Definition: pres_ent.h:685
OpalPresentityWithCommandThread::OpalPresentityWithCommandThread
OpalPresentityWithCommandThread()
Construct the presentity class that uses a command thread.
OpalPresenceInfo::Away
Definition: pres_ent.h:75
OpalPresentity::SendCommand
virtual bool SendCommand(OpalPresentityCommand *cmd)
OpalPresentity::BuddyInfo::m_homePage
PURL m_homePage
Home page for buddy.
Definition: pres_ent.h:384
PFACTORY_LOAD
PFACTORY_LOAD(OpalPluginCodecManager)
OpalPresentity::DeleteBuddyEx
virtual BuddyStatus DeleteBuddyEx(const PURL &presentity)
OpalIM
Definition: im.h:42
OpalPresenceInfo::Appointment
Definition: pres_ent.h:74
OpalPresentityWithCommandThread::CommandQueue
std::queue< OpalPresentityCommand * > CommandQueue
Definition: pres_ent.h:617
OpalPresentity::BuddyInfo::m_rawXML
PString m_rawXML
Raw XML of buddy list entry.
Definition: pres_ent.h:388
OpalSubscribeToPresenceCommand::m_note
PString m_note
Optional extra note attached to subscription request.
Definition: pres_ent.h:670
OpalPresentityCommand::m_sequence
CmdSeqType m_sequence
Definition: pres_ent.h:647
OpalSendMessageToCommand::m_message
OpalIM m_message
Definition: pres_ent.h:707
OpalPresenceInfo::Other
Definition: pres_ent.h:86
OpalPresenceInfo::AsString
PString AsString() const
OpalPresentity::m_onPresenceChangeNotifier
PresenceChangeNotifier m_onPresenceChangeNotifier
Definition: pres_ent.h:531
OpalPresentity::SetBuddyList
virtual bool SetBuddyList(const BuddyList &buddies)
Definition: pres_ent.h:420
OpalPresentity::IsOpen
virtual bool IsOpen() const
Definition: pres_ent.h:173
OpalPresentity::GetBuddyEx
virtual BuddyStatus GetBuddyEx(BuddyInfo &buddy)
OpalPresentityCommand::m_responseNeeded
bool m_responseNeeded
Definition: pres_ent.h:648
OpalPresentity::BuddyInfo::m_map
PURL m_map
Definition: pres_ent.h:378
OpalPresentity::AuthorisationRemove
Definition: pres_ent.h:236
OpalPresentityWithCommandThread::m_commandQueueSync
PSyncPoint m_commandQueueSync
Definition: pres_ent.h:621
OpalPresentity::BuddyInfo::m_displayName
PString m_displayName
Human readable name.
Definition: pres_ent.h:366
OpalPresentity::Close
virtual bool Close()
OpalPresentity::GetBuddyList
virtual bool GetBuddyList(BuddyList &buddies)
Definition: pres_ent.h:410
OpalPresentity::AuthorisationDenied
Definition: pres_ent.h:233
OpalSubscribeToPresenceCommand
Definition: pres_ent.h:665
OpalPresentityCommand::m_presentity
PURL m_presentity
Definition: pres_ent.h:649
OpalPresenceInfo::Busy
Definition: pres_ent.h:77
OpalPresentity::m_open
PAtomicBoolean m_open
Definition: pres_ent.h:534
OpalPresenceInfo::Meal
Definition: pres_ent.h:83
OpalPresentity::AuthNameKey
static const PCaselessString & AuthNameKey()
Key for authentication name attribute.
OpalPresentity::BuddyInfo::m_contentType
PString m_contentType
MIME type code for XML.
Definition: pres_ent.h:387
OpalPresentity::BuddyStatus_ListTemporarilyUnavailable
Definition: pres_ent.h:398
OpalPresentity
Definition: pres_ent.h:135
OpalPresentity::m_localState
OpalPresenceInfo::State m_localState
our presentity state
Definition: pres_ent.h:537
OpalPresenceInfo::Forbidden
Definition: pres_ent.h:62
OpalPresentity::DeleteBuddy
virtual bool DeleteBuddy(const PURL &presentity)
Definition: pres_ent.h:458
OpalPresentityWithCommandThread::m_commandQueueMutex
PMutex m_commandQueueMutex
Definition: pres_ent.h:619
OpalSetLocalPresenceCommand::OpalSetLocalPresenceCommand
OpalSetLocalPresenceCommand(State state=NoPresence)
Definition: pres_ent.h:696
OpalPresentity::DeleteBuddyList
virtual bool DeleteBuddyList()
Definition: pres_ent.h:429
OpalPresenceInfo::State
State
Presence states.
Definition: pres_ent.h:60
OpalPresentity::GetBuddyListEx
virtual BuddyStatus GetBuddyListEx(BuddyList &buddies)
OpalPresenceInfo::Sleeping
Definition: pres_ent.h:92
OpalPresentityWithCommandThread::StopThread
void StopThread()
OpalPresenceInfo::m_note
PString m_note
Additional information about state change.
Definition: pres_ent.h:103
OpalPresenceInfo::Unavailable
Definition: pres_ent.h:68
OpalPresentity::BuddyInfo::m_icon
PURL m_icon
Definition: pres_ent.h:374
OpalPresentity::~OpalPresentity
~OpalPresentity()
OpalPresenceInfo::InTransit
Definition: pres_ent.h:80
OpalPresentity::SetBuddyEx
virtual BuddyStatus SetBuddyEx(const BuddyInfo &buddy)
OpalPresentityWithCommandThread
Definition: pres_ent.h:547
OpalPresentityCommand::~OpalPresentityCommand
virtual ~OpalPresentityCommand()
Definition: pres_ent.h:637
OpalPresentity::SubscribeBuddyListEx
virtual BuddyStatus SubscribeBuddyListEx(PINDEX &successfulCount, bool subscribe=true)
OpalPresenceInfo::Presentation
Definition: pres_ent.h:90
OpalPresentity::BuddyInfo::m_sound
PURL m_sound
Definition: pres_ent.h:380
OpalPresenceInfo::Holiday
Definition: pres_ent.h:79
OpalPresentity::OnPresenceChange
virtual void OnPresenceChange(const OpalPresenceInfo &info)
OpalPresenceInfo::m_target
PURL m_target
The presentity that is being informed about the state change.
Definition: pres_ent.h:105
OpalSetLocalPresenceCommand
Definition: pres_ent.h:694
OpalPresentity::m_notificationMutex
PMutex m_notificationMutex
Definition: pres_ent.h:535
OpalPresentity::BuddyStatus_BadBuddySpecification
Definition: pres_ent.h:400
OpalAuthorisationRequestCommand::OpalAuthorisationRequestCommand
OpalAuthorisationRequestCommand()
Definition: pres_ent.h:682
OpalPresentity::BuddyStatus_ListSubscribeFailed
Definition: pres_ent.h:401
OpalPresentity::SetPresenceChangeNotifier
void SetPresenceChangeNotifier(const PresenceChangeNotifier &notifier)
Set the notifier for the OnPresenceChange() function.
OpalPresentity::BuddyList
std::list< BuddyInfo > BuddyList
Definition: pres_ent.h:391
OpalPresentity::SetAuthorisationRequestNotifier
void SetAuthorisationRequestNotifier(const AuthorisationRequestNotifier &notifier)
Set the notifier for the OnAuthorisationRequest() function.
OpalPresenceInfo::Performance
Definition: pres_ent.h:87
OpalPresenceInfo::Worship
Definition: pres_ent.h:99
OpalPresentity::UnsubscribeBuddyListEx
virtual BuddyStatus UnsubscribeBuddyListEx()
OpalPresentity::BuddyInfo::m_presentity
PURL m_presentity
Typicall URI address-of-record.
Definition: pres_ent.h:365
OpalPresentityCommand::CmdSeqType
PAtomicInteger::IntegerType CmdSeqType
Definition: pres_ent.h:646
OpalPresenceInfo::NoPresence
Definition: pres_ent.h:63
OpalPresenceInfo::Dinner
Definition: pres_ent.h:78
OpalPresentity::m_manager
OpalManager * m_manager
Definition: pres_ent.h:525
OpalPresenceInfo::FromString
static State FromString(const PString &str)
OpalPresentity::BuddyStatus_ListMayBeIncomplete
Definition: pres_ent.h:399
OpalPresentity::OpalPresentity
OpalPresentity()
Construct the presentity class.
OpalPresenceInfo::PermanentAbsence
Definition: pres_ent.h:88
OpalPresentity::OnReceivedMessage
virtual void OnReceivedMessage(const OpalIM &message)
OpalPresenceInfo::Playing
Definition: pres_ent.h:89
OpalPresentity::m_aor
PURL m_aor
Definition: pres_ent.h:527
OpalPresentity::AuthPasswordKey
static const PCaselessString & AuthPasswordKey()
Key for authentication password attribute.
OpalPresentity::AuthorisationPermitted
Definition: pres_ent.h:232
OpalPresentity::BuddyStatus_AccountNotLoggedIn
Definition: pres_ent.h:402
OpalPresentityWithCommandThread::StartQueue
void StartQueue(bool startQueue=true)
OpalAuthorisationRequestCommand::m_authorisation
OpalPresentity::Authorisation m_authorisation
Authorisation mode to indicate to remote.
Definition: pres_ent.h:684
OpalPresentity::m_guid
PGloballyUniqueID m_guid
Definition: pres_ent.h:526
OpalSubscribeToPresenceCommand::m_subscribe
bool m_subscribe
Flag to indicate subscribing/unsubscribing.
Definition: pres_ent.h:669
OpalPresentity::GetAttributeNames
virtual PStringArray GetAttributeNames() const =0
Get all attribute types for this presentity class.
OpalPresentity::SubscribeBuddyList
virtual bool SubscribeBuddyList(bool subscribe=true)
Definition: pres_ent.h:472
OpalPresenceInfo::Working
Definition: pres_ent.h:98
OpalPresentity::ReceivedMessageNotifier
PNotifierTemplate< const OpalIM & > ReceivedMessageNotifier
Definition: pres_ent.h:502
OpalPresenceInfo::OpalPresenceInfo
OpalPresenceInfo(State state=Unchanged)
Definition: pres_ent.h:108
OpalPresenceInfo::Steering
Definition: pres_ent.h:94
OpalPresenceInfo::m_entity
PURL m_entity
The presentity whose state had changed.
Definition: pres_ent.h:104
OpalPresenceInfo::Available
Definition: pres_ent.h:67
OpalPresentityCommand
Definition: pres_ent.h:632
OpalPresentity::AuthorisationConfirming
Definition: pres_ent.h:235
OpalSendMessageToCommand
Definition: pres_ent.h:702
OpalPresentity::TimeToLiveKey
static const PCaselessString & TimeToLiveKey()
Key for Time-To-Live attribute, in seconds for underlying protocol.
OpalPresenceInfo
Definition: pres_ent.h:56
OpalSendMessageToCommand::OpalSendMessageToCommand
OpalSendMessageToCommand()
Definition: pres_ent.h:705
OpalPresentity::SubscribeToPresence
virtual bool SubscribeToPresence(const PURL &presentity, bool subscribe=true, const PString &note=PString::Empty())
OpalPresentityWithCommandThread::m_threadRunning
bool m_threadRunning
Definition: pres_ent.h:623
OpalPresentity::BuddyStatus_OK
Definition: pres_ent.h:395
OpalPresentity::InternalCreateCommand
OpalPresentityCommand * InternalCreateCommand(const char *cmdName)
OpalPresenceInfo::Travel
Definition: pres_ent.h:95
OpalPresentity::AuthorisationRequestNotifier
PNotifierTemplate< const AuthorisationRequest & > AuthorisationRequestNotifier
Definition: pres_ent.h:320
OpalPresentity::GetAttributeTypes
virtual PStringArray GetAttributeTypes() const =0
OpalPresentity::GetLocalPresence
virtual bool GetLocalPresence(OpalPresenceInfo::State &state, PString &note)
OpalPresentity::Authorisation
Authorisation
Authorisation modes for SetPresenceAuthorisation()
Definition: pres_ent.h:231
OpalPresentity::m_attributes
PStringOptions m_attributes
Definition: pres_ent.h:528
OpalPresenceInfo::Lunch
Definition: pres_ent.h:82
OpalPresentityWithCommandThread::m_thread
PThread * m_thread
Definition: pres_ent.h:625
OpalPresenceInfo::Spectator
Definition: pres_ent.h:93
OpalPresentity::m_onAuthorisationRequestNotifier
AuthorisationRequestNotifier m_onAuthorisationRequestNotifier
Definition: pres_ent.h:530
OpalPresentity::PresenceChangeNotifier
PNotifierTemplate< const OpalPresenceInfo & > PresenceChangeNotifier
Definition: pres_ent.h:341
OpalPresentity::m_localStateNote
PString m_localStateNote
Additional note attached to the.
Definition: pres_ent.h:538
OpalPresenceInfo::Vacation
Definition: pres_ent.h:97
OpalPresenceInfo::Shopping
Definition: pres_ent.h:91
OpalPresentityWithCommandThread::m_commandSequence
PAtomicInteger m_commandSequence
Definition: pres_ent.h:620
OpalPresenceInfo::m_when
PTime m_when
Time/date of state change.
Definition: pres_ent.h:106
OpalPresentity::OnAuthorisationRequest
virtual void OnAuthorisationRequest(const AuthorisationRequest &request)