/
OnlineListener.h
52 lines (41 loc) · 1.01 KB
/
OnlineListener.h
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
#ifndef ONLINE_Listener_H
#define ONLINE_Listener_H
#include "services/LoginService.h"
#include "services/EnvironmentService.h"
namespace online
{
typedef std::shared_ptr< class Listener > ListenerPtr;
class Listener
{
public:
virtual void multipleAccountsAttached(
const LoginService& service,
const LoginService::MergeOptions options,
LoginService::MergeResolveCallback resolve) = 0;
virtual void servicesDiscovered(std::function<void()> proceed)
{
proceed();
}
virtual void environmentVariablesReceived(const EnvironmentInformation& variables)
{
//
}
virtual void authenticated(const std::string& account, const std::string& credential, const online::LoginService::Scopes& scopes)
{
//
}
virtual bool shouldHaveExternalAuthenticator()
{
return false;
}
virtual ExternalAuthenticatorPtr createExternalAuthenticator()
{
return nullptr;
}
virtual bool shouldSaveExternalStorageAccessToken()
{
return true;
}
};
};
#endif