2024-09-22 13:04:27 +03:00
|
|
|
use std::sync::Arc;
|
|
|
|
|
2024-09-22 13:17:18 +03:00
|
|
|
pub struct Browser {
|
2024-09-22 13:23:46 +03:00
|
|
|
connection: Arc<sqlite::Connection>,
|
2024-09-22 13:04:27 +03:00
|
|
|
}
|
|
|
|
|
2024-09-22 13:17:18 +03:00
|
|
|
impl Browser {
|
2024-09-22 17:34:22 +03:00
|
|
|
// Construct new browser DB (connection)
|
|
|
|
pub fn new(connection: Arc<sqlite::Connection>) -> Browser {
|
|
|
|
let this = Self { connection };
|
|
|
|
this.init();
|
|
|
|
this
|
|
|
|
}
|
|
|
|
|
|
|
|
// Create browser table in DB if not exist yet
|
2024-09-22 13:04:27 +03:00
|
|
|
fn init(&self) {}
|
2024-09-22 17:34:22 +03:00
|
|
|
|
|
|
|
// Save active browser session to DB
|
2024-09-22 13:04:27 +03:00
|
|
|
fn save(&self) {}
|
2024-09-22 13:23:46 +03:00
|
|
|
|
2024-09-22 17:34:22 +03:00
|
|
|
// Restore previous browser session from DB
|
|
|
|
fn restore(&self) {}
|
2024-09-22 13:23:46 +03:00
|
|
|
}
|