From 5b3bd86278b79217c5ee7d591e11e3ffaabb3911 Mon Sep 17 00:00:00 2001 From: Paul Keith Date: Tue, 8 Jan 2019 23:45:03 +0100 Subject: [PATCH] samsung: Add dummy lineagehw HIDL interfaces for vendor.lineage.touch * Generated from hidl-gen with added LineageOS copyrights Change-Id: Ia1073b57ecbafee0e599788b1ead5cc4b2dbda57 --- lineagehw/hidl/touch/Android.bp | 42 ++++++++++++++++ lineagehw/hidl/touch/GloveMode.cpp | 42 ++++++++++++++++ lineagehw/hidl/touch/GloveMode.h | 55 ++++++++++++++++++++ lineagehw/hidl/touch/KeyDisabler.cpp | 42 ++++++++++++++++ lineagehw/hidl/touch/KeyDisabler.h | 55 ++++++++++++++++++++ lineagehw/hidl/touch/StylusMode.cpp | 42 ++++++++++++++++ lineagehw/hidl/touch/StylusMode.h | 55 ++++++++++++++++++++ lineagehw/hidl/touch/TouchscreenGesture.cpp | 47 +++++++++++++++++ lineagehw/hidl/touch/TouchscreenGesture.h | 56 +++++++++++++++++++++ 9 files changed, 436 insertions(+) create mode 100644 lineagehw/hidl/touch/Android.bp create mode 100644 lineagehw/hidl/touch/GloveMode.cpp create mode 100644 lineagehw/hidl/touch/GloveMode.h create mode 100644 lineagehw/hidl/touch/KeyDisabler.cpp create mode 100644 lineagehw/hidl/touch/KeyDisabler.h create mode 100644 lineagehw/hidl/touch/StylusMode.cpp create mode 100644 lineagehw/hidl/touch/StylusMode.h create mode 100644 lineagehw/hidl/touch/TouchscreenGesture.cpp create mode 100644 lineagehw/hidl/touch/TouchscreenGesture.h diff --git a/lineagehw/hidl/touch/Android.bp b/lineagehw/hidl/touch/Android.bp new file mode 100644 index 00000000..310fb529 --- /dev/null +++ b/lineagehw/hidl/touch/Android.bp @@ -0,0 +1,42 @@ +// Copyright (C) 2019 The LineageOS Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +cc_library_shared { + // FIXME: this should only be -impl for a passthrough hal. + // In most cases, to convert this to a binderized implementation, you should: + // - change '-impl' to '-service' here and make it a cc_binary instead of a + // cc_library_shared. + // - add a *.rc file for this module. + // - delete HIDL_FETCH_I* functions. + // - call configureRpcThreadpool and registerAsService on the instance. + // You may also want to append '-impl/-service' with a specific identifier like + // '-vendor' or '-' etc to distinguish it. + name: "vendor.lineage.touch@1.0-impl", + relative_install_path: "hw", + // FIXME: this should be 'vendor: true' for modules that will eventually be + // on AOSP. + proprietary: true, + srcs: [ + "GloveMode.cpp", + "KeyDisabler.cpp", + "StylusMode.cpp", + "TouchscreenGesture.cpp", + ], + shared_libs: [ + "libhidlbase", + "libhidltransport", + "libutils", + "vendor.lineage.touch@1.0", + ], +} diff --git a/lineagehw/hidl/touch/GloveMode.cpp b/lineagehw/hidl/touch/GloveMode.cpp new file mode 100644 index 00000000..37c58ede --- /dev/null +++ b/lineagehw/hidl/touch/GloveMode.cpp @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "GloveMode.h" + +namespace vendor { +namespace lineage { +namespace touch { +namespace V1_0 { +namespace implementation { + +// Methods from ::vendor::lineage::touch::V1_0::IGloveMode follow. +Return GloveMode::setEnabled(bool enabled) { + // TODO implement + return Void(); +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IGloveMode* HIDL_FETCH_IGloveMode(const char* /* name */) { + //return new GloveMode(); +//} +// +} // namespace implementation +} // namespace V1_0 +} // namespace touch +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/touch/GloveMode.h b/lineagehw/hidl/touch/GloveMode.h new file mode 100644 index 00000000..925ceb40 --- /dev/null +++ b/lineagehw/hidl/touch/GloveMode.h @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef VENDOR_LINEAGE_TOUCH_V1_0_GLOVEMODE_H +#define VENDOR_LINEAGE_TOUCH_V1_0_GLOVEMODE_H + +#include +#include +#include + +namespace vendor { +namespace lineage { +namespace touch { +namespace V1_0 { +namespace implementation { + +using ::android::hardware::hidl_array; +using ::android::hardware::hidl_memory; +using ::android::hardware::hidl_string; +using ::android::hardware::hidl_vec; +using ::android::hardware::Return; +using ::android::hardware::Void; +using ::android::sp; + +struct GloveMode : public IGloveMode { + // Methods from ::vendor::lineage::touch::V1_0::IGloveMode follow. + Return setEnabled(bool enabled) override; + + // Methods from ::android::hidl::base::V1_0::IBase follow. + +}; + +// FIXME: most likely delete, this is only for passthrough implementations +// extern "C" IGloveMode* HIDL_FETCH_IGloveMode(const char* name); + +} // namespace implementation +} // namespace V1_0 +} // namespace touch +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_TOUCH_V1_0_GLOVEMODE_H diff --git a/lineagehw/hidl/touch/KeyDisabler.cpp b/lineagehw/hidl/touch/KeyDisabler.cpp new file mode 100644 index 00000000..469e1472 --- /dev/null +++ b/lineagehw/hidl/touch/KeyDisabler.cpp @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "KeyDisabler.h" + +namespace vendor { +namespace lineage { +namespace touch { +namespace V1_0 { +namespace implementation { + +// Methods from ::vendor::lineage::touch::V1_0::IKeyDisabler follow. +Return KeyDisabler::setEnabled(bool enabled) { + // TODO implement + return Void(); +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IKeyDisabler* HIDL_FETCH_IKeyDisabler(const char* /* name */) { + //return new KeyDisabler(); +//} +// +} // namespace implementation +} // namespace V1_0 +} // namespace touch +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/touch/KeyDisabler.h b/lineagehw/hidl/touch/KeyDisabler.h new file mode 100644 index 00000000..ffe4f0d1 --- /dev/null +++ b/lineagehw/hidl/touch/KeyDisabler.h @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef VENDOR_LINEAGE_TOUCH_V1_0_KEYDISABLER_H +#define VENDOR_LINEAGE_TOUCH_V1_0_KEYDISABLER_H + +#include +#include +#include + +namespace vendor { +namespace lineage { +namespace touch { +namespace V1_0 { +namespace implementation { + +using ::android::hardware::hidl_array; +using ::android::hardware::hidl_memory; +using ::android::hardware::hidl_string; +using ::android::hardware::hidl_vec; +using ::android::hardware::Return; +using ::android::hardware::Void; +using ::android::sp; + +struct KeyDisabler : public IKeyDisabler { + // Methods from ::vendor::lineage::touch::V1_0::IKeyDisabler follow. + Return setEnabled(bool enabled) override; + + // Methods from ::android::hidl::base::V1_0::IBase follow. + +}; + +// FIXME: most likely delete, this is only for passthrough implementations +// extern "C" IKeyDisabler* HIDL_FETCH_IKeyDisabler(const char* name); + +} // namespace implementation +} // namespace V1_0 +} // namespace touch +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_TOUCH_V1_0_KEYDISABLER_H diff --git a/lineagehw/hidl/touch/StylusMode.cpp b/lineagehw/hidl/touch/StylusMode.cpp new file mode 100644 index 00000000..5f5a33a9 --- /dev/null +++ b/lineagehw/hidl/touch/StylusMode.cpp @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "StylusMode.h" + +namespace vendor { +namespace lineage { +namespace touch { +namespace V1_0 { +namespace implementation { + +// Methods from ::vendor::lineage::touch::V1_0::IStylusMode follow. +Return StylusMode::setEnabled(bool enabled) { + // TODO implement + return Void(); +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IStylusMode* HIDL_FETCH_IStylusMode(const char* /* name */) { + //return new StylusMode(); +//} +// +} // namespace implementation +} // namespace V1_0 +} // namespace touch +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/touch/StylusMode.h b/lineagehw/hidl/touch/StylusMode.h new file mode 100644 index 00000000..4e7401d5 --- /dev/null +++ b/lineagehw/hidl/touch/StylusMode.h @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef VENDOR_LINEAGE_TOUCH_V1_0_STYLUSMODE_H +#define VENDOR_LINEAGE_TOUCH_V1_0_STYLUSMODE_H + +#include +#include +#include + +namespace vendor { +namespace lineage { +namespace touch { +namespace V1_0 { +namespace implementation { + +using ::android::hardware::hidl_array; +using ::android::hardware::hidl_memory; +using ::android::hardware::hidl_string; +using ::android::hardware::hidl_vec; +using ::android::hardware::Return; +using ::android::hardware::Void; +using ::android::sp; + +struct StylusMode : public IStylusMode { + // Methods from ::vendor::lineage::touch::V1_0::IStylusMode follow. + Return setEnabled(bool enabled) override; + + // Methods from ::android::hidl::base::V1_0::IBase follow. + +}; + +// FIXME: most likely delete, this is only for passthrough implementations +// extern "C" IStylusMode* HIDL_FETCH_IStylusMode(const char* name); + +} // namespace implementation +} // namespace V1_0 +} // namespace touch +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_TOUCH_V1_0_STYLUSMODE_H diff --git a/lineagehw/hidl/touch/TouchscreenGesture.cpp b/lineagehw/hidl/touch/TouchscreenGesture.cpp new file mode 100644 index 00000000..cadea2bd --- /dev/null +++ b/lineagehw/hidl/touch/TouchscreenGesture.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "TouchscreenGesture.h" + +namespace vendor { +namespace lineage { +namespace touch { +namespace V1_0 { +namespace implementation { + +// Methods from ::vendor::lineage::touch::V1_0::ITouchscreenGesture follow. +Return TouchscreenGesture::getSupportedGestures(getSupportedGestures_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return TouchscreenGesture::setGestureEnabled(const ::vendor::lineage::touch::V1_0::Gesture& gesture, bool enabled) { + // TODO implement + return Void(); +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//ITouchscreenGesture* HIDL_FETCH_ITouchscreenGesture(const char* /* name */) { + //return new TouchscreenGesture(); +//} +// +} // namespace implementation +} // namespace V1_0 +} // namespace touch +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/touch/TouchscreenGesture.h b/lineagehw/hidl/touch/TouchscreenGesture.h new file mode 100644 index 00000000..bb2d3360 --- /dev/null +++ b/lineagehw/hidl/touch/TouchscreenGesture.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef VENDOR_LINEAGE_TOUCH_V1_0_TOUCHSCREENGESTURE_H +#define VENDOR_LINEAGE_TOUCH_V1_0_TOUCHSCREENGESTURE_H + +#include +#include +#include + +namespace vendor { +namespace lineage { +namespace touch { +namespace V1_0 { +namespace implementation { + +using ::android::hardware::hidl_array; +using ::android::hardware::hidl_memory; +using ::android::hardware::hidl_string; +using ::android::hardware::hidl_vec; +using ::android::hardware::Return; +using ::android::hardware::Void; +using ::android::sp; + +struct TouchscreenGesture : public ITouchscreenGesture { + // Methods from ::vendor::lineage::touch::V1_0::ITouchscreenGesture follow. + Return getSupportedGestures(getSupportedGestures_cb _hidl_cb) override; + Return setGestureEnabled(const ::vendor::lineage::touch::V1_0::Gesture& gesture, bool enabled) override; + + // Methods from ::android::hidl::base::V1_0::IBase follow. + +}; + +// FIXME: most likely delete, this is only for passthrough implementations +// extern "C" ITouchscreenGesture* HIDL_FETCH_ITouchscreenGesture(const char* name); + +} // namespace implementation +} // namespace V1_0 +} // namespace touch +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_TOUCH_V1_0_TOUCHSCREENGESTURE_H