summaryrefslogtreecommitdiff
path: root/plugins/SecureIM/src/commonheaders.h
blob: f416e4633907f4c8af7b6213d194ca4fee843ff0 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#define WIN32_LEAN_AND_MEAN
#define NETLIB_LOG

#define _CRT_SECURE_NO_WARNINGS
#define mir_itoa _itoa
#define mir_unlink _unlink

#ifndef M_SIM_COMMONHEADERS_H
#define M_SIM_COMMONHEADERS_H

#include <windows.h>
#include <winsock2.h>
#include <commdlg.h>
#include <commctrl.h>
#include <shlwapi.h>
#include <Uxtheme.h>

#include <malloc.h>
#include <process.h>
#include <time.h>

#include <win2k.h>
#include <newpluginapi.h>
#include <m_database.h>
#include <m_protomod.h>
#include <m_langpack.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_popup.h>
#include <m_genmenu.h>
#include <m_icolib.h>
#include <m_message.h>
#include <m_netlib.h>
#include <m_extraicons.h>

#include <m_metacontacts.h>
#include <m_folders.h>
 
#include "secureim.h"
#include "version.h"
#include "resource.h"
#include "..\SecureIM_icons\src\resource.h"
#include "language.h"
#include "mmi.h"
#include "crypt.h"
#include "gettime.h"
#include "language.h"
#include "options.h"
#include "popupoptions.h"
#include "loadicons.h"
#include "cryptopp.h"
#include "loadlib.h"
#include "images.h"
#include "dbevent.h"
#include "splitmsg.h"
#include "svcs_proto.h"
#include "svcs_clist.h"
#include "svcs_menu.h"
#include "svcs_srmm.h"
#include "svcs_rsa.h"

#define MODULENAME "SecureIM"

extern char TEMP[MAX_PATH];
extern int  TEMP_SIZE;

// shared vars
extern HINSTANCE g_hInst, g_hIconInst;

#define PREF_METANODB	0x2000	//!< Flag to indicate message should not be added to db by filter when sending
#define PREF_SIMNOMETA	0x4000	//!< Flag to indicate message should not be inspected by filter on metacontact

extern HANDLE g_hEvent[2], g_hCLIcon, g_hFolders;
extern HGENMENU g_hMenu[15];
extern int iService, iHook;
extern HICON g_hICO[ICO_CNT], g_hIEC[1+IEC_CNT*MODE_CNT], g_hPOP[POP_CNT];
extern HANDLE g_IEC[1+IEC_CNT*MODE_CNT];
extern int iBmpDepth;
extern BOOL bPopupExists;
extern BOOL bPGPloaded, bPGPkeyrings, bUseKeyrings, bPGPprivkey;
extern BOOL bGPGloaded, bGPGkeyrings, bSavePass;
extern BOOL bSFT, bSOM, bASI, bMCD, bSCM, bDGP, bAIP, bNOL, bAAK, bMCM;
extern BYTE bPGP, bGPG;
extern mir_cs localQueueMutex;

__forceinline int SendBroadcast(MCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
{
	return ProtoBroadcastAck( GetContactProto(hContact), hContact, type, result, hProcess, lParam);
}

extern HANDLE hNetlibUser;
void InitNetlib();
void DeinitNetlib();
int Sent_NetLog(const char *,...);

void GetFlags();
void SetFlags();

int msgbox(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType);
void CopyToClipboard(HWND hwnd,LPSTR msg);
#define msgbox0(a,b,c,d) msgbox(a,b,c,d)
#define msgbox1(a,b,c,d) msgbox(a,b,c,d)

#endif

// EOF