summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Client/FileStorages.h17
-rw-r--r--Swiften/Client/MemoryStorages.h4
-rw-r--r--Swiften/Client/Storages.h4
-rw-r--r--Swiften/JID/JID.h5
4 files changed, 26 insertions, 4 deletions
diff --git a/Swiften/Client/FileStorages.h b/Swiften/Client/FileStorages.h
index f8c3162..451105f 100644
--- a/Swiften/Client/FileStorages.h
+++ b/Swiften/Client/FileStorages.h
@@ -16,8 +16,25 @@ namespace Swift {
class CapsFileStorage;
class JID;
+ /**
+ * A storages implementation that stores all controller data on disk.
+ */
class FileStorages : public Storages {
public:
+ /**
+ * Creates the storages interface.
+ *
+ * All data will be stored relative to a base directory, and
+ * for some controllers, in a subdirectory for the given profile.
+ * The data is stored in the following places:
+ * - Avatars: <basedir>/avatars
+ * - VCards: <basedir>/<profile>/vcards
+ * - Entity capabilities: <basedir>/caps
+ *
+ * \param baseDir the base dir to store data relative to
+ * \param jid the subdir in which profile-specific data will be stored.
+ * The bare JID will be used as the subdir name.
+ */
FileStorages(const boost::filesystem::path& baseDir, const JID& jid);
~FileStorages();
diff --git a/Swiften/Client/MemoryStorages.h b/Swiften/Client/MemoryStorages.h
index 13f41d1..67025cd 100644
--- a/Swiften/Client/MemoryStorages.h
+++ b/Swiften/Client/MemoryStorages.h
@@ -11,6 +11,10 @@
namespace Swift {
class VCardMemoryStorage;
+ /**
+ * An implementation of Storages for storing all
+ * controller data in memory.
+ */
class MemoryStorages : public Storages {
public:
MemoryStorages();
diff --git a/Swiften/Client/Storages.h b/Swiften/Client/Storages.h
index 6f286ca..e62f0a9 100644
--- a/Swiften/Client/Storages.h
+++ b/Swiften/Client/Storages.h
@@ -11,6 +11,10 @@ namespace Swift {
class AvatarStorage;
class CapsStorage;
+ /**
+ * An interface to hold storage classes for different
+ * controllers.
+ */
class Storages {
public:
virtual ~Storages() {}
diff --git a/Swiften/JID/JID.h b/Swiften/JID/JID.h
index cd047c7..0f965f5 100644
--- a/Swiften/JID/JID.h
+++ b/Swiften/JID/JID.h
@@ -70,11 +70,8 @@ namespace Swift {
return a.compare(b, Swift::JID::WithResource) != 0;
}
- protected:
- void nameprepAndSetComponents(const String& node, const String& domain,
- const String& resource);
-
private:
+ void nameprepAndSetComponents(const String& node, const String& domain, const String& resource);
void initializeFromString(const String&);
private: