mirror of
https://github.com/chatmail/core.git
synced 2026-05-13 11:56:30 +03:00
Prepare for android builds (#88)
* upgrade ci * fixup * update ci script * Update run.sh * refactor(time): drop libc time functions * fix(ffi): use i64 instead off time_t * fix(ci): install croos * fix: remove unused dc_check_password * fix(ffi): enable ssl vendoring by default * chore: remove unused import * fix(deps): add vendored flag for reqwest * chore(ci): use cross fork * fix: handle invalid server configurations Closes #90 * Disable android from circle ci for now
This commit is contained in:
committed by
Lars-Magnus Skog
parent
2a5d0c64d5
commit
0d51c7dd2e
@@ -17,3 +17,6 @@ crate-type = ["cdylib", "staticlib"]
|
||||
[dependencies]
|
||||
deltachat = { path = "../" }
|
||||
libc = "0.2"
|
||||
|
||||
[features]
|
||||
default = ["deltachat/vendored"]
|
||||
@@ -339,7 +339,6 @@ dc_contact_t* dc_get_contact (dc_context_t*, uint32_t contact_id
|
||||
#define DC_IMEX_IMPORT_BACKUP 12 // param1 is the file with the backup to import
|
||||
void dc_imex (dc_context_t*, int what, const char* param1, const char* param2);
|
||||
char* dc_imex_has_backup (dc_context_t*, const char* dir);
|
||||
int dc_check_password (dc_context_t*, const char* pw);
|
||||
char* dc_initiate_key_transfer (dc_context_t*);
|
||||
int dc_continue_key_transfer (dc_context_t*, uint32_t msg_id, const char* setup_code);
|
||||
void dc_stop_ongoing_process (dc_context_t*);
|
||||
@@ -364,7 +363,7 @@ uint32_t dc_join_securejoin (dc_context_t*, const char* qr);
|
||||
void dc_send_locations_to_chat (dc_context_t*, uint32_t chat_id, int seconds);
|
||||
int dc_is_sending_locations_to_chat (dc_context_t*, uint32_t chat_id);
|
||||
int dc_set_location (dc_context_t*, double latitude, double longitude, double accuracy);
|
||||
dc_array_t* dc_get_locations (dc_context_t*, uint32_t chat_id, uint32_t contact_id, time_t timestamp_begin, time_t timestamp_end);
|
||||
dc_array_t* dc_get_locations (dc_context_t*, uint32_t chat_id, uint32_t contact_id, int64_t timestamp_begin, int64_t timestamp_end);
|
||||
void dc_delete_all_locations (dc_context_t*);
|
||||
|
||||
|
||||
@@ -389,7 +388,7 @@ void* dc_array_get_ptr (const dc_array_t*, size_t index);
|
||||
double dc_array_get_latitude (const dc_array_t*, size_t index);
|
||||
double dc_array_get_longitude (const dc_array_t*, size_t index);
|
||||
double dc_array_get_accuracy (const dc_array_t*, size_t index);
|
||||
time_t dc_array_get_timestamp (const dc_array_t*, size_t index);
|
||||
int64_t dc_array_get_timestamp (const dc_array_t*, size_t index);
|
||||
uint32_t dc_array_get_chat_id (const dc_array_t*, size_t index);
|
||||
uint32_t dc_array_get_contact_id (const dc_array_t*, size_t index);
|
||||
uint32_t dc_array_get_msg_id (const dc_array_t*, size_t index);
|
||||
@@ -524,9 +523,9 @@ uint32_t dc_msg_get_from_id (const dc_msg_t*);
|
||||
uint32_t dc_msg_get_chat_id (const dc_msg_t*);
|
||||
int dc_msg_get_viewtype (const dc_msg_t*);
|
||||
int dc_msg_get_state (const dc_msg_t*);
|
||||
time_t dc_msg_get_timestamp (const dc_msg_t*);
|
||||
time_t dc_msg_get_received_timestamp (const dc_msg_t*);
|
||||
time_t dc_msg_get_sort_timestamp (const dc_msg_t*);
|
||||
int64_t dc_msg_get_timestamp (const dc_msg_t*);
|
||||
int64_t dc_msg_get_received_timestamp (const dc_msg_t*);
|
||||
int64_t dc_msg_get_sort_timestamp (const dc_msg_t*);
|
||||
char* dc_msg_get_text (const dc_msg_t*);
|
||||
char* dc_msg_get_file (const dc_msg_t*);
|
||||
char* dc_msg_get_filename (const dc_msg_t*);
|
||||
@@ -617,7 +616,7 @@ char* dc_lot_get_text2 (const dc_lot_t*);
|
||||
int dc_lot_get_text1_meaning (const dc_lot_t*);
|
||||
int dc_lot_get_state (const dc_lot_t*);
|
||||
uint32_t dc_lot_get_id (const dc_lot_t*);
|
||||
time_t dc_lot_get_timestamp (const dc_lot_t*);
|
||||
int64_t dc_lot_get_timestamp (const dc_lot_t*);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -917,13 +917,19 @@ pub unsafe extern "C" fn dc_get_locations(
|
||||
context: *mut dc_context_t,
|
||||
chat_id: libc::uint32_t,
|
||||
contact_id: libc::uint32_t,
|
||||
timestamp_begin: libc::time_t,
|
||||
timestamp_end: libc::time_t,
|
||||
timestamp_begin: i64,
|
||||
timestamp_end: i64,
|
||||
) -> *mut dc_array::dc_array_t {
|
||||
assert!(!context.is_null());
|
||||
let context = &*context;
|
||||
|
||||
dc_location::dc_get_locations(context, chat_id, contact_id, timestamp_begin, timestamp_end)
|
||||
dc_location::dc_get_locations(
|
||||
context,
|
||||
chat_id,
|
||||
contact_id,
|
||||
timestamp_begin as i64,
|
||||
timestamp_end as i64,
|
||||
)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
@@ -1007,7 +1013,7 @@ pub unsafe extern "C" fn dc_array_get_accuracy(
|
||||
pub unsafe extern "C" fn dc_array_get_timestamp(
|
||||
array: *const dc_array_t,
|
||||
index: libc::size_t,
|
||||
) -> libc::time_t {
|
||||
) -> i64 {
|
||||
dc_array::dc_array_get_timestamp(array, index)
|
||||
}
|
||||
#[no_mangle]
|
||||
@@ -1232,17 +1238,17 @@ pub unsafe extern "C" fn dc_msg_get_state(msg: *mut dc_msg::dc_msg_t) -> libc::c
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn dc_msg_get_timestamp(msg: *mut dc_msg::dc_msg_t) -> libc::time_t {
|
||||
pub unsafe extern "C" fn dc_msg_get_timestamp(msg: *mut dc_msg::dc_msg_t) -> i64 {
|
||||
dc_msg::dc_msg_get_timestamp(msg)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn dc_msg_get_received_timestamp(msg: *mut dc_msg::dc_msg_t) -> libc::time_t {
|
||||
pub unsafe extern "C" fn dc_msg_get_received_timestamp(msg: *mut dc_msg::dc_msg_t) -> i64 {
|
||||
dc_msg::dc_msg_get_received_timestamp(msg)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn dc_msg_get_sort_timestamp(msg: *mut dc_msg::dc_msg_t) -> libc::time_t {
|
||||
pub unsafe extern "C" fn dc_msg_get_sort_timestamp(msg: *mut dc_msg::dc_msg_t) -> i64 {
|
||||
dc_msg::dc_msg_get_sort_timestamp(msg)
|
||||
}
|
||||
|
||||
@@ -1527,6 +1533,6 @@ pub unsafe extern "C" fn dc_lot_get_id(lot: *mut dc_lot::dc_lot_t) -> libc::uint
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn dc_lot_get_timestamp(lot: *mut dc_lot::dc_lot_t) -> libc::time_t {
|
||||
pub unsafe extern "C" fn dc_lot_get_timestamp(lot: *mut dc_lot::dc_lot_t) -> i64 {
|
||||
dc_lot::dc_lot_get_timestamp(lot)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user