Dmitry Bogatov
c5803d9b4c
Remove useless catch-all pattern-matching
2019-09-12 04:17:00 +00:00
Dmitry Bogatov
f198ce29b1
Drop unsafe version of dc_get_abs_path
2019-09-12 04:11:43 +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
Floris Bruynooghe
a0b5e32f98
Remove the context reference from Message struct
...
The Message struct had a reference to the context which made a few
APIs a little easier. However it has surprising consequences a long
way down the line as shown in #335 : it means any object which has such
a reference needs to keep open a lock if we want to do this refactor
of no longer having a "closed" Context struct on the Rust API (which
has many benefits which will simply that Context struct and is more
the Rust way - RAII etc).
By refactoring away the context reference on the rust API as done in
here however, we push this behaviour of how these references are
handled back to the C-API pointer behaviour: that is unsafe but just
works in a C-like way. The resulting complexity in the FFI layer is
also notably less than in the #335 alternative.
As a consequence all APIs which require the context, now explicitly
need to get the context passed in as an argument. It looks like this
is certainly no downside and maybe even beneficial for further API
refactors.
For this strategy to work out the same should be done to
dc_chatlist_t, dc_chat_t and dc_contact_t. But this working for
dc_msg_t give a reasonable confidence that this is a good approach.
2019-09-11 21:48:40 +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
Simon Laux
814281ed7d
fixes #463
2019-09-09 18:44:30 +02:00
holger krekel
5b0c8dd9dd
address @r10s and @flub review comments, and fix some docstrings/test meta docs
2019-09-09 18:07:32 +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
Simon Laux
6ea706c646
remove macro
2019-09-09 18:07:32 +02:00
Simon Laux
1ed2af08b8
cargo fmt
2019-09-09 18:07:32 +02:00
Simon Laux
7563a5abe0
remove closure
...
Co-authored-by: @Jikstra
2019-09-09 18:07:32 +02:00
Simon Laux
0a8b187f80
fix remove chat profile img
2019-09-09 18:07:32 +02:00
Friedel Ziegelmayer
d224924dc8
Change type of function from `const char *' to &str ( #451 )
...
Change type of function from `const char *' to &str
2019-09-08 11:51:16 +02:00
B. Petersen
d9d0dee0d5
fix: use empty string for messages without text everywhere
2019-09-07 13:40:50 +02:00
Dmitry Bogatov
7d9fc682a0
cargo-fmt
2019-09-07 03:09:01 +00:00
Dmitry Bogatov
c4c08f2552
Remove ok_to_continue pattern from msg_prepare_raw()
...
This commit will fail CI due incorrect formatting. It is done
deliberately to simplify review process.
2019-09-07 03:06:13 +00:00
Dmitry Bogatov
400740fdba
Simplify prepare_msg_raw() using early return
...
This commit will fail CI due incorrect formatting. It is done
deliberately to simplify review process.
2019-09-07 03:03:35 +00:00
Dmitry Bogatov
42bce7c0bf
Remove last C string from prepare_msg_raw()
2019-09-07 02:54:28 +00:00
Dmitry Bogatov
9bf7b0bf96
Use more of Rust, less of C strings in prepare_msg_raw()
2019-09-07 01:39:26 +00:00
Dmitry Bogatov
1f82ba74aa
Remove redundant checks in prepare_msg_raw()
2019-09-06 23:24:39 +00:00
Dmitry Bogatov
1062ac6ade
Drop unsafe version of get_parent_mime_headers function
2019-09-06 23:15:31 +00:00
Dmitry Bogatov
aa5304a4f3
Use safe version of `get_parent_mime_headers()' function
2019-09-06 23:15:31 +00:00
Dmitry Bogatov
3a57ba1142
Implement safe version of `get_parent_mime_headers' function
2019-09-06 23:15:31 +00:00
holger krekel
4bbab876ae
majorly de-indent code structure in secure_join by introducing cleanup function, also majorly reducing unsafety in several places
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
holger krekel
dd0afdfeb0
add QR based join-group API, with test and SEGFAULT fix to rust
2019-09-05 22:55:25 +02:00
Alexander Krotov
b5a9cc1380
Convert DC_*_ID_* constants to u32
2019-09-01 23:41:05 +03:00
Dmitry Bogatov
85e16f6e82
Fix one clippy::unneeded_unwrap warning
2019-08-27 23:06:56 +00:00
Dmitry Bogatov
0a9f61783d
Fix one clippy::unneeded_unwrap warning
2019-08-27 23:00:37 +00:00
Dmitry Bogatov
19a0071585
Fix one clippy::unneeded_unwrap warning
2019-08-27 22:56:46 +00:00
dignifiedquire
39abb0b0ad
refactor(message): rename dc_msg to message
2019-08-19 12:13:11 +02:00
dignifiedquire
cb6c8ac78b
refactor(msg): use rust based allocations
2019-08-19 12:10:26 +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
Alexander Krotov
1a8e08e429
Merge pull request #396 from deltachat/chat-array
...
Remove dc_array_t from chat.rs
2019-08-19 06:55:58 +00: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
Alexander Krotov
e7cf5a546a
Remove dc_array_t from chat.rs
2019-08-18 23:02:16 +03:00
Alexander Krotov
6b2fe03d08
Replace dc_array_t with Vec in context.rs
2019-08-18 12:44:49 +02:00
dignifiedquire
13d8306a7b
refactor(chat): some minor cleanup and api improvements
2019-08-17 11:40:43 +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