1 /* 2 * Copyright (C) 2024 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_ESIM_FILE_H 17 #define OHOS_ESIM_FILE_H 18 19 #include "apdu_command.h" 20 #include "asn1_builder.h" 21 #include "asn1_decoder.h" 22 #include "asn1_node.h" 23 #include "asn1_utils.h" 24 #include "asn1_constants.h" 25 #include "download_profile_config_info_parcel.h" 26 #include "download_profile_result_parcel.h" 27 #include "downloadable_profile_parcel.h" 28 #include "esim_state_type.h" 29 #include "euicc_info_parcel.h" 30 #include "esim_service.h" 31 #include "get_downloadable_profiles_result_parcel.h" 32 #include "profile_info_list_parcel.h" 33 #include "profile_metadata_result_parcel.h" 34 #include "icc_file.h" 35 #include "request_apdu_build.h" 36 #include "reset_response.h" 37 #include "response_esim_result.h" 38 #include "tel_ril_sim_parcel.h" 39 40 namespace OHOS { 41 namespace Telephony { 42 constexpr static const int32_t NUMBER_ZERO = 0; 43 constexpr static const int32_t NUMBER_ONE = 1; 44 constexpr static const int32_t NUMBER_TWO = 2; 45 constexpr static const int32_t NUMBER_THREE = 3; 46 constexpr static const int32_t NUMBER_FOUR = 4; 47 constexpr static const int32_t NUMBER_FIVE = 5; 48 constexpr static const int32_t NUMBER_ELEVEN = 11; 49 constexpr static const int32_t PARAMETER_TWO = -1; 50 constexpr static const int32_t PROFILE_DEFAULT_NUMBER = 256; 51 constexpr static const int32_t WAIT_TIME_LONG_SECOND_FOR_ESIM = 20; 52 constexpr static const int32_t WAIT_TIME_SHORT_SECOND_FOR_ESIM = 4; 53 constexpr static const int32_t SW1_MORE_RESPONSE = 0x61; 54 constexpr static const int32_t INS_GET_MORE_RESPONSE = 0xC0; 55 constexpr static const int32_t SW1_VALUE_90 = 0x90; 56 constexpr static const int32_t SW2_VALUE_00 = 0x00; 57 static std::string ISDR_AID = "A0000005591010FFFFFFFF8900000100"; 58 constexpr static const int32_t ATR_LENGTH = 47; 59 constexpr static const uint32_t OFFSET_FOUR_BIT = 4; 60 constexpr static const uint32_t VERSION_NUMBER = 11; 61 constexpr static const uint32_t RESPONS_DATA_FINISH = 0; 62 constexpr static const uint32_t RESPONS_DATA_NOT_FINISH = 1; 63 constexpr static const uint32_t RESPONS_DATA_ERROR = 2; 64 class EsimFile : public IccFile { 65 public: 66 explicit EsimFile(std::shared_ptr<SimStateManager> simStateManager); 67 int32_t ObtainSpnCondition(bool roaming, const std::string &operatorNum); 68 bool ProcessIccReady(const AppExecFwk::InnerEvent::Pointer &event); 69 bool UpdateVoiceMail(const std::string &mailName, const std::string &mailNumber); 70 bool SetVoiceMailCount(int32_t voiceMailCount); 71 bool SetVoiceCallForwarding(bool enable, const std::string &number); 72 std::string GetVoiceMailNumber(); 73 void SetVoiceMailNumber(const std::string mailNumber); 74 void ProcessIccRefresh(int msgId); 75 void ProcessFileLoaded(bool response); 76 void OnAllFilesFetched(); 77 void StartLoad(); 78 ~EsimFile() = default; 79 std::string ObtainEid(); 80 GetEuiccProfileInfoListInnerResult GetEuiccProfileInfoList(); 81 EuiccInfo GetEuiccInfo(); 82 int32_t DisableProfile(int32_t portIndex, const std::u16string &iccId); 83 std::string ObtainSmdsAddress(int32_t portIndex); 84 EuiccRulesAuthTable ObtainRulesAuthTable(int32_t portIndex); 85 ResponseEsimInnerResult ObtainEuiccChallenge(int32_t portIndex); 86 bool ProcessObtainEuiccChallenge(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 87 bool ProcessObtainEuiccChallengeDone(const AppExecFwk::InnerEvent::Pointer &event); 88 bool ProcessDisableProfile(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 89 bool ProcessDisableProfileDone(const AppExecFwk::InnerEvent::Pointer &event); 90 bool ProcessObtainSmdsAddress(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 91 bool ProcessObtainSmdsAddressDone(const AppExecFwk::InnerEvent::Pointer &event); 92 bool ProcessRequestRulesAuthTable(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 93 bool ProcessRequestRulesAuthTableDone(const AppExecFwk::InnerEvent::Pointer &event); 94 bool RequestRulesAuthTableParseTagCtxComp0(std::shared_ptr<Asn1Node> &root); 95 std::string ObtainDefaultSmdpAddress(); 96 ResponseEsimInnerResult CancelSession(const std::u16string &transactionId, CancelReason cancelReason); 97 EuiccProfile ObtainProfile(int32_t portIndex, const std::u16string &iccId); 98 int32_t ResetMemory(ResetOption resetOption); 99 int32_t SetDefaultSmdpAddress(const std::u16string &defaultSmdpAddress); 100 bool IsSupported(); 101 ResponseEsimInnerResult SendApduData(const std::u16string &aid, const EsimApduData &apduData); 102 ResponseEsimInnerResult ObtainPrepareDownload(const DownLoadConfigInfo &downLoadConfigInfo); 103 ResponseEsimBppResult ObtainLoadBoundProfilePackage(int32_t portIndex, const std::u16string boundProfilePackage); 104 EuiccNotificationList ListNotifications(int32_t portIndex, Event events); 105 EuiccNotificationList RetrieveNotificationList(int32_t portIndex, Event events); 106 EuiccNotification ObtainRetrieveNotification(int32_t portIndex, int32_t seqNumber); 107 int32_t RemoveNotificationFromList(int32_t portIndex, int32_t seqNumber); 108 int32_t DeleteProfile(const std::u16string &iccId); 109 int32_t SwitchToProfile(int32_t portIndex, const std::u16string &iccId, bool forceDisableProfile); 110 int32_t SetProfileNickname(const std::u16string &iccId, const std::u16string &nickname); 111 EuiccInfo2 ObtainEuiccInfo2(int32_t portIndex); 112 ResponseEsimInnerResult AuthenticateServer(const AuthenticateConfigInfo &authenticateConfigInfo); 113 114 private: 115 using FileProcessFunc = std::function<bool(const AppExecFwk::InnerEvent::Pointer &event)>; 116 void InitMemberFunc(); 117 void InitChanneMemberFunc(); 118 void SyncCloseChannel(); 119 bool IsLogicChannelOpen(); 120 void ProcessEsimOpenChannel(const std::u16string &aid); 121 bool ProcessEsimOpenChannelDone(const AppExecFwk::InnerEvent::Pointer &event); 122 void ProcessEsimCloseChannel(); 123 bool ProcessEsimCloseChannelDone(const AppExecFwk::InnerEvent::Pointer &event); 124 ResultInnerCode ObtainChannelSuccessExclusive(); 125 void ProcessEvent(const AppExecFwk::InnerEvent::Pointer &event); 126 ResultInnerCode ObtainChannelSuccessAlllowSameAidReuse(const std::u16string &aid); 127 void CopyApdCmdToReqInfo(ApduSimIORequestInfo &reqInfo, ApduCommand *apdCmd); 128 void CommBuildOneApduReqInfo(ApduSimIORequestInfo &reqInfo, std::shared_ptr<Asn1Builder> &builder); 129 bool ProcessObtainEid(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 130 bool ProcessObtainEidDone(const AppExecFwk::InnerEvent::Pointer &event); 131 bool ProcessObtainEuiccInfo1(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 132 bool ProcessObtainEuiccInfo1Done(const AppExecFwk::InnerEvent::Pointer &event); 133 bool ObtainEuiccInfo1ParseTagCtx2(std::shared_ptr<Asn1Node> &root); 134 bool ProcessRequestAllProfiles(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 135 bool ProcessRequestAllProfilesDone(const AppExecFwk::InnerEvent::Pointer &event); 136 bool SplitMccAndMnc(const std::string mccMnc, std::string &mcc, std::string &mnc); 137 void BuildBasicProfileInfo(EuiccProfileInfo *eProfileInfo, std::shared_ptr<Asn1Node> &profileNode); 138 void BuildAdvancedProfileInfo(EuiccProfileInfo *eProfileInfo, std::shared_ptr<Asn1Node> &profileNode); 139 void BuildOperatorId(EuiccProfileInfo *eProfileInfo, std::shared_ptr<Asn1Node> &operatorIdNode); 140 void ConvertProfileInfoToApiStruct(EuiccProfile &dst, EuiccProfileInfo &src); 141 std::shared_ptr<Asn1Node> ParseEvent(const AppExecFwk::InnerEvent::Pointer &event); 142 std::string MakeVersionString(std::vector<uint8_t> &versionRaw); 143 std::shared_ptr<Asn1Node> Asn1ParseResponse(const std::vector<uint8_t> &response, uint32_t respLength); 144 bool ProcessObtainDefaultSmdpAddress(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 145 bool ProcessObtainDefaultSmdpAddressDone(const AppExecFwk::InnerEvent::Pointer &event); 146 bool ProcessCancelSession(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 147 bool ProcessCancelSessionDone(const AppExecFwk::InnerEvent::Pointer &event); 148 bool ProcessGetProfile(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 149 std::vector<uint8_t> GetProfileTagList(); 150 bool ProcessGetProfileDone(const AppExecFwk::InnerEvent::Pointer &event); 151 bool GetProfileDoneParseProfileInfo(std::shared_ptr<Asn1Node> &root); 152 bool ProcessResetMemory(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 153 bool ProcessResetMemoryDone(const AppExecFwk::InnerEvent::Pointer &event); 154 bool ProcessSendApduData(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 155 bool ProcessSendApduDataDone(const AppExecFwk::InnerEvent::Pointer &event); 156 bool ProcessEstablishDefaultSmdpAddress(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 157 bool ProcessEstablishDefaultSmdpAddressDone(const AppExecFwk::InnerEvent::Pointer &event); 158 void Asn1AddChildAsBase64(std::shared_ptr<Asn1Builder> &builder, std::string &base64Src); 159 bool ProcessPrepareDownload(int32_t slotId); 160 bool ProcessPrepareDownloadDone(const AppExecFwk::InnerEvent::Pointer &event); 161 bool DecodeBoundProfilePackage(const std::string &boundProfilePackageStr, std::shared_ptr<Asn1Node> &bppNode); 162 void BuildApduForInitSecureChannel( 163 RequestApduBuild& codec, std::shared_ptr<Asn1Node> &bppNode, std::shared_ptr<Asn1Node> &initSecureChannelReq); 164 void BuildApduForFirstSequenceOf87(RequestApduBuild &codec, std::shared_ptr<Asn1Node> &firstSequenceOf87); 165 void BuildApduForSequenceOf88(RequestApduBuild &codec, std::shared_ptr<Asn1Node> &sequenceOf88); 166 void BuildApduForSequenceOf86(RequestApduBuild &codec, std::shared_ptr<Asn1Node> &bppNode, 167 std::shared_ptr<Asn1Node> &sequenceOf86); 168 bool ProcessLoadBoundProfilePackage(int32_t slotId); 169 bool ProcessLoadBoundProfilePackageDone(const AppExecFwk::InnerEvent::Pointer &event); 170 std::shared_ptr<Asn1Node> LoadBoundProfilePackageParseProfileInstallResult(std::shared_ptr<Asn1Node> &root); 171 bool LoadBoundProfilePackageParseNotificationMetadata(std::shared_ptr<Asn1Node> ¬ificationMetadata); 172 bool RealProcessLoadBoundProfilePackageDone(); 173 bool ProcessListNotifications( 174 int32_t slotId, Event events, const AppExecFwk::InnerEvent::Pointer &responseEvent); 175 bool ProcessListNotificationsDone(const AppExecFwk::InnerEvent::Pointer &event); 176 void createNotification(std::shared_ptr<Asn1Node> &node, EuiccNotification &euicc); 177 bool ProcessListNotificationsAsn1Response(std::shared_ptr<Asn1Node> &root); 178 void SplitSendLongData(RequestApduBuild &codec, int32_t esimMessageId, 179 std::mutex &mtx, bool &flag, std::condition_variable &cv); 180 uint32_t MergeRecvLongDataComplete(IccFileData &fileData, int32_t eventId); 181 void ConvertPreDownloadParaFromApiStru(PrepareDownloadResp& dst, EsimProfile& src); 182 uint32_t CombineResponseDataFinish(IccFileData &fileData); 183 void ProcessIfNeedMoreResponse(IccFileData &fileData, int32_t eventId); 184 bool ProcessRetrieveNotificationList( 185 int32_t slotId, Event events, const AppExecFwk::InnerEvent::Pointer &responseEvent); 186 bool ProcessRetrieveNotificationListDone(const AppExecFwk::InnerEvent::Pointer &event); 187 bool RetrieveNotificationParseCompTag(std::shared_ptr<Asn1Node> &root); 188 bool ProcessRetrieveNotification(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 189 bool ProcessRetrieveNotificationDone(const AppExecFwk::InnerEvent::Pointer &event); 190 bool RetrieveNotificatioParseTagCtxComp0(std::shared_ptr<Asn1Node> &root); 191 bool ProcessRemoveNotification(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 192 bool ProcessRemoveNotificationDone(const AppExecFwk::InnerEvent::Pointer &event); 193 bool ProcessDeleteProfile(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 194 bool ProcessDeleteProfileDone(const AppExecFwk::InnerEvent::Pointer &event); 195 bool ProcessSwitchToProfile(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 196 bool ProcessSwitchToProfileDone(const AppExecFwk::InnerEvent::Pointer &event); 197 bool ProcessSetNickname(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 198 bool ProcessSetNicknameDone(const AppExecFwk::InnerEvent::Pointer &event); 199 bool ProcessObtainEuiccInfo2(int32_t slotId, const AppExecFwk::InnerEvent::Pointer &responseEvent); 200 bool ProcessObtainEuiccInfo2Done(const AppExecFwk::InnerEvent::Pointer &event); 201 void EuiccInfo2ParseProfileVersion(EuiccInfo2 &euiccInfo2, std::shared_ptr<Asn1Node> &root); 202 void EuiccInfo2ParseSvn(EuiccInfo2 &euiccInfo2, std::shared_ptr<Asn1Node> &root); 203 void EuiccInfo2ParseEuiccFirmwareVer(EuiccInfo2 &euiccInfo2, std::shared_ptr<Asn1Node> &root); 204 void EuiccInfo2ParseExtCardResource(EuiccInfo2 &euiccInfo2, std::shared_ptr<Asn1Node> &root); 205 void EuiccInfo2ParseUiccCapability(EuiccInfo2 &euiccInfo2, std::shared_ptr<Asn1Node> &root); 206 void EuiccInfo2ParseTs102241Version(EuiccInfo2 &euiccInfo2, std::shared_ptr<Asn1Node> &root); 207 void EuiccInfo2ParseGlobalPlatformVersion(EuiccInfo2 &euiccInfo2, std::shared_ptr<Asn1Node> &root); 208 void EuiccInfo2ParseRspCapability(EuiccInfo2 &euiccInfo2, std::shared_ptr<Asn1Node> &root); 209 void EuiccInfo2ParseEuiccCiPKIdListForVerification(EuiccInfo2 &euiccInfo2, std::shared_ptr<Asn1Node> &root); 210 void EuiccInfo2ParseEuiccCiPKIdListForSigning(EuiccInfo2 &euiccInfo2, std::shared_ptr<Asn1Node> &root); 211 void EuiccInfo2ParseEuiccCategory(EuiccInfo2 &euiccInfo2, std::shared_ptr<Asn1Node> &root); 212 void EuiccInfo2ParsePpVersion(EuiccInfo2 &euiccInfo2, std::shared_ptr<Asn1Node> &root); 213 bool ProcessAuthenticateServer(int32_t slotId); 214 bool ProcessAuthenticateServerDone(const AppExecFwk::InnerEvent::Pointer &event); 215 bool RealProcessAuthenticateServerDone(); 216 void AddDeviceCapability(std::shared_ptr<Asn1Builder> &devCapsBuilder); 217 void AddCtxParams1(std::shared_ptr<Asn1Builder> &ctxParams1Builder, Es9PlusInitAuthResp &pbytes); 218 void GetImeiBytes(std::vector<uint8_t> &imeiBytes, const std::string &imei); 219 void CovertAuthToApiStruct(ResponseEsimInnerResult &dst, AuthServerResponse &src); 220 void ConvertAuthInputParaFromApiStru(Es9PlusInitAuthResp &dst, EsimProfile &src); 221 bool GetRawDataFromEvent(const AppExecFwk::InnerEvent::Pointer &event, IccFileData &outRawData); 222 void ResetEuiccNotification(); 223 void NotifyReady(std::mutex &mtx, bool &flag, std::condition_variable &cv); 224 bool RealProcessPrepareDownloadDone(); 225 bool CommMergeRecvData( 226 std::mutex &mtx, bool &flag, std::condition_variable &cv, int32_t eventId, bool &isHandleFinish); 227 bool IsSameAid(const std::u16string &aid); 228 bool IsValidAidForAllowSameAidReuseChannel(const std::u16string &aid); 229 bool RealProcessRequestAllProfilesDone(); 230 void ProcessEsimCloseSpareChannel(); 231 bool ProcessEsimCloseSpareChannelDone(const AppExecFwk::InnerEvent::Pointer &event); 232 233 private: 234 std::map<int32_t, FileProcessFunc> memberFuncMap_; 235 std::atomic_int nextSerialId_ = 0; 236 std::atomic<int32_t> currentChannelId_ = -1; 237 int32_t slotId_ = 0; 238 EsimProfile esimProfile_; 239 std::string eid_ = ""; 240 std::string defaultDpAddress_ = ""; 241 int32_t delProfile_ = static_cast<int32_t>(ResultInnerCode::RESULT_EUICC_CARD_DEFALUT_ERROR); 242 int32_t setDpAddressResult_ = static_cast<int32_t>(ResultInnerCode::RESULT_EUICC_CARD_DEFALUT_ERROR); 243 int32_t switchResult_ = static_cast<int32_t>(ResultInnerCode::RESULT_EUICC_CARD_DEFALUT_ERROR); 244 int32_t setNicknameResult_ = static_cast<int32_t>(ResultInnerCode::RESULT_EUICC_CARD_DEFALUT_ERROR); 245 int32_t resetResult_ = static_cast<int32_t>(ResultInnerCode::RESULT_EUICC_CARD_DEFALUT_ERROR); 246 int32_t disableProfileResult_ = static_cast<int32_t>(ResultInnerCode::RESULT_EUICC_CARD_DEFALUT_ERROR); 247 int32_t removeNotifResult_ = static_cast<int32_t>(ResultInnerCode::RESULT_EUICC_CARD_DEFALUT_ERROR); 248 GetEuiccProfileInfoListInnerResult euiccProfileInfoList_; 249 EuiccInfo eUiccInfo_; 250 EuiccProfile eUiccProfile_; 251 std::string smdsAddress_ = ""; 252 EuiccRulesAuthTable eUiccRulesAuthTable_; 253 ResponseEsimInnerResult responseChallengeResult_; 254 EuiccInfo2 euiccInfo2Result_; 255 ResponseEsimInnerResult responseAuthenticateResult_; 256 ResponseEsimInnerResult preDownloadResult_; 257 ResponseEsimBppResult loadBPPResult_; 258 ResponseEsimInnerResult cancelSessionResult_; 259 EuiccNotification notification_; 260 EuiccNotificationList eUiccNotificationList_; 261 EuiccNotificationList retrieveNotificationList_; 262 ResponseEsimInnerResult transApduDataResponse_; 263 bool isSupported_ = false; 264 std::string recvCombineStr_ = ""; 265 IccFileData newRecvData_; 266 267 std::u16string aidStr_ = u""; 268 std::mutex occupyChannelMutex_; 269 270 std::mutex closeChannelMutex_; 271 std::condition_variable closeChannelCv_; 272 273 std::mutex openChannelMutex_; 274 std::condition_variable openChannelCv_; 275 276 std::mutex getEidMutex_; 277 std::condition_variable getEidCv_; 278 bool isEidReady_ = false; 279 280 std::mutex allProfileInfoMutex_; 281 std::condition_variable allProfileInfoCv_; 282 bool isAllProfileInfoReady_ = false; 283 284 std::mutex euiccInfo1Mutex_; 285 std::condition_variable euiccInfo1Cv_; 286 bool isEuiccInfo1Ready_ = false; 287 288 std::mutex disableProfileMutex_; 289 std::condition_variable disableProfileCv_; 290 bool isDisableProfileReady_ = false; 291 292 std::mutex smdsAddressMutex_; 293 std::condition_variable smdsAddressCv_; 294 bool isSmdsAddressReady_ = false; 295 296 std::mutex rulesAuthTableMutex_; 297 std::condition_variable rulesAuthTableCv_; 298 bool isRulesAuthTableReady_ = false; 299 300 std::mutex euiccChallengeMutex_; 301 std::condition_variable euiccChallengeCv_; 302 bool isEuiccChallengeReady_ = false; 303 304 std::mutex obtainDefaultSmdpAddressMutex_; 305 std::condition_variable obtainDefaultSmdpAddressCv_; 306 bool isObtainDefaultSmdpAddressReady_ = false; 307 308 std::mutex cancelSessionMutex_; 309 std::condition_variable cancelSessionCv_; 310 bool isCancelSessionReady_ = false; 311 312 std::mutex obtainProfileMutex_; 313 std::condition_variable obtainProfileCv_; 314 bool isObtainProfileReady_ = false; 315 316 std::mutex resetMemoryMutex_; 317 std::condition_variable resetMemoryCv_; 318 bool isResetMemoryReady_ = false; 319 320 std::mutex setDefaultSmdpAddressMutex_; 321 std::condition_variable setDefaultSmdpAddressCv_; 322 bool isSetDefaultSmdpAddressReady_ = false; 323 324 std::mutex sendApduDataMutex_; 325 std::condition_variable sendApduDataCv_; 326 bool isSendApduDataReady_ = false; 327 328 std::mutex prepareDownloadMutex_; 329 std::condition_variable prepareDownloadCv_; 330 bool isPrepareDownloadReady_ = false; 331 332 std::mutex loadBppMutex_; 333 std::condition_variable loadBppCv_; 334 bool isLoadBppReady_ = false; 335 336 std::mutex listNotificationsMutex_; 337 std::condition_variable listNotificationsCv_; 338 bool isListNotificationsReady_ = false; 339 340 std::mutex retrieveNotificationListMutex_; 341 std::condition_variable retrieveNotificationListCv_; 342 bool isRetrieveNotificationListReady_ = false; 343 344 std::mutex retrieveNotificationMutex_; 345 std::condition_variable retrieveNotificationCv_; 346 bool isRetrieveNotificationReady_ = false; 347 348 std::mutex removeNotificationMutex_; 349 std::condition_variable removeNotificationCv_; 350 bool isRemoveNotificationReady_ = false; 351 352 std::mutex deleteProfileMutex_; 353 std::condition_variable deleteProfileCv_; 354 bool isDeleteProfileReady_ = false; 355 356 std::mutex switchToProfileMutex_; 357 std::condition_variable switchToProfileCv_; 358 bool isSwitchToProfileReady_ = false; 359 360 std::mutex setNicknameMutex_; 361 std::condition_variable setNicknameCv_; 362 bool isSetNicknameReady_ = false; 363 364 std::mutex euiccInfo2Mutex_; 365 std::condition_variable euiccInfo2Cv_; 366 bool isEuiccInfo2Ready_ = false; 367 368 std::mutex authenticateServerMutex_; 369 std::condition_variable authenticateServerCv_; 370 bool isAuthenticateServerReady_ = false; 371 }; 372 } // namespace Telephony 373 } // namespace OHOS 374 #endif // OHOS_ESIM_FILE_H 375