From 48540940b6c28bb4378abfeb500ec45a625b37b6 Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Tue, 15 May 2012 10:38:20 +0000 Subject: initial commit git-svn-id: http://svn.miranda-ng.org/main/trunk@2 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CryptoPP/GPGw/commonheaders.h | 79 +++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 plugins/CryptoPP/GPGw/commonheaders.h (limited to 'plugins/CryptoPP/GPGw/commonheaders.h') diff --git a/plugins/CryptoPP/GPGw/commonheaders.h b/plugins/CryptoPP/GPGw/commonheaders.h new file mode 100644 index 0000000000..4ae6e155a7 --- /dev/null +++ b/plugins/CryptoPP/GPGw/commonheaders.h @@ -0,0 +1,79 @@ +// Windows API + +#pragma once +#define _WIN32_IE 0x0500 +//#define WIN32_LEAN_AND_MEAN +//#pragma warning(disable: 4078) + +#include +//#include +#include +#include +#include +#include "..\version.h" + +// gnupg plugin +#include "resource.h" +#include "size.h" +#include "language.h" +#include "pipeexec.h" +#include "gpg.h" +#include "tools.h" +#include "passphrases.h" +#include "passdialog.h" +#include "userdialog.h" +#include "keys.h" + +// debug makro +#define debugout(mtext) MessageBox(NULL, (mtext), "GnuPG Plugin - Debug", MB_OK) + +// passphrase typ +struct passphrase +{ + char keyuserid[keyuseridsize]; + char passphrase[passphrasesize]; +}; + +extern struct passphrase *passphrases; +extern int passphrasecount; + +extern char temporarydirectory[fullfilenamesize]; +extern char logfile[fullfilenamesize]; + +extern char *txtbeginpgppublickeyblock; +extern char *txtendpgppublickeyblock; +extern char *txtbeginpgpmessage; +extern char *txtendpgpmessage; + +#ifdef _MSC_VER +//#pragma comment(linker,"/merge:.rdata=.text") +#pragma comment(linker,"/entry:dllmain") +#pragma comment(linker,"/nodefaultlib") +#pragma comment(linker,"/subsystem:windows") +#pragma optimize("gsy", on) +#endif + +#define MODULENAME "GnuPG" + +extern LPCSTR szModuleName; +extern LPCSTR szVersionStr; +extern HINSTANCE g_hInst; + +#define DLLEXPORT __declspec(dllexport) + +extern DLLEXPORT int __cdecl _gpg_init(void); +extern DLLEXPORT int __cdecl _gpg_done(void); +extern DLLEXPORT int __cdecl _gpg_open_keyrings(LPSTR,LPSTR); +extern DLLEXPORT int __cdecl _gpg_close_keyrings(void); +extern DLLEXPORT void __cdecl _gpg_set_log(LPCSTR); +extern DLLEXPORT void __cdecl _gpg_set_tmp(LPCSTR); +extern DLLEXPORT LPSTR __cdecl _gpg_get_error(void); +extern DLLEXPORT int __cdecl _gpg_size_keyid(void); +extern DLLEXPORT int __cdecl _gpg_select_keyid(HWND,LPSTR); +extern DLLEXPORT LPSTR __cdecl _gpg_encrypt(LPCSTR,LPCSTR); +extern DLLEXPORT LPSTR __cdecl _gpg_decrypt(LPCSTR); +extern DLLEXPORT LPSTR __cdecl _gpg_get_passphrases(); +extern DLLEXPORT void __cdecl _gpg_set_passphrases(LPCSTR); + +void __cdecl ErrorMessage(const char *alevel, const char *atext, const char *ahint); +void __cdecl LogMessage(const char *astart, const char *atext, const char *aend); -- cgit v1.2.3