Cogs.Core
DataFetcherManager.h
1#pragma once
2
3#include "../Base.h"
4
5#include "Foundation/Platform/FileContents.h"
6
7namespace Cogs::Core {
8 class DataFetcherBase;
9 class Context;
10
11 namespace DataFetcherManager {
12
13 typedef size_t FetchId;
14 constexpr FetchId NoFetchId = FetchId(0);
15
21 COGSCORE_DLL_API void addDataFetcher(DataFetcherBase* dataFetcher, int priority);
22
26 COGSCORE_DLL_API void removeDataFetcher(DataFetcherBase* dataFetcher);
27
31 COGSCORE_DLL_API FetchId fetchAsync(Context* context, const std::string& fileName, const FileContents::Callback& callback, uint64_t offset = 0, uint64_t size = 0, bool cancellable=false, FileContentsHints hints = FileContentsHints::None);
32
33 COGSCORE_DLL_API void cancelAsyncFetch(Context* context, FetchId id);
34
38 COGSCORE_DLL_API FileContents::Ptr fetchSync(const std::string& fileName, uint64_t offset = 0, uint64_t size = 0, FileContentsHints hints = FileContentsHints::None);
39 }
40}
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
FileContentsHints
Definition: FileContents.h:11