RMS SDK for C++  0.2.1
A client library for using Microsoft RMS from Linux.
ConsentResult.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 CONSENTRESULT
10 #define CONSENTRESULT
11 
12 #include <string>
13 #include "ModernAPIExport.h"
14 
15 namespace rmscore {
16 namespace modernapi {
17 /*
18 * @brief Management of user consent result.
19 */
20 class ConsentResult {
21 public:
22  /*
23  * @brief Creates and initializes an instance of a ConsentResult object.
24  */
25  ConsentResult(bool accepted = false,
26  bool showAgain = true,
27  const std::string& userId = "undef")
28  : accepted(accepted)
29  , showAgain(showAgain)
30  , userId(userId)
31  {}
32 
33  /*
34  * @brief Gets the Accepted flag indicating the user has consented or not.
35  */
36  bool Accepted() const
37  {
38  return this->accepted;
39  }
40 
41  /*
42  * @brief Gets the ShowAgain flag indicating whether the user consent prompt should be shown again or not.
43  */
44  bool ShowAgain() const
45  {
46  return this->showAgain;
47  }
48 
49  /*
50  * @brief Gets the email ID of the user giving consent.
51  */
52  const std::string& UserId() const
53  {
54  return this->userId;
55  }
56 
57 private:
58 
59  bool accepted;
60  bool showAgain;
61  std::string userId;
62 };
63 } // namespace modernapi
64 } // namespace rmscore
65 
66 
67 #endif // CONSENTRESULT
Definition: AuthenticationCallbackImpl.h:16