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_SMS_CALLBACK_INTERFACE_H__ 16 #define __MOCK_IMS_SMS_CALLBACK_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 MockImsSmsCallback : public ImsSmsCallbackInterface { 25 public: ImsSendMessageResponse(int32_t slotId,const SendSmsResultInfo & result)26 int32_t ImsSendMessageResponse(int32_t slotId, const SendSmsResultInfo &result) override 27 { 28 return retImsSendMessageResponse1; 29 } ImsSendMessageResponse(int32_t slotId,const RadioResponseInfo & info)30 int32_t ImsSendMessageResponse(int32_t slotId, const RadioResponseInfo &info) override 31 { 32 return retImsSendMessageResponse2; 33 } ImsSetSmsConfigResponse(int32_t slotId,const RadioResponseInfo & info)34 int32_t ImsSetSmsConfigResponse(int32_t slotId, const RadioResponseInfo &info) override 35 { 36 return retImsSetSmsConfigResponse; 37 } ImsGetSmsConfigResponse(int32_t slotId,int32_t imsSmsConfig)38 int32_t ImsGetSmsConfigResponse(int32_t slotId, int32_t imsSmsConfig) override 39 { 40 return retImsGetSmsConfigResponse1; 41 } ImsGetSmsConfigResponse(int32_t slotId,const RadioResponseInfo & info)42 int32_t ImsGetSmsConfigResponse(int32_t slotId, const RadioResponseInfo &info) override 43 { 44 return retImsGetSmsConfigResponse2; 45 } AsObject()46 sptr<IRemoteObject> AsObject() override 47 { 48 return retRemoteObject; 49 } 50 public: 51 int32_t retImsSendMessageResponse1; 52 int32_t retImsSendMessageResponse2; 53 int32_t retImsSetSmsConfigResponse; 54 int32_t retImsGetSmsConfigResponse1; 55 int32_t retImsGetSmsConfigResponse2; 56 IRemoteObject* retRemoteObject; 57 }; 58 } 59 } 60 #endif