xref: /aosp_15_r20/hardware/interfaces/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h (revision 4d7e907c777eeecc4c5bd7cf640a754fac206ff7)
1 /*
2  * Copyright (C) 2021 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
18 #include "RadioCompatBase.h"
19 
20 #include <aidl/android/hardware/radio/network/BnRadioNetwork.h>
21 #include <aidl/android/hardware/radio/network/IRadioNetwork.h>
22 
23 // using namespace aidl::android::hardware::radio::network;
24 
25 namespace android::hardware::radio::compat {
26 
27 class RadioNetwork : public RadioCompatBase,
28                      public aidl::android::hardware::radio::network::BnRadioNetwork {
29     ::ndk::ScopedAStatus getAllowedNetworkTypesBitmap(int32_t serial) override;
30     ::ndk::ScopedAStatus getAvailableBandModes(int32_t serial) override;
31     ::ndk::ScopedAStatus getAvailableNetworks(int32_t serial) override;
32     ::ndk::ScopedAStatus getBarringInfo(int32_t serial) override;
33     ::ndk::ScopedAStatus getCdmaRoamingPreference(int32_t serial) override;
34     ::ndk::ScopedAStatus getCellInfoList(int32_t serial) override;
35     ::ndk::ScopedAStatus getDataRegistrationState(int32_t serial) override;
36     ::ndk::ScopedAStatus getImsRegistrationState(int32_t serial) override;
37     ::ndk::ScopedAStatus getNetworkSelectionMode(int32_t serial) override;
38     ::ndk::ScopedAStatus getOperator(int32_t serial) override;
39     ::ndk::ScopedAStatus getSignalStrength(int32_t serial) override;
40     ::ndk::ScopedAStatus getSystemSelectionChannels(int32_t serial) override;
41     ::ndk::ScopedAStatus getVoiceRadioTechnology(int32_t serial) override;
42     ::ndk::ScopedAStatus getVoiceRegistrationState(int32_t serial) override;
43     ::ndk::ScopedAStatus isNrDualConnectivityEnabled(int32_t serial) override;
44     ::ndk::ScopedAStatus responseAcknowledgement() override;
45     ::ndk::ScopedAStatus setAllowedNetworkTypesBitmap(int32_t serial,
46                                                       int32_t networkTypeBitmap) override;
47     ::ndk::ScopedAStatus setBandMode(
48             int32_t serial, ::aidl::android::hardware::radio::network::RadioBandMode mode) override;
49     ::ndk::ScopedAStatus setBarringPassword(int32_t serial, const std::string& facility,
50                                             const std::string& oldPassword,
51                                             const std::string& newPassword) override;
52     ::ndk::ScopedAStatus setCdmaRoamingPreference(
53             int32_t serial,
54             ::aidl::android::hardware::radio::network::CdmaRoamingType type) override;
55     ::ndk::ScopedAStatus setCellInfoListRate(int32_t serial, int32_t rate) override;
56     ::ndk::ScopedAStatus setIndicationFilter(int32_t serial, int32_t indicationFilter) override;
57     ::ndk::ScopedAStatus setLinkCapacityReportingCriteria(
58             int32_t serial, int32_t hysteresisMs, int32_t hysteresisDlKbps,
59             int32_t hysteresisUlKbps, const std::vector<int32_t>& thresholdsDownlinkKbps,
60             const std::vector<int32_t>& thresholdsUplinkKbps,
61             ::aidl::android::hardware::radio::AccessNetwork accessNetwork) override;
62     ::ndk::ScopedAStatus setLocationUpdates(int32_t serial, bool enable) override;
63     ::ndk::ScopedAStatus setNetworkSelectionModeAutomatic(int32_t serial) override;
64     ::ndk::ScopedAStatus setNetworkSelectionModeManual(
65             int32_t serial, const std::string& operatorNumeric,
66             ::aidl::android::hardware::radio::AccessNetwork ran) override;
67     ::ndk::ScopedAStatus setNrDualConnectivityState(
68             int32_t serial,
69             ::aidl::android::hardware::radio::network::NrDualConnectivityState nrSt) override;
70     ::ndk::ScopedAStatus setResponseFunctions(
71             const std::shared_ptr<::aidl::android::hardware::radio::network::IRadioNetworkResponse>&
72                     radioNetworkResponse,
73             const std::shared_ptr<
74                     ::aidl::android::hardware::radio::network::IRadioNetworkIndication>&
75                     radioNetworkIndication) override;
76     ::ndk::ScopedAStatus setSignalStrengthReportingCriteria(
77             int32_t serial,
78             const std::vector<::aidl::android::hardware::radio::network::SignalThresholdInfo>&
79                     signalThresholdInfos) override;
80     ::ndk::ScopedAStatus setSuppServiceNotifications(int32_t serial, bool enable) override;
81     ::ndk::ScopedAStatus setSystemSelectionChannels(
82             int32_t serial, bool specifyChannels,
83             const std::vector<::aidl::android::hardware::radio::network::RadioAccessSpecifier>&
84                     specifiers) override;
85     ::ndk::ScopedAStatus startNetworkScan(
86             int32_t serial,
87             const ::aidl::android::hardware::radio::network::NetworkScanRequest& request) override;
88     ::ndk::ScopedAStatus stopNetworkScan(int32_t serial) override;
89     ::ndk::ScopedAStatus supplyNetworkDepersonalization(int32_t serial,
90                                                         const std::string& netPin) override;
91     ::ndk::ScopedAStatus setUsageSetting(
92             int32_t serial,
93             ::aidl::android::hardware::radio::network::UsageSetting usageSetting) override;
94     ::ndk::ScopedAStatus getUsageSetting(int32_t serial) override;
95 
96     ::ndk::ScopedAStatus setEmergencyMode(
97             int32_t serial,
98             const ::aidl::android::hardware::radio::network::EmergencyMode emergencyMode) override;
99     ::ndk::ScopedAStatus triggerEmergencyNetworkScan(
100             int32_t serial,
101             const ::aidl::android::hardware::radio::network::EmergencyNetworkScanTrigger&
102                     scanTrigger) override;
103     ::ndk::ScopedAStatus cancelEmergencyNetworkScan(int32_t serial, bool resetScan) override;
104     ::ndk::ScopedAStatus exitEmergencyMode(int32_t serial) override;
105     ::ndk::ScopedAStatus isN1ModeEnabled(int32_t serial) override;
106     ::ndk::ScopedAStatus setN1ModeEnabled(int32_t serial, bool enable) override;
107 
108     ::ndk::ScopedAStatus setNullCipherAndIntegrityEnabled(int32_t serial, bool enabled) override;
109     ::ndk::ScopedAStatus isNullCipherAndIntegrityEnabled(int32_t serial) override;
110     ::ndk::ScopedAStatus isCellularIdentifierTransparencyEnabled(int32_t serial) override;
111     ::ndk::ScopedAStatus setCellularIdentifierTransparencyEnabled(int32_t serial,
112                                                                   bool enabled) override;
113 
114     ::ndk::ScopedAStatus setSecurityAlgorithmsUpdatedEnabled(int32_t serial, bool enabled) override;
115     ::ndk::ScopedAStatus isSecurityAlgorithmsUpdatedEnabled(int32_t serial) override;
116 
117     ::ndk::ScopedAStatus setSatellitePlmn(
118             int32_t serial, int32_t simSlot, const std::vector<std::string>& carrierPlmnArray,
119             const std::vector<std::string>& allSatellitePlmnArray) override;
120     ::ndk::ScopedAStatus setSatelliteEnabledForCarrier(int32_t serial, int32_t simSlot,
121                                                        bool satelliteEnabled) override;
122     ::ndk::ScopedAStatus isSatelliteEnabledForCarrier(int32_t serial, int32_t simSlot) override;
123 
124   protected:
125     std::shared_ptr<::aidl::android::hardware::radio::network::IRadioNetworkResponse> respond();
126 
127   public:
128     using RadioCompatBase::RadioCompatBase;
129 };
130 
131 }  // namespace android::hardware::radio::compat
132