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

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2012-02-02
0007  * Description : a tool to export items to ImageShackSession web service
0008  *
0009  * SPDX-FileCopyrightText: 2012      by Dodon Victor <dodonvictor at gmail dot com>
0010  * SPDX-FileCopyrightText: 2013-2018 by Caulier Gilles <caulier dot gilles at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_IMAGE_SHACK_SESSION_H
0017 #define DIGIKAM_IMAGE_SHACK_SESSION_H
0018 
0019 // Qt includes
0020 
0021 #include <QString>
0022 
0023 namespace DigikamGenericImageShackPlugin
0024 {
0025 
0026 class ImageShackSession
0027 {
0028 
0029 public:
0030 
0031     explicit ImageShackSession();
0032     ~ImageShackSession();
0033 
0034 public:
0035 
0036     bool    loggedIn()  const;
0037     QString username()  const;
0038     QString email()     const;
0039     QString password()  const;
0040     QString credits()   const;
0041     QString authToken() const;
0042 
0043     void setLoggedIn(bool b);
0044     void setUsername(const QString& username);
0045     void setEmail(const QString& email);
0046     void setPassword(const QString& pass);
0047     void setCredits(const QString& credits);
0048     void setAuthToken(const QString& token);
0049 
0050     void readSettings();
0051     void saveSettings();
0052 
0053     void logOut();
0054 
0055 private:
0056 
0057     // Disable
0058     ImageShackSession(const ImageShackSession&)            = delete;
0059     ImageShackSession& operator=(const ImageShackSession&) = delete;
0060 
0061 private:
0062 
0063     class Private;
0064     Private* const d;
0065 };
0066 
0067 } // namespace DigikamGenericImageShackPlugin
0068 
0069 #endif // DIGIKAM_IMAGE_SHACK_SESSION_H