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 
17 #ifndef CHRE_WIFI_OFFLOAD_ERROR_CODES_H_
18 #define CHRE_WIFI_OFFLOAD_ERROR_CODES_H_
19 
20 #include "chre/apps/wifi_offload/wifi_offload.h"
21 
22 namespace wifi_offload {
23 
24 enum ErrorCode : uint32_t {
25   SUCCESS = 0,
26 
27   FAILED_TO_ALLOCATE_MESSAGE_BUFFER,
28   FAILED_TO_SERIALIZE_MESSAGE,
29   FAILED_TO_SEND_MESSAGE,
30 
31   FAILED_TO_DESERIALIZE_SCAN_CONFIG,
32   INVALID_SUBSCRIBE_MESSAGE_SIZE,
33   SCAN_CONFIG_NOT_INITIALIZED,
34   UNSPECIFIED_HOST_ENDPOINT,
35 
36   FAILED_TO_SEND_SCAN_RESULTS,
37   FAILED_TO_SEND_SCAN_STATS,
38 
39   SCAN_MONITORING_NOT_SUPPORTED,
40   FAILED_TO_START_SCAN_MONITORING,
41   FAILED_TO_STOP_SCAN_MONITORING,
42   FAILED_TO_CONFIGURE_SCAN_MONITORING_ASYNC,
43 
44   ONDEMAND_SCAN_NOT_SUPPORTED,
45   FAILED_TO_SEND_ONDEMAND_SCAN_REQUEST,
46   FAILED_TO_SEND_ONDEMAND_SCAN_REQUEST_ASYNC,
47 
48   OUT_OF_ORDER_SCAN_RESULTS,
49   INCOMPLETE_SCAN_RESULTS_BEFORE_SCAN_REQUEST,
50 
51   FAILED_TO_SET_SCAN_TIMER,
52 };
53 
54 }  // namespace wifi_offload
55 
56 #endif  // CHRE_WIFI_OFFLOAD_ERROR_CODES_H_
57