X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fglobal.h;h=33d52f4ced6774cfb83e5f413e5d197ee7506987;hb=a7f5d6a23f7214b11f6db85346a67fd7d02767da;hp=c672c402f5718dac6072920a2f18426002121299;hpb=372e281c83794188819e2a74f570e16684778456;p=quassel.git diff --git a/src/common/global.h b/src/common/global.h index c672c402..33d52f4c 100644 --- a/src/common/global.h +++ b/src/common/global.h @@ -35,15 +35,15 @@ #include /* Some global stuff */ -typedef QMap VarMap; typedef uint UserId; typedef uint MsgId; +typedef uint BufferId; +typedef uint NetworkId; namespace Global { enum RunMode { Monolithic, ClientOnly, CoreOnly }; extern RunMode runMode; - extern QString quasselDir; } struct Exception { @@ -56,36 +56,4 @@ struct Exception { }; -class BufferId { - public: - BufferId() { id = gid = 0; } // FIXME - BufferId(uint uid, QString net, QString buf, uint gid = 0); - - inline uint uid() const { return id; } - inline uint groupId() const { return gid; } - inline QString network() const { return net; } - QString buffer() const; // nickfrommask? - - void setGroupId(uint _gid) { gid = _gid; } - - inline bool operator==(const BufferId &other) const { return id == other.id; } - - private: - uint id; - uint gid; - QString net; - QString buf; - - friend uint qHash(const BufferId &); - friend QDataStream &operator<<(QDataStream &out, const BufferId &bufferId); - friend QDataStream &operator>>(QDataStream &in, BufferId &bufferId); -}; - -QDataStream &operator<<(QDataStream &out, const BufferId &bufferId); -QDataStream &operator>>(QDataStream &in, BufferId &bufferId); - -Q_DECLARE_METATYPE(BufferId); - -uint qHash(const BufferId &); - #endif