OPAL  Version 3.18.8
OpalTransportAddressArray Class Reference

#include <transports.h>

Inherits PArray< OpalTransportAddress >.

Public Member Functions

 OpalTransportAddressArray (PINDEX initialSize=0)
 
 OpalTransportAddressArray (const PString &address)
 
 OpalTransportAddressArray (const OpalTransportAddress &address)
 
 OpalTransportAddressArray (const PCollection &coll)
 
bool AppendAddress (const OpalTransportAddress &address, bool unique=false)
 Append one address to array. More...
 
bool AppendString (const PString &address)
 
bool AppendStringCollection (const PCollection &coll)
 
bool SetAddressPair (const OpalTransportAddress &addr1, const OpalTransportAddress &addr2)
 Set the array to 1 or 2 entries. More...
 
void GetIpAndPort (PINDEX index, PIPAddressAndPort &ap)
 

Protected Member Functions

bool AddInterfaces (const PIPAddress &network, const PIPAddress &mask, const PString &portStr)
 

Constructor & Destructor Documentation

OpalTransportAddressArray::OpalTransportAddressArray ( PINDEX  initialSize = 0)
inline
OpalTransportAddressArray::OpalTransportAddressArray ( const PString &  address)
inline

References AppendString().

OpalTransportAddressArray::OpalTransportAddressArray ( const OpalTransportAddress address)
inline

References AppendAddress().

OpalTransportAddressArray::OpalTransportAddressArray ( const PCollection &  coll)
inline

Member Function Documentation

bool OpalTransportAddressArray::AddInterfaces ( const PIPAddress &  network,
const PIPAddress &  mask,
const PString &  portStr 
)
protected
bool OpalTransportAddressArray::AppendAddress ( const OpalTransportAddress address,
bool  unique = false 
)

Append one address to array.

Referenced by OpalTransportAddressArray().

bool OpalTransportAddressArray::AppendString ( const PString &  address)

Append a string with special cases. If address is a string containing ',', ';', tab or newline separated sub-strings, each one is added using AppendStringCollection().

This may contain wild card strings matching interfaces that are availabe in the system. For example "192.168.*" will match any interfaces starting with 192.168. The string "0.0.0.0" will match all IPv4 interfaces. The string "[::]" will map to all IPv6 interfaces. Note the loopback interface will only be included if explictly indicated.

Referenced by OpalTransportAddressArray().

bool OpalTransportAddressArray::AppendStringCollection ( const PCollection &  coll)

Append all the strings in the collection. Note the collection must contain PString objects. See AppendString() for how each string in the collection is interpreted.

Referenced by OpalTransportAddressArray().

void OpalTransportAddressArray::GetIpAndPort ( PINDEX  index,
PIPAddressAndPort &  ap 
)

Get IP addres and port at the index, modulus the size of the array. If the ap is already valid, then it is returned as is. If the array is empty or the entry is invalid, then IPv4 INADDR_ANY and port zero is returned.

bool OpalTransportAddressArray::SetAddressPair ( const OpalTransportAddress addr1,
const OpalTransportAddress addr2 
)

Set the array to 1 or 2 entries.


The documentation for this class was generated from the following file: