Alexa Auto SDK  2.0.0
AuthProvider.h
1 /*
2  * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef AACE_ALEXA_AUTH_PROVIDER_H
17 #define AACE_ALEXA_AUTH_PROVIDER_H
18 
19 #include <string>
20 
21 #include "AACE/Core/PlatformInterface.h"
22 #include "AlexaEngineInterfaces.h"
23 
26 namespace aace {
27 namespace alexa {
28 
34 protected:
35  AuthProvider() = default;
36 
37 public:
43 
49 
50  virtual ~AuthProvider();
51 
58  virtual std::string getAuthToken() = 0;
59 
65  virtual AuthState getAuthState() = 0;
66 
73  void authStateChanged( AuthState authState, AuthError authError );
74 
81  void setEngineInterface( std::shared_ptr<AuthProviderEngineInterface> authProviderEngineInterface );
82 
83 private:
84  std::weak_ptr<AuthProviderEngineInterface> m_authProviderEngineInterface;
85 };
86 
87 } // aace::alexa
88 } // aace
89 
90 
91 #endif // AACE_ALEXA_AUTH_PROVIDER_H
virtual std::string getAuthToken()=0
AuthState
Definition: AlexaEngineInterfaces.h:201
Definition: PlatformInterface.h:29
AuthError
Definition: AlexaEngineInterfaces.h:227
Definition: AddressBook.h:26
void authStateChanged(AuthState authState, AuthError authError)
Definition: AuthProvider.cpp:23
virtual AuthState getAuthState()=0
Definition: AuthProvider.h:33

Alexa Auto SDK 2.0.0 - Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0