summaryrefslogtreecommitdiffstats
path: root/weather/src/xoapweatherresponse.h
blob: 1fd13cd0354edf8905f688497c37264508556d44 (plain)
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
#ifndef XOAPWEATHERRESPONSE_H
#define XOAPWEATHERRESPONSE_H

#include <QString>
#include <QStringList>
#include <QDomElement>
#include <QTime>
#include <QDate>
#include <QDateTime>

class XoapWeatherResponse
{
public:
    class Item
    {
    public:
        Item() : m_type(0) {}
        void read(QDomElement element);

        QStringList texts() const { return m_texts; }
        int type() const { return m_type; }
        QString id() const { return m_id; }

    private:
        QStringList m_texts;
        int m_type;
        QString m_id;

    };
    XoapWeatherResponse();
    void read(QDomElement element);
    void print();

    QString versionid() const { return m_version; }
    const QList<Item> &items() const { return m_list; }


private:
    QString m_version;
    QList<Item> m_list;
};

#endif // XOAPWEATHERRESPONSE_H