33#ifndef API_MIP_PROTECTION_DESCRIPTOR_BUILDER_H_
34#define API_MIP_PROTECTION_DESCRIPTOR_BUILDER_H_
73 const std::vector<UserRights>& usersAndRights);
83 const std::vector<UserRoles>& usersAndRoles);
92 MIP_API
static std::shared_ptr<ProtectionDescriptorBuilder>
CreateFromTemplate(
const std::string& templateId);
102 const std::vector<uint8_t>& serializedTemplate);
124 const std::vector<std::string>& usersWithDefaultRights,
125 const std::vector<UserRights>& additionalUsersAndRights);
132 MIP_API
virtual std::shared_ptr<ProtectionDescriptor>
Build() = 0;
139 virtual void SetName(
const std::string& value) = 0;
Constructs a ProtectionDescriptor that describes protection associated with a piece of content.
virtual void SetSignedAppData(const std::map< std::string, std::string > &value)=0
Sets app-specific data that should be signed.
static MIP_API std::shared_ptr< ProtectionDescriptorBuilder > CreateFromTemplate(const std::string &templateId)
Creates a ProtectionDescriptorBuilder whose access permissions are defined by the protection template...
virtual void SetReferrer(const std::string &uri)=0
Sets protection policy referrer address.
static MIP_API std::shared_ptr< ProtectionDescriptorBuilder > CreateFromUserRoles(const std::vector< UserRoles > &usersAndRoles)
Creates a ProtectionDescriptorBuilder whose access permissions are defined by users and roles.
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 SetName(const std::string &value)=0
Sets protection policy name.
LicenseType
License type to create a specialized license.
@ EncryptOnly
Defines an encrypt only license type.
@ DoNotForward
Defines a do not forward license type.
static MIP_API std::shared_ptr< ProtectionDescriptorBuilder > CreateFromLicenseType(LicenseType licenseType, const std::vector< std::string > &usersWithDefaultRights, const std::vector< UserRights > &additionalUsersAndRights)
Creates a ProtectionDescriptorBuilder for a license type with the specified users.
static MIP_API std::shared_ptr< ProtectionDescriptorBuilder > CreateFromSerializedTemplate(const std::vector< uint8_t > &serializedTemplate)
Creates a ProtectionDescriptorBuilder whose access permissions are defined by the protection template...
virtual void SetContentValidUntil(const std::chrono::time_point< std::chrono::system_clock > &value)=0
Sets protection policy expiration time.
virtual void SetLabelInfo(const LabelInfo &labelId)=0
Sets the label id and tenant id for UDP protection.
virtual MIP_API std::shared_ptr< ProtectionDescriptor > Build()=0
Creates a ProtectionDescriptor whose access permissions are defined by this ProtectionDescriptorBuild...
virtual void SetAllowOfflineAccess(bool value)=0
Sets if protection policy allows offline content access or not.
static MIP_API std::shared_ptr< ProtectionDescriptorBuilder > CreateFromUserRights(const std::vector< UserRights > &usersAndRights)
Creates a ProtectionDescriptorBuilder whose access permissions are defined by users and rights.
static MIP_API std::shared_ptr< ProtectionDescriptorBuilder > CreateFromProtectionDescriptor(const ProtectionDescriptor &protectionDescriptor)
Creates a ProtectionDescriptorBuilder whose access permissions are defined by a protection descriptor...
virtual void SetDescription(const std::string &value)=0
Sets protection policy description.
Description of protection associated with a piece of content.
A file export/import macros.
Defines ProtectionDescriptor interface.
Label information for a template or ad-hoc (custom) protection.
Defines UserRights class.