summaryrefslogtreecommitdiffhomepage
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/plugin-api.hpp2
-rw-r--r--api/plugin-support.hpp18
2 files changed, 17 insertions, 3 deletions
diff --git a/api/plugin-api.hpp b/api/plugin-api.hpp
index 3d66d5c1..1e7822c2 100644
--- a/api/plugin-api.hpp
+++ b/api/plugin-api.hpp
@@ -17,6 +17,8 @@
#include "export.hpp"
+using Pose = Mat<double, 6, 1>;
+
enum Axis {
TX, TY, TZ, Yaw, Pitch, Roll,
};
diff --git a/api/plugin-support.hpp b/api/plugin-support.hpp
index b9d2d503..9df11169 100644
--- a/api/plugin-support.hpp
+++ b/api/plugin-support.hpp
@@ -40,7 +40,14 @@ extern "C" typedef Metadata* (*OPENTRACK_METADATA_FUNPTR)(void);
struct dylib final
{
- enum Type : unsigned { Filter = 0xdeadbabeu, Tracker = 0xcafebeefu, Protocol = 0xdeadf00du, Invalid = 0xcafebabeu };
+ enum Type : unsigned
+ {
+ Filter = 0xdeadbabeu,
+ Tracker = 0xcafebeefu,
+ Protocol = 0xdeadf00du,
+ Extension = 0xdeadf001u,
+ Invalid = 0xcafebabeu,
+ };
dylib(const QString& filename_, Type t) :
type(Invalid),
@@ -93,6 +100,7 @@ struct dylib final
{ Filter, QStringLiteral(OPENTRACK_SOLIB_PREFIX "opentrack-filter-*." OPENTRACK_SOLIB_EXT), },
{ Tracker, QStringLiteral(OPENTRACK_SOLIB_PREFIX "opentrack-tracker-*." OPENTRACK_SOLIB_EXT), },
{ Protocol, QStringLiteral(OPENTRACK_SOLIB_PREFIX "opentrack-proto-*." OPENTRACK_SOLIB_EXT), },
+ { Extension, QStringLiteral(OPENTRACK_SOLIB_PREFIX "opentrack-ext-*." OPENTRACK_SOLIB_EXT), },
};
for (const filter_& filter : filters)
@@ -158,6 +166,7 @@ private:
"opentrack-tracker-",
"opentrack-proto-",
"opentrack-filter-",
+ "opentrack-ext-",
};
for (auto name : names)
@@ -167,7 +176,7 @@ private:
}
}
}
- return QStringLiteral("");
+ return QString();
}
bool check(bool fail)
@@ -199,16 +208,19 @@ struct Modules final
module_list(dylib::enum_libraries(library_path)),
filter_modules(filter(dylib::Filter)),
tracker_modules(filter(dylib::Tracker)),
- protocol_modules(filter(dylib::Protocol))
+ protocol_modules(filter(dylib::Protocol)),
+ extension_modules(filter(dylib::Extension))
{}
dylib_list& filters() { return filter_modules; }
dylib_list& trackers() { return tracker_modules; }
dylib_list& protocols() { return protocol_modules; }
+ dylib_list& extensions() { return extension_modules; }
private:
dylib_list module_list;
dylib_list filter_modules;
dylib_list tracker_modules;
dylib_list protocol_modules;
+ dylib_list extension_modules;
static dylib_list& sorted(dylib_list& xs)
{