41 OSVR_IN_OPT
void *userData) {
48 }
catch (std::exception &e) {
49 std::cerr <<
"Error in osvrPluginRegisterHardwareDetectCallback - "
50 "caught exception reporting: " << e.what() << std::endl;
59 OSVR_IN_OPT
void *userData) {
63 }
catch (std::exception &e) {
64 std::cerr <<
"Error in osvrRegisterDriverInstantiationCallback - "
65 "caught exception reporting: " << e.what() << std::endl;
74 OSVR_INOUT_PTR
void *pluginData) {
85 OSVR_IN
const char *message) {
87 std::cerr <<
"[OSVR] " << message << std::endl;
93 auto s =
static_cast<osvr::util::log::LogLevel
>(severity);
94 context->
log(s, message);
OSVR_ReturnCode osvrPluginRegisterHardwareDetectCallback(OSVR_PluginRegContext ctx, OSVR_HardwareDetectCallback detectCallback, void *userData)
Register a callback in your plugin to be notified when hardware should be detected again...
virtual void registerDriverInstantiationCallback(const char *name, OSVR_DriverInstantiationCallback constructor, void *userData)=0
Register a callback for constructing a driver by name with parameters.
Class providing the external interface of a registration context backing a single plugin...
void(* OSVR_PluginDataDeleteCallback)(void *pluginData)
Function type of a Plugin Data Delete callback.
OSVR_ReturnCode osvrRegisterDriverInstantiationCallback(OSVR_PluginRegContext ctx, const char *name, OSVR_DriverInstantiationCallback cb, void *userData)
Register an instantiation callback (constructor) for a driver type. The given constructor may be call...
virtual void registerHardwareDetectCallback(OSVR_HardwareDetectCallback detectCallback, void *userData)=0
Register a callback to be invoked on some hardware detection event.
#define OSVR_PLUGIN_HANDLE_NULL_CONTEXT(FUNC, CONTEXT_NAME)
Internal macro for use in C API function implementations to check the validity of a context parameter...
OSVR_ReturnCode(* OSVR_HardwareDetectCallback)(OSVR_PluginRegContext ctx, void *userData)
Function type of a Hardware Detect callback.
#define OSVR_RETURN_FAILURE
The "failure" value for an OSVR_ReturnCode.
#define OSVR_RETURN_SUCCESS
The "success" value for an OSVR_ReturnCode.
void osvrPluginLog(OSVR_PluginRegContext ctx, OSVR_LogLevel severity, const char *message)
Log a message to the plugin's log channel.
void log(util::log::LogLevel severity, const char *message)
Log a message to the plugin-specific channel.
OSVR_ReturnCode(* OSVR_DriverInstantiationCallback)(OSVR_PluginRegContext ctx, const char *params, void *userData)
Function type of a driver instantiation callback.
OSVR_LogLevel
Log message severity levels.
virtual void registerDataWithDeleteCallback(OSVR_PluginDataDeleteCallback deleteCallback, void *pluginData)=0
Register data and a delete callback to be called on plugin unload.
Internal, configured header file for verbosity macros.
OSVR_ReturnCode osvrPluginRegisterDataWithDeleteCallback(OSVR_PluginRegContext ctx, OSVR_PluginDataDeleteCallback deleteCallback, void *pluginData)
Register plugin data along with an appropriate deleter callback.
OSVR_EXTERN_C_BEGIN typedef void * OSVR_PluginRegContext
A context pointer passed in to your plugin's entry point and other locations of control flow transfer...
static PluginSpecificRegistrationContext & get(OSVR_PluginRegContext ctx)
Retrieve this interface from an OSVR_PluginRegContext opaque pointer.