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 "GuaranteedCallback.h"
19 
20 #include <aidl/android/hardware/radio/config/IRadioConfigIndication.h>
21 #include <android/hardware/radio/config/1.2/IRadioConfigIndication.h>
22 
23 namespace android::hardware::radio::compat {
24 
25 class RadioConfigIndication : public config::V1_2::IRadioConfigIndication {
26     GuaranteedCallback<aidl::android::hardware::radio::config::IRadioConfigIndication,
27                        aidl::android::hardware::radio::config::IRadioConfigIndicationDefault, true>
28             mCallback;
29 
30     Return<void> simSlotsStatusChanged(
31             V1_0::RadioIndicationType type,
32             const hidl_vec<config::V1_0::SimSlotStatus>& slotStatus) override;
33     Return<void> simSlotsStatusChanged_1_2(
34             V1_0::RadioIndicationType type,
35             const hidl_vec<config::V1_2::SimSlotStatus>& slotStatus) override;
36 
37   public:
38     void setResponseFunction(
39             std::shared_ptr<aidl::android::hardware::radio::config::IRadioConfigIndication> cb);
40 
41     std::shared_ptr<aidl::android::hardware::radio::config::IRadioConfigIndication> indicate();
42 };
43 
44 }  // namespace android::hardware::radio::compat
45