31 #ifndef OPAL_LIDS_CAPI_EP_H
32 #define OPAL_LIDS_CAPI_EP_H
43 #include <ptclib/qchannel.h>
46 class OpalCapiFunctions;
47 class OpalCapiConnection;
48 struct OpalCapiMessage;
51 #define OPAL_OPT_CAPI_B_PROTO "B-Proto"
100 const PString & party,
101 void * userData = NULL,
102 unsigned int options = 0,
120 virtual OpalCapiConnection * CreateConnection(
123 unsigned int options,
134 unsigned OpenControllers();
139 PString GetDriverInfo()
const;
147 bool GetFreeLine(
unsigned & controller,
unsigned & bearer);
148 PDECLARE_NOTIFIER(PThread, OpalCapiEndPoint, ProcessMessages);
149 virtual void ProcessMessage(
const OpalCapiMessage & message);
150 void ProcessConnectInd(
const OpalCapiMessage & message);
151 virtual bool PutMessage(OpalCapiMessage & message);
153 OpalCapiFunctions * m_capi;
155 unsigned m_applicationId;
156 PSyncPoint m_listenCompleted;
159 Controller() : m_active(false) { }
161 bool GetFreeLine(
unsigned & bearer);
164 vector<bool> m_bearerInUse;
166 typedef std::vector<Controller> ControllerVector;
167 ControllerVector m_controllers;
168 PMutex m_controllerMutex;
170 struct IdToConnMap :
public std::map<unsigned, PSafePtr<OpalCapiConnection> >
172 bool Forward(
const OpalCapiMessage & message,
unsigned id);
176 IdToConnMap m_cbciToConnection;
177 IdToConnMap m_plciToConnection;
179 friend class OpalCapiConnection;
196 OpalCapiEndPoint & endpoint,
197 unsigned int options,
235 const PString & calleeName,
321 virtual void ProcessMessage(
const OpalCapiMessage & message);
322 virtual bool PutMessage(OpalCapiMessage & message);
324 OpalCapiEndPoint & m_endpoint;
325 unsigned m_controller;
330 PSyncPoint m_disconnected;
332 PBYTEArray m_Bprotocol;
334 friend class OpalCapiEndPoint;
335 friend struct OpalCapiEndPoint::IdToConnMap;
336 friend class OpalCapiMediaStream;
352 OpalCapiConnection & conn,
393 OpalCapiConnection & m_connection;
394 PQueueChannel m_queue;
395 PSyncPoint m_written;
396 PAdaptiveDelay m_delay;
398 friend class OpalCapiConnection;
404 #endif // OPAL_LIDS_CAPI_EP_H