#include <asset_databases.h>
This interface provides helper functions to register asset repositories.
Public Member Functions | |
MAXON_OBSERVABLE_STATIC (Result< void >, ObservableQueryDatabases,(const ValueReceiver< const Url & > &databaseUrl), ObservableCombinerRunAllComponent) | |
Private Member Functions | |
MAXON_INTERFACE (AssetDataBasesInterface, MAXON_REFERENCE_CONST, "net.maxon.interface.assetdatabases", MAXON_IMPLEMENTATION_MODULE("net.maxon.asset")) | |
|
private |
|
static |
Returns the url of a asset repository.
[in] | repository | Repository to find. |
|
static |
|
static |
Returns all repositories added by the user.
[in] | entry | ValueReceiver to receive the entries. |
|
static |
Set the new user repositories.
[in] | newDataBases | Block with tuples of the new urls and activation states. |
|
static |
Writes the gml file with the dependencies of the given asset repository.
|
static |
GetAssetDatabaseCachePath returns the path to the cache folder.
|
static |
SetAssetDatabaseCachePath sets a new cache path to store temporary downloaded objects.
[in] | cachePath | Path to set. |
|
static |
GetAssetDatabaseCacheSize returns the size of the cached files.
|
static |
ClearAssetDatabaseCache deletes the cache.
|
static |
WaitForDatabaseLoading waits for the execution of the database loading. Since this is async now during the startup and modification of database lists it gives the developer a chance to wait for that end.
|
static |
ReloadDatabases reloads the asset repositories from disk.
[in] | forceReload | True if databases should be forces to be reloaded. False to only load new databases and remove unused. |
|
static |
Creates a RAM disk which caches the files of the given remote asset repository in memory and also in the application's asset cache (APPSETTINGS::ASSETS::CACHEPATH). The root of the returned RAM disk can be used as parameter for AssetInterface::CreateRepositoryFromUrl to create the actual repository. After creating the repository, you can call SetupRamDiskCacheCallbacks.
[in] | repositoryUrl | The Url of a remote asset repository. |
|
static |
Sets callbacks for permission checking and download state notifications on ramDisk and repository. ramDisk has to be created by CreateRamDiskCache, and repository by a subsequent call of AssetInterface::CreateRepositoryFromUrl with the ramDisk's root Url.
[in] | ramDisk | A RAM disk created by CreateRamDiskCache. |
[in] | repository | The repository created for the ramDisk's root Url. |
MAXON_OBSERVABLE_STATIC | ( | Result< void > | , |
ObservableQueryDatabases | , | ||
(const ValueReceiver< const Url & > &databaseUrl) | , | ||
ObservableCombinerRunAllComponent | |||
) |
Observable to receive additional databases to add to the application. the receiver needs to receive a url with the URLFLAGS::ASSETREPOSITORYTYPE set correctly e.g. url.Set(URLFLAGS::ASSETREPOSITORYTYPE, AssetRepositoryTypes::AssetDatabase().GetId()) iferr_return;