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