holger krekel
2b038a34c9
Merge branch 'master' into refactor/remove-mprintf
2019-09-17 15:46:05 +02:00
dignifiedquire
6be3c9a48a
refactor: improve mime field lookup
2019-09-16 22:58:10 +02:00
dignifiedquire
c0747bf68d
refactor: use enum for system messages
2019-09-16 22:58:10 +02:00
dignifiedquire
0346dd15d9
refactor(mimeparser): some more sanity
2019-09-16 22:58:10 +02:00
dignifiedquire
72a9ca0aa5
refactor(receive_imf): remove dc_mprintf
2019-09-16 07:58:08 +02:00
dignifiedquire
0bf3d20e07
fix and implement ffi tranlation
2019-09-15 23:40:08 +02:00
dignifiedquire
5486ac5b9f
refacor: use an enum for events
2019-09-15 23:40:08 +02:00
dignifiedquire
16c281a9b7
refactor(context): safe interface
2019-09-15 16:36:31 +02:00
dignifiedquire
f31f341a50
feat: enforce Debug implementations and remove mod types
2019-09-15 16:36:31 +02:00
björn petersen
79d23909b5
fix 'this message is not encrypted' error in verified groups ( #522 )
2019-09-14 18:55:19 +02:00
Alexander Krotov
50a812ea5e
Return bool from mailmime_transfer_decode
2019-09-14 12:03:10 +03:00
Dmitry Bogatov
bb4081e503
Rename query_row_col to query_get_value
...
Since function `query_row_col` no longer accept column number argument,
it is misleading to mention column in its name.
2019-09-12 18:42:12 +00:00
Dmitry Bogatov
cdfc7281d0
Simplify Sql.query_row_col function
...
Function `query_row` executes query and calls callback function to process
row returned. Function query_row_col() is special case, that provides
callback function, which returns value of one particular column of row,
ignoring others.
In all cases, that particular column was 0 (first and only column of
query result), since there is no point to select more than one column
with this function -- they are discarded anyway.
This commit removes that redundancy, removing column number argument of
query_row_col() function and adjusting call sites accordingly.
2019-09-12 05:01:06 +00:00
Floris Bruynooghe
aefddf7f5e
Remove context refrence from Contact struct
...
This will allow the Rust Context API to be refactored without breaking
the C API. Full details in #476 aka
a0b5e32f98
2019-09-11 23:53:48 +02:00
Floris Bruynooghe
8302d6833d
Remove context ref from Chat struct
...
Leaving the C API untouched. See #476 aka
a0b5e32f98 for more extensive rationale.
2019-09-11 23:53:48 +02:00
Dmitry Bogatov
57daa0f7f0
Remove useless argument of logging macros
...
Previously, logging macros (info! warn! error!) accepted integer
argument (data1), that was passed to callback function verbatim. In all
call sites this argument was 0.
With this change, that data1 argument is no longer part of macro
interface, 0 is always passed to callback in internals of these macros.
2019-09-10 22:26:47 +00:00
B. Petersen
e9da21a02e
cargo fmt
2019-09-10 19:14:51 +02:00
B. Petersen
bf1d9b6d06
fix crash when msg_raw is None
2019-09-10 15:20:38 +02:00
holger krekel
650d8c45ec
fix test, and cleanup according profile-image API
2019-09-09 18:07:32 +02:00
holger krekel
383d8980d6
add profile image API to python, tests, Rust fixes/cleanups
2019-09-09 18:07:32 +02:00
B. Petersen
1367873949
check bounds before accessing Vec
2019-09-09 01:47:50 +02:00
B. Petersen
d933183e0a
mark safe functions as such
2019-09-09 01:47:50 +02:00
B. Petersen
7e11def527
make code more readable
2019-09-09 00:01:15 +02:00
Dmitry Bogatov
a4e4b0fc17
Rustify type of dc_mimeparser_t.subject
2019-09-06 23:15:31 +00:00
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