mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-03 06:39:07 +00:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
parent
950e819ee7
commit
93712b24bf
Notes:
github-actions[bot]
2024-11-10 11:51:52 +00:00
Author: https://github.com/trflynn89
Commit: 93712b24bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256
Reviewed-by: https://github.com/sideshowbarker
4547 changed files with 104 additions and 113 deletions
50
Libraries/LibWebSocket/ConnectionInfo.h
Normal file
50
Libraries/LibWebSocket/ConnectionInfo.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Dex♪ <dexes.ttp@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Vector.h>
|
||||
#include <LibCore/EventReceiver.h>
|
||||
#include <LibHTTP/HeaderMap.h>
|
||||
#include <LibTLS/TLSv12.h>
|
||||
#include <LibURL/URL.h>
|
||||
#include <LibWebSocket/Message.h>
|
||||
|
||||
namespace WebSocket {
|
||||
|
||||
class ConnectionInfo final {
|
||||
public:
|
||||
ConnectionInfo(URL::URL);
|
||||
|
||||
URL::URL const& url() const { return m_url; }
|
||||
|
||||
ByteString const& origin() const { return m_origin; }
|
||||
void set_origin(ByteString origin) { m_origin = move(origin); }
|
||||
|
||||
Vector<ByteString> const& protocols() const { return m_protocols; }
|
||||
void set_protocols(Vector<ByteString> protocols) { m_protocols = move(protocols); }
|
||||
|
||||
Vector<ByteString> const& extensions() const { return m_extensions; }
|
||||
void set_extensions(Vector<ByteString> extensions) { m_extensions = move(extensions); }
|
||||
|
||||
HTTP::HeaderMap const& headers() const { return m_headers; }
|
||||
void set_headers(HTTP::HeaderMap headers) { m_headers = move(headers); }
|
||||
|
||||
// secure flag - defined in RFC 6455 Section 3
|
||||
bool is_secure() const;
|
||||
|
||||
// "resource-name" or "/resource name/" - defined in RFC 6455 Section 3
|
||||
ByteString resource_name() const;
|
||||
|
||||
private:
|
||||
URL::URL m_url;
|
||||
ByteString m_origin;
|
||||
Vector<ByteString> m_protocols {};
|
||||
Vector<ByteString> m_extensions {};
|
||||
HTTP::HeaderMap m_headers;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue