X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fstorage.h;h=1cb2ee827dd9f61a3d5eb8f1bd012d3e868b8e4d;hp=cc3d0393d7aa628c39434fc8311cd238910c056a;hb=bb799766223a6388e476f320ad74720c802b2d83;hpb=13107a33c065fe6c6fb402ae24e2adbfcf743287 diff --git a/src/core/storage.h b/src/core/storage.h index cc3d0393..1cb2ee82 100644 --- a/src/core/storage.h +++ b/src/core/storage.h @@ -31,10 +31,16 @@ class Storage : public QObject { Q_OBJECT - public: +public: Storage(QObject *parent = 0); virtual ~Storage() {}; + enum State { + IsReady, // ready to go + NeedsSetup, // need basic setup (ask the user for input) + NotAvailable // remove the storage backend from the list of avaliable backends + }; + public slots: /* General */ @@ -62,9 +68,9 @@ public slots: //! Initialize the storage provider /** \param settings Hostname, port, username, password, ... - * \return True if and only if the storage provider was initialized successfully. + * \return the State the storage backend is now in (see Storage::State) */ - virtual bool init(const QVariantMap &settings = QVariantMap()) = 0; + virtual State init(const QVariantMap &settings = QVariantMap()) = 0; //! Makes temp data persistent /** This Method is periodically called by the Quassel Core to make temporary