2 * copyright (c) 2010 Sveriges Television AB <info@casparcg.com>
\r
4 * This file is part of CasparCG.
\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
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
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
21 #ifndef __AMCPCOMMANDSIMPL_H__
\r
22 #define __AMCPCOMMANDSIMPL_H__
\r
24 #include "AMCPCommand.h"
\r
26 namespace caspar { namespace protocol {
\r
28 std::wstring ListMedia();
\r
29 std::wstring ListTemplates();
\r
33 class ParamCommand : public AMCPCommandBase<true, AddToQueue, 2>
\r
35 std::wstring print() const { return L"ParamCommand";}
\r
39 class MixerCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
41 std::wstring print() const { return L"MixerCommand";}
\r
45 class AddCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
47 std::wstring print() const { return L"AddCommand";}
\r
51 class RemoveCommand : public AMCPCommandBase<true, AddToQueue, 0>
\r
53 std::wstring print() const { return L"RemoveCommand";}
\r
57 class SwapCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
59 std::wstring print() const { return L"SwapCommand";}
\r
63 class LoadCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
65 std::wstring print() const { return L"LoadCommand";}
\r
69 class LoadbgCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
71 std::wstring print() const { return L"LoadbgCommand";}
\r
75 class PlayCommand: public AMCPCommandBase<true, AddToQueue, 0>
\r
77 std::wstring print() const { return L"PlayCommand";}
\r
81 class PauseCommand: public AMCPCommandBase<true, AddToQueue, 0>
\r
83 std::wstring print() const { return L"PauseCommand";}
\r
87 class StopCommand : public AMCPCommandBase<true, AddToQueue, 0>
\r
89 std::wstring print() const { return L"StopCommand";}
\r
93 class ClearCommand : public AMCPCommandBase<true, AddToQueue, 0>
\r
95 std::wstring print() const { return L"ClearCommand";}
\r
99 class PrintCommand : public AMCPCommandBase<true, AddToQueue, 0>
\r
101 std::wstring print() const { return L"PrintCommand";}
\r
105 class StatusCommand : public AMCPCommandBase<true, AddToQueue, 0>
\r
107 std::wstring print() const { return L"StatusCommand";}
\r
111 class LogCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
113 std::wstring print() const { return L"LogCommand";}
\r
117 class CGCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
119 std::wstring print() const { return L"CGCommand";}
\r
121 bool ValidateLayer(const std::wstring& layerstring);
\r
123 bool DoExecuteAdd();
\r
124 bool DoExecutePlay();
\r
125 bool DoExecuteStop();
\r
126 bool DoExecuteNext();
\r
127 bool DoExecuteRemove();
\r
128 bool DoExecuteClear();
\r
129 bool DoExecuteUpdate();
\r
130 bool DoExecuteInvoke();
\r
131 bool DoExecuteInfo();
\r
134 class DataCommand : public AMCPCommandBase<false, AddToQueue, 1>
\r
136 std::wstring print() const { return L"DataCommand";}
\r
138 bool DoExecuteStore();
\r
139 bool DoExecuteRetrieve();
\r
140 bool DoExecuteList();
\r
143 class ClsCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
145 std::wstring print() const { return L"ClsCommand";}
\r
149 class TlsCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
151 std::wstring print() const { return L"TlsCommand";}
\r
155 class CinfCommand : public AMCPCommandBase<false, AddToQueue, 1>
\r
157 std::wstring print() const { return L"CinfCommand";}
\r
161 class InfoCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
164 std::wstring print() const { return L"InfoCommand";}
\r
165 InfoCommand(const std::vector<safe_ptr<core::video_channel>>& channels) : channels_(channels){}
\r
168 const std::vector<safe_ptr<core::video_channel>>& channels_;
\r
171 class VersionCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
173 std::wstring print() const { return L"VersionCommand";}
\r
177 class ByeCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
179 std::wstring print() const { return L"ByeCommand";}
\r
183 class SetCommand : public AMCPCommandBase<true, AddToQueue, 2>
\r
185 std::wstring print() const { return L"SetCommand";}
\r
189 //class KillCommand : public AMCPCommand
\r
192 // KillCommand() {}
\r
193 // virtual bool DoExecute();
\r
194 // virtual AMCPCommandCondition CheckConditions();
\r
196 // virtual bool NeedChannel() {
\r
199 // virtual AMCPCommandScheduling GetDefaultScheduling() {
\r
200 // return AddToQueue;
\r
202 // virtual int GetMinimumParameters() {
\r
208 }} //namespace caspar
\r
210 #endif //__AMCPCOMMANDSIMPL_H__