Struct IConnectionControl#
Defined in File com.h
Inheritance Relationships#
Derived Type#
public CCommunicationControl
(Class CCommunicationControl)
Struct Documentation#
-
struct IConnectionControl#
Interface for creating a channel connection used for SDV communication.
The channel control interface is used to create a connection between two processes and start the initial communication. The provided object will be accessible as initial object through the channel. Using these interfaces the following connections can be made:
The main application provides an endpoint with a channel to its repository and the isolated or external application links its own repository to the repository of the main application.
The main application provides a listener endpoint (IPC channel is configured as listener and assigned to the channel control) with an object to create a new private connection. Connecting applications can then connect to the main applications and after the initial connection create a private communication.
The isolated application provides an object to create a private communication to another isolated or external application
Subclassed by CCommunicationControl
Public Functions
-
virtual TConnectionID CreateServerConnection(EChannelType eChannelType, IInterfaceAccess *pObject, uint32_t uiTimeoutMs, sdv::u8string &ssConnectionString) = 0#
Create an IPC channel endpoint and use it for SDV communication.
Remark
The channel will be destroyed automatically when a timeout occurs (no initial connection took place within the specified time).
Remark
The function doesn’t wait until a connection has been made, but returns straight after the channel creation.
- Parameters:
eChannelType – [in] Type of channel to create. Must be local or remote.
pObject – [in] Initial object to start the communication with.
uiTimeoutMs – [in] Timeout for waiting for a connection.
ssConnectionString – [out] String describing the connection details to connect to this channel.
- Returns:
Channel connection ID if successful or 0 if not.
-
virtual TConnectionID CreateClientConnection(const sdv::u8string &ssConnectionString, uint32_t uiTimeoutMs, IInterfaceAccess *&pProxy) = 0#
Connect to an IPC channel managed by the channel control.
Remark
The connection will be destroyed automatically when a timeout occurs (no initial connection took place within the specified time).
- Parameters:
ssConnectionString – [in] The string describing the connection details.
uiTimeoutMs – [in] Timeout for waiting for a connection.
pProxy – [out] Pointer to the object representing the remote object (a proxy to the remote object). Or nullptr when a timeout occurred.
- Returns:
Channel connection ID if successful or 0 if not.
-
virtual TConnectionID AssignServerEndpoint(IInterfaceAccess *pChannelEndpoint, IInterfaceAccess *pObject, uint32_t uiTimeoutMs, bool bAllowReconnect) = 0#
Assign and take over an already initialized IPC channel server endpoint for use with SDV communication.
Remark
The channel will be destroyed automatically when a timeout occurs (no initial connection took place within the specified time) unless the flag bAllowReconnect has been set.
Remark
The channel uses the interface sdv::IObjectLifetime to control the lifetime of the channel. If IObjectLifetime is not available, IObjectDestroy will be used.
Remark
The function doesn’t wait until a connection has been made, but returns straight after the assignment.
- Parameters:
pChannelEndpoint – [in] Pointer to the channel endpoint to be assigned.
pObject – [in] Initial object to start the communication with.
uiTimeoutMs – [in] Timeout for waiting for an initial connection. Not used when the bAllowReconnect flag has been set.
bAllowReconnect – [in] When set, the channel is allowed to be disconnected and reconnected again.
- Returns:
Channel connection ID if successful or 0 if not.
-
virtual TConnectionID AssignClientEndpoint(IInterfaceAccess *pChannelEndpoint, uint32_t uiTimeoutMs, IInterfaceAccess *&pProxy) = 0#
Assign and take over an already initialized IPC channel client endpoint for use with SDV communication.
Remark
The connection will be destroyed automatically when a timeout occurs (no initial connection took place within the specified time).
Remark
The channel uses the interface sdv::IObjectLifetime to control the lifetime of the channel. If IObjectLifetime is not available, IObjectDestroy will be used.
- Parameters:
pChannelEndpoint – [in] Pointer to the channel endpoint to be assigned.
uiTimeoutMs – [in] Timeout for waiting for an initial connection. Not used when the bAllowReconnect flag has been set.
pProxy – [out] Pointer to the object representing the remote object (a proxy to the remote object). Or nullptr when a timeout occurred.
- Returns:
Channel connection ID if successful or 0 if not.
-
virtual void RemoveConnection(const TConnectionID &tConnectionID) = 0#
Remove a connection with the provided connection ID.
- Parameters:
tConnectionID – [in] The connection ID of the connection to remove.
- TConnectionID CreateServerConnection (in EChannelType eChannelType, in IInterfaceAccess pObject, in uint32 uiTimeoutMs, out u8string ssConnectionString)
Create an IPC channel endpoint and use it for SDV communication.
Remark
The channel will be destroyed automatically when a timeout occurs (no initial connection took place within the specified time).
Remark
The function doesn’t wait until a connection has been made, but returns straight after the channel creation.
- Parameters:
eChannelType – [in] Type of channel to create. Must be local or remote.
pObject – [in] Initial object to start the communication with.
uiTimeoutMs – [in] Timeout for waiting for a connection.
ssConnectionString – [out] String describing the connection details to connect to this channel.
- Returns:
Channel connection ID if successful or 0 if not.
- TConnectionID CreateClientConnection (in u8string ssConnectionString, in uint32 uiTimeoutMs, out IInterfaceAccess pProxy)
Connect to an IPC channel managed by the channel control.
Remark
The connection will be destroyed automatically when a timeout occurs (no initial connection took place within the specified time).
- Parameters:
ssConnectionString – [in] The string describing the connection details.
uiTimeoutMs – [in] Timeout for waiting for a connection.
pProxy – [out] Pointer to the object representing the remote object (a proxy to the remote object). Or nullptr when a timeout occurred.
- Returns:
Channel connection ID if successful or 0 if not.
- TConnectionID AssignServerEndpoint (in IInterfaceAccess pChannelEndpoint, in IInterfaceAccess pObject, in uint32 uiTimeoutMs, in boolean bAllowReconnect)
Assign and take over an already initialized IPC channel server endpoint for use with SDV communication.
Remark
The channel will be destroyed automatically when a timeout occurs (no initial connection took place within the specified time) unless the flag bAllowReconnect has been set.
Remark
The channel uses the interface sdv::IObjectLifetime to control the lifetime of the channel. If IObjectLifetime is not available, IObjectDestroy will be used.
Remark
The function doesn’t wait until a connection has been made, but returns straight after the assignment.
- Parameters:
pChannelEndpoint – [in] Pointer to the channel endpoint to be assigned.
pObject – [in] Initial object to start the communication with.
uiTimeoutMs – [in] Timeout for waiting for an initial connection. Not used when the bAllowReconnect flag has been set.
bAllowReconnect – [in] When set, the channel is allowed to be disconnected and reconnected again.
- Returns:
Channel connection ID if successful or 0 if not.
- TConnectionID AssignClientEndpoint (in IInterfaceAccess pChannelEndpoint, in uint32 uiTimeoutMs, out IInterfaceAccess pProxy)
Assign and take over an already initialized IPC channel client endpoint for use with SDV communication.
Remark
The connection will be destroyed automatically when a timeout occurs (no initial connection took place within the specified time).
Remark
The channel uses the interface sdv::IObjectLifetime to control the lifetime of the channel. If IObjectLifetime is not available, IObjectDestroy will be used.
- Parameters:
pChannelEndpoint – [in] Pointer to the channel endpoint to be assigned.
uiTimeoutMs – [in] Timeout for waiting for an initial connection. Not used when the bAllowReconnect flag has been set.
pProxy – [out] Pointer to the object representing the remote object (a proxy to the remote object). Or nullptr when a timeout occurred.
- Returns:
Channel connection ID if successful or 0 if not.
- void RemoveConnection (in TConnectionID tConnectionID)
Remove a connection with the provided connection ID.
- Parameters:
tConnectionID – [in] The connection ID of the connection to remove.
Public Static Attributes
-
static ::sdv::interface_id _id = 0xB497C701C93D7588#
Interface ID.