Synchronize with trunk r58528.
[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 #define WIN32_NO_STATUS
22 #define _INC_WINDOWS
23 #define COM_NO_WINDOWS_H
24
25 #include <config.h>
26
27 #include <stdarg.h>
28
29 #include <windef.h>
30 #include <winbase.h>
31 #include <http.h>
32 #include <wine/debug.h>
33
34 WINE_DEFAULT_DEBUG_CHANNEL(httpapi);
35
36 BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID lpv )
37 {
38 switch(reason)
39 {
40 case DLL_WINE_PREATTACH:
41 return FALSE; /* prefer native version */
42 case DLL_PROCESS_ATTACH:
43 DisableThreadLibraryCalls( hinst );
44 break;
45 case DLL_PROCESS_DETACH:
46 break;
47 }
48 return TRUE;
49 }
50
51 /***********************************************************************
52 * HttpInitialize (HTTPAPI.@)
53 *
54 * Initializes HTTP Server API engine
55 *
56 * PARAMS
57 * version [ I] HTTP API version which caller will use
58 * flags [ I] initialization options which specify parts of API what will be used
59 * reserved [IO] reserved, must be NULL
60 *
61 * RETURNS
62 * NO_ERROR if function succeeds, or error code if function fails
63 *
64 */
65 ULONG WINAPI HttpInitialize( HTTPAPI_VERSION version, ULONG flags, PVOID reserved )
66 {
67 FIXME( "({%d,%d}, 0x%x, %p): stub!\n", version.HttpApiMajorVersion,
68 version.HttpApiMinorVersion, flags, reserved );
69 return NO_ERROR;
70 }
71
72 /***********************************************************************
73 * HttpTerminate (HTTPAPI.@)
74 *
75 * Cleans up HTTP Server API engine resources allocated by HttpInitialize
76 *
77 * PARAMS
78 * flags [ I] options which specify parts of API what should be released
79 * reserved [IO] reserved, must be NULL
80 *
81 * RETURNS
82 * NO_ERROR if function succeeds, or error code if function fails
83 *
84 */
85 ULONG WINAPI HttpTerminate( ULONG flags, PVOID reserved )
86 {
87 FIXME( "(0x%x, %p): stub!\n", flags, reserved );
88 return NO_ERROR;
89 }
90
91 /***********************************************************************
92 * HttpDeleteServiceConfiguration (HTTPAPI.@)
93 *
94 * Remove configuration record from HTTP Server API configuration store
95 *
96 * PARAMS
97 * handle [I] reserved, must be 0
98 * type [I] configuration record type
99 * config [I] buffer which contains configuration record information
100 * length [I] length of configuration record buffer
101 * overlapped [I] reserved, must be NULL
102 *
103 * RETURNS
104 * NO_ERROR if function succeeds, or error code if function fails
105 *
106 */
107 ULONG WINAPI HttpDeleteServiceConfiguration( HANDLE handle, HTTP_SERVICE_CONFIG_ID type,
108 PVOID config, ULONG length, LPOVERLAPPED overlapped )
109 {
110 FIXME( "(%p, %d, %p, %d, %p): stub!\n", handle, type, config, length, overlapped );
111 return NO_ERROR;
112 }
113
114 /***********************************************************************
115 * HttpQueryServiceConfiguration (HTTPAPI.@)
116 *
117 * Retrieves configuration records from HTTP Server API configuration store
118 *
119 * PARAMS
120 * handle [ I] reserved, must be 0
121 * type [ I] configuration records type
122 * query [ I] buffer which contains query data used to retrieve records
123 * query_len [ I] length of query buffer
124 * buffer [IO] buffer to store query results
125 * buffer_len [ I] length of output buffer
126 * data_len [ O] optional pointer to a buffer which receives query result length
127 * overlapped [ I] reserved, must be NULL
128 *
129 * RETURNS
130 * NO_ERROR if function succeeds, or error code if function fails
131 *
132 */
133 ULONG WINAPI HttpQueryServiceConfiguration( HANDLE handle, HTTP_SERVICE_CONFIG_ID type,
134 PVOID query, ULONG query_len, PVOID buffer, ULONG buffer_len,
135 PULONG data_len, LPOVERLAPPED overlapped )
136 {
137 FIXME( "(%p, %d, %p, %d, %p, %d, %p, %p): stub!\n", handle, type, query, query_len,
138 buffer, buffer_len, data_len, overlapped );
139 return ERROR_FILE_NOT_FOUND;
140 }
141
142 /***********************************************************************
143 * HttpSetServiceConfiguration (HTTPAPI.@)
144 *
145 * Add configuration record to HTTP Server API configuration store
146 *
147 * PARAMS
148 * handle [I] reserved, must be 0
149 * type [I] configuration record type
150 * config [I] buffer which contains configuration record information
151 * length [I] length of configuration record buffer
152 * overlapped [I] reserved, must be NULL
153 *
154 * RETURNS
155 * NO_ERROR if function succeeds, or error code if function fails
156 *
157 */
158 ULONG WINAPI HttpSetServiceConfiguration( HANDLE handle, HTTP_SERVICE_CONFIG_ID type,
159 PVOID config, ULONG length, LPOVERLAPPED overlapped )
160 {
161 FIXME( "(%p, %d, %p, %d, %p): stub!\n", handle, type, config, length, overlapped );
162 return NO_ERROR;
163 }
164
165 /***********************************************************************
166 * HttpCreateHttpHandle (HTTPAPI.@)
167 *
168 * Creates a handle to the HTTP request queue
169 *
170 * PARAMS
171 * handle [O] handle to request queue
172 * reserved [I] reserved, must be NULL
173 *
174 * RETURNS
175 * NO_ERROR if function succeeds, or error code if function fails
176 *
177 */
178 ULONG WINAPI HttpCreateHttpHandle( PHANDLE handle, ULONG reserved )
179 {
180 FIXME( "(%p, %d): stub!\n", handle, reserved);
181 return ERROR_CALL_NOT_IMPLEMENTED;
182 }