1 /* 2 * Copyright (C) 2022-2023 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_IMS_CORE_SERVICE_INTERFACE_H 17 #define TELEPHONY_IMS_CORE_SERVICE_INTERFACE_H 18 19 #include "iremote_broker.h" 20 #include "ims_core_service_types.h" 21 #include "ims_core_service_callback_interface.h" 22 23 namespace OHOS { 24 namespace Telephony { 25 enum ImsServiceProxyType { 26 PROXY_IMS_CALL = 0, 27 PROXY_IMS_SMS = 1, 28 PROXY_IMS_DCSERVICE = 2, 29 }; 30 class ImsCoreServiceInterface : public IRemoteBroker { 31 public: 32 /** 33 * GetImsRegistrationStatus 34 * 35 * @param slotId 36 * @return Returns TELEPHONY_SUCCESS on success, others on failure. 37 */ 38 virtual int32_t GetImsRegistrationStatus(int32_t slotId) = 0; 39 40 /** 41 * Register CallBack 42 * 43 * @param sptr<ImsCallback> 44 * @return Returns TELEPHONY_SUCCESS on success, others on failure. 45 */ 46 virtual int32_t RegisterImsCoreServiceCallback(const sptr<ImsCoreServiceCallbackInterface> &callback) = 0; 47 48 /** 49 * GetProxyObjectPtr 50 * 51 * @brief get callManager proxy object ptr 52 * @param proxyType[in], proxy type 53 * @return Returns nullptr on failure, others on success. 54 */ 55 virtual sptr<IRemoteObject> GetProxyObjectPtr(ImsServiceProxyType proxyType) = 0; 56 57 /** 58 * GetPhoneNumberFromIMPU 59 * 60 * @brief get the telephone number form Network IMPU 61 * @param slotId[in], the slot id 62 * @param phoneNumber[out], the telephone number 63 * @return Returns TELEPHONY_SUCCESS on success, others on failure. 64 */ 65 virtual int32_t GetPhoneNumberFromIMPU(int32_t slotId, std::string &phoneNumber) = 0; 66 67 public: 68 DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Telephony.ImsCoreServiceInterface"); 69 }; 70 } // namespace Telephony 71 } // namespace OHOS 72 73 #endif // TELEPHONY_IMS_CORE_SERVICE_INTERFACE_H 74