[PSDK] Update http.h. CORE-13362
[reactos.git] / reactos / 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 }
46 return TRUE;
47 }
48
49 /***********************************************************************
50 * HttpInitialize (HTTPAPI.@)
51 *
52 * Initializes HTTP Server API engine
53 *
54 * PARAMS
55 * version [ I] HTTP API version which caller will use
56 * flags [ I] initialization options which specify parts of API what will be used
57 * reserved [IO] reserved, must be NULL
58 *
59 * RETURNS
60 * NO_ERROR if function succeeds, or error code if function fails
61 *
62 */
63 ULONG WINAPI HttpInitialize( HTTPAPI_VERSION version, ULONG flags, PVOID reserved )
64 {
65 FIXME( "({%d,%d}, 0x%x, %p): stub!\n", version.HttpApiMajorVersion,
66 version.HttpApiMinorVersion, flags, reserved );
67 return NO_ERROR;
68 }
69
70 /***********************************************************************
71 * HttpTerminate (HTTPAPI.@)
72 *
73 * Cleans up HTTP Server API engine resources allocated by HttpInitialize
74 *
75 * PARAMS
76 * flags [ I] options which specify parts of API what should be released
77 * reserved [IO] reserved, must be NULL
78 *
79 * RETURNS
80 * NO_ERROR if function succeeds, or error code if function fails
81 *
82 */
83 ULONG WINAPI HttpTerminate( ULONG flags, PVOID reserved )
84 {
85 FIXME( "(0x%x, %p): stub!\n", flags, reserved );
86 return NO_ERROR;
87 }
88
89 /***********************************************************************
90 * HttpDeleteServiceConfiguration (HTTPAPI.@)
91 *
92 * Remove configuration record from HTTP Server API configuration store
93 *
94 * PARAMS
95 * handle [I] reserved, must be 0
96 * type [I] configuration record type
97 * config [I] buffer which contains configuration record information
98 * length [I] length of configuration record buffer
99 * overlapped [I] reserved, must be NULL
100 *
101 * RETURNS
102 * NO_ERROR if function succeeds, or error code if function fails
103 *
104 */
105 ULONG WINAPI HttpDeleteServiceConfiguration( HANDLE handle, HTTP_SERVICE_CONFIG_ID type,
106 PVOID config, ULONG length, LPOVERLAPPED overlapped )
107 {
108 FIXME( "(%p, %d, %p, %d, %p): stub!\n", handle, type, config, length, overlapped );
109 return NO_ERROR;
110 }
111
112 /***********************************************************************
113 * HttpQueryServiceConfiguration (HTTPAPI.@)
114 *
115 * Retrieves configuration records from HTTP Server API configuration store
116 *
117 * PARAMS
118 * handle [ I] reserved, must be 0
119 * type [ I] configuration records type
120 * query [ I] buffer which contains query data used to retrieve records
121 * query_len [ I] length of query buffer
122 * buffer [IO] buffer to store query results
123 * buffer_len [ I] length of output buffer
124 * data_len [ O] optional pointer to a buffer which receives query result length
125 * overlapped [ I] reserved, must be NULL
126 *
127 * RETURNS
128 * NO_ERROR if function succeeds, or error code if function fails
129 *
130 */
131 ULONG WINAPI HttpQueryServiceConfiguration( HANDLE handle, HTTP_SERVICE_CONFIG_ID type,
132 PVOID query, ULONG query_len, PVOID buffer, ULONG buffer_len,
133 PULONG data_len, LPOVERLAPPED overlapped )
134 {
135 FIXME( "(%p, %d, %p, %d, %p, %d, %p, %p): stub!\n", handle, type, query, query_len,
136 buffer, buffer_len, data_len, overlapped );
137 return ERROR_FILE_NOT_FOUND;
138 }
139
140 /***********************************************************************
141 * HttpSetServiceConfiguration (HTTPAPI.@)
142 *
143 * Add configuration record to HTTP Server API configuration store
144 *
145 * PARAMS
146 * handle [I] reserved, must be 0
147 * type [I] configuration record type
148 * config [I] buffer which contains configuration record information
149 * length [I] length of configuration record buffer
150 * overlapped [I] reserved, must be NULL
151 *
152 * RETURNS
153 * NO_ERROR if function succeeds, or error code if function fails
154 *
155 */
156 ULONG WINAPI HttpSetServiceConfiguration( HANDLE handle, HTTP_SERVICE_CONFIG_ID type,
157 PVOID config, ULONG length, LPOVERLAPPED overlapped )
158 {
159 FIXME( "(%p, %d, %p, %d, %p): stub!\n", handle, type, config, length, overlapped );
160 return NO_ERROR;
161 }
162
163 /***********************************************************************
164 * HttpCreateHttpHandle (HTTPAPI.@)
165 *
166 * Creates a handle to the HTTP request queue
167 *
168 * PARAMS
169 * handle [O] handle to request queue
170 * reserved [I] reserved, must be NULL
171 *
172 * RETURNS
173 * NO_ERROR if function succeeds, or error code if function fails
174 *
175 */
176 ULONG WINAPI HttpCreateHttpHandle( PHANDLE handle, ULONG reserved )
177 {
178 FIXME( "(%p, %d): stub!\n", handle, reserved);
179 return ERROR_CALL_NOT_IMPLEMENTED;
180 }
181
182 /***********************************************************************
183 * HttpAddUrl (HTTPAPI.@)
184 */
185 ULONG WINAPI HttpAddUrl( HANDLE handle, PCWSTR url, PVOID reserved )
186 {
187 FIXME( "(%p, %s, %p): stub!\n", handle, debugstr_w(url), reserved );
188 return ERROR_CALL_NOT_IMPLEMENTED;
189 }