mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
create database struct methods
This commit is contained in:
parent
f0ff57e799
commit
ae85b3bc71
4 changed files with 335 additions and 191 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue