1 | /**********************************************************************
|
---|
2 | *
|
---|
3 | * httpsrv.h
|
---|
4 | * Copyright (C) 1996
|
---|
5 | *
|
---|
6 | * A component of the fnord webserver written by [email protected].
|
---|
7 | *
|
---|
8 | * Altered for use with the Greenstone digital library software by the
|
---|
9 | * New Zealand Digital Library Project at the University of Waikato,
|
---|
10 | * New Zealand.
|
---|
11 | *
|
---|
12 | * This program is free software; you can redistribute it and/or modify
|
---|
13 | * it under the terms of the GNU General Public License as published by
|
---|
14 | * the Free Software Foundation; either version 2 of the License, or
|
---|
15 | * (at your option) any later version.
|
---|
16 | *
|
---|
17 | * This program is distributed in the hope that it will be useful,
|
---|
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
20 | * GNU General Public License for more details.
|
---|
21 | *
|
---|
22 | * You should have received a copy of the GNU General Public License
|
---|
23 | * along with this program; if not, write to the Free Software
|
---|
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
25 | *
|
---|
26 | *********************************************************************/
|
---|
27 |
|
---|
28 | #define HTTP_SERVER_MSG WM_USER + 23
|
---|
29 |
|
---|
30 | /*
|
---|
31 | Function Name: Start HTTP Server
|
---|
32 |
|
---|
33 | Purpose: Starts the HTTP server. Inits Winsock, MIME, loads registry
|
---|
34 | stuff, etc.
|
---|
35 |
|
---|
36 | Parameters:
|
---|
37 | PassedMsgWindow - The handle of the window that handles messages. Needed
|
---|
38 | to setup WSASelect notification of socket events and
|
---|
39 | to send a shutdown message on error. */
|
---|
40 |
|
---|
41 | // returns 0 on success, and a WSA error otherwise
|
---|
42 | int StartHTTPServer(HWND PassedMsgWindow);
|
---|
43 |
|
---|
44 | /*
|
---|
45 | Function Name: End HTTP Server
|
---|
46 | Purpose: Ends the HTTP server. Cleans up MIME, users, etc.
|
---|
47 | */
|
---|
48 | void EndHTTPServer();
|
---|
49 |
|
---|
50 | /*
|
---|
51 | Function Name: Process HTTP Server Message
|
---|
52 | Purpose: Processes HTTP_SERVER_MSG messages.
|
---|
53 | Parameters:
|
---|
54 | Socket - The socket the message is regarding (WPARAM)
|
---|
55 | MsgInfo - The messsage (LPARAM)
|
---|
56 | */
|
---|
57 | void ProcessHTTPServerMsg(WPARAM Socket, LPARAM MsgInfo);
|
---|