svc_player.h 976 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _SVC_PLAYER_H
  2. #define _SVC_PLAYER_H
  3. #include <bfc/dispatch.h>
  4. #include <api/service/services.h>
  5. class api_window;
  6. class svc_player {
  7. public:
  8. static const char *getServiceName() { return "Standard player service"; }
  9. static int getServiceType() { return WaSvc::UNIQUE; }
  10. static GUID getServiceGuid() {
  11. // {9DE79C4A-B9E6-46f4-9AE2-40E0F09CCA51}
  12. const GUID guid =
  13. { 0x9de79c4a, 0xb9e6, 0x46f4, { 0x9a, 0xe2, 0x40, 0xe0, 0xf0, 0x9c, 0xca, 0x51 } };
  14. return guid;
  15. }
  16. virtual void openFile(const char *filename, FOURCC droptarg=MK3CC('d','e','f'))=0;
  17. virtual void openFiles(api_window *parent=NULL, const char *type=NULL, FOURCC droptarg=MK3CC('d','e','f'))=0;
  18. };
  19. class svc_playerI : public svc_player {
  20. };
  21. #include <api/service/servicei.h>
  22. template <class T>
  23. class PlayerCreator : public waServiceFactoryTSingle<svc_player, T> {
  24. public:
  25. PlayerCreator() : waServiceFactoryTSingle<svc_player, T>(svc_player::getServiceGuid()) {}
  26. };
  27. #endif