File indexing completed on 2025-01-05 03:53:36

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2011-03-22
0007  * Description : a Iface C++ interface
0008  *
0009  * SPDX-FileCopyrightText: 2011-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  * SPDX-FileCopyrightText: 2011      by Alexandre Mendes <alex dot mendes1988 at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_MEDIAWIKI_LOGOUT_H
0017 #define DIGIKAM_MEDIAWIKI_LOGOUT_H
0018 
0019 // Local includes
0020 
0021 #include "mediawiki_job.h"
0022 
0023 namespace MediaWiki
0024 {
0025 
0026 class Iface;
0027 class LogoutPrivate;
0028 
0029 /**
0030  * @brief Logout job.
0031  *
0032  * Uses for log out a user.
0033  */
0034 class Logout : public Job
0035 {
0036     Q_OBJECT
0037     Q_DECLARE_PRIVATE(Logout)
0038 
0039 public:
0040 
0041     /**
0042      * @brief Constructs a Logout job.
0043      * @param parent the QObject parent
0044      */
0045     explicit Logout(Iface& MediaWiki, QObject* const parent = nullptr);
0046 
0047     /**
0048      * @brief Destroys the Logout job.
0049      */
0050     ~Logout()    override;
0051 
0052     /**
0053      * @brief Starts the job asynchronously.
0054      */
0055     void start() override;
0056 
0057 private Q_SLOTS:
0058 
0059     void doWorkSendRequest();
0060     void doWorkProcessReply();
0061 };
0062 
0063 } // namespace MediaWiki
0064 
0065 #endif // DIGIKAM_MEDIAWIKI_LOGOUT_H