Partage via


class ProtectionHandler ::Observer

Interface qui reçoit des notifications liées à ProtectionHandler. Cette interface doit être implémentée par les applications à l’aide du Kit de développement logiciel (SDK) de protection

Résumé

Membres Descriptions
public virtual void OnCreateProtectionHandlerSuccess(const std ::shared_ptr<ProtectionHandler&protectionHandler>, const std ::shared_ptr<void>&context) Appelé lorsque ProtectionHandler a été créé avec succès.
public virtual void OnCreateProtectionHandlerFailure(const std ::exception_ptr&error, const std ::shared_ptr<void>&context) Appelé lorsque la création de ProtectionHandler a échoué.

Membres

OnCreateProtectionHandlerSuccess, fonction

Appelé lorsque ProtectionHandler a été créé avec succès.

Paramètres :

  • protectionHandler : ProtectionHandler nouvellement créé

  • contexte : contexte qui a été passé à ProtectionEngine ::CreateProtectionHandlerFromDescriptorAsync ou ProtectionEngine ::CreateProtectionHandlerFromPublishingLicenseAsync

Une application peut passer n’importe quel type de contexte (par exemple, std ::p romise, std ::function) à ProtectionEngine ::CreateProtectionHandlerFromDescriptorAsync ou ProtectionEngine ::CreateProtectionHandlerFromPublishingLicenseAsync, et ce même contexte sera transféré tel quel à ProtectionEngine ::Observer ::OnCreateProtectionHandlerSuccess ou ProtectionEngine ::Observer ::OnCreateProtectionHandlerFailure

OnCreateProtectionHandlerFailure, fonction

Appelé lorsque la création de ProtectionHandler a échoué.

Paramètres :

  • erreur : Échec qui s’est produit lors de la création

  • contexte : contexte qui a été passé à ProtectionEngine ::CreateProtectionHandlerFromDescriptorAsync ou ProtectionEngine ::CreateProtectionHandlerFromPublishingLicenseAsync

Une application peut passer n’importe quel type de contexte (par exemple, std ::p romise, std ::function) à ProtectionEngine ::CreateProtectionHandlerFromDescriptorAsync ou ProtectionEngine ::CreateProtectionHandlerFromPublishingLicenseAsync, et ce même contexte sera transféré tel quel à ProtectionEngine ::Observer ::OnCreateProtectionHandlerSuccess ou ProtectionEngine ::Observer ::OnCreateProtectionHandlerFailure