~ubuntu-branches/debian/sid/libmediawiki/sid

« back to all changes in this revision

Viewing changes to src/mediawiki_p.h

  • Committer: Package Import Robot
  • Author(s): Steve M. Robbins
  • Date: 2017-11-05 21:15:29 UTC
  • Revision ID: package-import@ubuntu.com-20171105211529-bgfi385yv79030cf
Tags: upstream-5.37.0
ImportĀ upstreamĀ versionĀ 5.37.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/** ===========================================================
 
2
 * @file
 
3
 *
 
4
 * This file is a part of KDE project
 
5
 * <a href="https://projects.kde.org/projects/extragear/libs/libmediawiki">libmediawiki</a>
 
6
 *
 
7
 * @date   2011-03-22
 
8
 * @brief  a MediaWiki C++ interface for KDE
 
9
 *
 
10
 * @author Copyright (C) 2011-2012 by Gilles Caulier
 
11
 *         <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
 
12
 * @author Copyright (C) 2009 by Remi Benoit
 
13
 *         <a href="mailto:r3m1 dot benoit at gmail dot com">r3m1 dot benoit at gmail dot com</a>
 
14
 *
 
15
 * This program is free software; you can redistribute it
 
16
 * and/or modify it under the terms of the GNU General
 
17
 * Public License as published by the Free Software Foundation;
 
18
 * either version 2, or (at your option)
 
19
 * any later version.
 
20
 *
 
21
 * This program is distributed in the hope that it will be useful,
 
22
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
23
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
24
 * GNU General Public License for more details.
 
25
 *
 
26
 * ============================================================ */
 
27
 
 
28
#ifndef MEDIAWIKI_P_H
 
29
#define MEDIAWIKI_P_H
 
30
 
 
31
// Qt includes
 
32
 
 
33
#include <QtCore/QString>
 
34
#include <QtCore/QUrl>
 
35
#include <QtNetwork/QNetworkAccessManager>
 
36
 
 
37
namespace mediawiki
 
38
{
 
39
 
 
40
class Q_DECL_HIDDEN MediaWiki::MediaWikiPrivate
 
41
{
 
42
 
 
43
public:
 
44
 
 
45
    MediaWikiPrivate(const QUrl& url, const QString& userAgent, QNetworkAccessManager* const manager)
 
46
        : url(url),
 
47
          userAgent(userAgent),
 
48
          manager(manager)
 
49
    {
 
50
    }
 
51
 
 
52
    ~MediaWikiPrivate()
 
53
    {
 
54
        delete manager;
 
55
    }
 
56
 
 
57
public:
 
58
 
 
59
    static const QString         POSTFIX_USER_AGENT;
 
60
 
 
61
    const QUrl                   url;
 
62
    const QString                userAgent;
 
63
    QNetworkAccessManager* const manager;
 
64
};
 
65
 
 
66
const QString MediaWiki::MediaWikiPrivate::POSTFIX_USER_AGENT = QString::fromUtf8("mediawiki-silk");
 
67
 
 
68
} // namespace mediawiki
 
69
 
 
70
#endif // MEDIAWIKI_P_H