.. index:: pair: struct; EE::UI::WebOriginKey .. _doxid-struct_e_e_1_1_u_i_1_1_web_origin_key: struct EE::UI::WebOriginKey =========================== .. toctree:: :hidden: Overview ~~~~~~~~ Canonical network origin used to describe a document navigation. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include struct WebOriginKey { // fields std::string :ref:`scheme`; std::string :ref:`host`; :ref:`Uint16` :ref:`port` { 0 }; // methods bool :ref:`empty`() const; bool :ref:`operator==`(const WebOriginKey& other) const; bool :ref:`operator!=`(const WebOriginKey& other) const; static WebOriginKey :ref:`fromURI`(const :ref:`Network::URI`& uri); }; .. _details-struct_e_e_1_1_u_i_1_1_web_origin_key: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Canonical network origin used to describe a document navigation. Origins compare scheme, host, and port. Consequently HTTP and HTTPS origins are distinct, as are equal hosts using different ports. Paths, queries, and fragments are not part of an origin. Fields ------ .. index:: pair: variable; scheme .. _doxid-struct_e_e_1_1_u_i_1_1_web_origin_key_1a3f3a2be832c69bb5a89e127b654b59b2: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::string scheme Lowercase URI scheme, such as "http" or "https". .. index:: pair: variable; host .. _doxid-struct_e_e_1_1_u_i_1_1_web_origin_key_1a72cd0117488f30f2a58e054ff9936431: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::string host Lowercase host name. .. index:: pair: variable; port .. _doxid-struct_e_e_1_1_u_i_1_1_web_origin_key_1af750ba3cb93f9a3ee0b6dea80cef3470: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Uint16` port { 0 } URI port, or the URI implementation's default/empty port value. Methods ------- .. index:: pair: function; empty .. _doxid-struct_e_e_1_1_u_i_1_1_web_origin_key_1a63ea133ed54e742721064a182f8bbc18: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool empty() const .. rubric:: Returns: True when no origin components have been assigned. .. index:: pair: function; operator== .. _doxid-struct_e_e_1_1_u_i_1_1_web_origin_key_1afb0dd535dfa83bdd203748866f9d6bdc: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool operator==(const WebOriginKey& other) const .. rubric:: Returns: True when both values describe the same scheme, host, and port. .. index:: pair: function; operator!= .. _doxid-struct_e_e_1_1_u_i_1_1_web_origin_key_1ac4ebebf1e7dd1d4bb24915a55ca03f4b: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool operator!=(const WebOriginKey& other) const .. rubric:: Returns: True when at least one origin component differs. .. index:: pair: function; fromURI .. _doxid-struct_e_e_1_1_u_i_1_1_web_origin_key_1aafa2edf75eb248786eb553d8ecc262e9: .. ref-code-block:: cpp :class: doxyrest-title-code-block static WebOriginKey fromURI(const :ref:`Network::URI`& uri) Creates an origin key from a URI, normalizing the scheme and host to lowercase.