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

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2008-12-01
0007  * Description : a tool to export images to Smugmug web service
0008  *
0009  * SPDX-FileCopyrightText: 2008-2009 by Luka Renko <lure at kubuntu dot org>
0010  * SPDX-FileCopyrightText: 2008-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0011  * SPDX-FileCopyrightText: 2018      by Thanh Trung Dinh <dinhthanhtrung1996 at gmail dot com>
0012  *
0013  * SPDX-License-Identifier: GPL-2.0-or-later
0014  *
0015  * ============================================================ */
0016 
0017 #ifndef DIGIKAM_SMUG_ITEM_H
0018 #define DIGIKAM_SMUG_ITEM_H
0019 
0020 // Qt includes
0021 
0022 #include <QString>
0023 
0024 namespace DigikamGenericSmugPlugin
0025 {
0026 
0027 class SmugUser
0028 {
0029 
0030 public:
0031 
0032     explicit SmugUser()
0033       : fileSizeLimit(0)
0034     {
0035     }
0036 
0037     void clear()
0038     {
0039         email.clear();
0040         nickName.clear();
0041         displayName.clear();
0042         accountType.clear();
0043         userUri.clear();
0044         nodeUri.clear();
0045         folderUri.clear();
0046         fileSizeLimit = 0;
0047     }
0048 
0049 public:
0050 
0051     QString email;
0052     QString nickName;
0053     QString displayName;
0054     QString accountType;
0055     QString userUri;
0056     QString nodeUri;
0057     QString folderUri;
0058     int     fileSizeLimit;
0059 };
0060 
0061 // ---------------------------------------------------------------------------------
0062 
0063 class SmugAlbum
0064 {
0065 
0066 public:
0067 
0068     explicit SmugAlbum()
0069       : id           (-1),
0070         categoryID   (-1),
0071         subCategoryID(-1),
0072         isPublic     (true),
0073         canShare     (true),
0074         imageCount   (0),
0075         tmplID       (-1)
0076     {
0077     }
0078 
0079 public:
0080 
0081     qint64  id;
0082     QString nodeID;
0083 
0084     QString name;
0085     QString key;
0086     QString title;
0087     QString description;
0088     QString keywords;
0089 
0090     qint64  categoryID;
0091     QString category;
0092 
0093     qint64  subCategoryID;
0094     QString subCategory;
0095 
0096     bool    isPublic;
0097     QString password;
0098     bool    canShare;
0099     QString passwordHint;
0100 
0101     int     imageCount;
0102 
0103     /// below fields only used by createAlbum (and not by listAlbums)
0104     qint64  tmplID;
0105     QString tmpl;
0106 
0107     static bool lessThan(SmugAlbum& a, SmugAlbum& b)
0108     {
0109         return a.title.toLower() < b.title.toLower();
0110     }
0111 };
0112 
0113 // ---------------------------------------------------------------------------------
0114 
0115 class SmugPhoto
0116 {
0117 
0118 public:
0119 
0120     explicit SmugPhoto()
0121       : id(-1)
0122     {
0123     }
0124 
0125 public:
0126 
0127     qint64  id;
0128 
0129     QString key;
0130     QString caption;
0131     QString keywords;
0132 
0133     QString thumbURL;
0134     QString originalURL;
0135 };
0136 
0137 // ---------------------------------------------------------------------------------
0138 
0139 class SmugAlbumTmpl
0140 {
0141 
0142 public:
0143 
0144     explicit SmugAlbumTmpl()
0145       : id(-1),
0146         isPublic(true)
0147     {
0148     }
0149 
0150 public:
0151 
0152     qint64  id;
0153     QString name;
0154     QString uri;
0155 
0156     bool    isPublic;
0157     QString password;
0158     QString passwordHint;
0159 };
0160 
0161 // ---------------------------------------------------------------------------------
0162 
0163 class SmugCategory
0164 {
0165 
0166 public:
0167 
0168     explicit SmugCategory()
0169       : id(-1)
0170     {
0171     }
0172 
0173 public:
0174 
0175     qint64  id;
0176     QString name;
0177 };
0178 
0179 } // namespace DigikamGenericSmugPlugin
0180 
0181 #endif // DIGIKAM_SMUG_ITEM_H