From 29ffaea1683eb46f15745d5eee0e068ee1dc7953 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Wed, 27 Feb 2013 05:16:37 +0000 Subject: added version info git-svn-id: http://svn.miranda-ng.org/main/trunk@3789 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HTTPServer/HTTPServer_10.vcxproj | 2 + plugins/HTTPServer/HTTPServer_10.vcxproj.filters | 6 ++ plugins/HTTPServer/HTTPServer_11.vcxproj | 2 + plugins/HTTPServer/HTTPServer_11.vcxproj.filters | 6 ++ plugins/HTTPServer/res/Version.rc | 38 ++++++++ plugins/HTTPServer/src/Glob.h | 13 +-- plugins/HTTPServer/src/HttpUser.cpp | 8 +- plugins/HTTPServer/src/Version.h | 14 +++ plugins/HTTPServer/src/m_HTTPServer.h | 105 ----------------------- plugins/HTTPServer/src/main.cpp | 21 ++--- 10 files changed, 84 insertions(+), 131 deletions(-) create mode 100644 plugins/HTTPServer/res/Version.rc create mode 100644 plugins/HTTPServer/src/Version.h delete mode 100644 plugins/HTTPServer/src/m_HTTPServer.h (limited to 'plugins/HTTPServer') diff --git a/plugins/HTTPServer/HTTPServer_10.vcxproj b/plugins/HTTPServer/HTTPServer_10.vcxproj index ad53340236..9c4bfa164a 100644 --- a/plugins/HTTPServer/HTTPServer_10.vcxproj +++ b/plugins/HTTPServer/HTTPServer_10.vcxproj @@ -190,6 +190,7 @@ + @@ -205,6 +206,7 @@ + diff --git a/plugins/HTTPServer/HTTPServer_10.vcxproj.filters b/plugins/HTTPServer/HTTPServer_10.vcxproj.filters index 41134e5488..af23f66ba6 100644 --- a/plugins/HTTPServer/HTTPServer_10.vcxproj.filters +++ b/plugins/HTTPServer/HTTPServer_10.vcxproj.filters @@ -35,6 +35,9 @@ Header Files + + Header Files + @@ -66,5 +69,8 @@ Resource Files + + Resource Files + \ No newline at end of file diff --git a/plugins/HTTPServer/HTTPServer_11.vcxproj b/plugins/HTTPServer/HTTPServer_11.vcxproj index 3bdc80421d..ed5eb615c6 100644 --- a/plugins/HTTPServer/HTTPServer_11.vcxproj +++ b/plugins/HTTPServer/HTTPServer_11.vcxproj @@ -194,6 +194,7 @@ + @@ -209,6 +210,7 @@ + diff --git a/plugins/HTTPServer/HTTPServer_11.vcxproj.filters b/plugins/HTTPServer/HTTPServer_11.vcxproj.filters index 41134e5488..af23f66ba6 100644 --- a/plugins/HTTPServer/HTTPServer_11.vcxproj.filters +++ b/plugins/HTTPServer/HTTPServer_11.vcxproj.filters @@ -35,6 +35,9 @@ Header Files + + Header Files + @@ -66,5 +69,8 @@ Resource Files + + Resource Files + \ No newline at end of file diff --git a/plugins/HTTPServer/res/Version.rc b/plugins/HTTPServer/res/Version.rc new file mode 100644 index 0000000000..5bfbab4754 --- /dev/null +++ b/plugins/HTTPServer/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/HTTPServer/src/Glob.h b/plugins/HTTPServer/src/Glob.h index e9503f07be..f64d28d950 100644 --- a/plugins/HTTPServer/src/Glob.h +++ b/plugins/HTTPServer/src/Glob.h @@ -22,29 +22,23 @@ #include #include -#include #include -#include #include -#include using namespace std; +#include #include #include #include -#include #include #include -#include -#include -#include #include #include #include #include #include -#include "m_HTTPServer.h" +#include #include "FileShareNode.h" #include "HttpUser.h" @@ -52,6 +46,7 @@ using namespace std; #include "MimeHandling.h" #include "resource.h" #include "IndexCreation.h" +#include "Version.h" #define SD_RECEIVE 0x00 @@ -90,6 +85,4 @@ extern bool bLimitOnlyWhenOnline; extern void* (*MirandaMalloc)(size_t); extern void (*MirandaFree)(void*); -extern char * pszVersion; - #endif \ No newline at end of file diff --git a/plugins/HTTPServer/src/HttpUser.cpp b/plugins/HTTPServer/src/HttpUser.cpp index fc0f24be3f..475765f495 100644 --- a/plugins/HTTPServer/src/HttpUser.cpp +++ b/plugins/HTTPServer/src/HttpUser.cpp @@ -250,7 +250,7 @@ void CLHttpUser::SendError(int iErrorCode, const char * pszError, const char * p "\n" "\r\n" "\r\n", - iErrorCode, pszError, szCurTime, pszVersion, iErrorCode, pszError, pszError, pszDescription, pszVersion); + iErrorCode, pszError, szCurTime, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), iErrorCode, pszError, pszError, pszDescription, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM)); Netlib_Send(hConnection, szBuf, dwBytesToWrite, 0); } @@ -301,7 +301,7 @@ void CLHttpUser::SendRedir(int iErrorCode, const char * pszError, const char * p "\n" "\r\n" "\r\n", - iErrorCode, pszError, szCurrTime, pszVersion, pszRedirect, iErrorCode, pszError, pszError, pszDescription, pszVersion); + iErrorCode, pszError, szCurrTime, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), pszRedirect, iErrorCode, pszError, pszError, pszDescription, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM)); Netlib_Send(hConnection, szBuff, dwBytesToWrite, 0); } @@ -618,7 +618,7 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) { dwBytesToWrite = _snprintf(szBuf, sizeof(szBuf), szHttpPartial , szCurTime , - pszVersion, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), szETag , dwDataToSend , pszGetMimeType(pszRealPath), @@ -640,7 +640,7 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) { dwBytesToWrite = _snprintf(szBuf, sizeof(szBuf), szHttpOk , szCurTime , - pszVersion, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), szETag , nDataSize , pszGetMimeType(pszRealPath), diff --git a/plugins/HTTPServer/src/Version.h b/plugins/HTTPServer/src/Version.h new file mode 100644 index 0000000000..c736349026 --- /dev/null +++ b/plugins/HTTPServer/src/Version.h @@ -0,0 +1,14 @@ +#define __MAJOR_VERSION 0 +#define __MINOR_VERSION 1 +#define __RELEASE_NUM 2 +#define __BUILD_NUM 2 + +#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM + +#define __PLUGIN_NAME "HTTPServer" +#define __FILENAME "HTTPServer.dll" +#define __DESCRIPTION "HTTP Web Server plugin for Miranda." +#define __AUTHOR "Kennet Nielsen, modified by Vampik, Houdini" +#define __AUTHOREMAIL "" +#define __AUTHORWEB "http://miranda-ng.org/" +#define __COPYRIGHT "© 2003-2009 Kennet Nielsen, Vampik, Houdini" diff --git a/plugins/HTTPServer/src/m_HTTPServer.h b/plugins/HTTPServer/src/m_HTTPServer.h deleted file mode 100644 index 6cb6549ee0..0000000000 --- a/plugins/HTTPServer/src/m_HTTPServer.h +++ /dev/null @@ -1,105 +0,0 @@ -//This file is part of HTTPServer a Miranda IM plugin -//Copyright (C)2002 Kennet Nielsen -// -//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; either -//version 2 of the License, or (at your option) any later version. -// -//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, write to the Free Software -//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - -#ifndef M_HTTP_SERVER_H -#define M_HTTP_SERVER_H - - -#define OPT_SEND_LINK 0x1 - - -typedef struct { - DWORD lStructSize; // Set to sizeof(STFileShareInfo) - char * pszSrvPath; // Server path - DWORD dwMaxSrvPath; // Buffer allocated for Server path only used when information is requested from HTTP server. - char * pszRealPath; // Real path can be relative or complete - DWORD dwMaxRealPath;// Buffer allocated for Real path only used when information is requested from HTTP server. - DWORD dwAllowedIP; // The IP address which is allowed to access this share - DWORD dwAllowedMask; // A mask which is applied to IP address to allow other IP addresses - int nMaxDownloads; // The maximum number of download which can be made on this share. - DWORD dwOptions; // Use OPT_SEND_LINK to open a message window with the link to file -} STFileShareInfo, * LPSTFileShareInfo; - -// dwMaxSrvPath Specifies the size, in chars, of the buffer pointed to by pszSrvPath. -// The buffer must be large enough to store the path and file name string, -// including the terminating null character. - - -///////////////////////////////////////////// -/// Service MS_HTTP_ADD_CHANGE_REMOVE /// -///////////////////////////////////////////// -// -// wParam = (WPARAM)0 -// lParam = (LPARAM)LPSTFileShareInfo; -// Server path is the key when working with FileShareInfo. -// Two files can not be shared with the same "Server path" in the HTTP server. -// If the server path does not exists it will be added. -// If it does exists the action depends on what real path is. -// If real path is empty the entity will be removed else it -// will just be updated with the new settings. - -// -// returns 0 on success, nonzero on failure -#define MS_HTTP_ADD_CHANGE_REMOVE "HTTPServer/AddChangeRemove" - - -///////////////////////////////////////////// -////// Service MS_HTTP_GET_SHARE ////// -///////////////////////////////////////////// -// -// wParam = (WPARAM)0; -// lParam = (LPARAM)LPSTFileShareInfo; -// Returns the information for a share -// Server path must be set the the share you wish information for. -// -// returns 0 on success, nonzero on failure - -#define MS_HTTP_GET_SHARE "HTTPServer/GetShare" - - - -///////////////////////////////////////////// -/// Service MS_HTTP_ACCEPT_CONNECTIONS /// -///////////////////////////////////////////// -// -// wParam = (WPARAM)boolean(true/false); -// lParam = (LPARAM)0; -// Toggles the HTTP server state if wParam is FALSE -// Force enable HTTP server if wParam is TRUE -// returns 0 on success, nonzero on failure - -#define MS_HTTP_ACCEPT_CONNECTIONS "HTTPServer/AcceptConnections" - -///////////////////////////////////////////// -//// Service MS_HTTP_GET_ALL_SHARES ///// -///////////////////////////////////////////// -// -// wParam = (WPARAM)0; -// lParam = (LPARAM)&LPSTFileShareInfo; -// Returns an array of all currently shared files in the HTTP Server -// LPSTFileShareInfo points to the first share. -// You must free the memory returned by using the miranda MS_SYSTEM_GET_MMI -// and calling MM_INTERFACE->free( LPSTFileShareInfo ) -// -// returns the count of shares in the buffer pointed to by LPSTFileShareInfo - -#define MS_HTTP_GET_ALL_SHARES "HTTPServer/GetAllShares" - - - -#endif diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp index a9824e51d2..d4c1fdd011 100644 --- a/plugins/HTTPServer/src/main.cpp +++ b/plugins/HTTPServer/src/main.cpp @@ -84,21 +84,18 @@ bool bShutdownInProgress = false; int hLangpack = 0; -char* pszVersion = "0.1.2.2"; - PLUGININFOEX pluginInfo = { sizeof(PLUGININFOEX), - MODULE, - PLUGIN_MAKE_VERSION(0, 1, 2, 2), - "HTTP Server\r\n" - "HTTP Web Server plugin for Miranda", - "Kennet Nielsen, modified by Vampik, Houdini", - "", - "© 2003-2009 Kennet Nielsen, Vampik, Houdini", - "http://addons.miranda-im.org/details.php?action=viewfile&id=2304", + __PLUGIN_NAME, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), + __DESCRIPTION, + __AUTHOR, + __AUTHOREMAIL, + __COPYRIGHT, + __AUTHORWEB, UNICODE_AWARE, - // {67848B07-83D2-49e9-8844-7E3DE268E304} - { 0x67848b07, 0x83d2, 0x49e9, { 0x88, 0x44, 0x7e, 0x3d, 0xe2, 0x68, 0xe3, 0x4 } } + // {67848B07-83D2-49E9-8844-7E3DE268E304} + {0x67848b07, 0x83d2, 0x49e9, {0x88, 0x44, 0x7e, 0x3d, 0xe2, 0x68, 0xe3, 0x4}} }; -- cgit v1.2.3