1 /*
2  * Copyright (C) 2019 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 
17 #ifndef ANDROID_HARDWARE_TV_TUNER_V1_0_LNB_H_
18 #define ANDROID_HARDWARE_TV_TUNER_V1_0_LNB_H_
19 
20 #include <android/hardware/tv/tuner/1.0/ILnb.h>
21 #include <android/hardware/tv/tuner/1.0/ITuner.h>
22 
23 using namespace std;
24 
25 namespace android {
26 namespace hardware {
27 namespace tv {
28 namespace tuner {
29 namespace V1_0 {
30 namespace implementation {
31 
32 using ::android::hardware::tv::tuner::V1_0::ILnbCallback;
33 using ::android::hardware::tv::tuner::V1_0::LnbPosition;
34 using ::android::hardware::tv::tuner::V1_0::LnbTone;
35 using ::android::hardware::tv::tuner::V1_0::LnbVoltage;
36 using ::android::hardware::tv::tuner::V1_0::Result;
37 
38 class Lnb : public ILnb {
39   public:
40     Lnb();
41     Lnb(int id);
42 
43     virtual Return<Result> setCallback(const sp<ILnbCallback>& callback) override;
44 
45     virtual Return<Result> setVoltage(LnbVoltage voltage) override;
46 
47     virtual Return<Result> setTone(LnbTone tone) override;
48 
49     virtual Return<Result> setSatellitePosition(LnbPosition position) override;
50 
51     virtual Return<Result> sendDiseqcMessage(const hidl_vec<uint8_t>& diseqcMessage) override;
52 
53     virtual Return<Result> close() override;
54 
55     int getId();
56 
57   private:
58     int mId;
59     virtual ~Lnb();
60 };
61 
62 }  // namespace implementation
63 }  // namespace V1_0
64 }  // namespace tuner
65 }  // namespace tv
66 }  // namespace hardware
67 }  // namespace android
68 
69 #endif  // ANDROID_HARDWARE_TV_TUNER_V1_0_LNB_H_
70