From 524c4c96a47b4dde094cfbcdcf07434c9108e392 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 15 Mar 2013 06:33:59 +0000 Subject: added precompiled header added version info git-svn-id: http://svn.miranda-ng.org/main/trunk@4035 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/YAMN/YAMN_10.vcxproj | 53 ++++++++++++---- plugins/YAMN/YAMN_10.vcxproj.filters | 44 ++++++++------ plugins/YAMN/YAMN_11.vcxproj | 53 ++++++++++++---- plugins/YAMN/YAMN_11.vcxproj.filters | 44 ++++++++------ plugins/YAMN/res/Version.rc | 38 ++++++++++++ plugins/YAMN/res/YAMN.rc | 4 -- plugins/YAMN/res/yamn_ver.rc | 76 ----------------------- plugins/YAMN/src/YAMNopts.cpp | 2 - plugins/YAMN/src/account.cpp | 4 -- plugins/YAMN/src/browser/badconnect.cpp | 3 +- plugins/YAMN/src/browser/browser.h | 39 ++++++++++++ plugins/YAMN/src/browser/m_browser.h | 42 ------------- plugins/YAMN/src/browser/mailbrowser.cpp | 7 --- plugins/YAMN/src/debug.cpp | 13 +--- plugins/YAMN/src/debug.h | 18 +----- plugins/YAMN/src/mails/decode.cpp | 2 +- plugins/YAMN/src/mails/decode.h | 23 +++++++ plugins/YAMN/src/mails/m_decode.h | 25 -------- plugins/YAMN/src/mails/mails.cpp | 1 - plugins/YAMN/src/mails/mime.cpp | 15 ----- plugins/YAMN/src/main.cpp | 39 ++++++------ plugins/YAMN/src/main.h | 14 ----- plugins/YAMN/src/proto/netlib.cpp | 5 -- plugins/YAMN/src/proto/netlib.h | 4 -- plugins/YAMN/src/proto/pop3/pop3.cpp | 5 -- plugins/YAMN/src/proto/pop3/pop3.h | 3 - plugins/YAMN/src/proto/pop3/pop3comm.cpp | 7 +-- plugins/YAMN/src/proto/pop3/pop3comm.h | 14 ----- plugins/YAMN/src/proto/pop3/pop3opt.cpp | 3 - plugins/YAMN/src/services.cpp | 4 -- plugins/YAMN/src/stdafx.cpp | 18 ++++++ plugins/YAMN/src/version.h | 20 ++++++- plugins/YAMN/src/yamn.cpp | 6 -- plugins/YAMN/src/yamn.h | 100 +++++++++++++++---------------- 34 files changed, 344 insertions(+), 404 deletions(-) create mode 100644 plugins/YAMN/res/Version.rc delete mode 100644 plugins/YAMN/res/yamn_ver.rc delete mode 100644 plugins/YAMN/src/YAMNopts.cpp create mode 100644 plugins/YAMN/src/browser/browser.h delete mode 100644 plugins/YAMN/src/browser/m_browser.h create mode 100644 plugins/YAMN/src/mails/decode.h delete mode 100644 plugins/YAMN/src/mails/m_decode.h create mode 100644 plugins/YAMN/src/stdafx.cpp diff --git a/plugins/YAMN/YAMN_10.vcxproj b/plugins/YAMN/YAMN_10.vcxproj index a201f6041f..d8e6f08b3d 100644 --- a/plugins/YAMN/YAMN_10.vcxproj +++ b/plugins/YAMN/YAMN_10.vcxproj @@ -79,6 +79,8 @@ Level3 EditAndContinue 4996;%(DisableSpecificWarnings) + Use + yamn.h _DEBUG;%(PreprocessorDefinitions) @@ -105,6 +107,8 @@ true Level3 4996;%(DisableSpecificWarnings) + Use + yamn.h NDEBUG;%(PreprocessorDefinitions) @@ -134,6 +138,8 @@ Level3 4996;%(DisableSpecificWarnings) Size + Use + yamn.h NDEBUG;%(PreprocessorDefinitions) @@ -162,6 +168,8 @@ MultiThreadedDebugDLL Level3 4996;%(DisableSpecificWarnings) + Use + yamn.h _DEBUG;%(PreprocessorDefinitions) @@ -184,19 +192,44 @@ + + Create + - - - - - - - - - + + ..\yamn.h + + + ..\yamn.h + + + ..\yamn.h + + + ..\yamn.h + + + ..\yamn.h + + + ..\yamn.h + + + ..\..\yamn.h + + + ..\..\yamn.h + + + ..\..\yamn.h + + + + + @@ -207,8 +240,8 @@ + - diff --git a/plugins/YAMN/YAMN_10.vcxproj.filters b/plugins/YAMN/YAMN_10.vcxproj.filters index a9629779da..648d4e558f 100644 --- a/plugins/YAMN/YAMN_10.vcxproj.filters +++ b/plugins/YAMN/YAMN_10.vcxproj.filters @@ -5,15 +5,6 @@ {30eb0c8d-5383-47ff-8a05-4b9793d26d50} cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - {6b01a00c-f1f9-4958-b89a-2721d5bdd229} - - - {4743640f-ca6b-4518-8ead-525bea367ec0} - - - {0189ff00-aae9-40fd-847b-a81dca9496bd} - {daef8d66-0947-4a6c-ad55-4e1b2bf26d86} ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe @@ -48,31 +39,34 @@ Source Files - Source Files\Mail browser, dialogs + Source Files - Source Files\Mail browser, dialogs + Source Files - Source Files\Mails + Source Files - Source Files\Mails + Source Files - Source Files\Mails + Source Files - Source Files\POP3 plugin + Source Files - Source Files\POP3 plugin + Source Files - Source Files\POP3 plugin + Source Files - Source Files\POP3 plugin + Source Files + + + Source Files @@ -100,12 +94,24 @@ Header Files + + Header Files + + + Header Files + + + Header Files + + + Header Files + Resource Files - + Resource Files diff --git a/plugins/YAMN/YAMN_11.vcxproj b/plugins/YAMN/YAMN_11.vcxproj index 4c3c686562..32a896c1d6 100644 --- a/plugins/YAMN/YAMN_11.vcxproj +++ b/plugins/YAMN/YAMN_11.vcxproj @@ -83,6 +83,8 @@ Level3 EditAndContinue 4996;%(DisableSpecificWarnings) + Use + yamn.h _DEBUG;%(PreprocessorDefinitions) @@ -109,6 +111,8 @@ true Level3 4996;%(DisableSpecificWarnings) + Use + yamn.h NDEBUG;%(PreprocessorDefinitions) @@ -138,6 +142,8 @@ Level3 4996;%(DisableSpecificWarnings) Size + Use + yamn.h NDEBUG;%(PreprocessorDefinitions) @@ -166,6 +172,8 @@ MultiThreadedDebugDLL Level3 4996;%(DisableSpecificWarnings) + Use + yamn.h _DEBUG;%(PreprocessorDefinitions) @@ -188,19 +196,44 @@ + + Create + - - - - - - - - - + + ..\yamn.h + + + ..\yamn.h + + + ..\yamn.h + + + ..\yamn.h + + + ..\yamn.h + + + ..\yamn.h + + + ..\..\yamn.h + + + ..\..\yamn.h + + + ..\..\yamn.h + + + + + @@ -211,8 +244,8 @@ + - diff --git a/plugins/YAMN/YAMN_11.vcxproj.filters b/plugins/YAMN/YAMN_11.vcxproj.filters index a9629779da..648d4e558f 100644 --- a/plugins/YAMN/YAMN_11.vcxproj.filters +++ b/plugins/YAMN/YAMN_11.vcxproj.filters @@ -5,15 +5,6 @@ {30eb0c8d-5383-47ff-8a05-4b9793d26d50} cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - {6b01a00c-f1f9-4958-b89a-2721d5bdd229} - - - {4743640f-ca6b-4518-8ead-525bea367ec0} - - - {0189ff00-aae9-40fd-847b-a81dca9496bd} - {daef8d66-0947-4a6c-ad55-4e1b2bf26d86} ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe @@ -48,31 +39,34 @@ Source Files - Source Files\Mail browser, dialogs + Source Files - Source Files\Mail browser, dialogs + Source Files - Source Files\Mails + Source Files - Source Files\Mails + Source Files - Source Files\Mails + Source Files - Source Files\POP3 plugin + Source Files - Source Files\POP3 plugin + Source Files - Source Files\POP3 plugin + Source Files - Source Files\POP3 plugin + Source Files + + + Source Files @@ -100,12 +94,24 @@ Header Files + + Header Files + + + Header Files + + + Header Files + + + Header Files + Resource Files - + Resource Files diff --git a/plugins/YAMN/res/Version.rc b/plugins/YAMN/res/Version.rc new file mode 100644 index 0000000000..5bfbab4754 --- /dev/null +++ b/plugins/YAMN/res/Version.rc @@ -0,0 +1,38 @@ +// Microsoft Visual C++ generated resource script. +// +#ifdef APSTUDIO_INVOKED +#error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + +#include "afxres.h" +#include "..\src\version.h" + +VS_VERSION_INFO VERSIONINFO + FILEVERSION __FILEVERSION_STRING + PRODUCTVERSION __FILEVERSION_STRING + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x0L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "FileDescription", __DESCRIPTION + VALUE "InternalName", __PLUGIN_NAME + VALUE "LegalCopyright", __COPYRIGHT + VALUE "OriginalFilename", __FILENAME + VALUE "ProductName", __PLUGIN_NAME + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END diff --git a/plugins/YAMN/res/YAMN.rc b/plugins/YAMN/res/YAMN.rc index 70f5976d15..e9b10910f8 100644 --- a/plugins/YAMN/res/YAMN.rc +++ b/plugins/YAMN/res/YAMN.rc @@ -61,10 +61,6 @@ BEGIN BOTTOMMARGIN, 105 END - IDD_DLGSHOWMESSAGE, DIALOG - BEGIN - END - IDD_DLGBADCONNECT, DIALOG BEGIN LEFTMARGIN, 7 diff --git a/plugins/YAMN/res/yamn_ver.rc b/plugins/YAMN/res/yamn_ver.rc deleted file mode 100644 index 84d27568b6..0000000000 --- a/plugins/YAMN/res/yamn_ver.rc +++ /dev/null @@ -1,76 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// - -#include "..\src\version.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Neutral resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) -#ifdef _WIN32 -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,1,2,5 - PRODUCTVERSION 0,1,2,5 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "Comments", "Yet Another Mail Notifier" - VALUE "FileDescription", "Yet Another Mail Notifier" - VALUE "FileVersion", YAMN_VERSION_C - VALUE "InternalName", "YAMN" - VALUE "LegalCopyright", "Copyright © 2007" - VALUE "OriginalFilename", "YAMN.dll" - VALUE "ProductName", "YAMN tweety" - VALUE "ProductVersion", YAMN_VERSION_C - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END - -#endif // Neutral resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED diff --git a/plugins/YAMN/src/YAMNopts.cpp b/plugins/YAMN/src/YAMNopts.cpp deleted file mode 100644 index 99a8091366..0000000000 --- a/plugins/YAMN/src/YAMNopts.cpp +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/plugins/YAMN/src/account.cpp b/plugins/YAMN/src/account.cpp index 76b653a4b7..0a82e05305 100644 --- a/plugins/YAMN/src/account.cpp +++ b/plugins/YAMN/src/account.cpp @@ -7,10 +7,6 @@ */ #include "yamn.h" -#include "m_mails.h" -#if defined(DEBUG_FILEREAD) || defined(DEBUG_FILEREADMESSAGES) || defined(DEBUG_SYNCHRO) - #include -#endif //Account status CS //When we check some account, thread should change status of account to idle, connecting etc. diff --git a/plugins/YAMN/src/browser/badconnect.cpp b/plugins/YAMN/src/browser/badconnect.cpp index faa9b9ba07..2c0f9b65e5 100644 --- a/plugins/YAMN/src/browser/badconnect.cpp +++ b/plugins/YAMN/src/browser/badconnect.cpp @@ -4,8 +4,7 @@ * (c) majvan 2002,2004 */ -#include "../yamn.h" -#include "../main.h" +#include "..\yamn.h" #define BADCONNECTTITLE LPGEN("%s - connection error") #define BADCONNECTMSG LPGEN("An error occured. Error code: %d")//is in use? diff --git a/plugins/YAMN/src/browser/browser.h b/plugins/YAMN/src/browser/browser.h new file mode 100644 index 0000000000..18ec0f385e --- /dev/null +++ b/plugins/YAMN/src/browser/browser.h @@ -0,0 +1,39 @@ +#ifndef __MAILBROWSER_H +#define __MAILBROWSER_H + +typedef struct MailBrowserWinParam +{ +#define YAMN_MAILBROWSERVERSION 1 + HANDLE ThreadRunningEV; + HACCOUNT account; + DWORD nflags; //flags YAMN_ACC_??? when new mails + DWORD nnflags; //flags YAMN_ACC_??? when no new mails + void *Param; +} YAMN_MAILBROWSERPARAM,*PYAMN_MAILBROWSERPARAM; + +typedef struct MailShowMsgWinParam +{ + HANDLE ThreadRunningEV; + HACCOUNT account; + HYAMNMAIL mail; +} YAMN_MAILSHOWPARAM, *PYAMN_MAILSHOWPARAM; + +typedef struct NoNewMailParam +{ +#define YAMN_NONEWMAILVERSION 1 + HANDLE ThreadRunningEV; + HACCOUNT account; + DWORD flags; + void *Param; +} YAMN_NONEWMAILPARAM,*PYAMN_NONEWMAILPARAM; + +typedef struct BadConnectionParam +{ +#define YAMN_BADCONNECTIONVERSION 1 + HANDLE ThreadRunningEV; + HACCOUNT account; + UINT_PTR errcode; + void *Param; +} YAMN_BADCONNECTIONPARAM,*PYAMN_BADCONNECTIONPARAM; + +#endif diff --git a/plugins/YAMN/src/browser/m_browser.h b/plugins/YAMN/src/browser/m_browser.h deleted file mode 100644 index 8b05e3d84a..0000000000 --- a/plugins/YAMN/src/browser/m_browser.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __MAILBROWSER_H -#define __MAILBROWSER_H - -#include "m_account.h" -#include "../debug.h" - -typedef struct MailBrowserWinParam -{ -#define YAMN_MAILBROWSERVERSION 1 - HANDLE ThreadRunningEV; - HACCOUNT account; - DWORD nflags; //flags YAMN_ACC_??? when new mails - DWORD nnflags; //flags YAMN_ACC_??? when no new mails - void *Param; -} YAMN_MAILBROWSERPARAM,*PYAMN_MAILBROWSERPARAM; - -typedef struct MailShowMsgWinParam -{ - HANDLE ThreadRunningEV; - HACCOUNT account; - HYAMNMAIL mail; -} YAMN_MAILSHOWPARAM, *PYAMN_MAILSHOWPARAM; - -typedef struct NoNewMailParam -{ -#define YAMN_NONEWMAILVERSION 1 - HANDLE ThreadRunningEV; - HACCOUNT account; - DWORD flags; - void *Param; -} YAMN_NONEWMAILPARAM,*PYAMN_NONEWMAILPARAM; - -typedef struct BadConnectionParam -{ -#define YAMN_BADCONNECTIONVERSION 1 - HANDLE ThreadRunningEV; - HACCOUNT account; - UINT_PTR errcode; - void *Param; -} YAMN_BADCONNECTIONPARAM,*PYAMN_BADCONNECTIONPARAM; - -#endif diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp index 0a79b2be62..09afbb815d 100644 --- a/plugins/YAMN/src/browser/mailbrowser.cpp +++ b/plugins/YAMN/src/browser/mailbrowser.cpp @@ -9,15 +9,8 @@ * When you got errors, try to comment the #define and compile, then * put it back to uncommented and compile again :) */ -#ifndef _WIN32_IE - #define _WIN32_IE 0x0400 -#endif -#ifndef _WIN32_WINNT - #define _WIN32_WINNT 0x0501 -#endif #include "../yamn.h" -#include "../main.h" #define TIMER_FLASHING 0x09061979 #define MAILBROWSER_MINXSIZE 200 //min size of mail browser window diff --git a/plugins/YAMN/src/debug.cpp b/plugins/YAMN/src/debug.cpp index 9b9793a965..1f19975586 100644 --- a/plugins/YAMN/src/debug.cpp +++ b/plugins/YAMN/src/debug.cpp @@ -8,17 +8,8 @@ */ #include "yamn.h" -#include "debug.h" -#ifdef YAMN_DEBUG -#include "version.h" - -#if defined (WIN9X) - #define YAMN_VER "YAMN " YAMN_VERSION_C " (Win9x)" -#elif defined(WIN2IN1) - #define YAMN_VER "YAMN " YAMN_VERSION_C " (2in1)" -#else - #define YAMN_VER "YAMN " YAMN_VERSION_C " (WinNT)" -#endif + +#ifdef _DEBUG //-------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------- diff --git a/plugins/YAMN/src/debug.h b/plugins/YAMN/src/debug.h index 3bde9ddc81..9581117503 100644 --- a/plugins/YAMN/src/debug.h +++ b/plugins/YAMN/src/debug.h @@ -1,23 +1,7 @@ #ifndef __DEBUG_H #define __DEBUG_H -// #define YAMN_DEBUG - -//#define YAMN_VER_BETA -//#define YAMN_VER_BETA_CRASHONLY - -#ifdef YAMN_DEBUG - -//#pragma comment(lib, "th32.lib") - -#if !defined(_WIN32_WINNT) -#define _WIN32_WINNT 0x0501 // WinXP only -#endif -#define VC_EXTRALEAN -#include -#include -#include -#include +#ifdef _DEBUG //#define DEBUG_SYNCHRO //debug synchro to a file //#define DEBUG_COMM //debug communiation to a file diff --git a/plugins/YAMN/src/mails/decode.cpp b/plugins/YAMN/src/mails/decode.cpp index a0d96dbfb0..f87658547e 100644 --- a/plugins/YAMN/src/mails/decode.cpp +++ b/plugins/YAMN/src/mails/decode.cpp @@ -151,7 +151,7 @@ struct _tcptable CodePageNamesAll[]= { "MAC-", "CR",0,10082} }; -int CPLENALL = (sizeof(CodePageNamesAll)/sizeof(CodePageNamesAll[0])); +int CPLENALL = SIZEOF(CodePageNamesAll); struct _tcptable *CodePageNamesSupp; int CPLENSUPP = 1; diff --git a/plugins/YAMN/src/mails/decode.h b/plugins/YAMN/src/mails/decode.h new file mode 100644 index 0000000000..432efafb0b --- /dev/null +++ b/plugins/YAMN/src/mails/decode.h @@ -0,0 +1,23 @@ +#ifndef __DECODE_H +#define __DECODE_H + +#define DOTLINE(s) ((((s)[-2]=='\r') || ((s)[-2]=='\n')) && ((s)[-1]=='.') && (((s)[0]=='\r') || ((s)[0]=='\n') || ((s)[0]=='\0'))) // be careful, it's different to ESR's pop3.c ;-) +#define ENDLINE(s) (((s)[0]=='\r') || ((s)[0]=='\n')) //endline +#define WS(s) (((s)[0]==' ') || ((s)[0]=='\t')) //whitespace +#define ENDLINEWS(s) ((((s)[0]=='\r') || ((s)[0]=='\n')) && (((((s)[1]=='\r') || ((s)[1]=='\n')) && (((s)[2]==' ') || ((s)[2]=='\t'))) || (((s)[1]==' ') || ((s)[1]=='\t')))) //endline+whitespace: enters(CR or LF and their combinations) followed by space or tab +#define EOS(s) ((s)[0]==0) //end of string (stream) + +#define CODES(s) ((s[0]=='=') && (s[1]=='?')) //start of coded string +#define CODEE(s) ((s[0]=='?') && (s[1]=='=')) //end of coded string +#define CODED(s) (s[0]=='?') //code delimiter + +#define MIME_PLAIN 1 +#define MIME_MAIL 2 + +struct cptable +{ + char *name; + unsigned int ID; +}; + +#endif diff --git a/plugins/YAMN/src/mails/m_decode.h b/plugins/YAMN/src/mails/m_decode.h deleted file mode 100644 index e6d2b52fae..0000000000 --- a/plugins/YAMN/src/mails/m_decode.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __DECODE_H -#define __DECODE_H - -#include "../debug.h" - -#define DOTLINE(s) ((((s)[-2]=='\r') || ((s)[-2]=='\n')) && ((s)[-1]=='.') && (((s)[0]=='\r') || ((s)[0]=='\n') || ((s)[0]=='\0'))) // be careful, it's different to ESR's pop3.c ;-) -#define ENDLINE(s) (((s)[0]=='\r') || ((s)[0]=='\n')) //endline -#define WS(s) (((s)[0]==' ') || ((s)[0]=='\t')) //whitespace -#define ENDLINEWS(s) ((((s)[0]=='\r') || ((s)[0]=='\n')) && (((((s)[1]=='\r') || ((s)[1]=='\n')) && (((s)[2]==' ') || ((s)[2]=='\t'))) || (((s)[1]==' ') || ((s)[1]=='\t')))) //endline+whitespace: enters(CR or LF and their combinations) followed by space or tab -#define EOS(s) ((s)[0]==0) //end of string (stream) - -#define CODES(s) ((s[0]=='=') && (s[1]=='?')) //start of coded string -#define CODEE(s) ((s[0]=='?') && (s[1]=='=')) //end of coded string -#define CODED(s) (s[0]=='?') //code delimiter - -#define MIME_PLAIN 1 -#define MIME_MAIL 2 - -struct cptable -{ - char *name; - unsigned int ID; -}; - -#endif diff --git a/plugins/YAMN/src/mails/mails.cpp b/plugins/YAMN/src/mails/mails.cpp index 758a00dbd5..716d1905f0 100644 --- a/plugins/YAMN/src/mails/mails.cpp +++ b/plugins/YAMN/src/mails/mails.cpp @@ -4,7 +4,6 @@ * (c) majvan 2002-2004 */ -#pragma warning( disable : 4290 ) #include "../yamn.h" //-------------------------------------------------------------------------------------------------- diff --git a/plugins/YAMN/src/mails/mime.cpp b/plugins/YAMN/src/mails/mime.cpp index 33b7735b82..4e29884b14 100644 --- a/plugins/YAMN/src/mails/mime.cpp +++ b/plugins/YAMN/src/mails/mime.cpp @@ -4,23 +4,8 @@ * (c) majvan 2002-2004 */ -#pragma warning( disable : 4290 ) #include "../yamn.h" -//- imported --------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------------- - -extern SWMRG *AccountBrowserSO; -extern struct WndHandles *MessageWnd; - -extern int GetCharsetFromString(char *input,size_t size); -extern void SendMsgToRecepients(struct WndHandles *FirstWin,UINT msg,WPARAM wParam,LPARAM lParam); -extern void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode); -extern DWORD WINAPI MailBrowser(LPVOID Param); -extern DWORD WINAPI NoNewMailProc(LPVOID Param); -extern DWORD WINAPI BadConnection(LPVOID Param); - -//-------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------- //Copies one string to another diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index c5bc34e0ed..f5796e5225 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -8,12 +8,7 @@ * (c) majvan 2002-2004 */ - #include "yamn.h" -#include "main.h" -#include - -#include "m_hotkeys.h" //-------------------------------------------------------------------------------------------------- @@ -39,15 +34,15 @@ int hLangpack; PLUGININFOEX pluginInfo = { sizeof(PLUGININFOEX), - YAMN_SHORTNAME, - YAMN_VERSION, - "Mail notifier and browser for Miranda NG. Included POP3 protocol.", - "y_b tweety (majvan)", - "francois.mean@skynet.be", - "© (2002-2004 majvan) 2005-2007 tweety y_b Miranda community", - "http://miranda-ng.org/", + __PLUGIN_NAME, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), + __DESCRIPTION, + __AUTHOR, + __AUTHOREMAIL, + __COPYRIGHT, + __AUTHORWEB, UNICODE_AWARE, - // {B047A7E5-027A-4cfc-8B18-EDA8345D2790} + // {B047A7E5-027A-4CFC-8B18-EDA8345D2790} {0xb047a7e5, 0x27a, 0x4cfc, {0x8b, 0x18, 0xed, 0xa8, 0x34, 0x5d, 0x27, 0x90}} }; @@ -156,8 +151,8 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda ///////////////////////////////////////////////////////////////////////////////////////// -#ifdef YAMN_DEBUG -static char unknownCP[1500] = {0}; +#ifdef _DEBUG +static TCHAR unknownCP[1500] = {0}; #endif // The callback function BOOL CALLBACK EnumSystemCodePagesProc(LPTSTR cpStr) @@ -170,21 +165,21 @@ BOOL CALLBACK EnumSystemCodePagesProc(LPTSTR cpStr) //Get Code Page name CPINFOEX info; if (GetCPInfoEx(cp, 0, &info)) { - #ifdef YAMN_DEBUG + #ifdef _DEBUG BOOLEAN found = FALSE; #endif for (int i = 1;i //socket thorugh proxy functions #define ERRORSTR_MAXLEN 1024 //in wide-chars @@ -128,7 +123,7 @@ HYAMNPROTOPLUGIN POP3Plugin = NULL; YAMN_PROTOREGISTRATION POP3ProtocolRegistration = { "POP3 protocol (internal)", - YAMN_VERSION_C, + __VERSION_STRING, "© 2002-2004 majvan | 2005-2007 tweety, yb", "Mail notifier and browser for Miranda NG. Included POP3 protocol.", "francois.mean@skynet.be", diff --git a/plugins/YAMN/src/proto/pop3/pop3comm.h b/plugins/YAMN/src/proto/pop3/pop3comm.h index c7eb01b5a1..8d75d0876d 100644 --- a/plugins/YAMN/src/proto/pop3/pop3comm.h +++ b/plugins/YAMN/src/proto/pop3/pop3comm.h @@ -1,20 +1,6 @@ #ifndef __POP3COMM_H #define __POP3COMM_H -#include -#include "pop3.h" - -#include "m_protoplugin.h" -//We can use synchro.h because this is internal plugin. If you use external plugin, -//and you want to use SO for your plugin, you can use YAMN's SO. -//All you need is to include synchro.h and use YAMN's exported synchronization functions. -#include "m_synchro.h" - -//For mail exported functions defintions -#include "m_mails.h" - -#include "../../debug.h" - #define POP3_FILEVERSION 1 //Version of aditional information stored in book file typedef struct CPOP3Account: public CAccount diff --git a/plugins/YAMN/src/proto/pop3/pop3opt.cpp b/plugins/YAMN/src/proto/pop3/pop3opt.cpp index baebcd0bbd..72696430ab 100644 --- a/plugins/YAMN/src/proto/pop3/pop3opt.cpp +++ b/plugins/YAMN/src/proto/pop3/pop3opt.cpp @@ -5,9 +5,6 @@ */ #include "../../yamn.h" -#include "../../main.h" -#include "pop3comm.h" -#include "pop3opt.h" //-------------------------------------------------------------------------------------------------- diff --git a/plugins/YAMN/src/services.cpp b/plugins/YAMN/src/services.cpp index 36716453b0..759d998285 100644 --- a/plugins/YAMN/src/services.cpp +++ b/plugins/YAMN/src/services.cpp @@ -1,8 +1,4 @@ - #include "yamn.h" -#include "main.h" - -extern HANDLE hMenuItemMain, hMenuItemCont, hMenuItemContApp; static INT_PTR Service_GetCaps(WPARAM wParam, LPARAM lParam) { diff --git a/plugins/YAMN/src/stdafx.cpp b/plugins/YAMN/src/stdafx.cpp new file mode 100644 index 0000000000..90bdc1cb6c --- /dev/null +++ b/plugins/YAMN/src/stdafx.cpp @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-13 Miranda NG Project (http://miranda-ng.org) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "yamn.h" \ No newline at end of file diff --git a/plugins/YAMN/src/version.h b/plugins/YAMN/src/version.h index 8295e3260b..99e3280e32 100644 --- a/plugins/YAMN/src/version.h +++ b/plugins/YAMN/src/version.h @@ -1,3 +1,17 @@ -#define YAMN_VERSION_H 0,1,2,6 -#define YAMN_VERSION PLUGIN_MAKE_VERSION(0,1,2,6) -#define YAMN_VERSION_C "0.1.2.6" +#define __MAJOR_VERSION 0 +#define __MINOR_VERSION 1 +#define __RELEASE_NUM 2 +#define __BUILD_NUM 6 + +#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM +#define __TOSTRING(x) #x +#define __VERSION_STRING __TOSTRING(__FILEVERSION_STRING) + + +#define __PLUGIN_NAME "Mail Notifier" +#define __FILENAME "YAMN.dll" +#define __DESCRIPTION "ail notifier and browser for Miranda NG. Included POP3 protocol." +#define __AUTHOR "y_b, tweety, majvan" +#define __AUTHOREMAIL "francois.mean@skynet.be" +#define __AUTHORWEB "http://miranda-ng.org/" +#define __COPYRIGHT "© 2002-2004 majvan, 2005-2007 tweety, y_b, Miranda community" diff --git a/plugins/YAMN/src/yamn.cpp b/plugins/YAMN/src/yamn.cpp index b50660e450..98d8feaab8 100644 --- a/plugins/YAMN/src/yamn.cpp +++ b/plugins/YAMN/src/yamn.cpp @@ -6,12 +6,6 @@ #include "yamn.h" -#include "m_yamn.h" -#include "m_protoplugin.h" -#include "m_messages.h" -#include "m_synchro.h" -#include "main.h" - //-------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------- diff --git a/plugins/YAMN/src/yamn.h b/plugins/YAMN/src/yamn.h index c8cd8d596d..a0b5ab7eee 100644 --- a/plugins/YAMN/src/yamn.h +++ b/plugins/YAMN/src/yamn.h @@ -1,53 +1,53 @@ #ifndef __YAMN_H #define __YAMN_H + #ifndef _WIN32_IE #define _WIN32_IE 0x0400 #endif + #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif -#include -#include +#define _CRT_SECURE_NO_WARNINGS +#define VC_EXTRALEAN + #include -#include -#include //For _chdir() - -#define MIRANDA_VER 0x0A00 - -#include //For hotkeys -#include "win2k.h" -#include "newpluginapi.h" //CallService,UnHookEvent -#include "m_utils.h" //window broadcasting -#include "m_system.h" -#include "m_skin.h" -#include "m_langpack.h" -#include "m_clist.h" -#include "m_clui.h" -#include "m_options.h" -#include "m_database.h" //database -#include "m_contacts.h" //contact -#include "m_protocols.h" //protocols -#include "m_protomod.h" //protocols module -#include "m_protosvc.h" -#include "m_toptoolbar.h" -#include "m_icolib.h" -#include "m_kbdnotify.h" -#include "m_popup.h" -#include "m_account.h" //Account structure and all needed structures to cooperate with YAMN -#include "m_messages.h" //Messages sent to YAMN windows -#include "m_mails.h" //use YAMN's mails -#include "mails/m_decode.h" //use decoding macros (needed for header extracting) -#include "browser/m_browser.h" //we want to run YAMN mailbrowser, no new mail notification and bad connect window +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "main.h" +#include "mails/decode.h" +#include "browser/browser.h" #include "resource.h" -#include "m_protoplugin.h" -#include "m_filterplugin.h" -#include "m_yamn.h" //Main YAMN's variables -#include "m_protoplugin.h" //Protocol registration and so on -#include "m_synchro.h" //Synchronization #include "debug.h" -#include +#include "version.h" +#include "proto\netclient.h" +#include "proto\netlib.h" +#include "proto\pop3\pop3.h" +#include "proto\pop3\pop3comm.h" +#include "proto\pop3\pop3opt.h" //From services.cpp @@ -65,8 +65,7 @@ extern HANDLE ExitEV; extern HANDLE WriteToFileEV; //From debug.cpp -#undef YAMN_DEBUG -#ifdef YAMN_DEBUG +#ifdef _DEBUG void InitDebug(); void UnInitDebug(); #endif @@ -181,10 +180,8 @@ int AddTopToolbarIcon(WPARAM,LPARAM); //Executed when TopToolBar plugin loaded A extern TCHAR UserDirectory[]; //e.g. "F:\WINNT\Profiles\UserXYZ" extern TCHAR ProfileName[]; //e.g. "majvan" extern SWMRG *AccountBrowserSO; -extern CRITICAL_SECTION PluginRegCS; extern YAMN_VARIABLES YAMNVar; extern HANDLE hNewMailHook; -extern HANDLE WriteToFileEV; extern HANDLE hTTButton; extern HCURSOR hCurSplitNS, hCurSplitWE; extern UINT SecTimer; @@ -222,9 +219,6 @@ WCHAR *ParseMultipartBody(char *src, char *bond); //From account.cpp void WINAPI GetStatusFcn(HACCOUNT Which,TCHAR *Value); -extern int StopAccounts(HYAMNPROTOPLUGIN Plugin); -extern int DeleteAccounts(HYAMNPROTOPLUGIN Plugin); -extern int WaitForAllAccounts(HYAMNPROTOPLUGIN Plugin,BOOL GetAccountBrowserAccess); extern HYAMNPROTOPLUGIN POP3Plugin; @@ -232,11 +226,6 @@ extern HYAMNPROTOPLUGIN POP3Plugin; int DecodeQuotedPrintable(char *Src,char *Dst,int DstLen, BOOL isQ); int DecodeBase64(char *Src,char *Dst,int DstLen); -//From maild.cpp -extern INT_PTR LoadMailDataSvc(WPARAM wParam,LPARAM lParam); -extern INT_PTR UnloadMailDataSvc(WPARAM wParam,LPARAM); -extern INT_PTR SaveMailDataSvc(WPARAM wParam,LPARAM lParam); - //From filterplugin.cpp extern PYAMN_FILTERPLUGINQUEUE FirstFilterPlugin; @@ -265,7 +254,18 @@ extern void __stdcall SSL_DebugLog( const char *fmt, ... ); extern int YAMN_STATUS; +extern struct WndHandles *MessageWnd; + +extern int GetCharsetFromString(char *input,size_t size); +extern void SendMsgToRecepients(struct WndHandles *FirstWin,UINT msg,WPARAM wParam,LPARAM lParam); +extern void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode); +extern DWORD WINAPI MailBrowser(LPVOID Param); +extern DWORD WINAPI NoNewMailProc(LPVOID Param); +extern DWORD WINAPI BadConnection(LPVOID Param); +extern PVOID TLSCtx; +extern PVOID SSLCtx; + +extern HANDLE hMenuItemMain, hMenuItemCont, hMenuItemContApp; extern PYAMN_VARIABLES pYAMNVar; -extern HYAMNPROTOPLUGIN POP3Plugin; #endif -- cgit v1.2.3