mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-11-09 13:25:29 +08:00
29 lines
762 B
Rust
29 lines
762 B
Rust
/*
|
|
* SPDX-FileCopyrightText: 2020 Stalwart Labs Ltd <hello@stalw.art>
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
|
|
*/
|
|
|
|
use common::{Server, auth::AccessToken};
|
|
use dav_proto::RequestHeaders;
|
|
use http_proto::HttpResponse;
|
|
|
|
pub(crate) trait FileGetRequestHandler: Sync + Send {
|
|
fn handle_file_get_request(
|
|
&self,
|
|
access_token: &AccessToken,
|
|
headers: RequestHeaders<'_>,
|
|
is_head: bool,
|
|
) -> impl Future<Output = crate::Result<HttpResponse>> + Send;
|
|
}
|
|
|
|
impl FileGetRequestHandler for Server {
|
|
async fn handle_file_get_request(
|
|
&self,
|
|
access_token: &AccessToken,
|
|
headers: RequestHeaders<'_>,
|
|
is_head: bool,
|
|
) -> crate::Result<HttpResponse> {
|
|
todo!()
|
|
}
|
|
}
|