다음을 통해 공유


class ProtectionProfile::Observer

ProtectionProfile과 관련된 알림을 받는 인터페이스입니다. 이 인터페이스는 보호 SDK를 사용하여 애플리케이션에서 구현해야 합니다.

요약

멤버 설명
public virtual void OnLoadSuccess(const std::shared_ptr<ProtectionProfile>& profile, const std::shared_ptr<void>& context) 프로필이 성공적으로 로드되었을 때 호출됩니다.
public virtual void OnLoadFailure(const std::exception_ptr&error, const std::shared_ptr<void>& context) 프로필을 로드할 때 호출되어 오류가 발생했습니다.
public virtual void OnListEnginesSuccess(const std::vector<std::string>& engineIds, const std::shared_ptr<void>& context) 엔진 목록이 성공적으로 생성되었을 때 호출됩니다.
public virtual void OnListEnginesFailure(const std::exception_ptr& error, const std::shared_ptr<void>& context) 엔진을 나열하면 오류가 발생할 때 호출됩니다.
public virtual void OnAddEngineSuccess(const std::shared_ptr<ProtectionEngine>& engine, const std::shared_ptr<void>& context) 새 엔진이 성공적으로 추가되었을 때 호출됩니다.
public virtual void OnAddEngineFailure(const std::exception_ptr& error, const std::shared_ptr<void>& context) 새 엔진을 추가할 때 호출되어 오류가 발생했습니다.
public virtual void OnDeleteEngineSuccess(const std::shared_ptr<void>& context) 엔진이 성공적으로 삭제되었을 때 호출됩니다.
public virtual void OnDeleteEngineFailure(const std::exception_ptr&error, const std::shared_ptr<void>& context) 엔진을 삭제할 때 호출되어 오류가 발생했습니다.

멤버

OnLoadSuccess 함수

프로필이 성공적으로 로드되었을 때 호출됩니다.

매개 변수:

  • profile: 새로 만든 ProtectionProfile에 대한 참조

  • 컨텍스트: ProtectionProfile::LoadAsync에 전달된 동일한 컨텍스트

애플리케이션은 모든 유형의 컨텍스트(예: std::p romise, std::function)를 ProtectionProfile::LoadAsync에 전달할 수 있으며 동일한 컨텍스트는 ProtectionProfile::Observer::OnLoadSuccess 또는 ProtectionProfile::Observer::OnLoadFailure에 있는 그대로 전달됩니다.

OnLoadFailure 함수

프로필을 로드할 때 호출되어 오류가 발생했습니다.

매개 변수:

  • error: 로드하는 동안 오류 발생

  • 컨텍스트: ProtectionProfile::LoadAsync에 전달된 동일한 컨텍스트

애플리케이션은 모든 유형의 컨텍스트(예: std::p romise, std::function)를 ProtectionProfile::LoadAsync에 전달할 수 있으며 동일한 컨텍스트는 ProtectionProfile::Observer::OnLoadSuccess 또는 ProtectionProfile::Observer::OnLoadFailure에 있는 그대로 전달됩니다.

OnListEnginesSuccess 함수

엔진 목록이 성공적으로 생성되었을 때 호출됩니다.

매개 변수:

  • engineIds: 사용 가능한 엔진 ID 목록입니다.

  • 컨텍스트: ProtectionProfile::ListEnginesAsync에 전달된 동일한 컨텍스트

OnListEnginesFailure 함수

엔진을 나열하면 오류가 발생할 때 호출됩니다.

매개 변수:

  • 오류: 목록 엔진 작업이 실패하게 한 오류입니다.

  • 컨텍스트: ProtectionProfile::ListEnginesAsync에 전달된 동일한 컨텍스트

OnAddEngineSuccess 함수

새 엔진이 성공적으로 추가되었을 때 호출됩니다.

매개 변수:

  • 엔진: 새로 만든 엔진

  • context: ProtectionProfile::AddEngineAsync에 전달된 동일한 컨텍스트

OnAddEngineFailure 함수

새 엔진을 추가할 때 호출되어 오류가 발생했습니다.

매개 변수:

  • 오류: 엔진 추가 작업이 실패하게 한 오류입니다.

  • context: ProtectionProfile::AddEngineAsync에 전달된 동일한 컨텍스트

OnDeleteEngineSuccess 함수

엔진이 성공적으로 삭제되었을 때 호출됩니다.

매개 변수:

  • 컨텍스트: ProtectionProfile::D eleteEngineAsync에 전달된 동일한 컨텍스트

OnDeleteEngineFailure 함수

엔진을 삭제할 때 호출되어 오류가 발생했습니다.

매개 변수:

  • 오류: 엔진 삭제 작업이 실패하게 한 오류입니다.

  • 컨텍스트: ProtectionProfile::D eleteEngineAsync에 전달된 동일한 컨텍스트