Represents the client side of a Bridge session. More...
Public Member Functions | |
virtual Client_session_state | get_state ()=0 |
Returns the state of the session. More... |
|
virtual void | add_session_state_callback (IClient_session_state_callback *callback)=0 |
Adds a session state callback. More... |
|
virtual void | remove_session_state_callback (IClient_session_state_callback *callback)=0 |
Removes a previously added session state callback. More... |
|
virtual IClient_scope * | get_scope (neuraylib::IScope *local_scope)=0 |
Returns a Bridge scope that mirrors a local scope to the Bridge server. More... |
|
virtual IClient_video_context * | create_video_context ()=0 |
Creates a new video context. More... |
|
virtual Sint32 | measure_bandwidth (IClient_measure_bandwidth_callback *progress_callback, bool upload, Uint32 package_size, Uint32 package_count=1)=0 |
Measures the bandwidth to the Bridge server. More... |
|
virtual void | set_receiving_logger (base::ILogger *logger)=0 |
Sets the receiving logger for log messages forwarded from the Bridge server. More... |
|
virtual base::ILogger * | get_receiving_logger () const =0 |
Returns the receiving logger for log messages forwarded from the Bridge server. More... |
|
virtual Sint32 | set_forwarding_log_level (base::Message_severity level)=0 |
Sets the log level of messages that are forwarded from the Bridge server. More... |
|
virtual base::Message_severity | get_forwarding_log_level () const =0 |
Returns the currently set log level for messages forwarded from the server. More... |
|
virtual Size | get_bytes_written () const =0 |
Returns the number of bytes written to the server so far. More... |
|
virtual Size | get_bytes_read () const =0 |
Returns the number of bytes read from the server so far. More... |
|
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0x70bb8712, 0x1305, 0x4c76, 0xb9, 0x38, 0xad, 0x27, 0x91, 0xea, 0xbd, 0x78 > | |
typedef Interface_declare< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11, IInterface > |
Self |
Own type. More... |
|
typedef Uuid_t< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11 > |
IID |
Declares the interface ID (IID) of this interface. More... |
|
Static Public Member Functions inherited from mi::base::Interface_declare< 0x70bb8712, 0x1305, 0x4c76, 0xb9, 0x38, 0xad, 0x27, 0x91, 0xea, 0xbd, 0x78 > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... |
|
Represents the client side of a Bridge session.
A session can be opened by mi::bridge::IBridge_client::get_session(). Note that repeated calls of that method with the same arguments return the same session, i.e., sessions are shared between different callers. Sharing the same session is vital for features such as incremental changes, and to share other resources that would otherwise be duplicated. The session will be destroyed and client- and server-side resources will be released when all references to the session has been released.
The session will automatically connect to the server. Use add_session_state_callback() for callbacks about session state changes. A closed session can not be used anymore. Use mi::bridge::IBridge_client::get_session() to attempt to reconnect.
|
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 |
Creates a new video context.
The video context will be assigned an id which needs to be transfered to the server, along with any other data required to set up the video source properly. The server use this id to get the corresponding server-side video context which can be used to stream video frames to the client. The recommended way of transferring the id to the server is by executing a Bridge job.
NULL
in case of failure.
|
pure virtual |
Returns the number of bytes read from the server so far.
|
pure virtual |
Returns the number of bytes written to the server so far.
|
pure virtual |
Returns the currently set log level for messages forwarded from the server.
|
pure virtual |
Returns the receiving logger for log messages forwarded from the Bridge server.
Note that if no receiving logger has been set, this method returns NULL
and logging is done using the currently general configured logger.
|
pure virtual |
Returns a Bridge scope that mirrors a local scope to the Bridge server.
The first call for a given local scope creates the corresponding scope on the server. If the client scope instance is destroyed, the corresponding scope on the server is destroyed as well.
local_scope | The local scope to mirror. |
NULL
in case of failure.
|
pure virtual |
Returns the state of the session.
|
pure virtual |
Measures the bandwidth to the Bridge server.
The bandwidth is measured by sending a specified number of packages with a specified size in bytes. This method is asynchronous, the provided callback interface will be called when there is progress and when the measurement is done.
progress_callback | A callback interface that will be called with progress information. |
upload |
true for measuring upload bandwidth, false for measuring download bandwidth. |
package_size | The size in bytes of a single package. |
package_count | The number of packages to upload or download. |
|
pure virtual |
Removes a previously added session state callback.
callback | The callback to be removed. |
|
pure virtual |
Sets the log level of messages that are forwarded from the Bridge server.
Note that this does not affect the log level of the server, nor the log level of the client. It only filters the messages forwarded by the server to the client. Also note that the server will never send out log messages more verbose than the configured limit for the bridge application the session is connected to.
|
pure virtual |
Sets the receiving logger for log messages forwarded from the Bridge server.
If the provided logger is NULL
then forwarded log entries will be written to the general configured logger as if they were generated locally, but with a prefix identifying the server that they originated from (default behavior).
logger | The receiving logger. It is valid to pass NULL in which case logging is reset to be done to the general configured logger. |