Iray SDK API nvidia_logo_transpbg.gif Up
iiray_bridge_server.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_SERVER_H
8#define MI_NEURAYLIB_IIRAY_BRIDGE_SERVER_H
9
10#include <mi/base/enums.h>
12
13
14namespace mi {
15
16class IString;
17
18namespace http { class IServer; }
19
20namespace bridge {
21
22class IApplication_session_handler;
23class IServer_session;
24
39 mi::base::Interface_declare<0x46e19aa2,0xf669,0x422d,0x96,0x83,0x69,0xbd,0x9b,0x69,0x7f,0x55>
40{
41public:
42
50 virtual bool on_snapshot_request( IServer_session* session, Uint32 context_id) = 0;
51
75 virtual Sint32 on_snapshot_creation( IServer_session* session, Uint32 context_id,
76 const char* scene_name, bool incremental, const char* suggested_snapshot_name,
77 const char* cb_file_data, IString* final_snapshot_name,
78 IString* error_message) = 0;
79
90 virtual void on_snapshot_error( IServer_session* session, Uint32 context_id,
91 Sint32 error_code, const char* error_message) = 0;
92};
93
101 mi::base::Interface_declare<0x199fadaf,0xf8c0,0x4d40,0xaf,0x20,0x95,0x6c,0x1d,0x73,0xf4,0xa4>
102{
103public:
121 virtual Sint32 set_disk_cache( const char* location) = 0;
122
126 virtual const char* get_disk_cache() const = 0;
127
138 virtual Sint32 open( bool enable_streaming = true) = 0;
139
146 virtual Sint32 close() = 0;
147
160
163
181
188
196 virtual Sint32 set_snapshot_path( const char* path) = 0;
197
199 virtual const char* get_snapshot_path() const = 0;
200
214};
215
220 mi::base::Interface_declare<0x1acd50a4,0xbc89,0x4712,0x97,0xd,0x79,0xf2,0x99,0x8b,0x4,0x12>
221{
222public:
240 const char* application_path, http::IServer* http_server) = 0;
241
243 virtual const char* get_bridge_protocol_version() const = 0;
244
259 virtual Sint32 delete_snapshot(const char* snapshot_path) = 0;
260
275 virtual Sint32 delete_snapshot_from_string(const char* cb_data) = 0;
276};
277 // end group mi_neuray_bridge_server
279
280} // namespace bridge
281
282} // namespace mi
283
284#endif // MI_NEURAYLIB_IBRIDGE_SERVER_H
A simple string class.
Definition: istring.h:22
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
Abstract interface that can be used to control which sessions to a Bridge application are established...
Definition: ibridge_server.h:605
The Iray Bridge application.
Definition: iiray_bridge_server.h:102
virtual IApplication_session_handler * get_session_handler() const =0
Returns the current session handler, or NULL if no session handler has been set.
virtual Sint32 close()=0
Closes the application and any open sessions.
virtual Sint32 set_disk_cache(const char *location)=0
Sets the disk cache to use.
virtual const char * get_snapshot_path() const =0
Returns the currently configured snapshot path.
virtual Sint32 set_session_handler(IApplication_session_handler *handler)=0
Sets the session handler that will be called when clients connect.
virtual Sint32 set_snapshot_path(const char *path)=0
Sets the path to which snapshot files will be saved.
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.
virtual const char * get_disk_cache() const =0
Returns the disk cache location.
virtual base::Message_severity get_log_forwarding_limit() const =0
Returns the maximum verbosity of log messages that will be forwarded to the client.
virtual Sint32 open(bool enable_streaming=true)=0
Opens the application so that clients can open sessions to it.
virtual Sint32 set_snapshot_handler(IIray_bridge_snapshot_handler *handler)=0
Configure the application with the snapshot handler to use.
API component that serves as entry point for the server-side Iray Bridge API.
Definition: iiray_bridge_server.h:221
virtual Sint32 delete_snapshot(const char *snapshot_path)=0
Deletes a bridge snapshot specified by the provided path to a .cb file on disk.
virtual Sint32 delete_snapshot_from_string(const char *cb_data)=0
Deletes a bridge snapshot specified by the provided cb file contents stored as a string.
virtual IIray_bridge_application * create_application(const char *application_path, http::IServer *http_server)=0
Creates an Iray Bridge application.
virtual const char * get_bridge_protocol_version() const =0
Returns the Bridge protocol version.
The IIray_bridge_snapshot_handler can be used to control snapshot creation for an Iray bridge server ...
Definition: iiray_bridge_server.h:40
virtual void on_snapshot_error(IServer_session *session, Uint32 context_id, Sint32 error_code, const char *error_message)=0
If the call to on_snapshot_request() allows the snapshot but the snapshot creation failed,...
virtual bool on_snapshot_request(IServer_session *session, Uint32 context_id)=0
This function is called when the Iray Bridge application receives a requests to create a snapshot to ...
virtual Sint32 on_snapshot_creation(IServer_session *session, Uint32 context_id, const char *scene_name, bool incremental, const char *suggested_snapshot_name, const char *cb_file_data, IString *final_snapshot_name, IString *error_message)=0
If the call to on_snapshot_request() allowed the snapshot and it was created successfully,...
Represents the server side of a Bridge session.
Definition: ibridge_server.h:523
The server builds a framework for the handlers.
Definition: http.h:725
Basic enums.
Message_severity
Constants for possible message severities.
Definition: enums.h:31
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: neuraylib.h:179