• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 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 #pragma clang diagnostic push
19 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
20 #include <libradiocompat/RadioNetwork.h>
21 #pragma clang diagnostic pop
22 
23 namespace cf::ril {
24 
25 class RefRadioNetwork : public android::hardware::radio::compat::RadioNetwork {
26     ::aidl::android::hardware::radio::network::UsageSetting mUsageSetting =
27             ::aidl::android::hardware::radio::network::UsageSetting::VOICE_CENTRIC;
28     // As per the specs, the default is true.
29     bool mIsCellularIdentifierTransparencyEnabled = true;
30     bool mIsCipheringTransparencyEnabled = true;
31 
32   public:
33     using android::hardware::radio::compat::RadioNetwork::RadioNetwork;
34 
35     ::ndk::ScopedAStatus setUsageSetting(
36             int32_t serial,
37             ::aidl::android::hardware::radio::network::UsageSetting usageSetting) override;
38     ::ndk::ScopedAStatus getUsageSetting(int32_t serial) override;
39 
40     ::ndk::ScopedAStatus setEmergencyMode(
41             int32_t serial,
42             ::aidl::android::hardware::radio::network::EmergencyMode emergencyMode) override;
43 
44     ::ndk::ScopedAStatus triggerEmergencyNetworkScan(
45             int32_t serial,
46             const ::aidl::android::hardware::radio::network::EmergencyNetworkScanTrigger& request)
47             override;
48 
49     ::ndk::ScopedAStatus exitEmergencyMode(int32_t serial) override;
50 
51     ::ndk::ScopedAStatus cancelEmergencyNetworkScan(int32_t serial, bool resetScan) override;
52 
53     ::ndk::ScopedAStatus isN1ModeEnabled(int32_t serial) override;
54 
55     ::ndk::ScopedAStatus setN1ModeEnabled(int32_t serial, bool enable) override;
56 
57     ::ndk::ScopedAStatus setNullCipherAndIntegrityEnabled(int32_t serial, bool enabled) override;
58 
59     ::ndk::ScopedAStatus isNullCipherAndIntegrityEnabled(int32_t serial) override;
60 
61     ::ndk::ScopedAStatus setCellularIdentifierTransparencyEnabled(int32_t serial, bool enabled) override;
62 
63     ::ndk::ScopedAStatus isCellularIdentifierTransparencyEnabled(int32_t serial) override;
64 
65     ::ndk::ScopedAStatus setSecurityAlgorithmsUpdatedEnabled(int32_t serial, bool enabled) override;
66 
67     ::ndk::ScopedAStatus isSecurityAlgorithmsUpdatedEnabled(int32_t serial) override;
68 };
69 
70 }  // namespace cf::ril
71