mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 23:06:32 +03:00
rename and update providers crate
This commit is contained in:
committed by
holger krekel
parent
e1dc4b69f5
commit
8d702d0b77
8
Cargo.lock
generated
8
Cargo.lock
generated
@@ -530,8 +530,8 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "deltachat-provider-overview"
|
name = "deltachat-provider-database"
|
||||||
version = "0.1.0"
|
version = "0.2.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -553,7 +553,7 @@ name = "deltachat_ffi"
|
|||||||
version = "1.0.0-alpha.5"
|
version = "1.0.0-alpha.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"deltachat 1.0.0-alpha.5",
|
"deltachat 1.0.0-alpha.5",
|
||||||
"deltachat-provider-overview 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"deltachat-provider-database 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"human-panic 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"human-panic 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2907,7 +2907,7 @@ dependencies = [
|
|||||||
"checksum darling_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6afc018370c3bff3eb51f89256a6bdb18b4fdcda72d577982a14954a7a0b402c"
|
"checksum darling_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6afc018370c3bff3eb51f89256a6bdb18b4fdcda72d577982a14954a7a0b402c"
|
||||||
"checksum darling_macro 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c6d8dac1c6f1d29a41c4712b4400f878cb4fcc4c7628f298dd75038e024998d1"
|
"checksum darling_macro 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c6d8dac1c6f1d29a41c4712b4400f878cb4fcc4c7628f298dd75038e024998d1"
|
||||||
"checksum debug_stub_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "496b7f8a2f853313c3ca370641d7ff3e42c32974fdccda8f0684599ed0a3ff6b"
|
"checksum debug_stub_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "496b7f8a2f853313c3ca370641d7ff3e42c32974fdccda8f0684599ed0a3ff6b"
|
||||||
"checksum deltachat-provider-overview 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5bef7b3626b0f859878db86ed54e4eef317adbcc3bcc3617eb38dec52e3f40e3"
|
"checksum deltachat-provider-database 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "814dba060d9fdc7a989fccdc4810ada9d1c7a1f09131c78e42412bc6c634b93b"
|
||||||
"checksum derive_builder 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ac53fa6a3cda160df823a9346442525dcaf1e171999a1cf23e67067e4fd64d4"
|
"checksum derive_builder 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ac53fa6a3cda160df823a9346442525dcaf1e171999a1cf23e67067e4fd64d4"
|
||||||
"checksum derive_builder_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0288a23da9333c246bb18c143426074a6ae96747995c5819d2947b64cd942b37"
|
"checksum derive_builder_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0288a23da9333c246bb18c143426074a6ae96747995c5819d2947b64cd942b37"
|
||||||
"checksum derive_more 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6d944ac6003ed268757ef1ee686753b57efc5fcf0ebe7b64c9fc81e7e32ff839"
|
"checksum derive_more 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6d944ac6003ed268757ef1ee686753b57efc5fcf0ebe7b64c9fc81e7e32ff839"
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ crate-type = ["cdylib", "staticlib"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
deltachat = { path = "../", default-features = false }
|
deltachat = { path = "../", default-features = false }
|
||||||
deltachat-provider-overview = "0.1.0"
|
deltachat-provider-database = "0.2.1"
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
human-panic = "1.0.1"
|
human-panic = "1.0.1"
|
||||||
num-traits = "0.2.6"
|
num-traits = "0.2.6"
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
extern crate deltachat_provider_overview;
|
extern crate deltachat_provider_database;
|
||||||
|
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
use deltachat::dc_tools::{as_str, StrExt};
|
use deltachat::dc_tools::{as_str, StrExt};
|
||||||
use deltachat_provider_overview::StatusState;
|
use deltachat_provider_database::StatusState;
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub type dc_provider_t = deltachat_provider_overview::Provider;
|
pub type dc_provider_t = deltachat_provider_database::Provider;
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn dc_provider_new_from_domain(
|
pub unsafe extern "C" fn dc_provider_new_from_domain(
|
||||||
domain: *const libc::c_char,
|
domain: *const libc::c_char,
|
||||||
) -> *const dc_provider_t {
|
) -> *const dc_provider_t {
|
||||||
match deltachat_provider_overview::get_provider_info(as_str(domain)) {
|
match deltachat_provider_database::get_provider_info(as_str(domain)) {
|
||||||
Some(provider) => provider,
|
Some(provider) => provider,
|
||||||
None => ptr::null(),
|
None => ptr::null(),
|
||||||
}
|
}
|
||||||
@@ -22,8 +22,8 @@ pub unsafe extern "C" fn dc_provider_new_from_domain(
|
|||||||
pub unsafe extern "C" fn dc_provider_new_from_email(
|
pub unsafe extern "C" fn dc_provider_new_from_email(
|
||||||
email: *const libc::c_char,
|
email: *const libc::c_char,
|
||||||
) -> *const dc_provider_t {
|
) -> *const dc_provider_t {
|
||||||
let domain = deltachat_provider_overview::get_domain_from_email(as_str(email));
|
let domain = deltachat_provider_database::get_domain_from_email(as_str(email));
|
||||||
match deltachat_provider_overview::get_provider_info(domain) {
|
match deltachat_provider_database::get_provider_info(domain) {
|
||||||
Some(provider) => provider,
|
Some(provider) => provider,
|
||||||
None => ptr::null(),
|
None => ptr::null(),
|
||||||
}
|
}
|
||||||
@@ -44,7 +44,7 @@ pub unsafe extern "C" fn dc_provider_get_overview_page(
|
|||||||
null_guard!(provider);
|
null_guard!(provider);
|
||||||
format!(
|
format!(
|
||||||
"{}/{}",
|
"{}/{}",
|
||||||
deltachat_provider_overview::PROVIDER_OVERVIEW_URL,
|
deltachat_provider_database::PROVIDER_OVERVIEW_URL,
|
||||||
(*provider).overview_page
|
(*provider).overview_page
|
||||||
)
|
)
|
||||||
.strdup()
|
.strdup()
|
||||||
|
|||||||
Reference in New Issue
Block a user