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 TELEPHONY_CALL_FFI_H 17 #define TELEPHONY_CALL_FFI_H 18 19 #include "ffi_remote_data.h" 20 #include "telephony_call_utils.h" 21 #include "telephony_call_impl.h" 22 23 namespace OHOS { 24 namespace Telephony { 25 extern "C" { 26 FFI_EXPORT bool FfiOHOSTelephonyCallIsRinging(int32_t *errCode); 27 28 FFI_EXPORT char* FfiOHOSTelephonyCallFormatPhoneNumberToE164(char *cPhoneNumber, char *cCountryCode, 29 int32_t *errCode); 30 31 FFI_EXPORT void FfiOHOSTelephonyCallInit(); 32 33 FFI_EXPORT int32_t FfiOHOSTelephonyCallDialCall(char *phoneNumber, DialCallOptions options); 34 35 FFI_EXPORT bool FfiOHOSTelephonyCallHasVoiceCapability(); 36 37 FFI_EXPORT char* FfiOHOSTelephonyCallFormatPhoneNumber(char *phoneNumber, char *countryCode, int32_t *errCode); 38 39 FFI_EXPORT int32_t FfiOHOSTelephonyCallGetCallState(); 40 41 FFI_EXPORT bool FfiOHOSTelephonyCallHasCall(); 42 43 FFI_EXPORT bool FfiOHOSTelephonyCallIsEmergencyPhoneNumber(char *phoneNumber, int32_t slotId, int32_t* errCode); 44 45 FFI_EXPORT int32_t FfiOHOSTelephonyCallMakeCall(char* number); 46 } 47 } 48 } 49 50 #endif