2 * Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>
4 * This file is part of CasparCG (www.casparcg.com).
6 * CasparCG is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * CasparCG is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
19 * Author: Nicklas P Andersson
23 #ifndef __AMCPCOMMANDSIMPL_H__
24 #define __AMCPCOMMANDSIMPL_H__
26 #include "AMCPCommand.h"
28 namespace caspar { namespace protocol {
30 std::wstring ListMedia();
31 std::wstring ListTemplates();
35 class ChannelGridCommand : public AMCPCommandBase<false, 0>
37 std::wstring print() const { return L"ChannelGridCommand";}
41 class DiagnosticsCommand : public AMCPCommandBase<false, 0>
43 std::wstring print() const { return L"DiagnosticsCommand";}
47 class CallCommand : public AMCPCommandBase<true, 1>
49 std::wstring print() const { return L"CallCommand";}
53 class MixerCommand : public AMCPCommandBase<true, 1>
55 std::wstring print() const { return L"MixerCommand";}
59 class AddCommand : public AMCPCommandBase<true, 1>
61 std::wstring print() const { return L"AddCommand";}
65 class RemoveCommand : public AMCPCommandBase<true, 0>
67 std::wstring print() const { return L"RemoveCommand";}
71 class SwapCommand : public AMCPCommandBase<true, 1>
73 std::wstring print() const { return L"SwapCommand";}
77 class LoadCommand : public AMCPCommandBase<true, 1>
79 std::wstring print() const { return L"LoadCommand";}
83 class LoadbgCommand : public AMCPCommandBase<true, 1>
85 std::wstring print() const { return L"LoadbgCommand";}
89 class PlayCommand: public AMCPCommandBase<true, 0>
91 std::wstring print() const { return L"PlayCommand";}
95 class PauseCommand: public AMCPCommandBase<true, 0>
97 std::wstring print() const { return L"PauseCommand";}
101 class StopCommand : public AMCPCommandBase<true, 0>
103 std::wstring print() const { return L"StopCommand";}
107 class ClearCommand : public AMCPCommandBase<true, 0>
109 std::wstring print() const { return L"ClearCommand";}
113 class PrintCommand : public AMCPCommandBase<true, 0>
115 std::wstring print() const { return L"PrintCommand";}
119 class LogCommand : public AMCPCommandBase<false, 0>
121 std::wstring print() const { return L"LogCommand";}
125 class CGCommand : public AMCPCommandBase<true, 1>
127 std::wstring print() const { return L"CGCommand";}
129 bool ValidateLayer(const std::wstring& layerstring);
132 bool DoExecutePlay();
133 bool DoExecuteStop();
134 bool DoExecuteNext();
135 bool DoExecuteRemove();
136 bool DoExecuteClear();
137 bool DoExecuteUpdate();
138 bool DoExecuteInvoke();
139 bool DoExecuteInfo();
142 class DataCommand : public AMCPCommandBase<false, 1>
144 std::wstring print() const { return L"DataCommand";}
146 bool DoExecuteStore();
147 bool DoExecuteRetrieve();
148 bool DoExecuteList();
151 class ClsCommand : public AMCPCommandBase<false, 0>
153 std::wstring print() const { return L"ClsCommand";}
157 class TlsCommand : public AMCPCommandBase<false, 0>
159 std::wstring print() const { return L"TlsCommand";}
163 class CinfCommand : public AMCPCommandBase<false, 1>
165 std::wstring print() const { return L"CinfCommand";}
169 class InfoCommand : public AMCPCommandBase<false, 0>
172 std::wstring print() const { return L"InfoCommand";}
173 InfoCommand(const std::vector<spl::shared_ptr<core::video_channel>>& channels) : channels_(channels){}
176 const std::vector<spl::shared_ptr<core::video_channel>>& channels_;
179 class VersionCommand : public AMCPCommandBase<false, 0>
181 std::wstring print() const { return L"VersionCommand";}
185 class ByeCommand : public AMCPCommandBase<false, 0>
187 std::wstring print() const { return L"ByeCommand";}
191 class SetCommand : public AMCPCommandBase<true, 2>
193 std::wstring print() const { return L"SetCommand";}
197 //class KillCommand : public AMCPCommand
201 // virtual bool DoExecute();
202 // virtual AMCPCommandCondition CheckConditions();
204 // virtual bool NeedChannel() {
207 // virtual AMCPCommandScheduling GetDefaultScheduling() {
208 // return AddToQueue;
210 // virtual int GetMinimumParameters() {
216 }} //namespace caspar
218 #endif //__AMCPCOMMANDSIMPL_H__