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

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

#include <protection_engine.h>

Public Member Functions

virtual void OnGetTemplatesSuccess (const std::vector< std::shared_ptr< TemplateDescriptor > > &templateDescriptors, const std::shared_ptr< void > &context)
 Called when templates were retrieved successfully.
 
virtual void OnGetTemplatesFailure (const std::exception_ptr &error, const std::shared_ptr< void > &context)
 Called when retrieving templates generated an error.
 
virtual void OnGetRightsForLabelIdSuccess (const std::shared_ptr< std::vector< std::string > > &rights, const std::shared_ptr< void > &context)
 Called when rights were retrieved successfully.
 
virtual void OnGetRightsForLabelIdFailure (const std::exception_ptr &error, const std::shared_ptr< void > &context)
 Called when retrieving rights for a label ID for the user.
 
virtual void OnLoadUserCertSuccess (const std::shared_ptr< void > &context)
 Called when user cert loaded successfully.
 
virtual void OnLoadUserCertFailure (const std::exception_ptr &error, const std::shared_ptr< void > &context)
 Called when user cert loaded failed.
 
virtual void OnRegisterContentForTrackingAndRevocationSuccess (const std::shared_ptr< void > &context)
 Called when registration of content for tracking & revocation is successful.
 
virtual void OnRegisterContentForTrackingAndRevocationFailure (const std::exception_ptr &error, const std::shared_ptr< void > &context)
 Called when registration of content for tracking & revocation fails.
 
virtual void OnRevokeContentSuccess (const std::shared_ptr< void > &context)
 Called when revocation of is successful.
 
virtual void OnRevokeContentFailure (const std::exception_ptr &error, const std::shared_ptr< void > &context)
 Called when revocation of content is fails.
 
virtual void OnCreateDelegatedLicensesSuccess (std::vector< std::shared_ptr< DelegationLicense > > delegatedLicenses, const std::shared_ptr< void > &context)
 Called when create delegated license is successful.
 
virtual void OnCreateDelegatedLicensesFailure (const std::exception_ptr &error, const std::shared_ptr< void > &context)
 Called when create delegated license fails.
 
virtual void OnGetTenantInformationAsyncSuccess (const std::shared_ptr< TenantInformation > &tenantInformation, const std::shared_ptr< void > &context)
 Called when GetTenantInformationAsync is successful.
 
virtual void OnGetTenantInformationAsyncFailure (const std::exception_ptr &error, const std::shared_ptr< void > &context)
 Called when GetTenantInformationAsync fails.
 
virtual void OnGetLicenseRightsDataSuccess (const std::shared_ptr< LicenseRightsData > &licenseRightsData, const std::shared_ptr< void > &context)
 Called when license rights data were retrieved successfully.
 
virtual void OnGetLicenseRightsDataFailure (const std::exception_ptr &error, const std::shared_ptr< void > &context)
 Called when retrieving license rights data fails.
 

Detailed Description

Interface that receives notifications related to ProtectionEngine.

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

Member Function Documentation

◆ OnCreateDelegatedLicensesFailure()

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

Called when create delegated license fails.

Parameters
errorError that occurred
contextThe same context that was passed to ProtectionEngine::CreateDelegationLicensesAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionEngine::CreateDelegationLicensesAsync and that same context will be forwarded as-is to ProtectionEngine::Observer::OnCreateDelegatedLicensesSuccess or ProtectionEngine::Observer::OnCreateDelegatedLicensesFailure

◆ OnCreateDelegatedLicensesSuccess()

virtual void ProtectionEngine::Observer::OnCreateDelegatedLicensesSuccess ( std::vector< std::shared_ptr< DelegationLicense > > delegatedLicenses,
const std::shared_ptr< void > & context )
inlinevirtual

Called when create delegated license is successful.

Parameters
contextThe same context that was passed to ProtectionEngine::CreateDelegationLicensesAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionEngine::CreateDelegationLicensesAsync and that same context will be forwarded as-is to ProtectionEngine::Observer::OnCreateDelegatedLicensesSuccess or ProtectionEngine::Observer::OnCreateDelegatedLicensesFailure

◆ OnGetLicenseRightsDataFailure()

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

Called when retrieving license rights data fails.

Parameters
errorError that occurred while retrieving license rights data
contextThe same context that was passed to ProtectionEngine::GetLicenseRightsDataAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionEngine::GetLicenseRightsDataAsync and that same context will be forwarded as-is to ProtectionEngine::Observer::OnGetLicenseRightsDataSuccess or ProtectionEngine::Observer::OnGetLicenseRightsDataFailure

◆ OnGetLicenseRightsDataSuccess()

virtual void ProtectionEngine::Observer::OnGetLicenseRightsDataSuccess ( const std::shared_ptr< LicenseRightsData > & licenseRightsData,
const std::shared_ptr< void > & context )
inlinevirtual

Called when license rights data were retrieved successfully.

Parameters
rightsA reference to the license rights data retrieved
contextThe same context that was passed to ProtectionEngine::GetLicenseRightsDataAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionEngine::GetLicenseRightsDataAsync and that same context will be forwarded as-is to ProtectionEngine::Observer::OnGetLicenseRightsDataSuccess or ProtectionEngine::Observer::OnGetLicenseRightsDataFailure

◆ OnGetRightsForLabelIdFailure()

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

Called when retrieving rights for a label ID for the user.

Parameters
errorError that occurred while retrieving rights
contextThe same context that was passed to ProtectionEngine::GetRightsForLabelIdAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionEngine::GetRightsForLabelIdAsync and that same context will be forwarded as-is to ProtectionEngine::Observer::OnGetRightsForLabelIdSuccess or ProtectionEngine::Observer::OnGetRightsForLabelIdFailure

◆ OnGetRightsForLabelIdSuccess()

virtual void ProtectionEngine::Observer::OnGetRightsForLabelIdSuccess ( const std::shared_ptr< std::vector< std::string > > & rights,
const std::shared_ptr< void > & context )
inlinevirtual

Called when rights were retrieved successfully.

Parameters
rightsA reference to the list of rights retrieved
contextThe same context that was passed to ProtectionEngine::GetRightsForLabelIdAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionEngine::GetRightsForLabelIdAsync and that same context will be forwarded as-is to ProtectionEngine::Observer::OnGetRightsForLabelIdSuccess or ProtectionEngine::Observer::OnGetRightsForLabelIdFailure

◆ OnGetTemplatesFailure()

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

Called when retrieving templates generated an error.

Parameters
errorError that occurred while retrieving templates
contextThe same context that was passed to ProtectionEngine::GetTemplatesAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionEngine::GetTemplatesAsync and that same context will be forwarded as-is to ProtectionEngine::Observer::OnGetTemplatesSuccess or ProtectionEngine::Observer::OnGetTemplatesFailure

◆ OnGetTemplatesSuccess()

virtual void ProtectionEngine::Observer::OnGetTemplatesSuccess ( const std::vector< std::shared_ptr< TemplateDescriptor > > & templateDescriptors,
const std::shared_ptr< void > & context )
inlinevirtual

Called when templates were retrieved successfully.

Parameters
templateDescriptorsA reference to the list of templates descriptors
contextThe same context that was passed to ProtectionEngine::GetTemplatesAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionEngine::GetTemplatesAsync and that same context will be forwarded as-is to ProtectionEngine::Observer::OnGetTemplatesSuccess or ProtectionEngine::Observer::OnGetTemplatesFailure

◆ OnGetTenantInformationAsyncFailure()

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

Called when GetTenantInformationAsync fails.

Parameters
errorError that occurred
contextThe same context that was passed to ProtectionEngine::GetTenantInformationAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionEngine::GetTenantInformationAsync and that same context will be forwarded as-is to ProtectionEngine::Observer::OnGetTenantInformationAsyncSuccess or ProtectionEngine::Observer::OnGetTenantInformationAsyncFailure

◆ OnGetTenantInformationAsyncSuccess()

virtual void ProtectionEngine::Observer::OnGetTenantInformationAsyncSuccess ( const std::shared_ptr< TenantInformation > & tenantInformation,
const std::shared_ptr< void > & context )
inlinevirtual

Called when GetTenantInformationAsync is successful.

Parameters
contextThe same context that was passed to ProtectionEngine::GetTenantInformationAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionEngine::GetTenantInformationAsync and that same context will be forwarded as-is to ProtectionEngine::Observer::OnGetTenantInformationAsyncSuccess or ProtectionEngine::Observer::OnGetTenantInformationAsyncFailure

◆ OnLoadUserCertFailure()

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

Called when user cert loaded failed.

Parameters
errorError that occurred while retrieving rights
contextThe same context that was passed to ProtectionEngine::LoadUserCertAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionEngine::LoadUserCertAsync and that same context will be forwarded as-is to ProtectionEngine::Observer::OnLoadUserCertSuccess or ProtectionEngine::Observer::OnLoadUserCertFailure

◆ OnLoadUserCertSuccess()

virtual void ProtectionEngine::Observer::OnLoadUserCertSuccess ( const std::shared_ptr< void > & context)
inlinevirtual

Called when user cert loaded successfully.

Parameters
contextThe same context that was passed to ProtectionEngine::LoadUserCertAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionEngine::LoadUserCertAsync and that same context will be forwarded as-is to ProtectionEngine::Observer::OnLoadUserCertSuccess or ProtectionEngine::Observer::OnLoadUserCertFailure

◆ OnRegisterContentForTrackingAndRevocationFailure()

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

Called when registration of content for tracking & revocation fails.

Parameters
errorError that occurred while registering content
contextThe same context that was passed to ProtectionEngine::RegisterContentForTrackingAndRevocationAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionEngine::RegisterContentForTrackingAndRevocationAsync and that same context will be forwarded as-is to ProtectionEngine::Observer::OnRegisterContentForTrackingAndRevocationSuccess or ProtectionEngine::Observer::OnRegisterContentForTrackingAndRevocationFailure

◆ OnRegisterContentForTrackingAndRevocationSuccess()

virtual void ProtectionEngine::Observer::OnRegisterContentForTrackingAndRevocationSuccess ( const std::shared_ptr< void > & context)
inlinevirtual

Called when registration of content for tracking & revocation is successful.

Parameters
contextThe same context that was passed to ProtectionEngine::RegisterContentForTrackingAndRevocationAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionEngine::RegisterContentForTrackingAndRevocationAsync and that same context will be forwarded as-is to ProtectionEngine::Observer::OnRegisterContentForTrackingAndRevocationSuccess or ProtectionEngine::Observer::OnRegisterContentForTrackingAndRevocationFailure

◆ OnRevokeContentFailure()

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

Called when revocation of content is fails.

Parameters
errorError that occurred while revoking content
contextThe same context that was passed to ProtectionEngine::RevokeContentAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionEngine::RevokeContentAsync and that same context will be forwarded as-is to ProtectionEngine::Observer::OnRevokeContentSuccess or ProtectionEngine::Observer::OnRevokeContentFailure

◆ OnRevokeContentSuccess()

virtual void ProtectionEngine::Observer::OnRevokeContentSuccess ( const std::shared_ptr< void > & context)
inlinevirtual

Called when revocation of is successful.

Parameters
contextThe same context that was passed to ProtectionEngine::RevokeContentAsync
Note
An application can pass any type of context (for example, std::promise, std::function) to ProtectionEngine::RevokeContentAsync and that same context will be forwarded as-is to ProtectionEngine::Observer::OnRevokeContentSuccess or ProtectionEngine::Observer::OnRevokeContentFailure

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