Ultralight C++ API 1.3.0
Loading...
Searching...
No Matches
Session.h
Go to the documentation of this file.
1/******************************************************************************
2 * This file is a part of Ultralight, an ultra-portable web-browser engine. *
3 * *
4 * See <https://ultralig.ht> for licensing and more. *
5 * *
6 * (C) 2023 Ultralight, Inc. *
7 *****************************************************************************/
8#pragma once
10#include <Ultralight/RefPtr.h>
11#include <Ultralight/String.h>
12
13namespace ultralight {
14
15///
16/// Storage for browsing data (cookies, local storage, etc.) optionally persisted to disk.
17///
18/// @see Renderer::CreateSession
19///
20class UExport Session : public RefCounted {
21 public:
22 ///
23 /// Whether or not this session is written to disk.
24 ///
25 virtual bool is_persistent() const = 0;
26
27 ///
28 /// A unique name identifying this session.
29 ///
30 virtual String name() const = 0;
31
32 ///
33 /// A unique numeric ID identifying this session.
34 ///
35 virtual uint64_t id() const = 0;
36
37 ///
38 /// The disk path of this session (only valid for persistent sessions).
39 ///
40 virtual String disk_path() const = 0;
41
42 protected:
43 virtual ~Session();
44};
45
46} // namespace ultralight
#define UExport
Definition Defines.h:65
Interface for all ref-counted objects that will be managed using the RefPtr<> smart pointer.
Definition RefPtr.h:47
Storage for browsing data (cookies, local storage, etc.) optionally persisted to disk.
Definition Session.h:20
virtual uint64_t id() const =0
A unique numeric ID identifying this session.
virtual bool is_persistent() const =0
Whether or not this session is written to disk.
virtual String name() const =0
A unique name identifying this session.
virtual String disk_path() const =0
The disk path of this session (only valid for persistent sessions).
UTF-8 String container with conversions for UTF-16 and UTF-32.
Definition String.h:21
Definition App.h:14