23 #ifndef __DS_MESSAGE_H_
24 #define __DS_MESSAGE_H_
43 static QString
getMessage(
unsigned messageType);
81 static const unsigned IGNORE_TYPE = 0;
89 static const unsigned CUSTOM_INFORMATION = 1;
93 static const unsigned CANCELLED = 2;
97 static const unsigned SUCCESSFUL = 3;
105 static const unsigned CUSTOM_ERROR = 0x7fffffff;
110 static const unsigned BANNED_FROM_MASTERSERVER = CUSTOM_ERROR + 1;
116 static const unsigned GAME_NOT_FOUND_BUT_CAN_BE_INSTALLED = CUSTOM_ERROR + 2;
124 return Message(Type::CUSTOM_ERROR, content);
132 return Message(Type::CUSTOM_INFORMATION, content);
152 Message(
unsigned type,
const QString &content);
160 QString contents()
const;
165 bool isCustom()
const;
169 bool isError()
const;
173 bool isIgnore()
const;
178 bool isInformation()
const;
183 unsigned timestamp()
const;
187 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.