minor improvements

This commit is contained in:
Max-Wilhelm Bruker 2009-04-08 21:49:16 +02:00
parent a429a4a004
commit 792a400a3d
30 changed files with 1022 additions and 829 deletions

View file

@ -1,8 +1,7 @@
#ifndef RETURNMESSAGE_H
#define RETURNMESSAGE_H
#include <QString>
#include <QObject>
#include <QStringList>
class ReturnMessage : public QObject {
Q_OBJECT
@ -10,11 +9,12 @@ private:
unsigned int msg_id;
QString cmd;
public:
enum ReturnCode { ReturnNothing, ReturnOk, ReturnLoginNeeded, ReturnSyntaxError, ReturnContextError, ReturnPasswordWrong, ReturnNameNotFound };
ReturnMessage(QObject *parent = 0) : QObject(parent), msg_id(0) { }
unsigned int getMsgId() const { return msg_id; }
void setMsgId(unsigned int _msg_id);
void setCmd(const QString &_cmd) { cmd = _cmd; }
bool send(const QString &args = QString(), bool success = true);
bool send(ReturnCode code);
bool sendList(const QStringList &args);
};