Example of updating event feed with a D-Bus call

The most common scenarios for event feed updates are when user interactions trigger the update or when a scheduled update from the Synchronization Framework plugin occurs. However, the request to refresh feed content can also originate from the Events View, for example, when the device user taps the refresh button.

When the refresh requests come from the Events View, the Events View and the application that generates the feed communicate over D-Bus. To facilitate this, the application needs to do the following:

With the above line, qdbusxml2cpp generates an ExampleAdaptor class that uses Example as its parent class and creates an #include line for example.h header file. The Example class and the example.h header file are created later.

4. Within the application that generates the event feed items, you must create an instance of the Example class and the corresponding generated D-Bus wrapper class (ExampleAdaptor in this case). To register your application in the session bus, use the following:

4. Since MRemoteAction is a MeeGo Touch class, add the following line into your project file:

CONFIG += meegotouch

Your new D-Bus service is now registered to receive refresh requests.

Starting your D-Bus service automatically

Normally, your application is not running all the time. If you want your application to start up automatically when an event feed refresh request occurs, you must define it in a D-Bus .service file. The .service file notifies the device system which executable must be run when the D-Bus call (for com.mycompany.example in this example) is received.

With the names and parameters used in this example, and an application installed in /opt/exampleapplication/bin/exampleapplication, the .service file looks like this: