docs
Docs
C++ API
C API
Search API
Ctrl K
1.4
2.0
latest
1.4
Ultralight C++ API
1.4.0
Toggle main menu visibility
Loading...
Searching...
No Matches
Session.h
Go to the documentation of this file.
1
/**************************************************************************************************
2
* This file is a part of Ultralight. *
3
* *
4
* See <https://ultralig.ht> for licensing and more. *
5
* *
6
* (C) 2024 Ultralight, Inc. *
7
**************************************************************************************************/
8
#pragma once
9
#include <
Ultralight/Defines.h
>
10
#include <
Ultralight/RefPtr.h
>
11
#include <
Ultralight/String.h
>
12
13
namespace
ultralight
{
14
15
///
16
/// Storage for a browsing session (cookies, local storage, etc.).
17
///
18
/// This class stores data for a unique browsing session (cookies, local storage, application cache,
19
/// indexed db. etc.). You can create multiple sessions to isolate data between different browsing
20
/// contexts.
21
///
22
/// ## Default Session
23
///
24
/// The Renderer has a default session named "default" that is used if no session is specified when
25
/// when creating a View.
26
///
27
/// ## Session Lifetime
28
///
29
/// Sessions can be either temporary (in-memory only) or persistent (backed to disk).
30
///
31
/// @see Renderer::CreateSession
32
///
33
class
UExport
Session
:
public
RefCounted
{
34
public
:
35
///
36
/// Whether or not this session is written to disk.
37
///
38
virtual
bool
is_persistent
()
const
= 0;
39
40
///
41
/// A unique name identifying this session.
42
///
43
virtual
String
name
()
const
= 0;
44
45
///
46
/// A unique numeric ID identifying this session.
47
///
48
virtual
uint64_t
id
()
const
= 0;
49
50
///
51
/// The disk path of this session (only valid for persistent sessions).
52
///
53
virtual
String
disk_path
()
const
= 0;
54
55
protected
:
56
virtual
~Session
();
57
};
58
59
}
// namespace ultralight
UExport
#define UExport
Definition
Exports.h:25
RefPtr.h
String.h
Defines.h
ultralight::RefCounted
Interface for all ref-counted objects that will be managed using the RefPtr<> smart pointer.
Definition
RefPtr.h:47
ultralight::Session
Storage for a browsing session (cookies, local storage, etc.).
Definition
Session.h:33
ultralight::Session::disk_path
virtual String disk_path() const =0
The disk path of this session (only valid for persistent sessions).
ultralight::Session::~Session
virtual ~Session()
ultralight::Session::name
virtual String name() const =0
A unique name identifying this session.
ultralight::Session::id
virtual uint64_t id() const =0
A unique numeric ID identifying this session.
ultralight::Session::is_persistent
virtual bool is_persistent() const =0
Whether or not this session is written to disk.
ultralight::String
Unicode string container with conversions for UTF-8, UTF-16, and UTF-32.
Definition
String.h:34
ultralight
Definition
Bitmap.h:14
Ultralight
Session.h
Docs
C++ API
C API
Version
1.4
2.0
latest
1.4