Make API version selection possible, update for newer ffsend-api version

This commit is contained in:
timvisee 2019-02-27 19:42:14 +01:00
parent f53f11a9f1
commit ca122cad66
No known key found for this signature in database
GPG key ID: B8DB720BC383E172
15 changed files with 407 additions and 20 deletions

View file

@ -1,6 +1,14 @@
use ffsend_api::api::{DesiredVersion, Version};
/// The timeout for the Send client for generic requests, `0` to disable.
pub const CLIENT_TIMEOUT: u64 = 30;
/// The timeout for the Send client used to transfer (upload/download) files.
/// Make sure this is big enough, or file uploads will be dropped. `0` to disable.
pub const CLIENT_TRANSFER_TIMEOUT: u64 = 24 * 60 * 60;
/// The default desired version to select for the server API.
pub const API_VERSION_DESIRED_DEFAULT: DesiredVersion = DesiredVersion::Assume(API_VERSION_ASSUME);
/// The default server API version to assume when it could not be determined.
pub const API_VERSION_ASSUME: Version = Version::V2;