mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
88ccaae11e
Now that all the classes for Ladybird are in the Ladybird namespace, we don't need them named as Ladybird::FooBarLadybird. For the Qt-specific classes, we can tack on a Qt at the end for clarity, but FontPlugin and ImageCodecPlugin no longer have anything to do with Qt.
35 lines
984 B
C++
35 lines
984 B
C++
/*
|
|
* Copyright (c) 2022, Dex♪ <dexes.ttp@gmail.com>
|
|
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibWeb/WebSockets/WebSocket.h>
|
|
#include <LibWebSocket/WebSocket.h>
|
|
|
|
namespace Ladybird {
|
|
|
|
class WebSocketQt
|
|
: public Web::WebSockets::WebSocketClientSocket
|
|
, public Weakable<WebSocketQt> {
|
|
public:
|
|
static NonnullRefPtr<WebSocketQt> create(NonnullRefPtr<WebSocket::WebSocket>);
|
|
|
|
virtual ~WebSocketQt() override;
|
|
|
|
virtual Web::WebSockets::WebSocket::ReadyState ready_state() override;
|
|
virtual DeprecatedString subprotocol_in_use() override;
|
|
virtual void send(ByteBuffer binary_or_text_message, bool is_text) override;
|
|
virtual void send(StringView message) override;
|
|
virtual void close(u16 code, DeprecatedString reason) override;
|
|
|
|
private:
|
|
explicit WebSocketQt(NonnullRefPtr<WebSocket::WebSocket>);
|
|
|
|
NonnullRefPtr<WebSocket::WebSocket> m_websocket;
|
|
};
|
|
|
|
}
|