File indexing completed on 2019-04-16 17:04:20

0001 /*
0002     This file is part of Choqok, the KDE micro-blogging client
0003 
0004     Copyright (C) 2008-2012 Mehrdad Momeny <mehrdad.momeny@gmail.com>
0005 
0006     This program is free software; you can redistribute it and/or
0007     modify it under the terms of the GNU General Public License as
0008     published by the Free Software Foundation; either version 2 of
0009     the License or (at your option) version 3 or any later version
0010     accepted by the membership of KDE e.V. (or its successor approved
0011     by the membership of KDE e.V.), which shall act as a proxy
0012     defined in Section 14 of version 3 of the license.
0013 
0014 
0015     This program is distributed in the hope that it will be useful,
0016     but WITHOUT ANY WARRANTY; without even the implied warranty of
0017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0018     GNU General Public License for more details.
0019 
0020     You should have received a copy of the GNU General Public License
0021     along with this program; if not, see http://www.gnu.org/licenses/
0022 
0023 */
0024 
0025 #ifndef CHOQOKTYPES_H
0026 #define CHOQOKTYPES_H
0027 
0028 #include <QDateTime>
0029 
0030 #include "choqok_export.h"
0031 
0032 namespace Choqok
0033 {
0034 
0035 enum JobResult{
0036     Fail = 0,
0037     Success = 1
0038 };
0039 
0040 class CHOQOK_EXPORT User {
0041 public:
0042     User()
0043     :isProtected(false)
0044     {}
0045     virtual ~User() {}
0046     QString userId;
0047     QString realName;
0048     QString userName;
0049     QString location;
0050     QString description;
0051     QString profileImageUrl;
0052     QString homePageUrl;
0053     bool isProtected;
0054     uint followersCount;
0055 };
0056 
0057 class CHOQOK_EXPORT Post {
0058 public:
0059     Post()
0060     :isFavorited(false), isPrivate(false), isError(false), isRead(false),
0061      mediaSizeWidth(0), mediaSizeHeight(0), owners(0)
0062     {}
0063     virtual ~Post() {}
0064     QDateTime creationDateTime;
0065     QString postId;
0066     QString link;
0067     QString content;
0068     QString source;
0069     QString replyToPostId;
0070     QString replyToUserId;
0071     bool isFavorited;
0072     QString replyToUserName;
0073     User author;
0074     QString type;
0075     bool isPrivate;
0076     bool isError;
0077     bool isRead;
0078     QString repeatedFromUsername;
0079     QString repeatedPostId;
0080     QString conversationId;
0081     QString media;          // first Image of Post, if available
0082     int mediaSizeWidth;
0083     int mediaSizeHeight;
0084     unsigned int owners; // number of associated PostWidgets
0085 };
0086 /**
0087 Describe an specific timeline, Should use by @ref MicroBlog
0088 */
0089 class CHOQOK_EXPORT TimelineInfo {
0090 public:
0091     QString name;
0092     QString description;
0093     QString icon;
0094 };
0095 /*
0096 enum FilterAction{
0097     Delete = 0,
0098     MoveTo = 1,
0099     CopyTo = 2
0100 };
0101 
0102 
0103 struct Filter {
0104 public:
0105     QStringList applyToAccounts;
0106     QStringList applyToTimelines;
0107     FilterAction action;
0108     QString moveCopyTo;
0109 };
0110 */
0111 
0112 }
0113 #endif