-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathIAuthTokensController.hpp
73 lines (60 loc) · 2.12 KB
/
IAuthTokensController.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
//
#ifndef MAT_IAUTHTOKENS_HPP
#define MAT_IAUTHTOKENS_HPP
#include "ctmacros.hpp"
#include "Enums.hpp"
namespace MAT_NS_BEGIN
{
const char* const TICKETS_PREPEND_STRING = "1000";
/// <summary>
/// This class is used to manage the Events logging system
/// </summary>
class MATSDK_LIBABI IAuthTokensController
{
public:
/// <summary>
/// Destroy the telemetry logging system instance. Calls `FlushAndTeardown()` implicitly.
/// </summary>
virtual ~IAuthTokensController() {}
/// <summary>
/// Set the Auth ticket.
/// </summary>
/// <param name="type">Ticket type</param>
/// <param name="ticketValue">Ticketvalue</param>
virtual status_t SetTicketToken(TicketType type, char const* tokenValue) = 0;
/// <summary>
/// Clears all tokens.
/// </summary>
virtual status_t Clear() = 0;
/// <summary>
/// sets strict mode for application( all tokens in that app).
/// </summary>
virtual status_t SetStrictMode(bool value) = 0;
/// <summary>
/// gets strict mode for application.
/// </summary>
virtual bool GetStrictMode() = 0;
/// <summary>
/// Set the Auth ticket.
/// </summary>
/// <param name="type">Ticket type</param>
/// <param name="ticketValue">Ticketvalue</param>
virtual std::vector<std::string>& GetTickets() = 0;
/// <summary>
/// Set the Auth ticket.
/// </summary>
/// <param name="type">Ticket type</param>
/// <param name="ticketValue">Ticketvalue</param>
virtual std::map<TicketType, std::string>& GetDeviceTokens() = 0;
/// <summary>
/// Set the Auth ticket.
/// </summary>
/// <param name="type">Ticket type</param>
/// <param name="ticketValue">Ticketvalue</param>
virtual std::map<TicketType, std::string>& GetUserTokens() = 0;
};
} MAT_NS_END
#endif //MAT_IAUTHTOKENS_HPP