25 #ifndef INCLUDED_VRPNDeviceRegistration_h_GUID_1D69B168_9B9C_47B9_A9F3_9A569E9710D2
26 #define INCLUDED_VRPNDeviceRegistration_h_GUID_1D69B168_9B9C_47B9_A9F3_9A569E9710D2
42 class vrpn_Connection;
45 namespace vrpnserver {
46 class VRPNDeviceRegistration_impl;
52 static OSVR_ReturnCode callMainloop(
void *userdata) {
53 T *obj =
static_cast<T *
>(userdata);
68 OSVR_VRPNSERVER_EXPORT
87 OSVR_VRPNSERVER_EXPORT std::string
102 m_registerDevice(&detail::callMainloop<T>,
103 static_cast<void *>(dev));
118 template <
typename T>
125 OSVR_VRPNSERVER_EXPORT
void
126 setDeviceDescriptor(std::string
const &jsonString);
129 OSVR_VRPNSERVER_EXPORT
void
132 unique_ptr<VRPNDeviceRegistration_impl> m_impl;
137 #endif // INCLUDED_VRPNDeviceRegistration_h_GUID_1D69B168_9B9C_47B9_A9F3_9A569E9710D2
Automatically-generated export header - do not edit!
Header providing C++ interface wrappers around functionality in PluginRegistrationC.h.
VRPNDeviceRegistration(VRPNDeviceRegistration const &)=delete
noncopyable
vrpn_Connection * getVRPNConnection()
Get the vrpn_Connection object to use in constructing your object.
Class providing the external interface of a registration context backing a single plugin...
Header to bring unique_ptr into the osvr namespace.
T * constructAndRegisterDevice(std::string const &name)
Constructs and registers your custom device with the server and takes ownership of the object...
~VRPNDeviceRegistration()
destructor
VRPNDeviceRegistration & operator=(VRPNDeviceRegistration const &)=delete
nonassignable
T * registerObjectForDeletion(OSVR_PluginRegContext ctx, T *obj)
Registers an object to be destroyed with delete when the plugin is unloaded.
#define OSVR_RETURN_SUCCESS
The "success" value for an OSVR_ReturnCode.
OSVR_PluginRegContext extractOpaquePointer()
Extracts the opaque pointer for this interface to send to C.
Header declaring the opaque plugin registration context type.
T * registerDevice(T *dev)
Registers your custom device with the server and takes ownership of the object.
std::string useDecoratedName(std::string const &name)
Decorates a device name with the plugin name and returns it, as well as records it for registration w...
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...
OSVR_ReturnCode(* OSVR_DeviceUpdateCallback)(void *userData)
Function type of a Device Update callback.