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 #ifndef __H323_TRANSADDR_H
00059 #define __H323_TRANSADDR_H
00060
00061 #ifdef P_USE_PRAGMA
00062 #pragma interface
00063 #endif
00064
00065
00066 #include <ptlib/sockets.h>
00067 #include <opal/transports.h>
00068
00069
00070 class H225_TransportAddress;
00071 class H245_TransportAddress;
00072 class H225_ArrayOf_TransportAddress;
00073
00074
00075 typedef OpalListener H323Listener;
00076 typedef PList<H323Listener> H323ListenerList;
00077 typedef OpalTransport H323Transport;
00078 typedef OpalTransportUDP H323TransportUDP;
00079
00080
00082
00087 class H323TransportAddress : public OpalTransportAddress
00088 {
00089 PCLASSINFO(H323TransportAddress, OpalTransportAddress);
00090 public:
00091 H323TransportAddress()
00092 { }
00093 H323TransportAddress(const char * addr, WORD port = 0, const char * proto = NULL)
00094 : OpalTransportAddress(addr, port, proto) { }
00095 H323TransportAddress(const PString & addr, WORD port = 0, const char * proto = NULL)
00096 : OpalTransportAddress(addr, port, proto) { }
00097 H323TransportAddress(const OpalTransportAddress & addr)
00098 : OpalTransportAddress(addr) { }
00099 H323TransportAddress(PIPSocket::Address ip, WORD port, const char * proto = NULL)
00100 : OpalTransportAddress(ip, port, proto) { }
00101
00102 H323TransportAddress(
00103 const H225_TransportAddress & pdu,
00104 const char * proto = NULL
00105 );
00106 H323TransportAddress(
00107 const H245_TransportAddress & pdu,
00108 const char * proto = NULL
00109 );
00110
00111 BOOL SetPDU(
00112 H225_ArrayOf_TransportAddress & pdu,
00113 const OpalTransport & associatedTransport
00114 );
00115 BOOL SetPDU(H225_TransportAddress & pdu) const;
00116 BOOL SetPDU(H245_TransportAddress & pdu) const;
00117 };
00118
00119
00120 PDECLARE_ARRAY(H323TransportAddressArray, H323TransportAddress)
00121 public:
00122 H323TransportAddressArray(
00123 const OpalTransportAddress & address
00124 ) { AppendAddress(address); }
00125 H323TransportAddressArray(
00126 const H323TransportAddress & address
00127 ) { AppendAddress(address); }
00128 H323TransportAddressArray(
00129 const H225_ArrayOf_TransportAddress & addresses
00130 );
00131 H323TransportAddressArray(
00132 const OpalTransportAddressArray & array
00133 ) { AppendStringCollection(array); }
00134 H323TransportAddressArray(
00135 const PStringArray & array
00136 ) { AppendStringCollection(array); }
00137 H323TransportAddressArray(
00138 const PStringList & list
00139 ) { AppendStringCollection(list); }
00140 H323TransportAddressArray(
00141 const PSortedStringList & list
00142 ) { AppendStringCollection(list); }
00143
00144 void AppendString(
00145 const char * address
00146 );
00147 void AppendString(
00148 const PString & address
00149 );
00150 void AppendAddress(
00151 const H323TransportAddress & address
00152 );
00153
00154 protected:
00155 void AppendStringCollection(
00156 const PCollection & coll
00157 );
00158 };
00159
00160
00163 void H323SetTransportAddresses(
00164 const H323Transport & associatedTransport,
00165 const H323TransportAddressArray & addresses,
00166 H225_ArrayOf_TransportAddress & pdu
00167 );
00168
00169
00170 #endif
00171
00172