GracenoteFactory.cpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #include "api.h"
  2. #include "GracenoteFactory.h"
  3. #include "GracenoteApi.h"
  4. GracenoteApi gracenoteApi;
  5. static const char serviceName[] = "Gracenote API";
  6. FOURCC GracenoteFactory::GetServiceType()
  7. {
  8. return WaSvc::UNIQUE;
  9. }
  10. const char *GracenoteFactory::GetServiceName()
  11. {
  12. return serviceName;
  13. }
  14. GUID GracenoteFactory::GetGUID()
  15. {
  16. return gracenoteApiGUID;
  17. }
  18. void *GracenoteFactory::GetInterface(int global_lock)
  19. {
  20. return &gracenoteApi;
  21. // if (global_lock)
  22. // WASABI_API_SVC->service_lock(this, (void *)ifc);
  23. }
  24. int GracenoteFactory::SupportNonLockingInterface()
  25. {
  26. return 1;
  27. }
  28. int GracenoteFactory::ReleaseInterface(void *ifc)
  29. {
  30. //WASABI_API_SVC->service_unlock(ifc);
  31. return 1;
  32. }
  33. const char *GracenoteFactory::GetTestString()
  34. {
  35. return NULL;
  36. }
  37. int GracenoteFactory::ServiceNotify(int msg, int param1, int param2)
  38. {
  39. return 1;
  40. }
  41. #define CBCLASS GracenoteFactory
  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