Microsoft Information Protection (MIP) SDK for C++: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
delegation_license_settings.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 Defines DelegationLicenseSettings class
29 *
30 * @file delegation_license_settings.h
31 */
32#ifndef API_MIP_PROTECTION_DELEGATION_LICENSE_SETTINGS_H_
33#define API_MIP_PROTECTION_DELEGATION_LICENSE_SETTINGS_H_
34
35#include <memory>
36#include <string>
37#include <vector>
38
39#include "mip/mip_context.h"
40#include "mip/mip_export.h"
41#include "mip/mip_namespace.h"
44
45MIP_NAMESPACE_BEGIN
46
48public:
49 /**
50 * @brief Gets the PublishingLicenseInfo, the publishing license
51 *
52 * @return The PublishingLicenseInfo
53 */
54 virtual std::shared_ptr<const PublishingLicenseInfo> GetLicenseInfo() const = 0;
55
56 /**
57 * @brief Gets the list of users for the request
58 *
59 * @return The users
60 */
61 virtual const std::vector<std::string>& GetUsers() const = 0;
62
63 /**
64 * @brief Gets the boolean value that indicates whether or not to obtain end user license in addition to the delegate license
65 *
66 * @return Whether to aquire end user licenses
67 */
68 virtual bool GetAquireEndUserLicenses() const = 0;
69
70#ifndef MIP_CORE_PACKAGE
71 /**
72 * @brief Creates a DelegationLicenseSettings object
73 *
74 * @param licenseInfo The publishing license to request licenses for
75 * @param users A list of user email addresses to create licenses for
76 * @param acquireEndUserLicenses Whether to include end user licenses (license bound to the users) or to only include a delegated license (bound to the identity on the engine)
77 *
78 * @return A DelegationLicenseSettings object
79 */
80#if !defined(SWIG) && !defined(SWIG_DIRECTORS)
81 [[deprecated("CreateDelegationLicenseSettings(const PublishingLicenseInfo&,const std::vector<std::string>&,bool) is deprecated, use CreateDelegationLicenseSettings(const std::shared_ptr<MipContext>&,const PublishingLicenseInfo&,const std::vector<std::string>&,bool)")]]
82#endif
83 MIP_API static std::shared_ptr<DelegationLicenseSettings> __CDECL CreateDelegationLicenseSettings(
84 const PublishingLicenseInfo& licenseInfo,
85 const std::vector<std::string>& users,
86 bool acquireEndUserLicenses);
87#endif
88
89 /**
90 * @brief Creates a DelegationLicenseSettings object
91 *
92 * @param licenseInfo The publishing license to request licenses for
93 * @param users A list of user email addresses to create licenses for
94 * @param acquireEndUserLicenses Whether to include end user licenses (license bound to the users) or to only include a delegated license (bound to the identity on the engine)
95 *
96 * @return A DelegationLicenseSettings object
97 */
98 MIP_API static std::shared_ptr<DelegationLicenseSettings> __CDECL CreateDelegationLicenseSettings(
99 const std::shared_ptr<MipContext>& mipContext,
100 const PublishingLicenseInfo& licenseInfo,
101 const std::vector<std::string>& users,
102 bool acquireEndUserLicenses);
103
104 /** @cond DOXYGEN_HIDE */
105 virtual ~DelegationLicenseSettings() {}
106protected:
108 /** @endcond */
109};
110
111MIP_NAMESPACE_END
112#endif // API_MIP_PROTECTION_DELEGATION_LICENSE_SETTINGS_H_
static MIP_API std::shared_ptr< DelegationLicenseSettings > __CDECL CreateDelegationLicenseSettings(const PublishingLicenseInfo &licenseInfo, const std::vector< std::string > &users, bool acquireEndUserLicenses)
Creates a DelegationLicenseSettings object.
static MIP_API std::shared_ptr< DelegationLicenseSettings > __CDECL CreateDelegationLicenseSettings(const std::shared_ptr< MipContext > &mipContext, const PublishingLicenseInfo &licenseInfo, const std::vector< std::string > &users, bool acquireEndUserLicenses)
Creates a DelegationLicenseSettings object.
virtual std::shared_ptr< const PublishingLicenseInfo > GetLicenseInfo() const =0
Gets the PublishingLicenseInfo, the publishing license.
virtual bool GetAquireEndUserLicenses() const =0
Gets the boolean value that indicates whether or not to obtain end user license in addition to the de...
virtual const std::vector< std::string > & GetUsers() const =0
Gets the list of users for the request.
Settings to use for protection operations.
Holds the details of a Publishing License used to create a protection handler.
File containing definition of MipContext.
A file export/import macros.
MIP namespace macros.
Defines ProtectionCommonSettings interface.
A file containing the common types used by the protection module.