RMS SDK for C++  0.2.1
A client library for using Microsoft RMS from Linux.
types.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 TYPES
10 #define TYPES
11 #include<memory>
12 #include<string>
13 #include<sstream>
14 #include<list>
15 #include<vector>
16 #include<unordered_map>
17 #include<unordered_set>
18 #include<mutex>
19 #include<future>
20 #include<cstdint>
21 
22 namespace rmsauth {
23 
24 template<typename T>
25 using ptr = std::shared_ptr<T>;
26 
27 template<typename T>
28 using ptrU = std::unique_ptr<T>;
29 
30 using String = std::string;
31 
32 template<typename T>
33 using List = std::list<T>;
34 
35 template<typename T>
36 using ArrayList = std::vector<T>;
37 
38 template<typename T>
39 using Iterator = typename ArrayList<T>::iterator;
40 
41 template<typename K, typename V>
42 using HashMap = std::unordered_map<K, V>;
43 
44 template<typename K>
45 using HashSet = std::unordered_set<K>;
46 
47 template<typename K, typename V>
48 using KeyValuePair = std::pair<K, V>;
49 
50 template<typename K, typename V>
51 using KeyValuePairPtr = ptr<KeyValuePair<K,V>>;
52 
53 using Headers = HashMap<String, String>;
54 using StringMap = Headers;
55 
56 using ByteArray = ArrayList<char>;
57 using StringArray = ArrayList<String>;
58 using IntArray = ArrayList<int>;
59 
60 using StringStream = std::stringstream;
61 
62 using Mutex = std::mutex;
63 
64 using Lock = std::lock_guard<Mutex>;
65 
66 template<typename T>
67 using Future = std::future<T>;
68 
69 using DateTimeOffset = int64_t;
70 
71 } // namespace rmsauth {
72 
73 #endif // TYPES
Definition: AcquireTokenForClientHandler.h:14