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

Holds the details of a Publishing License used to create a protection handler. More...

#include <src/api/mip/protection/protection_common_types.h>

Collaboration diagram for PublishingLicenseInfo:

Public Member Functions

std::shared_ptr< LicenseConnectionInfoGetConnectionInfo () const
 
const std::string & GetContentId () const
 
std::shared_ptr< LicenseDescriptorGetDescriptor () const
 
const std::vector< std::string > & GetDomains () const
 
const std::string & GetDoubleKeyAlgorithm () const
 
const std::vector< uint8_t > & GetEncryptedRightsData () const
 
bool GetIsDoubleKeyLicense () const
 
const std::chrono::time_point< std::chrono::system_clock > & GetIssuedTime () const
 
const std::string & GetIssuerId () const
 
const mip::LabelInfo GetLabelInfo () const
 
const std::string & GetOwner () const
 
const std::vector< uint8_t > & GetPreLicense () const
 
const std::string & GetReferralInfoUrl () const
 
const std::string & GetSealedKeyType () const
 
const std::vector< uint8_t > & GetSerializedPublishingLicense () const
 
const std::string & GetServerPublicCertificate () const
 
const std::vector< std::shared_ptr< LicenseApplicationData > > & GetSignedApplicationData () const
 
bool HasPreLicense () const
 
bool IsLicenseParsed () const
 
 PublishingLicenseInfo (const std::vector< uint8_t > &serializedPreLicense, const std::vector< uint8_t > &serializedPublishingLicense)
 
 PublishingLicenseInfo (const std::vector< uint8_t > &serializedPublishingLicense)
 
void SetParsedData (const std::vector< std::string > &domains, const std::string &serverPublicCert, const std::string &contentId, const std::string &issuerId)
 
void SetParsedData (std::shared_ptr< ParsedPublishingLicense > parsedPublishingLicense)
 

Private Attributes

std::shared_ptr< LicenseConnectionInfomConnectionInfo
 
std::string mContentId
 
std::shared_ptr< LicenseDescriptormDescriptor
 
std::vector< std::string > mDomains
 
std::string mDoubleKeyAlgorithm
 
std::vector< uint8_t > mEncryptedRightsData
 
bool mIsParsed
 
std::chrono::time_point< std::chrono::system_clock > mIssuedTime
 
std::string mIssuerId
 
LabelInfo mLabelInfo
 
std::string mOwner
 
std::vector< uint8_t > mPreLicense
 
std::string mReferralInfoUrl
 
std::string mSealedKeyType
 
std::vector< uint8_t > mSerializedPublishingLicense
 
std::string mServerPublicCert
 
std::vector< std::shared_ptr< LicenseApplicationData > > mSignedApplicationData
 

Detailed Description

Holds the details of a Publishing License used to create a protection handler.

Definition at line 53 of file protection_common_types.h.

Constructor & Destructor Documentation

◆ PublishingLicenseInfo() [1/2]

PublishingLicenseInfo::PublishingLicenseInfo ( const std::vector< uint8_t > & serializedPublishingLicense)
inline

Definition at line 55 of file protection_common_types.h.

57 : mSerializedPublishingLicense(serializedPublishingLicense),
58 mIsParsed(false),
59 mIssuedTime(std::chrono::system_clock::from_time_t(0)),
60 mLabelInfo("","") {}
std::vector< uint8_t > mSerializedPublishingLicense
std::chrono::time_point< std::chrono::system_clock > mIssuedTime

◆ PublishingLicenseInfo() [2/2]

PublishingLicenseInfo::PublishingLicenseInfo ( const std::vector< uint8_t > & serializedPreLicense,
const std::vector< uint8_t > & serializedPublishingLicense )
inline

Definition at line 62 of file protection_common_types.h.

65 : mPreLicense(serializedPreLicense),
66 mSerializedPublishingLicense(serializedPublishingLicense),
67 mIsParsed(false),
68 mIssuedTime(std::chrono::system_clock::from_time_t(0)),
69 mLabelInfo("","") {}
std::vector< uint8_t > mPreLicense

Member Function Documentation

◆ GetConnectionInfo()

std::shared_ptr< LicenseConnectionInfo > PublishingLicenseInfo::GetConnectionInfo ( ) const
inline

Definition at line 117 of file protection_common_types.h.

117{ return mConnectionInfo; }
std::shared_ptr< LicenseConnectionInfo > mConnectionInfo

References mConnectionInfo.

◆ GetContentId()

const std::string & PublishingLicenseInfo::GetContentId ( ) const
inline

Definition at line 111 of file protection_common_types.h.

111{ return mContentId; }

References mContentId.

◆ GetDescriptor()

std::shared_ptr< LicenseDescriptor > PublishingLicenseInfo::GetDescriptor ( ) const
inline

Definition at line 118 of file protection_common_types.h.

118{ return mDescriptor; }
std::shared_ptr< LicenseDescriptor > mDescriptor

References mDescriptor.

◆ GetDomains()

const std::vector< std::string > & PublishingLicenseInfo::GetDomains ( ) const
inline

Definition at line 107 of file protection_common_types.h.

107{ return mDomains; }
std::vector< std::string > mDomains

References mDomains.

◆ GetDoubleKeyAlgorithm()

const std::string & PublishingLicenseInfo::GetDoubleKeyAlgorithm ( ) const
inline

Definition at line 115 of file protection_common_types.h.

115{ return mDoubleKeyAlgorithm; }

References mDoubleKeyAlgorithm.

◆ GetEncryptedRightsData()

const std::vector< uint8_t > & PublishingLicenseInfo::GetEncryptedRightsData ( ) const
inline

Definition at line 123 of file protection_common_types.h.

123{ return mEncryptedRightsData; }
std::vector< uint8_t > mEncryptedRightsData

References mEncryptedRightsData.

◆ GetIsDoubleKeyLicense()

bool PublishingLicenseInfo::GetIsDoubleKeyLicense ( ) const
inline

Definition at line 114 of file protection_common_types.h.

114{ return !mDoubleKeyAlgorithm.empty(); }

References mDoubleKeyAlgorithm.

◆ GetIssuedTime()

const std::chrono::time_point< std::chrono::system_clock > & PublishingLicenseInfo::GetIssuedTime ( ) const
inline

Definition at line 121 of file protection_common_types.h.

121{ return mIssuedTime; }

References mIssuedTime.

◆ GetIssuerId()

const std::string & PublishingLicenseInfo::GetIssuerId ( ) const
inline

Definition at line 109 of file protection_common_types.h.

109{ return mIssuerId; }

References mIssuerId.

◆ GetLabelInfo()

const mip::LabelInfo PublishingLicenseInfo::GetLabelInfo ( ) const
inline

Definition at line 122 of file protection_common_types.h.

122{ return mLabelInfo; }

References mLabelInfo.

◆ GetOwner()

const std::string & PublishingLicenseInfo::GetOwner ( ) const
inline

Definition at line 116 of file protection_common_types.h.

116{ return mOwner; }

References mOwner.

◆ GetPreLicense()

const std::vector< uint8_t > & PublishingLicenseInfo::GetPreLicense ( ) const
inline

Definition at line 105 of file protection_common_types.h.

105{ return mPreLicense; }

References mPreLicense.

◆ GetReferralInfoUrl()

const std::string & PublishingLicenseInfo::GetReferralInfoUrl ( ) const
inline

Definition at line 119 of file protection_common_types.h.

119{ return mReferralInfoUrl; }

References mReferralInfoUrl.

◆ GetSealedKeyType()

const std::string & PublishingLicenseInfo::GetSealedKeyType ( ) const
inline

Definition at line 110 of file protection_common_types.h.

110{ return mSealedKeyType; }

References mSealedKeyType.

◆ GetSerializedPublishingLicense()

const std::vector< uint8_t > & PublishingLicenseInfo::GetSerializedPublishingLicense ( ) const
inline

Definition at line 104 of file protection_common_types.h.

References mSerializedPublishingLicense.

◆ GetServerPublicCertificate()

const std::string & PublishingLicenseInfo::GetServerPublicCertificate ( ) const
inline

Definition at line 108 of file protection_common_types.h.

108{ return mServerPublicCert; }

References mServerPublicCert.

◆ GetSignedApplicationData()

const std::vector< std::shared_ptr< LicenseApplicationData > > & PublishingLicenseInfo::GetSignedApplicationData ( ) const
inline

Definition at line 120 of file protection_common_types.h.

120{ return mSignedApplicationData; }
std::vector< std::shared_ptr< LicenseApplicationData > > mSignedApplicationData

References mSignedApplicationData.

◆ HasPreLicense()

bool PublishingLicenseInfo::HasPreLicense ( ) const
inline

Definition at line 113 of file protection_common_types.h.

113{ return !mPreLicense.empty(); }

References mPreLicense.

◆ IsLicenseParsed()

bool PublishingLicenseInfo::IsLicenseParsed ( ) const
inline

Definition at line 112 of file protection_common_types.h.

112{ return mIsParsed; }

References mIsParsed.

◆ SetParsedData() [1/2]

void PublishingLicenseInfo::SetParsedData ( const std::vector< std::string > & domains,
const std::string & serverPublicCert,
const std::string & contentId,
const std::string & issuerId )
inline

Definition at line 92 of file protection_common_types.h.

96 {
97 mDomains = domains;
98 mServerPublicCert = serverPublicCert;
99 mContentId = contentId;
100 mIssuerId = issuerId;
101 mIsParsed = true;
102 }

References mContentId, mDomains, mIsParsed, mIssuerId, and mServerPublicCert.

◆ SetParsedData() [2/2]

void PublishingLicenseInfo::SetParsedData ( std::shared_ptr< ParsedPublishingLicense > parsedPublishingLicense)
inline

Definition at line 71 of file protection_common_types.h.

71 {
72 mIsParsed = true;
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();
87 }

References mConnectionInfo, mContentId, mDescriptor, mDomains, mDoubleKeyAlgorithm, mEncryptedRightsData, mIsParsed, mIssuedTime, mIssuerId, mLabelInfo, mOwner, mReferralInfoUrl, mSealedKeyType, mServerPublicCert, and mSignedApplicationData.

Member Data Documentation

◆ mConnectionInfo

std::shared_ptr<LicenseConnectionInfo> PublishingLicenseInfo::mConnectionInfo
private

Definition at line 137 of file protection_common_types.h.

Referenced by GetConnectionInfo(), and SetParsedData().

◆ mContentId

std::string PublishingLicenseInfo::mContentId
private

Definition at line 131 of file protection_common_types.h.

Referenced by GetContentId(), SetParsedData(), and SetParsedData().

◆ mDescriptor

std::shared_ptr<LicenseDescriptor> PublishingLicenseInfo::mDescriptor
private

Definition at line 138 of file protection_common_types.h.

Referenced by GetDescriptor(), and SetParsedData().

◆ mDomains

std::vector<std::string> PublishingLicenseInfo::mDomains
private

Definition at line 129 of file protection_common_types.h.

Referenced by GetDomains(), SetParsedData(), and SetParsedData().

◆ mDoubleKeyAlgorithm

std::string PublishingLicenseInfo::mDoubleKeyAlgorithm
private

◆ mEncryptedRightsData

std::vector<uint8_t> PublishingLicenseInfo::mEncryptedRightsData
private

Definition at line 143 of file protection_common_types.h.

Referenced by GetEncryptedRightsData(), and SetParsedData().

◆ mIsParsed

bool PublishingLicenseInfo::mIsParsed
private

Definition at line 134 of file protection_common_types.h.

Referenced by IsLicenseParsed(), SetParsedData(), and SetParsedData().

◆ mIssuedTime

std::chrono::time_point<std::chrono::system_clock> PublishingLicenseInfo::mIssuedTime
private

Definition at line 141 of file protection_common_types.h.

Referenced by GetIssuedTime(), and SetParsedData().

◆ mIssuerId

std::string PublishingLicenseInfo::mIssuerId
private

Definition at line 132 of file protection_common_types.h.

Referenced by GetIssuerId(), SetParsedData(), and SetParsedData().

◆ mLabelInfo

LabelInfo PublishingLicenseInfo::mLabelInfo
private

Definition at line 142 of file protection_common_types.h.

Referenced by GetLabelInfo(), and SetParsedData().

◆ mOwner

std::string PublishingLicenseInfo::mOwner
private

Definition at line 136 of file protection_common_types.h.

Referenced by GetOwner(), and SetParsedData().

◆ mPreLicense

std::vector<uint8_t> PublishingLicenseInfo::mPreLicense
private

Definition at line 126 of file protection_common_types.h.

Referenced by GetPreLicense(), and HasPreLicense().

◆ mReferralInfoUrl

std::string PublishingLicenseInfo::mReferralInfoUrl
private

Definition at line 139 of file protection_common_types.h.

Referenced by GetReferralInfoUrl(), and SetParsedData().

◆ mSealedKeyType

std::string PublishingLicenseInfo::mSealedKeyType
private

Definition at line 133 of file protection_common_types.h.

Referenced by GetSealedKeyType(), and SetParsedData().

◆ mSerializedPublishingLicense

std::vector<uint8_t> PublishingLicenseInfo::mSerializedPublishingLicense
private

Definition at line 127 of file protection_common_types.h.

Referenced by GetSerializedPublishingLicense().

◆ mServerPublicCert

std::string PublishingLicenseInfo::mServerPublicCert
private

◆ mSignedApplicationData

std::vector<std::shared_ptr<LicenseApplicationData> > PublishingLicenseInfo::mSignedApplicationData
private

Definition at line 140 of file protection_common_types.h.

Referenced by GetSignedApplicationData(), and SetParsedData().


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