LazyServiceFactory.h 1.0 KB

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #include <api/service/waservicefactory.h>
  3. #include <bfc/multipatch.h>
  4. #include <api/syscb/callbacks/svccb.h>
  5. enum {ServiceFactoryPatch, SysCallbackPatch };
  6. class LazyServiceFactory : public MultiPatch<ServiceFactoryPatch, waServiceFactory>, public MultiPatch<SysCallbackPatch, SysCallback>
  7. {
  8. public:
  9. LazyServiceFactory(FOURCC _service_type, GUID _service_guid, char *_service_name, char *_service_test_string, const wchar_t *_service_filename);
  10. ~LazyServiceFactory();
  11. FOURCC GetServiceType();
  12. const char *GetServiceName();
  13. GUID GetGUID();
  14. void *GetInterface(int global_lock);
  15. int SupportNonLockingInterface();
  16. int ReleaseInterface(void *ifc);
  17. const char *GetTestString();
  18. int ServiceNotify(int msg, intptr_t param1, intptr_t param2);
  19. FOURCC GetEventType() { return SysCallback::SERVICE; }
  20. int Notify(int msg, intptr_t param1, intptr_t param2);
  21. protected:
  22. RECVS_MULTIPATCH;
  23. FOURCC service_type;
  24. char *service_name;
  25. GUID service_guid;
  26. wchar_t service_filename[MAX_PATH];
  27. char *service_test_string;
  28. };