Simon Laux
ed95752f8f
use DC_CONTACT_ID_SELF constant instead of 1
2019-08-06 09:02:41 +02:00
Simon Laux
81719c4b33
add coment that helps with understanding the code
2019-08-06 09:02:41 +02:00
Simon Laux
fc6019e3c9
fix sql statement in order to close #163
2019-08-06 09:02:41 +02:00
Alexander Krotov
5811248bfc
Merge pull request #289 from KAction/new-assert
...
python: assert that underlying dc_msg_t* for Message is not NULL
2019-08-04 12:58:04 +00:00
Dmitry Bogatov
47b76ceb3e
python: assert that underlying dc_msg_t* for Message is not NULL
2019-08-04 09:17:54 +00:00
Floris Bruynooghe
0051720d1b
Kill to_cstring with fire
...
I swear I already did this, see #273 .
2019-08-04 09:49:41 +02:00
Jikstra
d814dffbb0
Merge pull request #281 from deltachat/new-mmime
...
chore: update mmime to 0.1.1
2019-08-03 15:31:36 +02:00
dignifiedquire
4e1e32df65
chore: update mmime to 0.1.1
2019-08-03 11:12:21 +02:00
Floris Bruynooghe
d2b23b727b
Restore carriage-return handling to how it was in dcc
...
Some part of the translation seems to have got this wrong somewhere.
Add a test and restore handling to something more sane again.
2019-08-03 01:00:59 +02:00
Floris Bruynooghe
d37dda6f50
Turn the function safe
2019-08-03 01:00:59 +02:00
Floris Bruynooghe
c568d5dcac
Safe string usage
...
Mostly safe string usage, but some other minor cleanups:
- This isn't used from any C code, so no extern C.
- Use Config enums rather than strings.
- Clean up old unused sql statements.
2019-08-03 01:00:59 +02:00
Floris Bruynooghe
227ef1b467
Add unittest
...
This should give us some confidence in the refactoring.
2019-08-03 01:00:59 +02:00
dignifiedquire
a8cea64f39
feat(deps): update rusqlite to official version again
...
A fix for the non utf8 strings has been merged and released in `0.20`
2019-08-03 00:11:23 +02:00
Friedel Ziegelmayer
294e855bbe
Merge pull request #276 from link2xt/lines
...
Return Vec instead of carray from dc_split_into_lines
2019-08-02 20:28:23 +02:00
Alexander Krotov
c5eef21645
Remove carray use and comment
2019-08-02 13:12:32 +03:00
Alexander Krotov
d64fcece5b
Return Vec instead of carray from dc_split_into_lines
2019-08-02 13:12:25 +03:00
Friedel Ziegelmayer
0a9f3ae160
Use Vec instead of carray in dc_forward_msgs() ( #277 )
...
Use Vec instead of carray in dc_forward_msgs()
2019-08-02 11:05:28 +02:00
Friedel Ziegelmayer
acbedbd352
Remove unused function dc_simplify_simplify ( #278 )
...
Remove unused function dc_simplify_simplify
2019-08-02 11:05:05 +02:00
Alexander Krotov
e78b879c9e
Remove unused function dc_simplify_simplify
2019-08-02 09:29:54 +03:00
Alexander Krotov
1145c3533b
Use Vec instead of carray in dc_forward_msgs()
2019-08-02 01:34:15 +03:00
Friedel Ziegelmayer
0d41a78182
Merge pull request #272 from link2xt/parts_vec
...
Store dc_mimeparser_t::parts as Vec instead of carray
2019-08-01 23:50:53 +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
e7428887d0
Introduce new type: Viewtype ( #256 )
...
Introduce new type: Viewtype
2019-08-01 12:17:33 +02:00
Friedel Ziegelmayer
a7269e7096
Merge pull request #274 from KAction/refine-bool
...
Narrow types of struct fields, that use only two values.
2019-08-01 11:22:55 +02:00
Dmitry Bogatov
7394666266
Refine type of SmtpState.doing_jobs to bool
2019-08-01 06:51:52 +00:00
Dmitry Bogatov
8eb5cec9ce
Refine type of SmtpState.suspended to bool
2019-08-01 06:41:50 +00:00
Dmitry Bogatov
b2807429cc
Refine type of SmtpState.probe_network to bool
2019-08-01 06:37:06 +00:00
Dmitry Bogatov
07d7316a9f
Refine type of Context.perform_inbox_jobs_needed to bool
2019-08-01 06:31:58 +00:00
Dmitry Bogatov
1f9807ccfe
Refine type of Context.probe_network to bool
2019-08-01 06:24:50 +00:00
Dmitry Bogatov
3358d09148
Derive and use Display trait for Viewtype
2019-08-01 06:05:56 +00:00
Dmitry Bogatov
c04c8ff103
Introduce new enum: Viewtype
...
With this change, kind of message is represented by value of enum
`Viewtype' instead of raw libc::c_int, providing more type safety. This
enum replaces DC_MSG_* constants. The only way to create `Viewtype' from
libc::c_int is smart constructor.
With this change, functions `dc_get_chat_media' and `dc_get_next_media' became
less forgiving about invalid message type arguments. Previously, invalid
message types were implicitly interpreted as 0 (Viewtype::Unknown). Now,
function calls with invalid message type arguments are rejected (error code
returned) on FFI boundary.
Additionally, when `Viewtype' is read from database, it is checked to have
sensible value.
No tests assumed forgiving behaviour.
2019-08-01 06:05:56 +00: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
3370b9cfcb
Merge pull request #268 from KAction/string-os-name
...
Change Context.os_name field to String
2019-07-31 22:13:18 +02:00
Friedel Ziegelmayer
022c7c2f07
Merge pull request #266 from KAction/dc_msg_is_starred_bool
...
Make dc_msg_is_starred() return bool
2019-07-31 22:06:48 +02:00
Alexander Krotov
9e50e77031
Simplify dc_initiate_key_transfer()
2019-07-31 22:06:05 +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
Friedel Ziegelmayer
c29c893426
Merge pull request #270 from link2xt/get_backoff_time_offset-safe
...
Mark get_backoff_time_offset as safe
2019-07-31 22:03:29 +02:00
Friedel Ziegelmayer
16028cc5dc
Merge pull request #271 from link2xt/reports_vec
...
Replace dc_mimeparser_t::reports carray with Vec
2019-07-31 22:02:35 +02:00
Dmitry Bogatov
39e530f759
Change Context.os_name field to String
2019-07-31 15:45:35 +00:00
jikstra
8274c6bf17
Allow non_snake_case in dc_replace_bad_utf8_chars function
2019-07-31 16:26:17 +02:00
jikstra
566d255b33
run cargo fmt
2019-07-31 16:26:17 +02:00
jikstra
9fb9fb0fc1
Remove goto/current_block logic with OK_TO_CONTINUE. Keeps identation
2019-07-31 16:26:17 +02:00
Alexander Krotov
164a8fe39a
encode_66bits_as_base64: use base64 crate
2019-07-31 16:25:01 +02:00
Alexander Krotov
0b679f8b95
dc_tools: Make dc_create_id() safe
2019-07-31 16:25:01 +02:00
Alexander Krotov
8267ffb8d2
Replace dc_mimeparser_t::reports carray with Vec
2019-07-31 15:57:05 +03:00
Alexander Krotov
7bc338fc72
Mark get_backoff_time_offset as safe
2019-07-31 15:51:50 +03:00
Alexander Krotov
d6dae0a9e8
Make dc_array_sort_ids() safe and move it into impl
2019-07-31 03:21:13 +03:00
Dmitry Bogatov
a41c0614cc
Make dc_msg_is_starred() return bool
2019-07-30 22:57:28 +00:00
Dmitry Bogatov
73298c0273
chore: fix and enforce compiler warnings on CI
2019-07-30 09:58:28 +02:00