Alexa Auto SDK  2.3.1
APLEngineInterface.h
1 /*
2  * Copyright 2019-2020 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_APL_APL_ENGINE_INTERFACE_H
17 #define AACE_APL_APL_ENGINE_INTERFACE_H
18 
19 #include <chrono>
20 #include <string>
21 
22 namespace aace {
23 namespace apl {
24 
25 class APLEngineInterface {
26 public:
27  enum class ActivityEvent {
28  // GUI switched to active state.
29  ACTIVATED,
30 
31  // GUI become inactive.
32  DEACTIVATED,
33 
34  // GUI processed one-time event (touch/scroll/etc).
35  ONE_TIME,
36 
38  INTERRUPT,
39 
40  // Guard option for unknown received state.
41  UNKNOWN
42  };
43  virtual void onClearCard() = 0;
44  virtual void onClearAllExecuteCommands() = 0;
45  virtual void onSendUserEvent(const std::string& payload) = 0;
46  virtual void onSetAPLMaxVersion(const std::string& aplMaxVersion) = 0;
47  virtual void onSetDocumentIdleTimeout(std::chrono::milliseconds documentIdleTimeout) = 0;
48  virtual void onRenderDocumentResult(const std::string& token, bool result, const std::string& error) = 0;
49  virtual void onExecuteCommandsResult(const std::string& token, bool result, const std::string& error) = 0;
50  virtual void onProcessActivityEvent(const std::string& source, ActivityEvent event) = 0;
51 };
52 
53 } // namespace apl
54 } // namespace aace
55 
56 #endif
Definition: AddressBook.h:26

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