TransportInterface.hpp
1 #pragma once
2 #include <score/plugins/Interface.hpp>
3 #include <score/plugins/InterfaceList.hpp>
4 
5 #include <ossia/dataflow/transport.hpp>
6 
7 #include <ossia-qt/time_value.hpp>
8 
9 #include <QObject>
10 
11 #include <score_plugin_transport_export.h>
12 
13 #include <verdigris>
14 namespace Transport
15 {
16 
17 class SCORE_PLUGIN_TRANSPORT_EXPORT TransportInterface
18  : public QObject
19  , public score::InterfaceBase
20 {
21  W_OBJECT(TransportInterface)
22  SCORE_INTERFACE(TransportInterface, "2f5845f1-548e-4729-86b7-4ae919b8e7e3")
23 
24 public:
25  explicit TransportInterface();
26  virtual ~TransportInterface();
27 
28  virtual ossia::transport_info_fun transportUpdateFunction() = 0;
29 
30  virtual void setup() = 0;
31  virtual void teardown() = 0;
32 
33  virtual void requestPlay() = 0;
34  virtual void requestPause() = 0;
35  virtual void requestStop() = 0;
36  virtual void requestTransport(ossia::time_value t) = 0;
37 
38  void play() E_SIGNAL(SCORE_PLUGIN_TRANSPORT_EXPORT, play)
39  void pause() E_SIGNAL(SCORE_PLUGIN_TRANSPORT_EXPORT, pause)
40  void stop() E_SIGNAL(SCORE_PLUGIN_TRANSPORT_EXPORT, stop)
41  void transport(ossia::time_value t)
42  E_SIGNAL(SCORE_PLUGIN_TRANSPORT_EXPORT, transport, t)
43 };
44 
45 class SCORE_PLUGIN_TRANSPORT_EXPORT TransportInterfaceList final
46  : public score::InterfaceList<TransportInterface>
47 {
48 };
49 
51 {
52  SCORE_CONCRETE("73453569-b453-4cad-b12b-4b71c61cf9a7")
53 
54 public:
56  ~DirectTransport();
57 
58  ossia::transport_info_fun transportUpdateFunction() override;
59 
60  void setup() override;
61  void teardown() override;
62 
63  void requestPlay() override;
64  void requestPause() override;
65  void requestStop() override;
66  void requestTransport(ossia::time_value t) override;
67 };
68 }
Definition: TransportInterface.hpp:51
Definition: TransportInterface.hpp:20
Definition: TransportInterface.hpp:47
Base class for plug-in interfaces.
Definition: Interface.hpp:52
InterfaceList Default implementation of InterfaceListBase.
Definition: InterfaceList.hpp:80