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

Description of protection associated with a piece of content. More...

#include <src/api/mip/protection_descriptor.h>

Public Member Functions

virtual bool DoesAllowOfflineAccess () const =0
 Gets if protection allows offline content access or not.
 
virtual bool DoesContentExpire () const =0
 Checks if content has an expiration time or not.
 
virtual std::string GetContentId () const =0
 Gets the Content ID, if any.
 
virtual std::chrono::time_point< std::chrono::system_clock > GetContentValidUntil () const =0
 Gets protection expiration time.
 
virtual std::string GetDescription () const =0
 Gets protection description.
 
virtual std::string GetDoubleKeyUrl () const =0
 Gets the double key url to be used for custom protection.
 
virtual std::shared_ptr< const DynamicWatermarkGetDynamicWatermark () const =0
 Gets the dynamic watermark configured for this content if any.
 
virtual std::map< std::string, std::string > GetEncryptedAppData () const =0
 Gets app-specific data that was encrypted.
 
virtual std::string GetLabelId () const =0
 Gets the label ID, if any.
 
virtual LabelInfo GetLabelInfo () const =0
 Gets the label Info, if any.
 
virtual std::string GetName () const =0
 Gets protection name.
 
virtual std::string GetOwner () const =0
 Gets owner for the protection.
 
virtual ProtectionType GetProtectionType () const =0
 Gets type of protection, whether it originated from protection SDK template or not.
 
virtual std::string GetReferrer () const =0
 Gets protection referrer address.
 
virtual std::shared_ptr< const std::vector< uint8_t > > GetSerializedTemplate () const =0
 Gets the serialized template, if any.
 
virtual std::map< std::string, std::string > GetSignedAppData () const =0
 Gets the app-specific data that was signed.
 
virtual std::string GetTemplateId () const =0
 Gets the protection template ID, if any.
 
virtual std::vector< UserRightsGetUserRights () const =0
 Gets collection of users-to-rights mappings.
 
virtual std::vector< UserRolesGetUserRoles () const =0
 Gets collection of users-to-roles mappings.
 

Detailed Description

Description of protection associated with a piece of content.

Definition at line 72 of file protection_descriptor.h.

Member Function Documentation

◆ DoesAllowOfflineAccess()

virtual bool ProtectionDescriptor::DoesAllowOfflineAccess ( ) const
pure virtual

Gets if protection allows offline content access or not.

Returns
If protection allows offline content access or not (default = true)

◆ DoesContentExpire()

virtual bool ProtectionDescriptor::DoesContentExpire ( ) const
pure virtual

Checks if content has an expiration time or not.

Returns
True if content can expire, else false

◆ GetContentId()

virtual std::string ProtectionDescriptor::GetContentId ( ) const
pure virtual

Gets the Content ID, if any.

Returns
Content ID
Note
Publishing licenses will have this identifier surrounded by curly braces "{}". Those braces are removed from the value returned here

◆ GetContentValidUntil()

virtual std::chrono::time_point< std::chrono::system_clock > ProtectionDescriptor::GetContentValidUntil ( ) const
pure virtual

Gets protection expiration time.

Returns
Protection expiration time

◆ GetDescription()

virtual std::string ProtectionDescriptor::GetDescription ( ) const
pure virtual

Gets protection description.

Returns
Protection description

◆ GetDoubleKeyUrl()

virtual std::string ProtectionDescriptor::GetDoubleKeyUrl ( ) const
pure virtual

Gets the double key url to be used for custom protection.

Returns
Double key url
Note
The double key URL that is used in custom requests to protect information with a second key. Needed for key generation.

◆ GetDynamicWatermark()

virtual std::shared_ptr< const DynamicWatermark > ProtectionDescriptor::GetDynamicWatermark ( ) const
pure virtual

Gets the dynamic watermark configured for this content if any.

Returns
Shared pointer to the DynamicWatermark object

◆ GetEncryptedAppData()

virtual std::map< std::string, std::string > ProtectionDescriptor::GetEncryptedAppData ( ) const
pure virtual

Gets app-specific data that was encrypted.

Returns
App-specific data
Note
A ProtectionHandler may hold a dictionary of app-specific data that was encrypted by the protection service. This encrypted data is independent of the signed data accessible via ProtectionDescriptor::GetSignedAppData

◆ GetLabelId()

virtual std::string ProtectionDescriptor::GetLabelId ( ) const
pure virtual

Gets the label ID, if any.

Returns
Label ID
Note
This property will be populated in ProtectionDescriptors for preexisting protected content & for UDP label based protection. It is a field populated by the server at the moment protected content is consumed. For UDP label based protection, its populated from labelId value set by client.

◆ GetLabelInfo()

virtual LabelInfo ProtectionDescriptor::GetLabelInfo ( ) const
pure virtual

Gets the label Info, if any.

Returns
Label Info
Note
This property will be populated in ProtectionDescriptors for preexisting protected content & for UDP label based protection. It is a field populated by the server at the moment protected content is consumed. For UDP label based protection, its populated from label and tenant id values set by client.

◆ GetName()

virtual std::string ProtectionDescriptor::GetName ( ) const
pure virtual

Gets protection name.

Returns
Protection name

◆ GetOwner()

virtual std::string ProtectionDescriptor::GetOwner ( ) const
pure virtual

Gets owner for the protection.

Returns
Owner of protection

◆ GetProtectionType()

virtual ProtectionType ProtectionDescriptor::GetProtectionType ( ) const
pure virtual

Gets type of protection, whether it originated from protection SDK template or not.

Returns
Type of protection

◆ GetReferrer()

virtual std::string ProtectionDescriptor::GetReferrer ( ) const
pure virtual

Gets protection referrer address.

Returns
Protection referrer address
Note
The referrer is a URI that is displayable to the user if they cannot unprotect the content. It contains information on how that user can gain permission to access the content.

◆ GetSerializedTemplate()

virtual std::shared_ptr< const std::vector< uint8_t > > ProtectionDescriptor::GetSerializedTemplate ( ) const
pure virtual

Gets the serialized template, if any.

Returns
Serialized template

◆ GetSignedAppData()

virtual std::map< std::string, std::string > ProtectionDescriptor::GetSignedAppData ( ) const
pure virtual

Gets the app-specific data that was signed.

Returns
App-specific data
Note
A ProtectionHandler may hold a dictionary of app-specific data that was signed by the protection service. This signed data is independent of the encrypted data accessible via ProtectionDescriptor::GetEncryptedAppData

◆ GetTemplateId()

virtual std::string ProtectionDescriptor::GetTemplateId ( ) const
pure virtual

Gets the protection template ID, if any.

Returns
Template ID

◆ GetUserRights()

virtual std::vector< UserRights > ProtectionDescriptor::GetUserRights ( ) const
pure virtual

Gets collection of users-to-rights mappings.

Returns
Collection of users-to-rights mappings
Note
The value of the UserRights property will be empty if the current user doesn't have access to this information (that is, if the user is not the owner and does not have the VIEWRIGHTSDATA right).

◆ GetUserRoles()

virtual std::vector< UserRoles > ProtectionDescriptor::GetUserRoles ( ) const
pure virtual

Gets collection of users-to-roles mappings.

Returns
Collection of users-to-roles mappings

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