// // 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 auth( const std::string &username, const std::string &password ) = 0; virtual tl::expected serverInfo() const = 0; virtual tl::expected defaultRepo() const = 0; virtual tl::expected repoInfo( const std::string &repo_id ) const = 0; virtual tl::expected, SeafileException> repoDir( const std::string &repo_id, const std::string &path ) const = 0; virtual tl::expected, SeafileException> repos(const std::string &type, const std::string &name_contains) const = 0; virtual tl::expected accountInfo() const = 0; virtual tl::expected fileDetail( const std::string &repo_id, const std::string &path ) const = 0; virtual tl::expected downloadFileUrl( const std::string &repo_id, const std::string &path ) const = 0; virtual tl::expected downloadFile( const std::string &repo_id, const std::string &path, std::optional start, std::optional end ) const = 0; virtual tl::expected dirDetail( const std::string &repo_id, const std::string &path ) const = 0; }; } #endif //SEADISK_SEAFILE_API_INTERFACE_HPP