Struct IConnect#

Inheritance Relationships#

Derived Types#

Struct Documentation#

struct IConnect#

Interface for managing IPC connection.

Subclassed by CConnection, CConnection

Public Functions

virtual bool AsyncConnect(IInterfaceAccess *pReceiver) = 0#

Establish a connection and start sending/receiving messages.

Parameters:

pReceiver[in] Callback interface for receiving data and connect status.

Returns:

Returns ‘true’ when a channel connection could be initiated. Use GetStatus or IConnectEventCallback to check the connection state.

virtual bool WaitForConnection(uint32_t uiWaitMs) = 0#

Wait for a connection to take place.

Parameters:

uiWaitMs[in] Wait for a connection to take place. A value of 0 doesn’t wait at all, a value of 0xffffffff waits for infinite time.

Returns:

Returns ‘true’ when a connection took place.

virtual void CancelWait() = 0#

Cancel a wait for connection.

virtual void Disconnect() = 0#

Disconnect from a connection. This will set the connect status to disconnected and release the interface used for the status events.

virtual uint64_t RegisterStatusEventCallback(IInterfaceAccess *pEventCallback) = 0#

Register event callback interface.

Register a connection status event callback interface. The exposed interface must be of type IConnectEventCallback. The registration will exist until a call to the unregister function with the returned cookie or until the connection is terminated.

Parameters:

pEventCallback[in] Pointer to the object exposing the IConnectEventCallback interface.

Returns:

The cookie assigned to the registration or 0 when the registration wasn’t successful.

virtual void UnregisterStatusEventCallback(uint64_t uiCookie) = 0#

Unregister the status event callback with the returned cookie from the registration.

Parameters:

uiCookie[in] The cookie returned by a previous call to the registration function.

virtual EConnectStatus GetStatus() const = 0#

Gets the current status of the IPC whether it is initialized/connected/disconnected or having connection error.

Returns:

Returns retrieved status of the IPC.

boolean AsyncConnect (in IInterfaceAccess pReceiver)

Establish a connection and start sending/receiving messages.

Parameters:

pReceiver[in] Callback interface for receiving data and connect status.

Returns:

Returns ‘true’ when a channel connection could be initiated. Use GetStatus or IConnectEventCallback to check the connection state.

boolean WaitForConnection (in uint32 uiWaitMs)

Wait for a connection to take place.

Parameters:

uiWaitMs[in] Wait for a connection to take place. A value of 0 doesn’t wait at all, a value of 0xffffffff waits for infinite time.

Returns:

Returns ‘true’ when a connection took place.

void CancelWait()

Cancel a wait for connection.

void Disconnect()

Disconnect from a connection. This will set the connect status to disconnected and release the interface used for the status events.

uint64 RegisterStatusEventCallback (in IInterfaceAccess pEventCallback)

Register event callback interface.

Register a connection status event callback interface. The exposed interface must be of type IConnectEventCallback. The registration will exist until a call to the unregister function with the returned cookie or until the connection is terminated.

Parameters:

pEventCallback[in] Pointer to the object exposing the IConnectEventCallback interface.

Returns:

The cookie assigned to the registration or 0 when the registration wasn’t successful.

void UnregisterStatusEventCallback (in uint64 uiCookie)

Unregister the status event callback with the returned cookie from the registration.

Parameters:

uiCookie[in] The cookie returned by a previous call to the registration function.

EConnectStatus GetStatus() const

Gets the current status of the IPC whether it is initialized/connected/disconnected or having connection error.

Returns:

Returns retrieved status of the IPC.

Public Static Attributes

static ::sdv::interface_id _id = 0x8D73A5E8FFBB9261#

Interface ID.