crate::ix!();
pub fn split_wallet_path(
wallet_path: &Path,
env_directory: &mut Path,
database_filename: &mut String) {
todo!();
}
pub struct DummyBatch {
base: DatabaseBatch,
}
impl DummyBatch {
pub fn read_key(&mut self,
key: DataStream,
value: &mut DataStream) -> bool {
todo!();
}
pub fn write_key(&mut self,
key: DataStream,
value: DataStream,
overwrite: Option<bool>) -> bool {
let overwrite: bool = overwrite.unwrap_or(true);
todo!();
}
pub fn erase_key(&mut self, key: DataStream) -> bool {
todo!();
}
pub fn has_key(&mut self, key: DataStream) -> bool {
todo!();
}
pub fn flush(&mut self) { }
pub fn close(&mut self) { }
pub fn start_cursor(&mut self) -> bool {
todo!();
}
pub fn read_at_cursor(&mut self,
ss_key: &mut DataStream,
ss_value: &mut DataStream,
complete: &mut bool) -> bool {
todo!();
}
pub fn close_cursor(&mut self) { }
pub fn txn_begin(&mut self) -> bool {
todo!();
}
pub fn txn_commit(&mut self) -> bool {
todo!();
}
pub fn txn_abort(&mut self) -> bool {
todo!();
}
}
pub struct DummyDatabase {
base: WalletDatabase,
}
impl DummyDatabase {
pub fn open(&mut self) {
}
pub fn add_ref(&mut self) {
}
pub fn remove_ref(&mut self) {
}
pub fn rewrite(&mut self, psz_skip: Option<*const u8>) -> bool {
todo!();
}
pub fn backup(&self, str_dest: &String) -> bool {
todo!();
}
pub fn close(&mut self) {
}
pub fn flush(&mut self) {
}
pub fn periodic_flush(&mut self) -> bool {
todo!();
}
pub fn increment_update_counter(&mut self) {
todo!();
}
pub fn reload_db_env(&mut self) {
}
pub fn filename(&mut self) -> String {
todo!();
}
pub fn format(&mut self) -> String {
todo!();
}
pub fn make_batch(&mut self, flush_on_close: Option<bool>) -> Box<DatabaseBatch> {
let flush_on_close: bool = flush_on_close.unwrap_or(true);
todo!();
}
}
pub enum DatabaseFormat {
BERKELEY,
SQLITE,
}
pub struct DatabaseOptions {
require_existing: bool, require_create: bool, require_format: Option<DatabaseFormat>,
create_flags: u64, create_passphrase: SecureString,
verify: bool, }
pub enum DatabaseStatus {
SUCCESS,
FAILED_BAD_PATH,
FAILED_BAD_FORMAT,
FAILED_ALREADY_LOADED,
FAILED_ALREADY_EXISTS,
FAILED_NOT_FOUND,
FAILED_CREATE,
FAILED_LOAD,
FAILED_VERIFY,
FAILED_ENCRYPT,
}
pub fn make_database(
path: &Path,
options: &DatabaseOptions,
status: &mut DatabaseStatus,
error: &mut BilingualStr) -> Box<WalletDatabase> {
todo!();
}
pub fn list_databases(wallet_dir: &Path) -> Vec<Box<Path>> {
todo!();
}
pub fn bdb_data_file(wallet_path: &Path) -> Box<Path> {
todo!();
}
pub fn sq_lite_data_file(path: &Path) -> Box<Path> {
todo!();
}
pub fn is_bdb_file(path: &Path) -> bool {
todo!();
}
pub fn is_sq_lite_file(path: &Path) -> bool {
todo!();
}