2 * Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>
\r
4 * This file is part of CasparCG (www.casparcg.com).
\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
19 * Author: Nicklas P Andersson
\r
23 #ifndef __AMCPCOMMANDSIMPL_H__
\r
24 #define __AMCPCOMMANDSIMPL_H__
\r
26 #include "AMCPCommand.h"
\r
28 namespace caspar { namespace protocol {
\r
30 std::wstring ListMedia();
\r
31 std::wstring ListTemplates();
\r
35 class ChannelGridCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
37 std::wstring print() const { return L"ChannelGridCommand";}
\r
41 class DiagnosticsCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
43 std::wstring print() const { return L"DiagnosticsCommand";}
\r
47 class CallCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
49 std::wstring print() const { return L"CallCommand";}
\r
53 class MixerCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
55 std::wstring print() const { return L"MixerCommand";}
\r
59 class AddCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
61 std::wstring print() const { return L"AddCommand";}
\r
65 class RemoveCommand : public AMCPCommandBase<true, AddToQueue, 0>
\r
67 std::wstring print() const { return L"RemoveCommand";}
\r
71 class SwapCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
73 std::wstring print() const { return L"SwapCommand";}
\r
77 class LoadCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
79 std::wstring print() const { return L"LoadCommand";}
\r
83 class LoadbgCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
85 std::wstring print() const { return L"LoadbgCommand";}
\r
89 class PlayCommand: public AMCPCommandBase<true, AddToQueue, 0>
\r
91 std::wstring print() const { return L"PlayCommand";}
\r
95 class PauseCommand: public AMCPCommandBase<true, AddToQueue, 0>
\r
97 std::wstring print() const { return L"PauseCommand";}
\r
101 class StopCommand : public AMCPCommandBase<true, AddToQueue, 0>
\r
103 std::wstring print() const { return L"StopCommand";}
\r
107 class ClearCommand : public AMCPCommandBase<true, ImmediatelyAndClear, 0>
\r
109 std::wstring print() const { return L"ClearCommand";}
\r
113 class PrintCommand : public AMCPCommandBase<true, AddToQueue, 0>
\r
115 std::wstring print() const { return L"PrintCommand";}
\r
119 class LogCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
121 std::wstring print() const { return L"LogCommand";}
\r
125 class CGCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
127 std::wstring print() const { return L"CGCommand";}
\r
129 bool ValidateLayer(const std::wstring& layerstring);
\r
131 bool DoExecuteAdd();
\r
132 bool DoExecutePlay();
\r
133 bool DoExecuteStop();
\r
134 bool DoExecuteNext();
\r
135 bool DoExecuteRemove();
\r
136 bool DoExecuteClear();
\r
137 bool DoExecuteUpdate();
\r
138 bool DoExecuteInvoke();
\r
139 bool DoExecuteInfo();
\r
142 class DataCommand : public AMCPCommandBase<false, AddToQueue, 1>
\r
144 std::wstring print() const { return L"DataCommand";}
\r
146 bool DoExecuteStore();
\r
147 bool DoExecuteRetrieve();
\r
148 bool DoExecuteRemove();
\r
149 bool DoExecuteList();
\r
152 class ClsCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
154 std::wstring print() const { return L"ClsCommand";}
\r
158 class TlsCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
160 std::wstring print() const { return L"TlsCommand";}
\r
164 class CinfCommand : public AMCPCommandBase<false, AddToQueue, 1>
\r
166 std::wstring print() const { return L"CinfCommand";}
\r
170 class InfoCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
173 std::wstring print() const { return L"InfoCommand";}
\r
174 InfoCommand(const std::vector<safe_ptr<core::video_channel>>& channels) : channels_(channels){}
\r
177 const std::vector<safe_ptr<core::video_channel>>& channels_;
\r
180 class VersionCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
182 std::wstring print() const { return L"VersionCommand";}
\r
186 class ByeCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
188 std::wstring print() const { return L"ByeCommand";}
\r
192 class SetCommand : public AMCPCommandBase<true, AddToQueue, 2>
\r
194 std::wstring print() const { return L"SetCommand";}
\r
198 //class KillCommand : public AMCPCommand
\r
201 // KillCommand() {}
\r
202 // virtual bool DoExecute();
\r
203 // virtual AMCPCommandCondition CheckConditions();
\r
205 // virtual bool NeedChannel() {
\r
208 // virtual AMCPCommandScheduling GetDefaultScheduling() {
\r
209 // return AddToQueue;
\r
211 // virtual int GetMinimumParameters() {
\r
217 }} //namespace caspar
\r
219 #endif //__AMCPCOMMANDSIMPL_H__