API discussion: Ambience DBus API

asked 2014-07-22 20:16:01 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2014-07-25 16:38:12 +0200

Kari gravatar image

Hello TJC

Following what has been decided during today's Sailfish OSS meeting, I would like to open a first discussion about internal API to be provided for developers to take advantages of all the capabilities of Sailfish OS.

One of the specific capabilities of Sailfish OS is the ambience system. It's a profile system that is extended to changing the whole phone (currently wallpaper + sounds).

Accessing this feature is currently done via a QML module (Sailfish.Ambience), that is only usable from privileged applications. It can also be accessed via an userspace daemon, ambienced, that provides a DBus API accessible through com.jolla.ambienced.

This API is quite limited as it only allows setting an ambience from an image.

I can understand that allowing the QML module to be used might cause problems, either with API breakage, or with security, since the Ambience db is privileged for a reason. In the other hand, the DBus API is safer: an API change will only trigger a runtime error, and the API can be made to only leak minimal data for the developer. That's why I'm asking to extend this API to allow developers to take advantage of Ambiences.

I would like to discuss with you about the API you (developers) want to see for Ambience, and what you (sailors) can provide. What I expect personally as a basis would be - Setting an ambience (already existing) - Getting the list of favourited ambiences (name + image path)

Some more advanced API can be welcomed too - Getting a favourited ambience highlight colors - Favouriting / unfavouriting an ambience

This topic is linked to ML and will serve as a wiki for describing the API.

edit retag flag offensive close delete