summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/EventNotifier.cpp2
-rw-r--r--Swift/Controllers/MainController.cpp2
-rw-r--r--Swift/Controllers/MainController.h2
-rw-r--r--Swift/Controllers/ProfileSettingsProvider.h2
-rw-r--r--Swift/Controllers/RosterGroupExpandinessPersister.h2
-rw-r--r--Swift/Controllers/Settings/DummySettingsProvider.h29
-rw-r--r--Swift/Controllers/Settings/SettingsProvider.h32
-rw-r--r--Swift/Controllers/SoundEventController.h2
-rw-r--r--Swift/Controllers/UnitTest/RosterControllerTest.cpp2
9 files changed, 68 insertions, 7 deletions
diff --git a/Swift/Controllers/EventNotifier.cpp b/Swift/Controllers/EventNotifier.cpp
index 7c8adaf..2db11c6 100644
--- a/Swift/Controllers/EventNotifier.cpp
+++ b/Swift/Controllers/EventNotifier.cpp
@@ -16,7 +16,7 @@
#include "Swift/Controllers/XMPPEvents/MessageEvent.h"
#include "Swift/Controllers/XMPPEvents/SubscriptionRequestEvent.h"
#include "Swift/Controllers/XMPPEvents/ErrorEvent.h"
-#include "Swiften/Settings/SettingsProvider.h"
+#include "Swift/Controllers/Settings/SettingsProvider.h"
namespace Swift {
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index ddf9848..41c5581 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -48,7 +48,7 @@
#include "Swiften/Elements/Presence.h"
#include "Swiften/Elements/VCardUpdate.h"
#include "Swiften/Queries/Responders/SoftwareVersionResponder.h"
-#include "Swiften/Settings/SettingsProvider.h"
+#include "Swift/Controllers/Settings/SettingsProvider.h"
#include "Swiften/Elements/DiscoInfo.h"
#include "Swiften/Queries/Responders/DiscoInfoResponder.h"
#include "Swiften/Disco/CapsInfoGenerator.h"
diff --git a/Swift/Controllers/MainController.h b/Swift/Controllers/MainController.h
index 72928d0..0887007 100644
--- a/Swift/Controllers/MainController.h
+++ b/Swift/Controllers/MainController.h
@@ -21,7 +21,7 @@
#include "Swiften/Elements/DiscoInfo.h"
#include "Swiften/Elements/ErrorPayload.h"
#include "Swiften/Elements/Presence.h"
-#include "Swiften/Settings/SettingsProvider.h"
+#include "Swift/Controllers/Settings/SettingsProvider.h"
#include "Swift/Controllers/ProfileSettingsProvider.h"
#include "Swiften/Elements/CapsInfo.h"
#include "Swift/Controllers/XMPPEvents/ErrorEvent.h"
diff --git a/Swift/Controllers/ProfileSettingsProvider.h b/Swift/Controllers/ProfileSettingsProvider.h
index 76d20e6..defe6ca 100644
--- a/Swift/Controllers/ProfileSettingsProvider.h
+++ b/Swift/Controllers/ProfileSettingsProvider.h
@@ -6,7 +6,7 @@
#pragma once
-#include "Swiften/Settings/SettingsProvider.h"
+#include "Swift/Controllers/Settings/SettingsProvider.h"
namespace Swift {
diff --git a/Swift/Controllers/RosterGroupExpandinessPersister.h b/Swift/Controllers/RosterGroupExpandinessPersister.h
index 545c9d0..0b88a48 100644
--- a/Swift/Controllers/RosterGroupExpandinessPersister.h
+++ b/Swift/Controllers/RosterGroupExpandinessPersister.h
@@ -8,7 +8,7 @@
#include <set>
#include "Swiften/Roster/Roster.h"
-#include "Swiften/Settings/SettingsProvider.h"
+#include "Swift/Controllers/Settings/SettingsProvider.h"
namespace Swift {
class RosterGroupExpandinessPersister {
diff --git a/Swift/Controllers/Settings/DummySettingsProvider.h b/Swift/Controllers/Settings/DummySettingsProvider.h
new file mode 100644
index 0000000..6c3dd52
--- /dev/null
+++ b/Swift/Controllers/Settings/DummySettingsProvider.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2010 Kevin Smith
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include "Swift/Controllers/Settings/SettingsProvider.h"
+
+namespace Swift {
+
+class DummySettingsProvider : public SettingsProvider {
+ public:
+ virtual ~DummySettingsProvider() {}
+ virtual String getStringSetting(const String&) {return "";}
+ virtual void storeString(const String &, const String &) {}
+ virtual bool getBoolSetting(const String &, bool ) {return true;}
+ virtual void storeBool(const String &, bool ) {}
+ virtual int getIntSetting(const String &, int ) {return 0;}
+ virtual void storeInt(const String &, int ) {}
+ virtual std::vector<String> getAvailableProfiles() {return std::vector<String>();}
+ virtual void createProfile(const String& ) {}
+};
+
+}
+
+
+
diff --git a/Swift/Controllers/Settings/SettingsProvider.h b/Swift/Controllers/Settings/SettingsProvider.h
new file mode 100644
index 0000000..7ddf789
--- /dev/null
+++ b/Swift/Controllers/Settings/SettingsProvider.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2010 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#ifndef SWIFTEN_SettingsProvider_H
+#define SWIFTEN_SettingsProvider_H
+
+#include "Swiften/Base/String.h"
+
+#include <vector>
+
+namespace Swift {
+
+class SettingsProvider {
+ public:
+ virtual ~SettingsProvider() {}
+ virtual String getStringSetting(const String &settingPath) = 0;
+ virtual void storeString(const String &settingPath, const String &settingValue) = 0;
+ virtual bool getBoolSetting(const String &settingPath, bool defaultValue) = 0;
+ virtual void storeBool(const String &settingPath, bool settingValue) = 0;
+ virtual int getIntSetting(const String &settingPath, int defaultValue) = 0;
+ virtual void storeInt(const String &settingPath, int settingValue) = 0;
+ virtual std::vector<String> getAvailableProfiles() = 0;
+ virtual void createProfile(const String& profile) = 0;
+};
+
+}
+#endif
+
+
diff --git a/Swift/Controllers/SoundEventController.h b/Swift/Controllers/SoundEventController.h
index 556a811..5e00fc6 100644
--- a/Swift/Controllers/SoundEventController.h
+++ b/Swift/Controllers/SoundEventController.h
@@ -9,7 +9,7 @@
#include <boost/shared_ptr.hpp>
#include "Swift/Controllers/XMPPEvents/StanzaEvent.h"
-#include "Swiften/Settings/SettingsProvider.h"
+#include "Swift/Controllers/Settings/SettingsProvider.h"
#include "Swift/Controllers/UIEvents/UIEvent.h"
namespace Swift {
diff --git a/Swift/Controllers/UnitTest/RosterControllerTest.cpp b/Swift/Controllers/UnitTest/RosterControllerTest.cpp
index f49ed64..82611f7 100644
--- a/Swift/Controllers/UnitTest/RosterControllerTest.cpp
+++ b/Swift/Controllers/UnitTest/RosterControllerTest.cpp
@@ -20,7 +20,7 @@
#include "Swiften/Roster/Roster.h"
#include "Swiften/Roster/GroupRosterItem.h"
#include "Swiften/Roster/ContactRosterItem.h"
-#include "Swiften/Settings/DummySettingsProvider.h"
+#include "Swift/Controllers/Settings/DummySettingsProvider.h"
#include "Swiften/Avatars/NullAvatarManager.h"
#include "Swift/Controllers/XMPPEvents/EventController.h"
#include "Swiften/Presence/PresenceOracle.h"