factory_playlists.cpp 1.3 KB

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