Microsoft Information Protection SDK - C++ 1.17
API Reference Documentation for C++
Loading...
Searching...
No Matches
ProtectionProfile::Observer Class Reference

Interface that receives notifications related to ProtectionProfile. More...

#include <protection_profile.h>

Public Member Functions

virtual void OnLoadSuccess (const std::shared_ptr< ProtectionProfile > &profile, const std::shared_ptr< void > &context)
 Called when profile was loaded successfully.
 
virtual void OnLoadFailure (const std::exception_ptr &error, const std::shared_ptr< void > &context)
 Called when loading a profile caused an error.
 
virtual void OnListEnginesSuccess (const std::vector< std::string > &engineIds, const std::shared_ptr< void > &context)
 Called when list of engines was generated successfully.
 
virtual void OnListEnginesFailure (const std::exception_ptr &error, const std::shared_ptr< void > &context)
 Called when listing engines resulted in an error.
 
virtual void OnAddEngineSuccess (const std::shared_ptr< ProtectionEngine > &engine, const std::shared_ptr< void > &context)
 Called when a new engine was added successfully.
 
virtual void OnAddEngineFailure (const std::exception_ptr &error, const std::shared_ptr< void > &context)
 Called when adding a new engine resulted in an error.
 
virtual void OnDeleteEngineSuccess (const std::shared_ptr< void > &context)
 Called when an engine was deleted successfully.
 
virtual void OnDeleteEngineFailure (const std::exception_ptr &error, const std::shared_ptr< void > &context)
 Called when deleting an engine resulted in an error.
 

Detailed Description

Interface that receives notifications related to ProtectionProfile.

Note
This interface must be implemented by applications using the protection SDK

Member Function Documentation

◆ OnAddEngineFailure()

virtual void ProtectionProfile::Observer::OnAddEngineFailure ( const std::exception_ptr & error,
const std::shared_ptr< void > & context )
inlinevirtual

Called when adding a new engine resulted in an error.

Parameters
errorthe error that caused the add engine operation to fail.
contextThe same context that was passed to ProtectionProfile::AddEngineAsync

◆ OnAddEngineSuccess()

virtual void ProtectionProfile::Observer::OnAddEngineSuccess ( const std::shared_ptr< ProtectionEngine > & engine,
const std::shared_ptr< void > & context )
inlinevirtual

Called when a new engine was added successfully.

Parameters
engineNewly created engine
contextThe same context that was passed to ProtectionProfile::AddEngineAsync

◆ OnDeleteEngineFailure()

virtual void ProtectionProfile::Observer::OnDeleteEngineFailure ( const std::exception_ptr & error,
const std::shared_ptr< void > & context )
inlinevirtual

Called when deleting an engine resulted in an error.

Parameters
errorthe error that caused the delete engine operation to fail.
contextThe same context that was passed to ProtectionProfile::DeleteEngineAsync

◆ OnDeleteEngineSuccess()

virtual void ProtectionProfile::Observer::OnDeleteEngineSuccess ( const std::shared_ptr< void > & context)
inlinevirtual

Called when an engine was deleted successfully.

Parameters
contextThe same context that was passed to ProtectionProfile::DeleteEngineAsync

◆ OnListEnginesFailure()

virtual void ProtectionProfile::Observer::OnListEnginesFailure ( const std::exception_ptr & error,
const std::shared_ptr< void > & context )
inlinevirtual

Called when listing engines resulted in an error.

Parameters
errorthe error that caused the list engines operation to fail.
contextThe same context that was passed to ProtectionProfile::ListEnginesAsync

◆ OnListEnginesSuccess()

virtual void ProtectionProfile::Observer::OnListEnginesSuccess ( const std::vector< std::string > & engineIds,
const std::shared_ptr< void > & context )
inlinevirtual

Called when list of engines was generated successfully.

Parameters
engineIdsa list of engine IDs the are available.
contextThe same context that was passed to ProtectionProfile::ListEnginesAsync

◆ OnLoadFailure()

virtual void ProtectionProfile::Observer::OnLoadFailure ( const std::exception_ptr & error,
const std::shared_ptr< void > & context )
inlinevirtual

Called when loading a profile caused an error.

Parameters
errorError that occurred while loading
contextThe same context that was passed to ProtectionProfile::LoadAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionProfile::LoadAsync and that same context will be forwarded as-is to ProtectionProfile::Observer::OnLoadSuccess or ProtectionProfile::Observer::OnLoadFailure

◆ OnLoadSuccess()

virtual void ProtectionProfile::Observer::OnLoadSuccess ( const std::shared_ptr< ProtectionProfile > & profile,
const std::shared_ptr< void > & context )
inlinevirtual

Called when profile was loaded successfully.

Parameters
profileA reference to the newly created ProtectionProfile
contextThe same context that was passed to ProtectionProfile::LoadAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionProfile::LoadAsync and that same context will be forwarded as-is to ProtectionProfile::Observer::OnLoadSuccess or ProtectionProfile::Observer::OnLoadFailure

The documentation for this class was generated from the following file: