https://wiki.merproject.org/wiki/index.php?title=Nemo/NonGraphicFeedback&feed=atom&action=history
Nemo/NonGraphicFeedback - Revision history
2024-03-28T21:06:38Z
Revision history for this page on the wiki
MediaWiki 1.19.20+dfsg-2.3
https://wiki.merproject.org/wiki/index.php?title=Nemo/NonGraphicFeedback&diff=5347&oldid=prev
Jhamalai: Initial page
2015-05-26T07:48:07Z
<p>Initial page</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 07:48, 26 May 2015</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 17:</td>
<td colspan="2" class="diff-lineno">Line 17:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>  # List all events</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>  # List all events</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>  $ grep -e '\[.*\]' /usr/share/ngfd/events.d/* | cut -d: -f2</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>  $ grep -e '\[.*\]' /usr/share/ngfd/events.d/* | cut -d: -f2</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">Basic playback with libngf-qt is as simple as</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"> Ngf::Client *client = new Ngf::Client(this);</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"> client->connect();</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"> client->play("ringtone");</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"> client->stop("ringtone");</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Writing Events ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Writing Events ==</div></td></tr>
<!-- diff cache key wiki_merproject_db:diff:version:1.11a:oldid:5346:newid:5347 -->
</table>
Jhamalai
https://wiki.merproject.org/wiki/index.php?title=Nemo/NonGraphicFeedback&diff=5346&oldid=prev
Jhamalai: Initial page
2015-05-26T07:42:14Z
<p>Initial page</p>
<p><b>New page</b></p><div>= Non Graphic Feedback in Nemo =<br />
<br />
Non graphic feedback is for example ringtones, notification tones, blinking LED, vibration, etc. effects meant for providing non graphical information to user. One key element for this in Nemo is NGFD, or Non Graphic Feedback Daemon.<br />
<br />
== Relevant Components ==<br />
<br />
* [https://github.com/nemomobile/ngfd/ ngfd]<br />
* [https://github.com/nemomobile/libngf/ libngf]<br />
* [https://github.com/nemomobile/libngf-qt/ libngf-qt]<br />
<br />
== Usage ==<br />
<br />
ngfd has D-Bus API for launching NGF Events. So that everyone wouldn't need to implement the API use themselves, two libraries abstracting the API exist, one for C ([https://github.com/nemomobile/libngf/ libngf]) and one for Qt/QML ([https://github.com/nemomobile/libngf-qt/ libngf-qt]).<br />
<br />
Libraries themselves do not contain any way to list available events, but available events on device can be seen by listing /usr/share/ngfd/events.d/ where usually one configuration file matches one event.<br />
<br />
# List all events<br />
$ grep -e '\[.*\]' /usr/share/ngfd/events.d/* | cut -d: -f2<br />
<br />
== Writing Events ==<br />
<br />
TODO<br />
<br />
== Testing ==<br />
<br />
Events can be played from command line using '''ngf-client''' from libngf.<br />
<br />
$ ngf-client<br />
simple ngf client<br />
> play ringtone<br />
PLAY (event=ringtone, event_id=1)<br />
> <br />
Playing (event_id=1)<br />
> stop 1<br />
STOP (event_id=1)<br />
> <br />
Paused (event_id=1)<br />
> <br />
Completed (event_id=1)</div>
Jhamalai