summaryrefslogtreecommitdiff
path: root/plugins/XSoundNotify/src/SoundNotifyDataStorage.h
blob: 68c7d996f96b7dcafb0e2b5613ba0cd17e377abf (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);
	std::tstring getContactId(HANDLE contact, const ModuleString &module, const ProtocolString &proto);
	void registerProtocols();

private:
	ProtocolTable		_protocolTable;
	ModuleConvertTable	_moduleTable;

	typedef boost::function<std::tstring (HANDLE contact, const ModuleString &module)> getContactIdFunc;
	typedef std::unordered_map<ProtocolString, getContactIdFunc> RegisteredProtocols;
	RegisteredProtocols	_registeredProtocols;
};

#endif