• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/data/BnRadioData.h>
21 
22 namespace android::hardware::radio::compat {
23 
24 class RadioData : public RadioCompatBase, public aidl::android::hardware::radio::data::BnRadioData {
25     ::ndk::ScopedAStatus allocatePduSessionId(int32_t serial) override;
26     ::ndk::ScopedAStatus cancelHandover(int32_t serial, int32_t callId) override;
27     ::ndk::ScopedAStatus deactivateDataCall(
28             int32_t serial, int32_t cid,
29             ::aidl::android::hardware::radio::data::DataRequestReason reason) override;
30     ::ndk::ScopedAStatus getDataCallList(int32_t serial) override;
31     ::ndk::ScopedAStatus getSlicingConfig(int32_t serial) override;
32     ::ndk::ScopedAStatus releasePduSessionId(int32_t serial, int32_t id) override;
33     ::ndk::ScopedAStatus responseAcknowledgement() override;
34     ::ndk::ScopedAStatus setDataAllowed(int32_t serial, bool allow) override;
35     ::ndk::ScopedAStatus setDataProfile(
36             int32_t serial,
37             const std::vector<::aidl::android::hardware::radio::data::DataProfileInfo>& profiles)
38             override;
39     ::ndk::ScopedAStatus setDataThrottling(
40             int32_t serial,
41             ::aidl::android::hardware::radio::data::DataThrottlingAction dataThrottlingAction,
42             int64_t completionDurationMillis) override;
43     ::ndk::ScopedAStatus setInitialAttachApn(
44             int32_t serial,
45             const std::optional<::aidl::android::hardware::radio::data::DataProfileInfo>& dpInfo)
46             override;
47     ::ndk::ScopedAStatus setResponseFunctions(
48             const std::shared_ptr<::aidl::android::hardware::radio::data::IRadioDataResponse>&
49                     radioDataResponse,
50             const std::shared_ptr<::aidl::android::hardware::radio::data::IRadioDataIndication>&
51                     radioDataIndication) override;
52     ::ndk::ScopedAStatus setupDataCall(
53             int32_t serial, ::aidl::android::hardware::radio::AccessNetwork accessNetwork,
54             const ::aidl::android::hardware::radio::data::DataProfileInfo& dataProfileInfo,
55             bool roamingAllowed, ::aidl::android::hardware::radio::data::DataRequestReason reason,
56             const std::vector<::aidl::android::hardware::radio::data::LinkAddress>& addresses,
57             const std::vector<std::string>& dnses, int32_t pduSessionId,
58             const std::optional<::aidl::android::hardware::radio::data::SliceInfo>& sliceInfo,
59             bool matchAllRuleAllowed) override;
60     ::ndk::ScopedAStatus startHandover(int32_t serial, int32_t callId) override;
61     ::ndk::ScopedAStatus startKeepalive(
62             int32_t serial,
63             const ::aidl::android::hardware::radio::data::KeepaliveRequest& keepalive) override;
64     ::ndk::ScopedAStatus stopKeepalive(int32_t serial, int32_t sessionHandle) override;
65 
66   protected:
67     std::shared_ptr<::aidl::android::hardware::radio::data::IRadioDataResponse> respond();
68 
69   public:
70     using RadioCompatBase::RadioCompatBase;
71 };
72 
73 }  // namespace android::hardware::radio::compat
74