33#ifndef API_MIP_PROTECTION_PROTECTION_COMMON_TYPES_H_
34#define API_MIP_PROTECTION_PROTECTION_COMMON_TYPES_H_
36#define DYNAMIC_WATERMARK_CAPABILITY "dynamicwatermark"
56 const std::vector<uint8_t>& serializedPublishingLicense)
57 : mSerializedPublishingLicense(serializedPublishingLicense),
59 mIssuedTime(std::chrono::system_clock::from_time_t(0)),
63 const std::vector<uint8_t>& serializedPreLicense,
64 const std::vector<uint8_t>& serializedPublishingLicense)
65 : mPreLicense(serializedPreLicense),
66 mSerializedPublishingLicense(serializedPublishingLicense),
68 mIssuedTime(std::chrono::system_clock::from_time_t(0)),
71 void SetParsedData(std::shared_ptr<ParsedPublishingLicense> parsedPublishingLicense) {
73 mDomains = parsedPublishingLicense->GetDomains();
74 mServerPublicCert = parsedPublishingLicense->GetServerPublicCert();
75 mContentId = parsedPublishingLicense->GetContentId();
76 mIssuerId = parsedPublishingLicense->GetIssuerId();
77 mDoubleKeyAlgorithm = parsedPublishingLicense->GetDoubleKeyAlgorithm();
78 mOwner = parsedPublishingLicense->GetOwner();
79 mConnectionInfo = parsedPublishingLicense->GetConnectionInfo();
80 mDescriptor = parsedPublishingLicense->GetDescriptor();
81 mReferralInfoUrl = parsedPublishingLicense->GetReferralInfoUrl();
82 mSignedApplicationData = parsedPublishingLicense->GetSignedApplicationData();
83 mIssuedTime = parsedPublishingLicense->GetIssuedTime();
84 mLabelInfo = parsedPublishingLicense->GetLabelInfo();
85 mEncryptedRightsData = parsedPublishingLicense->GetEncryptedRightsData();
88#if !defined(SWIG) && !defined(SWIG_DIRECTORS)
89 [[deprecated(
"This version of SetParsedData is deprecated, use the version that accepts a ParsedPublishingLicense")]]
92 const std::vector<std::string>& domains,
93 const std::string& serverPublicCert,
94 const std::string& contentId,
95 const std::string& issuerId) {
97 mServerPublicCert = serverPublicCert;
98 mContentId = contentId;
106 const std::vector<std::string>&
GetDomains()
const {
return mDomains; }
114 const std::string&
GetOwner()
const {
return mOwner; }
116 std::shared_ptr<LicenseDescriptor>
GetDescriptor()
const {
return mDescriptor; }
119 const std::chrono::time_point<std::chrono::system_clock>&
GetIssuedTime()
const {
return mIssuedTime; }
124 std::vector<uint8_t> mPreLicense;
125 std::vector<uint8_t> mSerializedPublishingLicense;
127 std::vector<std::string> mDomains;
128 std::string mServerPublicCert;
129 std::string mContentId;
130 std::string mIssuerId;
132 std::string mDoubleKeyAlgorithm;
134 std::shared_ptr<LicenseConnectionInfo> mConnectionInfo;
135 std::shared_ptr<LicenseDescriptor> mDescriptor;
136 std::string mReferralInfoUrl;
137 std::vector<std::shared_ptr<LicenseApplicationData>> mSignedApplicationData;
138 std::chrono::time_point<std::chrono::system_clock> mIssuedTime;
140 std::vector<uint8_t> mEncryptedRightsData;
Holds the details of a Publishing License used to create a protection handler.
PublishingLicenseInfo(const std::vector< uint8_t > &serializedPreLicense, const std::vector< uint8_t > &serializedPublishingLicense)
const std::vector< uint8_t > & GetPreLicense() const
bool IsLicenseParsed() const
const std::vector< uint8_t > & GetSerializedPublishingLicense() const
const std::string & GetDoubleKeyAlgorithm() const
const std::chrono::time_point< std::chrono::system_clock > & GetIssuedTime() const
const std::string & GetServerPublicCertificate() const
const std::string & GetReferralInfoUrl() const
const mip::LabelInfo GetLabelInfo() const
std::shared_ptr< LicenseDescriptor > GetDescriptor() const
const std::vector< std::string > & GetDomains() const
const std::string & GetContentId() const
std::shared_ptr< LicenseConnectionInfo > GetConnectionInfo() const
const std::string & GetIssuerId() const
void SetParsedData(std::shared_ptr< ParsedPublishingLicense > parsedPublishingLicense)
const std::vector< std::shared_ptr< LicenseApplicationData > > & GetSignedApplicationData() const
const std::vector< uint8_t > & GetEncryptedRightsData() const
bool HasPreLicense() const
void SetParsedData(const std::vector< std::string > &domains, const std::string &serverPublicCert, const std::string &contentId, const std::string &issuerId)
const std::string & GetOwner() const
PublishingLicenseInfo(const std::vector< uint8_t > &serializedPublishingLicense)
bool GetIsDoubleKeyLicense() const
Defines LicenseConnectionInfo interface.
Defines LicenseDescriptor interface.
Contains details of a parsed publishing license.
CipherMode
Cipher mode identifier.
@ CIPHER_MODE_ECB
ECB mode.
@ CIPHER_MODE_CBC4KNOPADDING
CBC 4K mode with external (client) padding.
@ CIPHER_MODE_CBC512NOPADDING
CBC 512 mode with external (client) padding.
@ CIPHER_MODE_CBC4K
CBC 4K mode with internal padding.
Label information for a template or ad-hoc (custom) protection.