JWDRMContentKeyManager
@objc
public protocol JWDRMContentKeyManager
A protocol for classes which are informed about events and requests dealing with content keys for protected content.
-
Requests that the content key associated with the given identifier is recorded.
Declaration
Swift
func contentLoader(_ contentLoader: JWDRMContentLoader, writePersistableContentKey contentKey: Data, contentKeyIdentifier: String)
Parameters
contentLoader
The
JWDRMContentLoader
instance.contentKey
The content key to be written to disk.
contentKeyIdentifier
The identifier of the content keys to write.
-
Reports when the persistable content key has been successfully saved.
If content is going to be downloaded, this event is where is should be done.
Declaration
Swift
func contentLoader(_ contentLoader: JWDRMContentLoader, didWritePersistableContentKey contentKeyIdentifier: String)
Parameters
contentLoader
The
JWDRMContentLoader
instance.contentKeyIdentifier
The identifier of the content keys that were saved.
-
Requests that the content associated with the given key is deleted.
Declaration
Swift
func contentLoader(_ contentLoader: JWDRMContentLoader, deletePersistableContentKey contentKeyIdentifier: String)
Parameters
contentLoader
The
JWDRMContentLoader
instance.contentKeyIdentifier
The identifier of the content to be deleted.
-
Returns whether or not the given content should be treated as peristable.
Declaration
Swift
func contentLoader(_ contentLoader: JWDRMContentLoader, contentKeyTypeFor contentKeyIdentifier: String) -> JWContentKeyType
Parameters
contentLoader
The
JWDRMContentLoader
instance.contentKeyIdentifier
The identifier of the content being queried.
Return Value
A value denoting whether the content is persistable or not.
-
Returns true if the given content exists on disk.
Declaration
Swift
func contentLoader(_ contentLoader: JWDRMContentLoader, contentKeyExistsOnDisk contentKeyIdentifier: String) -> Bool
Parameters
contentLoader
The
JWDRMContentLoader
instance.contentKeyIdentifier
The identifier of the content being queried.
Return Value
true
if the content exists on the device. -
Returns the URL associated with the specified persistable content.
Declaration
Swift
func contentLoader(_ contentLoader: JWDRMContentLoader, urlForPersistableContentKey contentKeyIdentifier: String) -> URL
Parameters
contentLoader
The
JWDRMContentLoader
instance.contentKeyIdentifier
The identifier of the content being queried.
Return Value
The URL of the content on disk.
-
Reports an error if one occurs.
Declaration
Swift
func contentLoader(_ contentLoader: JWDRMContentLoader, failedWithError error: JWError)
Parameters
contentLoader
The
JWDRMContentLoader
instance.error
The error which occurred.