a round of renaming towards dc_io_* methods for start/stop/io scheduling

This commit is contained in:
holger krekel
2020-05-22 17:33:16 +02:00
parent c43285f6ac
commit d0686ada83
6 changed files with 34 additions and 56 deletions

View File

@@ -583,16 +583,32 @@ int dc_is_configured (const dc_context_t* context);
/**
* TODO: Document
* Start job and IMAP/SMTP tasks.
*
* @memberof dc_context_t
* @param context The context object as created by dc_context_new().
* @return None
*/
void dc_context_run (dc_context_t* context);
int dc_is_running (const dc_context_t* context);
void dc_io_start (dc_context_t* context);
/**
* TODO: Document
* Check if IO (SMTP/IMAP/Jobs) has been started.
*
* @memberof dc_context_t
* @param context The context object as created by dc_context_new().
* @return 1=IO is running;
* 0=IO is not running.
*/
void dc_context_shutdown(dc_context_t* context);
int dc_io_status(const dc_context_t* context);
/**
* Stop job and IMAP/SMTP tasks and return when they are finished.
*
* @memberof dc_context_t
* @param context The context object as created by dc_context_new().
* @return None
*/
void dc_io_stop(dc_context_t* context);
/**
* This function can be called whenever there is a hint

View File

@@ -481,7 +481,7 @@ pub unsafe extern "C" fn dc_is_configured(context: *mut dc_context_t) -> libc::c
}
#[no_mangle]
pub unsafe extern "C" fn dc_context_run(context: *mut dc_context_t) {
pub unsafe extern "C" fn dc_io_start(context: *mut dc_context_t) {
if context.is_null() {
return;
}
@@ -491,7 +491,7 @@ pub unsafe extern "C" fn dc_context_run(context: *mut dc_context_t) {
}
#[no_mangle]
pub unsafe extern "C" fn dc_is_running(context: *mut dc_context_t) -> libc::c_int {
pub unsafe extern "C" fn dc_io_status(context: *mut dc_context_t) -> libc::c_int {
if context.is_null() {
return 0;
}
@@ -665,7 +665,7 @@ pub unsafe extern "C" fn dc_get_next_event(context: *mut dc_context_t) -> *mut d
}
#[no_mangle]
pub unsafe extern "C" fn dc_context_shutdown(context: *mut dc_context_t) {
pub unsafe extern "C" fn dc_io_stop(context: *mut dc_context_t) {
if context.is_null() {
eprintln!("ignoring careless call to dc_shutdown()");
return;