This class prepares a list of the Wiretap servers that can be accessed by the Wiretap client. More...
Public Types | |
typedef WireTapServerInfo | ServerInfo |
This type definition is available for backward compatibility with Wiretap 2007 and earlier versions. More... | |
Public Member Functions | |
const char * | getGatewayIpAddr () const |
Gets the IP address of the gateway server from which the multicast reply have been receive from. More... | |
int | getGatewayPort () const |
Gets the port of the gateway server from which the multicast reply have been receive from. More... | |
bool | getNode (int index, WireTapServerInfo &node) |
Gets the WireTapServerInfo object at the specified index. More... | |
bool | getNumNodes (int &numberOfNodes) |
Gets the number of Wiretap servers available to the Wiretap client. More... | |
const char * | lastError () const |
Gets the error string for the last operation that failed. More... | |
WireTapServerList & | operator= (const WireTapServerList &) |
bool | refresh () |
Actively trigger a refresh of available servers on the network. More... | |
bool | resolve (const WireTapServerId &serverId, WireTapServerInfo &serverInfo) |
Resolves server ID to its corresponding server information. More... | |
WIRETAP_DEPRECATED bool | resolveStorageId (const char *storageId, WireTapServerId &serverId) |
Resolves the storage ID of a storage device to determine which Wiretap server it is currently connected to. More... | |
WireTapServerList (const char *database=0, const char *gatewayIpAddr=0, int gatewayPort=0) | |
The constructor prepares a list of the servers on the subnet to which the Wiretap client is connected. More... | |
WireTapServerList (const WireTapServerList &) | |
~WireTapServerList () | |
Destructor. More... | |
This class prepares a list of the Wiretap servers that can be accessed by the Wiretap client.
This class sends out a multicast request on the local subnet. Wiretap clients can use this class to populate a browser with a list of the Wiretap servers available on a host or network.
The list can be filtered to include the servers associated with a particular database which, in effect, means a particular type of Wiretap server (IFFFS, Backburner, and so on). The class can also prepare a list of Wiretap servers that are accessible via a particular gateway.
This type definition is available for backward compatibility with Wiretap 2007 and earlier versions.
WireTapServerList::WireTapServerList | ( | const char * | database = 0 , |
const char * | gatewayIpAddr = 0 , |
||
int | gatewayPort = 0 |
||
) |
The constructor prepares a list of the servers on the subnet to which the Wiretap client is connected.
The constructor sends out a multicast request that reaches a single server from which all other servers are, in turn, located. By default, all servers that respond to the multicast message are added to the list. Two optional parameters can be set to customize the list.
database | An input parameter. This optional parameter can be set to the database identifier for a particular Wiretap server. Since database IDs are product-specific and unique across vendors, setting this parameter makes it possible to filter for a particular type of Wiretap server. Examples of these database IDs include "IFFFS", "Backburner". If this parameter is not set, all servers on the subnet will be added to the list. |
gatewayIpAddr | An input parameter. This optional parameter can be set to the IP address of the gateway computer to which the multicast message should be sent. If this parameter is not set, the servers on the subnet where the Wiretap client is running will be listed. |
gatewayPort | An input parameter. This optional parameter can be set to the port of the gateway server to which the multicast message should be sent. If this parameter is not set, the servers on the subnet where the Wiretap client is running will be listed. |
WireTapServerList::~WireTapServerList | ( | ) |
Destructor.
WireTapServerList::WireTapServerList | ( | const WireTapServerList & | ) |
const char* WireTapServerList::getGatewayIpAddr | ( | ) | const |
Gets the IP address of the gateway server from which the multicast reply have been receive from.
int WireTapServerList::getGatewayPort | ( | ) | const |
Gets the port of the gateway server from which the multicast reply have been receive from.
bool WireTapServerList::getNode | ( | int | index, |
WireTapServerInfo & | node | ||
) |
Gets the WireTapServerInfo object at the specified index.
Wiretap clients can use this method when iterating through the Wiretap servers in the list. The getNumNodes method obtains the number of server available on the network.
The WireTapServerInfo object that is obtained by this method contains all the information that a Wiretap client might want to display about a Wiretap server. It also gives access to the WireTapServerId for the server which can used to obtain a WireTapServerHandle for the server. To access data on a particular server, Wiretap clients must obtain a WireTapServerHandle for that server.
index | An input parameter. The index of the Wiretap server in the list of available servers. |
node | An output parameter. The WireTapServerId object that can be used to obtain a WireTapServerHandle for the server. |
bool WireTapServerList::getNumNodes | ( | int & | numberOfNodes | ) |
Gets the number of Wiretap servers available to the Wiretap client.
This method determines the number of servers available on the network that was specified when the WireTapServerList was created. If the server list was not filtered in any way, the default network is the one accessible through the Wiretap client's local host. Wiretap clients can iterate through the available servers and use the getNode method to access each server.
numberOfNodes | An output parameter. The number of Wiretap servers that are available on the network. |
const char* WireTapServerList::lastError | ( | ) | const |
Gets the error string for the last operation that failed.
Wiretap clients can obtain this error message for any member function that returns a boolean. The strings can be localized if required. See the Wiretap Developer's Guide.
WireTapServerList& WireTapServerList::operator= | ( | const WireTapServerList & | ) |
bool WireTapServerList::refresh | ( | ) |
Actively trigger a refresh of available servers on the network.
Servers activity on the network is monitored to avoid the need to call this method. However, some network or OS condition might prevent network multicast message to be sent or received causing the list to be incorrect.
Calling this method will brodcast a request to find new server on the network.
bool WireTapServerList::resolve | ( | const WireTapServerId & | serverId, |
WireTapServerInfo & | serverInfo | ||
) |
Resolves server ID to its corresponding server information.
This method retrieves a WireTapServerInfo object based on a WireTapServerId object containing partial information that defines a persistent identifier for the Wiretap server (an instance of a particular Wiretap server running on a particular host machine). Wiretap clients can use this WireTapServerId object to instantiate a WireTapServerHandle which gives access to the data on the storage device.
serverId | An input parameter. The WireTapServerId object for the Wiretap server ID to resolve. |
serverInfo | An output parameter. The WireTapServerInfo object for the targeted Wiretap server ID. |
WIRETAP_DEPRECATED bool WireTapServerList::resolveStorageId | ( | const char * | storageId, |
WireTapServerId & | serverId | ||
) |
Resolves the storage ID of a storage device to determine which Wiretap server it is currently connected to.
This method obtains a WireTapServerId object containing the information that defines a persistent identifier for the Wiretap server (an instance of a particular Wiretap server running on a particular host machine). Wiretap clients can use this WireTapServerId object to instantiate a WireTapServerHandle which gives access to the data on the storage device.
storageId | An input parameter. The storage ID of a storage device. |
serverId | An output parameter. The WireTapServerId object for the Wiretap server to which the storage device is connected. |