Microsoft Information Protection (MIP) SDK for C++: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
ProtectionEngine Class Referenceabstract

Manages protection-related actions related to a specific identity. More...

#include <src/api/mip/protection/protection_engine.h>

Classes

class  Observer
 Interface that receives notifications related to ProtectionEngine. More...
 
class  Settings
 Settings used by ProtectionEngine during its creation and throughout its lifetime. More...
 

Public Member Functions

virtual std::vector< std::shared_ptr< DelegationLicense > > CreateDelegationLicenses (const DelegationLicenseSettings &settings, const std::shared_ptr< void > &context)=0
 Creates a delegated license.
 
virtual std::shared_ptr< AsyncControlCreateDelegationLicensesAsync (const DelegationLicenseSettings &settings, const std::shared_ptr< ProtectionEngine::Observer > &observer, const std::shared_ptr< void > &context)=0
 Creates a delegated license.
 
virtual std::shared_ptr< ProtectionHandlerCreateProtectionHandlerForConsumption (const ProtectionHandler::ConsumptionSettings &settings, const std::shared_ptr< void > &context)=0
 Creates a protection handler where rights/roles are assigned to specific users.
 
virtual std::shared_ptr< AsyncControlCreateProtectionHandlerForConsumptionAsync (const ProtectionHandler::ConsumptionSettings &settings, const std::shared_ptr< ProtectionHandler::Observer > &observer, const std::shared_ptr< void > &context)=0
 Creates a protection handler where rights/roles are assigned to specific users.
 
virtual std::shared_ptr< ProtectionHandlerCreateProtectionHandlerForPublishing (const ProtectionHandler::PublishingSettings &settings, const std::shared_ptr< void > &context)=0
 Creates a protection handler where rights/roles are assigned to specific users.
 
virtual std::shared_ptr< AsyncControlCreateProtectionHandlerForPublishingAsync (const ProtectionHandler::PublishingSettings &settings, const std::shared_ptr< ProtectionHandler::Observer > &observer, const std::shared_ptr< void > &context)=0
 Creates a protection handler where rights/roles are assigned to specific users.
 
virtual std::shared_ptr< mip::LicenseInfo > GetLicenseInfoForLabelId (const std::string &documentId, const std::string &labelId, const std::string &ownerEmail, const std::string &delegatedUserEmail, const std::shared_ptr< void > &context, const ProtectionCommonSettings &settings=ProtectionCommonSettings())=0
 Get the collection of properties (including usage rights) associated with a user for a given label ID.
 
virtual std::shared_ptr< LicenseRightsDataGetLicenseRightsData (const std::vector< uint8_t > &serializedPublishingLicense, const std::shared_ptr< void > &context, const ProtectionCommonSettings &settings=ProtectionCommonSettings())=0
 Get the rights data for a license.
 
virtual std::shared_ptr< AsyncControlGetLicenseRightsDataAsync (const std::vector< uint8_t > &serializedPublishingLicense, const std::shared_ptr< ProtectionEngine::Observer > &observer, const std::shared_ptr< void > &context, const ProtectionCommonSettings &settings=ProtectionCommonSettings())=0
 Get the rights data for a license.
 
virtual std::vector< std::string > GetRightsForLabelId (const std::string &documentId, const std::string &labelId, const std::string &ownerEmail, const std::string &delegatedUserEmail, const std::shared_ptr< void > &context, const ProtectionCommonSettings &settings=ProtectionCommonSettings())=0
 Get collection of rights available to a user for a labelId.
 
virtual std::shared_ptr< AsyncControlGetRightsForLabelIdAsync (const std::string &documentId, const std::string &labelId, const std::string &ownerEmail, const std::string &delegatedUserEmail, const std::shared_ptr< ProtectionEngine::Observer > &observer, const std::shared_ptr< void > &context, const ProtectionCommonSettings &settings=ProtectionCommonSettings())=0
 Get collection of rights available to a user for a label ID.
 
virtual const SettingsGetSettings () const =0
 Gets the engine settings.
 
virtual std::vector< std::shared_ptr< TemplateDescriptor > > GetTemplates (const std::shared_ptr< void > &context)=0
 Get collection of templates available to a user.
 
virtual std::vector< std::shared_ptr< TemplateDescriptor > > GetTemplates (const std::shared_ptr< void > &context, const std::shared_ptr< const GetTemplatesSettings > &templateSettings)=0
 Get collection of templates available to a user.
 
virtual std::shared_ptr< AsyncControlGetTemplatesAsync (const std::shared_ptr< ProtectionEngine::Observer > &observer, const std::shared_ptr< void > &context)=0
 Get collection of templates available to a user.
 
virtual std::shared_ptr< AsyncControlGetTemplatesAsync (const std::shared_ptr< ProtectionEngine::Observer > &observer, const std::shared_ptr< void > &context, const std::shared_ptr< const GetTemplatesSettings > &templateSettings)=0
 Get collection of templates available to a user.
 
virtual std::shared_ptr< TenantInformationGetTenantInformation (const ProtectionCommonSettings &settings, const std::shared_ptr< void > &context)=0
 Loads user licensor certificate and returns information about the tenant.
 
virtual std::shared_ptr< AsyncControlGetTenantInformationAsync (const ProtectionCommonSettings &settings, const std::shared_ptr< ProtectionEngine::Observer > &observer, const std::shared_ptr< void > &context)=0
 Loads user licensor certificate and returns information about the tenant.
 
virtual bool IsFeatureSupported (FeatureId featureId)=0
 Check is feature supported.
 
virtual bool LoadUserCert (const std::shared_ptr< void > &context, const ProtectionCommonSettings &settings=ProtectionCommonSettings())=0
 pre-emptively load user licensor certificate, useful when background loading else using prelicense might incurr an additional network call.
 
virtual std::shared_ptr< AsyncControlLoadUserCertAsync (const std::shared_ptr< ProtectionEngine::Observer > &observer, const std::shared_ptr< void > &context, const ProtectionCommonSettings &settings=ProtectionCommonSettings())=0
 pre-emptively load user licensor certificate, useful when background loading else using prelicense might incurr an additional network call.
 
virtual void RegisterContentForTrackingAndRevocation (const std::vector< uint8_t > &serializedPublishingLicense, const std::string &contentName, bool isOwnerNotificationEnabled, const std::shared_ptr< void > &context, const ProtectionCommonSettings &settings=ProtectionCommonSettings())=0
 Register publishing license (PL) for document tracking & revocation.
 
virtual std::shared_ptr< AsyncControlRegisterContentForTrackingAndRevocationAsync (const std::vector< uint8_t > &serializedPublishingLicense, const std::string &contentName, bool isOwnerNotificationEnabled, const std::shared_ptr< ProtectionEngine::Observer > &observer, const std::shared_ptr< void > &context, const ProtectionCommonSettings &settings=ProtectionCommonSettings())=0
 Register publishing license (PL) for document tracking & revocation.
 
virtual void RevokeContent (const std::vector< uint8_t > &serializedPublishingLicense, const std::shared_ptr< void > &context, const ProtectionCommonSettings &settings=ProtectionCommonSettings())=0
 Perform revocation for content.
 
virtual std::shared_ptr< AsyncControlRevokeContentAsync (const std::vector< uint8_t > &serializedPublishingLicense, const std::shared_ptr< ProtectionEngine::Observer > &observer, const std::shared_ptr< void > &context, const ProtectionCommonSettings &settings=ProtectionCommonSettings())=0
 Perform revocation for content.
 

Detailed Description

Manages protection-related actions related to a specific identity.

Definition at line 74 of file protection_engine.h.

Member Function Documentation

◆ CreateDelegationLicenses()

virtual std::vector< std::shared_ptr< DelegationLicense > > ProtectionEngine::CreateDelegationLicenses ( const DelegationLicenseSettings & settings,
const std::shared_ptr< void > & context )
pure virtual

Creates a delegated license.

Parameters
settingsThe delegation settings
contextClient context that will be opaquely forwarded to observers and optional HttpDelegate
Returns
A vector of the delegation licenses
Note
Use this method to create licenses for a list of users

◆ CreateDelegationLicensesAsync()

virtual std::shared_ptr< AsyncControl > ProtectionEngine::CreateDelegationLicensesAsync ( const DelegationLicenseSettings & settings,
const std::shared_ptr< ProtectionEngine::Observer > & observer,
const std::shared_ptr< void > & context )
pure virtual

Creates a delegated license.

Parameters
settingsThe delegation settings
observerA class implementing the ProtectionHandler::Observer interface
contextClient context that will be opaquely forwarded to observers and optional HttpDelegate
Returns
Async control object.
Note
Use this method to create licenses for a list of users. Receive the DelegationLicense vector in callback OnCreateDelegatedLicensesSuccess Failures are sent in OnCreateDelegatedLicensesFailure

◆ CreateProtectionHandlerForConsumption()

virtual std::shared_ptr< ProtectionHandler > ProtectionEngine::CreateProtectionHandlerForConsumption ( const ProtectionHandler::ConsumptionSettings & settings,
const std::shared_ptr< void > & context )
pure virtual

Creates a protection handler where rights/roles are assigned to specific users.

Parameters
settingsProtection settings
contextClient context that will be opaquely forwarded to optional HttpDelegate
Returns
ProtectionHandler

◆ CreateProtectionHandlerForConsumptionAsync()

virtual std::shared_ptr< AsyncControl > ProtectionEngine::CreateProtectionHandlerForConsumptionAsync ( const ProtectionHandler::ConsumptionSettings & settings,
const std::shared_ptr< ProtectionHandler::Observer > & observer,
const std::shared_ptr< void > & context )
pure virtual

Creates a protection handler where rights/roles are assigned to specific users.

Parameters
settingsProtection settings
observerA class implementing the ProtectionHandler::Observer interface
contextClient context that will be opaquely forwarded to observers and optional HttpDelegate
Returns
Async control object.

◆ CreateProtectionHandlerForPublishing()

virtual std::shared_ptr< ProtectionHandler > ProtectionEngine::CreateProtectionHandlerForPublishing ( const ProtectionHandler::PublishingSettings & settings,
const std::shared_ptr< void > & context )
pure virtual

Creates a protection handler where rights/roles are assigned to specific users.

Parameters
settingsProtection settings
contextClient context that will be opaquely forwarded to optional HttpDelegate
Returns
ProtectionHandler
Note
If settings are offline only, engine needs to have previously called GetTemplates and LoadUserCert

◆ CreateProtectionHandlerForPublishingAsync()

virtual std::shared_ptr< AsyncControl > ProtectionEngine::CreateProtectionHandlerForPublishingAsync ( const ProtectionHandler::PublishingSettings & settings,
const std::shared_ptr< ProtectionHandler::Observer > & observer,
const std::shared_ptr< void > & context )
pure virtual

Creates a protection handler where rights/roles are assigned to specific users.

Parameters
settingsProtection settings
observerA class implementing the ProtectionHandler::Observer interface
contextClient context that will be opaquely forwarded to observers and optional HttpDelegate
Returns
Async control object.
Note
If settings are offline only, engine needs to have previously called GetTemplatesAsync and LoadUserCertAsync

◆ GetLicenseInfoForLabelId()

virtual std::shared_ptr< mip::LicenseInfo > ProtectionEngine::GetLicenseInfoForLabelId ( const std::string & documentId,
const std::string & labelId,
const std::string & ownerEmail,
const std::string & delegatedUserEmail,
const std::shared_ptr< void > & context,
const ProtectionCommonSettings & settings = ProtectionCommonSettings() )
pure virtual

Get the collection of properties (including usage rights) associated with a user for a given label ID.

Parameters
documentIdDocument ID associated with the document metadata
labelIdLabel ID associated with the document metadata with which the document created
ownerEmailOwner of the document
delegatedUserEmailDelegated user is specified when the authenticating user/application is acting on behalf of another user, empty if none
contextThis same context will be forwarded to optional HttpDelegate
settingsThe protection common settings
Returns
A shared pointer to the licenseinfo object

◆ GetLicenseRightsData()

virtual std::shared_ptr< LicenseRightsData > ProtectionEngine::GetLicenseRightsData ( const std::vector< uint8_t > & serializedPublishingLicense,
const std::shared_ptr< void > & context,
const ProtectionCommonSettings & settings = ProtectionCommonSettings() )
pure virtual

Get the rights data for a license.

This method requires the requesting identity to be included in the super user list for your organization. Alternatively, the identity must have been granted VIEWRIGHTSDATA, EDITRIGHTSDATA, or OWNER rights to the content.

Parameters
serializedPublishingLicenseSerialized publishing license from protected content
contextClient context that will be opaquely forwarded to optional HttpDelegate
settingsThe common settings
Returns
The license rights data

◆ GetLicenseRightsDataAsync()

virtual std::shared_ptr< AsyncControl > ProtectionEngine::GetLicenseRightsDataAsync ( const std::vector< uint8_t > & serializedPublishingLicense,
const std::shared_ptr< ProtectionEngine::Observer > & observer,
const std::shared_ptr< void > & context,
const ProtectionCommonSettings & settings = ProtectionCommonSettings() )
pure virtual

Get the rights data for a license.

This method requires the requesting identity to be included in the super user list for your organization. Alternatively, the identity must have been granted VIEWRIGHTSDATA, EDITRIGHTSDATA, or OWNER rights to the content.

Parameters
serializedPublishingLicenseSerialized publishing license from protected content
observerA class implementing the ProtectionHandler::Observer interface
contextClient context that will be opaquely forwarded to observers and optional HttpDelegate
settingsThe common settings
Returns
Async control object.

◆ GetRightsForLabelId()

virtual std::vector< std::string > ProtectionEngine::GetRightsForLabelId ( const std::string & documentId,
const std::string & labelId,
const std::string & ownerEmail,
const std::string & delegatedUserEmail,
const std::shared_ptr< void > & context,
const ProtectionCommonSettings & settings = ProtectionCommonSettings() )
pure virtual

Get collection of rights available to a user for a labelId.

Parameters
documentIdDocument ID associated with the document metadata
labelIdLabel ID associated with the document metadata with which the document created
ownerEmailOwner of the document
delegatedUserEmailA delegated user is specified when the authenticating user/application is acting on behalf of another user empty if none
contextThis same context will be forwarded to optional HttpDelegate
Returns
List of rights

◆ GetRightsForLabelIdAsync()

virtual std::shared_ptr< AsyncControl > ProtectionEngine::GetRightsForLabelIdAsync ( const std::string & documentId,
const std::string & labelId,
const std::string & ownerEmail,
const std::string & delegatedUserEmail,
const std::shared_ptr< ProtectionEngine::Observer > & observer,
const std::shared_ptr< void > & context,
const ProtectionCommonSettings & settings = ProtectionCommonSettings() )
pure virtual

Get collection of rights available to a user for a label ID.

Parameters
documentIdDocument ID associated with the document metadata
labelIdLabel ID associated with the document metadata with which the document created
ownerEmailowner of the document
delegatedUserEmailA delegated user is specified when the authenticating user/application is acting on behalf of another user, empty if none
observerA class implementing the ProtectionEngine::Observer interface
contextThis same context will be forwarded to ProtectionEngine::Observer::OnGetRightsForLabelIdSuccess or ProtectionEngine::Observer::OnGetRightsForLabelIdFailure
Returns
Async control object.

◆ GetSettings()

virtual const Settings & ProtectionEngine::GetSettings ( ) const
pure virtual

Gets the engine settings.

Returns
Engine settings

◆ GetTemplates() [1/2]

virtual std::vector< std::shared_ptr< TemplateDescriptor > > ProtectionEngine::GetTemplates ( const std::shared_ptr< void > & context)
pure virtual

Get collection of templates available to a user.

Parameters
contextClient context that will be opaquely passed to optional HttpDelegate
Returns
List of template IDs

◆ GetTemplates() [2/2]

virtual std::vector< std::shared_ptr< TemplateDescriptor > > ProtectionEngine::GetTemplates ( const std::shared_ptr< void > & context,
const std::shared_ptr< const GetTemplatesSettings > & templateSettings )
pure virtual

Get collection of templates available to a user.

Parameters
contextClient context that will be opaquely passed to optional HttpDelegate
templateSettingsSettings to use when obtaining templates
Returns
List of template IDs

◆ GetTemplatesAsync() [1/2]

virtual std::shared_ptr< AsyncControl > ProtectionEngine::GetTemplatesAsync ( const std::shared_ptr< ProtectionEngine::Observer > & observer,
const std::shared_ptr< void > & context )
pure virtual

Get collection of templates available to a user.

Parameters
observerA class implementing the ProtectionEngine::Observer interface
contextClient context that will be opaquely passed back to observers and optional HttpDelegate
Returns
Async control object.

◆ GetTemplatesAsync() [2/2]

virtual std::shared_ptr< AsyncControl > ProtectionEngine::GetTemplatesAsync ( const std::shared_ptr< ProtectionEngine::Observer > & observer,
const std::shared_ptr< void > & context,
const std::shared_ptr< const GetTemplatesSettings > & templateSettings )
pure virtual

Get collection of templates available to a user.

Parameters
observerA class implementing the ProtectionEngine::Observer interface
contextClient context that will be opaquely passed back to observers and optional HttpDelegate
templateSettingsSettings to use when obtaining templates
Returns
Async control object.

◆ GetTenantInformation()

virtual std::shared_ptr< TenantInformation > ProtectionEngine::GetTenantInformation ( const ProtectionCommonSettings & settings,
const std::shared_ptr< void > & context )
pure virtual

Loads user licensor certificate and returns information about the tenant.

Parameters
settingsThe common settings
contextClient context that will be opaquely forwarded to optional HttpDelegate
Returns
TenantInformation

◆ GetTenantInformationAsync()

virtual std::shared_ptr< AsyncControl > ProtectionEngine::GetTenantInformationAsync ( const ProtectionCommonSettings & settings,
const std::shared_ptr< ProtectionEngine::Observer > & observer,
const std::shared_ptr< void > & context )
pure virtual

Loads user licensor certificate and returns information about the tenant.

Parameters
settingsThe common settings
observerA class implementing the ProtectionHandler::Observer interface
contextClient context that will be opaquely forwarded to observers and optional HttpDelegate
Returns
Async control object.
Note
- ProtectionEngine::Observer::OnGetTenantInformationAsyncSuccess will be called on success ProtectionEngine::Observer::OnGetTenantInformationAsyncFailure will be called on failure

◆ IsFeatureSupported()

virtual bool ProtectionEngine::IsFeatureSupported ( FeatureId featureId)
pure virtual

Check is feature supported.

Parameters
featureIdid of feature to check
Returns
boolean result

◆ LoadUserCert()

virtual bool ProtectionEngine::LoadUserCert ( const std::shared_ptr< void > & context,
const ProtectionCommonSettings & settings = ProtectionCommonSettings() )
pure virtual

pre-emptively load user licensor certificate, useful when background loading else using prelicense might incurr an additional network call.

Parameters
contextClient context that will be opaquely forwarded to optional HttpDelegate
Returns
true if loaded successfully else false.

◆ LoadUserCertAsync()

virtual std::shared_ptr< AsyncControl > ProtectionEngine::LoadUserCertAsync ( const std::shared_ptr< ProtectionEngine::Observer > & observer,
const std::shared_ptr< void > & context,
const ProtectionCommonSettings & settings = ProtectionCommonSettings() )
pure virtual

pre-emptively load user licensor certificate, useful when background loading else using prelicense might incurr an additional network call.

Parameters
observerA class implementing the ProtectionHandler::Observer interface
contextClient context that will be opaquely forwarded to observers and optional HttpDelegate
Returns
Async control object.

◆ RegisterContentForTrackingAndRevocation()

virtual void ProtectionEngine::RegisterContentForTrackingAndRevocation ( const std::vector< uint8_t > & serializedPublishingLicense,
const std::string & contentName,
bool isOwnerNotificationEnabled,
const std::shared_ptr< void > & context,
const ProtectionCommonSettings & settings = ProtectionCommonSettings() )
pure virtual

Register publishing license (PL) for document tracking & revocation.

Parameters
contentNameThe name to associated with the content specified by the serializedPublishingLicense. If the serializedPublishingLicense specifies a content name, that value will take precedence.
isOwnerNotificationEnabledSet to true to notify the owner via email whenever the document is decrypted, or false to not send the notification.
contextClient context that will be opaquely forwarded to optional HttpDelegate

◆ RegisterContentForTrackingAndRevocationAsync()

virtual std::shared_ptr< AsyncControl > ProtectionEngine::RegisterContentForTrackingAndRevocationAsync ( const std::vector< uint8_t > & serializedPublishingLicense,
const std::string & contentName,
bool isOwnerNotificationEnabled,
const std::shared_ptr< ProtectionEngine::Observer > & observer,
const std::shared_ptr< void > & context,
const ProtectionCommonSettings & settings = ProtectionCommonSettings() )
pure virtual

Register publishing license (PL) for document tracking & revocation.

Parameters
serializedPublishingLicenseSerialized publishing license from protected content
contentNameThe name to associated with the content specified by the serializedPublishingLicense. If the serializedPublishingLicense specifies a content name, that value will take precedence
isOwnerNotificationEnabledSet to true to notify the owner via email whenever the document is decrypted, or false to not send the notification.
observerA class implementing the ProtectionHandler::Observer interface
contextClient context that will be opaquely forwarded to observers and optional HttpDelegate
Returns
Async control object.

◆ RevokeContent()

virtual void ProtectionEngine::RevokeContent ( const std::vector< uint8_t > & serializedPublishingLicense,
const std::shared_ptr< void > & context,
const ProtectionCommonSettings & settings = ProtectionCommonSettings() )
pure virtual

Perform revocation for content.

Parameters
serializedPublishingLicenseSerialized publishing license from protected content
contextClient context that will be opaquely forwarded to optional HttpDelegate

◆ RevokeContentAsync()

virtual std::shared_ptr< AsyncControl > ProtectionEngine::RevokeContentAsync ( const std::vector< uint8_t > & serializedPublishingLicense,
const std::shared_ptr< ProtectionEngine::Observer > & observer,
const std::shared_ptr< void > & context,
const ProtectionCommonSettings & settings = ProtectionCommonSettings() )
pure virtual

Perform revocation for content.

Parameters
serializedPublishingLicenseSerialized publishing license from protected content
observerA class implementing the ProtectionHandler::Observer interface
contextClient context that will be opaquely forwarded to observers and optional HttpDelegate
Returns
Async control object.

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