Iray SDK API nvidia_logo_transpbg.gif Up
mi::bridge::IIray_bridge_session Class Referenceabstract

Represents a session (connection) to an Iray Bridge Server. More...

#include <iiray_bridge_client.h>

Inheritance diagram for mi::bridge::IIray_bridge_session:

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 const IArrayget_supported_render_modes ()=0
 Returns an IArray containing IString instances with the names of all cloud render modes supported by the Bridge Server. 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< 0x32fcf9c9, ... >
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< 0x32fcf9c9, ... >
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

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.

Member Function Documentation

 add_session_state_callback()

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
callbackThe callback to be added.

 get_state()

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

 get_supported_render_modes()

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.

 remove_session_state_callback()

virtual void mi::bridge::IIray_bridge_session::remove_session_state_callback ( IClient_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.