API component that serves as entry point for the client-side Bridge API. More...
#include <ibridge_client.h>
Public Member Functions | |
virtual IClient_session * | get_session (const char *application_url, const char *security_token=0)=0 |
Returns a session to the provided Bridge application running on a Bridge server. More... | |
virtual const char * | get_bridge_protocol_version () const =0 |
Returns the Bridge protocol version. More... | |
Public Member Functions inherited from mi::base::IInterface | |
virtual Uint32 | retain () const =0 |
Increments the reference count. More... | |
virtual Uint32 | release () const =0 |
Decrements the reference count. More... | |
virtual const IInterface * | get_interface (const Uuid &interface_id) const =0 |
Acquires a const interface from another. More... | |
template<class T> | |
const T * | get_interface () const |
Acquires a const interface from another. More... | |
virtual IInterface * | get_interface (const Uuid &interface_id)=0 |
Acquires a mutable interface from another. More... | |
template<class T> | |
T * | get_interface () |
Acquires a mutable interface from another. More... | |
virtual Uuid | get_iid () const =0 |
Returns the interface ID of the most derived interface. More... | |
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0xbe270827, ... > | |
typedef Interface_declare< id1, ... > | Self |
Own type. More... | |
typedef Uuid_t< id1, ... > | IID |
Declares the interface ID (IID) of this interface. More... | |
Public Types inherited from mi::base::IInterface | |
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> | IID |
Declares the interface ID (IID) of this interface. More... | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0xbe270827, ... > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
Static Public Member Functions inherited from mi::base::IInterface | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface. More... | |
API component that serves as entry point for the client-side Bridge API.
Can be used to create sessions to a Bridge application.
|
pure virtual |
Returns the Bridge protocol version.
|
pure virtual |
Returns a session to the provided Bridge application running on a Bridge server.
Bridge supports session sharing, so subsequent calls to this method with the same URL and security token will return an already existing valid session. The session will be considered the same if the URL and security token strings match exactly, otherwise a new session will be created. If a session is closed then calling get_session() with the same URL and security token will create a new session and attempt a new connection to the server.
The session will connect to the specified URL automatically. To find out if the session is connected or if the connection fails add a session state callback by calling mi::bridge::IClient_session::add_session_state_callback(). This callback will be called immediately with the current state, and then when the state changes.
application_url | The WebSocket URL to the server-side Bridge application. If the HTTP server listens on host "somehost" and port 80, and the application path on the server side is set to "/myapp" , then the client will connect using the URL "ws://somehost:80/myapp" . If the connection is encrypted using the SSL protocol, then the prefix "wss" needs to be used instead of "ws" . Note that the port must be specified. The standard port for WebSockets is 80 and 443 for secure WebSockets. |
security_token | An optional security token that can be inspected by the server-side application to decide whether the session should be accepted or rejected. |