Represents the server side of a Bridge session. More...
#include <ibridge_server.h>
Public Member Functions | |
virtual Server_session_state | get_state () const =0 |
Returns the state of this session. More... | |
virtual IApplication * | get_application () const =0 |
Returns the application this session belongs to. More... | |
virtual IServer_video_context * | get_video_context (Sint32 context_id)=0 |
Returns the video context for a given ID. More... | |
virtual void | add_session_state_callback (IServer_session_state_callback *callback)=0 |
Adds a session state callback. More... | |
virtual void | remove_session_state_callback (IServer_session_state_callback *callback)=0 |
Removes a previously added session state callback. More... | |
virtual const char * | get_security_token () const =0 |
Returns the security token specified by the client. More... | |
virtual const char * | get_session_id () const =0 |
Returns the session ID. More... | |
virtual const char * | get_client_build_number ()=0 |
Returns build number of the client. More... | |
virtual const char * | get_client_bridge_protocol_version ()=0 |
Returns the client Bridge protocol version. More... | |
virtual IServer_transaction_list * | get_pending_transactions ()=0 |
Returns a list of the currently pending Bridge transactions for this session in the order they were started on the client. 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< 0x42574f4a, ... > | |
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< 0x42574f4a, ... > | |
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... | |
Represents the server side of a Bridge session.
|
pure virtual |
Adds a session state callback.
When adding a callback it will be called immediately once with the current state, and then every time the session state changes.
callback | The callback to be added. |
|
pure virtual |
Returns the application this session belongs to.
|
pure virtual |
Returns the client Bridge protocol version.
This is usually the same as the server Bridge protocol version, but can differ if the server for instance accepts older clients.
|
pure virtual |
Returns build number of the client.
|
pure virtual |
Returns a list of the currently pending Bridge transactions for this session in the order they were started on the client.
This is also the order the transactions will be started on the server, but some transactions in the list might not have been started yet on the server which means there won't be a database transaction yet.
Note that even though transactions will be started in the order specified by this list some transactions will execute in sequence and others in parallel, depending on how the transactions were started on the client.
Also note that even though all transactions in the list were pending when this call was made they might have been already committed or aborted when the list is processed and that any transactions added after this call won't be present in the list.
Two transactions will execute in sequence if the second transaction is started after
the previous transaction was committed. Example: start A, commit A, start B commit B. They will execute in parallel if the second transaction is started before the previous transaction is committed. For instance start A, start B, commit A, commit B.
|
pure virtual |
Returns the security token specified by the client.
|
pure virtual |
Returns the session ID.
|
pure virtual |
Returns the state of this session.
|
pure virtual |
Returns the video context for a given ID.
Video contexts must first be created by the client and can then be retrieved on the server via this method. The video context ID is assigned when the video context is created on the client side and must be transferred to the server before calling this method. The recommended way to do this is to execute a Bridge job containing the video context ID and optionally other data that is required for the server-side application to set up the video source and to start producing frames.
context_id | The video context ID. |
NULL
if no video context with the provided ID exists.
|
pure virtual |
Removes a previously added session state callback.
callback | The callback to be removed. |