31 #ifndef OPAL_LIDS_CAPI_EP_H
32 #define OPAL_LIDS_CAPI_EP_H
45 class OpalCapiFunctions;
46 class OpalCapiConnection;
47 struct OpalCapiMessage;
50 #define OPAL_OPT_CAPI_B_PROTO "B-Proto"
99 const PString & party,
100 void * userData = NULL,
101 unsigned int options = 0,
119 virtual OpalCapiConnection * CreateConnection(
122 unsigned int options,
133 unsigned OpenControllers();
138 PString GetDriverInfo()
const;
146 bool GetFreeLine(
unsigned & controller,
unsigned & bearer);
147 PDECLARE_NOTIFIER(PThread, OpalCapiEndPoint, ProcessMessages);
148 virtual void ProcessMessage(
const OpalCapiMessage & message);
149 void ProcessConnectInd(
const OpalCapiMessage & message);
150 virtual bool PutMessage(OpalCapiMessage & message);
152 OpalCapiFunctions * m_capi;
154 unsigned m_applicationId;
155 PSyncPoint m_listenCompleted;
158 Controller() : m_active(false) { }
160 bool GetFreeLine(
unsigned & bearer);
163 vector<bool> m_bearerInUse;
165 typedef std::vector<Controller> ControllerVector;
166 ControllerVector m_controllers;
167 PMutex m_controllerMutex;
169 struct IdToConnMap :
public std::map<DWORD, PSafePtr<OpalCapiConnection> >
171 bool Forward(
const OpalCapiMessage & message, DWORD
id);
175 IdToConnMap m_cbciToConnection;
176 IdToConnMap m_plciToConnection;
178 friend class OpalCapiConnection;
195 OpalCapiEndPoint & endpoint,
196 unsigned int options,
234 const PString & calleeName,
320 virtual void ProcessMessage(
const OpalCapiMessage & message);
321 virtual bool PutMessage(OpalCapiMessage & message);
323 OpalCapiEndPoint & m_endpoint;
324 unsigned m_controller;
329 PSyncPoint m_disconnected;
331 PBYTEArray m_Bprotocol;
333 friend class OpalCapiEndPoint;
334 friend struct OpalCapiEndPoint::IdToConnMap;
335 friend class OpalCapiMediaStream;
351 OpalCapiConnection & conn,
392 OpalCapiConnection & m_connection;
393 PQueueChannel m_queue;
394 PSyncPoint m_written;
395 PAdaptiveDelay m_delay;
397 friend class OpalCapiConnection;
403 #endif // OPAL_LIDS_CAPI_EP_H