pax_global_header 0000666 0000000 0000000 00000000064 14554502344 0014520 g ustar 00root root 0000000 0000000 52 comment=ea116aa4430f39fa784eba7d5fb2dd7dec316ae6
hfd-service-0.2.2/ 0000775 0000000 0000000 00000000000 14554502344 0013720 5 ustar 00root root 0000000 0000000 hfd-service-0.2.2/.gitignore 0000664 0000000 0000000 00000000610 14554502344 0015705 0 ustar 00root root 0000000 0000000
# Created by https://www.gitignore.io/api/cmake
# Edit at https://www.gitignore.io/?templates=cmake
### CMake ###
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
### CMake Patch ###
# External projects
*-prefix/
# End of https://www.gitignore.io/api/cmake
build
build-*
hfd-service-0.2.2/AUTHORS 0000664 0000000 0000000 00000000266 14554502344 0014774 0 ustar 00root root 0000000 0000000 Alfred Neumayer
Andreas
Bart Ribbers
Caleb Connolly
Erfan Abdi
Florian Leeber
Guido Berhoerster
Jami Kettunen
Marius Gripsgard
Matthias Gerstner
Mike Gabriel
Ratchanan Srirattanamet
hfd-service-0.2.2/CMakeLists.txt 0000664 0000000 0000000 00000005046 14554502344 0016465 0 ustar 00root root 0000000 0000000 cmake_minimum_required(VERSION 3.5)
project(hfd-service VERSION 0.2.2)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
include(FindPkgConfig)
include(GNUInstallDirs)
pkg_check_modules(UDEV REQUIRED libudev)
pkg_check_modules(DEVICEINFO REQUIRED deviceinfo)
# For variables only.
pkg_check_modules(DBUS_1 REQUIRED dbus-1)
pkg_get_variable(DBUS_INTERFACES_DIR dbus-1 interfaces_dir)
pkg_check_modules(ACCOUNTSSERVICE REQUIRED accountsservice)
pkg_get_variable(AS_INTERFACES_DIR accountsservice interfacesdir)
option(ENABLE_LIBHYBRIS "Enable libhybris support" ON)
if (ENABLE_LIBHYBRIS)
pkg_check_modules(ANDROID_HEADERS android-headers)
pkg_check_modules(ANDROID_HARDWARE libhardware)
if(ANDROID_HEADERS_FOUND AND ANDROID_HARDWARE_FOUND)
message(STATUS "Bulding with libhybris support")
set(HAVE_LIBHYBRIS true)
else()
message(WARNING "Bulding without libhybris support, missing required dependencies!")
endif()
else()
message(STATUS "Bulding without libhybris support")
endif()
option(ENABLE_LIBGBINDER "Enable libgbinder support" ON)
if (ENABLE_LIBGBINDER)
pkg_check_modules(GLIB_UTIL libglibutil)
pkg_check_modules(GBINDER libgbinder)
if(GLIB_UTIL_FOUND AND GBINDER_FOUND)
message(STATUS "Bulding with libgbinder support")
set(HAVE_LIBGBINDER true)
else()
message(WARNING "Bulding without libgbinder support, missing required dependencies!")
endif()
else()
message(STATUS "Bulding without libgbinder support")
endif()
find_package(Qt5Core REQUIRED)
find_package(Qt5DBus REQUIRED)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
add_subdirectory(src)
add_subdirectory(tools)
add_subdirectory(qt)
add_subdirectory(init)
# Dbus policy
install(FILES data/com.lomiri.hfd.conf
DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/dbus-1/system.d
)
# Dbus service file
configure_file(data/com.lomiri.hfd.service.in com.lomiri.hfd.service)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/com.lomiri.hfd.service
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/system-services
)
# AccountsService interface
install(FILES data/com.lomiri.hfd.AccountsService.Settings.xml
DESTINATION ${DBUS_INTERFACES_DIR})
install(DIRECTORY DESTINATION ${AS_INTERFACES_DIR})
install(CODE "message(STATUS
\"Symlinking: \$ENV{DESTDIR}${AS_INTERFACES_DIR}/com.lomiri.hfd.AccountsService.Settings.xml\")")
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
../../dbus-1/interfaces/com.lomiri.hfd.AccountsService.Settings.xml
\$ENV{DESTDIR}${AS_INTERFACES_DIR}/com.lomiri.hfd.AccountsService.Settings.xml)")
hfd-service-0.2.2/ChangeLog 0000664 0000000 0000000 00000017540 14554502344 0015501 0 ustar 00root root 0000000 0000000 2024-01-25 Mike Gabriel
* Release 0.2.2 (HEAD -> main, tag: 0.2.2)
* Merge branch 'personal/gberh/improve-metadata' into 'main'
(b5451ce)
2024-01-25 Guido Berhoerster
* Improve README file and Debian package metadata (28e9b3e)
2023-11-19 Marius Gripsgard
* Merge branch 'personal/peat-psuwit/11-vibratePattern' into 'main'
(dd7626a)
2023-11-10 Ratchanan Srirattanamet
* service: add vibratePattern DBus API (d9b103c)
2023-11-09 Ratchanan Srirattanamet
* Moves vibrateDurationExtraMs handling to VibratorController
(ef940dd)
* vibrator: move pattern repetition to non-core and use QTimer
(d1054fb)
2023-11-10 Marius Gripsgard
* Merge branch 'fix/musl-build' into 'main' (06ea1d2)
2023-10-17 Bart Ribbers
* Add missing include to fix Musl compatibility (44fa015)
2023-10-15 Mike Gabriel
* Release 0.2.1 (23ade31) (tag: 0.2.1)
2023-08-18 Mike Gabriel
* Merge branch 'personal/peat-psuwit/othervibrate' into 'main'
(b268aaa)
2023-08-11 Ratchanan Srirattanamet
* usersettings: handle user deletion (b2e97a7)
2023-08-10 Ratchanan Srirattanamet
* qt/feedback-plugin: use privileged path if env var is set (e991b80)
2023-08-04 Ratchanan Srirattanamet
* Add settings to allow disabling general vibration (f9ecd13)
2023-02-05 Mike Gabriel
* Release 0.2.0 (04ff43e) (tag: 0.2.0)
2023-01-30 Mike Gabriel
* Merge branch 'personal/gberh/dh-12' into 'main' (8f278d0)
2023-01-30 Guido Berhoerster
* Update to dh version 12 (dcb9bc7)
2022-12-02 Mike Gabriel
* Merge branch 'abuGit-main-patch-97528' into 'main' (7c7b264)
2022-12-02 Andreas
* Spelling mistake: sutch --> such (cc391dd)
2022-10-06 Mike Gabriel
* Merge branch 'focal-vibrate-scale' into 'main' (de06edd)
2022-08-31 Jami Kettunen
* service: Add support for vibrate duration length extension
(1c36299)
2022-08-01 Ratchanan Srirattanamet
* Merge branch 'fix-dbus-systemd-apparmor' into 'main' (dc3d89b)
2022-08-01 Guido Berhoerster
* Allow DBus activation by AppArmor-confined apps (d128f51)
* Make hfd-service DBus-activatable (eee84ad)
* Correct path of the executable in the systemd unit file (85ae8d1)
* Correct path of the executable in the DBus service file (1c03fe3)
2022-07-03 Mike Gabriel
* Merge branch 'mariogrip-main-patch-06981' into 'main' (f52d1b7)
2022-07-03 Marius Gripsgard
* debian/control: Depend on systemd (e25fcd0)
2022-01-23 Marius Gripsgard
* Merge branch 'mr/switch-to-systemd' into 'main' (23e9c69)
2021-12-17 Florian Leeber
* Merge branch 'Flohack74-main-patch-59104' into 'main' (d230558)
* Allow 0 value for LEDs off milliseconds (620a2ee)
2021-11-27 Marius Gripsgard
* Merge branch 'main' into 'main' (5c747fb)
2021-11-22 Marius Gripsgard
* Merge branch 'xenial' into 'main' (5f920c6)
2021-06-28 Matthias Gerstner
* vibrator-ff: check for valid file descriptor before writing
(d3eafe5)
2021-06-25 Matthias Gerstner
* global: fix various compiler warnings (0186b78)
* vibrator-ff: zero-initialize features array, check for ioctl()
error (07246e9)
* DBusAdaptorService: check for bad integer values passed via D-Bus
(92954aa)
* vibrator-ff: open files with O_CLOEXEC (e2a8d08)
* vibrator-legacy: remove unused m_thread member (8b0566c)
2021-10-06 Ratchanan Srirattanamet
* Move Jenkinsfile to debian/ per the new guideline (05ef6e0)
* Update Jenkinsfile to use shared library (873551d)
2021-10-02 Erfan Abdi
* Proper android 8+ support (#21) (8d6e2e1)
2021-09-08 Florian Leeber
* Add missing .service file (#20) (a05537e)
2021-04-13 Marius Gripsgard
* Merge branch 'mr/debian-folder-copy-paste-flaw-fixes' into 'main'
(7bc710d)
2021-04-09 Mike Gabriel
* Revert "data/com.lomiri.hfd.conf: Fix D-Bus policy without send
destination." (bfc78ee)
* init/hfd-service.service.in: Add Documentation= key (pointing to
upstream Git repo, i.e. its Readme.md). (4a4e1e6)
* data/com.lomiri.hfd.conf: Fix D-Bus policy without send
destination. (945e7b8)
* data/com.lomiri.hfd.conf: Fix D-Bus policy without send
destination. (ffc4e30)
* debian/hfd-service.install: Update for systemd switch-over and
moved service binary. (8048bc7)
* init/: Add systemd system service file. (b427598)
* src/CMakeLists.txt: Install hfd-service executable to LIBEXECDIR.
(ecc76ca)
* data/hfd-service.conf: Drop file. Drop upstart support. (e0aec42)
* debian/control: Upstream repo has been moved to gitlab.com.
(6c018d6)
* debian/copyright: Upstream repo has been moved to gitlab.com.
(ac4b7c9)
* debian/: Fix copy-paste flaws (wrong pkg name). (88afa6c)
2021-03-16 Marius Gripsgard
* Merge pull request #16 from PureTryOut/sysconfdir (d7a36de) (tag:
0.1.0)
* Merge pull request #17 from PureTryOut/spelling-mistakes (34415cd)
* Merge pull request #15 from ubports/xenial_-_waitforlxc (00c850e)
* Merge pull request #14 from calebccff/vibrator-forcefeedback
(a564c9b)
2021-03-03 Bart Ribbers
* Fix spelling mistakes when DBus connection fails (bc91acd)
* Fix install location of conf files (b37e724)
2021-02-27 Alfred Neumayer
* upstart: Speed up waiting for lxc-android-config to be up (effca39)
2021-01-28 Caleb Connolly
* vibrator: ff: add new Force Feedback vibrator (014aec3)
2021-01-24 Marius Gripsgard
* Merge pull request #13 from ubports-oneplus6/oneplus6-fixes
(c7d0237)
2021-01-21 Caleb Connolly
* vibrator-sysfs: more robust transient trigger support detection
(6bc0ace)
2021-01-18 Caleb Connolly
* udevDevice: fix indent (96e56e2)
* vibrator-sysfs: Don't crash when failing to add transient trigger
(9c7c6dd)
2020-08-30 Marius Gripsgard
* Merge remote-tracking branch 'origin/xenial_-_android9' into xenial
(896ef75)
* Merge branch 'xenial_-_hybrisopt' into xenial (1e15fb9)
2020-04-23 Alfred Neumayer
* leds-hybris: Fix segfault when light device cannot be loaded
(4e85878)
2020-04-16 Alfred Neumayer
* service: Add env vars to switch between backend implementations
(04681b9)
2020-07-24 Marius Gripsgard
* Make libhybris optional (7378be4)
* Add missing include for newer gcc (89871d8)
* [cmake] Remove uneeded qt5_use_modules (f56ae91)
2020-07-07 Ratchanan Srirattanamet
* leds: prioritise hybris backend (8bc7c0b)
* Wait for Android container to be up (01d7964)
2020-06-27 Marius Gripsgard
* Merge pull request #3 from peat-psuwit/xenial_-_hfd-fix-fp2
(5ccbb0e)
2020-06-17 Ratchanan Srirattanamet
* leds-hybris: don't check for light device at construction (335e294)
* leds-sysfs: don't use where it lacks timer trigger (2225a79)
2020-05-28 Marius Gripsgard
* Merge pull request #2 from peat-psuwit/xenial_-_repeat-thread-cv
(bd52bb0)
* Merge pull request #1 from peat-psuwit/xenial_-_fix-rumble
(b8b4501)
2020-05-27 Ratchanan Srirattanamet
* Make repeatThread uses mutex/cv (7c15716)
* [vibrator] capture duration by value (3ccc8d0)
2020-04-23 Marius Gripsgard
* [leds-sysfs] Improve search for color leds (9469fb1)
2020-04-13 Marius Gripsgard
* Move components to hfd namespace (c6b0a48)
2020-03-21 Marius Gripsgard
* [qmlplugin] Make sure all values are up-to-date before setting
state on (bbaded1)
* [debian] Add missing deps (28d8900)
* Inital commit (4c70084)
hfd-service-0.2.2/README.md 0000664 0000000 0000000 00000001066 14554502344 0015202 0 ustar 00root root 0000000 0000000 # HFD Service
**H**uman **F**eedback **D**evice **Service** is a DBus activated service that manages human feedback devices such as leds and vibrators on mobile devices.
It replaces usensord and Unity8's own LED/light handler.
## Why?
We have a need for a more modular system running service now that we have different devices handling implementations differently.
Secondly, we could not use Unity8's own LED handler which only runs in userspace from where it cannot access sysfs devices in a secure manner.
We thus use a DBus service protected with AppArmor.
hfd-service-0.2.2/data/ 0000775 0000000 0000000 00000000000 14554502344 0014631 5 ustar 00root root 0000000 0000000 hfd-service-0.2.2/data/com.lomiri.hfd.AccountsService.Settings.xml 0000664 0000000 0000000 00000001014 14554502344 0025055 0 ustar 00root root 0000000 0000000
hfd-service-0.2.2/data/com.lomiri.hfd.conf 0000664 0000000 0000000 00000000646 14554502344 0020316 0 ustar 00root root 0000000 0000000
hfd-service-0.2.2/data/com.lomiri.hfd.service.in 0000664 0000000 0000000 00000000242 14554502344 0021426 0 ustar 00root root 0000000 0000000 [D-BUS Service]
Name=com.lomiri.hfd
Exec=@CMAKE_INSTALL_FULL_LIBEXECDIR@/hfd-service
User=root
SystemdService=hfd-service.service
AssumedAppArmorLabel=unconfined
hfd-service-0.2.2/data/com.lomiri.hfd.xml 0000664 0000000 0000000 00000002155 14554502344 0020166 0 ustar 00root root 0000000 0000000
hfd-service-0.2.2/debian/ 0000775 0000000 0000000 00000000000 14554502344 0015142 5 ustar 00root root 0000000 0000000 hfd-service-0.2.2/debian/Jenkinsfile 0000664 0000000 0000000 00000000651 14554502344 0017330 0 ustar 00root root 0000000 0000000 @Library('ubports-build-tools') _
buildAndProvideDebianPackage()
// Or if the package consists entirely of arch-independent packages:
// (optional optimization, will confuse BlueOcean's live view at build stage)
// buildAndProvideDebianPackage(/* isArchIndependent */ true)
// Optionally, to skip building on some architectures (amd64 is always built):
// buildAndProvideDebianPackage(false, /* ignoredArchs */ ['arm64'])
hfd-service-0.2.2/debian/changelog 0000664 0000000 0000000 00000001476 14554502344 0017024 0 ustar 00root root 0000000 0000000 hfd-service (0.2.2) unstable; urgency=medium
* Upstream-provided Debian package for hfd-service. See upstream
ChangeLog for recent changes.
-- UBports developers Thu, 25 Jan 2024 16:57:24 +0100
hfd-service (0.2.1) unstable; urgency=medium
* Upstream-provided Debian package for hfd-service. See upstream
ChangeLog for recent changes.
-- UBports developers Sun, 15 Oct 2023 01:10:40 +0200
hfd-service (0.2.0) unstable; urgency=medium
* Upstream-provided Debian package for hfd-service. See upstream
ChangeLog for recent changes.
-- UBports developers Sun, 05 Feb 2023 01:02:11 +0100
hfd-service (0.1.0) xenial; urgency=medium
* initial release
-- Marius Gripsgard Sat, 21 Mar 2020 02:06:32 +0100
hfd-service-0.2.2/debian/control 0000664 0000000 0000000 00000004510 14554502344 0016545 0 ustar 00root root 0000000 0000000 Source: hfd-service
Section: admin
Priority: optional
Build-Depends: cmake (>= 3.5),
debhelper-compat (= 12),
pkg-config,
libandroid-properties-dev,
libdeviceinfo-dev,
libhardware-dev,
android-headers,
libglib2.0-dev,
libgbinder-dev,
libglibutil-dev,
libudev-dev,
qtbase5-dev,
qtfeedback5-dev,
cmake-extras,
qtdeclarative5-dev,
systemd [linux-any],
accountsservice:native,
libaccountsservice-dev,
libdbus-1-dev,
Maintainer: Marius Gripsgard
Standards-Version: 3.9.5
Homepage: https://gitlab.com/ubports/development/core/hfd-service
Vcs-Git: https://gitlab.com/ubports/development/core/hfd-service.git
Vcs-Browser: https://gitlab.com/ubports/development/core/hfd-service
Package: hfd-service
Section: libs
Architecture: any
Depends: ${misc:Depends},
${shlibs:Depends},
Description: HFD service for Lomiri
HFD service is a DBus activated service that manages human feedback devices
such as leds and vibrators on mobile devices.
Package: libqt5feedback5-hfd
Section: libs
Architecture: any
Depends: ${misc:Depends},
${shlibs:Depends},
hfd-service,
Description: QtFeedback Qt plugin for HFD service
HFD service is a DBus activated service that manages human feedback devices
such as leds and vibrators on mobile devices.
.
This package provides a Qt plugin which integrates HFD service with the
QtFeedback API.
Package: qml-module-hfd
Section: libs
Architecture: any
Depends: ${misc:Depends},
${shlibs:Depends},
hfd-service,
Description: QML plugin for HFD service
HFD service is a DBus activated service that manages human feedback devices
such as leds and vibrators on mobile devices.
.
This package provides a QML plugin which provides access to HFD service.
Package: hfd-service-tools
Section: admin
Architecture: any
Depends: ${misc:Depends},
${shlibs:Depends},
hfd-service,
Description: Tools for HFD service
HFD service is a DBus activated service that manages human feedback devices
such as leds and vibrators on mobile devices.
.
This package provides tools for testing HFD service.
hfd-service-0.2.2/debian/copyright 0000664 0000000 0000000 00000002066 14554502344 0017101 0 ustar 00root root 0000000 0000000 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: hfd-service
Upstream-Contact: Marius Gripsgard
Source: https://gitlab.com/ubports/core/hfd-service/
Files: *
Copyright: 2019 UBports foundation, Marius Gripsgard
License: GPL-3
License: GPL-3
This program is free software: you can redistribute it and/or modify it
under the terms of the the GNU General Public License version 3, as
published by the Free Software Foundation.
.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranties of
MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
PURPOSE. See the applicable version of the GNU Lesser General Public
License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
.
On Debian systems, the complete text of the GNU General Public License
can be found in `/usr/share/common-licenses/GPL-3'
hfd-service-0.2.2/debian/hfd-service-tools.install 0000664 0000000 0000000 00000000034 14554502344 0022064 0 ustar 00root root 0000000 0000000 usr/bin/hfd-service-tools-*
hfd-service-0.2.2/debian/hfd-service.install 0000664 0000000 0000000 00000000470 14554502344 0020732 0 ustar 00root root 0000000 0000000 usr/libexec/hfd-service
lib/systemd/system/hfd-service.service
etc/dbus-1/system.d/com.lomiri.hfd.conf
usr/share/dbus-1/system-services/com.lomiri.hfd.service
usr/share/dbus-1/interfaces/com.lomiri.hfd.AccountsService.Settings.xml
usr/share/accountsservice/interfaces/com.lomiri.hfd.AccountsService.Settings.xml
hfd-service-0.2.2/debian/libqt5feedback5-hfd.install 0000664 0000000 0000000 00000000065 14554502344 0022224 0 ustar 00root root 0000000 0000000 /usr/lib/*/qt5/plugins/feedback/libqtfeedback_hfd.so
hfd-service-0.2.2/debian/qml-module-hfd.install 0000664 0000000 0000000 00000000031 14554502344 0021337 0 ustar 00root root 0000000 0000000 /usr/lib/*/qt5/qml/Hfd/*
hfd-service-0.2.2/debian/rules 0000775 0000000 0000000 00000000143 14554502344 0016220 0 ustar 00root root 0000000 0000000 #!/usr/bin/make -f
%:
dh $@ --buildsystem cmake
override_dh_missing:
dh_missing --fail-missing
hfd-service-0.2.2/init/ 0000775 0000000 0000000 00000000000 14554502344 0014663 5 ustar 00root root 0000000 0000000 hfd-service-0.2.2/init/CMakeLists.txt 0000664 0000000 0000000 00000001265 14554502344 0017427 0 ustar 00root root 0000000 0000000 ##
## Systemd Unit File
##
pkg_check_modules(SYSTEMD systemd)
if (${SYSTEMD_FOUND})
pkg_get_variable(SYSTEMD_SYSTEM_DIR systemd systemdsystemunitdir)
message (STATUS "${SYSTEMD_SYSTEM_DIR} is the systemd system unit file install dir")
set (SYSTEMD_SYSTEM_NAME "${CMAKE_PROJECT_NAME}.service")
set (SYSTEMD_SYSTEM_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SYSTEMD_SYSTEM_NAME}")
set (SYSTEMD_SYSTEM_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SYSTEMD_SYSTEM_NAME}.in")
# build it
configure_file ("${SYSTEMD_SYSTEM_FILE_IN}" "${SYSTEMD_SYSTEM_FILE}")
# install it
install (FILES "${SYSTEMD_SYSTEM_FILE}"
DESTINATION "${SYSTEMD_SYSTEM_DIR}")
endif()
hfd-service-0.2.2/init/hfd-service.service.in 0000664 0000000 0000000 00000000371 14554502344 0021052 0 ustar 00root root 0000000 0000000 [Unit]
Description=HFD system service
Documentation=https://gitlab.com/ubports/core/hfd-service/
[Service]
Type=dbus
BusName=com.lomiri.hfd
ExecStart=@CMAKE_INSTALL_FULL_LIBEXECDIR@/hfd-service
Restart=on-failure
[Install]
WantedBy=default.target
hfd-service-0.2.2/qt/ 0000775 0000000 0000000 00000000000 14554502344 0014344 5 ustar 00root root 0000000 0000000 hfd-service-0.2.2/qt/CMakeLists.txt 0000664 0000000 0000000 00000000070 14554502344 0017101 0 ustar 00root root 0000000 0000000 add_subdirectory(feedback-plugin)
add_subdirectory(qml)
hfd-service-0.2.2/qt/demo/ 0000775 0000000 0000000 00000000000 14554502344 0015270 5 ustar 00root root 0000000 0000000 hfd-service-0.2.2/qt/demo/feedback.qml 0000664 0000000 0000000 00000001637 14554502344 0017536 0 ustar 00root root 0000000 0000000 import QtQuick 2.7
import Ubuntu.Components 1.3
import QtFeedback 5.0
MainView {
id: root
objectName: 'mainView'
applicationName: "app"
automaticOrientation: true
width: units.gu(45)
height: units.gu(75)
Page {
anchors.fill: parent
header: PageHeader {
id: header
title: i18n.tr("led test")
}
Column {
anchors {
top: header.bottom
left: parent.left
right: parent.right
bottom: parent.bottom
}
Button {
text: "feedback"
onClicked: haptic.start();
}
}
HapticsEffect {
id: haptic
attackIntensity: 0.0
attackTime: 50
intensity: 1.0
duration: 100
fadeTime: 50
fadeIntensity: 0.0
}
}
}
hfd-service-0.2.2/qt/demo/leds.qml 0000664 0000000 0000000 00000001204 14554502344 0016727 0 ustar 00root root 0000000 0000000 import QtQuick 2.7
import Ubuntu.Components 1.3
import Hfd 0.1
MainView {
id: root
objectName: 'mainView'
applicationName: "app"
automaticOrientation: true
width: units.gu(45)
height: units.gu(75)
Page {
anchors.fill: parent
header: PageHeader {
id: header
title: i18n.tr("led test")
}
Column {
anchors.fill: parent
Button {
text: "on"
onClicked: Leds.state = Leds.state == 0 ? 1 : 0
}
Label {
text: "state: " + Leds.state
}
}
}
}
hfd-service-0.2.2/qt/feedback-plugin/ 0000775 0000000 0000000 00000000000 14554502344 0017364 5 ustar 00root root 0000000 0000000 hfd-service-0.2.2/qt/feedback-plugin/CMakeLists.txt 0000664 0000000 0000000 00000001700 14554502344 0022122 0 ustar 00root root 0000000 0000000 find_package(PkgConfig)
find_package(Qt5Core REQUIRED)
find_package(Qt5DBus REQUIRED)
find_package(Qt5Feedback REQUIRED)
qt5_add_resources(FEEDBACK_RESOURCES feedback.qrc)
set(QTFEEDBACK_HFD_SRC
hfd_feedback.h
hfd_feedback.cpp
)
qt5_add_dbus_interface(QTFEEDBACK_HFD_SRC
${CMAKE_SOURCE_DIR}/data/com.lomiri.hfd.xml hfdInterface
)
add_library(
qtfeedback_hfd SHARED
${QTFEEDBACK_HFD_SRC}
${FEEDBACK_RESOURCES}
)
# Ideally, we would read the plugin installation location from cmake
# but this does not work currently.
set(PLUGIN_INSTALL_LOCATION "${CMAKE_INSTALL_LIBDIR}/qt5/plugins/feedback")
# get_target_property(PLUGIN_LOCATION Qt5::Feedback PLUGIN_LOCATION)
message(STATUS "Installing Qt5 feedback plugin to: ${PLUGIN_INSTALL_LOCATION}")
target_link_libraries(
qtfeedback_hfd
${CMAKE_THREAD_LIBS_INIT}
Qt5::Core
Qt5::DBus
Qt5::Feedback
)
install(
TARGETS qtfeedback_hfd
LIBRARY DESTINATION ${PLUGIN_INSTALL_LOCATION})
hfd-service-0.2.2/qt/feedback-plugin/feedback.json 0000664 0000000 0000000 00000000060 14554502344 0021777 0 ustar 00root root 0000000 0000000 { "Interfaces": ["QFeedbackHapticsInterface"] }
hfd-service-0.2.2/qt/feedback-plugin/feedback.qrc 0000664 0000000 0000000 00000000141 14554502344 0021613 0 ustar 00root root 0000000 0000000
feedback.json