diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-04-13 17:01:20 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-14 16:07:46 +0200 |
commit | 7193e518d1190e54ba3a94cc42c4905a7be786a1 (patch) | |
tree | 1f810432657d794f4568f5ee063bb2ae8e231980 /Userland/Libraries/LibWeb | |
parent | c2d38abe6f1b63d059f1c59e5f675bf917951847 (diff) | |
download | serenity-7193e518d1190e54ba3a94cc42c4905a7be786a1.zip |
Browser+LibWeb: Move the cookie structure into LibWeb
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/Cookie/Cookie.h | 48 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/Forward.h | 1 |
2 files changed, 49 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Cookie/Cookie.h b/Userland/Libraries/LibWeb/Cookie/Cookie.h new file mode 100644 index 0000000000..48f06569fa --- /dev/null +++ b/Userland/Libraries/LibWeb/Cookie/Cookie.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2021, Tim Flynn <trflynn89@pm.me> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#pragma once + +#include <AK/String.h> +#include <LibCore/DateTime.h> + +namespace Web::Cookie { + +struct Cookie { + String name; + String value; + Core::DateTime creation_time {}; + Core::DateTime last_access_time {}; + Core::DateTime expiry_time {}; + String domain {}; + String path {}; + bool secure { false }; + bool http_only { false }; + bool host_only { false }; + bool persistent { false }; +}; + +} diff --git a/Userland/Libraries/LibWeb/Forward.h b/Userland/Libraries/LibWeb/Forward.h index 0e6933ffe8..8bc90a2320 100644 --- a/Userland/Libraries/LibWeb/Forward.h +++ b/Userland/Libraries/LibWeb/Forward.h @@ -28,6 +28,7 @@ #pragma once namespace Web::Cookie { +struct Cookie; struct ParsedCookie; } |