Microsoft Information Protection (MIP) SDK for C++: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
parsed_publishing_license_builder.h
Go to the documentation of this file.
1/*
2 *
3 * Copyright (c) Microsoft Corporation.
4 * All rights reserved.
5 *
6 * This code is licensed under the MIT License.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files(the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions :
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 * THE SOFTWARE.
25 *
26 */
27/**
28 * @brief Contains a class that allows creating parsed publishing license details
29 *
30 * @file parsed_publishing_license_builder.h
31 */
32
33#ifndef API_MIP_PROTECTION_PARSED_PUBLISHING_LICENSE_BUILDER_H_
34#define API_MIP_PROTECTION_PARSED_PUBLISHING_LICENSE_BUILDER_H_
35
36#include <chrono>
37#include <string>
38#include <vector>
39
40#include "mip/mip_export.h"
41#include "mip/mip_namespace.h"
46
47MIP_NAMESPACE_BEGIN
48
49
51public:
52
53 /**
54 * @brief Creates a ParsedPublishingLicenseBuilder
55 *
56 * @return New ParsedPublishingLicenseBuilder instance
57 */
58 MIP_API static std::shared_ptr<ParsedPublishingLicenseBuilder> Create();
59
60 /**
61 * @brief Sets the license domains
62 *
63 * @param domains
64 */
65 virtual void SetDomains(const std::vector<std::string>& domains) = 0;
66
67 /**
68 * @brief Sets the server public cert
69 *
70 * @param serverPublicCert
71 */
72 virtual void SetServerPublicCert(const std::string& serverPublicCert) = 0;
73
74 /**
75 * @brief Sets the content id
76 *
77 * @param contentId
78 */
79 virtual void SetContentId(const std::string& contentId) = 0;
80
81 /**
82 * @brief Sets the issuer id
83 *
84 * @param issuerId
85 */
86 virtual void SetIssuerId(const std::string& issuerId) = 0;
87
88 /**
89 * @brief Sets the double key algorithm
90 *
91 * @param doubleKeyAlgorithm
92 */
93 virtual void SetDoubleKeyAlgorithm(const std::string& doubleKeyAlgorithm) = 0;
94
95 /**
96 * @brief Sets the owner
97 *
98 * @param owner
99 */
100 virtual void SetOwner(const std::string& owner) = 0;
101
102 /**
103 * @brief Sets the connection info
104 *
105 * @param licenseConnectionInfo
106 */
107 virtual void SetConnectionInfo(std::shared_ptr<LicenseConnectionInfo> licenseConnectionInfo) = 0;
108
109 /**
110 * @brief Sets the descriptor
111 *
112 * @param descriptor
113 */
114 virtual void SetDescriptor(std::shared_ptr<LicenseDescriptor> descriptor) = 0;
115
116 /**
117 * @brief Sets the referral info url
118 *
119 * @param referralInfoUrl
120 */
121 virtual void SetReferralInfoUrl(const std::string& referralInfoUrl) = 0;
122
123 /**
124 * @brief Sets the signed application data
125 *
126 * @param signedApplicationData
127 */
128 virtual void SetSignedApplicationData(const std::vector<std::shared_ptr<LicenseApplicationData>>& signedApplicationData) = 0;
129
130 /**
131 * @brief Sets the issued time
132 *
133 * @param issuedTime
134 */
135 virtual void SetIssuedTime(const std::chrono::time_point<std::chrono::system_clock>& issuedTime) = 0;
136
137 /**
138 * @brief Sets the label info
139 *
140 * @param labelInfo
141 */
142 virtual void SetLabelInfo(const LabelInfo& labelInfo) = 0;
143
144 /**
145 * @brief Sets the encrypted rights data
146 *
147 * @param encryptedRightsData
148 */
149 virtual void SetEncryptedRightsData(const std::vector<uint8_t>& encryptedRightsData) = 0;
150
151 /**
152 * @brief Creates a ParsedPublishingLicense with the properties set on this object instance
153 *
154 * @return New ParsedPublishingLicense instance
155 */
156 virtual std::shared_ptr<ParsedPublishingLicense> CreateParsedPublishingLicense() = 0;
157
158 /** @cond DOXYGEN_HIDE */
160protected:
162 /** @endcond */
163};
164
165MIP_NAMESPACE_END
166
167#endif // API_MIP_PROTECTION_PARSED_PUBLISHING_LICENSE_BUILDER_H_
virtual void SetReferralInfoUrl(const std::string &referralInfoUrl)=0
Sets the referral info url.
virtual std::shared_ptr< ParsedPublishingLicense > CreateParsedPublishingLicense()=0
Creates a ParsedPublishingLicense with the properties set on this object instance.
virtual void SetOwner(const std::string &owner)=0
Sets the owner.
virtual void SetConnectionInfo(std::shared_ptr< LicenseConnectionInfo > licenseConnectionInfo)=0
Sets the connection info.
virtual void SetEncryptedRightsData(const std::vector< uint8_t > &encryptedRightsData)=0
Sets the encrypted rights data.
virtual void SetServerPublicCert(const std::string &serverPublicCert)=0
Sets the server public cert.
virtual void SetIssuedTime(const std::chrono::time_point< std::chrono::system_clock > &issuedTime)=0
Sets the issued time.
virtual void SetIssuerId(const std::string &issuerId)=0
Sets the issuer id.
virtual void SetLabelInfo(const LabelInfo &labelInfo)=0
Sets the label info.
virtual void SetDescriptor(std::shared_ptr< LicenseDescriptor > descriptor)=0
Sets the descriptor.
virtual void SetContentId(const std::string &contentId)=0
Sets the content id.
virtual void SetSignedApplicationData(const std::vector< std::shared_ptr< LicenseApplicationData > > &signedApplicationData)=0
Sets the signed application data.
virtual void SetDoubleKeyAlgorithm(const std::string &doubleKeyAlgorithm)=0
Sets the double key algorithm.
static MIP_API std::shared_ptr< ParsedPublishingLicenseBuilder > Create()
Creates a ParsedPublishingLicenseBuilder.
virtual void SetDomains(const std::vector< std::string > &domains)=0
Sets the license domains.
Defines LicenseApplicationData interface.
Defines LicenseConnectionInfo interface.
Defines LicenseDescriptor interface.
A file export/import macros.
MIP namespace macros.
Contains details of a parsed publishing license.
Label information for a template or ad-hoc (custom) protection.