aboutsummaryrefslogtreecommitdiff
path: root/Src/Agave/Component/ifc_wa5component.h
diff options
context:
space:
mode:
authorJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
committerJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
commit20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Agave/Component/ifc_wa5component.h
parent537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff)
downloadwinamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz
Initial community commit
Diffstat (limited to 'Src/Agave/Component/ifc_wa5component.h')
-rw-r--r--Src/Agave/Component/ifc_wa5component.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/Src/Agave/Component/ifc_wa5component.h b/Src/Agave/Component/ifc_wa5component.h
new file mode 100644
index 00000000..fb0a1b54
--- /dev/null
+++ b/Src/Agave/Component/ifc_wa5component.h
@@ -0,0 +1,43 @@
+#ifndef __WASABI_IFC_WA5COMPONENT_H_
+#define __WASABI_IFC_WA5COMPONENT_H_
+
+#include <bfc/dispatch.h>
+
+class api_service;
+#ifdef WIN32
+#include <windows.h>
+#endif
+
+class NOVTABLE ifc_wa5component : public Dispatchable
+{
+public:
+ DISPATCH_CODES
+ {
+ API_WA5COMPONENT_REGISTERSERVICES = 10,
+ API_WA5COMPONENT_REGISTERSERVICES_SAFE_MODE = 15,
+ API_WA5COMPONENT_DEREEGISTERSERVICES = 20,
+ };
+
+ void RegisterServices( api_service *service );
+ void DeregisterServices( api_service *service );
+
+#ifdef WIN32
+ HMODULE hModule;
+#else
+ void *dlLibrary; // pointer returned from dlopen
+#endif
+};
+
+inline void ifc_wa5component::RegisterServices( api_service *service )
+{
+ _voidcall( API_WA5COMPONENT_REGISTERSERVICES, service );
+}
+
+inline void ifc_wa5component::DeregisterServices( api_service *service )
+{
+ _voidcall( API_WA5COMPONENT_DEREEGISTERSERVICES, service );
+}
+
+extern "C" typedef ifc_wa5component *(*GETCOMPONENT_FUNC)();
+
+#endif \ No newline at end of file