Iray SDK API nvidia_logo_transpbg.gif Up
iiray_bridge_client.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IIRAY_BRIDGE_CLIENT_H
8#define MI_NEURAYLIB_IIRAY_BRIDGE_CLIENT_H
9
10#include <mi/base/enums.h>
11#include <mi/neuraylib/idata.h>
15
16namespace mi {
17
18namespace base { class ILogger; }
19
20namespace bridge {
21
30 mi::base::Interface_declare<0xe36efcd1,0xeb3d,0x4c9c,0xbc,0x8d,0xc0,0x28,0xf1,0xe9,0xc7,0xdf,
31 mi::neuraylib::IProgress_callback>
32{
33public:
48 virtual void ready( Sint32 error_code, const char* file_name) = 0;
49};
50
65 mi::base::Interface_declare<0xe624c597,0x2223,0x441b,0x81,0xf7,0x43,0x48,0xc8,0xfd,0x43,0x1a>
66{
67public:
100 neuraylib::ITransaction* transaction,
101 const char* file_name,
103 bool incremental = false) = 0;
104
117 virtual Sint32 cancel_snapshot() = 0;
118
134 virtual Sint32 set_option( const char* name, const IData* value) = 0;
135
143 virtual const IData* get_option( const char* name) const = 0;
144
159 template<class T>
160 const T* get_option( const char* name) const
161 {
162 const IData* ptr_idata = get_option( name);
163 if ( !ptr_idata)
164 return 0;
165 const T* ptr_T = static_cast<const T*>( ptr_idata->get_interface( typename T::IID()));
166 ptr_idata->release();
167 return ptr_T;
168 }
169
173 virtual Size get_options_length() const = 0;
174
182 virtual const char* get_option_name( Size index) const = 0;
183
191 virtual const char* get_option_type( Size index) const = 0;
192};
193
207 mi::base::Interface_declare<0x32fcf9c9,0x3572,0x4bfb,0x83,0x37,0x1d,0xfa,0x14,0xaf,0xba,0xe8>
208{
209public:
213
223
230
240 virtual const IArray* get_supported_render_modes() = 0;
241};
242
247 mi::base::Interface_declare<0x2e3322ff,0xc7a1,0x4664,0x99,0x6d,0xef,0xd1,0xf2,0x24,0x83,0xa4>
248{
249public:
250
275 virtual Sint32 set_application_url( const char* application_url) = 0;
276
278 virtual const char* get_application_url() const = 0;
279
294 virtual Sint32 set_security_token( const char* security_token) = 0;
295
297 virtual const char* get_security_token() const = 0;
298
307 neuraylib::ITransaction* transaction, const char* scene_name) = 0;
308
318
325
336 virtual void set_receiving_logger( base::ILogger* logger) = 0;
337
346
348 virtual const char* get_bridge_protocol_version() const = 0;
349
377 const char* application_url, const char* security_token = 0) = 0;
378};
379 // end group mi_neuray_bridge_client
381
382} // namespace bridge
383
384} // namespace mi
385
386#endif // MI_NEURAYLIB_IIRAY_BRIDGE_CLIENT_H
This interface represents static arrays, i.e., arrays with a fixed number of elements.
Definition: iarray.h:37
This interface is the base interface of all types.
Definition: idata.h:297
The ILogger interface class supports logging of messages.
Definition: ilogger.h:194
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
Abstract interface for callbacks for session state changes.
Definition: ibridge_client.h:491
API component that serves as entry point for the client-side Iray Bridge API.
Definition: iiray_bridge_client.h:248
virtual Sint32 set_log_forwarding_level(base::Message_severity level)=0
Sets the log level of messages that are forwarded from the Iray Bridge server.
virtual Sint32 set_security_token(const char *security_token)=0
Sets the security token to use when connecting the server-side Iray Bridge application.
virtual IIray_bridge_session * get_session(const char *application_url, const char *security_token=0)=0
Returns a session to the provided Bridge application running on a Bridge server.
virtual void set_receiving_logger(base::ILogger *logger)=0
Sets the receiving logger for log messages forwarded from the Iray Bridge server.
virtual IIray_bridge_snapshot_context * create_snapshot_context(neuraylib::ITransaction *transaction, const char *scene_name)=0
Creates a snapshot context.
virtual const char * get_application_url() const =0
Returns the configured Iray Bridge application URL.
virtual const char * get_bridge_protocol_version() const =0
Returns the Iray Bridge protocol version.
virtual const char * get_security_token() const =0
Returns the configured security token.
virtual Sint32 set_application_url(const char *application_url)=0
Sets the default WebSocket URL to the server-side Iray Bridge application.
virtual base::ILogger * get_receiving_logger() const =0
Returns the receiving logger for log messages forwarded from the Iray Bridge server.
virtual base::Message_severity get_log_forwarding_level() const =0
Returns the currently set log level for messages forwarded from the Iray Bridge server.
Represents a session (connection) to an Iray Bridge Server.
Definition: iiray_bridge_client.h:208
virtual void remove_session_state_callback(IClient_session_state_callback *callback)=0
Removes a previously added session state callback.
virtual const IArray * get_supported_render_modes()=0
Returns an IArray containing IString instances with the names of all cloud render modes supported by ...
virtual Client_session_state get_state()=0
Returns the state of the session.
virtual void add_session_state_callback(IClient_session_state_callback *callback)=0
Adds a session state callback.
Abstract interface for snapshot events.
Definition: iiray_bridge_client.h:32
virtual void ready(Sint32 error_code, const char *file_name)=0
Called when the snapshot is done or if there was an error.
Context for creating Iray Bridge snapshots.
Definition: iiray_bridge_client.h:66
virtual Size get_options_length() const =0
Returns the number of render context options.
virtual const char * get_option_name(Size index) const =0
Returns the name of a render context option.
const T * get_option(const char *name) const
Returns the value of a snapshot context option.
Definition: iiray_bridge_client.h:160
virtual Sint32 create_snapshot(neuraylib::ITransaction *transaction, const char *file_name, IIray_bridge_snapshot_callback *callback, bool incremental=false)=0
Creates a scene snapshot on the Iray Bridge server.
virtual Sint32 cancel_snapshot()=0
Cancels the snapshot currently being created by this snapshot context.
virtual const IData * get_option(const char *name) const =0
Returns the value of a snapshot context option.
virtual Sint32 set_option(const char *name, const IData *value)=0
Sets the value of a snapshot context option.
virtual const char * get_option_type(Size index) const =0
Returns the type of a render context option.
A transaction provides a consistent view on the database.
Definition: itransaction.h:81
Basic enums.
virtual const IInterface * get_interface(const Uuid &interface_id) const =0
Acquires a const interface from another.
virtual Uint32 release() const =0
Decrements the reference count.
Message_severity
Constants for possible message severities.
Definition: enums.h:31
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Client_session_state
The different states a client session can be in.
Definition: ibridge_client.h:456
Bridge client.
Types.
Callback interface for progress.
Database transactions.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: neuraylib.h:179