sipXcallLib home page


TaoProviderAdaptor.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 
12 #ifndef _TaoProviderAdaptor_h_
13 #define _TaoProviderAdaptor_h_
14 
15 #if _MSC_VER >= 1000
16 #pragma once
17 #endif // _MSC_VER >= 1000
18 
19 // SYSTEM INCLUDES
20 
21 // APPLICATION INCLUDES
22 #include "os/OsConfigDb.h"
23 #include "tao/TaoAdaptor.h"
24 #include "tao/TaoObjectMap.h"
25 #include "tao/TaoReference.h"
26 #include "tao/TaoServerTask.h"
27 #include "os/OsDefs.h"
28 #include "os/OsBSem.h"
29 #include "os/OsServerTask.h"
30 #include "net/HttpServer.h"
31 
32 // DEFINES
33 // MACROS
34 // EXTERNAL FUNCTIONS
35 // EXTERNAL VARIABLES
36 // CONSTANTS
37 // STRUCTS
38 // TYPEDEFS
39 // FORWARD DECLARATIONS
40 class CpCallManager;
41 class MpMediaTask;
42 class OsNameDb;
43 class OsTimerTask;
44 class PsPhoneTask;
45 class UtlMemCheck;
46 class SipUserAgent;
47 class OsConfigDb;
48 class PtMGCP;
49 class HttpServer;
50 
51 class OsConfigDb;
52 class TaoTransportTask;
53 class PtProvider;
54 class PtCall;
55 
57 {
58 friend class TaoServerTask;
59 
60 /* //////////////////////////// PUBLIC //////////////////////////////////// */
61 public:
62 /* ============================ CREATORS ================================== */
63  TaoProviderAdaptor(const TaoProviderAdaptor& rTaoProviderAdaptor);
64  //:Copy constructor (not implemented for this class)
65 
66 /* ============================ MANIPULATORS ============================== */
67 
68  virtual UtlBoolean handleMessage(OsMsg& rMsg);
69  //:Handle an incoming message.
70  // If the message is not one that the object is prepared to process,
71  // the handleMessage() method in the derived class should return FALSE
72  // which will cause the OsServerTask::handleMessage() method to be
73  // invoked on the message.
74 
75 // virtual void parseMessage(TaoMessage& rMsg);
76  //:Parse the incoming message.
77 
79 
81 
83 
85 
87 
89 
91 
94 
96 
98 
100 
102 
104 
106 
108 
109 
111  //:Adds a listener to a PtCall object when this TaoObjHandle for PtAddress object first
112  // becomes part of that PtCall.
118 
120  //:Removes the indicated PtCallListener from this PtAddress TaoObjHandle.
121  // This method removes a PtCallListener which was added via the
122  // addCallListener() method. If successful, the listener will
123  // no longer be added to new calls which are presented to this address,
124  // however it does not affect PtCallListeners which have already been
125  // added to a call.
130 
132 
133 protected:
134  void startAdaptor();
135  // initialize the SIP user agent
136 /* virtual void initSipUserAgent(OsConfigDb* config);
137 
138  // initialize the MGCP stack
139  virtual void initMgcpStack(OsConfigDb* config);
140 
141  // init the call processing subsystem
142  virtual void initCallManager(OsConfigDb* config);
143 
144  // Set up the configuration database from the default file name
145  virtual void initConfigFile(OsConfigDb* config);
146 */
147 private:
149 
156 
159  int mState;
160 
161  CpCallManager* mpCallMgrTask; // call manager task
162  MpMediaTask* mpMediaTask; // media processing task
163  PsPhoneTask* mpPhoneTask; // phone set task
164  OsTimerTask* mpTimerTask; // timer manager task
165  SipUserAgent* mpSipUserAgentTask; // sip stack
166  PtMGCP* mpMgcpStackTask; // MGCP stack
167  HttpServer* mpHttpServer; // Http Server
168  UtlString mTimeServer; // primary time server name
169 
171  TaoTransportTask*& rpSvrTransport,
172  TaoMessage& rMsg,
173  const UtlString& name = "TaoProviderAdaptor",
174  const int maxRequestQMsgs = 60);
175  //:Constructor
176 
177  virtual ~TaoProviderAdaptor();
178 
179 
180 };
181 
182 #endif // _TaoProviderAdaptor_h_
Definition: TaoReference.h:35
Abstract call manager.
Definition: CpCallManager.h:97
UtlString mTimeServer
Definition: TaoProviderAdaptor.h:168
PtMGCP * mpMgcpStackTask
Definition: TaoProviderAdaptor.h:166
TaoStatus providerNumAddresses(TaoMessage &rMsg)
Definition: TaoProviderAdaptor.cpp:721
Definition: TaoMessage.h:51
TaoTransportTask * mpSvrTransport
Definition: TaoProviderAdaptor.h:148
PtProvider * mpProvider
Definition: TaoProviderAdaptor.h:157
Definition: TaoObjectMap.h:56
TaoObjectMap * mpCallDb
Definition: TaoProviderAdaptor.h:152
TaoStatus providerAddProviderListener(TaoMessage &rMsg)
Definition: TaoProviderAdaptor.cpp:601
PsPhoneTask * mpPhoneTask
Definition: TaoProviderAdaptor.h:163
Abstract event handler for processing call management event.
Definition: TaoAdaptor.h:41
TaoStatus providerGetProviderListeners(TaoMessage &rMsg)
Definition: TaoProviderAdaptor.cpp:670
void startAdaptor()
Definition: TaoProviderAdaptor.cpp:92
SipUserAgent * mpSipUserAgentTask
Definition: TaoProviderAdaptor.h:165
TaoStatus providerGetAddress(TaoMessage &rMsg)
Definition: TaoProviderAdaptor.cpp:253
TaoStatus providerNumProviderListeners(TaoMessage &rMsg)
Definition: TaoProviderAdaptor.cpp:805
TaoStatus providerGetState(TaoMessage &rMsg)
Definition: TaoProviderAdaptor.cpp:576
MpMediaTask * mpMediaTask
Definition: TaoProviderAdaptor.h:162
TaoStatus providerGetConnection(TaoMessage &rMsg)
OsTimerTask * mpTimerTask
Definition: TaoProviderAdaptor.h:164
TaoObjectMap * mpProviderListenerDb
Definition: TaoProviderAdaptor.h:154
TaoStatus providerNumCalls(TaoMessage &rMsg)
Definition: TaoProviderAdaptor.cpp:777
Definition: TaoProviderAdaptor.h:56
Definition: TaoTransportTask.h:45
TaoStatus providerGetTerminals(TaoMessage &rMsg)
Definition: TaoProviderAdaptor.cpp:429
TaoStatus providerRemoveProviderListener(TaoMessage &rMsg)
param: (in) hAddress - a TaoObjHandle representing the PtAddress object param: (in) rhCallListener - ...
Definition: TaoProviderAdaptor.cpp:642
virtual ~TaoProviderAdaptor()
Definition: TaoProviderAdaptor.cpp:57
TaoStatus providerGetProvider(TaoMessage &rMsg)
Definition: TaoProviderAdaptor.cpp:219
TaoReference * mpCallCnt
Definition: TaoProviderAdaptor.h:153
TaoReference * mpObjectCnt
Definition: TaoProviderAdaptor.h:151
TaoStatus providerGetTerminal(TaoMessage &rMsg)
Definition: TaoProviderAdaptor.cpp:400
TaoStatus
Definition: TaoDefs.h:41
TaoObjectMap * mpObjectDb
Definition: TaoProviderAdaptor.h:150
CpCallManager * mpCallMgrTask
Definition: TaoProviderAdaptor.h:161
Definition: TaoServerTask.h:49
TaoProviderAdaptor(const TaoProviderAdaptor &rTaoProviderAdaptor)
TaoStatus providerGetAddresses(TaoMessage &rMsg)
Definition: TaoProviderAdaptor.cpp:329
int mState
Definition: TaoProviderAdaptor.h:159
TaoStatus providerCreateCall(TaoMessage &rMsg)
Definition: TaoProviderAdaptor.cpp:456
TaoStatus providerShutdown(TaoMessage &rMsg)
param: (in) rhCallListener - the listener to remove retcode: TAO_SUCCESS - success retcode: TAO_NOT_F...
Definition: TaoProviderAdaptor.cpp:833
PtCall * mpCall
Definition: TaoProviderAdaptor.h:158
TaoStatus providerGetCalls(TaoMessage &rMsg)
Definition: TaoProviderAdaptor.cpp:525
TaoStatus providerNumTerminals(TaoMessage &rMsg)
Definition: TaoProviderAdaptor.cpp:749
TaoReference * mpProviderListenerCnt
Definition: TaoProviderAdaptor.h:155
Definition: PtCall.h:253
Definition: PsPhoneTask.h:50
Definition: PtProvider.h:118
HttpServer * mpHttpServer
Definition: TaoProviderAdaptor.h:167
TaoStatus getCreateCall(TaoMessage &rMsg)
Definition: TaoProviderAdaptor.cpp:495
TaoStatus providerGetTermConnection(TaoMessage &rMsg)
virtual UtlBoolean handleMessage(OsMsg &rMsg)
Handle an incoming message.
Definition: TaoProviderAdaptor.cpp:103