sipXcallLib home page


LinePresenceMonitor.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2006 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 #ifndef _LINEPRESENCEMONITOR_H_
12 #define _LINEPRESENCEMONITOR_H_
13 
14 // SYSTEM INCLUDES
15 
16 // APPLICATION INCLUDES
17 #include <os/OsStatus.h>
18 #include <os/OsBSem.h>
19 #include <utl/UtlString.h>
20 #include <utl/UtlHashMap.h>
21 #include <net/StateChangeNotifier.h>
22 #include <net/SipDialogMonitor.h>
23 #include <cp/LinePresenceBase.h>
24 #include <cp/SipPresenceMonitor.h>
25 
26 
27 // DEFINES
28 // MACROS
29 // EXTERNAL FUNCTIONS
30 // EXTERNAL VARIABLES
31 // CONSTANTS
32 // STRUCTS
33 // TYPEDEFS
34 // FORWARD DECLARATIONS
35 
46 class LinePresenceMonitor : public StateChangeNotifier
47 {
48 /* //////////////////////////// PUBLIC //////////////////////////////////// */
49 public:
50 
51 /* ============================ CREATORS ================================== */
52 
54  LinePresenceMonitor(int userAgentPort,
55  UtlString& domainName,
56  UtlString& groupName,
57  bool local,
58  Url& remoteServerUrl);
59 
61  virtual ~LinePresenceMonitor();
62 
63 /* ============================ MANIPULATORS ============================== */
64 
65 /* ============================ ACCESSORS ================================= */
66 
68  virtual bool setStatus(const Url& aor, const Status value);
69 
71  OsStatus subscribe(LinePresenceBase* line);
72 
74  OsStatus unsubscribe(LinePresenceBase* line);
75 
77  OsStatus subscribe(UtlSList& list);
78 
80  OsStatus unsubscribe(UtlSList& list);
81 
82 /* ============================ INQUIRY =================================== */
83 
84 /* //////////////////////////// PROTECTED ///////////////////////////////// */
85 protected:
86 
87 /* //////////////////////////// PRIVATE /////////////////////////////////// */
88 private:
89 
90  SipUserAgent* mpUserAgent;
91  UtlString mGroupName;
92  bool mLocal;
93 
94  SipDialogMonitor* mpDialogMonitor;
96 
97  SipDialogMgr mDialogManager;
98  SipRefreshManager* mpRefreshMgr;
99  SipSubscribeClient* mpSipSubscribeClient;
100 
102 
103  UtlHashMap mSubscribeList;
104 
105  OsBSem mLock;
110  LinePresenceMonitor(const LinePresenceMonitor& rLinePresenceMonitor);
112 
115 };
116 
117 /* ============================ INLINE METHODS ============================ */
118 
119 #endif // _LINEPRESENCEMONITOR_H_
120 
121 
The LinePresenceBase class provides a set of pure virtual interfaces which allow for the setting and ...
Definition: LinePresenceBase.h:30
OsBSem mLock
semaphore used to ensure that there is only one instance of this class
Definition: LinePresenceMonitor.h:105
SipSubscribeClient * mpSipSubscribeClient
Definition: LinePresenceMonitor.h:99
SipDialogMgr mDialogManager
Definition: LinePresenceMonitor.h:97
A LinePresenceMonitor is an object that is used in the ACD-like clients to receive the presence state...
Definition: LinePresenceMonitor.h:46
virtual bool setStatus(const Url &aor, const Status value)
Set the state value.
Definition: LinePresenceMonitor.cpp:125
virtual ~LinePresenceMonitor()
Destructor.
Definition: LinePresenceMonitor.cpp:87
UtlHashMap mSubscribeList
Definition: LinePresenceMonitor.h:103
OsStatus subscribe(LinePresenceBase *line)
Subscribe a line in the list.
Definition: LinePresenceMonitor.cpp:195
SipUserAgent * mpUserAgent
Definition: LinePresenceMonitor.h:90
UtlString mGroupName
Definition: LinePresenceMonitor.h:91
Url mRemoteServer
Definition: LinePresenceMonitor.h:101
SipPresenceMonitor * mpPresenceMonitor
Definition: LinePresenceMonitor.h:95
LinePresenceMonitor(int userAgentPort, UtlString &domainName, UtlString &groupName, bool local, Url &remoteServerUrl)
Constructor.
Definition: LinePresenceMonitor.cpp:34
LinePresenceMonitor & operator=(const LinePresenceMonitor &rhs)
Disabled assignment operator.
Definition: LinePresenceMonitor.cpp:118
SipRefreshManager * mpRefreshMgr
Definition: LinePresenceMonitor.h:98
A SipPresenceMonitor is an object that is used for keeping track of the SIP user agents&#39; presence sta...
Definition: SipPresenceMonitor.h:52
OsStatus unsubscribe(LinePresenceBase *line)
Unsubscribe a line from the list.
Definition: LinePresenceMonitor.cpp:241
bool mLocal
Definition: LinePresenceMonitor.h:92
SipDialogMonitor * mpDialogMonitor
Definition: LinePresenceMonitor.h:94