RealityServer Web Services API Programmer's Manual

iplugin.h File Reference

Description

RealityServer(R) Web Services plugin interface. See Extensions.

Code Example

iplugin.h

‎/******************************************************************************
 * Copyright 2010-2020 MIGENIUS PTY LTD, Australia. All rights reserved.
 *
 * Portions Copyright 1986, 2011 NVIDIA Corporation. All rights reserved.
 *****************************************************************************/
//*****************************************************************************
#ifndef MI_RS_WEB_SERVICES_IPLUGIN_H
#define MI_RS_WEB_SERVICES_IPLUGIN_H

#include <mi/base/plugin.h>
#include <mi/base/interface_declare.h>

namespace mi {
namespace base {
class ILogger;
}
namespace http {
class IServer;
}
namespace neuraylib {
class IPlugin_api;
}
namespace nservices {
class IService_command;
class IUser_type_definition;
class IEvent_handler;
class IEvent_context;
class IFactory;
}
namespace rswservices {

class IAuthorizer;
class IConfiguration;
class IProtocol;
class IState;
class IRtmp_render_handler_factory;
class ILog_handler;
class IWebsocket_handler;

 // end group mi_nservices_user_types








typedef base::Uuid_t<0x3486EE1B,0xB1CB,0x40DB,0xBC,0xE2,0xCD,0xE7,0x7B,0x69,0x38,0x9C>
UAC_SESSION_ADDED;

typedef base::Uuid_t<0xCDBCE3B0,0x731B,0x4AD6,0xA4,0xEA,0x9F,0xB2,0x11,0xF9,0x5D,0xF5>
               UAC_SESSION_REMOVED;
 // end group mi_rswservices_uac




class IExtension_context : public
    mi::base::Interface_declare<0xDC4679C1,0x512B,0x4D67,0xB7,0x44,0x77,0xF7,0xCC,0x3E,0x09,0x48>
{
public:
    virtual Sint32 
               install_command(nservices::IService_command *command,
                                    const char *url=NULL) = 0;

    virtual Sint32 
               remove_command(nservices::IService_command *command,
                                  const char *url=NULL) = 0;

    virtual Sint32 
               install_user_type(nservices::IUser_type_definition *definition) = 0;

    virtual Sint32 
               remove_user_type(nservices::IUser_type_definition *definition) = 0;

    virtual Sint32 
               install_event_handler(nservices::IEvent_handler *handler) = 0;

    virtual Sint32 
               remove_event_handler(nservices::IEvent_handler *handler) = 0;

    virtual Sint32 
               install_authorizer(IAuthorizer *authorizer) = 0;

    virtual Sint32 
               remove_authorizer(IAuthorizer *authorizer) = 0;

    virtual Sint32 
               install_protocol(IProtocol *protocol) = 0;

    virtual Sint32 
               remove_protocol(IProtocol *protocol) = 0;

    virtual Sint32 
               install_state(IState *state) = 0;

    virtual Sint32 
               remove_state(IState *state) = 0;

    virtual Sint32 
               install_render_handler(IRtmp_render_handler_factory *render_handler_factory) = 0;

    virtual Sint32 
               remove_render_handler(
        IRtmp_render_handler_factory *render_handler_factory) = 0;

    virtual Sint32 
               install_log_handler(ILog_handler* log_handler) = 0;

    virtual Sint32 
               remove_log_handler(ILog_handler* log_handler) = 0;

    virtual Sint32 
               install_websocket_handler(IWebsocket_handler* websocket_handler) = 0;

    virtual Sint32 
               remove_websocket_handler(IWebsocket_handler* websocket_handler) = 0;

    virtual const IConfiguration *get_configuration() const = 0;

    virtual nservices::IFactory *get_factory() const = 0;

    virtual base::ILogger * get_logger() const = 0;

    virtual http::IServer * get_http_server() const = 0;

    virtual neuraylib::IPlugin_api * get_plugin_api() const = 0;

    virtual nservices::IEvent_context *get_event_context() const = 0;
};

#define MI_REALITYSERVER_WEB_SERVICES_PLUGIN_TYPE "RealityServer Web Services API v4"

class IServices_plugin : public mi::base::Plugin
{
public:
    virtual void initialize(IExtension_context* context) = 0;

    virtual void shutdown(IExtension_context* context) = 0;

    virtual const char* get_type() const { return MI_REALITYSERVER_WEB_SERVICES_PLUGIN_TYPE; };
};
 // end group mi_rswservices_extensions

} // namespace rswservices
} // namespace mi

#endif // MI_RS_WEB_SERVICES_IPLUGIN_H

Namespaces

namespace mi
namespace mi::base
namespace mi::http
namespace mi::neuraylib
namespace mi::nservices
namespace 
Namespace for the RealityServer Web Services API. More...

Classes

class 
Context which can be used to register user implemented functionality. More...
class 
The basic interface to be implemented by RealityServer Web Services plugins. More...

Defines

#define 
The plugin type for RealityServer(R) Web Services plugins. More...

Typedefs

typedef  
Event triggered when a new session is created by the UAC system. More...
typedef  
Event triggered when a session is removed from the UAC system. More...