• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 NAPI_CELLULAR_DATA_TYPES_H
17 #define NAPI_CELLULAR_DATA_TYPES_H
18 
19 #include <cstdint>
20 
21 namespace OHOS {
22 namespace Telephony {
23 enum class DataConnectionState : int32_t {
24     /**
25      * Indicates that a cellular data link is unknown.
26      */
27     DATA_STATE_UNKNOWN = -1,
28 
29     /**
30      * Indicates that a cellular data link is disconnected.
31      */
32     DATA_STATE_DISCONNECTED = 0,
33 
34     /**
35      * Indicates that a cellular data link is being connected.
36      */
37     DATA_STATE_CONNECTING = 1,
38 
39     /**
40      * Indicates that a cellular data link is connected.
41      */
42     DATA_STATE_CONNECTED = 2,
43 
44     /**
45      * Indicates that a cellular data link is suspended.
46      */
47     DATA_STATE_SUSPENDED = 3
48 };
49 
50 enum class DataFlowType : int32_t {
51     /**
52      * Indicates that there is no uplink or downlink data.
53      */
54     DATA_FLOW_TYPE_NONE = 0,
55 
56     /**
57      * Indicates that there is only downlink data.
58      */
59     DATA_FLOW_TYPE_DOWN = 1,
60 
61     /**
62      * Indicates that there is only uplink data.
63      */
64     DATA_FLOW_TYPE_UP = 2,
65 
66     /**
67      * Indicates that there is uplink and downlink data.
68      */
69     DATA_FLOW_TYPE_UP_DOWN = 3,
70 
71     /**
72      * Indicates that there is no uplink or downlink data, and the bottom-layer link is in the dormant state.
73      */
74     DATA_FLOW_TYPE_DORMANT = 4
75 };
76 } // namespace Telephony
77 } // namespace OHOS
78 #endif // NAPI_CELLULAR_DATA_TYPES_H