OSVR-Core  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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

void osvrPluginLog (OSVR_PluginRegContext ctx, OSVR_LogLevel severity, const char *message)
 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_ReturnCode osvrPluginRegisterHardwareDetectCallback (OSVR_PluginRegContext ctx, OSVR_HardwareDetectCallback detectCallback, void *userData=NULL)
 Register a callback in your plugin to be notified when hardware should be detected again. More...
 
OSVR_ReturnCode osvrRegisterDriverInstantiationCallback (OSVR_PluginRegContext ctx, const char *name, OSVR_DriverInstantiationCallback cb, void *userData=NULL)
 Register an instantiation callback (constructor) for a driver type. The given constructor may be called with a string containing configuration information, the format of which you should document with your plugin. JSON is recommended. 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_ReturnCode osvrPluginRegisterDataWithDeleteCallback (OSVR_PluginRegContext ctx, OSVR_PluginDataDeleteCallback deleteCallback, void *pluginData)
 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

Definition in file PluginRegistrationC.h.