summaryrefslogtreecommitdiff
path: root/plugins/XSoundNotify/src/SoundNotifyDataStorage.h
blob: 52d5c307a059b359dfdecbce7c172f435a3b64c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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