37 std::optional<StringRefNull>
auth_token = std::nullopt)
45 "/_asset-library-meta.json";
202 using TimePoint = std::chrono::time_point<std::chrono::steady_clock>;
206 float timeout_ = 0.0f;
210 TimePoint last_timeout_handled_time_point_ = {};
211 TimePoint last_new_pages_time_point_ = {};
213 std::optional<Status> status_ = std::nullopt;
214 std::optional<StringRefNull> failure_message_ = std::nullopt;
215 bool metafiles_in_place_ =
false;
222 static void ping_new_preview(
const bContext &
C, StringRef preview_full_filepath);
226 StringRef library_url,
227 StringRef absolute_file_url,
228 StringRef local_file_abspath);
234 StringRef library_url,
235 StringRef absolute_file_url,
236 StringRef local_file_abspath);
248 static std::optional<RemoteLibraryLoadingStatus::Status>
status(StringRef url);
267 void reset_timeout();
static void ping_asset_file_download_succeeded(const bContext &C, StringRef library_url, StringRef absolute_file_url, StringRef local_file_abspath)
static void ping_still_loading(StringRef url)
static void ping_new_pages(StringRef url)
static void set_failure(StringRef url, std::optional< StringRefNull > failure_message)
static std::optional< bool > metafiles_in_place(StringRef url)
std::chrono::time_point< std::chrono::steady_clock > TimePoint
static std::optional< StringRefNull > failure_message(StringRef url)
std::filesystem::file_time_type FileSystemTimePoint
static void begin_loading(StringRef url, float timeout)
static std::optional< RemoteLibraryLoadingStatus::Status > status(StringRef url)
static std::optional< TimePoint > last_new_pages_time(StringRef url)
static void set_finished(StringRef url)
static void ping_download_queue_done(const bContext &C)
static void ping_asset_file_download_failed(const bContext &C, StringRef library_url, StringRef absolute_file_url, StringRef local_file_abspath)
static void ping_asset_file_progress(StringRef absolute_file_url, int64_t size_in_bytes)
static void set_cancelled(const StringRef url)
static std::optional< FileSystemTimePoint > loading_start_time(const StringRef url)
static void ping_new_preview(const bContext &C, StringRef preview_full_filepath)
static void ping_metafiles_in_place(StringRef url)
static bool handle_timeout(StringRef url)
bool remote_library_has_unfinished_asset_downloads()
void foreach_registered_user_remote_library(FunctionRef< void(bUserAssetLibrary &)> fn)
float remote_library_total_asset_downloads_progress()
void remote_library_cancel_all_listing_downloads(const bContext &C)
void remote_library_request_preview_download(const bContext &C, const AssetRepresentation &asset, const StringRef dst_filepath, ReportList *reports)
std::string remote_library_asset_preview_path(const AssetRepresentation &asset)
constexpr StringRefNull REMOTE_LIBRARY_TOP_META_FILE_NAME
void remote_library_cancel_all_asset_downloads(bContext &C)
std::string remote_library_cache_directory_path(StringRefNull library_dirname)
void remote_library_request_asset_download(const bContext &C, const AssetRepresentation &asset, ReportList *reports)
constexpr StringRefNull REMOTE_LIBRARY_TOP_META_FILE_NAME_LEADING_SLASH
void remote_library_request_download(const RemoteLibraryDefinitionRef &library_definition)
std::string remote_library_top_meta_file_path(const RemoteLibraryDefinitionRef &library)
bool remote_library_url_ends_with_top_meta_file_name(const StringRef url)
std::string remote_library_cache_directory_path_from_url(StringRef remote_url)
Clock::time_point TimePoint
StringRefNull asset_file() const
std::optional< URLWithHash > preview_url
Vector< OnlineAssetFile > files
StringRefNull cache_dirpath
std::optional< StringRefNull > auth_token
RemoteLibraryDefinitionRef(StringRefNull remote_url, StringRefNull cache_dirpath, std::optional< StringRefNull > auth_token=std::nullopt)
RemoteLibraryDefinitionRef(const bUserAssetLibrary &library_definition)