1 | /* |
2 | * Copyright (C) by Klaas Freitag <freitag@owncloud.com> |
3 | * |
4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. |
8 | * |
9 | * This program is distributed in the hope that it will be useful, but |
10 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
11 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
12 | * for more details. |
13 | */ |
14 | |
15 | #include <QtCore> |
16 | |
17 | #include "activitydata.h" |
18 | |
19 | |
20 | namespace OCC { |
21 | |
22 | bool operator<(const Activity &rhs, const Activity &lhs) |
23 | { |
24 | return rhs._dateTime.toMSecsSinceEpoch() > lhs._dateTime.toMSecsSinceEpoch(); |
25 | } |
26 | |
27 | bool operator==(const Activity &rhs, const Activity &lhs) |
28 | { |
29 | return (rhs._type == lhs._type && rhs._id == lhs._id && rhs._accName == lhs._accName); |
30 | } |
31 | |
32 | Activity::Identifier Activity::ident() const |
33 | { |
34 | return Identifier(_id, _accName); |
35 | } |
36 | } |
37 | |