OSVR-Core
Macros | Functions
PluginRegistrationC.h File Reference

Header. More...

#include <osvr/PluginKit/Export.h>
#include <osvr/PluginKit/CommonC.h>
#include <osvr/Util/PluginCallbackTypesC.h>
#include <osvr/Util/AnnotationMacrosC.h>
#include <osvr/Util/LogLevelC.h>
#include <libfunctionality/PluginInterface.h>
#include <stddef.h>

Go to the source code of this file.

Macros

#define OSVR_PLUGIN(PLUGIN_NAME)   LIBFUNC_PLUGIN(PLUGIN_NAME, ctx)
 This macro begins the entry point function of your plugin. More...
 

Functions

OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode OSVR_PLUGINKIT_EXPORT void osvrPluginLog (OSVR_INOUT_PTR OSVR_PluginRegContext ctx, OSVR_IN OSVR_LogLevel severity, OSVR_IN const char *message) OSVR_FUNC_NONNULL((1
 Log a message to the plugin's log channel. More...
 
Hardware Detection and Driver Instantiation

If your plugin contains drivers for devices that you can detect, you'll want to register for hardware detection.

Whether or not you can detect, you may wish to register constructors (instantiation callbacks) that accept parameters.

OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode osvrPluginRegisterHardwareDetectCallback (OSVR_INOUT_PTR OSVR_PluginRegContext ctx, OSVR_IN OSVR_HardwareDetectCallback detectCallback, OSVR_IN_OPT void *userData OSVR_CPP_ONLY(=NULL)) OSVR_FUNC_NONNULL((1))
 Register a callback in your plugin to be notified when hardware should be detected again. More...
 
OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode osvrRegisterDriverInstantiationCallback (OSVR_INOUT_PTR OSVR_PluginRegContext ctx, OSVR_IN_STRZ const char *name, OSVR_IN_PTR OSVR_DriverInstantiationCallback cb, OSVR_IN_OPT void *userData OSVR_CPP_ONLY(=NULL)) OSVR_FUNC_NONNULL((1
 Register an instantiation callback (constructor) for a driver type. More...
 
Plugin Instance Data

Plugins "own" the modules instantiated in them.

Lifetime must be managed appropriately: destroyed on shutdown.

You can store the instances in any way you would like, as long as you register them with appropriate deleter callbacks here.

OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode osvrPluginRegisterDataWithDeleteCallback (OSVR_INOUT_PTR OSVR_PluginRegContext ctx, OSVR_IN OSVR_PluginDataDeleteCallback deleteCallback, OSVR_INOUT_PTR void *pluginData) OSVR_FUNC_NONNULL((1
 Register plugin data along with an appropriate deleter callback. More...
 

Detailed Description

Header.

Must be c-safe!

Date
2014
Author
Sensics, Inc. http://sensics.com/osvr