111fccf17Sopenharmony_ci/* 211fccf17Sopenharmony_ci * Copyright (C) 2022 Huawei Device Co., Ltd. 311fccf17Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 411fccf17Sopenharmony_ci * you may not use this file except in compliance with the License. 511fccf17Sopenharmony_ci * You may obtain a copy of the License at 611fccf17Sopenharmony_ci * 711fccf17Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 811fccf17Sopenharmony_ci * 911fccf17Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1011fccf17Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1111fccf17Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1211fccf17Sopenharmony_ci * See the License for the specific language governing permissions and 1311fccf17Sopenharmony_ci * limitations under the License. 1411fccf17Sopenharmony_ci */ 1511fccf17Sopenharmony_ci 1611fccf17Sopenharmony_ci#ifndef OHOS_RIL_INTERFACE_TEST_H 1711fccf17Sopenharmony_ci#define OHOS_RIL_INTERFACE_TEST_H 1811fccf17Sopenharmony_ci 1911fccf17Sopenharmony_ci#include "cmath" 2011fccf17Sopenharmony_ci#include "cstdio" 2111fccf17Sopenharmony_ci#include "hdf_base.h" 2211fccf17Sopenharmony_ci#include "hdf_log.h" 2311fccf17Sopenharmony_ci#include "ril_callback_test.h" 2411fccf17Sopenharmony_ci#include "securec.h" 2511fccf17Sopenharmony_ci#include "stdlib.h" 2611fccf17Sopenharmony_ci#include "unistd.h" 2711fccf17Sopenharmony_cinamespace OHOS { 2811fccf17Sopenharmony_cinamespace Telephony { 2911fccf17Sopenharmony_ciclass RilInterfaceTest { 3011fccf17Sopenharmony_cipublic: 3111fccf17Sopenharmony_ci void GetImeiStressTest(int32_t slotId); 3211fccf17Sopenharmony_ci void GetImeiSvStressTest(int32_t slotId); 3311fccf17Sopenharmony_ci void RilCmDialStressTest(int32_t slotId); 3411fccf17Sopenharmony_ci void SetRadioStateStressTest(int32_t slotId); 3511fccf17Sopenharmony_ci void GetCallListTest(int32_t slotId); 3611fccf17Sopenharmony_ci void RilCmDialTest(int32_t slotId); 3711fccf17Sopenharmony_ci void HangupTest(int32_t slotId); 3811fccf17Sopenharmony_ci void RejectTest(int32_t slotId); 3911fccf17Sopenharmony_ci void AnswerCallTest(int32_t slotId); 4011fccf17Sopenharmony_ci void HoldCallTest(int32_t slotId); 4111fccf17Sopenharmony_ci void UnHoldCallTest(int32_t slotId); 4211fccf17Sopenharmony_ci void SwitchCallTest(int32_t slotId); 4311fccf17Sopenharmony_ci void RilCmJoinCallTest(int32_t slotId); 4411fccf17Sopenharmony_ci void RilCmSplitCallTest(int32_t slotId); 4511fccf17Sopenharmony_ci void CallSupplementTest(int32_t slotId); 4611fccf17Sopenharmony_ci void SendDtmfTest(int32_t slotId); 4711fccf17Sopenharmony_ci void StartDtmfTest(int32_t slotId); 4811fccf17Sopenharmony_ci void StopDtmfTest(int32_t slotId); 4911fccf17Sopenharmony_ci void SetUssdCusdTest(int32_t slotId); 5011fccf17Sopenharmony_ci void GetUssdCusdTest(int32_t slotId); 5111fccf17Sopenharmony_ci void SetMuteTest(int32_t slotId); 5211fccf17Sopenharmony_ci void GetMuteTest(int32_t slotId); 5311fccf17Sopenharmony_ci void GetEmergencyListTest(int32_t slotId); 5411fccf17Sopenharmony_ci void SetEmergencyCallListTest(int32_t slotId); 5511fccf17Sopenharmony_ci void GetFailReasonTest(int32_t slotId); 5611fccf17Sopenharmony_ci void SetBarringPasswordTest(int32_t slotId); 5711fccf17Sopenharmony_ci void IccRilSimIoForAppTest(int32_t slotId); 5811fccf17Sopenharmony_ci void GetRilCmImsiForAppTest(int32_t slotId); 5911fccf17Sopenharmony_ci void GetRilCmSignalIntensityTest(int32_t slotId); 6011fccf17Sopenharmony_ci void GetRilCmIccCardStatusTest(int32_t slotId); 6111fccf17Sopenharmony_ci void GetRilCmCsRegStatusTest(int32_t slotId); 6211fccf17Sopenharmony_ci void GetRilCmPsRegStatusTest(int32_t slotId); 6311fccf17Sopenharmony_ci void GetRilCmOperatorTest(int32_t slotId); 6411fccf17Sopenharmony_ci void SendRilCmSmsTest(int32_t slotId); 6511fccf17Sopenharmony_ci void SendRilCmSmsMoreModeTest(int32_t slotId); 6611fccf17Sopenharmony_ci void SendSmsAckTest(int32_t slotId); 6711fccf17Sopenharmony_ci void GetSmscAddrTest(int32_t slotId); 6811fccf17Sopenharmony_ci void SetSmscAddrTest(int32_t slotId); 6911fccf17Sopenharmony_ci void SetRadioStateTest(int32_t slotId); 7011fccf17Sopenharmony_ci void GetRadioStateTest(int32_t slotId); 7111fccf17Sopenharmony_ci void GetImeiTest(int32_t slotId); 7211fccf17Sopenharmony_ci void GetImeiSvTest(int32_t slotId); 7311fccf17Sopenharmony_ci void GetRilCmCellInfoListTest(int32_t slotId); 7411fccf17Sopenharmony_ci void GetRilCurrentCellInfoTest(int32_t slotId); 7511fccf17Sopenharmony_ci void GetRilNetworkSearchInfoTest(int32_t slotId); 7611fccf17Sopenharmony_ci void GetRilNetworkSelectionModeTest(int32_t slotId); 7711fccf17Sopenharmony_ci void GetRilPreferredNetwrokTest(int32_t slotId); 7811fccf17Sopenharmony_ci void GetPhysicalChannelConfigTest(int32_t slotId); 7911fccf17Sopenharmony_ci void GetRilImeiTest(int32_t slotId); 8011fccf17Sopenharmony_ci void GetRilImeiSvTest(int32_t slotId); 8111fccf17Sopenharmony_ci void ShutDownTest(int32_t slotId); 8211fccf17Sopenharmony_ci void GetMeidTest(int32_t slotId); 8311fccf17Sopenharmony_ci void GetVoiceRadioTechnologyTest(int32_t slotId); 8411fccf17Sopenharmony_ci void GetBasebandVersionTest(int32_t slotId); 8511fccf17Sopenharmony_ci void SendDataPerformanceModeTest(int32_t slotId); 8611fccf17Sopenharmony_ci void SendDataSleepModeTest(int32_t slotId); 8711fccf17Sopenharmony_ci void SetRilPreferredNetworkTest(int32_t slotId); 8811fccf17Sopenharmony_ci void SetRilNetworkSelectionModeTest(int32_t slotId); 8911fccf17Sopenharmony_ci void SetRilLocationUpdateTest(int32_t slotId); 9011fccf17Sopenharmony_ci void SetRilNotificationFilterTest(int32_t slotId); 9111fccf17Sopenharmony_ci void SetRilDeviceStateTest(int32_t slotId); 9211fccf17Sopenharmony_ci void GetNrOptionModeTest(int32_t slotId); 9311fccf17Sopenharmony_ci void SetNrOptionModeTest(int32_t slotId); 9411fccf17Sopenharmony_ci void GetRrcConnectionStateTest(int32_t slotId); 9511fccf17Sopenharmony_ci void GetNrSsbIdTest(int32_t slotId); 9611fccf17Sopenharmony_ci void ActivatePdpContextTest(int32_t slotId); 9711fccf17Sopenharmony_ci void DeactivatePdpContextTest(int32_t slotId); 9811fccf17Sopenharmony_ci void GetPdpContextListTest(int32_t slotId); 9911fccf17Sopenharmony_ci void SetInitialApnTest(int32_t slotId); 10011fccf17Sopenharmony_ci void SetDataProfileInfoTest(int32_t slotId); 10111fccf17Sopenharmony_ci void SetDataPermittedTest(int32_t slotId); 10211fccf17Sopenharmony_ci void SetLinkBandwidthReportingRuleTest(int32_t slotId); 10311fccf17Sopenharmony_ci void OnProcessInput(int32_t what); 10411fccf17Sopenharmony_ci void OnStressInput(int32_t what); 10511fccf17Sopenharmony_ci void SimOpenLogicalChannelTest(int32_t slotId); 10611fccf17Sopenharmony_ci void SimCloseLogicalChannelTest(int32_t slotId); 10711fccf17Sopenharmony_ci void SimTransmitApduLogicalChannelTest(int32_t slotId); 10811fccf17Sopenharmony_ci void SimAuthenticationTest(int32_t slotId); 10911fccf17Sopenharmony_ci void SendSimMatchedOperatorInfoTest(int32_t slotId); 11011fccf17Sopenharmony_ci void SetActiveSimTest(int32_t slotId); 11111fccf17Sopenharmony_ci void SimTransmitApduBasicChannelTest(int32_t slotId); 11211fccf17Sopenharmony_ci void UnlockSimLockTest(int32_t slotId); 11311fccf17Sopenharmony_ci void GetLinkBandwidthInfoTest(int32_t slotId); 11411fccf17Sopenharmony_ci void GetLinkCapabilityTest(int32_t slotId); 11511fccf17Sopenharmony_ci void CleanAllConnectionsTest(int32_t slotId); 11611fccf17Sopenharmony_ci void UnLockPINTest(int32_t slotId); 11711fccf17Sopenharmony_ci void UnLockPIN2Test(int32_t slotId); 11811fccf17Sopenharmony_ci void UnLockPUKTest(int32_t slotId); 11911fccf17Sopenharmony_ci void UnLockPUK2Test(int32_t slotId); 12011fccf17Sopenharmony_ci void ChangeSimPasswordTest(int32_t slotId); 12111fccf17Sopenharmony_ci void SetSimLockTest(int32_t slotId); 12211fccf17Sopenharmony_ci void GetSimLockStatusTest(int32_t slotId); 12311fccf17Sopenharmony_ci void SendTerminalResponseCmdTest(int32_t slotId); 12411fccf17Sopenharmony_ci void SendEnvelopeCmdTest(int32_t slotId); 12511fccf17Sopenharmony_ci void SendCallSetupRequestResultTest(int32_t slotId); 12611fccf17Sopenharmony_ci void SimStkIsReadyTest(int32_t slotId); 12711fccf17Sopenharmony_ci void OnInitInterface(); 12811fccf17Sopenharmony_ci void OnInitStressInterface(); 12911fccf17Sopenharmony_ci void OnInitCallProcessInterface(); 13011fccf17Sopenharmony_ci void OnInitSmsProcessInterface(); 13111fccf17Sopenharmony_ci void OnInitSimProcessInterface(); 13211fccf17Sopenharmony_ci void OnInitDataProcessInterface(); 13311fccf17Sopenharmony_ci void OnInitNetworkProcessInterface(); 13411fccf17Sopenharmony_ci void OnInitModemProcessInterface(); 13511fccf17Sopenharmony_ci void OnInitProcessInterface(); 13611fccf17Sopenharmony_ci int32_t GetSerialId(); 13711fccf17Sopenharmony_ci void InputTransmitApduChannelParam(OHOS::HDI::Ril::V1_1::ApduSimIORequestInfo &reqInfo); 13811fccf17Sopenharmony_ci 13911fccf17Sopenharmony_ciprivate: 14011fccf17Sopenharmony_ci using RilInterfaceTestTestFun = void (RilInterfaceTest::*)(int32_t slotId); 14111fccf17Sopenharmony_ci std::map<uint32_t, RilInterfaceTestTestFun> memberFuncMap_; 14211fccf17Sopenharmony_ci std::map<uint32_t, RilInterfaceTestTestFun> stressMemberFuncMap_; 14311fccf17Sopenharmony_ci}; 14411fccf17Sopenharmony_ci 14511fccf17Sopenharmony_ci} // namespace Telephony 14611fccf17Sopenharmony_ci} // namespace OHOS 14711fccf17Sopenharmony_ci#endif // OHOS_RIL_INTERFACE_TEST_H 148