Use DC_PARAM_* constants everywhere

Also document each type they store.  This makes existing code a little
more readable and gives some hints towards refactoring this.
This commit is contained in:
Floris Bruynooghe
2019-07-21 20:25:52 +02:00
parent 3dfd623db7
commit 7774052911
12 changed files with 318 additions and 184 deletions

View File

@@ -76,7 +76,7 @@ pub unsafe fn dc_send_locations_to_chat(
0 as *const libc::c_char,
0,
);
dc_param_set_int((*msg).param, 'S' as i32, 8i32);
dc_param_set_int((*msg).param, DC_PARAM_CMD as i32, 8);
dc_send_msg(context, chat_id, msg);
} else if 0 == seconds && is_sending_locations_before {
stock_str = dc_stock_system_msg(
@@ -688,7 +688,7 @@ pub unsafe fn dc_job_do_DC_JOB_MAYBE_SEND_LOCATIONS(context: &Context, _job: *mu
// and dc_set_location() is typically called periodically, this is ok)
let mut msg = dc_msg_new(context, 10);
(*msg).hidden = 1;
dc_param_set_int((*msg).param, 'S' as i32, 9);
dc_param_set_int((*msg).param, DC_PARAM_CMD as i32, 9);
dc_send_msg(context, chat_id as u32, msg);
dc_msg_unref(msg);
}