1 /* 2 * Copyright (C) 2022 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 enum { 32 /****************** core basic ******************/ 33 IMS_GET_REGISTRATION_STATUS = 0, 34 35 /****************** callback ******************/ 36 IMS_REGISTER_CALLBACK = 100, 37 IMS_GET_PROXY_OBJECT_PTR, 38 }; 39 40 /** 41 * GetImsRegistrationStatus 42 * 43 * @param slotId 44 * @return Returns TELEPHONY_SUCCESS on success, others on failure. 45 */ 46 virtual int32_t GetImsRegistrationStatus(int32_t slotId) = 0; 47 48 /** 49 * Register CallBack 50 * 51 * @param sptr<ImsCallback> 52 * @return Returns TELEPHONY_SUCCESS on success, others on failure. 53 */ 54 virtual int32_t RegisterImsCoreServiceCallback(const sptr<ImsCoreServiceCallbackInterface> &callback) = 0; 55 56 /** 57 * GetProxyObjectPtr 58 * 59 * @brief get callManager proxy object ptr 60 * @param proxyType[in], proxy type 61 * @return Returns nullptr on failure, others on success. 62 */ 63 virtual sptr<IRemoteObject> GetProxyObjectPtr(ImsServiceProxyType proxyType) = 0; 64 65 public: 66 DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Telephony.ImsCoreServiceInterface"); 67 }; 68 } // namespace Telephony 69 } // namespace OHOS 70 71 #endif // TELEPHONY_IMS_CORE_SERVICE_INTERFACE_H 72