Factory.cpp 1.4 KB

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