X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Ftypes.h;h=9793150d138fe2184ae8ffe3b27af1b856f526fa;hp=b0dd0d132398bb234f04aa6462b8576eecf2c46a;hb=d28b9ec38b6ea0bc473200fc2f1e65abd1b56bd6;hpb=5e15b644e15c5ec0704f5a0f734475d86f179110 diff --git a/src/common/types.h b/src/common/types.h index b0dd0d13..9793150d 100644 --- a/src/common/types.h +++ b/src/common/types.h @@ -23,12 +23,29 @@ #include +/* +class UnsignedId { + quint32 id; + + public: + inline UnsignedId(int _id = 0) { id = _id; } + inline quint32 toInt() const { return id; } + inline bool operator==(const UnsignedId &other) const { return id == other.id; } + inline bool operator!=(const UnsignedId &other) const { return id != other.id; } +}; + +struct BufferId : public UnsignedId { + inline BufferId(int _id = 0) : UnsignedId(_id) {}; + +}; +*/ + // FIXME make all ID types quint32 as soon as they all have been replaced typedef uint UserId; //!< Identifies a core user. typedef uint MsgId; //!< Identifies a message. typedef uint BufferId; //!< Identifies a buffer. -typedef uint NetworkId; //!< Identifies an IRC Network. -// IdentityId must be signed! +// These must be signed! +typedef qint32 NetworkId; //!< Identifies an IRC Network. typedef qint32 IdentityId; //!< Identifies an identity. //! Base class for exceptions.