• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 The Android Open Source Project
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  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #ifndef WIFI_OFFLOAD_CHRE_INTERFACE_CALLBACKS_H
17 #define WIFI_OFFLOAD_CHRE_INTERFACE_CALLBACKS_H
18 
19 #include <cstdint>
20 
21 namespace android {
22 namespace hardware {
23 namespace wifi {
24 namespace offload {
25 namespace V1_0 {
26 namespace implementation {
27 
28 class ChreInterfaceCallbacks {
29   public:
30     enum ConnectionEvent { CONNECTED, DISCONNECTED, CONNECTION_ABORT };
~ChreInterfaceCallbacks()31     virtual ~ChreInterfaceCallbacks() {}
32 
33     /* Invoked by the Chre interface when connection events are received */
34     virtual void handleConnectionEvents(ConnectionEvent event) = 0;
35     /* Invoked by the Chre interface when a message is recieved from Nano app */
36     virtual void handleMessage(uint32_t messageType, const std::vector<uint8_t>& message) = 0;
37 };
38 
39 }  // namespace implementation
40 }  // namespace V1_0
41 }  // namespace offload
42 }  // namespace wifi
43 }  // namespace hardware
44 }  // namespace android
45 #endif  // WIFI_OFFLOAD_CHRE_INTERFACE_CALLBACKS_H
46