mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
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.
29 lines
673 B
TOML
29 lines
673 B
TOML
[package]
|
|
name = "deltachat_ffi"
|
|
version = "1.0.0-alpha.3"
|
|
description = "Deltachat FFI"
|
|
authors = ["dignifiedquire <dignifiedquire@gmail.com>"]
|
|
edition = "2018"
|
|
readme = "README.md"
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
keywords = ["deltachat", "chat", "openpgp", "email", "encryption"]
|
|
categories = ["cryptography", "std", "email"]
|
|
|
|
[lib]
|
|
name = "deltachat"
|
|
crate-type = ["cdylib", "staticlib"]
|
|
|
|
[dependencies]
|
|
deltachat = { path = "../", default-features = false }
|
|
libc = "0.2"
|
|
human-panic = "1.0.1"
|
|
num-traits = "0.2.6"
|
|
|
|
[features]
|
|
default = ["vendored", "nightly", "ringbuf"]
|
|
vendored = ["deltachat/vendored"]
|
|
nightly = ["deltachat/nightly"]
|
|
ringbuf = ["deltachat/ringbuf"]
|
|
|