File indexing completed on 2024-04-21 15:32:07
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) 2010 by Alexandre Mendes 0013 * <a href="mailto:alex dot mendes1988 at gmail dot com">alex dot mendes1988 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_LOGOUT_H 0029 #define MEDIAWIKI_LOGOUT_H 0030 0031 // Local includes 0032 0033 #include "job.h" 0034 #include "mediawiki_export.h" 0035 0036 namespace mediawiki 0037 { 0038 0039 class MediaWiki; 0040 class LogoutPrivate; 0041 0042 /** 0043 * @brief Logout job. 0044 * 0045 * Uses for log out a user. 0046 */ 0047 class MEDIAWIKI_EXPORT Logout : public Job 0048 { 0049 Q_OBJECT 0050 Q_DECLARE_PRIVATE(Logout) 0051 0052 public: 0053 0054 /** 0055 * @brief Constructs a Logout job. 0056 * @param parent the QObject parent 0057 */ 0058 explicit Logout(MediaWiki& mediawiki, QObject* const parent = nullptr); 0059 0060 /** 0061 * @brief Destroys the Logout job. 0062 */ 0063 ~Logout() override; 0064 0065 /** 0066 * @brief Starts the job asynchronously. 0067 */ 0068 void start() override; 0069 0070 private Q_SLOTS: 0071 0072 void doWorkSendRequest(); 0073 void doWorkProcessReply(); 0074 }; 0075 0076 } // namespace mediawiki 0077 0078 #endif // LOGOUT_H