OSVR-Core  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
PluginRegistrationC.h
Go to the documentation of this file.
1 
14 /*
15 // Copyright 2014 Sensics, Inc.
16 //
17 // Licensed under the Apache License, Version 2.0 (the "License");
18 // you may not use this file except in compliance with the License.
19 // You may obtain a copy of the License at
20 //
21 // http://www.apache.org/licenses/LICENSE-2.0
22 //
23 // Unless required by applicable law or agreed to in writing, software
24 // distributed under the License is distributed on an "AS IS" BASIS,
25 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 // See the License for the specific language governing permissions and
27 // limitations under the License.
28 */
29 
30 #ifndef INCLUDED_PluginRegistrationC_h_GUID_C019DFA9_5B54_4791_B0A4_040EA20501BA
31 #define INCLUDED_PluginRegistrationC_h_GUID_C019DFA9_5B54_4791_B0A4_040EA20501BA
32 
33 /* Internal Includes */
34 #include <osvr/PluginKit/Export.h>
35 #include <osvr/PluginKit/CommonC.h>
38 #include <osvr/Util/LogLevelC.h>
39 
40 /* Library/third-party includes */
41 #include <libfunctionality/PluginInterface.h>
42 
43 /* Standard includes */
44 #include <stddef.h>
45 
54 OSVR_EXTERN_C_BEGIN
55 
67 #define OSVR_PLUGIN(PLUGIN_NAME) LIBFUNC_PLUGIN(PLUGIN_NAME, ctx)
68 
90 OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode osvrPluginRegisterHardwareDetectCallback(
91  OSVR_INOUT_PTR OSVR_PluginRegContext ctx,
92  OSVR_IN OSVR_HardwareDetectCallback detectCallback,
93  OSVR_IN_OPT void *userData OSVR_CPP_ONLY(= NULL)) OSVR_FUNC_NONNULL((1));
94 
107 OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode osvrRegisterDriverInstantiationCallback(
108  OSVR_INOUT_PTR OSVR_PluginRegContext ctx, OSVR_IN_STRZ const char *name,
109  OSVR_IN_PTR OSVR_DriverInstantiationCallback cb,
110  OSVR_IN_OPT void *userData OSVR_CPP_ONLY(= NULL))
111  OSVR_FUNC_NONNULL((1, 2, 3));
112 
141 OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode osvrPluginRegisterDataWithDeleteCallback(
142  OSVR_INOUT_PTR OSVR_PluginRegContext ctx,
143  OSVR_IN OSVR_PluginDataDeleteCallback deleteCallback,
144  OSVR_INOUT_PTR void *pluginData) OSVR_FUNC_NONNULL((1, 2, 3));
154 OSVR_PLUGINKIT_EXPORT void
155 osvrPluginLog(OSVR_INOUT_PTR OSVR_PluginRegContext ctx,
156  OSVR_IN OSVR_LogLevel severity, OSVR_IN const char *message)
157  OSVR_FUNC_NONNULL((1, 3));
158 
159 OSVR_EXTERN_C_END
160 
163 #endif
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...
Header.
void(* OSVR_PluginDataDeleteCallback)(void *pluginData)
Function type of a Plugin Data Delete callback.
Header declaring plugin callback types.
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 call...
OSVR_ReturnCode(* OSVR_HardwareDetectCallback)(OSVR_PluginRegContext ctx, void *userData)
Function type of a Hardware Detect callback.
void osvrPluginLog(OSVR_PluginRegContext ctx, OSVR_LogLevel severity, const char *message)
Log a message to the plugin's log 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.
Definition: LogLevelC.h:44
OSVR_ReturnCode osvrPluginRegisterDataWithDeleteCallback(OSVR_PluginRegContext ctx, OSVR_PluginDataDeleteCallback deleteCallback, void *pluginData)
Register plugin data along with an appropriate deleter callback.
Header containing macros for source-level annotation.
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...
Header shared between multiple C API headers.