Dmitry Bogatov
1d75f8478c
Rustify type of dc_mimepart_t.msg_raw
2019-09-06 23:15:27 +00:00
Dmitry Bogatov
e0df78c5f7
Change type of dc_mimepart_t.is_meta to bool
2019-09-06 03:41:18 +00:00
holger krekel
0a6e540394
rename dc_securejoin to securejoin.rs
2019-09-05 22:55:25 +02:00
holger krekel
79510a83de
- remove many *libc::char usages, and c-pointer from fingerprint
...
- rustify get_chat_id_by_grpid and streamline returned chat id handling (thereby apprently fixing the test, don't ask)
2019-09-05 22:55:25 +02:00
dignifiedquire
3944592c09
refactor(e2ee): restructure types a and method slightly
2019-09-03 19:05:21 +02:00
Dmitry Bogatov
6288909481
Refactor is_known_rfc724_mid() to use Iterator interface
2019-09-03 16:08:52 +02:00
Dmitry Bogatov
c95f134963
Change return type of is_known_rfc724_mid_in_list() to bool
2019-09-03 16:08:52 +02:00
Alexander Krotov
aeb1a88e7a
Remove dc_move.rs
...
and move dc_do_heuristics_moves to context.rs
2019-09-03 13:39:14 +02:00
Alexander Krotov
b5a9cc1380
Convert DC_*_ID_* constants to u32
2019-09-01 23:41:05 +03:00
Dmitry Bogatov
2fe07e86c7
Replace explicit casts from 0 to pointer with std::ptr::null
2019-08-27 21:22:03 +00:00
Dmitry Bogatov
eca11a74d7
Change type of dc_mimepart_t.msg to Option<String>
2019-08-27 22:20:45 +02:00
Dmitry Bogatov
b3df24d188
Make dc_mimeparser_is_mailinglist_message() return bool, not int
2019-08-27 22:20:45 +02:00
Dmitry Bogatov
86eb9cc058
Change type of `dc_mimeparser_t.type_0' to constants::Viewtype
...
Adjust use sites accordingly.
2019-08-27 22:20:45 +02:00
Dmitry Bogatov
7650e1c7df
Narrow type of dc_mimeparser_t.is_send_by_messenger to bool
2019-08-27 22:20:45 +02:00
Dmitry Bogatov
8e4a01c98d
Make dc_mimeparser_parse() return parser instead of modifying reference
...
Since dc_mimeparser_parse() called `dc_mimeparser_empty()' on passed reference
anyway, it makes more sense to create new instance of `dc_mimeparser_t' and
return it instead.
Previously, usage pattern was following:
dc_mimeparser_new()
dc_mimeparser_empty() // semantically no-op, called inside dc_mimeparser_parse
Now call to dc_mimeparser_empty() is avoided.
2019-08-27 22:20:45 +02:00
Dmitry Bogatov
21976b14a6
dc_mimeparser_parse: accept input as slice, not as pointer + length
2019-08-27 22:20:45 +02:00
dignifiedquire
3f8abd2218
refactor(location): make location on the kml object not optional
2019-08-26 21:49:47 +02:00
dignifiedquire
d25d839d6a
refactor(location): more rusty api
2019-08-26 21:29:40 +02:00
dignifiedquire
23d49560bf
refactor(location): rename module dc_location -> location
2019-08-26 21:09:40 +02:00
dignifiedquire
bb16849eef
refactor(location): remove most unsafe usage
2019-08-26 21:07:53 +02:00
dignifiedquire
39abb0b0ad
refactor(message): rename dc_msg to message
2019-08-19 12:13:11 +02:00
Friedel Ziegelmayer
a906faeb35
refactor: a rusty job
...
* refactor(jobthread): safe and rusty
* refactor(job): rusty and safe
2019-08-19 12:07:13 +02:00
dignifiedquire
886262539a
refactor: save lot implementation and follow up refactors
...
rewrote qr code to match the now safe lot
2019-08-19 08:06:54 +02:00
dignifiedquire
9b1a74cc22
refactor(chat): remove C strings from the public interface
2019-08-17 11:40:43 +02:00
dignifiedquire
25e97df641
refactor(chat): store rust strings in the chat struct
2019-08-17 11:35:02 +02:00
dignifiedquire
001880e1f0
refactor(chat): first round of method renaming and restructuring
2019-08-17 11:34:10 +02:00
dignifiedquire
ddfd067e97
refactor(chat): rust based memory management
2019-08-17 11:30:26 +02:00
dignifiedquire
64117c2964
refactor(chat): rename dc_chat to chat
2019-08-17 11:30:26 +02:00
dignifiedquire
c8ce099f22
refactor(chat): improve field types by using enums and bools
2019-08-17 11:29:08 +02:00
Alexander Krotov
1a42a1e6b1
Replace dc_array with Vec in dc_receive_imf.rs
2019-08-17 01:04:37 +02:00
Dmitry Bogatov
8342b29618
Fix some clippy warnings
2019-08-14 01:45:39 +02:00
holger krekel
ba381d0d0b
fix failing array asserts #355
2019-08-13 23:07:38 +02:00
Friedel Ziegelmayer
ed237c8d25
refactor(receive_imf): first pass at some more sanity
2019-08-13 17:58:32 +02:00
Alexander Krotov
d46a5345d2
Use Vec instead of dc_array_t in search_chat_ids_by_contact_ids
2019-08-13 17:54:28 +02:00
holger krekel
750d6e99a8
fix some longer standing nonsense code that sent to misleading MSG_READ events instead of one correct one
2019-08-09 11:32:24 +02:00
holger krekel
a67892d414
(jikstra, hpk) fix a logic bug introduced with the stock-string merge which set the better message only if it was empty
2019-08-09 11:32:24 +02:00
Friedel Ziegelmayer
ea6972118a
refactor: rusty contact
...
* refactor(contact): rename and rusty memory allocations
* refactor(contact): use enum to indidcate origin
* refactor(contact): safe blocking and unblocking api
* refactor(contact): only safe and no more cstrings
2019-08-07 22:20:48 +02:00
jikstra
5b368960c0
Apply requested changes
2019-08-06 21:33:01 +02:00
jikstra
45eec35e6e
Make dc_extract_grpid_from_rfc724_mid take/return &str instead of String
2019-08-06 21:33:01 +02:00
jikstra
b74a86f617
Run cargo fmt
2019-08-06 21:33:01 +02:00
jikstra
ff95c44d51
Make receive_imf use safe version of dc_extract_grpid_from_rfc724_mid
...
- Remove unused unsafe wrapper
- Adjust tests to use safe version
2019-08-06 21:33:01 +02:00
Alexander Krotov
a4f94dbf86
Store dc_mimeparser_t::parts as Vec instead of carray
2019-08-01 23:21:56 +03:00
Floris Bruynooghe
b6b0849bce
Remove to_cstring() naming convention ambiguity
...
Add a trait for str.strdup() to replace to_cstring() which avoid the
signature ambiguity with .to_string().
Also instruduce CString::yolo() as a shortcut to
CString::new().unwrap() and use it whenever the variable does can be
deallocated by going out of scope. This is less error prone.
Use some Path.to_c_string() functions where possible.
2019-08-01 19:06:39 +02:00
Friedel Ziegelmayer
e7456248a0
Merge pull request #244 from link2xt/dc_location_vec
...
Replace some dc_array_t with Vec<dc_location>
2019-07-31 22:15:35 +02:00
Friedel Ziegelmayer
39e9cfd908
Merge pull request #269 from link2xt/dc_array_sort_ids
...
Make dc_array_sort_ids() safe and move it into impl
2019-07-31 22:04:17 +02:00
Alexander Krotov
8267ffb8d2
Replace dc_mimeparser_t::reports carray with Vec
2019-07-31 15:57:05 +03:00
Alexander Krotov
d6dae0a9e8
Make dc_array_sort_ids() safe and move it into impl
2019-07-31 03:21:13 +03:00
Alexander Krotov
81a84620eb
Store dc_kml_t::locations as Option<dc_array_t> instead of pointer
2019-07-30 02:34:05 +03:00
Friedel Ziegelmayer
188da2a020
refactor(params): rustify
2019-07-29 01:49:53 +02:00
Dmitry Bogatov
c6ccfd824e
Override `non_shake_case' warning on per-function basis
...
This change removes global override of `non_shake_case' warning and replaces it
with per-function overrrides. This way, compiler will complain about style
guide violation in new code.
It should be noted, that `rustc' is not smart enough to emit warning when
override is no longer needed, it must be checked manually.
2019-07-28 22:44:21 +02:00