Synchronize with trunk's revision r57629.
[reactos.git] / dll / win32 / httpapi / httpapi_main.c
1 /*
2 * HTTPAPI implementation
3 *
4 * Copyright 2009 Austin English
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21 #include "config.h"
22
23 #include <stdarg.h>
24
25 #include "windef.h"
26 #include "winbase.h"
27 #include "http.h"
28 #include "wine/debug.h"
29
30 WINE_DEFAULT_DEBUG_CHANNEL(httpapi);
31
32 BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID lpv )
33 {
34 switch(reason)
35 {
36 case DLL_WINE_PREATTACH:
37 return FALSE; /* prefer native version */
38 case DLL_PROCESS_ATTACH:
39 DisableThreadLibraryCalls( hinst );
40 break;
41 case DLL_PROCESS_DETACH:
42 break;
43 }
44 return TRUE;
45 }
46
47 /***********************************************************************
48 * HttpInitialize (HTTPAPI.@)
49 *
50 * Initializes HTTP Server API engine
51 *
52 * PARAMS
53 * version [ I] HTTP API version which caller will use
54 * flags [ I] initialization options which specify parts of API what will be used
55 * reserved [IO] reserved, must be NULL
56 *
57 * RETURNS
58 * NO_ERROR if function succeeds, or error code if function fails
59 *
60 */
61 ULONG WINAPI HttpInitialize( HTTPAPI_VERSION version, ULONG flags, PVOID reserved )
62 {
63 FIXME( "({%d,%d}, 0x%x, %p): stub!\n", version.HttpApiMajorVersion,
64 version.HttpApiMinorVersion, flags, reserved );
65 return NO_ERROR;
66 }
67
68 /***********************************************************************
69 * HttpTerminate (HTTPAPI.@)
70 *
71 * Cleans up HTTP Server API engine resources allocated by HttpInitialize
72 *
73 * PARAMS
74 * flags [ I] options which specify parts of API what should be released
75 * reserved [IO] reserved, must be NULL
76 *
77 * RETURNS
78 * NO_ERROR if function succeeds, or error code if function fails
79 *
80 */
81 ULONG WINAPI HttpTerminate( ULONG flags, PVOID reserved )
82 {
83 FIXME( "(0x%x, %p): stub!\n", flags, reserved );
84 return NO_ERROR;
85 }
86
87 /***********************************************************************
88 * HttpDeleteServiceConfiguration (HTTPAPI.@)
89 *
90 * Remove configuration record from HTTP Server API configuration store
91 *
92 * PARAMS
93 * handle [I] reserved, must be 0
94 * type [I] configuration record type
95 * config [I] buffer which contains configuration record information
96 * length [I] length of configuration record buffer
97 * overlapped [I] reserved, must be NULL
98 *
99 * RETURNS
100 * NO_ERROR if function succeeds, or error code if function fails
101 *
102 */
103 ULONG WINAPI HttpDeleteServiceConfiguration( HANDLE handle, HTTP_SERVICE_CONFIG_ID type,
104 PVOID config, ULONG length, LPOVERLAPPED overlapped )
105 {
106 FIXME( "(%p, %d, %p, %d, %p): stub!\n", handle, type, config, length, overlapped );
107 return NO_ERROR;
108 }
109
110 /***********************************************************************
111 * HttpQueryServiceConfiguration (HTTPAPI.@)
112 *
113 * Retrieves configuration records from HTTP Server API configuration store
114 *
115 * PARAMS
116 * handle [ I] reserved, must be 0
117 * type [ I] configuration records type
118 * query [ I] buffer which contains query data used to retrieve records
119 * query_len [ I] length of query buffer
120 * buffer [IO] buffer to store query results
121 * buffer_len [ I] length of output buffer
122 * data_len [ O] optional pointer to a buffer which receives query result length
123 * overlapped [ I] reserved, must be NULL
124 *
125 * RETURNS
126 * NO_ERROR if function succeeds, or error code if function fails
127 *
128 */
129 ULONG WINAPI HttpQueryServiceConfiguration( HANDLE handle, HTTP_SERVICE_CONFIG_ID type,
130 PVOID query, ULONG query_len, PVOID buffer, ULONG buffer_len,
131 PULONG data_len, LPOVERLAPPED overlapped )
132 {
133 FIXME( "(%p, %d, %p, %d, %p, %d, %p, %p): stub!\n", handle, type, query, query_len,
134 buffer, buffer_len, data_len, overlapped );
135 return ERROR_FILE_NOT_FOUND;
136 }
137
138 /***********************************************************************
139 * HttpSetServiceConfiguration (HTTPAPI.@)
140 *
141 * Add configuration record to HTTP Server API configuration store
142 *
143 * PARAMS
144 * handle [I] reserved, must be 0
145 * type [I] configuration record type
146 * config [I] buffer which contains configuration record information
147 * length [I] length of configuration record buffer
148 * overlapped [I] reserved, must be NULL
149 *
150 * RETURNS
151 * NO_ERROR if function succeeds, or error code if function fails
152 *
153 */
154 ULONG WINAPI HttpSetServiceConfiguration( HANDLE handle, HTTP_SERVICE_CONFIG_ID type,
155 PVOID config, ULONG length, LPOVERLAPPED overlapped )
156 {
157 FIXME( "(%p, %d, %p, %d, %p): stub!\n", handle, type, config, length, overlapped );
158 return NO_ERROR;
159 }
160
161 /***********************************************************************
162 * HttpCreateHttpHandle (HTTPAPI.@)
163 *
164 * Creates a handle to the HTTP request queue
165 *
166 * PARAMS
167 * handle [O] handle to request queue
168 * reserved [I] reserved, must be NULL
169 *
170 * RETURNS
171 * NO_ERROR if function succeeds, or error code if function fails
172 *
173 */
174 ULONG WINAPI HttpCreateHttpHandle( PHANDLE handle, ULONG reserved )
175 {
176 FIXME( "(%p, %d): stub!\n", handle, reserved);
177 return ERROR_CALL_NOT_IMPLEMENTED;
178 }