- // migration objects
- struct QuasselUserMO {
- UserId id;
- QString username;
- QString password;
- };
-
- struct SenderMO {
- int senderId;
- QString sender;
- SenderMO() : senderId(0) {}
- };
-
- struct IdentityMO {
- IdentityId id;
- UserId userid;
- QString identityname;
- QString realname;
- QString awayNick;
- bool awayNickEnabled;
- QString awayReason;
- bool awayReasonEnabled;
- bool autoAwayEnabled;
- int autoAwayTime;
- QString autoAwayReason;
- bool autoAwayReasonEnabled;
- bool detachAwayEnabled;
- QString detachAwayReason;
- bool detchAwayReasonEnabled;
- QString ident;
- QString kickReason;
- QString partReason;
- QString quitReason;
- QByteArray sslCert;
- QByteArray sslKey;
- };
-
- struct IdentityNickMO {
- int nickid;
- IdentityId identityId;
- QString nick;
- };
-
- struct NetworkMO {
- NetworkId networkid;
- UserId userid;
- QString networkname;
- IdentityId identityid;
- QString encodingcodec;
- QString decodingcodec;
- QString servercodec;
- bool userandomserver;
- QString perform;
- bool useautoidentify;
- QString autoidentifyservice;
- QString autoidentifypassword;
- bool useautoreconnect;
- int autoreconnectinterval;
- int autoreconnectretries;
- bool unlimitedconnectretries;
- bool rejoinchannels;
- bool connected;
- QString usermode;
- QString awaymessage;
- QString attachperform;
- QString detachperform;
- };
-
- struct BufferMO {
- BufferId bufferid;
- UserId userid;
- int groupid;
- NetworkId networkid;
- QString buffername;
- QString buffercname;
- int buffertype;
- int lastseenmsgid;
- QString key;
- bool joined;
- };
-
- struct BacklogMO {
- MsgId messageid;
- QDateTime time; // has to be in UTC!
- BufferId bufferid;
- int type;
- int flags;
- int senderid;
- QString message;
- };
-
- struct IrcServerMO {
- int serverid;
- UserId userid;
- NetworkId networkid;
- QString hostname;
- int port;
- QString password;
- bool ssl;
- int sslversion;
- bool useproxy;
- int proxytype;
- QString proxyhost;
- int proxyport;
- QString proxyuser;
- QString proxypass;
- };
-
- struct UserSettingMO {
- UserId userid;
- QString settingname;
- QByteArray settingvalue;
- };
-
- enum MigrationObject {
- QuasselUser,
- Sender,
- Identity,
- IdentityNick,
- Network,
- Buffer,
- Backlog,
- IrcServer,
- UserSetting
- };
-
- AbstractSqlMigrator();
- virtual ~AbstractSqlMigrator() {}
-
- static QString migrationObject(MigrationObject moType);
+ // migration objects
+ struct QuasselUserMO {
+ UserId id;
+ QString username;
+ QString password;
+ };
+
+ struct SenderMO {
+ int senderId;
+ QString sender;
+ SenderMO() : senderId(0) {}
+ };
+
+ struct IdentityMO {
+ IdentityId id;
+ UserId userid;
+ QString identityname;
+ QString realname;
+ QString awayNick;
+ bool awayNickEnabled;
+ QString awayReason;
+ bool awayReasonEnabled;
+ bool autoAwayEnabled;
+ int autoAwayTime;
+ QString autoAwayReason;
+ bool autoAwayReasonEnabled;
+ bool detachAwayEnabled;
+ QString detachAwayReason;
+ bool detchAwayReasonEnabled;
+ QString ident;
+ QString kickReason;
+ QString partReason;
+ QString quitReason;
+ QByteArray sslCert;
+ QByteArray sslKey;
+ };
+
+ struct IdentityNickMO {
+ int nickid;
+ IdentityId identityId;
+ QString nick;
+ };
+
+ struct NetworkMO {
+ NetworkId networkid;
+ UserId userid;
+ QString networkname;
+ IdentityId identityid;
+ QString encodingcodec;
+ QString decodingcodec;
+ QString servercodec;
+ bool userandomserver;
+ QString perform;
+ bool useautoidentify;
+ QString autoidentifyservice;
+ QString autoidentifypassword;
+ bool useautoreconnect;
+ int autoreconnectinterval;
+ int autoreconnectretries;
+ bool unlimitedconnectretries;
+ bool rejoinchannels;
+ bool connected;
+ QString usermode;
+ QString awaymessage;
+ QString attachperform;
+ QString detachperform;
+ bool usesasl;
+ QString saslaccount;
+ QString saslpassword;
+ };
+
+ struct BufferMO {
+ BufferId bufferid;
+ UserId userid;
+ int groupid;
+ NetworkId networkid;
+ QString buffername;
+ QString buffercname;
+ int buffertype;
+ int lastseenmsgid;
+ int markerlinemsgid;
+ QString key;
+ bool joined;
+ };
+
+ struct BacklogMO {
+ MsgId messageid;
+ QDateTime time; // has to be in UTC!
+ BufferId bufferid;
+ int type;
+ int flags;
+ int senderid;
+ QString message;
+ };
+
+ struct IrcServerMO {
+ int serverid;
+ UserId userid;
+ NetworkId networkid;
+ QString hostname;
+ int port;
+ QString password;
+ bool ssl;
+ int sslversion;
+ bool useproxy;
+ int proxytype;
+ QString proxyhost;
+ int proxyport;
+ QString proxyuser;
+ QString proxypass;
+ };
+
+ struct UserSettingMO {
+ UserId userid;
+ QString settingname;
+ QByteArray settingvalue;
+ };
+
+ enum MigrationObject {
+ QuasselUser,
+ Sender,
+ Identity,
+ IdentityNick,
+ Network,
+ Buffer,
+ Backlog,
+ IrcServer,
+ UserSetting
+ };
+
+ AbstractSqlMigrator();
+ virtual ~AbstractSqlMigrator() {}
+
+ static QString migrationObject(MigrationObject moType);