]> git.sesse.net Git - casparcg/blobdiff - protocol/amcp/AMCPCommandsImpl.h
Added boost::rational framerate in video_format_desc for convenience.
[casparcg] / protocol / amcp / AMCPCommandsImpl.h
index 53d6d31403c5e3992d4f4265222b2c8e226c8582..626dbb9a153a8c784f9535c47229d6742814c831 100644 (file)
-/*\r
-* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
-*\r
-*  This file is part of CasparCG.\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
-*/\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 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 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 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::channel>>& channels) : channels_(channels){}\r
-       bool DoExecute();\r
-private:\r
-       const std::vector<safe_ptr<core::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);
+
+}}}