Skip to content

marxoft/hildonevents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hildon Event Feed

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.

D-Bus interface

Service name: org.hildon.eventfeed

Path: /org/hildon/eventfeed

Interface name: org.hildon.eventfeed

D-Bus methods

addItem

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.

addRefreshAction

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.

removeItem

Signature: i

Removes the item with the specified unique identifier.

removeItemsBySourceName

Signature: s

Removes all items with the specified source name.

removeRefreshAction

Signature: s

Removes the specified refresh action.

updateItem

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.

D-Bus signals

refreshRequested

Emitted when the 'refresh' button is pressed in the user interface.

Settings API

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.

Example

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
}

About

An event feed for Maemo5, similar to that in Meego-Harmattan.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published