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 DiagnosticsCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
37 std::wstring print() const { return L"DiagnosticsCommand";}
\r
41 class CallCommand : public AMCPCommandBase<true, AddToQueue, 2>
\r
43 std::wstring print() const { return L"CallCommand";}
\r
47 class MixerCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
49 std::wstring print() const { return L"MixerCommand";}
\r
53 class AddCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
55 std::wstring print() const { return L"AddCommand";}
\r
59 class RemoveCommand : public AMCPCommandBase<true, AddToQueue, 0>
\r
61 std::wstring print() const { return L"RemoveCommand";}
\r
65 class SwapCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
67 std::wstring print() const { return L"SwapCommand";}
\r
71 class LoadCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
73 std::wstring print() const { return L"LoadCommand";}
\r
77 class LoadbgCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
79 std::wstring print() const { return L"LoadbgCommand";}
\r
83 class PlayCommand: public AMCPCommandBase<true, AddToQueue, 0>
\r
85 std::wstring print() const { return L"PlayCommand";}
\r
89 class PauseCommand: public AMCPCommandBase<true, AddToQueue, 0>
\r
91 std::wstring print() const { return L"PauseCommand";}
\r
95 class StopCommand : public AMCPCommandBase<true, AddToQueue, 0>
\r
97 std::wstring print() const { return L"StopCommand";}
\r
101 class ClearCommand : public AMCPCommandBase<true, AddToQueue, 0>
\r
103 std::wstring print() const { return L"ClearCommand";}
\r
107 class PrintCommand : public AMCPCommandBase<true, AddToQueue, 0>
\r
109 std::wstring print() const { return L"PrintCommand";}
\r
113 class LogCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
115 std::wstring print() const { return L"LogCommand";}
\r
119 class CGCommand : public AMCPCommandBase<true, AddToQueue, 1>
\r
121 std::wstring print() const { return L"CGCommand";}
\r
123 bool ValidateLayer(const std::wstring& layerstring);
\r
125 bool DoExecuteAdd();
\r
126 bool DoExecutePlay();
\r
127 bool DoExecuteStop();
\r
128 bool DoExecuteNext();
\r
129 bool DoExecuteRemove();
\r
130 bool DoExecuteClear();
\r
131 bool DoExecuteUpdate();
\r
132 bool DoExecuteInvoke();
\r
133 bool DoExecuteInfo();
\r
136 class DataCommand : public AMCPCommandBase<false, AddToQueue, 1>
\r
138 std::wstring print() const { return L"DataCommand";}
\r
140 bool DoExecuteStore();
\r
141 bool DoExecuteRetrieve();
\r
142 bool DoExecuteList();
\r
145 class ClsCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
147 std::wstring print() const { return L"ClsCommand";}
\r
151 class TlsCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
153 std::wstring print() const { return L"TlsCommand";}
\r
157 class CinfCommand : public AMCPCommandBase<false, AddToQueue, 1>
\r
159 std::wstring print() const { return L"CinfCommand";}
\r
163 class InfoCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
166 std::wstring print() const { return L"InfoCommand";}
\r
167 InfoCommand(const std::vector<safe_ptr<core::video_channel>>& channels) : channels_(channels){}
\r
170 const std::vector<safe_ptr<core::video_channel>>& channels_;
\r
173 class VersionCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
175 std::wstring print() const { return L"VersionCommand";}
\r
179 class ByeCommand : public AMCPCommandBase<false, AddToQueue, 0>
\r
181 std::wstring print() const { return L"ByeCommand";}
\r
185 class SetCommand : public AMCPCommandBase<true, AddToQueue, 2>
\r
187 std::wstring print() const { return L"SetCommand";}
\r
191 //class KillCommand : public AMCPCommand
\r
194 // KillCommand() {}
\r
195 // virtual bool DoExecute();
\r
196 // virtual AMCPCommandCondition CheckConditions();
\r
198 // virtual bool NeedChannel() {
\r
201 // virtual AMCPCommandScheduling GetDefaultScheduling() {
\r
202 // return AddToQueue;
\r
204 // virtual int GetMinimumParameters() {
\r
210 }} //namespace caspar
\r
212 #endif //__AMCPCOMMANDSIMPL_H__