RMS SDK for C++  0.2.1
A client library for using Microsoft RMS from Linux.
rights.h
1 /*
2  * ======================================================================
3  * Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
4  * Licensed under the MIT License.
5  * See LICENSE.md in the project root for license information.
6  * ======================================================================
7 */
8 
9 #ifndef _RMS_LIB_RIGHTS_H_
10 #define _RMS_LIB_RIGHTS_H_
11 
12 #include <string>
13 #include <vector>
14 #include "ModernAPIExport.h"
15 
16 namespace rmscore {
17 namespace modernapi {
18 
22 class DLL_PUBLIC_RMS CommonRights {
23 public:
24 
25 public:
29  static const std::string Owner()
30  {
31  return "OWNER";
32  }
33 
37  static const std::string View()
38  {
39  return "VIEW";
40  }
41 
45  static const std::vector<std::string> All()
46  {
47  return std::vector<std::string>{ CommonRights::View(), CommonRights::Owner() };
48  }
49 
53  static std::string AuditedExtract()
54  {
55  return "AUDITEDEXTRACT";
56  }
57 
58 private:
59 
60  CommonRights() = delete;
61  friend class Rights;
62 };
63 
67 class DLL_PUBLIC_RMS EditableDocumentRights {
68 public:
69 
74  static const std::string Edit()
75  {
76  return "EDIT";
77  }
78 
83  static const std::string Export()
84  {
85  return "EXPORT";
86  }
87 
92  static const std::string Extract()
93  {
94  return "EXTRACT";
95  }
96 
100  static const std::string Print()
101  {
102  return "PRINT";
103  }
104 
109  static const std::string Comment()
110  {
111  return "COMMENT";
112  }
113 
117  static const std::vector<std::string> All()
118  {
119  return std::vector<std::string>{
126  };
127  }
128 
129 private:
130 
131  EditableDocumentRights() = delete;
132 };
133 
137 class DLL_PUBLIC_RMS EmailRights {
138 public:
139 
144  static const std::string Reply()
145  {
146  return "REPLY";
147  }
148 
153  static const std::string ReplyAll()
154  {
155  return "REPLYALL";
156  }
157 
161  static const std::string Forward()
162  {
163  return "FORWARD";
164  }
165 
170  static const std::string Extract()
171  {
173  }
174 
178  static const std::string Print()
179  {
181  }
182 
186  static const std::vector<std::string> All()
187  {
188  return std::vector<std::string>{
196  };
197  }
198 
199 private:
200 
201  EmailRights() = delete;
202 };
203 } // namespace modernapi
204 } // namespace rmscore
205 
206 #endif // _RMS_LIB_RIGHTS_H_
static const std::string Reply()
Gets a right that allows a protected email message to be replied to with a message that includes a co...
Definition: rights.h:144
static const std::string Print()
Gets a right that allows protected email content to be printed. Same value as EditableDocumentRights...
Definition: rights.h:178
static const std::vector< std::string > All()
Gets a set of all CommonRights.
Definition: rights.h:45
static const std::string View()
Gets a right that allows viewing of protected content.
Definition: rights.h:37
Rights that apply to editable documents.
Definition: rights.h:67
static const std::string Forward()
Gets a right that allows a protected email message to be forwarded.
Definition: rights.h:161
static const std::string Comment()
Gets a right that allows the protected content to be commented on and saved to the same protected for...
Definition: rights.h:109
Definition: AuthenticationCallbackImpl.h:16
static const std::string Extract()
Gets a right that allows content to be extracted from a protected format and placed in an unprotected...
Definition: rights.h:92
static const std::string Print()
Gets a right that allows protected content to be printed. Same value as EmailRights.Print.
Definition: rights.h:100
static const std::vector< std::string > All()
Gets a list of all the rights that apply to emails.
Definition: rights.h:186
Rights supported by all apps.
Definition: rights.h:22
static const std::string Export()
Gets a right that allows content to be extracted from a protected format and placed in a different AD...
Definition: rights.h:83
static const std::string ReplyAll()
Gets a right that allows reply-all to a protected email message with a message that includes a copy o...
Definition: rights.h:153
static std::string AuditedExtract()
BRP072215 - I think this has been deprecated from the RMS SDK, in general.
Definition: rights.h:53
static const std::string Extract()
Gets a right that allows content to be extracted from a protected email and placed in an unprotected...
Definition: rights.h:170
Rights that apply to email.
Definition: rights.h:137
static const std::string Owner()
Gets a right that represents content ownership.
Definition: rights.h:29
static const std::string Edit()
Gets a right that allows the protected content to be edited and saved to the same protected format...
Definition: rights.h:74
static const std::vector< std::string > All()
Gets a collection of all the rights that apply to editable documents.
Definition: rights.h:117