Hildon Event Feed provides an event feed for Maemo5, similar to that in Meego-Harmattan. Applications can interact with the event feed using D-Bus.
Service name: org.hildon.eventfeed
Path: /org/hildon/eventfeed
Interface name: org.hildon.eventfeed
Signature: a{s,v}
Returns: i
Adds an item to the event feed using the supplied parameters, and returns a unique identifer for the item, or -1 if there is an error.
The following parameters can be supplied:
Name | Type | Mandatory | Description |
---|---|---|---|
icon | string | No | The absolute path or name of the item's icon. |
title | string | Yes | The item title. |
body | string | No | The item description. |
imageList | array(string) | No | A list of paths to the item's images. |
timestamp | datetime | No | The timestamp for the item in ISO 8601 format (YYYY-MM-DDTHH:mm:ss). |
footer | string | No | The item's footer. |
video | boolean | No | Whether the item represents a video. |
url | string | Yes | The item's url. |
action | string | No | The custom command to be executed when the item is activated. |
sourceName | string | Yes | A unique identifier for item's source, such as the application name. |
sourceDisplayName | string | No | The display name of the item's source. |
Signature: s
Adds an action to the event feed that consists of a command that is to be executed when the 'refresh' button is pressed in the user interface, enabling the user to retrieve further events from the source.
Signature: i
Removes the item with the specified unique identifier.
Signature: s
Removes all items with the specified source name.
Signature: s
Removes the specified refresh action.
Signature: ia{s,v}
Updates the item with the specified unique identifer using the supplied parameters. See the addItem method for the list of acceptable parameters.
Emitted when the 'refresh' button is pressed in the user interface.
Hildon Event Feed can display settings for individual feeds via the settings API. To provide settings for a feed, place a .desktop file in /opt/hildonevents/settings/. The .desktop should provide the following values:
Name | Description |
---|---|
Name | The feed's display name. |
Icon | The absolute path or name of the feed's icon. |
Type | The settings type. Can be 'QML' or 'Application'. |
Exec | The path to the QML file or executable. |
An example settings desktop file for 'My Feed':
[Desktop Entry]
Name=My Feed
Icon=myfeed
Type=QML
Exec=/opt/myfeed/qml/SettingsDialog.qml
An example settings dialog for 'My Feed':
import QtQuick 1.0
import org.hildon.components 1.0
import org.hildon.settings 1.0
Dialog {
id: dialog
title: "My Feed Settings"
height: column.height + platformStyle.paddingMedium
GConfItem {
id: gconf
key: "/apps/myfeed/feed_url"
}
Column {
id: column
anchors {
left: parent.left
right: button.left
rightMargin: platformStyle.paddingMedium
bottom: parent.bottom
}
spacing: platformStyle.paddingMedium
Label {
width: parent.width
text: "Feed URL"
}
TextField {
id: textField
width: parent.width
text: gconf.value
}
}
Button {
id: button
anchors {
right: parent.right
bottom: parent.bottom
}
style: DialogButtonStyle {}
text: "Done"
enabled: textField.text != ""
onClicked: dialog.accept()
}
onAccepted: gconf.value = textField.text
}