Interface IDRMProvider
- Namespace
- DLCToolkit.DRM
- Assembly
- DLCToolkit.dll
Main API to interact with a DLC DRM service independent of the build platform.
public interface IDRMProvider
Properties
DLCUniqueKeysAsync
Get all unique id keys for all DLC published via the DRM platform (Steamworks DLC for example). It is allowed for this property to return an empty array or only a partial array of the potentially available DLC Contents. IsDLCAvailableAsync(IDLCAsyncProvider, string) will be used to determine truly whether DLC content is valid and available at any given time, even if this property does not list it. Can throw a NotSupportedException if the DRM platform does not support listing contents.
DLCAsync<string[]> DLCUniqueKeysAsync { get; }
Property Value
Methods
GetDLCStream(string)
Attempt to get the stream provider for the DLC to allow loading.
DLCStreamProvider GetDLCStream(string uniqueKey)
Parameters
uniqueKey
stringThe unique key of the dlc
Returns
- DLCStreamProvider
The stream provider for the dlc if installed or null if it is not available
IsDLCAvailableAsync(IDLCAsyncProvider, string)
Check if the specified DLC is purchased and installed. Some providers may need to make a web request to check for purchased DLC, so this operations must be async.
DLCAsync<bool> IsDLCAvailableAsync(IDLCAsyncProvider asyncProvider, string uniqueKey)
Parameters
asyncProvider
IDLCAsyncProviderThe async provider to allow async tasks to be started
uniqueKey
stringThe unique key of the dlc
Returns
RequestInstallDLCAsync(IDLCAsyncProvider, string)
Request that the dlc with the provided unique key is installed onto the system if it is available to the user.
DLCAsync RequestInstallDLCAsync(IDLCAsyncProvider asyncProvider, string uniqueKey)
Parameters
asyncProvider
IDLCAsyncProviderThe async provider to allow async tasks to be started
uniqueKey
stringThe unique key of the dlc
Returns
RequestUninstallDLC(string)
Request that the dlc with the provided unique key is uninstalled from the system if it is currently installed.
void RequestUninstallDLC(string uniqueKey)
Parameters
uniqueKey
stringThe unique key of the dlc
TrackDLCUsage(string, bool)
Allow for progress tracking/hours tracking from the drm service by setting which dlc is currently being used.
void TrackDLCUsage(string uniqueKey, bool isInUse)