From e88506076286ec7c878231c5362ea5c1bb2b612c Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 1 Aug 2015 21:06:56 +0000 Subject: wumf: common project git-svn-id: http://svn.miranda-ng.org/main/trunk@14802 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/WhoUsesMyFiles/src/list.cpp | 2 +- plugins/WhoUsesMyFiles/src/stdafx.cpp | 18 ----- plugins/WhoUsesMyFiles/src/stdafx.cxx | 18 +++++ plugins/WhoUsesMyFiles/src/stdafx.h | 132 +++++++++++++++++++++++++++++++ plugins/WhoUsesMyFiles/src/wumf.cpp | 2 +- plugins/WhoUsesMyFiles/src/wumf.h | 134 -------------------------------- plugins/WhoUsesMyFiles/src/wumfplug.cpp | 2 +- 7 files changed, 153 insertions(+), 155 deletions(-) delete mode 100644 plugins/WhoUsesMyFiles/src/stdafx.cpp create mode 100644 plugins/WhoUsesMyFiles/src/stdafx.cxx create mode 100644 plugins/WhoUsesMyFiles/src/stdafx.h delete mode 100644 plugins/WhoUsesMyFiles/src/wumf.h (limited to 'plugins/WhoUsesMyFiles/src') diff --git a/plugins/WhoUsesMyFiles/src/list.cpp b/plugins/WhoUsesMyFiles/src/list.cpp index 89246dc052..25f1230b8f 100644 --- a/plugins/WhoUsesMyFiles/src/list.cpp +++ b/plugins/WhoUsesMyFiles/src/list.cpp @@ -1,4 +1,4 @@ -#include "wumf.h" +#include "stdafx.h" PWumf new_wumf( DWORD dwID, LPTSTR szUser, diff --git a/plugins/WhoUsesMyFiles/src/stdafx.cpp b/plugins/WhoUsesMyFiles/src/stdafx.cpp deleted file mode 100644 index 8fd2eb1d30..0000000000 --- a/plugins/WhoUsesMyFiles/src/stdafx.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright (C) 2012-15 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 "wumf.h" \ No newline at end of file diff --git a/plugins/WhoUsesMyFiles/src/stdafx.cxx b/plugins/WhoUsesMyFiles/src/stdafx.cxx new file mode 100644 index 0000000000..6fb37564b7 --- /dev/null +++ b/plugins/WhoUsesMyFiles/src/stdafx.cxx @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-15 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 "stdafx.h" \ No newline at end of file diff --git a/plugins/WhoUsesMyFiles/src/stdafx.h b/plugins/WhoUsesMyFiles/src/stdafx.h new file mode 100644 index 0000000000..54616999ad --- /dev/null +++ b/plugins/WhoUsesMyFiles/src/stdafx.h @@ -0,0 +1,132 @@ +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "resource.h" +#include "Version.h" + +#define MODULENAME "WUMF Plugin" + +#define LIFETIME_MAX 60 +#define LIFETIME_MIN 1 +#define MAX_PATHNAME 512 +#define MAX_USERNAME 512 +#define TIME 500 + +#define POPUPS_ENABLED "1033" +#define DELAY_SEC "1026" +#define DELAY_SET "1049" +#define DELAY_INF "1050" +#define DELAY_DEF "1051" +#define COLOR_SET "1000" +#define COLOR_WIN "1001" +#define COLOR_DEF "1002" +#define COLOR_BACK "1003" +#define COLOR_TEXT "1004" +#define OPT_FILE "1006" +#define LOG_INTO_FILE "1054" +#define LOG_FOLDER "1055" +#define ALERT_FOLDER "1056" +#define LOG_UNC "1057" +#define ALERT_UNC "1058" +#define LOG_COMP "1059" +#define ALERT_COMP "1060" + +#define IDM_SETUP 0x0402 +#define IDM_ABOUT 0x0403 +#define IDM_SHOW 0x0405 +#define IDM_EXIT 0x0404 + +struct WUMF_OPTIONS +{ + BOOL PopupsEnabled; + BOOL UseWinColor; + BOOL UseDefColor; + BOOL SelectColor; + BOOL DelayInf; + BOOL DelayDef; + BOOL DelaySet; + int DelaySec; + + BOOL LogToFile; + BOOL LogFolders; + BOOL AlertFolders; + BOOL LogUNC; + BOOL AlertUNC; + BOOL LogComp; + BOOL AlertComp; + + COLORREF ColorText; + COLORREF ColorBack; + + TCHAR LogFile[255]; +}; + +struct Wumf +{ + DWORD dwID; + TCHAR szID[10], szPerm[10]; + LPTSTR szUser; + LPTSTR szPath; + LPTSTR szComp; + LPTSTR szUNC; + DWORD dwSess; + DWORD dwLocks; + DWORD dwAttr; + DWORD dwPerm; + BOOL mark; + Wumf *next; +}; + +typedef Wumf *PWumf; + +PWumf new_wumf( + DWORD dwID, + LPTSTR szUser, + LPTSTR szPath, + LPTSTR szComp, + LPTSTR szUNC, + DWORD szSess, + DWORD dwPerm, + DWORD dwAttr); + +BOOL add_cell (PWumf* l, PWumf w); +BOOL del_cell (PWumf* l, PWumf w); +BOOL cpy_cell (PWumf* l, PWumf w); +PWumf fnd_cell (PWumf* l, DWORD dwID); +PWumf cpy_list (PWumf* l); +BOOL del_all (PWumf* l); +void mark_all (PWumf* l, BOOL mark); +BOOL del_marked(PWumf* l); + +extern WUMF_OPTIONS WumfOptions; +extern HINSTANCE hInst; +extern HANDLE hLogger; +static HANDLE hWumfBut; +extern PWumf list; + +void FreeAll(); +VOID CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD); +INT_PTR CALLBACK ConnDlgProc(HWND, UINT, WPARAM, LPARAM); + +void ShowThePopup(PWumf w, LPTSTR, LPTSTR); +void ShowWumfPopup(PWumf w); + +void process_session(SESSION_INFO_1 s_info); +void process_file(SESSION_INFO_1 s_info, FILE_INFO_3 f_info); +void printError(DWORD res); + +#define msg(X) MessageBox(NULL, X, _T("WUMF"), MB_OK|MB_ICONSTOP) +#define MS_WUMF_SWITCHPOPUP "WUMF/SwitchPopup" +#define MS_WUMF_CONNECTIONSSHOW "WUMF/ShowConnections" diff --git a/plugins/WhoUsesMyFiles/src/wumf.cpp b/plugins/WhoUsesMyFiles/src/wumf.cpp index cf9999d83d..de316fd2f9 100644 --- a/plugins/WhoUsesMyFiles/src/wumf.cpp +++ b/plugins/WhoUsesMyFiles/src/wumf.cpp @@ -1,4 +1,4 @@ -#include "wumf.h" +#include "stdafx.h" #define MAX_CHARS 4096 #define WS_WINDOW_STYLE WS_OVERLAPPED diff --git a/plugins/WhoUsesMyFiles/src/wumf.h b/plugins/WhoUsesMyFiles/src/wumf.h deleted file mode 100644 index e0707f8481..0000000000 --- a/plugins/WhoUsesMyFiles/src/wumf.h +++ /dev/null @@ -1,134 +0,0 @@ -#define _CRT_SECURE_NO_WARNINGS - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "resource.h" -#include "Version.h" - -#define MODULENAME "WUMF Plugin" - -#define LIFETIME_MAX 60 -#define LIFETIME_MIN 1 -#define MAX_PATHNAME 512 -#define MAX_USERNAME 512 -#define TIME 500 - -#define POPUPS_ENABLED "1033" -#define DELAY_SEC "1026" -#define DELAY_SET "1049" -#define DELAY_INF "1050" -#define DELAY_DEF "1051" -#define COLOR_SET "1000" -#define COLOR_WIN "1001" -#define COLOR_DEF "1002" -#define COLOR_BACK "1003" -#define COLOR_TEXT "1004" -#define OPT_FILE "1006" -#define LOG_INTO_FILE "1054" -#define LOG_FOLDER "1055" -#define ALERT_FOLDER "1056" -#define LOG_UNC "1057" -#define ALERT_UNC "1058" -#define LOG_COMP "1059" -#define ALERT_COMP "1060" - -#define IDM_SETUP 0x0402 -#define IDM_ABOUT 0x0403 -#define IDM_SHOW 0x0405 -#define IDM_EXIT 0x0404 - -struct WUMF_OPTIONS -{ - BOOL PopupsEnabled; - BOOL UseWinColor; - BOOL UseDefColor; - BOOL SelectColor; - BOOL DelayInf; - BOOL DelayDef; - BOOL DelaySet; - int DelaySec; - - BOOL LogToFile; - BOOL LogFolders; - BOOL AlertFolders; - BOOL LogUNC; - BOOL AlertUNC; - BOOL LogComp; - BOOL AlertComp; - - COLORREF ColorText; - COLORREF ColorBack; - - TCHAR LogFile[255]; -}; - -struct Wumf -{ - DWORD dwID; - TCHAR szID[10], szPerm[10]; - LPTSTR szUser; - LPTSTR szPath; - LPTSTR szComp; - LPTSTR szUNC; - DWORD dwSess; - DWORD dwLocks; - DWORD dwAttr; - DWORD dwPerm; - BOOL mark; - Wumf *next; -}; - -typedef Wumf *PWumf; - -PWumf new_wumf( - DWORD dwID, - LPTSTR szUser, - LPTSTR szPath, - LPTSTR szComp, - LPTSTR szUNC, - DWORD szSess, - DWORD dwPerm, - DWORD dwAttr); - -BOOL add_cell (PWumf* l, PWumf w); -BOOL del_cell (PWumf* l, PWumf w); -BOOL cpy_cell (PWumf* l, PWumf w); -PWumf fnd_cell (PWumf* l, DWORD dwID); -PWumf cpy_list (PWumf* l); -BOOL del_all (PWumf* l); -void mark_all (PWumf* l, BOOL mark); -BOOL del_marked(PWumf* l); - -extern WUMF_OPTIONS WumfOptions; -extern HINSTANCE hInst; -extern HANDLE hLogger; -static HANDLE hWumfBut; -extern PWumf list; - -void FreeAll(); -VOID CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD); -INT_PTR CALLBACK ConnDlgProc(HWND, UINT, WPARAM, LPARAM); - -void ShowThePopup(PWumf w, LPTSTR, LPTSTR); -void ShowWumfPopup(PWumf w); - -void process_session(SESSION_INFO_1 s_info); -void process_file(SESSION_INFO_1 s_info, FILE_INFO_3 f_info); -void printError(DWORD res); - -#define msg(X) MessageBox(NULL, X, _T("WUMF"), MB_OK|MB_ICONSTOP) -#define MS_WUMF_SWITCHPOPUP "WUMF/SwitchPopup" -#define MS_WUMF_CONNECTIONSSHOW "WUMF/ShowConnections" diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp index 0bd9066d35..8c023af4eb 100644 --- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp +++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp @@ -1,4 +1,4 @@ -#include "wumf.h" +#include "stdafx.h" HINSTANCE hInst; WUMF_OPTIONS WumfOptions = { 0 }; -- cgit v1.2.3