Commit b19f4488 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

httpapi: Implement HttpCreateRequestQueue() and HttpCloseRequestQueue().

parent f18e026e
......@@ -7,8 +7,10 @@
@ stub HttpCreateConfigGroup
@ stub HttpCreateFilter
@ stdcall HttpCreateHttpHandle(ptr long)
@ stdcall HttpCreateRequestQueue(long wstr ptr long ptr)
@ stdcall HttpCreateServerSession(long ptr long)
@ stdcall HttpCreateUrlGroup(int64 ptr long)
@ stdcall HttpCloseRequestQueue(ptr)
@ stdcall HttpCloseServerSession(int64)
@ stdcall HttpCloseUrlGroup(int64)
@ stub HttpDeleteConfigGroup
......
......@@ -27,6 +27,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(httpapi);
static const WCHAR device_nameW[] = {'\\','D','e','v','i','c','e','\\','H','t','t','p','\\','R','e','q','Q','u','e','u','e',0};
static WCHAR *heap_strdupW(const WCHAR *str)
{
int len = wcslen(str) + 1;
......@@ -207,7 +209,6 @@ ULONG WINAPI HttpSetServiceConfiguration( HANDLE handle, HTTP_SERVICE_CONFIG_ID
*/
ULONG WINAPI HttpCreateHttpHandle(HANDLE *handle, ULONG reserved)
{
static const WCHAR device_nameW[] = {'\\','D','e','v','i','c','e','\\','H','t','t','p','\\','R','e','q','Q','u','e','u','e',0};
OBJECT_ATTRIBUTES attr = {sizeof(attr)};
UNICODE_STRING string;
IO_STATUS_BLOCK iosb;
......@@ -693,3 +694,42 @@ ULONG WINAPI HttpRemoveUrlFromUrlGroup(HTTP_URL_GROUP_ID id, const WCHAR *url, U
return ERROR_SUCCESS;
}
/***********************************************************************
* HttpCreateRequestQueue (HTTPAPI.@)
*/
ULONG WINAPI HttpCreateRequestQueue(HTTPAPI_VERSION version, const WCHAR *name,
SECURITY_ATTRIBUTES *sa, ULONG flags, HANDLE *handle)
{
OBJECT_ATTRIBUTES attr = {sizeof(attr)};
UNICODE_STRING string;
IO_STATUS_BLOCK iosb;
TRACE("version %u.%u, name %s, sa %p, flags %#x, handle %p.\n",
version.HttpApiMajorVersion, version.HttpApiMinorVersion,
debugstr_w(name), sa, flags, handle);
if (name)
FIXME("Unhandled name %s.\n", debugstr_w(name));
if (flags)
FIXME("Unhandled flags %#x.\n", flags);
RtlInitUnicodeString(&string, device_nameW);
attr.ObjectName = &string;
if (sa && sa->bInheritHandle)
attr.Attributes |= OBJ_INHERIT;
attr.SecurityDescriptor = sa ? sa->lpSecurityDescriptor : NULL;
return RtlNtStatusToDosError(NtCreateFile(handle, 0, &attr, &iosb, NULL,
FILE_ATTRIBUTE_NORMAL, 0, FILE_OPEN, FILE_NON_DIRECTORY_FILE, NULL, 0));
}
/***********************************************************************
* HttpCloseRequestQueue (HTTPAPI.@)
*/
ULONG WINAPI HttpCloseRequestQueue(HANDLE handle)
{
TRACE("handle %p.\n", handle);
if (!CloseHandle(handle))
return GetLastError();
return ERROR_SUCCESS;
}
......@@ -37,6 +37,9 @@ typedef struct _HTTPAPI_VERSION
#define HTTPAPI_VERSION_1 {1,0}
#define HTTPAPI_VERSION_2 {2,0}
#define HTTP_CREATE_REQUEST_QUEUE_FLAG_OPEN_EXISTING 0x00000001
#define HTTP_CREATE_REQUEST_QUEUE_FLAG_CONTROLLER 0x00000002
#define HTTP_INITIALIZE_SERVER 0x00000001
#define HTTP_INITIALIZE_CONFIG 0x00000002
......@@ -426,9 +429,11 @@ typedef struct _HTTP_BINDING_INFO
ULONG WINAPI HttpAddUrl(HANDLE,PCWSTR,PVOID);
ULONG WINAPI HttpAddUrlToUrlGroup(HTTP_URL_GROUP_ID id, const WCHAR *url, HTTP_URL_CONTEXT context, ULONG reserved);
ULONG WINAPI HttpCloseRequestQueue(HANDLE handle);
ULONG WINAPI HttpCloseServerSession(HTTP_SERVER_SESSION_ID id);
ULONG WINAPI HttpCloseUrlGroup(HTTP_URL_GROUP_ID id);
ULONG WINAPI HttpCreateHttpHandle(PHANDLE,ULONG);
ULONG WINAPI HttpCreateRequestQueue(HTTPAPI_VERSION version, const WCHAR *name, SECURITY_ATTRIBUTES *sa, ULONG flags, HANDLE *handle);
ULONG WINAPI HttpCreateServerSession(HTTPAPI_VERSION,PHTTP_SERVER_SESSION_ID,ULONG);
ULONG WINAPI HttpCreateUrlGroup(HTTP_SERVER_SESSION_ID session_id, HTTP_URL_GROUP_ID *group_id, ULONG reserved);
ULONG WINAPI HttpDeleteServiceConfiguration(HANDLE,HTTP_SERVICE_CONFIG_ID,PVOID,ULONG,LPOVERLAPPED);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment