X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommon%2Ftypes.h;h=e2acbeb316a1e6f92e8b8784292aaf7a52b503bb;hb=fb6f5bcbdebd8660f355a558dd7cc47f6df45965;hp=551bd13ab877a271c759978caf90dbbcb7750d0f;hpb=23ebdc0a422294764ff3be3f8d7e56cc2b323185;p=quassel.git diff --git a/src/common/types.h b/src/common/types.h index 551bd13a..e2acbeb3 100644 --- a/src/common/types.h +++ b/src/common/types.h @@ -37,6 +37,8 @@ class SignedId { inline bool operator==(const SignedId &other) const { return id == other.id; } inline bool operator!=(const SignedId &other) const { return id != other.id; } inline bool operator<(const SignedId &other) const { return id < other.id; } + inline bool operator>(const SignedId &other) const { return id > other.id; } + inline bool operator>=(const SignedId &other) const { return id >= other.id; } inline bool operator==(int i) const { return id == i; } inline bool operator!=(int i) const { return id != i; } inline bool operator<(int i) const { return id < i; } @@ -79,11 +81,16 @@ struct IdentityId : public SignedId { //inline operator QVariant() const { return QVariant::fromValue(*this); } }; +struct AccountId : public SignedId { + inline AccountId(int _id = 0) : SignedId(_id) {}; +}; + Q_DECLARE_METATYPE(UserId); Q_DECLARE_METATYPE(MsgId); Q_DECLARE_METATYPE(BufferId); Q_DECLARE_METATYPE(NetworkId); Q_DECLARE_METATYPE(IdentityId); +Q_DECLARE_METATYPE(AccountId); //! Base class for exceptions. struct Exception {