• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 OHOS_RIL_INTERFACE_TEST_H
17 #define OHOS_RIL_INTERFACE_TEST_H
18 
19 #include "cmath"
20 #include "cstdio"
21 #include "hdf_base.h"
22 #include "hdf_log.h"
23 #include "ril_callback_test.h"
24 #include "securec.h"
25 #include "stdlib.h"
26 #include "unistd.h"
27 namespace OHOS {
28 namespace Telephony {
29 class RilInterfaceTest {
30 public:
31     void GetImeiStressTest(int32_t slotId);
32     void RilCmDialStressTest(int32_t slotId);
33     void SetRadioStateStressTest(int32_t slotId);
34     void GetCallListTest(int32_t slotId);
35     void RilCmDialTest(int32_t slotId);
36     void HangupTest(int32_t slotId);
37     void RejectTest(int32_t slotId);
38     void AnswerCallTest(int32_t slotId);
39     void HoldCallTest(int32_t slotId);
40     void UnHoldCallTest(int32_t slotId);
41     void SwitchCallTest(int32_t slotId);
42     void RilCmJoinCallTest(int32_t slotId);
43     void RilCmSplitCallTest(int32_t slotId);
44     void CallSupplementTest(int32_t slotId);
45     void SendDtmfTest(int32_t slotId);
46     void StartDtmfTest(int32_t slotId);
47     void StopDtmfTest(int32_t slotId);
48     void SetUssdCusdTest(int32_t slotId);
49     void GetUssdCusdTest(int32_t slotId);
50     void SetMuteTest(int32_t slotId);
51     void GetMuteTest(int32_t slotId);
52     void GetEmergencyListTest(int32_t slotId);
53     void SetEmergencyCallListTest(int32_t slotId);
54     void GetFailReasonTest(int32_t slotId);
55     void SetBarringPasswordTest(int32_t slotId);
56     void IccRilSimIoForAppTest(int32_t slotId);
57     void GetRilCmImsiForAppTest(int32_t slotId);
58     void GetRilCmSignalIntensityTest(int32_t slotId);
59     void GetRilCmIccCardStatusTest(int32_t slotId);
60     void GetRilCmCsRegStatusTest(int32_t slotId);
61     void GetRilCmPsRegStatusTest(int32_t slotId);
62     void GetRilCmOperatorTest(int32_t slotId);
63     void SendRilCmSmsTest(int32_t slotId);
64     void SendRilCmSmsMoreModeTest(int32_t slotId);
65     void SendSmsAckTest(int32_t slotId);
66     void GetSmscAddrTest(int32_t slotId);
67     void SetSmscAddrTest(int32_t slotId);
68     void SetRadioStateTest(int32_t slotId);
69     void GetRadioStateTest(int32_t slotId);
70     void GetImeiTest(int32_t slotId);
71     void GetRilCmCellInfoListTest(int32_t slotId);
72     void GetRilCurrentCellInfoTest(int32_t slotId);
73     void GetRilNetworkSearchInfoTest(int32_t slotId);
74     void GetRilNetworkSelectionModeTest(int32_t slotId);
75     void GetRilPreferredNetwrokTest(int32_t slotId);
76     void GetPhysicalChannelConfigTest(int32_t slotId);
77     void GetRilImeiTest(int32_t slotId);
78     void ShutDownTest(int32_t slotId);
79     void GetMeidTest(int32_t slotId);
80     void GetVoiceRadioTechnologyTest(int32_t slotId);
81     void GetBasebandVersionTest(int32_t slotId);
82     void SendDataPerformanceModeTest(int32_t slotId);
83     void SendDataSleepModeTest(int32_t slotId);
84     void SetRilPreferredNetworkTest(int32_t slotId);
85     void SetRilNetworkSelectionModeTest(int32_t slotId);
86     void SetRilLocationUpdateTest(int32_t slotId);
87     void SetRilNotificationFilterTest(int32_t slotId);
88     void SetRilDeviceStateTest(int32_t slotId);
89     void ActivatePdpContextTest(int32_t slotId);
90     void DeactivatePdpContextTest(int32_t slotId);
91     void GetPdpContextListTest(int32_t slotId);
92     void SetInitialApnTest(int32_t slotId);
93     void SetDataProfileInfoTest(int32_t slotId);
94     void SetDataPermittedTest(int32_t slotId);
95     void SetLinkBandwidthReportingRuleTest(int32_t slotId);
96     void OnProcessInput(int32_t what);
97     void OnStressInput(int32_t what);
98     void SimOpenLogicalChannelTest(int32_t slotId);
99     void SimCloseLogicalChannelTest(int32_t slotId);
100     void SimTransmitApduLogicalChannelTest(int32_t slotId);
101     void SimAuthenticationTest(int32_t slotId);
102     void SetActiveSimTest(int32_t slotId);
103     void SimTransmitApduBasicChannelTest(int32_t slotId);
104     void UnlockSimLockTest(int32_t slotId);
105     void GetLinkBandwidthInfoTest(int32_t slotId);
106     void UnLockPINTest(int32_t slotId);
107     void UnLockPIN2Test(int32_t slotId);
108     void UnLockPUKTest(int32_t slotId);
109     void UnLockPUK2Test(int32_t slotId);
110     void ChangeSimPasswordTest(int32_t slotId);
111     void SetSimLockTest(int32_t slotId);
112     void GetSimLockStatusTest(int32_t slotId);
113     void SendTerminalResponseCmdTest(int32_t slotId);
114     void SendEnvelopeCmdTest(int32_t slotId);
115     void SendCallSetupRequestResultTest(int32_t slotId);
116     void SimStkIsReadyTest(int32_t slotId);
117     void OnInitInterface();
118     void OnInitStressInterface();
119     void OnInitCallProcessInterface();
120     void OnInitSmsProcessInterface();
121     void OnInitSimProcessInterface();
122     void OnInitDataProcessInterface();
123     void OnInitNetworkProcessInterface();
124     void OnInitModemProcessInterface();
125     void OnInitProcessInterface();
126     int32_t GetSerialId();
127     void InputTransmitApduChannelParam(OHOS::HDI::Ril::V1_0::ApduSimIORequestInfo &reqInfo);
128 
129 private:
130     using RilInterfaceTestTestFun = void (RilInterfaceTest::*)(int32_t slotId);
131     std::map<uint32_t, RilInterfaceTestTestFun> memberFuncMap_;
132     std::map<uint32_t, RilInterfaceTestTestFun> stressMemberFuncMap_;
133 };
134 
135 } // namespace Telephony
136 } // namespace OHOS
137 #endif // OHOS_RIL_INTERFACE_TEST_H
138