Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2021-03-24 16:49:30 +0300
committerHannah von Reth <vonreth@kde.org>2021-03-31 17:12:09 +0300
commit1404c39fc4e27a4541840bf6d763493a22386dd5 (patch)
tree6c16c82720be2fa031f86e28807a6671d46c04a7 /src/gui/activitydata.h
parentfd36bdcb36d194790fa050b6a635aade384262b3 (diff)
Cleanup the activities item and use uuid
Diffstat (limited to 'src/gui/activitydata.h')
-rw-r--r--src/gui/activitydata.h48
1 files changed, 33 insertions, 15 deletions
diff --git a/src/gui/activitydata.h b/src/gui/activitydata.h
index d1df8e51d..d8f216876 100644
--- a/src/gui/activitydata.h
+++ b/src/gui/activitydata.h
@@ -17,6 +17,8 @@
#include <QtCore>
+#include "account.h"
+
namespace OCC {
/**
* @brief The ActivityLink class describes actions of an activity
@@ -44,37 +46,53 @@ public:
class Activity
{
public:
- // id, account name
- typedef QPair<qlonglong, QString> Identifier;
-
+ using Identifier = qlonglong;
enum Type {
ActivityType,
NotificationType
};
+ Activity() = default;
+ explicit Activity(Type type, Identifier id, AccountPtr acc, const QString &subject, const QString &message, const QString &file, const QUrl &link, const QDateTime &dateTime, const QVector<ActivityLink> &&links = {});
+
+ Type type() const;
+
+ Identifier id() const;
+
+ QString subject() const;
+
+ QString message() const;
+
+ QString file() const;
+
+ QUrl link() const;
+ QDateTime dateTime() const;
+
+ QString accName() const;
+
+ QUuid uuid() const;
+
+ const QVector<ActivityLink> &links() const;
+
+ bool operator==(const Activity &lhs) const;
+ bool operator<(const Activity &lhs) const;
+
+
+private:
Type _type;
- qlonglong _id;
+ Identifier _id;
+ QString _accName; /* display name of the account */
+ QUuid _uuid; /* uuid of the account */
QString _subject;
QString _message;
QString _file;
QUrl _link;
QDateTime _dateTime;
- QString _accName; /* display name of the account involved */
QVector<ActivityLink> _links; /* These links are transformed into buttons that
* call links as reactions on the activity */
- /**
- * @brief Sort operator to sort the list youngest first.
- * @param val
- * @return
- */
-
-
- Identifier ident() const;
};
-bool operator==(const Activity &rhs, const Activity &lhs);
-bool operator<(const Activity &rhs, const Activity &lhs);
/* ==================================================================== */
/**