1
0

ScriptObjectFactory.cpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #include "ScriptObjectFactory.h"
  2. #include "api__playlist.h"
  3. #include "ScriptObjectService.h"
  4. ScriptObjectService svc;
  5. static const char serviceName[] = "Playlist Maki Objects";
  6. // {2406A46C-9740-4af7-A0EB-A544AAB8F00C}
  7. static const GUID playlist_script_object_guid =
  8. { 0x2406a46c, 0x9740, 0x4af7, { 0xa0, 0xeb, 0xa5, 0x44, 0xaa, 0xb8, 0xf0, 0xc } };
  9. FOURCC ScriptObjectFactory::GetServiceType()
  10. {
  11. return svc.getServiceType();
  12. }
  13. const char *ScriptObjectFactory::GetServiceName()
  14. {
  15. return serviceName;
  16. }
  17. GUID ScriptObjectFactory::GetGUID()
  18. {
  19. return playlist_script_object_guid;
  20. }
  21. void *ScriptObjectFactory::GetInterface(int global_lock)
  22. {
  23. // if (global_lock)
  24. // WASABI_API_SVC->service_lock(this, (void *)ifc);
  25. return &svc;
  26. }
  27. int ScriptObjectFactory::SupportNonLockingInterface()
  28. {
  29. return 1;
  30. }
  31. int ScriptObjectFactory::ReleaseInterface(void *ifc)
  32. {
  33. //WASABI_API_SVC->service_unlock(ifc);
  34. return 1;
  35. }
  36. const char *ScriptObjectFactory::GetTestString()
  37. {
  38. return 0;
  39. }
  40. int ScriptObjectFactory::ServiceNotify(int msg, int param1, int param2)
  41. {
  42. return 1;
  43. }
  44. #define CBCLASS ScriptObjectFactory
  45. START_DISPATCH;
  46. CB(WASERVICEFACTORY_GETSERVICETYPE, GetServiceType)
  47. CB(WASERVICEFACTORY_GETSERVICENAME, GetServiceName)
  48. CB(WASERVICEFACTORY_GETGUID, GetGUID)
  49. CB(WASERVICEFACTORY_GETINTERFACE, GetInterface)
  50. CB(WASERVICEFACTORY_SUPPORTNONLOCKINGGETINTERFACE, SupportNonLockingInterface)
  51. CB(WASERVICEFACTORY_RELEASEINTERFACE, ReleaseInterface)
  52. CB(WASERVICEFACTORY_GETTESTSTRING, GetTestString)
  53. CB(WASERVICEFACTORY_SERVICENOTIFY, ServiceNotify)
  54. END_DISPATCH;
  55. #undef CBCLASS