HistoryAPIFactory.cpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #include "HistoryAPIFactory.h"
  2. #include "api__ml_history.h"
  3. #include "HistoryAPI.h"
  4. HistoryAPI historyAPI;
  5. static const char serviceName[] = "History API";
  6. FOURCC HistoryAPIFactory::GetServiceType()
  7. {
  8. return WaSvc::UNIQUE;
  9. }
  10. const char *HistoryAPIFactory::GetServiceName()
  11. {
  12. return serviceName;
  13. }
  14. GUID HistoryAPIFactory::GetGUID()
  15. {
  16. return HistoryApiGuid;
  17. }
  18. void *HistoryAPIFactory::GetInterface(int global_lock)
  19. {
  20. // if (global_lock)
  21. // plugin.service->service_lock(this, (void *)ifc);
  22. return &historyAPI;
  23. }
  24. int HistoryAPIFactory::SupportNonLockingInterface()
  25. {
  26. return 1;
  27. }
  28. int HistoryAPIFactory::ReleaseInterface(void *ifc)
  29. {
  30. //plugin.service->service_unlock(ifc);
  31. return 1;
  32. }
  33. const char *HistoryAPIFactory::GetTestString()
  34. {
  35. return 0;
  36. }
  37. int HistoryAPIFactory::ServiceNotify(int msg, int param1, int param2)
  38. {
  39. return 1;
  40. }
  41. #define CBCLASS HistoryAPIFactory
  42. START_DISPATCH;
  43. CB(WASERVICEFACTORY_GETSERVICETYPE, GetServiceType)
  44. CB(WASERVICEFACTORY_GETSERVICENAME, GetServiceName)
  45. CB(WASERVICEFACTORY_GETGUID, GetGUID)
  46. CB(WASERVICEFACTORY_GETINTERFACE, GetInterface)
  47. CB(WASERVICEFACTORY_SUPPORTNONLOCKINGGETINTERFACE, SupportNonLockingInterface)
  48. CB(WASERVICEFACTORY_RELEASEINTERFACE, ReleaseInterface)
  49. CB(WASERVICEFACTORY_GETTESTSTRING, GetTestString)
  50. CB(WASERVICEFACTORY_SERVICENOTIFY, ServiceNotify)
  51. END_DISPATCH;
  52. #undef CBCLASS