summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-02-27 05:16:37 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-02-27 05:16:37 +0000
commit29ffaea1683eb46f15745d5eee0e068ee1dc7953 (patch)
tree30f354663513152baef19f43f2c6e64b885d2bcc /plugins
parent5542cf1738d621565ac71b8d02244234a9865a36 (diff)
added version info
git-svn-id: http://svn.miranda-ng.org/main/trunk@3789 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/HTTPServer/HTTPServer_10.vcxproj2
-rw-r--r--plugins/HTTPServer/HTTPServer_10.vcxproj.filters6
-rw-r--r--plugins/HTTPServer/HTTPServer_11.vcxproj2
-rw-r--r--plugins/HTTPServer/HTTPServer_11.vcxproj.filters6
-rw-r--r--plugins/HTTPServer/res/Version.rc38
-rw-r--r--plugins/HTTPServer/src/Glob.h13
-rw-r--r--plugins/HTTPServer/src/HttpUser.cpp8
-rw-r--r--plugins/HTTPServer/src/Version.h14
-rw-r--r--plugins/HTTPServer/src/m_HTTPServer.h105
-rw-r--r--plugins/HTTPServer/src/main.cpp21
10 files changed, 84 insertions, 131 deletions
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 @@
<ClInclude Include="src\IndexCreation.h" />
<ClInclude Include="src\MimeHandling.h" />
<ClInclude Include="src\resource.h" />
+ <ClInclude Include="src\Version.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\FileShareNode.cpp" />
@@ -205,6 +206,7 @@
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\resource.rc" />
+ <ResourceCompile Include="res\Version.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
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 @@
<ClInclude Include="src\MimeHandling.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="src\Version.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\FileShareNode.cpp">
@@ -66,5 +69,8 @@
<ResourceCompile Include="res\resource.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
+ <ResourceCompile Include="res\Version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
</ItemGroup>
</Project> \ 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 @@
<ClInclude Include="src\IndexCreation.h" />
<ClInclude Include="src\MimeHandling.h" />
<ClInclude Include="src\resource.h" />
+ <ClInclude Include="src\Version.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\FileShareNode.cpp" />
@@ -209,6 +210,7 @@
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\resource.rc" />
+ <ResourceCompile Include="res\Version.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
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 @@
<ClInclude Include="src\MimeHandling.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="src\Version.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\FileShareNode.cpp">
@@ -66,5 +69,8 @@
<ResourceCompile Include="res\resource.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
+ <ResourceCompile Include="res\Version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
</ItemGroup>
</Project> \ 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 <windows.h>
#include <commctrl.h>
-#include <process.h>
#include <time.h>
-#include <stdio.h>
#include <string>
-#include <win2k.h>
using namespace std;
+#include <win2k.h>
#include <newpluginapi.h>
#include <m_database.h>
#include <m_clist.h>
-#include <m_skin.h>
#include <m_langpack.h>
#include <m_clui.h>
-#include <m_options.h>
-#include <m_system.h>
-#include <m_history.h>
#include <m_userinfo.h>
#include <m_netlib.h>
#include <m_message.h>
#include <m_popup.h>
#include <m_protosvc.h>
-#include "m_HTTPServer.h"
+#include <m_HTTPServer.h>
#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
"</BODY></HTML>\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
"</BODY></HTML>\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}}
};