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

The Iray Bridge application. More...

#include <iiray_bridge_server.h>

Inheritance diagram for mi::bridge::IIray_bridge_application:

Public Member Functions

virtual Sint32 set_disk_cache (const char *location)=0
 Sets the disk cache to use. More...
 
virtual const char * get_disk_cache () const =0
 Returns the disk cache location. More...
 
virtual Sint32 open (bool enable_streaming=true)=0
 Opens the application so that clients can open sessions to it. More...
 
virtual Sint32 close ()=0
 Closes the application and any open sessions. More...
 
virtual Sint32 set_session_handler (IApplication_session_handler *handler)=0
 Sets the session handler that will be called when clients connect. More...
 
virtual IApplication_session_handlerget_session_handler () const =0
 Returns the current session handler, or NULL if no session handler has been set. More...
 
virtual Sint32 set_log_forwarding_limit (base::Message_severity limit)=0
 Sets the maximum verbosity of log messages that will be forwarded to the client. More...
 
virtual base::Message_severity get_log_forwarding_limit () const =0
 Returns the maximum verbosity of log messages that will be forwarded to the client. More...
 
virtual Sint32 set_snapshot_path (const char *path)=0
 Sets the path to which snapshot files will be saved. More...
 
virtual const char * get_snapshot_path () const =0
 Returns the currently configured snapshot path. More...
 
virtual Sint32 set_snapshot_handler (IIray_bridge_snapshot_handler *handler)=0
 Configure the application with the snapshot handler to use. 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< 0x199fadaf, ... >
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< 0x199fadaf, ... >
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

The Iray Bridge application.

This application is installed by the iray_bridge_server plugin and provides the server-side features of Iray Bridge rendering.

See also
mi::bridge::IIray_bridge_server::create_application()

Member Function Documentation

 close()

virtual Sint32 mi::bridge::IIray_bridge_application::close ( )
pure virtual

Closes the application and any open sessions.

Returns
  • 0: Success.
  • -1: The application is already closed.
  • <= -2: Unspecified error.

 get_disk_cache()

virtual const char * mi::bridge::IIray_bridge_application::get_disk_cache ( ) const
pure virtual

Returns the disk cache location.

See also
set_disk_cache()

 get_log_forwarding_limit()

virtual base::Message_severity mi::bridge::IIray_bridge_application::get_log_forwarding_limit ( ) const
pure virtual

Returns the maximum verbosity of log messages that will be forwarded to the client.

See also
set_log_forwarding_limit()
Returns
The current log forwarding limit

 get_session_handler()

virtual IApplication_session_handler * mi::bridge::IIray_bridge_application::get_session_handler ( ) const
pure virtual

Returns the current session handler, or NULL if no session handler has been set.

 get_snapshot_path()

virtual const char * mi::bridge::IIray_bridge_application::get_snapshot_path ( ) const
pure virtual

Returns the currently configured snapshot path.

 open()

virtual Sint32 mi::bridge::IIray_bridge_application::open ( bool  enable_streaming = true)
pure virtual

Opens the application so that clients can open sessions to it.

Parameters
enable_streamingConfigure if the bridge supports only snapshots or streaming as well.
Returns
  • 0: Success
  • -1: Mandatory configuration is incomplete (
See also
set_disk_cache()).
  • -2: The application is already open.
  • <= -3: Unspecified error.

 set_disk_cache()

virtual Sint32 mi::bridge::IIray_bridge_application::set_disk_cache ( const char *  location)
pure virtual

Sets the disk cache to use.

Note
The disk cache must be set before the application can be opened for client sessions. The disk cache can not be changed after it has been successfully set.
See also
get_disk_cache(), mi::neuraylib::ICache_manager_factory
Parameters
locationThe location of the disk cache. This can be either a directory on the local machine (prefix "path:") or the address of some cache manager (prefix "address:").
Returns
  • 0: Success.
  • -1: Invalid argument (disk_cache is NULL or has an incorrect format).
  • -2: No disk cache found at the specified location.
  • -3: The disk cache was already set.
  • <= -4: Unspecified error.

 set_log_forwarding_limit()

virtual Sint32 mi::bridge::IIray_bridge_application::set_log_forwarding_limit ( base::Message_severity  limit)
pure virtual

Sets the maximum verbosity of log messages that will be forwarded to the client.

Note that the log level that will be forwarded is requested by the client, and this setting will only override the client request in case the server needs to restrict logging further, for instance because of security considerations. So if the client requests that info level messages and more severe will be forwarded and the server sets the limit to warning severity, then only warning log messages will be forwarded.

Defaults to mi::base::details::MESSAGE_SEVERITY_DEBUG which will allow the client to request forwarding of all log messages. Set to mi::base::details::MESSAGE_SEVERITY_FATAL to turn of log forwarding.

See also
get_log_forwarding_limit()
Parameters
limitThe log message limit to set.
Returns
0 on success, <0 for unspecified error.

 set_session_handler()

virtual Sint32 mi::bridge::IIray_bridge_application::set_session_handler ( IApplication_session_handler handler)
pure virtual

Sets the session handler that will be called when clients connect.

The session handler will be called as part of the handshake between client and server to decide weather to accept or to reject the client, e.g., based on a security token supplied by the client. The server will always accept clients if no session handler is set (default behavior). The session handler can also be used to keep track of which sessions are connected to the application and their state by adding an mi::bridge::IServer_session_state_callback to the session.

Parameters
handlerThe handler to be set or NULL to remove the current handler.
Returns
0 on success, <0 for unspecified error.

 set_snapshot_handler()

virtual Sint32 mi::bridge::IIray_bridge_application::set_snapshot_handler ( IIray_bridge_snapshot_handler handler)
pure virtual

Configure the application with the snapshot handler to use.

The handler can decide if a request to create a snapshot is allowed based on the session and also decides how the snapshot cb file data is save. The default handler allows all snapshots and stores it as a .cb file in the path configured by calling set_snapshot_path(). Only a single snapshot callback can be installed at a given time, any previous handler will be removed. This method can only be called while the application is closed.

Parameters
handlerThe snapshot handler to install, or 0 to install the default handler.
Returns
  • 0 Success.
  • -1 If the application is open.
  • <-1 Unspecified error.

 set_snapshot_path()

virtual Sint32 mi::bridge::IIray_bridge_application::set_snapshot_path ( const char *  path)
pure virtual

Sets the path to which snapshot files will be saved.

Returns
  • 0: Success.
  • -1: Invalid argument (path is NULL).
  • -2: The path is not valid.
  • <= -3: Unspecified error.