1 /* 2 * Copyright (C) 2024-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 #ifndef __MOCK_IMS_CORE_SERVICE_INTERFACE_H__ 16 #define __MOCK_IMS_CORE_SERVICE_INTERFACE_H__ 17 #include "ims_sms_client.h" 18 #include "ims_sms_proxy.h" 19 #include "ims_sms_callback_stub.h" 20 21 namespace OHOS { 22 namespace Telephony { 23 24 class MockImsCoreService : public ImsCoreServiceInterface { 25 public: GetImsRegistrationStatus(int32_t slotId)26 int32_t GetImsRegistrationStatus(int32_t slotId) override 27 { 28 return retGetImsRegistrationStatus; 29 } RegisterImsCoreServiceCallback(const sptr<ImsCoreServiceCallbackInterface> & callback)30 int32_t RegisterImsCoreServiceCallback(const sptr<ImsCoreServiceCallbackInterface> &callback) override 31 { 32 return retRegisterImsCoreServiceCallback; 33 } GetProxyObjectPtr(ImsServiceProxyType proxyType)34 sptr<IRemoteObject> GetProxyObjectPtr(ImsServiceProxyType proxyType) override 35 { 36 return retGetProxyObjectPtr; 37 } GetPhoneNumberFromIMPU(int32_t slotId,std::string & phoneNumber)38 int32_t GetPhoneNumberFromIMPU(int32_t slotId, std::string &phoneNumber) override 39 { 40 return retGetPhoneNumberFromIMPU; 41 } AsObject()42 sptr<IRemoteObject> AsObject() override 43 { 44 return retRemoteObject; 45 } 46 public: 47 int32_t retGetImsRegistrationStatus; 48 int32_t retRegisterImsCoreServiceCallback; 49 IRemoteObject* retGetProxyObjectPtr; 50 int32_t retGetPhoneNumberFromIMPU; 51 IRemoteObject* retRemoteObject; 52 }; 53 } 54 } 55 #endif