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 "datashare_helper.h"
23 #include "datashare_predicates.h"
24 #include "i_sms_service_interface.h"
25 #include "securec.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 TestSendMms(const sptr<ISmsServiceInterface> &smsService) const;
37     void TestSendLongText(const sptr<ISmsServiceInterface> &smsService) const;
38     void TestSetSmscAddr(const sptr<ISmsServiceInterface> &smsService) const;
39     void TestGetSmscAddr(const sptr<ISmsServiceInterface> &smsService) const;
40     void TestAddSimMessage(const sptr<ISmsServiceInterface> &smsService) const;
41     void TestDelSimMessage(const sptr<ISmsServiceInterface> &smsService) const;
42     void TestUpdateSimMessage(const sptr<ISmsServiceInterface> &smsService) const;
43     void TestGetAllSimMessages(const sptr<ISmsServiceInterface> &smsService) const;
44     void TestEnableCBRangeConfig(const sptr<ISmsServiceInterface> &smsService) const;
45     void TestDisableCBRangeConfig(const sptr<ISmsServiceInterface> &smsService) const;
46     void TestEnableCBConfig(const sptr<ISmsServiceInterface> &smsService) const;
47     void TestDisableCBConfig(const sptr<ISmsServiceInterface> &smsService) const;
48     void TestSetDefaultSmsSlotId(const sptr<ISmsServiceInterface> &smsService) const;
49     void TestGetDefaultSmsSlotId(const sptr<ISmsServiceInterface> &smsService) const;
50     void TestSplitMessage(const sptr<ISmsServiceInterface> &smsService) const;
51     void TestGetSmsSegmentsInfo(const sptr<ISmsServiceInterface> &smsService) const;
52     void TestIsImsSmsSupported(const sptr<ISmsServiceInterface> &smsService) const;
53     void TestSetImsSmsConfig(const sptr<ISmsServiceInterface> &smsService) const;
54     void TestGetImsShortMessageFormat(const sptr<ISmsServiceInterface> &smsService) const;
55     void TestAddBlockPhone() const;
56     void TestRemoveBlockPhone() const;
57     void TestHasSmsCapability(const sptr<ISmsServiceInterface> &smsService) const;
58 
59 private:
60     std::shared_ptr<DataShare::DataShareHelper> CreateDataAHelper() const;
61 };
62 } // namespace Telephony
63 } // namespace OHOS
64 #endif