File: response.h

package info (click to toggle)
qxmlrpc 0.0.svn6-2
  • links: PTS
  • area: main
  • in suites: jessie-kfreebsd, stretch, wheezy
  • size: 392 kB
  • ctags: 200
  • sloc: cpp: 1,621; python: 29; makefile: 23
file content (48 lines) | stat: -rw-r--r-- 1,051 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// vim:tabstop=4:shiftwidth=4:expandtab:cinoptions=(s,U1,m1
// Copyright (C) 2007
// Author Dmitry Poplavsky <dmitry.poplavsky@gmail.com>

#ifndef RESPONSE_H
#define RESPONSE_H

#include "variant.h"

namespace xmlrpc {

/**
 * \brief The xmlrpc::Response class contains XmlRPC response
 *        information.
 * 
 * xmlrpc::Response class is usually not intended to be used
 * directly but from the xmlrpc::Server and xmlrpc::Client,
 * except of building custom server implementation.
 */
class Response {
public:
    Response();
    Response( const Variant& returnValue );
    Response( int faultCode, const QString& faultString );

    virtual ~Response();

    bool isNull() const;
    
    bool isFault() const;
    int faultCode() const;
    QString faultString() const;

    Variant returnValue() const;


    bool setContent( const QByteArray& requestData, QString *errorMessage = 0 );
    QByteArray composeResponse() const;

private:
    class Private;
	QSharedDataPointer<Private> d;
};

} // namespace xmlrpc

#endif // ifndef RESPONSE_H