1 /* 2 * Copyright (C) 2021 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 GSM_SMS_SENDER_TEST_H 17 #define GSM_SMS_SENDER_TEST_H 18 19 #include <cstring> 20 #include <iostream> 21 22 #include "securec.h" 23 24 #include "data_ability_helper.h" 25 #include "i_sms_service_interface.h" 26 #include "sms_service_proxy.h" 27 #include "system_ability_definition.h" 28 29 namespace OHOS { 30 namespace Telephony { 31 class GsmSmsSenderTest { 32 public: 33 void TestGsmSendShortData(const sptr<ISmsServiceInterface> &smsService) const; 34 void TestGsmSendLongData(const sptr<ISmsServiceInterface> &smsService) const; 35 void TestSendShortText(const sptr<ISmsServiceInterface> &smsService) const; 36 void TestSendLongText(const sptr<ISmsServiceInterface> &smsService) const; 37 void TestSetSmscAddr(const sptr<ISmsServiceInterface> &smsService) const; 38 void TestGetSmscAddr(const sptr<ISmsServiceInterface> &smsService) const; 39 void TestAddSimMessage(const sptr<ISmsServiceInterface> &smsService) const; 40 void TestDelSimMessage(const sptr<ISmsServiceInterface> &smsService) const; 41 void TestUpdateSimMessage(const sptr<ISmsServiceInterface> &smsService) const; 42 void TestGetAllSimMessages(const sptr<ISmsServiceInterface> &smsService) const; 43 void TestEnableCBRangeConfig(const sptr<ISmsServiceInterface> &smsService) const; 44 void TestDisableCBRangeConfig(const sptr<ISmsServiceInterface> &smsService) const; 45 void TestEnableCBConfig(const sptr<ISmsServiceInterface> &smsService) const; 46 void TestDisableCBConfig(const sptr<ISmsServiceInterface> &smsService) const; 47 void TestSetDefaultSmsSlotId(const sptr<ISmsServiceInterface> &smsService) const; 48 void TestGetDefaultSmsSlotId(const sptr<ISmsServiceInterface> &smsService) const; 49 void TestSplitMessage(const sptr<ISmsServiceInterface> &smsService) const; 50 void TestGetSmsSegmentsInfo(const sptr<ISmsServiceInterface> &smsService) const; 51 void TestIsImsSmsSupported(const sptr<ISmsServiceInterface> &smsService) const; 52 void TestSetImsSmsConfig(const sptr<ISmsServiceInterface> &smsService) const; 53 void TestGetImsShortMessageFormat(const sptr<ISmsServiceInterface> &smsService) const; 54 void TestAddBlockPhone() const; 55 void TestRemoveBlockPhone() const; 56 void TestHasSmsCapability(const sptr<ISmsServiceInterface> &smsService) const; 57 58 private: 59 std::shared_ptr<AppExecFwk::DataAbilityHelper> CreateDataAHelper() const; 60 }; 61 } // namespace Telephony 62 } // namespace OHOS 63 #endif