OPAL  Version 3.10.10
transaddr.h
Go to the documentation of this file.
1 /*
2  * transport.h
3  *
4  * H.323 protocol handler
5  *
6  * Open H323 Library
7  *
8  * Copyright (c) 1998-2001 Equivalence Pty. Ltd.
9  *
10  * The contents of this file are subject to the Mozilla Public License
11  * Version 1.0 (the "License"); you may not use this file except in
12  * compliance with the License. You may obtain a copy of the License at
13  * http://www.mozilla.org/MPL/
14  *
15  * Software distributed under the License is distributed on an "AS IS"
16  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17  * the License for the specific language governing rights and limitations
18  * under the License.
19  *
20  * The Original Code is Open H323 Library.
21  *
22  * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
23  *
24  * Portions of this code were written with the assisance of funding from
25  * Vovida Networks, Inc. http://www.vovida.com.
26  *
27  * Contributor(s): ______________________________________.
28  *
29  * $Revision: 22023 $
30  * $Author: rjongbloed $
31  * $Date: 2009-02-07 23:56:02 -0600 (Sat, 07 Feb 2009) $
32  */
33 
34 #ifndef OPAL_H323_TRANSADDR_H
35 #define OPAL_H323_TRANSADDR_H
36 
37 #ifdef P_USE_PRAGMA
38 #pragma interface
39 #endif
40 
41 #include <opal/buildopts.h>
42 
43 #if OPAL_H323
44 
45 #include <ptlib/sockets.h>
46 #include <opal/transports.h>
47 
48 
49 class H225_TransportAddress;
50 class H245_TransportAddress;
51 class H225_ArrayOf_TransportAddress;
52 
53 
55 typedef PList<H323Listener> H323ListenerList;
58 
59 
61 
67 {
69  public:
71  { }
72  H323TransportAddress(const char * addr, WORD port = 0, const char * proto = NULL)
73  : OpalTransportAddress(addr, port, proto) { }
74  H323TransportAddress(const PString & addr, WORD port = 0, const char * proto = NULL)
75  : OpalTransportAddress(addr, port, proto) { }
77  : OpalTransportAddress(addr) { }
78  H323TransportAddress(PIPSocket::Address ip, WORD port, const char * proto = NULL)
79  : OpalTransportAddress(ip, port, proto) { }
80 
82  const H225_TransportAddress & pdu,
83  const char * proto = NULL
84  );
86  const H245_TransportAddress & pdu,
87  const char * proto = NULL
88  );
89 
90  PBoolean SetPDU(H225_TransportAddress & pdu, WORD defPort = 0) const;
91  PBoolean SetPDU(H245_TransportAddress & pdu, WORD defPort = 0) const;
92 };
93 
94 
96  public:
98  const OpalTransportAddress & address
99  ) { AppendAddress(address); }
101  const H323TransportAddress & address
102  ) { AppendAddress(address); }
104  const H225_ArrayOf_TransportAddress & addresses
105  );
107  const OpalTransportAddressArray & array
108  ) { AppendStringCollection(array); }
110  const PStringArray & array
111  ) { AppendStringCollection(array); }
113  const PStringList & list
114  ) { AppendStringCollection(list); }
116  const PSortedStringList & list
117  ) { AppendStringCollection(list); }
118 
119  void AppendString(
120  const char * address
121  );
122  void AppendString(
123  const PString & address
124  );
125  void AppendAddress(
126  const H323TransportAddress & address
127  );
128 
129  protected:
131  const PCollection & coll
132  );
133 };
134 
135 
139  const H323Transport & associatedTransport,
140  const H323TransportAddressArray & addresses,
141  H225_ArrayOf_TransportAddress & pdu
142 );
143 
144 
145 #endif // OPAL_H323
146 
147 #endif // OPAL_H323_TRANSADDR_H
148 
149 
OpalListener H323Listener
Definition: transaddr.h:51
void H323SetTransportAddresses(const H323Transport &associatedTransport, const H323TransportAddressArray &addresses, H225_ArrayOf_TransportAddress &pdu)
H323TransportAddressArray(const OpalTransportAddress &address)
Definition: transaddr.h:97
H323TransportAddress()
Definition: transaddr.h:70
void AppendString(const char *address)
Definition: transports.h:703
H323TransportAddress(const char *addr, WORD port=0, const char *proto=NULL)
Definition: transaddr.h:72
OpalTransport H323Transport
Definition: transaddr.h:56
H323TransportAddress(const PString &addr, WORD port=0, const char *proto=NULL)
Definition: transaddr.h:74
Definition: transports.h:351
OpalTransportUDP H323TransportUDP
Definition: transaddr.h:57
PList< H323Listener > H323ListenerList
Definition: transaddr.h:55
void AppendAddress(const H323TransportAddress &address)
OpalTransportAddressArray(const OpalTransportAddress &address)
Definition: transports.h:305
H323TransportAddress(const OpalTransportAddress &addr)
Definition: transaddr.h:76
H323TransportAddress(PIPSocket::Address ip, WORD port, const char *proto=NULL)
Definition: transaddr.h:78
Definition: transports.h:1050
PBoolean SetPDU(H225_TransportAddress &pdu, WORD defPort=0) const
void AppendStringCollection(const PCollection &coll)
Definition: transports.h:149
Definition: transaddr.h:66