// // Created by Shell on 2026-07-14. // #ifndef SEADISK_SEAFILE_API_INTERFACE_HPP #define SEADISK_SEAFILE_API_INTERFACE_HPP #include #include #include #include #include "exception.hpp" #include "account_info.hpp" #include "auth_token.hpp" #include "default_repo.hpp" #include "dir_info.hpp" #include "file_info.hpp" #include "repo_entry.hpp" #include "repo_info.hpp" #include "server_info.hpp" #include "token_type.hpp" namespace seafile::api { class ISeaFileApi { public: virtual ~ISeaFileApi() = default; virtual tl::expected authToken( const std::string& username, const std::string& password ) = 0; virtual tl::expected serverInfo() const = 0; virtual tl::expected defaultRepo( const std::string& token, TokenType token_type ) const = 0; virtual tl::expected repoInfo( const std::string& repo_id, const std::string& token, TokenType token_type ) const = 0; virtual tl::expected, SeafileException> repoDir( const std::string& repo_id, const std::string& path, const std::string& token, TokenType token_type ) const = 0; virtual tl::expected accountInfo( const std::string& token, TokenType token_type ) const = 0; virtual tl::expected fileDetail( const std::string& repo_id, const std::string& path, const std::string& token, TokenType token_type ) const = 0; virtual tl::expected downloadFileUrl( const std::string& repo_id, const std::string& path, const std::string& token, TokenType token_type ) const = 0; virtual tl::expected downloadFile( const std::string& repo_id, const std::string& path, std::optional start, std::optional end, const std::string& token, TokenType token_type ) const = 0; virtual tl::expected dirDetail( const std::string& repo_id, const std::string& path, const std::string& token, TokenType token_type ) const = 0; }; } #endif //SEADISK_SEAFILE_API_INTERFACE_HPP