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

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2008-12-26
0007  * Description : a tool to export items to Facebook 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  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_FB_ITEM_H
0017 #define DIGIKAM_FB_ITEM_H
0018 
0019 // Qt includes
0020 
0021 #include <QString>
0022 
0023 // Local includes
0024 
0025 #include "wsitem.h"
0026 
0027 using namespace Digikam;
0028 
0029 namespace DigikamGenericFaceBookPlugin
0030 {
0031 
0032 class FbUser
0033 {
0034 public:
0035 
0036     FbUser()
0037     {
0038         uploadPerm = false;
0039     }
0040 
0041     void clear()
0042     {
0043         id.clear();
0044         name.clear();
0045         profileURL = QLatin1String("https://www.facebook.com");
0046         uploadPerm = true;
0047     }
0048 
0049     QString   id;
0050 
0051     QString   name;
0052     QString   profileURL;
0053     bool      uploadPerm;
0054 };
0055 
0056 // ---------------------------------------------------------------
0057 
0058 enum FbPrivacy
0059 {
0060     FB_ME = 0,
0061     FB_FRIENDS = 1,
0062     FB_FRIENDS_OF_FRIENDS,
0063 //     FB_NETWORKS, //NETWORK is deprecated in latest version of Graph API
0064     FB_EVERYONE,
0065     FB_CUSTOM
0066 };
0067 
0068 // ---------------------------------------------------------------
0069 
0070 class FbAlbum: public WSAlbum
0071 {
0072 public:
0073 
0074     explicit FbAlbum()
0075       : WSAlbum()
0076     {
0077         privacy = FB_FRIENDS;
0078     }
0079 
0080     explicit FbAlbum(const WSAlbum& baseAlbum)
0081       : WSAlbum(baseAlbum)
0082     {
0083         privacy = FB_FRIENDS;
0084     }
0085 
0086     FbPrivacy privacy;
0087 };
0088 
0089 // ---------------------------------------------------------------
0090 
0091 class FbPhoto
0092 {
0093 public:
0094 
0095     FbPhoto()
0096     {
0097     }
0098 
0099     QString id;
0100 
0101     QString caption;
0102     QString thumbURL;
0103     QString originalURL;
0104 };
0105 
0106 } // namespace DigikamGenericFaceBookPlugin
0107 
0108 #endif // DIGIKAM_FB_ITEM_H