sipxportlib
Version 3.3
|
#include <OsContact.h>
Public Member Functions | |
OsContact (UtlString address, int port, OsSocket::IpProtocolSocketType protocol, IpAddressType type) | |
OsContact (const OsContact &ref) | |
virtual | ~OsContact () |
const void | getAddress (UtlString &address) const |
const int | getPort () const |
const OsSocket::IpProtocolSocketType | getProtocol () const |
const IpAddressType | getAddressType () const |
virtual unsigned | hash () const |
virtual UtlContainableType | getContainableType () const |
virtual int | compareTo (UtlContainable const *) const |
virtual UtlBoolean | isEqual (UtlContainable const *) const |
Public Member Functions inherited from UtlContainable | |
virtual | ~UtlContainable () |
unsigned | directHash () const |
Provides a hash function that uses the object pointer as the hash value. More... | |
virtual UtlBoolean | isInstanceOf (const UtlContainableType type) const |
Determine if this object is a derivative of the specified UtlContainableType. More... | |
Static Protected Attributes | |
static UtlContainableType | TYPE = "OsContact" |
Friends | |
class | OsContactTests |
Additional Inherited Members | |
Static Public Member Functions inherited from UtlContainable | |
static unsigned | stringHash (char const *value) |
Provides a hash function appropriate for null-terminated string values. More... | |
static UtlBoolean | areSameTypes (const UtlContainableType type1, const UtlContainableType type2) |
Are UtlContainable types the same. More... | |
Static Public Attributes inherited from UtlContainable | |
static const UtlContainableType | TYPE = "UtlContainable" |
OsContact is a containable object which represents an inter-networking point of contact, which could also be described as a "transport endpoint". It contains an address, a port value, a protocol, and the address type.
OsContact | ( | UtlString | address, |
int | port, | ||
OsSocket::IpProtocolSocketType | protocol, | ||
IpAddressType | type | ||
) |
Constructor.
address | String representation of the ip address. For IPv4, it should be in "dotted quad" notation. For IPv6, it should use the text representation of addresses specified in RFC 3513. |
Note that IP addresses which are sematically identical, but differ in string representation, will be considered as not being equal. (e.g. - a contact having an address "192.168.1.2" will not equal a contact having an address "192.168.001.002".
Note that the current design doesn't allow for IPV4 tunneled over IPV6 to compare correctly with the original IPV4 address.
Note that IP addresses will be compared as strings, so, use of wildcard addresses ("0.0.0.0") will not match any other address.
port | The port value for the contact. |
protocol | The prefered protocol for this contact. |
type | The type of ip address. |
|
virtual |
Destructor
const void getAddress | ( | UtlString & | address | ) | const |
Accessor for the address string.
const int getPort | ( | ) | const |
Accessor for the port value.
const OsSocket::IpProtocolSocketType getProtocol | ( | ) | const |
Accessor for the protocol enum value.
const IpAddressType getAddressType | ( | ) | const |
Accessor for the address type enum value.
|
virtual |
Calculate a unique hash code for this object. If the equals operator returns true for another object, then both of those objects must return the same hashcode.
Implements UtlContainable.
|
virtual |
Get the ContainableType for a UtlContainable derived class.
Implements UtlContainable.
|
virtual |
Compare the this object to another like-objects. Results for designating a non-like object are undefined.
Implements UtlContainable.
|
virtual |
Test this object to another like-object for equality. This method returns false if unlike-objects are specified.
Reimplemented from UtlContainable.
|
friend |
|
staticprotected |