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

« back to all changes in this revision

Viewing changes to src/mediawiki.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-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>
 
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_MEDIAWIKI_H
 
29
#define MEDIAWIKI_MEDIAWIKI_H
 
30
 
 
31
// Qt includes
 
32
 
 
33
#include <QtCore/QString>
 
34
#include <QtCore/QUrl>
 
35
#include <QtNetwork/QNetworkAccessManager>
 
36
#include <QtNetwork/QNetworkCookieJar>
 
37
 
 
38
// Local includes
 
39
 
 
40
#include "mediawiki_export.h"
 
41
 
 
42
namespace mediawiki
 
43
{
 
44
 
 
45
/**
 
46
 * @brief Provides access to wiki powered by MediaWiki.
 
47
 */
 
48
class MEDIAWIKI_EXPORT MediaWiki
 
49
{
 
50
 
 
51
public:
 
52
 
 
53
    /**
 
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
 
59
     */
 
60
    explicit MediaWiki(const QUrl& url, const QString& customUserAgent = QString());
 
61
 
 
62
    /**
 
63
     * @brief Destructs the MediaWiki.
 
64
     */
 
65
    ~MediaWiki();
 
66
 
 
67
    /**
 
68
     * @brief Returns the url api of the wiki.
 
69
     * @returns the url api of the wiki
 
70
     */
 
71
    QUrl url() const;
 
72
 
 
73
    /**
 
74
     * @brief Returns the user agent of the wiki.
 
75
     * @return the user agent of the wiki
 
76
     */
 
77
    QString userAgent() const;
 
78
 
 
79
    /**
 
80
     * @brief Returns the network manager instance of the wiki.
 
81
     * @return the network manager instance of the wiki
 
82
     */
 
83
    QNetworkAccessManager* manager() const;
 
84
 
 
85
private:
 
86
 
 
87
    class MediaWikiPrivate;
 
88
    MediaWikiPrivate* const d_ptr;
 
89
 
 
90
    friend class JobPrivate;
 
91
};
 
92
 
 
93
} // namespace mediawiki
 
94
 
 
95
#endif // MEDIAWIKI_MEDIAWIKI_H