Constructs a ProtectionDescriptor that describes protection associated with a piece of content.
More...
#include <src/api/mip/protection_descriptor_builder.h>
|
virtual MIP_API std::shared_ptr< ProtectionDescriptor > | Build ()=0 |
| Creates a ProtectionDescriptor whose access permissions are defined by this ProtectionDescriptorBuilder instance.
|
|
virtual void | SetAllowOfflineAccess (bool value)=0 |
| Sets if protection policy allows offline content access or not.
|
|
virtual void | SetContentValidUntil (const std::chrono::time_point< std::chrono::system_clock > &value)=0 |
| Sets protection policy expiration time.
|
|
virtual void | SetDescription (const std::string &value)=0 |
| Sets protection policy description.
|
|
virtual void | SetDoubleKeyUrl (const std::string &doubleKeyUrl)=0 |
| Sets the double key url to be used for custom protection.
|
|
virtual void | SetEncryptedAppData (const std::map< std::string, std::string > &value)=0 |
| Sets app-specific data that should be encrypted.
|
|
virtual void | SetLabelInfo (const LabelInfo &labelId)=0 |
| Sets the label id and tenant id for UDP protection.
|
|
virtual void | SetName (const std::string &value)=0 |
| Sets protection policy name.
|
|
virtual void | SetReferrer (const std::string &uri)=0 |
| Sets protection policy referrer address.
|
|
virtual void | SetSignedAppData (const std::map< std::string, std::string > &value)=0 |
| Sets app-specific data that should be signed.
|
|
Constructs a ProtectionDescriptor that describes protection associated with a piece of content.
Definition at line 49 of file protection_descriptor_builder.h.
◆ LicenseType
License type to create a specialized license.
Enumerator |
---|
DoNotForward | Defines a do not forward license type.
|
EncryptOnly | Defines an encrypt only license type.
|
Definition at line 54 of file protection_descriptor_builder.h.
54 {
55
56
57
59
60
61
63 };
@ EncryptOnly
Defines an encrypt only license type.
@ DoNotForward
Defines a do not forward license type.
◆ Build()
◆ CreateFromLicenseType()
static MIP_API std::shared_ptr< ProtectionDescriptorBuilder > ProtectionDescriptorBuilder::CreateFromLicenseType |
( |
LicenseType | licenseType, |
|
|
const std::vector< std::string > & | usersWithDefaultRights, |
|
|
const std::vector< UserRights > & | additionalUsersAndRights ) |
|
static |
Creates a ProtectionDescriptorBuilder for a license type with the specified users.
- Parameters
-
licenseType | The license type to create this ProtectionDescriptorBuilder for |
usersWithDefaultRights | Collection of users to add to the license with default rights for the specific type |
additionalUsersAndRights | Optional additional collection of users-to-rights mappings |
- Returns
- New ProtectionDescriptorBuilder instance
◆ CreateFromProtectionDescriptor()
◆ CreateFromSerializedTemplate()
static MIP_API std::shared_ptr< ProtectionDescriptorBuilder > ProtectionDescriptorBuilder::CreateFromSerializedTemplate |
( |
const std::vector< uint8_t > & | serializedTemplate | ) |
|
|
static |
◆ CreateFromTemplate()
static MIP_API std::shared_ptr< ProtectionDescriptorBuilder > ProtectionDescriptorBuilder::CreateFromTemplate |
( |
const std::string & | templateId | ) |
|
|
static |
◆ CreateFromUserRights()
◆ CreateFromUserRoles()
◆ SetAllowOfflineAccess()
virtual void ProtectionDescriptorBuilder::SetAllowOfflineAccess |
( |
bool | value | ) |
|
|
pure virtual |
Sets if protection policy allows offline content access or not.
- Parameters
-
value | If policy allows offline content access or not |
◆ SetContentValidUntil()
virtual void ProtectionDescriptorBuilder::SetContentValidUntil |
( |
const std::chrono::time_point< std::chrono::system_clock > & | value | ) |
|
|
pure virtual |
Sets protection policy expiration time.
- Parameters
-
value | Policy expiration time |
◆ SetDescription()
virtual void ProtectionDescriptorBuilder::SetDescription |
( |
const std::string & | value | ) |
|
|
pure virtual |
Sets protection policy description.
- Parameters
-
◆ SetDoubleKeyUrl()
virtual void ProtectionDescriptorBuilder::SetDoubleKeyUrl |
( |
const std::string & | doubleKeyUrl | ) |
|
|
pure virtual |
Sets the double key url to be used for custom protection.
- Parameters
-
doubleKeyUrl | Double key url |
◆ SetEncryptedAppData()
virtual void ProtectionDescriptorBuilder::SetEncryptedAppData |
( |
const std::map< std::string, std::string > & | value | ) |
|
|
pure virtual |
Sets app-specific data that should be encrypted.
- Parameters
-
- Note
- An application can specify a dictionary of app-specific data that will be encrypted by the protection service. This encrypted data is independent of the signed data set by SetSignedAppData.
◆ SetLabelInfo()
virtual void ProtectionDescriptorBuilder::SetLabelInfo |
( |
const LabelInfo & | labelId | ) |
|
|
pure virtual |
Sets the label id and tenant id for UDP protection.
Only allowed for custom protection type.
- Parameters
-
LabelInfo | label info containing labelId and tenantId. |
◆ SetName()
virtual void ProtectionDescriptorBuilder::SetName |
( |
const std::string & | value | ) |
|
|
pure virtual |
Sets protection policy name.
- Parameters
-
value | Protection policy name |
◆ SetReferrer()
virtual void ProtectionDescriptorBuilder::SetReferrer |
( |
const std::string & | uri | ) |
|
|
pure virtual |
Sets protection policy referrer address.
- Parameters
-
uri | Policy referrer address |
- Note
- The referrer is a URI that can be displayed to the user upon failed protection policy acquisition that contains information on how that user can gain permission to access the content.
◆ SetSignedAppData()
virtual void ProtectionDescriptorBuilder::SetSignedAppData |
( |
const std::map< std::string, std::string > & | value | ) |
|
|
pure virtual |
Sets app-specific data that should be signed.
- Parameters
-
- Note
- An application can specify a dictionary of app-specific data that will be signed by the protection service. This signed data is independent of the encrypted data set by SetEncryptedAppData.
The documentation for this class was generated from the following file: