C++ application programming interface, Source, Void xmlrci_disconnected_function(rci_handle hrci) – Wavecom W-RCI (Remote Control) V8.7.0 User Manual

Page 59: Void xmlrci_timeout_function(rci_handle hrci), Void destroy()

Advertising
background image

XML SDK V8.7.0 Remote Control Interface

TCP/IP Interface

51

typedef void (* XMLRCI_CONNECTED_FUNCTION_TYPE)(RCI_HANDLE hRci);

Function type definition for the connection established message. After the connect command has been is-
sued a certain time passes until a connection is established. This message is called by the API when the
connection actually is established. It is a callback routine which has to be defined by the client application
programmer and has to be passed to the source.

void XMLRCI_DISCONNECTED_FUNCTION(RCI_HANDLE hRci)

typedef void (*XMLRCI_DISCONNECTED_FUNCTION_TYPE)(RCI_HANDLE hRci);

Function type definition for the disconnected message. If the link to the server is broken, this message is
called by the API. It is a callback routine which has to be defined by the client application programmer and
has to be passed to the source.

void XMLRCI_TIMEOUT_FUNCTION(RCI_HANDLE hRci)

typedef void (*XMLRCI_TIMEOUT_FUNCTION_TYPE)( RCI_HANDLE hRci);

Function type definition for the timeout message. If the link to the server cannot be established, this mes-
sage is called by the API. It is a callback routine which has to be defined by the client application pro-
grammer and has to be passed to the source.

C++ Application Programming Interface

Source

class CXMLRCI
{
public:
virtual void Destroy() = 0;
virtual void Connect(const char* strIPAddress, const char* strPort) = 0;
virtual void Disconnect() = 0;
virtual void SendXMLMessage(const void* pMessage, size_t unMsgSize) = 0;
};

CXMLRCI *CreateXmlRciInstance(CXMLRCISink *pSink, const char *strUser, const char *strPwd,
const XMLFormatting &format)

CXMLRCI *CreateXmlRciInstance(CXMLRCISink *pSink, const char* strUser, const
char* strPwd , const XMLFormatting& format)

Starts a session with the specified User. This function returns a pointer to a CXMLRCI instance. The user
must delete this instance after it is not being used anymore.
Parameters

Parameter

Definition

pSink

Pointer to the Sink class. The user is responsible for deleting the sink after deleting the

source.

strUser

Username

strPwd

Password

Format: See section

XML Message Format

on page 52.

void Destroy()

Stops a session and deletes the instance.

void Connect(const char* strAddress, const char* strPort)

Connects to the specified server.
Return Value
Returns true if successful or false if not successful.
Parameters

Parameter

Definition

strAddress

The IP address or DNS name of the pc where the server runs. If the string is empty, it

connects to the local server on the same pc.

strPort

The port which is configured on the chosen server. If the strAddress parameter is

Advertising
This manual is related to the following products: