Show / Hide Table of Contents

Class ContentLibraryHandler

Handler in charge of taking care of the content library features and utilities.

Inheritance
System.Object
BaseHandler
ContentLibraryHandler
Inherited Members
BaseHandler.GetReusableApiRequest<T>()
BaseHandler.GetHandlerStoragePath<T>()
BaseHandler.JSON_FOLDER_NAME
BaseHandler.GetHandlerJsonFolderPath<K>()
BaseHandler.GetApiJsonFullPath<T, K>()
BaseHandler.GetApiJsonFullPath<T, K>(UserProfile)
BaseHandler.GetApiJsonFullPath<T, K>(T, UserProfile)
BaseHandler.GetApiJsonFullPath<T, K>(UserProfile, Int32, String)
BaseHandler.GetApiJsonFullPath<T, K>(T, UserProfile, Int32, String)
BaseHandler.GetApiDownloadedBytesFullPath<T, K>(T, UserProfile, Int32, String)
BaseHandler.GetContentFromFileProcess(String, Action<Byte[]>, DataTransferStatus)
BaseHandler.SaveContentToFileProcess(Byte[], String, Action<Boolean>)
BaseHandler.DeleteFileProcess(String, Action<Boolean>)
BaseHandler.CopyFileToDestinationProcess(String, String, Action<Boolean>)
BaseHandler.IsThereExistingMediaWithMatchingChecksum(String, String)
BaseHandler.GetChecksumFromExistingFile(String)
BaseHandler.ClearHandlerCache<T>(Action<Boolean>)
BaseHandler.TokenUsedForDownloads
BaseHandler.DownloadGenericFile(String, String, String, Boolean, Action<Byte[]>, DataTransferStatus)
BaseHandler.GetEmsContentFileSize(String, Action<Nullable<Int64>>)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Appearition.ContentLibrary
Assembly: Appearition.SDK.dll
Syntax
public class ContentLibraryHandler : BaseHandler

Methods

View Source

ClearLocalAssetContentProcess<T>(String, T, String, Action<Boolean>)

Clears the cached content of an asset based on given parameters.

Declaration
public static IEnumerator ClearLocalAssetContentProcess<T>(string providerName, T file, string itemKey = null, Action<bool> onComplete = null)
    where T : ContentFile
Parameters
Type Name Description
System.String providerName
T file
System.String itemKey

Item key, mainly used to pick the file storage location. Can be the item Title.

System.Action<System.Boolean> onComplete

Occurs when the process is completed. Contains whether or not this process has been successfully completed.

Returns
Type Description
System.Collections.IEnumerator
Type Parameters
Name Description
T
View Source

DownloadFirstLibraryFileFoundProcess(Int32, String, String, String, Action<Dictionary<String, Byte[]>>, DataTransferStatus)

From a given provider name and item key, fetches the first file that can be downloaded.

Declaration
public static IEnumerator DownloadFirstLibraryFileFoundProcess(int channelId, string providerName, string contentItemKey, string itemKey, Action<Dictionary<string, byte[]>> onComplete = null, DataTransferStatus downloadTransferStatus = null)
Parameters
Type Name Description
System.Int32 channelId

The target channel

System.String providerName

The provider name

System.String contentItemKey

The content library item key

System.String itemKey

Item key, mainly used to pick the file storage location. Can be the item Title.

System.Action<System.Collections.Generic.Dictionary<System.String, System.Byte[]>> onComplete

Occurs when the process is completed. Contains whether or not this process has been successfully completed.

DataTransferStatus downloadTransferStatus

The transfer process tracker.

Returns
Type Description
System.Collections.IEnumerator
View Source

DownloadFirstLibraryFileFoundProcess(String, String, String, Action<Dictionary<String, Byte[]>>, DataTransferStatus)

From a given provider name and item key, fetches the first file that can be downloaded.

Declaration
public static IEnumerator DownloadFirstLibraryFileFoundProcess(string providerName, string contentItemKey, string itemKey, Action<Dictionary<string, byte[]>> onComplete = null, DataTransferStatus downloadTransferStatus = null)
Parameters
Type Name Description
System.String providerName

The provider name

System.String contentItemKey

The content library item key

System.String itemKey

Item key, mainly used to pick the file storage location. Can be the item Title.

System.Action<System.Collections.Generic.Dictionary<System.String, System.Byte[]>> onComplete

Occurs when the process is completed. Contains whether or not this process has been successfully completed.

DataTransferStatus downloadTransferStatus

The transfer process tracker.

Returns
Type Description
System.Collections.IEnumerator
View Source

DownloadLibraryFileContent<T>(String, T, String, Action<Byte[]>, DataTransferStatus)

Downloads a single content library file, stores it, and returns the byte content.

Declaration
public static IEnumerator DownloadLibraryFileContent<T>(string providerName, T file, string itemKey, Action<byte[]> onComplete = null, DataTransferStatus downloadTransferStatus = null)
    where T : ContentFile
Parameters
Type Name Description
System.String providerName

The content provider name.

T file

The given content library file.

System.String itemKey

Item key, mainly used to pick the file storage location. Can be the item Title.

System.Action<System.Byte[]> onComplete

Occurs when the process is completed. Contains whether or not this process has been successfully completed.

DataTransferStatus downloadTransferStatus

The transfer process tracker.

Returns
Type Description
System.Collections.IEnumerator
Type Parameters
Name Description
T
View Source

DownloadLibraryFileThumbnail<T>(String, T, String, Boolean, Action<Sprite>, DataTransferStatus)

Downloads a single content library file, stores it, and returns the byte content.

Declaration
public static IEnumerator DownloadLibraryFileThumbnail<T>(string providerName, T file, string itemKey, bool loadThumbnail = true, Action<Sprite> onComplete = null, DataTransferStatus downloadTransferStatus = null)
    where T : ContentThumbnail
Parameters
Type Name Description
System.String providerName

The content provider name.

T file

The given content library file.

System.String itemKey

Item key, mainly used to pick the file storage location. Can be the item Title.

System.Boolean loadThumbnail
System.Action<UnityEngine.Sprite> onComplete

Occurs when the process is completed. Contains whether or not this process has been successfully completed.

DataTransferStatus downloadTransferStatus

The transfer process tracker.

Returns
Type Description
System.Collections.IEnumerator
Type Parameters
Name Description
T
View Source

GetContentItemProcess(Int32, String, String, Boolean, Boolean, String, Action<ContentItem>, Action<EmsError>, Action<Boolean>, DataTransferStatus)

Declaration
public static IEnumerator GetContentItemProcess(int channelId, string providerName, string contentItemKey, bool downloadThumbnail, bool downloadContentFiles, string customFileKey = "", Action<ContentItem> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null, DataTransferStatus downloadTransferStatus = null)
Parameters
Type Name Description
System.Int32 channelId
System.String providerName
System.String contentItemKey
System.Boolean downloadThumbnail
System.Boolean downloadContentFiles
System.String customFileKey
System.Action<ContentItem> onSuccess
System.Action<EmsError> onFailure
System.Action<System.Boolean> onComplete
DataTransferStatus downloadTransferStatus
Returns
Type Description
System.Collections.IEnumerator
View Source

GetContentItemProcess(String, String, Boolean, Boolean, String, Action<ContentItem>, Action<EmsError>, Action<Boolean>, DataTransferStatus)

Declaration
public static IEnumerator GetContentItemProcess(string providerName, string contentItemKey, bool downloadThumbnail, bool downloadContentFiles, string customFileKey = "", Action<ContentItem> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null, DataTransferStatus downloadTransferStatus = null)
Parameters
Type Name Description
System.String providerName
System.String contentItemKey
System.Boolean downloadThumbnail
System.Boolean downloadContentFiles
System.String customFileKey
System.Action<ContentItem> onSuccess
System.Action<EmsError> onFailure
System.Action<System.Boolean> onComplete
DataTransferStatus downloadTransferStatus
Returns
Type Description
System.Collections.IEnumerator
View Source

GetPathToContentFile(String, ContentFile, String)

Path to a Content library file.

Declaration
public static string GetPathToContentFile(string providerName, ContentFile file, string fileKey)
Parameters
Type Name Description
System.String providerName
ContentFile file
System.String fileKey
Returns
Type Description
System.String
View Source

GetPathToContentFileDirectory(String, String)

Path to the directory holding Content library file.

Declaration
public static string GetPathToContentFileDirectory(string providerName, string fileKey)
Parameters
Type Name Description
System.String providerName
System.String fileKey
Returns
Type Description
System.String
View Source

GetPathToContentProviderDirectory(String)

Path to the directory holding Content library provider.

Declaration
public static string GetPathToContentProviderDirectory(string providerName)
Parameters
Type Name Description
System.String providerName
Returns
Type Description
System.String
View Source

GetPathToContentThumbnail(String, ContentFile, String)

Path to a Content library file.

Declaration
public static string GetPathToContentThumbnail(string providerName, ContentFile thumbnail, string fileKey)
Parameters
Type Name Description
System.String providerName
ContentFile thumbnail
System.String fileKey
Returns
Type Description
System.String
View Source

GetPathToContentThumbnailDirectory(String, String)

Path to the directory holding Content library thumbnail.

Declaration
public static string GetPathToContentThumbnailDirectory(string providerName, string fileKey)
Parameters
Type Name Description
System.String providerName
System.String fileKey
Returns
Type Description
System.String
View Source

TryToFindFirstItemWithContentKey(String, String)

Tries to find the first file with stored under a given fileKey.

Declaration
public static string TryToFindFirstItemWithContentKey(string providerName, string fileKey)
Parameters
Type Name Description
System.String providerName
System.String fileKey
Returns
Type Description
System.String

Extension Methods

ObjectExtension.ToStream(Object)
  • View Source
Back to top Generated by DocFX