4 #if VERSION(OPENH323_MAJOR,OPENH323_MINOR,OPENH323_BUILD) < VERSION(1,17,3)
6 * Workaround for broken (less than 1.17.3) OpenH323 stack to be able to
7 * make TCP connections from specific address
9 class MyH323TransportTCP
: public H323TransportTCP
11 PCLASSINFO(MyH323TransportTCP
, H323TransportTCP
);
15 H323EndPoint
& endpoint
, ///< H323 End Point object
16 PIPSocket::Address binding
= PIPSocket::GetDefaultIpAny(), ///< Local interface to use
17 BOOL listen
= FALSE
///< Flag for need to wait for remote to connect
19 /**Connect to the remote party.
21 virtual BOOL
Connect();
24 #define MyH323TransportTCP H323TransportTCP
25 #endif /* <VERSION(1,17,3) */
27 class MyH323TransportUDP
: public H323TransportUDP
29 PCLASSINFO(MyH323TransportUDP
, H323TransportUDP
);
32 MyH323TransportUDP(H323EndPoint
&endpoint
,
33 PIPSocket::Address binding
= PIPSocket::GetDefaultIpAny(),
35 WORD remotePort
= 0): H323TransportUDP(endpoint
, binding
, localPort
, remotePort
)
38 virtual BOOL
DiscoverGatekeeper(H323Gatekeeper
&,
40 const H323TransportAddress
&);
42 PDECLARE_NOTIFIER(PThread
, MyH323TransportUDP
, DiscoverMain
);
43 H323Gatekeeper
*discoverGatekeeper
;
44 H323RasPDU
*discoverPDU
;
45 const H323TransportAddress
*discoverAddress
;
51 template <class _Abstract_T
, typename _Key_T
= PString
>
52 class MyPFactory
: public PFactory
<_Abstract_T
, _Key_T
>
55 template <class _Concrete_T
> class Worker
: public PFactory
<_Abstract_T
, _Key_T
>::WorkerBase
58 Worker(const _Key_T
&_key
, bool singleton
= false)
59 :PFactory
<_Abstract_T
, _Key_T
>::WorkerBase(singleton
), key(_key
)
61 PFactory
<_Abstract_T
, _Key_T
>::Register(key
, this);
65 PFactory
<_Abstract_T
, _Key_T
>::Unregister(key
);
68 virtual _Abstract_T
*Create(const _Key_T
&) const { return new _Concrete_T
; }
75 #ifdef H323_REGISTER_CAPABILITY
76 #undef H323_REGISTER_CAPABILITY
78 #define H323_REGISTER_CAPABILITY(cls, capName) static MyPFactory<H323Capability>::Worker<cls> cls##Factory(capName, true)
80 #endif /* !defined AST_H323_H */