create database struct methods

This commit is contained in:
yggverse 2024-09-11 00:01:42 +03:00
parent f0ff57e799
commit ae85b3bc71
4 changed files with 335 additions and 191 deletions

View file

@ -35,6 +35,35 @@ namespace app::browser::main::tab
UNDEFINED
};
struct DB
{
enum APP_BROWSER_MAIN_TAB_PAGE__SESSION
{
ID,
TIME,
MIME,
TITLE,
DESCRIPTION
};
static int init(
sqlite3 * db
);
static int clear(
sqlite3 * db,
const int & DB__APP_BROWSER_MAIN_TAB__SESSION_ID
);
static sqlite3_int64 add(
sqlite3 * db,
const sqlite3_int64 & DB__APP_BROWSER_MAIN_TAB__SESSION_ID,
const Page::MIME & MIME,
const Glib::ustring & TITLE,
const Glib::ustring & DESCRIPTION
);
};
private:
// Meta
@ -49,18 +78,6 @@ namespace app::browser::main::tab
// Database
sqlite3 * db;
struct DB
{
enum APP_BROWSER_MAIN_TAB_PAGE__SESSION
{
ID,
TIME,
MIME,
TITLE,
DESCRIPTION
};
};
// Socket
char buffer[0xfffff]; // 1Mb