00001 /*************************************************************************** 00002 ulxr_call.h - create xml-rpc calling data 00003 ------------------- 00004 begin : Sun Mar 10 2002 00005 copyright : (C) 2002-2007 by Ewald Arnold 00006 email : ulxmlrpcpp@ewald-arnold.de 00007 00008 $Id: ulxr_call.h 940 2006-12-30 18:22:05Z ewald-arnold $ 00009 00010 ***************************************************************************/ 00011 00012 /************************************************************************** 00013 * 00014 * This program is free software; you can redistribute it and/or modify 00015 * it under the terms of the GNU Lesser General Public License as 00016 * published by the Free Software Foundation; either version 2 of the License, 00017 * or (at your option) any later version. 00018 * 00019 * This program is distributed in the hope that it will be useful, 00020 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00022 * GNU General Public License for more details. 00023 * 00024 * You should have received a copy of the GNU Lesser General Public License 00025 * along with this program; if not, write to the Free Software 00026 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00027 * 00028 ***************************************************************************/ 00029 00030 #ifndef ULXR_CALL_H 00031 #define ULXR_CALL_H 00032 00033 #include <ulxmlrpcpp/ulxmlrpcpp.h> // always first header 00034 #include <ulxmlrpcpp/ulxr_value.h> 00035 00036 namespace ulxr { 00037 00038 00043 class ULXR_API_DECL0 MethodCall 00044 { 00045 public: 00046 00050 MethodCall(const ulxr::Char *name); 00051 00054 MethodCall(); 00055 00059 MethodCall(const CppString &name); 00060 00063 virtual ~MethodCall(); 00064 00079 virtual CppString getSignature(bool braces = true) const; 00080 00087 virtual std::string getWbXml() const; 00088 00097 virtual CppString getXml(int indent = 0) const; 00098 00102 MethodCall& addParam (const Value &val); 00103 00108 MethodCall& setParam (const Value &val); 00109 00114 Value getParam(unsigned ind) const; 00115 00119 unsigned numParams() const; 00120 00123 void clear(); 00124 00128 CppString getMethodName() const; 00129 00133 void setMethodName(const CppString &nm); 00134 00135 private: 00136 00137 CppString methodname; 00138 std::vector<Value> params; 00139 }; 00140 00141 00142 } // namespace ulxr 00143 00144 00145 #endif // ULXR_CALL_H