From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
v3: Move stubs to request.c and add WinHttpWebSocketShutdown.
Alistair, there was no sign-off on v2. Can you reply with your sign-off if you agree with my changes?
Signed-off-by: Hans Leidekker hans@codeweavers.com --- dlls/winhttp/request.c | 38 ++++++++++++++++++++++++++++++++++++++ dlls/winhttp/winhttp.spec | 6 ++++++ include/winhttp.h | 6 ++++++ 3 files changed, 50 insertions(+)
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index fbccf0228b9..79d66fd5e80 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -3013,6 +3013,44 @@ BOOL WINAPI WinHttpWriteData( HINTERNET hrequest, LPCVOID buffer, DWORD to_write return !ret; }
+HINTERNET WINAPI WinHttpWebSocketCompleteUpgrade( HINTERNET hrequest, DWORD_PTR context ) +{ + FIXME("%p, %08lx\n", hrequest, context); + return NULL; +} + +DWORD WINAPI WinHttpWebSocketSend( HINTERNET hsocket, WINHTTP_WEB_SOCKET_BUFFER_TYPE type, void *buf, DWORD len ) +{ + FIXME("%p, %u, %p, %u\n", hsocket, type, buf, len); + return ERROR_INVALID_PARAMETER; +} + +DWORD WINAPI WinHttpWebSocketReceive( HINTERNET hsocket, void *buf, DWORD len, DWORD *read, + WINHTTP_WEB_SOCKET_BUFFER_TYPE *type ) +{ + FIXME("%p, %p, %u, %p, %p\n", hsocket, buf, len, read, type); + return ERROR_INVALID_PARAMETER; +} + +DWORD WINAPI WinHttpWebSocketShutdown( HINTERNET hsocket, USHORT status, void *reason, DWORD len ) +{ + FIXME("%p, %u, %p, %u\n", hsocket, status, reason, len); + return ERROR_INVALID_PARAMETER; +} + +DWORD WINAPI WinHttpWebSocketClose( HINTERNET hsocket, USHORT status, void *reason, DWORD len ) +{ + FIXME("%p, %u, %p, %u\n", hsocket, status, reason, len); + return ERROR_INVALID_PARAMETER; +} + +DWORD WINAPI WinHttpWebSocketQueryCloseStatus( HINTERNET hsocket, USHORT *status, void *reason, DWORD len, + DWORD *consumed ) +{ + FIXME("%p, %p, %p, %u, %p\n", hsocket, status, reason, len, consumed); + return ERROR_INVALID_PARAMETER; +} + enum request_state { REQUEST_STATE_INITIALIZED, diff --git a/dlls/winhttp/winhttp.spec b/dlls/winhttp/winhttp.spec index 28dcb1598b7..beace245a8c 100644 --- a/dlls/winhttp/winhttp.spec +++ b/dlls/winhttp/winhttp.spec @@ -28,4 +28,10 @@ @ stdcall WinHttpSetTimeouts(ptr long long long long) @ stdcall WinHttpTimeFromSystemTime(ptr ptr) @ stdcall WinHttpTimeToSystemTime(wstr ptr) +@ stdcall WinHttpWebSocketClose(ptr long ptr long) +@ stdcall WinHttpWebSocketCompleteUpgrade(ptr ptr) +@ stdcall WinHttpWebSocketQueryCloseStatus(ptr ptr ptr long ptr) +@ stdcall WinHttpWebSocketReceive(ptr ptr long ptr ptr) +@ stdcall WinHttpWebSocketSend(ptr long ptr long) +@ stdcall WinHttpWebSocketShutdown(ptr long ptr long) @ stdcall WinHttpWriteData(ptr ptr long ptr) diff --git a/include/winhttp.h b/include/winhttp.h index ddfda480880..930c5891f5e 100644 --- a/include/winhttp.h +++ b/include/winhttp.h @@ -853,6 +853,12 @@ WINHTTP_STATUS_CALLBACK WINAPI WinHttpSetStatusCallback(HINTERNET,WINHTTP_STATUS BOOL WINAPI WinHttpSetTimeouts(HINTERNET,int,int,int,int); BOOL WINAPI WinHttpTimeFromSystemTime(const SYSTEMTIME *,LPWSTR); BOOL WINAPI WinHttpTimeToSystemTime(LPCWSTR,SYSTEMTIME*); +DWORD WINAPI WinHttpWebSocketClose(HINTERNET,USHORT,void *,DWORD); +HINTERNET WINAPI WinHttpWebSocketCompleteUpgrade(HINTERNET,DWORD_PTR); +DWORD WINAPI WinHttpWebSocketQueryCloseStatus(HINTERNET,USHORT*,void*,DWORD,DWORD*); +DWORD WINAPI WinHttpWebSocketReceive(HINTERNET,void*,DWORD,DWORD*,WINHTTP_WEB_SOCKET_BUFFER_TYPE*); +DWORD WINAPI WinHttpWebSocketSend(HINTERNET,WINHTTP_WEB_SOCKET_BUFFER_TYPE,void*,DWORD); +DWORD WINAPI WinHttpWebSocketShutdown(HINTERNET,USHORT,void*,DWORD); BOOL WINAPI WinHttpWriteData(HINTERNET,LPCVOID,DWORD,LPDWORD); DWORD WINAPI WinHttpWriteProxySettings(HINTERNET,BOOL,WINHTTP_PROXY_SETTINGS*);