25efccf6c5
Code now actually looks a lot cleaner, tbh.
39 lines
1.0 KiB
C++
39 lines
1.0 KiB
C++
#ifndef LIVOX_GEN1_H
|
|
#define LIVOX_GEN1_H
|
|
|
|
#include <memory>
|
|
#include <dlfcn.h>
|
|
#include <livoxProto1/livoxProto1.h>
|
|
|
|
namespace smo {
|
|
namespace stim_buff {
|
|
|
|
// LivoxProto1 library state
|
|
struct LivoxProto1DllState
|
|
{
|
|
LivoxProto1DllState();
|
|
|
|
static void DlCloser(void* handle);
|
|
|
|
std::unique_ptr<void, void(*)(void*)> dlopenHandle;
|
|
livoxProto1_mainFn *livoxProto1_main;
|
|
livoxProto1_exitFn *livoxProto1_exit;
|
|
livoxProto1_getOrCreateDeviceCReqFn *livoxProto1_getOrCreateDeviceCReq;
|
|
livoxProto1_destroyDeviceCReqFn *livoxProto1_destroyDeviceCReq;
|
|
livoxProto1_device_enablePcloudDataCReqFn
|
|
*livoxProto1_device_enablePcloudDataCReq;
|
|
livoxProto1_device_disablePcloudDataCReqFn
|
|
*livoxProto1_device_disablePcloudDataCReq;
|
|
livoxProto1_device_getReturnModeCReqFn *livoxProto1_device_getReturnModeCReq;
|
|
livoxProto1_getPcloudDataFdDescFn *livoxProto1_getPcloudDataFdDesc;
|
|
};
|
|
|
|
extern LivoxProto1DllState livoxProto1;
|
|
|
|
extern const SmoCallbacks* smoHooksPtr;
|
|
|
|
} // namespace stim_buff
|
|
} // namespace smo
|
|
|
|
#endif // LIVOX_GEN1_H
|