diff options
Diffstat (limited to 'lineagehw/hidl')
19 files changed, 1040 insertions, 0 deletions
diff --git a/lineagehw/hidl/livedisplay/AdaptiveBacklight.cpp b/lineagehw/hidl/livedisplay/AdaptiveBacklight.cpp new file mode 100644 index 0000000..755f7f2 --- /dev/null +++ b/lineagehw/hidl/livedisplay/AdaptiveBacklight.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 "AdaptiveBacklight.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IAdaptiveBacklight follow. +Return<bool> AdaptiveBacklight::isEnabled() { + // TODO implement + return bool {}; +} + +Return<bool> AdaptiveBacklight::setEnabled(bool enabled) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IAdaptiveBacklight* HIDL_FETCH_IAdaptiveBacklight(const char* /* name */) { + //return new AdaptiveBacklight(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/AdaptiveBacklight.h b/lineagehw/hidl/livedisplay/AdaptiveBacklight.h new file mode 100644 index 0000000..c0e0c4e --- /dev/null +++ b/lineagehw/hidl/livedisplay/AdaptiveBacklight.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_LIVEDISPLAY_V2_0_ADAPTIVEBACKLIGHT_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_ADAPTIVEBACKLIGHT_H + +#include <vendor/lineage/livedisplay/2.0/IAdaptiveBacklight.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_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 AdaptiveBacklight : public IAdaptiveBacklight { + // Methods from ::vendor::lineage::livedisplay::V2_0::IAdaptiveBacklight follow. + Return<bool> isEnabled() override; + Return<bool> 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" IAdaptiveBacklight* HIDL_FETCH_IAdaptiveBacklight(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_ADAPTIVEBACKLIGHT_H diff --git a/lineagehw/hidl/livedisplay/Android.bp b/lineagehw/hidl/livedisplay/Android.bp new file mode 100644 index 0000000..276c386 --- /dev/null +++ b/lineagehw/hidl/livedisplay/Android.bp @@ -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. + +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 '-<hardware identifier>' etc to distinguish it. + name: "vendor.lineage.livedisplay@2.0-impl", + relative_install_path: "hw", + // FIXME: this should be 'vendor: true' for modules that will eventually be + // on AOSP. + proprietary: true, + srcs: [ + "AdaptiveBacklight.cpp", + "AutoContrast.cpp", + "ColorBalance.cpp", + "ColorEnhancement.cpp", + "DisplayColorCalibration.cpp", + "DisplayModes.cpp", + "PictureAdjustment.cpp", + "ReadingEnhancement.cpp", + "SunlightEnhancement.cpp", + ], + shared_libs: [ + "libhidlbase", + "libhidltransport", + "libutils", + "vendor.lineage.livedisplay@2.0", + ], +} diff --git a/lineagehw/hidl/livedisplay/AutoContrast.cpp b/lineagehw/hidl/livedisplay/AutoContrast.cpp new file mode 100644 index 0000000..af16fc7 --- /dev/null +++ b/lineagehw/hidl/livedisplay/AutoContrast.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 "AutoContrast.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IAutoContrast follow. +Return<bool> AutoContrast::isEnabled() { + // TODO implement + return bool {}; +} + +Return<bool> AutoContrast::setEnabled(bool enabled) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IAutoContrast* HIDL_FETCH_IAutoContrast(const char* /* name */) { + //return new AutoContrast(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/AutoContrast.h b/lineagehw/hidl/livedisplay/AutoContrast.h new file mode 100644 index 0000000..44a8be6 --- /dev/null +++ b/lineagehw/hidl/livedisplay/AutoContrast.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_LIVEDISPLAY_V2_0_AUTOCONTRAST_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_AUTOCONTRAST_H + +#include <vendor/lineage/livedisplay/2.0/IAutoContrast.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_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 AutoContrast : public IAutoContrast { + // Methods from ::vendor::lineage::livedisplay::V2_0::IAutoContrast follow. + Return<bool> isEnabled() override; + Return<bool> 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" IAutoContrast* HIDL_FETCH_IAutoContrast(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_AUTOCONTRAST_H diff --git a/lineagehw/hidl/livedisplay/ColorBalance.cpp b/lineagehw/hidl/livedisplay/ColorBalance.cpp new file mode 100644 index 0000000..f636990 --- /dev/null +++ b/lineagehw/hidl/livedisplay/ColorBalance.cpp @@ -0,0 +1,52 @@ +/* + * 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 "ColorBalance.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IColorBalance follow. +Return<void> ColorBalance::getColorBalanceRange(getColorBalanceRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<int32_t> ColorBalance::getColorBalance() { + // TODO implement + return int32_t {}; +} + +Return<bool> ColorBalance::setColorBalance(int32_t value) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IColorBalance* HIDL_FETCH_IColorBalance(const char* /* name */) { + //return new ColorBalance(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/ColorBalance.h b/lineagehw/hidl/livedisplay/ColorBalance.h new file mode 100644 index 0000000..b760c7c --- /dev/null +++ b/lineagehw/hidl/livedisplay/ColorBalance.h @@ -0,0 +1,57 @@ +/* + * 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_LIVEDISPLAY_V2_0_COLORBALANCE_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_COLORBALANCE_H + +#include <vendor/lineage/livedisplay/2.0/IColorBalance.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_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 ColorBalance : public IColorBalance { + // Methods from ::vendor::lineage::livedisplay::V2_0::IColorBalance follow. + Return<void> getColorBalanceRange(getColorBalanceRange_cb _hidl_cb) override; + Return<int32_t> getColorBalance() override; + Return<bool> setColorBalance(int32_t value) override; + + // Methods from ::android::hidl::base::V1_0::IBase follow. + +}; + +// FIXME: most likely delete, this is only for passthrough implementations +// extern "C" IColorBalance* HIDL_FETCH_IColorBalance(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_COLORBALANCE_H diff --git a/lineagehw/hidl/livedisplay/ColorEnhancement.cpp b/lineagehw/hidl/livedisplay/ColorEnhancement.cpp new file mode 100644 index 0000000..e87961d --- /dev/null +++ b/lineagehw/hidl/livedisplay/ColorEnhancement.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 "ColorEnhancement.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IColorEnhancement follow. +Return<bool> ColorEnhancement::isEnabled() { + // TODO implement + return bool {}; +} + +Return<bool> ColorEnhancement::setEnabled(bool enabled) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IColorEnhancement* HIDL_FETCH_IColorEnhancement(const char* /* name */) { + //return new ColorEnhancement(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/ColorEnhancement.h b/lineagehw/hidl/livedisplay/ColorEnhancement.h new file mode 100644 index 0000000..925cdfc --- /dev/null +++ b/lineagehw/hidl/livedisplay/ColorEnhancement.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_LIVEDISPLAY_V2_0_COLORENHANCEMENT_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_COLORENHANCEMENT_H + +#include <vendor/lineage/livedisplay/2.0/IColorEnhancement.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_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 ColorEnhancement : public IColorEnhancement { + // Methods from ::vendor::lineage::livedisplay::V2_0::IColorEnhancement follow. + Return<bool> isEnabled() override; + Return<bool> 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" IColorEnhancement* HIDL_FETCH_IColorEnhancement(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_COLORENHANCEMENT_H diff --git a/lineagehw/hidl/livedisplay/DisplayColorCalibration.cpp b/lineagehw/hidl/livedisplay/DisplayColorCalibration.cpp new file mode 100644 index 0000000..e471f3e --- /dev/null +++ b/lineagehw/hidl/livedisplay/DisplayColorCalibration.cpp @@ -0,0 +1,57 @@ +/* + * 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 "DisplayColorCalibration.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IDisplayColorCalibration follow. +Return<int32_t> DisplayColorCalibration::getMaxValue() { + // TODO implement + return int32_t {}; +} + +Return<int32_t> DisplayColorCalibration::getMinValue() { + // TODO implement + return int32_t {}; +} + +Return<void> DisplayColorCalibration::getCalibration(getCalibration_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<bool> DisplayColorCalibration::setCalibration(const hidl_vec<int32_t>& rgb) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IDisplayColorCalibration* HIDL_FETCH_IDisplayColorCalibration(const char* /* name */) { + //return new DisplayColorCalibration(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/DisplayColorCalibration.h b/lineagehw/hidl/livedisplay/DisplayColorCalibration.h new file mode 100644 index 0000000..f4df651 --- /dev/null +++ b/lineagehw/hidl/livedisplay/DisplayColorCalibration.h @@ -0,0 +1,58 @@ +/* + * 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_LIVEDISPLAY_V2_0_DISPLAYCOLORCALIBRATION_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_DISPLAYCOLORCALIBRATION_H + +#include <vendor/lineage/livedisplay/2.0/IDisplayColorCalibration.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_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 DisplayColorCalibration : public IDisplayColorCalibration { + // Methods from ::vendor::lineage::livedisplay::V2_0::IDisplayColorCalibration follow. + Return<int32_t> getMaxValue() override; + Return<int32_t> getMinValue() override; + Return<void> getCalibration(getCalibration_cb _hidl_cb) override; + Return<bool> setCalibration(const hidl_vec<int32_t>& rgb) override; + + // Methods from ::android::hidl::base::V1_0::IBase follow. + +}; + +// FIXME: most likely delete, this is only for passthrough implementations +// extern "C" IDisplayColorCalibration* HIDL_FETCH_IDisplayColorCalibration(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_DISPLAYCOLORCALIBRATION_H diff --git a/lineagehw/hidl/livedisplay/DisplayModes.cpp b/lineagehw/hidl/livedisplay/DisplayModes.cpp new file mode 100644 index 0000000..6fcf88d --- /dev/null +++ b/lineagehw/hidl/livedisplay/DisplayModes.cpp @@ -0,0 +1,57 @@ +/* + * 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 "DisplayModes.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IDisplayModes follow. +Return<void> DisplayModes::getDisplayModes(getDisplayModes_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<void> DisplayModes::getCurrentDisplayMode(getCurrentDisplayMode_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<void> DisplayModes::getDefaultDisplayMode(getDefaultDisplayMode_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<bool> DisplayModes::setDisplayMode(int32_t modeID, bool makeDefault) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IDisplayModes* HIDL_FETCH_IDisplayModes(const char* /* name */) { + //return new DisplayModes(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/DisplayModes.h b/lineagehw/hidl/livedisplay/DisplayModes.h new file mode 100644 index 0000000..90f0cb3 --- /dev/null +++ b/lineagehw/hidl/livedisplay/DisplayModes.h @@ -0,0 +1,58 @@ +/* + * 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_LIVEDISPLAY_V2_0_DISPLAYMODES_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_DISPLAYMODES_H + +#include <vendor/lineage/livedisplay/2.0/IDisplayModes.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_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 DisplayModes : public IDisplayModes { + // Methods from ::vendor::lineage::livedisplay::V2_0::IDisplayModes follow. + Return<void> getDisplayModes(getDisplayModes_cb _hidl_cb) override; + Return<void> getCurrentDisplayMode(getCurrentDisplayMode_cb _hidl_cb) override; + Return<void> getDefaultDisplayMode(getDefaultDisplayMode_cb _hidl_cb) override; + Return<bool> setDisplayMode(int32_t modeID, bool makeDefault) override; + + // Methods from ::android::hidl::base::V1_0::IBase follow. + +}; + +// FIXME: most likely delete, this is only for passthrough implementations +// extern "C" IDisplayModes* HIDL_FETCH_IDisplayModes(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_DISPLAYMODES_H diff --git a/lineagehw/hidl/livedisplay/PictureAdjustment.cpp b/lineagehw/hidl/livedisplay/PictureAdjustment.cpp new file mode 100644 index 0000000..bedec52 --- /dev/null +++ b/lineagehw/hidl/livedisplay/PictureAdjustment.cpp @@ -0,0 +1,77 @@ +/* + * 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 "PictureAdjustment.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IPictureAdjustment follow. +Return<void> PictureAdjustment::getHueRange(getHueRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<void> PictureAdjustment::getSaturationRange(getSaturationRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<void> PictureAdjustment::getIntensityRange(getIntensityRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<void> PictureAdjustment::getContrastRange(getContrastRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<void> PictureAdjustment::getSaturationThresholdRange(getSaturationThresholdRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<void> PictureAdjustment::getPictureAdjustment(getPictureAdjustment_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<void> PictureAdjustment::getDefaultPictureAdjustment(getDefaultPictureAdjustment_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<bool> PictureAdjustment::setPictureAdjustment(const ::vendor::lineage::livedisplay::V2_0::HSIC& hsic) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IPictureAdjustment* HIDL_FETCH_IPictureAdjustment(const char* /* name */) { + //return new PictureAdjustment(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/PictureAdjustment.h b/lineagehw/hidl/livedisplay/PictureAdjustment.h new file mode 100644 index 0000000..17bfe66 --- /dev/null +++ b/lineagehw/hidl/livedisplay/PictureAdjustment.h @@ -0,0 +1,62 @@ +/* + * 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_LIVEDISPLAY_V2_0_PICTUREADJUSTMENT_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_PICTUREADJUSTMENT_H + +#include <vendor/lineage/livedisplay/2.0/IPictureAdjustment.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_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 PictureAdjustment : public IPictureAdjustment { + // Methods from ::vendor::lineage::livedisplay::V2_0::IPictureAdjustment follow. + Return<void> getHueRange(getHueRange_cb _hidl_cb) override; + Return<void> getSaturationRange(getSaturationRange_cb _hidl_cb) override; + Return<void> getIntensityRange(getIntensityRange_cb _hidl_cb) override; + Return<void> getContrastRange(getContrastRange_cb _hidl_cb) override; + Return<void> getSaturationThresholdRange(getSaturationThresholdRange_cb _hidl_cb) override; + Return<void> getPictureAdjustment(getPictureAdjustment_cb _hidl_cb) override; + Return<void> getDefaultPictureAdjustment(getDefaultPictureAdjustment_cb _hidl_cb) override; + Return<bool> setPictureAdjustment(const ::vendor::lineage::livedisplay::V2_0::HSIC& hsic) override; + + // Methods from ::android::hidl::base::V1_0::IBase follow. + +}; + +// FIXME: most likely delete, this is only for passthrough implementations +// extern "C" IPictureAdjustment* HIDL_FETCH_IPictureAdjustment(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_PICTUREADJUSTMENT_H diff --git a/lineagehw/hidl/livedisplay/ReadingEnhancement.cpp b/lineagehw/hidl/livedisplay/ReadingEnhancement.cpp new file mode 100644 index 0000000..ea27c90 --- /dev/null +++ b/lineagehw/hidl/livedisplay/ReadingEnhancement.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 "ReadingEnhancement.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IReadingEnhancement follow. +Return<bool> ReadingEnhancement::isEnabled() { + // TODO implement + return bool {}; +} + +Return<bool> ReadingEnhancement::setEnabled(bool enabled) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IReadingEnhancement* HIDL_FETCH_IReadingEnhancement(const char* /* name */) { + //return new ReadingEnhancement(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/ReadingEnhancement.h b/lineagehw/hidl/livedisplay/ReadingEnhancement.h new file mode 100644 index 0000000..20e909a --- /dev/null +++ b/lineagehw/hidl/livedisplay/ReadingEnhancement.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_LIVEDISPLAY_V2_0_READINGENHANCEMENT_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_READINGENHANCEMENT_H + +#include <vendor/lineage/livedisplay/2.0/IReadingEnhancement.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_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 ReadingEnhancement : public IReadingEnhancement { + // Methods from ::vendor::lineage::livedisplay::V2_0::IReadingEnhancement follow. + Return<bool> isEnabled() override; + Return<bool> 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" IReadingEnhancement* HIDL_FETCH_IReadingEnhancement(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_READINGENHANCEMENT_H diff --git a/lineagehw/hidl/livedisplay/SunlightEnhancement.cpp b/lineagehw/hidl/livedisplay/SunlightEnhancement.cpp new file mode 100644 index 0000000..8a3c329 --- /dev/null +++ b/lineagehw/hidl/livedisplay/SunlightEnhancement.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 "SunlightEnhancement.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::ISunlightEnhancement follow. +Return<bool> SunlightEnhancement::isEnabled() { + // TODO implement + return bool {}; +} + +Return<bool> SunlightEnhancement::setEnabled(bool enabled) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//ISunlightEnhancement* HIDL_FETCH_ISunlightEnhancement(const char* /* name */) { + //return new SunlightEnhancement(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/SunlightEnhancement.h b/lineagehw/hidl/livedisplay/SunlightEnhancement.h new file mode 100644 index 0000000..7571831 --- /dev/null +++ b/lineagehw/hidl/livedisplay/SunlightEnhancement.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_LIVEDISPLAY_V2_0_SUNLIGHTENHANCEMENT_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_SUNLIGHTENHANCEMENT_H + +#include <vendor/lineage/livedisplay/2.0/ISunlightEnhancement.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_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 SunlightEnhancement : public ISunlightEnhancement { + // Methods from ::vendor::lineage::livedisplay::V2_0::ISunlightEnhancement follow. + Return<bool> isEnabled() override; + Return<bool> 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" ISunlightEnhancement* HIDL_FETCH_ISunlightEnhancement(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_SUNLIGHTENHANCEMENT_H |