DiCE API nvidia_logo_transpbg.gif Up
mi::bridge::IServer_session Class Referenceabstract

Represents the server side of a Bridge session. More...

#include <ibridge_server.h>

Inheritance diagram for mi::bridge::IServer_session:

Public Member Functions

virtual Server_session_state get_state () const =0
 Returns the state of this session. More...
 
virtual IApplicationget_application () const =0
 Returns the application this session belongs to. More...
 
virtual IServer_video_contextget_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_listget_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 IInterfaceget_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 IInterfaceget_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...
 

Detailed Description

Member Function Documentation

 add_session_state_callback()

virtual void mi::bridge::IServer_session::add_session_state_callback ( IServer_session_state_callback callback)
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.

See also
remove_session_state_callback()
Parameters
callbackThe callback to be added.

 get_application()

virtual IApplication * mi::bridge::IServer_session::get_application ( ) const
pure virtual

Returns the application this session belongs to.

 get_client_bridge_protocol_version()

virtual const char * mi::bridge::IServer_session::get_client_bridge_protocol_version ( )
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.

 get_client_build_number()

virtual const char * mi::bridge::IServer_session::get_client_build_number ( )
pure virtual

Returns build number of the client.

 get_pending_transactions()

virtual IServer_transaction_list * mi::bridge::IServer_session::get_pending_transactions ( )
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.

Returns
A list of pending transactions in the order they were started on the client.

 get_security_token()

virtual const char * mi::bridge::IServer_session::get_security_token ( ) const
pure virtual

Returns the security token specified by the client.

 get_session_id()

virtual const char * mi::bridge::IServer_session::get_session_id ( ) const
pure virtual

Returns the session ID.

 get_state()

virtual Server_session_state mi::bridge::IServer_session::get_state ( ) const
pure virtual

Returns the state of this session.

 get_video_context()

virtual IServer_video_context * mi::bridge::IServer_session::get_video_context ( Sint32  context_id)
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.

Parameters
context_idThe video context ID.
Returns
The video context or NULL if no video context with the provided ID exists.

 remove_session_state_callback()

virtual void mi::bridge::IServer_session::remove_session_state_callback ( IServer_session_state_callback callback)
pure virtual

Removes a previously added session state callback.

See also
add_session_state_callback()
Parameters
callbackThe callback to be removed.