1
0

PCastFactory.cpp 1.2 KB

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