Microsoft Information Protection SDK - C++ 1.17
API Reference Documentation for C++
Loading...
Searching...
No Matches
rights.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 */
33#ifndef API_MIP_PROTECTION_RIGHTS_H_
34#define API_MIP_PROTECTION_RIGHTS_H_
35
36#include <string>
37#include <vector>
38
39#include "mip/mip_namespace.h"
40
41MIP_NAMESPACE_BEGIN
42
43namespace rights {
49inline std::string Owner() { return "OWNER"; }
50
56inline std::string View() { return "VIEW"; }
57
63inline std::string AuditedExtract() { return "AUDITEDEXTRACT"; }
64
70inline std::string Edit() { return "EDIT"; }
71
77inline std::string Export() { return "EXPORT"; }
78
84inline std::string Extract() { return "EXTRACT"; }
85
91inline std::string Print() { return "PRINT"; }
92
98inline std::string Comment() { return "COMMENT"; }
99
105inline std::string Reply() { return "REPLY"; }
106
112inline std::string ReplyAll() { return "REPLYALL"; }
113
119inline std::string Forward() { return "FORWARD"; }
120
126inline std::string ViewRightsData() { return "VIEWRIGHTSDATA"; }
127
133inline std::string DocumentEdit() { return "DOCEDIT"; }
134
140inline std::string ObjectModel() { return "OBJMODEL"; }
141
147inline std::string EditRightsData() { return "EDITRIGHTSDATA"; }
148
154inline std::vector<std::string> EmailRights() {
155 return std::vector<std::string>{Extract(), Forward(), Owner(), Print(), Reply(), ReplyAll(), View()};
156}
157
163inline std::vector<std::string> EditableDocumentRights() {
164 return std::vector<std::string>{Comment(), Edit(), Extract(), Owner(), Print(), View()};
165}
166
172inline std::vector<std::string> CommonRights() {
173 return std::vector<std::string>{Owner(), View()};
174}
175
181inline std::vector<std::string> DoNotForwardRights() {
182 return std::vector<std::string>{
183 View(),
184 Edit(),
185 ObjectModel(),
187 Reply(),
188 ReplyAll(),
189 DocumentEdit()};
190}
191
197inline std::vector<std::string> EncryptOnlyRights() {
198 return std::vector<std::string>{
199 View(),
200 Edit(),
201 Extract(),
202 Print(),
203 ObjectModel(),
205 Forward(),
206 Reply(),
207 ReplyAll(),
208 DocumentEdit(),
210}
211} // namespace rights
212MIP_NAMESPACE_END
213
214#endif // API_MIP_PROTECTION_RIGHTS_H_
MIP namespace macros.
Definition rights.h:43
std::vector< std::string > EncryptOnlyRights()
Gets a list of rights that apply to do encrypt only emails.
Definition rights.h:197
std::string EditRightsData()
Gets string identifier for 'edit rights data' right.
Definition rights.h:147
std::string Reply()
Gets string identifier for 'reply' right.
Definition rights.h:105
std::string View()
Gets string identifier for 'view' right.
Definition rights.h:56
std::string ObjectModel()
Gets string identifier for 'object model' right.
Definition rights.h:140
std::string Comment()
Gets string identifier for 'comment' right.
Definition rights.h:98
std::string Edit()
Gets string identifier for 'edit' right.
Definition rights.h:70
std::string ViewRightsData()
Gets string identifier for 'view rights data' right.
Definition rights.h:126
std::string Owner()
Gets string identifier for 'owner' right.
Definition rights.h:49
std::vector< std::string > DoNotForwardRights()
Gets a list of rights that apply to do not forward emails.
Definition rights.h:181
std::string Export()
Gets string identifier for 'export' right.
Definition rights.h:77
std::string Print()
Gets string identifier for 'print' right.
Definition rights.h:91
std::string Extract()
Gets string identifier for 'extract' right.
Definition rights.h:84
std::string ReplyAll()
Gets string identifier for 'reply all' right.
Definition rights.h:112
std::string Forward()
Gets string identifier for 'forward' right.
Definition rights.h:119
std::vector< std::string > CommonRights()
Gets a list of rights that apply in all scenarios.
Definition rights.h:172
std::string AuditedExtract()
Gets string identifier for 'audited extract' right.
Definition rights.h:63
std::vector< std::string > EditableDocumentRights()
Gets a list of rights that apply to documents.
Definition rights.h:163
std::vector< std::string > EmailRights()
Gets a list of rights that apply to emails.
Definition rights.h:154
std::string DocumentEdit()
Gets string identifier for 'document edit' right.
Definition rights.h:133