File indexing completed on 2024-04-28 12:31:12
0001 /** =========================================================== 0002 * @file 0003 * 0004 * This file is a part of KDE project 0005 * <a href="https://commits.kde.org/libmediawiki">libmediawiki</a> 0006 * 0007 * @date 2011-03-22 0008 * @brief a MediaWiki C++ interface for KDE 0009 * 0010 * @author Copyright (C) 2011-2012 by Gilles Caulier 0011 * <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a> 0012 * @author Copyright (C) 2009 by Remi Benoit 0013 * <a href="mailto:r3m1 dot benoit at gmail dot com">r3m1 dot benoit at gmail dot com</a> 0014 * 0015 * This program is free software; you can redistribute it 0016 * and/or modify it under the terms of the GNU General 0017 * Public License as published by the Free Software Foundation; 0018 * either version 2, or (at your option) 0019 * any later version. 0020 * 0021 * This program is distributed in the hope that it will be useful, 0022 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0024 * GNU General Public License for more details. 0025 * 0026 * ============================================================ */ 0027 0028 #ifndef MEDIAWIKI_P_H 0029 #define MEDIAWIKI_P_H 0030 0031 // Qt includes 0032 0033 #include <QString> 0034 #include <QUrl> 0035 #include <QNetworkAccessManager> 0036 0037 namespace mediawiki 0038 { 0039 0040 class Q_DECL_HIDDEN MediaWiki::MediaWikiPrivate 0041 { 0042 0043 public: 0044 0045 MediaWikiPrivate(const QUrl& url, const QString& userAgent, QNetworkAccessManager* const manager) 0046 : url(url), 0047 userAgent(userAgent), 0048 manager(manager) 0049 { 0050 } 0051 0052 ~MediaWikiPrivate() 0053 { 0054 delete manager; 0055 } 0056 0057 public: 0058 0059 static const QString POSTFIX_USER_AGENT; 0060 0061 const QUrl url; 0062 const QString userAgent; 0063 QNetworkAccessManager* const manager; 0064 }; 0065 0066 const QString MediaWiki::MediaWikiPrivate::POSTFIX_USER_AGENT = QString::fromUtf8("mediawiki-silk"); 0067 0068 } // namespace mediawiki 0069 0070 #endif // MEDIAWIKI_P_H