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