-/*\r
-* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
-*\r
-* This file is part of CasparCG (www.casparcg.com).\r
-*\r
-* CasparCG is free software: you can redistribute it and/or modify\r
-* it under the terms of the GNU General Public License as published by\r
-* the Free Software Foundation, either version 3 of the License, or\r
-* (at your option) any later version.\r
-*\r
-* CasparCG is distributed in the hope that it will be useful,\r
-* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-* GNU General Public License for more details.\r
-*\r
-* You should have received a copy of the GNU General Public License\r
-* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.\r
-*\r
-* Author: Nicklas P Andersson\r
-*/\r
-\r
- \r
-#ifndef __AMCPCOMMANDSIMPL_H__\r
-#define __AMCPCOMMANDSIMPL_H__\r
-\r
-#include "AMCPCommand.h"\r
-\r
-namespace caspar { namespace protocol {\r
- \r
-std::wstring ListMedia();\r
-std::wstring ListTemplates();\r
-\r
-namespace amcp {\r
- \r
-class ChannelGridCommand : public AMCPCommandBase<false, 0>\r
-{\r
- std::wstring print() const { return L"ChannelGridCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class DiagnosticsCommand : public AMCPCommandBase<false, 0>\r
-{\r
- std::wstring print() const { return L"DiagnosticsCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class CallCommand : public AMCPCommandBase<true, 1>\r
-{\r
- std::wstring print() const { return L"CallCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class MixerCommand : public AMCPCommandBase<true, 1>\r
-{\r
- std::wstring print() const { return L"MixerCommand";}\r
- bool DoExecute();\r
-};\r
- \r
-class AddCommand : public AMCPCommandBase<true, 1>\r
-{\r
- std::wstring print() const { return L"AddCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class RemoveCommand : public AMCPCommandBase<true, 0>\r
-{\r
- std::wstring print() const { return L"RemoveCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class SwapCommand : public AMCPCommandBase<true, 1>\r
-{\r
- std::wstring print() const { return L"SwapCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class LoadCommand : public AMCPCommandBase<true, 1>\r
-{\r
- std::wstring print() const { return L"LoadCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class LoadbgCommand : public AMCPCommandBase<true, 1>\r
-{\r
- std::wstring print() const { return L"LoadbgCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class PlayCommand: public AMCPCommandBase<true, 0>\r
-{\r
- std::wstring print() const { return L"PlayCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class PauseCommand: public AMCPCommandBase<true, 0>\r
-{\r
- std::wstring print() const { return L"PauseCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class StopCommand : public AMCPCommandBase<true, 0>\r
-{\r
- std::wstring print() const { return L"StopCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class ClearCommand : public AMCPCommandBase<true, 0>\r
-{\r
- std::wstring print() const { return L"ClearCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class PrintCommand : public AMCPCommandBase<true, 0>\r
-{\r
- std::wstring print() const { return L"PrintCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class LogCommand : public AMCPCommandBase<false, 0>\r
-{\r
- std::wstring print() const { return L"LogCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class CGCommand : public AMCPCommandBase<true, 1>\r
-{\r
- std::wstring print() const { return L"CGCommand";}\r
- bool DoExecute();\r
- bool ValidateLayer(const std::wstring& layerstring);\r
-\r
- bool DoExecuteAdd();\r
- bool DoExecutePlay();\r
- bool DoExecuteStop();\r
- bool DoExecuteNext();\r
- bool DoExecuteRemove();\r
- bool DoExecuteClear();\r
- bool DoExecuteUpdate();\r
- bool DoExecuteInvoke();\r
- bool DoExecuteInfo();\r
-};\r
-\r
-class DataCommand : public AMCPCommandBase<false, 1>\r
-{\r
- std::wstring print() const { return L"DataCommand";}\r
- bool DoExecute();\r
- bool DoExecuteStore();\r
- bool DoExecuteRetrieve();\r
- bool DoExecuteList();\r
-};\r
-\r
-class ClsCommand : public AMCPCommandBase<false, 0>\r
-{\r
- std::wstring print() const { return L"ClsCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class TlsCommand : public AMCPCommandBase<false, 0>\r
-{\r
- std::wstring print() const { return L"TlsCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class CinfCommand : public AMCPCommandBase<false, 1>\r
-{\r
- std::wstring print() const { return L"CinfCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class InfoCommand : public AMCPCommandBase<false, 0>\r
-{\r
-public:\r
- std::wstring print() const { return L"InfoCommand";}\r
- InfoCommand(const std::vector<spl::shared_ptr<core::video_channel>>& channels) : channels_(channels){}\r
- bool DoExecute();\r
-private:\r
- const std::vector<spl::shared_ptr<core::video_channel>>& channels_;\r
-};\r
-\r
-class VersionCommand : public AMCPCommandBase<false, 0>\r
-{\r
- std::wstring print() const { return L"VersionCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class ByeCommand : public AMCPCommandBase<false, 0>\r
-{\r
- std::wstring print() const { return L"ByeCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class SetCommand : public AMCPCommandBase<true, 2>\r
-{\r
- std::wstring print() const { return L"SetCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-//class KillCommand : public AMCPCommand\r
-//{\r
-//public:\r
-// KillCommand() {}\r
-// virtual bool DoExecute();\r
-// virtual AMCPCommandCondition CheckConditions();\r
-//\r
-// virtual bool NeedChannel() {\r
-// return false;\r
-// }\r
-// virtual AMCPCommandScheduling GetDefaultScheduling() {\r
-// return AddToQueue;\r
-// }\r
-// virtual int GetMinimumParameters() {\r
-// return 0;\r
-// }\r
-//};\r
-\r
-} //namespace amcp\r
-}} //namespace caspar\r
-\r
+/*
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>
+*
+* This file is part of CasparCG (www.casparcg.com).
+*
+* CasparCG is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* CasparCG is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
+*
+* Author: Nicklas P Andersson
+*/
+
+
+#ifndef __AMCPCOMMANDSIMPL_H__
+#define __AMCPCOMMANDSIMPL_H__
+
+#include "AMCPCommand.h"
+
+namespace caspar { namespace protocol {
+
+std::wstring ListMedia();
+std::wstring ListTemplates();
+
+namespace amcp {
+
+class ChannelGridCommand : public AMCPCommandBase<false, 0>
+{
+ std::wstring print() const { return L"ChannelGridCommand";}
+ bool DoExecute();
+};
+
+class DiagnosticsCommand : public AMCPCommandBase<false, 0>
+{
+ std::wstring print() const { return L"DiagnosticsCommand";}
+ bool DoExecute();
+};
+
+class CallCommand : public AMCPCommandBase<true, 1>
+{
+ std::wstring print() const { return L"CallCommand";}
+ bool DoExecute();
+};
+
+class MixerCommand : public AMCPCommandBase<true, 1>
+{
+ std::wstring print() const { return L"MixerCommand";}
+ bool DoExecute();
+};
+
+class AddCommand : public AMCPCommandBase<true, 1>
+{
+ std::wstring print() const { return L"AddCommand";}
+ bool DoExecute();
+};
+
+class RemoveCommand : public AMCPCommandBase<true, 0>
+{
+ std::wstring print() const { return L"RemoveCommand";}
+ bool DoExecute();
+};
+
+class SwapCommand : public AMCPCommandBase<true, 1>
+{
+ std::wstring print() const { return L"SwapCommand";}
+ bool DoExecute();
+};
+
+class LoadCommand : public AMCPCommandBase<true, 1>
+{
+ std::wstring print() const { return L"LoadCommand";}
+ bool DoExecute();
+};
+
+class LoadbgCommand : public AMCPCommandBase<true, 1>
+{
+ std::wstring print() const { return L"LoadbgCommand";}
+ bool DoExecute();
+};
+
+class PlayCommand: public AMCPCommandBase<true, 0>
+{
+ std::wstring print() const { return L"PlayCommand";}
+ bool DoExecute();
+};
+
+class PauseCommand: public AMCPCommandBase<true, 0>
+{
+ std::wstring print() const { return L"PauseCommand";}
+ bool DoExecute();
+};
+
+class StopCommand : public AMCPCommandBase<true, 0>
+{
+ std::wstring print() const { return L"StopCommand";}
+ bool DoExecute();
+};
+
+class ClearCommand : public AMCPCommandBase<true, 0>
+{
+ std::wstring print() const { return L"ClearCommand";}
+ bool DoExecute();
+};
+
+class PrintCommand : public AMCPCommandBase<true, 0>
+{
+ std::wstring print() const { return L"PrintCommand";}
+ bool DoExecute();
+};
+
+class LogCommand : public AMCPCommandBase<false, 0>
+{
+ std::wstring print() const { return L"LogCommand";}
+ bool DoExecute();
+};
+
+class CGCommand : public AMCPCommandBase<true, 1>
+{
+ std::wstring print() const { return L"CGCommand";}
+ bool DoExecute();
+ bool ValidateLayer(const std::wstring& layerstring);
+
+ bool DoExecuteAdd();
+ bool DoExecutePlay();
+ bool DoExecuteStop();
+ bool DoExecuteNext();
+ bool DoExecuteRemove();
+ bool DoExecuteClear();
+ bool DoExecuteUpdate();
+ bool DoExecuteInvoke();
+ bool DoExecuteInfo();
+};
+
+class DataCommand : public AMCPCommandBase<false, 1>
+{
+ std::wstring print() const { return L"DataCommand";}
+ bool DoExecute();
+ bool DoExecuteStore();
+ bool DoExecuteRetrieve();
+ bool DoExecuteList();
+};
+
+class ClsCommand : public AMCPCommandBase<false, 0>
+{
+ std::wstring print() const { return L"ClsCommand";}
+ bool DoExecute();
+};
+
+class TlsCommand : public AMCPCommandBase<false, 0>
+{
+ std::wstring print() const { return L"TlsCommand";}
+ bool DoExecute();
+};
+
+class CinfCommand : public AMCPCommandBase<false, 1>
+{
+ std::wstring print() const { return L"CinfCommand";}
+ bool DoExecute();
+};
+
+class InfoCommand : public AMCPCommandBase<false, 0>
+{
+public:
+ std::wstring print() const { return L"InfoCommand";}
+ InfoCommand(const std::vector<spl::shared_ptr<core::video_channel>>& channels) : channels_(channels){}
+ bool DoExecute();
+private:
+ const std::vector<spl::shared_ptr<core::video_channel>>& channels_;
+};
+
+class VersionCommand : public AMCPCommandBase<false, 0>
+{
+ std::wstring print() const { return L"VersionCommand";}
+ bool DoExecute();
+};
+
+class ByeCommand : public AMCPCommandBase<false, 0>
+{
+ std::wstring print() const { return L"ByeCommand";}
+ bool DoExecute();
+};
+
+class SetCommand : public AMCPCommandBase<true, 2>
+{
+ std::wstring print() const { return L"SetCommand";}
+ bool DoExecute();
+};
+
+//class KillCommand : public AMCPCommand
+//{
+//public:
+// KillCommand() {}
+// virtual bool DoExecute();
+// virtual AMCPCommandCondition CheckConditions();
+//
+// virtual bool NeedChannel() {
+// return false;
+// }
+// virtual AMCPCommandScheduling GetDefaultScheduling() {
+// return AddToQueue;
+// }
+// virtual int GetMinimumParameters() {
+// return 0;
+// }
+//};
+
+} //namespace amcp
+}} //namespace caspar
+
#endif //__AMCPCOMMANDSIMPL_H__
\ No newline at end of file