1 /* 2 * Copyright (C) 2021-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 OHOS_AT_NETWORK_H 17 #define OHOS_AT_NETWORK_H 18 19 #include "hril_vendor_network_defs.h" 20 21 #define MAX_REG_INFO_ITEM 5 22 #define MAX_5GREG_INFO_ITEM 7 23 #define MAX_IMS_REG_INFO_ITEM 2 24 #define MAX_IMS_INFO_ITEM 3 25 #define DEFAULT_ADD_NUM 8 26 #define DEFAULT_INDEX 64 27 #undef DEFAULT_TIMEOUT 28 #define DEFAULT_TIMEOUT 5000 29 #define AUTO_TYPE "00" 30 #define GSM_TYPE "01" 31 #define WCDMA_TYPE "02" 32 #define LTE_TYPE "03" 33 #define LTE_WCDMA_GSM_TYPE "030201" 34 #define WCDMA_GSM_TYPE "0201" 35 #define LTE_WCDMA_TYPE "0302" 36 37 typedef enum { 38 HRIL_RADIO_GSM = 0, 39 HRIL_RADIO_GSM_COMPACT = 1, 40 HRIL_RADIO_UTRAN = 2, 41 HRIL_RADIO_EGPRS = 3, 42 HRIL_RADIO_HSDPA = 4, 43 HRIL_RADIO_HSUPA = 5, 44 HRIL_RADIO_HSDPA_HSUPA = 6, 45 HRIL_RADIO_EUTRAN = 7, 46 HRIL_RADIO_CDMA = 8, 47 HRIL_RADIO_CDMA_IS95A = 9, 48 HRIL_RADIO_CDMA_IS95B = 10, 49 HRIL_RADIO_CDMA_EVDO_0 = 11, 50 HRIL_RADIO_CDMA_EVDO_A = 12, 51 HRIL_RADIO_CDMA_EVDO_B = 13, 52 HRIL_RADIO_CDMA_EHRPD = 14, 53 HRIL_RADIO_TDSCDMA = 15, 54 HRIL_RADIO_HSPAP = 16, 55 HRIL_RADIO_LTE = 17, 56 HRIL_RADIO_LTE_CA = 18, 57 HRIL_RADIO_NR = 19, 58 } HRilActTech; 59 60 void ReqGetSignalStrength(const ReqDataInfo *requestInfo); 61 void ReqGetCsRegStatus(const ReqDataInfo *requestInfo); 62 void ReqGetPsRegStatus(const ReqDataInfo *requestInfo); 63 void ReqGetOperatorInfo(const ReqDataInfo *requestInfo); 64 void ReqGetNeighboringCellInfoList(const ReqDataInfo *requestInfo); 65 void ReqGetCurrentCellInfo(const ReqDataInfo *requestInfo); 66 void ReqGetNetworkSearchInformation(const ReqDataInfo *requestInfo); 67 void ReqGetNetworkSelectionMode(const ReqDataInfo *requestInfo); 68 void ReqSetNetworkSelectionMode(const ReqDataInfo *requestInfo, const HRilSetNetworkModeInfo *data); 69 void ReqSetPreferredNetwork(const ReqDataInfo *requestInfo, const int32_t *data); 70 void ReqGetPreferredNetwork(const ReqDataInfo *requestInfo); 71 void ReqGetPhysicalChannelConfig(const ReqDataInfo *requestInfo); 72 void ReqSetLocateUpdates(const ReqDataInfo *requestInfo, HRilRegNotifyMode mode); 73 void ReqSetNotificationFilter(const ReqDataInfo *requestInfo, const int32_t *newFilter); 74 void ReqSetDeviceState(const ReqDataInfo *requestInfo, const int32_t *deviceStateType, const int32_t *deviceStateOn); 75 void ProcessPhyChnlCfgNotify(struct ReportInfo reportInfo, char *srcStr); 76 int32_t ProcessCurrentCellList(struct ReportInfo reportInfo, const char *s); 77 int32_t ProcessRegStatus(const char *s, const HRilRegStatusInfo *hrilRegStateInfo); 78 int32_t ProcessParamSignalStrength(const char *result, HRilRssi *hrilRssi); 79 int32_t ProcessParamSignalStrengthNotify(const char *result, HRilRssi *hrilRssi); 80 int32_t ProcessOperListToUse(const char *list); 81 void PerformTimeOut(int32_t sigFlag); 82 int32_t ParseOperListInfo( 83 const char *lineInfo, int32_t count, AvailableOperInfo *pOperInfo, AvailableOperInfo **ppOperInfo); 84 void NotifyNetWorkTime(int32_t slotId); 85 void GetNetworkSearchInformationPause(void); 86 #endif 87