Message object cleanup
[quassel.git] / src / common / message.h
index 4d283ad..c1b8e62 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-08 by the Quassel Project                          *
+ *   Copyright (C) 2005-09 by the Quassel Project                          *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -55,6 +55,7 @@ public:
     Self = 0x01,
     Highlight = 0x02,
     Redirected = 0x04,
+    ServerMsg = 0x08,
     Backlog = 0x80
   };
   Q_DECLARE_FLAGS(Flags, Flag)
@@ -73,9 +74,10 @@ public:
   inline QString sender() const { return _sender; }
   inline Type type() const { return _type; }
   inline Flags flags() const { return _flags; }
+  inline void setFlags(Flags flags) { _flags = flags; }
   inline QDateTime timestamp() const { return _timestamp; }
 
-  void setFlags(Flags flags);
+  inline bool isValid() const { return _msgId.isValid(); }
 
   inline bool operator<(const Message &other) const { return _msgId < other._msgId; }
 
@@ -88,8 +90,6 @@ private:
   Type _type;
   Flags _flags;
 
-  QString _formattedTimestamp, _formattedSender, _formattedText; // cache
-
   friend QDataStream &operator>>(QDataStream &in, Message &msg);
 };