summaryrefslogtreecommitdiff
path: root/plugins/XSoundNotify/SoundNotifyDataStorage.h
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-06-29 05:38:03 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-06-29 05:38:03 +0000
commitaf7e438cfe8ce85e1da234318ed1584e89d952cc (patch)
tree4cdb1379ef8d6c00389aa89cfb27a404ae2aba56 /plugins/XSoundNotify/SoundNotifyDataStorage.h
parent230623d50baff4e8bf13a8572e0b895bad7b7ed4 (diff)
only add some plugins and protocols, not adapted
See please maybe not all need us git-svn-id: http://svn.miranda-ng.org/main/trunk@678 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/XSoundNotify/SoundNotifyDataStorage.h')
-rw-r--r--plugins/XSoundNotify/SoundNotifyDataStorage.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/plugins/XSoundNotify/SoundNotifyDataStorage.h b/plugins/XSoundNotify/SoundNotifyDataStorage.h
new file mode 100644
index 0000000000..7dbf03c494
--- /dev/null
+++ b/plugins/XSoundNotify/SoundNotifyDataStorage.h
@@ -0,0 +1,34 @@
+#ifndef _XSN_DATA_STORAGE
+#define _XSN_DATA_STORAGE
+
+#include "SoundNotifyData.h"
+#include <newpluginapi.h>
+#include <boost/function.hpp>
+
+class SoundNotifyDataStorage
+{
+public:
+ SoundNotifyDataStorage(PLUGINLINK * pl);
+
+ 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:
+ PLUGINLINK * pluginLink;
+
+ 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