@@ -0,0 +1,128 @@
|
||||
{
|
||||
"name" : "default",
|
||||
"profiles" : [
|
||||
{
|
||||
"name" : "full",
|
||||
"feedbacks" : [
|
||||
{
|
||||
"event-name" : "phone-incoming-call",
|
||||
"type" : "Sound",
|
||||
"effect" : "phone-incoming-call"
|
||||
},
|
||||
{
|
||||
"event-name" : "message-new-instant",
|
||||
"type" : "Sound",
|
||||
"effect" : "message-new-instant"
|
||||
},
|
||||
{
|
||||
"event-name" : "message-new-sms",
|
||||
"type" : "Sound",
|
||||
"effect" : "message-new-instant"
|
||||
},
|
||||
{
|
||||
"event-name" : "message-new-email",
|
||||
"type" : "Sound",
|
||||
"effect" : "message-new-email"
|
||||
},
|
||||
{
|
||||
"event-name" : "alarm-clock-elapsed",
|
||||
"type" : "Sound",
|
||||
"effect" : "alarm-clock-elapsed"
|
||||
},
|
||||
{
|
||||
"event-name" : "theme-demo",
|
||||
"type" : "Sound",
|
||||
"effect" : "theme-demo"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "quiet",
|
||||
"feedbacks" : [
|
||||
{
|
||||
"event-name" : "phone-incoming-call",
|
||||
"type" : "VibraPeriodic",
|
||||
"duration" : 10000
|
||||
},
|
||||
{
|
||||
"event-name" : "phone-missed-call",
|
||||
"type" : "VibraRumble",
|
||||
"duration" : 300
|
||||
},
|
||||
{
|
||||
"event-name" : "message-new-instant",
|
||||
"type" : "VibraRumble",
|
||||
"duration" : 150
|
||||
},
|
||||
{
|
||||
"event-name" : "message-new-sms",
|
||||
"type" : "VibraRumble",
|
||||
"duration" : 500,
|
||||
"count" : 2,
|
||||
"pause" : 100
|
||||
},
|
||||
{
|
||||
"event-name" : "message-new-email",
|
||||
"type" : "VibraRumble",
|
||||
"duration" : 750,
|
||||
"count" : 3,
|
||||
"pause" : 100
|
||||
},
|
||||
{
|
||||
"event-name" : "message-sent-instant",
|
||||
"type" : "VibraRumble",
|
||||
"duration" : 150
|
||||
},
|
||||
{
|
||||
"event-name" : "bell-terminal",
|
||||
"type" : "VibraRumble",
|
||||
"duration" : 100
|
||||
},
|
||||
{
|
||||
"event-name" : "alarm-clock-elapsed",
|
||||
"type" : "VibraPeriodic",
|
||||
"magnitude" : 32767,
|
||||
"duration" : 10000,
|
||||
"fade-in-time" : 10000,
|
||||
"fade-in-level": 4096
|
||||
},
|
||||
{
|
||||
"event-name" : "teme-demo",
|
||||
"type" : "VibraPeriodic",
|
||||
"magnitude" : 32767,
|
||||
"duration" : 5000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "silent",
|
||||
"feedbacks" : [
|
||||
{
|
||||
"event-name" : "phone-missed-call",
|
||||
"type" : "Dummy",
|
||||
"duration" : 10000
|
||||
},
|
||||
{
|
||||
"event-name" : "message-missed-email",
|
||||
"type" : "Dummy",
|
||||
"duration" : 10000
|
||||
},
|
||||
{
|
||||
"event-name" : "message-missed-instant",
|
||||
"type" : "Dummy",
|
||||
"duration" : 10000
|
||||
},
|
||||
{
|
||||
"event-name" : "message-missed-sms",
|
||||
"type" : "Dummy",
|
||||
"duration" : 10000
|
||||
},
|
||||
{
|
||||
"event-name" : "battery-caution",
|
||||
"type" : "Dummy",
|
||||
"duration" : 10000
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
# DBus server interface
|
||||
prefix = 'org.sigxcpu.'
|
||||
namespace = 'LfbGdbus'
|
||||
|
||||
generated_dbus_sources = []
|
||||
|
||||
dbus_interfaces = [ 'org.sigxcpu.Feedback.xml' ]
|
||||
|
||||
generated_dbus_sources += gnome.gdbus_codegen('lfb-gdbus',
|
||||
sources : dbus_interfaces,
|
||||
object_manager : false,
|
||||
docbook : 'libfeedback',
|
||||
interface_prefix : prefix,
|
||||
install_header : true,
|
||||
install_dir : join_paths(get_option('includedir'), libname),
|
||||
namespace : namespace)
|
||||
|
||||
dbus_header_dir = meson.current_build_dir()
|
||||
dbus_inc = include_directories('.')
|
||||
install_data(dbus_interfaces, install_dir: ifacedir)
|
||||
|
||||
schemas = ['org.sigxcpu.feedbackd.gschema.xml']
|
||||
compiled = gnome.compile_schemas(
|
||||
build_by_default: true
|
||||
)
|
||||
|
||||
install_data(
|
||||
schemas,
|
||||
install_dir: 'share/glib-2.0/schemas'
|
||||
)
|
||||
|
||||
|
||||
if get_option('daemon')
|
||||
|
||||
service_data = configuration_data()
|
||||
service_data.set('libexecdir', libexecdir)
|
||||
service_file = 'org.sigxcpu.Feedback.service'
|
||||
|
||||
configure_file(
|
||||
input : service_file + '.in',
|
||||
output : service_file,
|
||||
configuration : service_data,
|
||||
install : true,
|
||||
install_dir: servicedir,
|
||||
)
|
||||
|
||||
theme_json = ['default.json']
|
||||
install_data(
|
||||
theme_json,
|
||||
install_dir: feedbackd_theme_dir,
|
||||
)
|
||||
|
||||
if json_glib_validate.found()
|
||||
jsons = []
|
||||
foreach theme : theme_json
|
||||
jsons += (join_paths(meson.current_source_dir(), theme_json))
|
||||
endforeach
|
||||
custom_target('validate-json',
|
||||
build_by_default: true,
|
||||
input: theme_json,
|
||||
output: 'json_validate_stamp',
|
||||
command: [json_glib_validate.path()] + jsons)
|
||||
endif
|
||||
|
||||
endif # daemon
|
||||
@@ -0,0 +1,4 @@
|
||||
[D-BUS Service]
|
||||
Name=org.sigxcpu.Feedback
|
||||
Exec=@libexecdir@/feedbackd
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<node>
|
||||
<!-- org.sigxcpu.Feedback
|
||||
@short_description: haptic/audio/visual feedback interface
|
||||
|
||||
This D-Bus interface is used to get the current feedback theme
|
||||
and to give feedback on events.
|
||||
-->
|
||||
<interface name="org.sigxcpu.Feedback">
|
||||
<!--
|
||||
Profile: The currently used profile.
|
||||
|
||||
The currently used feedback profile name. Applications should
|
||||
usually not change this value but leave.
|
||||
-->
|
||||
<property name="Profile" type="s" access="readwrite" />
|
||||
|
||||
<!--
|
||||
TriggerFeedback:
|
||||
@app_id: The application id usually in reverse "reverse DNS" format
|
||||
@event: The event name from the Event naming spec
|
||||
@hints: Additional hints (e.g. to prefer haptic feedback over audio feedback on button press events, currently unused)
|
||||
@timeout: When the feedbacks for this event should end latest. The special values '-1' (just run each feedack once) and '0' (endless loop) are also supported.
|
||||
@id: Event id for future reference
|
||||
|
||||
Give user feedback for an event by triggering feedbacks
|
||||
defined in the daemon. The method call returns an event id
|
||||
that can be used to later on to e.g. cancel the triggered
|
||||
feedbacks early.
|
||||
|
||||
Depending on the event, theme and profile several forms of
|
||||
feedback will be triggered such as an audio ring tone and a
|
||||
haptic motor.
|
||||
-->
|
||||
<method name="TriggerFeedback">
|
||||
<arg direction="in" name="app_id" type="s"/>
|
||||
<arg direction="in" name="event" type="s"/>
|
||||
<arg direction="in" name="hints" type="a{sv}"/>
|
||||
<arg direction="in" name="timeout" type="i"/>
|
||||
<arg direction="out" name="id" type="u"/>
|
||||
</method>
|
||||
|
||||
<!--
|
||||
EndFeedback:
|
||||
@id: The id of the event
|
||||
|
||||
End all feedbacks triggered by the event with the given id.
|
||||
-->
|
||||
<method name="EndFeedback">
|
||||
<arg direction="in" name="id" type="u"/>
|
||||
</method>
|
||||
|
||||
<!--
|
||||
FeedbackEnded:
|
||||
@id: The id of the event
|
||||
@reason: The reason why feedback was ended (currently unused).
|
||||
|
||||
Emitted when all feedbacks for an event have ended.
|
||||
-->
|
||||
<signal name="FeedbackEnded">
|
||||
<arg name="id" type="u"/>
|
||||
<arg name="reason" type="u"/>
|
||||
</signal>
|
||||
</interface>
|
||||
|
||||
</node>
|
||||
@@ -0,0 +1,18 @@
|
||||
<schemalist>
|
||||
<schema id="org.sigxcpu.feedbackd"
|
||||
path="/org/sigxcpu/feedbackd/">
|
||||
<key name="profile" type="s">
|
||||
<choices>
|
||||
<choice value='full'/>
|
||||
<choice value='quiet'/>
|
||||
<choice value='silent'/>
|
||||
</choices>
|
||||
<default>'full'</default>
|
||||
<summary>Feedack profile to use</summary>
|
||||
<description>
|
||||
The feedback profile determines the audio and haptical feedback
|
||||
level given on events to the user.
|
||||
</description>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
||||
Reference in New Issue
Block a user