mi::bridge::IIray_bridge_session Class Reference
[Bridge client]
Description
Represents a session (connection) to an Iray Bridge Server. Normally a session doesn't need to be explicitly created since the Iray Bridge render and snapshot contexts handles sessions automatically. But creating an explicit session can allow a connection to be made at a specific point in time and can also serve to keep a session open even when no Iray bridge context is in use. Furthermore this session instance can be used to query the Iray Bridge Server for things where a connection to the server is needed, like which render modes are supported.
Bridge sessions are shared, so creating several session instances using the same connection credentials, explicitly or through Iray Bridge render contexts, will only create one actual connection to the server and this connection will be kept open as long as there are session instances still open.
Public Member Functions
- virtual void add_session_state_callback( IClient_session_state_callback* callback) =0
- Adds a session state callback. More...
- virtual Client_session_state get_state() =0
- Returns the state of the session. More...
- virtual const IArray* get_supported_render_modes() =0
- Returns an IArray containing IString instances with the names of all cloud render modes supported by the Bridge Server. More...
- virtual void remove_session_state_callback( IClient_session_state_callback* callback) =0
- Removes a previously added session state callback. More...
Member Functions
- virtual void mi::bridge::IIray_bridge_session::add_session_state_callback( IClient_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
- callback
- The callback to be added.
- virtual Client_session_state mi::bridge::IIray_bridge_session::get_state() [pure virtual]
-
Returns the state of the session.
See also:
mi::bridge::Client_session_state
- virtual const IArray* mi::bridge::IIray_bridge_session::get_supported_render_modes() [pure virtual]
-
Returns an IArray containing IString instances with the names of all cloud render modes supported by the Bridge Server. These can be added to the set of locally supported render modes.
Note that this method involves a round trip to the remote server and can in some cases take considerable time.
Returns
The set of supported render modes as an IArray with IString instances, or NULL if not connected or if there was an error.
- virtual void mi::bridge::IIray_bridge_session::remove_session_state_callback( IClient_session_state_callback* callback) [pure virtual]
-
Parameters
- callback
- The callback to be removed.