aboutsummaryrefslogtreecommitdiff
path: root/Src/timer/ScriptFactory.cpp
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/timer/ScriptFactory.cpp
parent537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff)
downloadwinamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz
Initial community commit
Diffstat (limited to 'Src/timer/ScriptFactory.cpp')
-rw-r--r--Src/timer/ScriptFactory.cpp68
1 files changed, 68 insertions, 0 deletions
diff --git a/Src/timer/ScriptFactory.cpp b/Src/timer/ScriptFactory.cpp
new file mode 100644
index 00000000..75b6f558
--- /dev/null
+++ b/Src/timer/ScriptFactory.cpp
@@ -0,0 +1,68 @@
+#include "ScriptFactory.h"
+#include "api.h"
+#include "ScriptObjectService.h"
+
+static ScriptObjectService svc;
+static const char serviceName[] = "Timer Maki Object";
+
+// GUID of our service factory, not the GUID of the maki object
+// {538A1D71-74B0-4fbf-877A-241D10A937F3}
+static const GUID timer_maki_guid =
+{ 0x538a1d71, 0x74b0, 0x4fbf, { 0x87, 0x7a, 0x24, 0x1d, 0x10, 0xa9, 0x37, 0xf3 } };
+
+
+FOURCC ScriptFactory::GetServiceType()
+{
+ return svc.getServiceType();
+}
+
+const char *ScriptFactory::GetServiceName()
+{
+ return serviceName;
+}
+
+GUID ScriptFactory::GetGUID()
+{
+ return timer_maki_guid;
+}
+
+void *ScriptFactory::GetInterface(int global_lock)
+{
+// if (global_lock)
+// WASABI_API_SVC->service_lock(this, (void *)ifc);
+ return &svc;
+}
+
+int ScriptFactory::SupportNonLockingInterface()
+{
+ return 1;
+}
+
+int ScriptFactory::ReleaseInterface(void *ifc)
+{
+ //WASABI_API_SVC->service_unlock(ifc);
+ return 1;
+}
+
+const char *ScriptFactory::GetTestString()
+{
+ return 0;
+}
+
+int ScriptFactory::ServiceNotify(int msg, int param1, int param2)
+{
+ return 1;
+}
+
+#define CBCLASS ScriptFactory
+START_DISPATCH;
+CB(WASERVICEFACTORY_GETSERVICETYPE, GetServiceType)
+CB(WASERVICEFACTORY_GETSERVICENAME, GetServiceName)
+CB(WASERVICEFACTORY_GETGUID, GetGUID)
+CB(WASERVICEFACTORY_GETINTERFACE, GetInterface)
+CB(WASERVICEFACTORY_SUPPORTNONLOCKINGGETINTERFACE, SupportNonLockingInterface)
+CB(WASERVICEFACTORY_RELEASEINTERFACE, ReleaseInterface)
+CB(WASERVICEFACTORY_GETTESTSTRING, GetTestString)
+CB(WASERVICEFACTORY_SERVICENOTIFY, ServiceNotify)
+END_DISPATCH;
+#undef CBCLASS \ No newline at end of file