diff options
Diffstat (limited to 'plugins/XSoundNotify/src/SoundNotifyDataStorage.h')
-rw-r--r-- | plugins/XSoundNotify/src/SoundNotifyDataStorage.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/plugins/XSoundNotify/src/SoundNotifyDataStorage.h b/plugins/XSoundNotify/src/SoundNotifyDataStorage.h new file mode 100644 index 0000000000..52d5c307a0 --- /dev/null +++ b/plugins/XSoundNotify/src/SoundNotifyDataStorage.h @@ -0,0 +1,28 @@ +#ifndef _XSN_DATA_STORAGE
+#define _XSN_DATA_STORAGE
+
+class SoundNotifyDataStorage
+{
+public:
+ SoundNotifyDataStorage();
+
+ void init();
+ void commit();
+
+ ProtocolTable & getData();
+
+protected:
+ void addContact(HANDLE contact);
+ xsn_string getContactId(HANDLE contact, const ModuleString & module, const ProtocolString & proto);
+ void registerProtocols();
+
+private:
+ ProtocolTable _protocolTable;
+ ModuleConvertTable _moduleTable;
+
+ typedef boost::function<xsn_string (HANDLE contact, const ModuleString & module)> getContactIdFunc;
+ typedef std::unordered_map<ProtocolString, getContactIdFunc> RegisteredProtocols;
+ RegisteredProtocols _registeredProtocols;
+};
+
+#endif
|