1
/** ===========================================================
4
* This file is a part of KDE project
5
* <a href="https://projects.kde.org/projects/extragear/libs/libmediawiki">libmediawiki</a>
8
* @brief a MediaWiki C++ interface for KDE
10
* @author Copyright (C) 2011-2013 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 Richard Moore
13
* <a href="mailto:rich at kde dot org">rich at kde dot org</a>
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)
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.
26
* ============================================================ */
28
#ifndef MEDIAWIKI_MEDIAWIKI_H
29
#define MEDIAWIKI_MEDIAWIKI_H
33
#include <QtCore/QString>
34
#include <QtCore/QUrl>
35
#include <QtNetwork/QNetworkAccessManager>
36
#include <QtNetwork/QNetworkCookieJar>
40
#include "mediawiki_export.h"
46
* @brief Provides access to wiki powered by MediaWiki.
48
class MEDIAWIKI_EXPORT MediaWiki
54
* @brief Constructs a MediaWiki by its url api.
55
* @param url the url api of the wiki
56
* @param customUserAgent you can specify the user agent to use
57
which will be concatenated with the postfix user agent
58
* else the postfix user agent is used only
60
explicit MediaWiki(const QUrl& url, const QString& customUserAgent = QString());
63
* @brief Destructs the MediaWiki.
68
* @brief Returns the url api of the wiki.
69
* @returns the url api of the wiki
74
* @brief Returns the user agent of the wiki.
75
* @return the user agent of the wiki
77
QString userAgent() const;
80
* @brief Returns the network manager instance of the wiki.
81
* @return the network manager instance of the wiki
83
QNetworkAccessManager* manager() const;
87
class MediaWikiPrivate;
88
MediaWikiPrivate* const d_ptr;
90
friend class JobPrivate;
93
} // namespace mediawiki
95
#endif // MEDIAWIKI_MEDIAWIKI_H