1 /*
2  * Copyright (c) 2022 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 COMMUNICATIONNETMANAGERBASE_CONSTANT_H
17 #define COMMUNICATIONNETMANAGERBASE_CONSTANT_H
18 
19 static constexpr const char *KEY_ADDRESS = "address";
20 static constexpr const char *KEY_FAMILY = "family";
21 static constexpr const char *KEY_PORT = "port";
22 
23 static constexpr const int PARAM_NONE = 0;
24 static constexpr const int PARAM_JUST_OPTIONS = 1;
25 static constexpr const int PARAM_JUST_CALLBACK = 1;
26 static constexpr const int PARAM_OPTIONS_AND_CALLBACK = 2;
27 
28 static constexpr const char *EVENT_NET_AVAILABLE = "netAvailable";
29 static constexpr const char *EVENT_NET_BLOCK_STATUS_CHANGE = "netBlockStatusChange";
30 static constexpr const char *EVENT_NET_CAPABILITIES_CHANGE = "netCapabilitiesChange";
31 static constexpr const char *EVENT_NET_CONNECTION_PROPERTIES_CHANGE = "netConnectionPropertiesChange";
32 static constexpr const char *EVENT_NET_LOST = "netLost";
33 static constexpr const char *EVENT_NET_UNAVAILABLE = "netUnavailable";
34 
35 static constexpr const char *KEY_LINK_UP_BAND_WIDTH_KPS = "linkUpBandwidthKbps";
36 static constexpr const char *KEY_LINK_DOWN_BAND_WIDTH_KPS = "linkDownBandwidthKbps";
37 static constexpr const char *KEY_NET_CAPABILITIES = "netCapabilities";
38 static constexpr const char *KEY_BEARER_PRIVATE_IDENTIFIER = "bearerPrivateIdentifier";
39 static constexpr const char *KEY_NETWORK_CAP = "networkCap";
40 static constexpr const char *KEY_BEARER_TYPE = "bearerTypes";
41 
42 static constexpr const char *KEY_INTERFACE_NAME = "interfaceName";
43 static constexpr const char *KEY_IS_USE_PRIVATE_DNS = "isUsePrivateDns";
44 static constexpr const char *KEY_PRIVATE_DNS_SERVER_NAME = "privateDnsServerName";
45 static constexpr const char *KEY_DOMAINS = "domains";
46 static constexpr const char *KEY_HTTP_PROXY = "httpProxy";
47 static constexpr const char *KEY_LINK_ADDRESSES = "linkAddresses";
48 static constexpr const char *KEY_DNSES = "dnses";
49 static constexpr const char *KEY_ROUTES = "routes";
50 static constexpr const char *KEY_MTU = "mtu";
51 static constexpr const char *KEY_PREFIX_LENGTH = "prefixLength";
52 static constexpr const char *KEY_INTERFACE = "interface";
53 static constexpr const char *KEY_DESTINATION = "destination";
54 static constexpr const char *KEY_GATE_WAY = "gateway";
55 static constexpr const char *KEY_HAS_GET_WAY = "hasGateway";
56 static constexpr const char *KEY_IS_DEFAULT_ROUE = "isDefaultRoute";
57 static constexpr const char *KEY_HOST = "host";
58 static constexpr const char *KEY_PARSED_EXCLUSION_LIST = "parsedExclusionList";
59 static constexpr const char *KEY_NET_HANDLE = "netHandle";
60 static constexpr const char *KEY_BLOCKED = "blocked";
61 static constexpr const char *KEY_NET_CAP = "netCap";
62 static constexpr const char *KEY_CONNECTION_PROPERTIES = "connectionProperties";
63 static constexpr const char *KEY_NET_ID = "netId";
64 
65 static constexpr const char *KEY_SOCKET_FD = "socketFd";
66 
67 enum {
68     ARG_NUM_0,
69     ARG_NUM_1,
70     ARG_NUM_2,
71 };
72 
73 #endif /* COMMUNICATIONNETMANAGERBASE_CONSTANT_H */
74