-/*\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 DiagnosticsCommand : public AMCPCommandBase<false, AddToQueue, 0>\r
-{\r
- std::wstring print() const { return L"DiagnosticsCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class CallCommand : public AMCPCommandBase<true, AddToQueue, 2>\r
-{\r
- std::wstring print() const { return L"CallCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class MixerCommand : public AMCPCommandBase<true, AddToQueue, 1>\r
-{\r
- std::wstring print() const { return L"MixerCommand";}\r
- bool DoExecute();\r
-};\r
- \r
-class AddCommand : public AMCPCommandBase<true, AddToQueue, 1>\r
-{\r
- std::wstring print() const { return L"AddCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class RemoveCommand : public AMCPCommandBase<true, AddToQueue, 0>\r
-{\r
- std::wstring print() const { return L"RemoveCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class SwapCommand : public AMCPCommandBase<true, AddToQueue, 1>\r
-{\r
- std::wstring print() const { return L"SwapCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class LoadCommand : public AMCPCommandBase<true, AddToQueue, 1>\r
-{\r
- std::wstring print() const { return L"LoadCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class LoadbgCommand : public AMCPCommandBase<true, AddToQueue, 1>\r
-{\r
- std::wstring print() const { return L"LoadbgCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class PlayCommand: public AMCPCommandBase<true, AddToQueue, 0>\r
-{\r
- std::wstring print() const { return L"PlayCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class PauseCommand: public AMCPCommandBase<true, AddToQueue, 0>\r
-{\r
- std::wstring print() const { return L"PauseCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class StopCommand : public AMCPCommandBase<true, AddToQueue, 0>\r
-{\r
- std::wstring print() const { return L"StopCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class ClearCommand : public AMCPCommandBase<true, AddToQueue, 0>\r
-{\r
- std::wstring print() const { return L"ClearCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class PrintCommand : public AMCPCommandBase<true, AddToQueue, 0>\r
-{\r
- std::wstring print() const { return L"PrintCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class LogCommand : public AMCPCommandBase<false, AddToQueue, 0>\r
-{\r
- std::wstring print() const { return L"LogCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class CGCommand : public AMCPCommandBase<true, AddToQueue, 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, AddToQueue, 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, AddToQueue, 0>\r
-{\r
- std::wstring print() const { return L"ClsCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class TlsCommand : public AMCPCommandBase<false, AddToQueue, 0>\r
-{\r
- std::wstring print() const { return L"TlsCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class CinfCommand : public AMCPCommandBase<false, AddToQueue, 1>\r
-{\r
- std::wstring print() const { return L"CinfCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class InfoCommand : public AMCPCommandBase<false, AddToQueue, 0>\r
-{\r
-public:\r
- std::wstring print() const { return L"InfoCommand";}\r
- InfoCommand(const std::vector<safe_ptr<core::video_channel>>& channels) : channels_(channels){}\r
- bool DoExecute();\r
-private:\r
- const std::vector<safe_ptr<core::video_channel>>& channels_;\r
-};\r
-\r
-class VersionCommand : public AMCPCommandBase<false, AddToQueue, 0>\r
-{\r
- std::wstring print() const { return L"VersionCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class ByeCommand : public AMCPCommandBase<false, AddToQueue, 0>\r
-{\r
- std::wstring print() const { return L"ByeCommand";}\r
- bool DoExecute();\r
-};\r
-\r
-class SetCommand : public AMCPCommandBase<true, AddToQueue, 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
-#endif //__AMCPCOMMANDSIMPL_H__
\ No newline at end of file
+/*
+* 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
+*/
+
+#pragma once
+
+#include "AMCPCommand.h"
+
+namespace caspar { namespace protocol { namespace amcp {
+
+void register_commands(class amcp_command_repository& repo);
+
+}}}