summaryrefslogtreecommitdiffhomepage
path: root/api/plugin-support.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-09-25 16:24:58 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-09-25 16:29:38 +0200
commiteca907d3c1240d04bbcfdf84a3a726353e56bc64 (patch)
treec7c35c7f3d5dd22b689be84287567e80aa57b46a /api/plugin-support.hpp
parent6932a00edd5074caf75b0d9624fc079775a44b1e (diff)
api, logic: support "extensions" for pose transform
Diffstat (limited to 'api/plugin-support.hpp')
-rw-r--r--api/plugin-support.hpp18
1 files changed, 15 insertions, 3 deletions
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)
{