00001 /*************************************************************************** 00002 ulxr_response.cpp - create xml-rpc response 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_response.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_RESPONSE_H 00031 #define ULXR_RESPONSE_H 00032 00033 00034 #include <ulxmlrpcpp/ulxmlrpcpp.h> // always first header 00035 #include <ulxmlrpcpp/ulxr_value.h> 00036 00037 00038 namespace ulxr { 00039 00040 class Void; 00041 00042 00050 class ULXR_API_DECL0 MethodResponse 00051 { 00052 public: 00053 00056 explicit MethodResponse(); 00057 00060 virtual ~MethodResponse(); 00061 00067 MethodResponse(int fval, const CppString &fstr); 00068 00074 MethodResponse (const Value &val); 00075 00080 MethodResponse (const Void &val); 00081 00096 virtual CppString getSignature(bool deep = false) const; 00097 00104 virtual std::string getWbXml() const; 00105 00114 virtual CppString getXml(int indent = 0) const; 00115 00121 void setFault(int fval, const CppString &fstr); 00122 00128 void setResult (const Value &val); 00129 00137 const Value& getResult() const; 00138 00142 bool isOK() const; 00143 00144 private: 00145 00146 bool wasOk; 00147 Value respval; 00148 }; 00149 00150 00151 } // namespace ulxr 00152 00153 #endif // ULXR_RESPONSE_H