open abstract method

Future<Try<ProtectedAsset, UserException>?> open(
  1. PublicationAsset asset,
  2. Fetcher fetcher,
  3. String? credentials,
  4. bool allowUserInteraction,
  5. Object sender,
)

Attempts to unlock a potentially protected file.

The Streamer will create a leaf fetcher for the low-level file access (e.g. ArchiveFetcher for a ZIP archive), to avoid having each Content Protection open the file to check if it's protected or not.

A publication might be protected in such a way that the package format can't be recognized, in which case the Content Protection will have the responsibility of creating a new leaf Fetcher.

@return A ProtectedAsset in case of success, null if the file is not protected by this technology or a UserException if the file can't be successfully opened, even in restricted mode.

Implementation

Future<Try<ProtectedAsset, UserException>?> open(
    PublicationAsset asset,
    Fetcher fetcher,
    String? credentials,
    bool allowUserInteraction,
    Object sender);