Struct IConnect#

Inheritance Relationships#

Derived Type#

Struct Documentation#

struct IConnect#

Interface for managing IPC connection.

Subclassed by 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 state.

Returns:

Returns ‘true’ when a channel connection could be initiated. Use GetConnectState 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 state to disconnected and release the interface used for the state events.

virtual uint64_t RegisterStateEventCallback(IInterfaceAccess *pEventCallback) = 0#

Register event callback interface.

Register a connection state 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 UnregisterStateEventCallback(uint64_t uiCookie) = 0#

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

Parameters:

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

virtual EConnectState GetConnectState() const = 0#

Get the current state of the IPC connection.

Returns:

Returns connection state.

boolean AsyncConnect (in IInterfaceAccess pReceiver)

Establish a connection and start sending/receiving messages.

Parameters:

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

Returns:

Returns ‘true’ when a channel connection could be initiated. Use GetConnectState 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 state to disconnected and release the interface used for the state events.

uint64 RegisterStateEventCallback (in IInterfaceAccess pEventCallback)

Register event callback interface.

Register a connection state 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 UnregisterStateEventCallback (in uint64 uiCookie)

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

Parameters:

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

EConnectState GetConnectState() const

Get the current state of the IPC connection.

Returns:

Returns connection state.

Public Static Attributes

static constexpr ::sdv::interface_id _id = 0x1AEC72C2188D272A#

Interface ID.