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 mSealedKeyType = parsedPublishingLicense->GetSealedKeyType();
78 mDoubleKeyAlgorithm = parsedPublishingLicense->GetDoubleKeyAlgorithm();
79 mOwner = parsedPublishingLicense->GetOwner();
80 mConnectionInfo = parsedPublishingLicense->GetConnectionInfo();
81 mDescriptor = parsedPublishingLicense->GetDescriptor();
82 mReferralInfoUrl = parsedPublishingLicense->GetReferralInfoUrl();
83 mSignedApplicationData = parsedPublishingLicense->GetSignedApplicationData();
84 mIssuedTime = parsedPublishingLicense->GetIssuedTime();
85 mLabelInfo = parsedPublishingLicense->GetLabelInfo();
86 mEncryptedRightsData = parsedPublishingLicense->GetEncryptedRightsData();
89#if !defined(SWIG) && !defined(SWIG_DIRECTORS)
90 [[deprecated(
"This version of SetParsedData is deprecated, use the version that accepts a ParsedPublishingLicense")]]
93 const std::vector<std::string>& domains,
94 const std::string& serverPublicCert,
95 const std::string& contentId,
96 const std::string& issuerId) {
98 mServerPublicCert = serverPublicCert;
99 mContentId = contentId;
100 mIssuerId = issuerId;
107 const std::vector<std::string>&
GetDomains()
const {
return mDomains; }
116 const std::string&
GetOwner()
const {
return mOwner; }
118 std::shared_ptr<LicenseDescriptor>
GetDescriptor()
const {
return mDescriptor; }
121 const std::chrono::time_point<std::chrono::system_clock>&
GetIssuedTime()
const {
return mIssuedTime; }
126 std::vector<uint8_t> mPreLicense;
127 std::vector<uint8_t> mSerializedPublishingLicense;
129 std::vector<std::string> mDomains;
130 std::string mServerPublicCert;
131 std::string mContentId;
132 std::string mIssuerId;
133 std::string mSealedKeyType;
135 std::string mDoubleKeyAlgorithm;
137 std::shared_ptr<LicenseConnectionInfo> mConnectionInfo;
138 std::shared_ptr<LicenseDescriptor> mDescriptor;
139 std::string mReferralInfoUrl;
140 std::vector<std::shared_ptr<LicenseApplicationData>> mSignedApplicationData;
141 std::chrono::time_point<std::chrono::system_clock> mIssuedTime;
143 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 & GetSealedKeyType() 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_CBC4KNOPADDING
@ CIPHER_MODE_CBC512NOPADDING
Label information for a template or ad-hoc (custom) protection.