From: Vijay Kiran Kamuju infyquest@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54623 --- dlls/websocket/websocket.c | 33 +++++++++++++++++++++++ dlls/websocket/websocket.spec | 2 +- include/Makefile.in | 1 + include/websocket.h | 50 +++++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 dlls/websocket/websocket.c create mode 100644 include/websocket.h
diff --git a/dlls/websocket/websocket.c b/dlls/websocket/websocket.c new file mode 100644 index 00000000000..bcc52ea686e --- /dev/null +++ b/dlls/websocket/websocket.c @@ -0,0 +1,33 @@ +/* + * Copyright 2023 Vijay Kiran Kamuju + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "windef.h" +#include "winbase.h" +#include "websocket.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(websocket); + +HRESULT WINAPI WebSocketCreateClientHandle(const PWEB_SOCKET_PROPERTY properties, + ULONG count, WEB_SOCKET_HANDLE *handle) +{ + FIXME("(%p, %d, %p): stub\n", properties, count, handle); + + return E_NOTIMPL; +} diff --git a/dlls/websocket/websocket.spec b/dlls/websocket/websocket.spec index 36bfc74cf34..b02394f9373 100644 --- a/dlls/websocket/websocket.spec +++ b/dlls/websocket/websocket.spec @@ -2,7 +2,7 @@ @ stub WebSocketBeginClientHandshake @ stub WebSocketBeginServerHandshake @ stub WebSocketCompleteAction -@ stub WebSocketCreateClientHandle +@ stdcall WebSocketCreateClientHandle(ptr long ptr) @ stub WebSocketCreateServerHandle @ stub WebSocketDeleteHandle @ stub WebSocketEndClientHandshake diff --git a/include/Makefile.in b/include/Makefile.in index d4a166e265c..0c8c4373fc3 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -798,6 +798,7 @@ SOURCES = \ wdbgexts.h \ weakreference.idl \ webservices.h \ + websocket.h \ werapi.h \ wfext.h \ wia.h \ diff --git a/include/websocket.h b/include/websocket.h new file mode 100644 index 00000000000..3c215ddf736 --- /dev/null +++ b/include/websocket.h @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Vijay Kiran Kamuju + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_WEBSOCKET_H +#define __WINE_WEBSOCKET_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +DECLARE_HANDLE(WEB_SOCKET_HANDLE); + +typedef enum _WEB_SOCKET_PROPERTY_TYPE { + WEB_SOCKET_RECEIVE_BUFFER_SIZE_PROPERTY_TYPE = 0, + WEB_SOCKET_SEND_BUFFER_SIZE_PROPERTY_TYPE = 1, + WEB_SOCKET_DISABLE_MASKING_PROPERTY_TYPE = 2, + WEB_SOCKET_ALLOCATED_MASKING_PROPERTY_TYPE = 3, + WEB_SOCKET_DISABLE_UTF8_VERIFICATION_PROPERTY_TYPE = 4, + WEB_SOCKET_KEEPALIVE_INTERVAL_PROPERTY_TYPE = 5, + WEB_SOCKET_SUPPORTED_VERSIONS_PROPERTY_TYPE = 6 +} WEB_SOCKET_PROPERTY_TYPE; + +typedef struct _WEB_SOCKET_PROPERTY { + WEB_SOCKET_PROPERTY_TYPE Type; + PVOID pvValue; + ULONG ulValueSize; +} WEB_SOCKET_PROPERTY, *PWEB_SOCKET_PROPERTY; + +HRESULT WINAPI WebSocketCreateClientHandle(const PWEB_SOCKET_PROPERTY, ULONG, WEB_SOCKET_HANDLE*); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __WINE_WEBSOCKET_H */