mirror of
https://github.com/chatmail/core.git
synced 2026-05-05 06:16:30 +03:00
refactor: rename dc_sqlite3 to sql
This commit is contained in:
@@ -6,10 +6,10 @@ use crate::dc_e2ee::*;
|
||||
use crate::dc_job::*;
|
||||
use crate::dc_loginparam::*;
|
||||
use crate::dc_saxparser::*;
|
||||
use crate::dc_sqlite3::*;
|
||||
use crate::dc_tools::*;
|
||||
use crate::imap::*;
|
||||
use crate::oauth2::*;
|
||||
use crate::sql;
|
||||
use crate::types::*;
|
||||
use crate::x::*;
|
||||
|
||||
@@ -75,7 +75,7 @@ pub unsafe fn dc_has_ongoing(context: &Context) -> libc::c_int {
|
||||
}
|
||||
}
|
||||
pub fn dc_is_configured(context: &Context) -> libc::c_int {
|
||||
if dc_sqlite3_get_config_int(context, &context.sql, "configured", 0) > 0 {
|
||||
if sql::get_config_int(context, &context.sql, "configured", 0) > 0 {
|
||||
1
|
||||
} else {
|
||||
0
|
||||
@@ -168,7 +168,7 @@ pub unsafe fn dc_job_do_DC_JOB_CONFIGURE_IMAP(context: &Context, _job: *mut dc_j
|
||||
.and_then(|e| e.parse().ok())
|
||||
{
|
||||
param.addr = oauth2_addr;
|
||||
dc_sqlite3_set_config(
|
||||
sql::set_config(
|
||||
context,
|
||||
&context.sql,
|
||||
"addr",
|
||||
@@ -904,7 +904,7 @@ pub unsafe fn dc_job_do_DC_JOB_CONFIGURE_IMAP(context: &Context, _job: *mut dc_j
|
||||
=
|
||||
if 0
|
||||
!=
|
||||
dc_sqlite3_get_config_int(
|
||||
sql::get_config_int(
|
||||
context, &context.sql,
|
||||
"mvbox_watch",
|
||||
1
|
||||
@@ -912,7 +912,7 @@ pub unsafe fn dc_job_do_DC_JOB_CONFIGURE_IMAP(context: &Context, _job: *mut dc_j
|
||||
||
|
||||
0
|
||||
!=
|
||||
dc_sqlite3_get_config_int(
|
||||
sql::get_config_int(
|
||||
context,
|
||||
&context.sql,
|
||||
"mvbox_move",
|
||||
@@ -959,12 +959,12 @@ pub unsafe fn dc_job_do_DC_JOB_CONFIGURE_IMAP(context: &Context, _job: *mut dc_j
|
||||
&context.sql,
|
||||
"configured_",
|
||||
);
|
||||
dc_sqlite3_set_config_int(
|
||||
context,
|
||||
&context.sql,
|
||||
"configured",
|
||||
1,
|
||||
);
|
||||
sql::set_config_int(
|
||||
context,
|
||||
&context.sql,
|
||||
"configured",
|
||||
1,
|
||||
);
|
||||
if !s.shall_stop_ongoing
|
||||
{
|
||||
context.call_cb(
|
||||
@@ -1489,7 +1489,7 @@ pub fn dc_connect_to_configured_imap(context: &Context, imap: &Imap) -> libc::c_
|
||||
|
||||
if imap.is_connected() {
|
||||
ret_connected = 1
|
||||
} else if dc_sqlite3_get_config_int(context, &context.sql, "configured", 0) == 0 {
|
||||
} else if sql::get_config_int(context, &context.sql, "configured", 0) == 0 {
|
||||
warn!(context, 0, "Not configured, cannot connect.",);
|
||||
} else {
|
||||
let param = dc_loginparam_read(context, &context.sql, "configured_");
|
||||
|
||||
Reference in New Issue
Block a user