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