00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062 #ifndef __H323_TRANSADDR_H
00063 #define __H323_TRANSADDR_H
00064
00065 #ifdef P_USE_PRAGMA
00066 #pragma interface
00067 #endif
00068
00069
00070 #include <ptlib/sockets.h>
00071 #include <opal/transports.h>
00072
00073
00074 class H225_TransportAddress;
00075 class H245_TransportAddress;
00076 class H225_ArrayOf_TransportAddress;
00077
00078
00079 typedef OpalListener H323Listener;
00080 typedef PList<H323Listener> H323ListenerList;
00081 typedef OpalTransport H323Transport;
00082 typedef OpalTransportUDP H323TransportUDP;
00083
00084
00086
00091 class H323TransportAddress : public OpalTransportAddress
00092 {
00093 PCLASSINFO(H323TransportAddress, OpalTransportAddress);
00094 public:
00095 H323TransportAddress()
00096 { }
00097 H323TransportAddress(const char * addr, WORD port = 0, const char * proto = NULL)
00098 : OpalTransportAddress(addr, port, proto) { }
00099 H323TransportAddress(const PString & addr, WORD port = 0, const char * proto = NULL)
00100 : OpalTransportAddress(addr, port, proto) { }
00101 H323TransportAddress(const OpalTransportAddress & addr)
00102 : OpalTransportAddress(addr) { }
00103 H323TransportAddress(PIPSocket::Address ip, WORD port, const char * proto = NULL)
00104 : OpalTransportAddress(ip, port, proto) { }
00105
00106 H323TransportAddress(
00107 const H225_TransportAddress & pdu,
00108 const char * proto = NULL
00109 );
00110 H323TransportAddress(
00111 const H245_TransportAddress & pdu,
00112 const char * proto = NULL
00113 );
00114
00115 BOOL SetPDU(
00116 H225_ArrayOf_TransportAddress & pdu,
00117 const OpalTransport & associatedTransport
00118 );
00119 BOOL SetPDU(H225_TransportAddress & pdu, WORD defPort = 0) const;
00120 BOOL SetPDU(H245_TransportAddress & pdu, WORD defPort = 0) const;
00121 };
00122
00123
00124 PDECLARE_ARRAY(H323TransportAddressArray, H323TransportAddress)
00125 public:
00126 H323TransportAddressArray(
00127 const OpalTransportAddress & address
00128 ) { AppendAddress(address); }
00129 H323TransportAddressArray(
00130 const H323TransportAddress & address
00131 ) { AppendAddress(address); }
00132 H323TransportAddressArray(
00133 const H225_ArrayOf_TransportAddress & addresses
00134 );
00135 H323TransportAddressArray(
00136 const OpalTransportAddressArray & array
00137 ) { AppendStringCollection(array); }
00138 H323TransportAddressArray(
00139 const PStringArray & array
00140 ) { AppendStringCollection(array); }
00141 H323TransportAddressArray(
00142 const PStringList & list
00143 ) { AppendStringCollection(list); }
00144 H323TransportAddressArray(
00145 const PSortedStringList & list
00146 ) { AppendStringCollection(list); }
00147
00148 void AppendString(
00149 const char * address
00150 );
00151 void AppendString(
00152 const PString & address
00153 );
00154 void AppendAddress(
00155 const H323TransportAddress & address
00156 );
00157
00158 protected:
00159 void AppendStringCollection(
00160 const PCollection & coll
00161 );
00162 };
00163
00164
00167 void H323SetTransportAddresses(
00168 const H323Transport & associatedTransport,
00169 const H323TransportAddressArray & addresses,
00170 H225_ArrayOf_TransportAddress & pdu
00171 );
00172
00173
00174 #endif
00175
00176