23 #ifndef __DS_MESSAGE_H_ 24 #define __DS_MESSAGE_H_ 44 static QString
getMessage(
unsigned messageType);
82 static const unsigned IGNORE_TYPE = 0;
90 static const unsigned CUSTOM_INFORMATION = 1;
94 static const unsigned CANCELLED = 2;
98 static const unsigned SUCCESSFUL = 3;
106 static const unsigned CUSTOM_ERROR = 0x7fffffff;
111 static const unsigned BANNED_FROM_MASTERSERVER = CUSTOM_ERROR + 1;
117 static const unsigned GAME_NOT_FOUND_BUT_CAN_BE_INSTALLED = CUSTOM_ERROR + 2;
125 return Message(Type::CUSTOM_ERROR, content);
133 return Message(Type::CUSTOM_INFORMATION, content);
153 Message(
unsigned type,
const QString &content);
161 QString contents()
const;
166 bool isCustom()
const;
170 bool isError()
const;
174 bool isIgnore()
const;
179 bool isInformation()
const;
184 unsigned timestamp()
const;
188 unsigned type()
const;
Message object used to pass messages throughout the Doomseeker's system.
One of possible, Doomseeker recognizable error types.
static QString getMessage(unsigned messageType)
Gets static string for a Message::Type.
static Message customInformation(const QString &content)
Convenience method. Sets type to Type::CUSTOM_INFORMATION.
static Message customError(const QString &content)
Convenience method. Sets type to Type::CUSTOM_ERROR.