]> git.sesse.net Git - casparcg/blob - protocol/amcp/AMCPCommandsImpl.h
2.0.0.2: Added embedded-audio to decklink consumer.
[casparcg] / protocol / amcp / AMCPCommandsImpl.h
1 /*\r
2 * copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
3 *\r
4 *  This file is part of CasparCG.\r
5 *\r
6 *    CasparCG is free software: you can redistribute it and/or modify\r
7 *    it under the terms of the GNU General Public License as published by\r
8 *    the Free Software Foundation, either version 3 of the License, or\r
9 *    (at your option) any later version.\r
10 *\r
11 *    CasparCG is distributed in the hope that it will be useful,\r
12 *    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
14 *    GNU General Public License for more details.\r
15 \r
16 *    You should have received a copy of the GNU General Public License\r
17 *    along with CasparCG.  If not, see <http://www.gnu.org/licenses/>.\r
18 *\r
19 */\r
20  \r
21 #ifndef __AMCPCOMMANDSIMPL_H__\r
22 #define __AMCPCOMMANDSIMPL_H__\r
23 \r
24 #include "AMCPCommand.h"\r
25 \r
26 namespace caspar { namespace protocol {\r
27         \r
28 std::wstring ListMedia();\r
29 std::wstring ListTemplates();\r
30 \r
31 namespace amcp {\r
32 \r
33 class LoadCommand : public AMCPCommandBase<true, ImmediatelyAndClear, 1>\r
34 {\r
35         bool DoExecute();\r
36 };\r
37 \r
38 class LoadbgCommand : public AMCPCommandBase<true, AddToQueue, 1>\r
39 {\r
40         bool DoExecute();\r
41 };\r
42 \r
43 class PlayCommand: public AMCPCommandBase<true, AddToQueue, 0>\r
44 {\r
45         bool DoExecute();\r
46 };\r
47 \r
48 class PauseCommand: public AMCPCommandBase<true, AddToQueue, 0>\r
49 {\r
50         bool DoExecute();\r
51 };\r
52 \r
53 class StopCommand : public AMCPCommandBase<true, ImmediatelyAndClear, 0>\r
54 {\r
55         bool DoExecute();\r
56 };\r
57 \r
58 class ClearCommand : public AMCPCommandBase<true, ImmediatelyAndClear, 0>\r
59 {\r
60         bool DoExecute();\r
61 };\r
62 \r
63 class CGCommand : public AMCPCommandBase<true, AddToQueue, 1>\r
64 {\r
65         bool DoExecute();\r
66         bool ValidateLayer(const std::wstring& layerstring);\r
67 \r
68         bool DoExecuteAdd();\r
69         bool DoExecutePlay();\r
70         bool DoExecuteStop();\r
71         bool DoExecuteNext();\r
72         bool DoExecuteRemove();\r
73         bool DoExecuteClear();\r
74         bool DoExecuteUpdate();\r
75         bool DoExecuteInvoke();\r
76         bool DoExecuteInfo();\r
77 };\r
78 \r
79 class DataCommand : public AMCPCommandBase<false, AddToQueue, 1>\r
80 {\r
81         bool DoExecute();\r
82         bool DoExecuteStore();\r
83         bool DoExecuteRetrieve();\r
84         bool DoExecuteList();\r
85 };\r
86 \r
87 class ClsCommand : public AMCPCommandBase<false, AddToQueue, 0>\r
88 {\r
89         bool DoExecute();\r
90 };\r
91 \r
92 class TlsCommand : public AMCPCommandBase<false, AddToQueue, 0>\r
93 {\r
94         bool DoExecute();\r
95 };\r
96 \r
97 class CinfCommand : public AMCPCommandBase<false, AddToQueue, 1>\r
98 {\r
99         bool DoExecute();\r
100 };\r
101 \r
102 class InfoCommand : public AMCPCommandBase<false, AddToQueue, 0>\r
103 {\r
104 public:\r
105         InfoCommand(const std::vector<safe_ptr<core::channel>>& channels) : channels_(channels){}\r
106         bool DoExecute();\r
107 private:\r
108         const std::vector<safe_ptr<core::channel>>& channels_;\r
109 };\r
110 \r
111 class VersionCommand : public AMCPCommandBase<false, AddToQueue, 0>\r
112 {\r
113         bool DoExecute();\r
114 };\r
115 \r
116 class ByeCommand : public AMCPCommandBase<false, AddToQueue, 0>\r
117 {\r
118         bool DoExecute();\r
119 };\r
120 \r
121 class SetCommand : public AMCPCommandBase<true, AddToQueue, 2>\r
122 {\r
123         bool DoExecute();\r
124 };\r
125 \r
126 //class KillCommand : public AMCPCommand\r
127 //{\r
128 //public:\r
129 //      KillCommand() {}\r
130 //      virtual bool DoExecute();\r
131 //      virtual AMCPCommandCondition CheckConditions();\r
132 //\r
133 //      virtual bool NeedChannel() {\r
134 //              return false;\r
135 //      }\r
136 //      virtual AMCPCommandScheduling GetDefaultScheduling() {\r
137 //              return AddToQueue;\r
138 //      }\r
139 //      virtual int GetMinimumParameters() {\r
140 //              return 0;\r
141 //      }\r
142 //};\r
143 \r
144 }       //namespace amcp\r
145 }}      //namespace caspar\r
146 \r
147 #endif  //__AMCPCOMMANDSIMPL_H__