00001 /* vim: set et sw=3 tw=0 fo=croqlaw cino=t0: 00002 * 00003 * Astxx, the Asterisk C++ API and Utility Library. 00004 * Copyright (C) 2005-2007 Matthew A. Nicholson 00005 * Copyright (C) 2005-2007 Digium, Inc. 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License version 2.1 as published by the Free Software Foundation. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 */ 00020 00029 #ifndef ASTXX_MANAGER_ACTION_H 00030 #define ASTXX_MANAGER_ACTION_H 00031 00032 #include <astxx/manager/message.h> 00033 #include <astxx/manager/error.h> 00034 #include <astxx/manager/action/error.h> 00035 00036 namespace astxx { 00037 namespace manager { 00038 class connection; 00039 00047 class basic_action { 00048 public: 00049 basic_action() { } 00050 virtual ~basic_action() { } 00051 00057 virtual message::action action() const = 0; 00058 00062 virtual std::string action_id() const { 00063 return m_action_id; 00064 } 00065 00068 virtual void action_id(const std::string& id) { 00069 m_action_id = id; 00070 } 00071 00072 virtual message::response handle_response(message::response response); 00073 message::response operator()(connection& c); 00074 00075 private: 00076 std::string m_action_id; 00077 }; 00078 } 00079 } 00080 00081 #endif
1.5.6