diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-05-15 10:38:20 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-05-15 10:38:20 +0000 |
commit | 48540940b6c28bb4378abfeb500ec45a625b37b6 (patch) | |
tree | 2ef294c0763e802f91d868bdef4229b6868527de /plugins/ExternalAPI/m_HTTPServer.h | |
parent | 5c350913f011e119127baeb32a6aedeb4f0d33bc (diff) |
initial commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@2 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ExternalAPI/m_HTTPServer.h')
-rw-r--r-- | plugins/ExternalAPI/m_HTTPServer.h | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/plugins/ExternalAPI/m_HTTPServer.h b/plugins/ExternalAPI/m_HTTPServer.h new file mode 100644 index 0000000000..6cb6549ee0 --- /dev/null +++ b/plugins/ExternalAPI/m_HTTPServer.h @@ -0,0 +1,105 @@ +//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
|