summaryrefslogtreecommitdiff
path: root/plugins/MirFox/src/MirfoxMiranda.h
blob: 0d78e0cfc0d3c749d2cb8e18598cc706e803fc2e (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef _MIRFOXMIRANDA_INC
#define _MIRFOXMIRANDA_INC

#include "MirfoxData.h"
#include "MirandaUtils.h"



class CMirfoxMiranda
{

public:
	CMirfoxMiranda();
	~CMirfoxMiranda();


	//functions needed by MirandaInterface and Miranda Options

	MirfoxData& getMirfoxData();



	bool onMirandaPluginInfoExCheck(DWORD actualMirandaVersion);

	int onMirandaInterfaceLoad();

	int onMirandaInterfaceUnload();

	//csm maintanance thread function (threadArg - pointer to this CMirfoxMiranda class instance)
	static void csmThread(void* threadArg);

	//message queue thread function (threadArg - pointer to this CMirfoxMiranda class instance)
	static void msgQueueThread(void* threadArg);



private:

	void initializeSharedMemory(MirfoxData& mirfoxData);
	void initializeSharedMemoryData(MirfoxData& mirfoxData, SharedMemoryUtils* sharedMemoryUtils);
	void commitSharedMemory();
	void unloadSharedMemory();

	void initializeMessageQueue(MirfoxData& mirfoxData);
	void unloadMessageQueue(uint16_t unloadedMQProcessId);



	MirfoxData mirfoxData;

	SharedMemoryUtils* sharedMemoryUtils;
	MirandaUtils* mirandaUtils;

	MFLogger* logger;

};



#endif //#IFNDEF _MIRFOXMIRANDA_INC