summaryrefslogtreecommitdiff
path: root/plugins/Non-IM Contact/src/stdafx.h
blob: ce265a31bd13835a79979ec9aa2ae69aece3479f (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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
//=====================================================
//	Includes (yea why not include lots of stuff :p )
//=====================================================
#ifndef COMMONHEADERS
#define COMMONHEADERS

#include <windows.h>
#include <commctrl.h>
#include <winsock.h>
#include <shlobj.h>

#include <malloc.h>
#include <stdio.h>
#include <time.h>
#include <stddef.h>
#include <process.h>
#include <string.h>

struct DLGTEMPLATEEX
{
    WORD dlgVer;
    WORD signature;
    DWORD helpID;
    DWORD exStyle;
    DWORD style;
    WORD cDlgItems;
    short x;
    short y;
    short cx;
    short cy;
};

#include <newpluginapi.h>
#include <m_clist.h>
#include <m_skin.h>
#include <m_langpack.h>
#include <m_database.h>
#include <m_system.h>
#include <m_icolib.h>
#include <m_protocols.h>
#include <m_userinfo.h>
#include <m_options.h>
#include <m_protosvc.h>
#include <m_utils.h>
#include <m_ignore.h>
#include <m_netlib.h>
#include <m_string.h>
#include <win2k.h>

#include "resource.h"

//=======================================================
//	Definitions
//=======================================================
#define MODNAME			"NIM_Contact"
#define modFullname		"Non-IM Contact"
#define MAXLINES	10000
#define MAX_STRING_LENGTH	10000
#define LINE_LENGTH 10000
#define msg(a,b)	MessageBoxA(0,a,b,MB_OK);
#define TIMER	(db_get_w(NULL, MODNAME, "Timer", 1) * 1000)
/* ERROR VALUES */
#define ERROR_NO_LINE_AFTER_VAR_F -1
#define ERROR_LINE_NOT_READ -2
#define ERROR_NO_FILE -3

//=======================================================
//	Defines
//=======================================================
//General
extern HINSTANCE g_hInst;
extern int LCStatus;
extern IconItem icoList[];

//Services.c
INT_PTR GetLCCaps(WPARAM wParam,LPARAM lParam);
INT_PTR GetLCName(WPARAM wParam,LPARAM lParam);
INT_PTR LoadLCIcon(WPARAM wParam,LPARAM lParam); 
int     SetLCStatus(WPARAM wParam,LPARAM lParam);
INT_PTR GetLCStatus(WPARAM wParam,LPARAM lParam);

// dialog.c
INT_PTR addContact(WPARAM wParam,LPARAM lParam) ;
INT_PTR editContact(WPARAM wParam,LPARAM lParam);
INT_PTR CALLBACK DlgProcNimcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR testStringReplacer(WPARAM wParam, LPARAM lParam);
INT_PTR LoadFilesDlg(WPARAM wParam, LPARAM lParam);


// files.c
int Openfile(char* outputFile, int saveOpen);
INT_PTR CALLBACK DlgProcFiles(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
int savehtml(char* outFile);
char* getMimDir(char* file);
INT_PTR exportContacts(WPARAM wParam,LPARAM lParam) ;

// contactinfo.c
INT_PTR CALLBACK DlgProcContactInfo(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
void ExportContact(MCONTACT hContact);
INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam);

// stringreplacer.c
int stringReplacer(const char *oldString, CMStringA &szNewString, MCONTACT hContact);
void replaceAllStrings(MCONTACT hContact);
void WriteSetting(MCONTACT hContact, char* module1, char* setting1 , char* module12, char* setting2);

//timer.c
void CALLBACK timerProc();
int startTimer(int interval);
int killTimer();

// http.c
void NetlibInit();
int InternetDownloadFile (CHAR *szUrl);
extern char *szInfo;
extern char *szData;
extern HNETLIBUSER hNetlibUser;

#endif

#pragma comment(lib,"comctl32.lib")