httpapi: Partially implement HttpSetUrlGroupProperty().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-08-29 19:58:04 -05:00 committed by Alexandre Julliard
parent 792521f33b
commit f0458b2148
3 changed files with 57 additions and 2 deletions

View File

@ -49,6 +49,7 @@
@ stub HttpSetControlChannelInformation
@ stub HttpSetServerContextInformation
@ stdcall HttpSetServiceConfiguration(ptr long ptr long ptr)
@ stdcall HttpSetUrlGroupProperty(int64 long ptr long)
@ stub HttpShutdownAppPool
@ stub HttpShutdownFilter
@ stdcall HttpTerminate(long ptr)

View File

@ -474,6 +474,7 @@ ULONG WINAPI HttpSendHttpResponse(HANDLE queue, HTTP_REQUEST_ID id, ULONG flags,
struct url_group
{
struct list entry, session_entry;
HANDLE queue;
};
static struct list url_groups = LIST_INIT(url_groups);
@ -565,7 +566,8 @@ ULONG WINAPI HttpCreateUrlGroup(HTTP_SERVER_SESSION_ID session_id, HTTP_URL_GROU
struct server_session *session;
struct url_group *group;
TRACE("session_id %#I64x, group_id %p, reserved %#x.\n", session_id, group_id, reserved);
TRACE("session_id %s, group_id %p, reserved %#x.\n",
wine_dbgstr_longlong(session_id), group_id, reserved);
if (!(session = get_server_session(session_id)))
return ERROR_INVALID_PARAMETER;
@ -587,7 +589,7 @@ ULONG WINAPI HttpCloseUrlGroup(HTTP_URL_GROUP_ID id)
{
struct url_group *group;
TRACE("id %#I64x.\n", id);
TRACE("id %s.\n", wine_dbgstr_longlong(id));
if (!(group = get_url_group(id)))
return ERROR_INVALID_PARAMETER;
@ -598,3 +600,27 @@ ULONG WINAPI HttpCloseUrlGroup(HTTP_URL_GROUP_ID id)
return ERROR_SUCCESS;
}
/***********************************************************************
* HttpSetUrlGroupProperty (HTTPAPI.@)
*/
ULONG WINAPI HttpSetUrlGroupProperty(HTTP_URL_GROUP_ID id, HTTP_SERVER_PROPERTY property, void *value, ULONG length)
{
struct url_group *group = get_url_group(id);
const HTTP_BINDING_INFO *info = value;
TRACE("id %s, property %u, value %p, length %u.\n",
wine_dbgstr_longlong(id), property, value, length);
if (property != HttpServerBindingProperty)
{
FIXME("Unhandled property %u.\n", property);
return ERROR_CALL_NOT_IMPLEMENTED;
}
TRACE("Binding to queue %p.\n", info->RequestQueueHandle);
group->queue = info->RequestQueueHandle;
return ERROR_SUCCESS;
}

View File

@ -397,6 +397,33 @@ typedef struct _HTTP_LOG_DATA
HTTP_LOG_DATA_TYPE Type;
} HTTP_LOG_DATA, *PHTTP_LOG_DATA;
typedef enum _HTTP_SERVER_PROPERTY
{
HttpServerAuthenticationProperty,
HttpServerLoggingProperty,
HttpServerQosProperty,
HttpServerTimeoutsProperty,
HttpServerQueueLengthProperty,
HttpServerStateProperty,
HttpServer503VerbosityProperty,
HttpServerBindingProperty,
HttpServerExtendedAuthenticationProperty,
HttpServerListenEndpointProperty,
HttpServerChannelBindProperty,
HttpServerProtectionLevelProperty,
} HTTP_SERVER_PROPERTY, *PHTTP_SERVER_PROPERTY;
typedef struct _HTTP_PROPERTY_FLAGS
{
ULONG Present : 1;
} HTTP_PROPERTY_FLAGS, *PHTTP_PROPERTY_FLAGS;
typedef struct _HTTP_BINDING_INFO
{
HTTP_PROPERTY_FLAGS Flags;
HANDLE RequestQueueHandle;
} HTTP_BINDING_INFO, *PHTTP_BINDING_INFO;
ULONG WINAPI HttpAddUrl(HANDLE,PCWSTR,PVOID);
ULONG WINAPI HttpCloseServerSession(HTTP_SERVER_SESSION_ID id);
ULONG WINAPI HttpCloseUrlGroup(HTTP_URL_GROUP_ID id);
@ -411,6 +438,7 @@ ULONG WINAPI HttpReceiveHttpRequest(HANDLE queue, HTTP_REQUEST_ID id, ULONG flag
ULONG WINAPI HttpRemoveUrl(HANDLE queue, const WCHAR *url);
ULONG WINAPI HttpSendHttpResponse(HANDLE queue, HTTP_REQUEST_ID id, ULONG flags, HTTP_RESPONSE *response, HTTP_CACHE_POLICY *cache_policy, ULONG *ret_size, void *reserved1, ULONG reserved2, OVERLAPPED *ovl, HTTP_LOG_DATA *log_data);
ULONG WINAPI HttpSetServiceConfiguration(HANDLE,HTTP_SERVICE_CONFIG_ID,PVOID,ULONG,LPOVERLAPPED);
ULONG WINAPI HttpSetUrlGroupProperty(HTTP_URL_GROUP_ID id, HTTP_SERVER_PROPERTY property, void *value, ULONG length);
#ifdef __cplusplus
}