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

API component that serves as entry point for the server-side Bridge API. More...

#include <ibridge_server.h>

Inheritance diagram for mi::bridge::IBridge_server:

Public Member Functions

virtual IApplicationcreate_application (const char *application_path, http::IServer *http_server)=0
 Creates a Bridge application. More...
 
virtual IBridge_snapshot_contextcreate_snapshot_context (const char *disk_cache)=0
 Creates a snapshot context for importing or deleting snapshots. More...
 
virtual const char * get_bridge_protocol_version () const =0
 Returns the Bridge protocol version string. More...
 
virtual Sint32 calculate_hash (neuraylib::ITransaction *transaction, const char *element, IString *o_hash, Size *o_size)=0
 Returns the hash and serialized size for the provided element. 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< 0x1fd8a3ac, ... >
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< 0x1fd8a3ac, ... >
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

API component that serves as entry point for the server-side Bridge API.

Can be used to create Bridge application and a context to import or remove snapshots.

Member Function Documentation

 calculate_hash()

virtual Sint32 mi::bridge::IBridge_server::calculate_hash ( neuraylib::ITransaction *  transaction,
const char *  element,
IString o_hash,
Size o_size 
)
pure virtual

Returns the hash and serialized size for the provided element.

Parameters
transactionThe transaction to use when looking up the element.
elementThe name of the element.
o_hashThe hash will be written to this IString on success.
o_sizeThe serialized size in bytes will be assigned to this variable on success.
Returns
  • 0: Success.
  • -1: Invalid arguments.
  • -2: Failed to look up element with the provided name.
  • <= -2: Unspecified error.

 create_application()

virtual IApplication * mi::bridge::IBridge_server::create_application ( const char *  application_path,
http::IServer http_server 
)
pure virtual

Creates a Bridge application.

The application will listen on the provided path on the given HTTP server for clients. The application has to be opened for connections before clients can open a session to it.

See also
mi::bridge::IBridge_client::get_session()
Parameters
application_pathThe path component of the WebSocket URL to the application. This identifier allows to run different Bridge applications on the same HTTP server. Note that the application path must begin with a slash.
http_serverThe HTTP server instance that handles WebSocket requests for this application.
Returns
The created Bridge application, or NULL in case of failure (invalid arguments, application_path does not start with a slash, or an application for these arguments exists already).

 create_snapshot_context()

virtual IBridge_snapshot_context * mi::bridge::IBridge_server::create_snapshot_context ( const char *  disk_cache)
pure virtual

Creates a snapshot context for importing or deleting snapshots.

See also
mi::bridge::IServer_transaction::create_snapshot(), mi::bridge::IServer_transaction::create_incremental_snapshot_context()
Parameters
disk_cacheThe 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
The snapshot context.

 get_bridge_protocol_version()

virtual const char * mi::bridge::IBridge_server::get_bridge_protocol_version ( ) const
pure virtual

Returns the Bridge protocol version string.