diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/replicant/service/svccb.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/replicant/service/svccb.h')
-rw-r--r-- | Src/replicant/service/svccb.h | 38 |
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; } + }; + +} |