mirror of
https://github.com/chatmail/core.git
synced 2026-05-09 01:46:30 +03:00
run rustfmt
This commit is contained in:
@@ -911,20 +911,15 @@ pub unsafe fn dc_mimefactory_render(mut factory: *mut dc_mimefactory_t) -> libc:
|
|||||||
if !meta_part.is_null() {
|
if !meta_part.is_null() {
|
||||||
mailmime_smart_add_part(message, meta_part);
|
mailmime_smart_add_part(message, meta_part);
|
||||||
}
|
}
|
||||||
if 0 != dc_param_exists((*msg).param, DC_PARAM_SET_LATITUDE as libc::c_int)
|
if 0 != dc_param_exists((*msg).param, DC_PARAM_SET_LATITUDE as libc::c_int) {
|
||||||
{
|
let latitude =
|
||||||
let latitude = dc_param_get_float(
|
dc_param_get_float((*msg).param, DC_PARAM_SET_LATITUDE as libc::c_int, 0.0);
|
||||||
(*msg).param,
|
|
||||||
DC_PARAM_SET_LATITUDE as libc::c_int,
|
|
||||||
0.0,
|
|
||||||
);
|
|
||||||
let longitude = dc_param_get_float(
|
let longitude = dc_param_get_float(
|
||||||
(*msg).param,
|
(*msg).param,
|
||||||
DC_PARAM_SET_LONGITUDE as libc::c_int,
|
DC_PARAM_SET_LONGITUDE as libc::c_int,
|
||||||
0.0,
|
0.0,
|
||||||
);
|
);
|
||||||
let kml_file =
|
let kml_file = dc_get_message_kml((*msg).timestamp_sort, latitude, longitude);
|
||||||
dc_get_message_kml((*msg).timestamp_sort, latitude, longitude);
|
|
||||||
if !kml_file.is_null() {
|
if !kml_file.is_null() {
|
||||||
let content_type = mailmime_content_new_with_str(
|
let content_type = mailmime_content_new_with_str(
|
||||||
b"application/vnd.google-earth.kml+xml\x00" as *const u8
|
b"application/vnd.google-earth.kml+xml\x00" as *const u8
|
||||||
@@ -932,9 +927,7 @@ pub unsafe fn dc_mimefactory_render(mut factory: *mut dc_mimefactory_t) -> libc:
|
|||||||
);
|
);
|
||||||
let mime_fields = mailmime_fields_new_filename(
|
let mime_fields = mailmime_fields_new_filename(
|
||||||
MAILMIME_DISPOSITION_TYPE_ATTACHMENT as libc::c_int,
|
MAILMIME_DISPOSITION_TYPE_ATTACHMENT as libc::c_int,
|
||||||
dc_strdup(
|
dc_strdup(b"message.kml\x00" as *const u8 as *const libc::c_char),
|
||||||
b"message.kml\x00" as *const u8 as *const libc::c_char,
|
|
||||||
),
|
|
||||||
MAILMIME_MECHANISM_8BIT as libc::c_int,
|
MAILMIME_MECHANISM_8BIT as libc::c_int,
|
||||||
);
|
);
|
||||||
let kml_mime_part = mailmime_new_empty(content_type, mime_fields);
|
let kml_mime_part = mailmime_new_empty(content_type, mime_fields);
|
||||||
@@ -952,27 +945,21 @@ pub unsafe fn dc_mimefactory_render(mut factory: *mut dc_mimefactory_t) -> libc:
|
|||||||
&mut last_added_location_id,
|
&mut last_added_location_id,
|
||||||
);
|
);
|
||||||
if !kml_file.is_null() {
|
if !kml_file.is_null() {
|
||||||
let content_type: *mut mailmime_content =
|
let content_type: *mut mailmime_content = mailmime_content_new_with_str(
|
||||||
mailmime_content_new_with_str(
|
|
||||||
b"application/vnd.google-earth.kml+xml\x00" as *const u8
|
b"application/vnd.google-earth.kml+xml\x00" as *const u8
|
||||||
as *const libc::c_char,
|
as *const libc::c_char,
|
||||||
);
|
);
|
||||||
let mime_fields: *mut mailmime_fields =
|
let mime_fields: *mut mailmime_fields = mailmime_fields_new_filename(
|
||||||
mailmime_fields_new_filename(
|
|
||||||
MAILMIME_DISPOSITION_TYPE_ATTACHMENT as libc::c_int,
|
MAILMIME_DISPOSITION_TYPE_ATTACHMENT as libc::c_int,
|
||||||
dc_strdup(
|
dc_strdup(b"location.kml\x00" as *const u8 as *const libc::c_char),
|
||||||
b"location.kml\x00" as *const u8 as *const libc::c_char,
|
|
||||||
),
|
|
||||||
MAILMIME_MECHANISM_8BIT as libc::c_int,
|
MAILMIME_MECHANISM_8BIT as libc::c_int,
|
||||||
);
|
);
|
||||||
let kml_mime_part: *mut mailmime =
|
let kml_mime_part: *mut mailmime =
|
||||||
mailmime_new_empty(content_type, mime_fields);
|
mailmime_new_empty(content_type, mime_fields);
|
||||||
mailmime_set_body_text(kml_mime_part, kml_file, strlen(kml_file));
|
mailmime_set_body_text(kml_mime_part, kml_file, strlen(kml_file));
|
||||||
mailmime_smart_add_part(message, kml_mime_part);
|
mailmime_smart_add_part(message, kml_mime_part);
|
||||||
if 0 == dc_param_exists(
|
if 0 == dc_param_exists((*msg).param, DC_PARAM_SET_LATITUDE as libc::c_int)
|
||||||
(*msg).param,
|
{
|
||||||
DC_PARAM_SET_LATITUDE as libc::c_int,
|
|
||||||
) {
|
|
||||||
// otherwise, the independent location is already filed
|
// otherwise, the independent location is already filed
|
||||||
(*factory).out_last_added_location_id = last_added_location_id;
|
(*factory).out_last_added_location_id = last_added_location_id;
|
||||||
}
|
}
|
||||||
@@ -1030,12 +1017,9 @@ pub unsafe fn dc_mimefactory_render(mut factory: *mut dc_mimefactory_t) -> libc:
|
|||||||
);
|
);
|
||||||
return cleanup(e2ee_helper);
|
return cleanup(e2ee_helper);
|
||||||
}
|
}
|
||||||
if (*factory).loaded as libc::c_uint
|
if (*factory).loaded as libc::c_uint == DC_MF_MDN_LOADED as libc::c_int as libc::c_uint {
|
||||||
== DC_MF_MDN_LOADED as libc::c_int as libc::c_uint
|
|
||||||
{
|
|
||||||
let e: *mut libc::c_char = dc_stock_str((*factory).context, 31);
|
let e: *mut libc::c_char = dc_stock_str((*factory).context, 31);
|
||||||
subject_str =
|
subject_str = dc_mprintf(b"Chat: %s\x00" as *const u8 as *const libc::c_char, e);
|
||||||
dc_mprintf(b"Chat: %s\x00" as *const u8 as *const libc::c_char, e);
|
|
||||||
free(e as *mut libc::c_void);
|
free(e as *mut libc::c_void);
|
||||||
} else {
|
} else {
|
||||||
subject_str = get_subject((*factory).chat, (*factory).msg, afwd_email)
|
subject_str = get_subject((*factory).chat, (*factory).msg, afwd_email)
|
||||||
|
|||||||
Reference in New Issue
Block a user