summaryrefslogtreecommitdiff
path: root/src/containers/kolabconfiguration.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers/kolabconfiguration.h')
-rw-r--r--src/containers/kolabconfiguration.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/containers/kolabconfiguration.h b/src/containers/kolabconfiguration.h
index 2d8f9e8..7b5c106 100644
--- a/src/containers/kolabconfiguration.h
+++ b/src/containers/kolabconfiguration.h
@@ -150,6 +150,36 @@ private:
std::vector<std::string> mMembers;
};
+struct FileDriver {
+ FileDriver(): mEnabled(false) {}
+ FileDriver(const std::string &driver, const std::string &title): mDriver(driver), mTitle(title), mEnabled(true) {}
+
+ bool operator==(const FileDriver &other) const {
+ return mDriver == other.mDriver
+ && mTitle == other.mTitle
+ && mEnabled == other.mEnabled
+ && mSettings == other.mSettings;
+ }
+
+ void setDriver(const std::string &driver) { mDriver = driver; }
+ std::string driver() const { return mDriver; }
+
+ void setTitle(const std::string &title) { mTitle = title; }
+ std::string title() const { return mTitle; }
+
+ void setEnabled(bool enabled) { mEnabled = enabled; }
+ bool enabled() const { return mEnabled; }
+
+ void setSettings(const std::string &settings) { mSettings = settings; }
+ std::string settings() const { return mSettings; }
+
+private:
+ std::string mDriver;
+ std::string mTitle;
+ bool mEnabled;
+ std::string mSettings;
+};
+
class Configuration {
public:
Configuration();
@@ -157,6 +187,7 @@ public:
Configuration(const Dictionary &);
Configuration(const SnippetsCollection &);
Configuration(const Relation &);
+ Configuration(const FileDriver &);
Configuration(const Configuration &);
~Configuration();
void operator=(const Configuration &);
@@ -177,13 +208,16 @@ public:
TypeDictionary,
TypeCategoryColor,
TypeSnippet,
- TypeRelation
+ TypeRelation,
+ TypeFileDriver
};
ConfigurationType type() const;
std::vector<CategoryColor> categoryColor() const;
Dictionary dictionary() const;
SnippetsCollection snippets() const;
Relation relation() const;
+ FileDriver fileDriver() const;
+
private:
struct Private;
boost::scoped_ptr<Private> d;