aboutsummaryrefslogtreecommitdiff
path: root/Src/replicant/service/svccb.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/replicant/service/svccb.h
parent537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff)
downloadwinamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz
Initial community commit
Diffstat (limited to 'Src/replicant/service/svccb.h')
-rw-r--r--Src/replicant/service/svccb.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/Src/replicant/service/svccb.h b/Src/replicant/service/svccb.h
new file mode 100644
index 00000000..964c8097
--- /dev/null
+++ b/Src/replicant/service/svccb.h
@@ -0,0 +1,38 @@
+#pragma once
+
+#include "syscb/ifc_syscallback.h"
+#include "foundation/mkncc.h"
+
+namespace Service
+{
+ // {215CDE06-22A6-424F-9C64-DEDC45D84455}
+ static const GUID event_type =
+ { 0x215cde06, 0x22a6, 0x424f, { 0x9c, 0x64, 0xde, 0xdc, 0x45, 0xd8, 0x44, 0x55 } };
+ static const int on_register = 0;
+ static const int on_deregister = 1;
+
+ class SystemCallback : public ifc_sysCallback
+ {
+ protected:
+ GUID WASABICALL SysCallback_GetEventType() { return event_type; }
+ int WASABICALL SysCallback_Notify(int msg, intptr_t param1, intptr_t param2)
+ {
+ const GUID *service_id;
+
+ switch(msg)
+ {
+ case on_register:
+ service_id = (const GUID *)param1;
+ return ServiceSystemCallback_OnRegister(*service_id, (void *)param2);
+ case on_deregister:
+ service_id = (const GUID *)param1;
+ return ServiceSystemCallback_OnDeregister(*service_id, (void *)param2);
+ default:
+ return NErr_Success;
+ }
+ }
+ virtual int WASABICALL ServiceSystemCallback_OnRegister(GUID service_id, void *service) { return NErr_Success; }
+ virtual int WASABICALL ServiceSystemCallback_OnDeregister(GUID service_id, void *service) { return NErr_Success; }
+ };
+
+}