RMS SDK for C++  0.2.1
A client library for using Microsoft RMS from Linux.
UserIdentifier.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 USERIDENTIFIER_H
10 #define USERIDENTIFIER_H
11 
12 #include "types.h"
13 #include "Exceptions.h"
14 
15 namespace rmsauth {
16 
17 enum class UserIdentifierType
18 {
19  UniqueId,
20  OptionalDisplayableId,
21  RequiredDisplayableId
22 };
23 
24 class UserIdentifier;
25 using UserIdentifierPtr = ptr<UserIdentifier>;
26 
27 class UserIdentifier final
28 {
29  UserIdentifierType type_;
30  String id_;
31 
32  static UserIdentifierPtr anyUserSingleton();
33 
34 public:
35  UserIdentifier(const String& id, UserIdentifierType type);
36 
37  UserIdentifierType type() const { return type_; }
38 
39  const String& id() const { return id_; }
40 
41  static UserIdentifierPtr anyUser();
42 
43  bool isAnyUser() const;
44 
45  const String uniqueId() const;
46 
47  const String displayableId() const;
48 };
49 
50 } // namespace rmsauth {
51 
52 #endif // USERIDENTIFIER_H
Definition: UserIdentifier.h:27
Definition: AcquireTokenForClientHandler.h:14