Clase ProtectionHandler::Observer

Interfaz que recibe notificaciones relacionadas con ProtectionHandler. Esta interfaz debe implementarse mediante aplicaciones que usen el SDK de protección.

Resumen

Miembros Descripciones
public virtual void OnCreateProtectionHandlerSuccess(const std::shared_ptr<ProtectionHandler& protectionHandler>, const std::shared_ptr<void>& context) Se llama cuando ProtectionHandler se creó correctamente.
public virtual void OnCreateProtectionHandlerFailure(const std::exception_ptr& error, const std::shared_ptr<void>& context) Se llama cuando se produjo un error en la creación de ProtectionHandler.

Miembros

Función OnCreateProtectionHandlerSuccess

Se llama cuando ProtectionHandler se creó correctamente.

Parámetros:

  • protectionHandler: ProtectionHandler recién creado

  • context: el mismo contexto que se pasó a ProtectionEngine::CreateProtectionHandlerFromDescriptorAsync o ProtectionEngine::CreateProtectionHandlerFromPublishingLicenseAsync

Una aplicación puede pasar cualquier tipo de contexto (por ejemplo, std::p romise, std::function) a ProtectionEngine::CreateProtectionHandlerFromDescriptorAsync o ProtectionEngine::CreateProtectionHandlerFromPublishingLicenseAsync y ese mismo contexto se reenviará tal como está a ProtectionEngine::Observer::OnCreateProtectionHandlerSuccess o ProtectionEngine::Observer::OnCreateProtectionHandlerFailure

Función OnCreateProtectionHandlerFailure

Se llama cuando se produjo un error en la creación de ProtectionHandler.

Parámetros:

  • error: error que se produjo durante la creación

  • context: el mismo contexto que se pasó a ProtectionEngine::CreateProtectionHandlerFromDescriptorAsync o ProtectionEngine::CreateProtectionHandlerFromPublishingLicenseAsync

Una aplicación puede pasar cualquier tipo de contexto (por ejemplo, std::p romise, std::function) a ProtectionEngine::CreateProtectionHandlerFromDescriptorAsync o ProtectionEngine::CreateProtectionHandlerFromPublishingLicenseAsync y ese mismo contexto se reenviará tal como está a ProtectionEngine::Observer::OnCreateProtectionHandlerSuccess o ProtectionEngine::Observer::OnCreateProtectionHandlerFailure