QXmlRPC 1.1
|
00001 // vim:tabstop=4:shiftwidth=4:expandtab:cinoptions=(s,U1,m1 00002 // Copyright (C) 2007 00003 // Author Dmitry Poplavsky <dmitry.poplavsky@gmail.com> 00004 00005 #ifndef RESPONSE_H 00006 #define RESPONSE_H 00007 00008 #include "variant.h" 00009 00010 namespace xmlrpc { 00011 00020 class Response { 00021 public: 00022 Response(); 00023 Response( const Variant& returnValue ); 00024 Response( int faultCode, const QString& faultString ); 00025 00026 virtual ~Response(); 00027 00028 bool isNull() const; 00029 00030 bool isFault() const; 00031 int faultCode() const; 00032 QString faultString() const; 00033 00034 Variant returnValue() const; 00035 00036 00037 bool setContent( const QByteArray& requestData, QString *errorMessage = 0 ); 00038 QByteArray composeResponse() const; 00039 00040 private: 00041 class Private; 00042 QSharedDataPointer<Private> d; 00043 }; 00044 00045 } // namespace xmlrpc 00046 00047 #endif // ifndef RESPONSE_H 00048