svcmgr.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef _SVCMGR_H
  2. #define _SVCMGR_H
  3. #include <api/service/service.h>
  4. class ServiceManager {
  5. public:
  6. static int registerService(waServiceFactory *service, GUID owner);
  7. static int deregisterService(waServiceFactory *service, int internal = 0);
  8. static int getNumServices(FOURCC svc_type);
  9. static waServiceFactory *enumService(FOURCC svc_type, int n);
  10. static waServiceFactory *getServiceByGuid(GUID guid);
  11. static void sendNotification(int msg, int param1 = 0, int param2 = 0);
  12. static int lock(waServiceFactory *owner, void *svcptr);
  13. static int unlock(void *svcptr);
  14. static int clientLock(void *svcptr, GUID lockedby);
  15. static int release(void *svcptr);
  16. static GUID getOwningComponent(void *svcptr);
  17. static GUID getLockingComponent(void *svcptr);
  18. static const char *getServiceTypeName(FOURCC svc_type);
  19. static void onShutdown();
  20. static FOURCC safe_getServiceType(waServiceFactory *was);
  21. static const char *safe_getServiceName(waServiceFactory *was);
  22. static int getNumServices();
  23. static waServiceFactory *enumService(int n);
  24. static int getNumServicesByGuid();
  25. static int getNumOwners();
  26. static int getNumLocks();
  27. static int isValidService(FOURCC svctype, waServiceFactory *service);
  28. };
  29. #endif