- enum Type {
- InvalidBuffer = 0x00,
- StatusBuffer = 0x01,
- ChannelBuffer = 0x02,
- QueryBuffer = 0x04,
- GroupBuffer = 0x08
- };
-
- enum Activity {
- NoActivity = 0x00,
- OtherActivity = 0x01,
- NewMessage = 0x02,
- Highlight = 0x40
- };
- Q_DECLARE_FLAGS(ActivityLevel, Activity)
-
- BufferInfo();
- BufferInfo(BufferId id, NetworkId networkid, Type type, uint gid = 0, QString buf = QString());
-
- static BufferInfo fakeStatusBuffer(NetworkId networkId);
-
- inline bool isValid() const { return _bufferId != 0; }
- inline BufferId bufferId() const { return _bufferId; }
- inline NetworkId networkId() const { return _netid; }
- inline Type type() const { return _type; }
- inline uint groupId() const { return _groupId; }
- QString bufferName() const;
-
- void setGroupId(uint gid) { _groupId = gid; }
-
- inline bool operator==(const BufferInfo &other) const { return _bufferId == other._bufferId; }
+ enum Type {
+ InvalidBuffer = 0x00,
+ StatusBuffer = 0x01,
+ ChannelBuffer = 0x02,
+ QueryBuffer = 0x04,
+ GroupBuffer = 0x08
+ };
+
+ enum Activity {
+ NoActivity = 0x00,
+ OtherActivity = 0x01,
+ NewMessage = 0x02,
+ Highlight = 0x40
+ };
+ Q_DECLARE_FLAGS(ActivityLevel, Activity)
+
+ BufferInfo();
+ BufferInfo(BufferId id, NetworkId networkid, Type type, uint gid = 0, QString buf = QString());
+
+ static BufferInfo fakeStatusBuffer(NetworkId networkId);
+
+ inline bool isValid() const { return _bufferId != 0; }
+ inline const BufferId &bufferId() const { return _bufferId; }
+ inline void setBufferId(BufferId id) { _bufferId = id; }
+ inline const NetworkId &networkId() const { return _netid; }
+ inline const Type &type() const { return _type; }
+ inline const uint &groupId() const { return _groupId; }
+ void setGroupId(uint gid) { _groupId = gid; }
+
+ QString bufferName() const;
+ bool acceptsRegularMessages() const;
+
+ inline bool operator==(const BufferInfo &other) const { return _bufferId == other._bufferId; }