1 /* 2 * Copyright (C) 2017 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 #ifndef VENDOR_GOOGLE_CLOCKWORK_LEFTY_V1_0_LEFTY_H 17 #define VENDOR_GOOGLE_CLOCKWORK_LEFTY_V1_0_LEFTY_H 18 19 #include "hubconnection.h" 20 #undef LIKELY 21 #undef UNLIKELY 22 #include <vendor/google_clockwork/lefty/1.0/ILefty.h> 23 24 namespace vendor { 25 namespace google_clockwork { 26 namespace lefty { 27 namespace V1_0 { 28 namespace implementation { 29 30 using ::vendor::google_clockwork::lefty::V1_0::ILefty; 31 using ::android::hardware::Return; 32 using ::android::hardware::Void; 33 using ::android::sp; 34 using ::android::HubConnection; 35 36 struct Lefty : public ILefty { 37 Lefty(); 38 39 // Methods from ::vendor::google_clockwork::lefty::V1_0::ILefty follow. 40 Return<void> setLeftyMode(bool enabled) override; 41 42 private: 43 sp<HubConnection> mHubConnection; 44 }; 45 46 extern "C" ILefty* HIDL_FETCH_ILefty(const char* name); 47 48 } // namespace implementation 49 } // namespace V1_0 50 } // namespace lefty 51 } // namespace google_clockwork 52 } // namespace vendor 53 54 #endif // VENDOR_GOOGLE_CLOCKWORK_LEFTY_V1_0_LEFTY_H 55