1d95e75fdSopenharmony_ci/* 2d95e75fdSopenharmony_ci * Copyright (C) 2021 Huawei Device Co., Ltd. 3d95e75fdSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4d95e75fdSopenharmony_ci * you may not use this file except in compliance with the License. 5d95e75fdSopenharmony_ci * You may obtain a copy of the License at 6d95e75fdSopenharmony_ci * 7d95e75fdSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8d95e75fdSopenharmony_ci * 9d95e75fdSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10d95e75fdSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11d95e75fdSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12d95e75fdSopenharmony_ci * See the License for the specific language governing permissions and 13d95e75fdSopenharmony_ci * limitations under the License. 14d95e75fdSopenharmony_ci */ 15d95e75fdSopenharmony_ci 16d95e75fdSopenharmony_ci#ifndef TELEPHONY_CELLULAR_CALL_EMERGENCY_UTILS_H 17d95e75fdSopenharmony_ci#define TELEPHONY_CELLULAR_CALL_EMERGENCY_UTILS_H 18d95e75fdSopenharmony_ci 19d95e75fdSopenharmony_ci#include <string> 20d95e75fdSopenharmony_ci 21d95e75fdSopenharmony_ci#include "telephony_log_wrapper.h" 22d95e75fdSopenharmony_ci 23d95e75fdSopenharmony_cinamespace OHOS { 24d95e75fdSopenharmony_cinamespace Telephony { 25d95e75fdSopenharmony_ciclass EmergencyUtils { 26d95e75fdSopenharmony_cipublic: 27d95e75fdSopenharmony_ci /** 28d95e75fdSopenharmony_ci * EmergencyUtils constructor 29d95e75fdSopenharmony_ci */ 30d95e75fdSopenharmony_ci EmergencyUtils() = default; 31d95e75fdSopenharmony_ci 32d95e75fdSopenharmony_ci /** 33d95e75fdSopenharmony_ci * ~EmergencyUtils destructor 34d95e75fdSopenharmony_ci */ 35d95e75fdSopenharmony_ci ~EmergencyUtils() = default; 36d95e75fdSopenharmony_ci 37d95e75fdSopenharmony_ci /** 38d95e75fdSopenharmony_ci * @brief Is it an emergency call 39d95e75fdSopenharmony_ci * 40d95e75fdSopenharmony_ci * @param slotId 41d95e75fdSopenharmony_ci * @param phoneNum 42d95e75fdSopenharmony_ci * @param enabled 43d95e75fdSopenharmony_ci * @return int32_t 44d95e75fdSopenharmony_ci */ 45d95e75fdSopenharmony_ci int32_t IsEmergencyCall(int32_t slotId, const std::string &phoneNum, bool &enabled); 46d95e75fdSopenharmony_ci 47d95e75fdSopenharmony_ciprivate: 48d95e75fdSopenharmony_ci /** 49d95e75fdSopenharmony_ci * determine the handling of urgent calls 50d95e75fdSopenharmony_ci * 51d95e75fdSopenharmony_ci * @param slotId 52d95e75fdSopenharmony_ci * @param formatString 53d95e75fdSopenharmony_ci * @param enabled 54d95e75fdSopenharmony_ci * @return int32_t 55d95e75fdSopenharmony_ci */ 56d95e75fdSopenharmony_ci int32_t IsEmergencyCallProcessing(int32_t slotId, const std::string &formatString, bool &enabled); 57d95e75fdSopenharmony_ci}; 58d95e75fdSopenharmony_ci} // namespace Telephony 59d95e75fdSopenharmony_ci} // namespace OHOS 60d95e75fdSopenharmony_ci#endif // TELEPHONY_CELLULAR_CALL_EMERGENCY_UTILS_H 61