Ultralight C API 1.3.0
Loading...
Searching...
No Matches
CAPI_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#ifndef ULTRALIGHT_CAPI_SESSION_H
9#define ULTRALIGHT_CAPI_SESSION_H
10
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17/******************************************************************************
18 * Session
19 *****************************************************************************/
20
21///
22/// Create a Session to store local data in (such as cookies, local storage, application cache,
23/// indexed db, etc).
24///
25ULExport ULSession ulCreateSession(ULRenderer renderer, bool is_persistent, ULString name);
26
27///
28/// Destroy a Session.
29///
31
32///
33/// Get the default session (persistent session named "default").
34///
35/// @note This session is owned by the Renderer, you shouldn't destroy it.
36///
38
39///
40/// Whether or not is persistent (backed to disk).
41///
43
44///
45/// Unique name identifying the session (used for unique disk path).
46///
48
49///
50/// Unique numeric Id for the session.
51///
52ULExport unsigned long long ulSessionGetId(ULSession session);
53
54///
55/// The disk path to write to (used by persistent sessions only).
56///
58
59#ifdef __cplusplus
60} // extern "C"
61#endif
62
63#endif // ULTRALIGHT_CAPI_SESSION_H
struct C_String * ULString
Definition CAPI_Defines.h:54
struct C_Session * ULSession
Definition CAPI_Defines.h:50
#define ULExport
Definition CAPI_Defines.h:27
struct C_Renderer * ULRenderer
Definition CAPI_Defines.h:49
ULExport void ulDestroySession(ULSession session)
Destroy a Session.
ULExport unsigned long long ulSessionGetId(ULSession session)
Unique numeric Id for the session.
ULExport bool ulSessionIsPersistent(ULSession session)
Whether or not is persistent (backed to disk).
ULExport ULSession ulDefaultSession(ULRenderer renderer)
Get the default session (persistent session named "default").
ULExport ULString ulSessionGetDiskPath(ULSession session)
The disk path to write to (used by persistent sessions only).
ULExport ULSession ulCreateSession(ULRenderer renderer, bool is_persistent, ULString name)
Create a Session to store local data in (such as cookies, local storage, application cache,...
ULExport ULString ulSessionGetName(ULSession session)
Unique name identifying the session (used for unique disk path).