1 /*
2  * Copyright (C) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef OHOS_WIFI_ERRCODE_H
17 #define OHOS_WIFI_ERRCODE_H
18 
19 namespace OHOS {
20 namespace Wifi {
21 /* Wifi errcode defines */
22 enum ErrCode {
23     WIFI_OPT_SUCCESS = 0,             /* successfully */
24     WIFI_OPT_FAILED,                  /* failed */
25     WIFI_OPT_NOT_SUPPORTED,           /* not supported */
26     WIFI_OPT_INVALID_PARAM,           /* invalid params */
27     WIFI_OPT_FORBID_AIRPLANE,         /* forbid when current airplane opened */
28     WIFI_OPT_FORBID_POWSAVING,        /* forbid when current powersaving opened */
29     WIFI_OPT_PERMISSION_DENIED,       /* permission denied */
30     WIFI_OPT_OPEN_FAIL_WHEN_CLOSING,  /* open failed when current is closing */
31     WIFI_OPT_OPEN_SUCC_WHEN_OPENED,   /* open success when current has been opened */
32     WIFI_OPT_CLOSE_FAIL_WHEN_OPENING, /* close failed when current is opening */
33     WIFI_OPT_CLOSE_SUCC_WHEN_CLOSED,  /* close success when current has been closed */
34     WIFI_OPT_STA_NOT_OPENED,          /* sta service not opened */
35     WIFI_OPT_SCAN_NOT_OPENED,         /* scan service not opened */
36     WIFI_OPT_AP_NOT_OPENED,           /* ap service not opened */
37     WIFI_OPT_INVALID_CONFIG,          /* invalid config */
38     WIFI_OPT_P2P_NOT_OPENED,          /* p2p service not opened */
39     WIFI_OPT_P2P_MAC_NOT_FOUND,
40     WIFI_OPT_P2P_ERR_MAC_FORMAT,
41     WIFI_OPT_P2P_ERR_INTENT,
42     WIFI_OPT_P2P_ERR_SIZE_NW_NAME,
43     WIFI_OPT_MOVING_FREEZE_CTRL,      /* moving freeze scanning control */
44     WIFI_OPT_NON_SYSTEMAPP,           /* not system app denied */
45     WIFI_OPT_SCAN_NEXT_PERIOD,
46     WIFI_OPT_GET_ENHANCE_SVC_FAILED,  /* get enhance service failed */
47     WIFI_OPT_ENTERPRISE_DENIED = 203, /* mdm forbidden */
48 };
49 }  // namespace Wifi
50 }  // namespace OHOS
51 #endif
52