freesmartphone.org Preferences Service Interface

Description

The service object deals with configuration values of a given service The service can set and get the value of parameters. The services are used to group related parameters together. Basically, every application using the config server should use its own service name. For each service we need a schema file describing the parameters the service provides. The configurations values are stored in yaml file. Each conf file contains all the parameters for a given service in a given context. The conf files are organised with the following file hierachy : conf/$(service)/$(profile).yaml All the parameters that are independant of the profile are stored in the ‘default’ profile file. When we set or get parameters, the service server takes into account the current profile, so the applications using the service don’t need to know about the current profile.

Namespace

org.freesmartphone.Preferences.Service

Methods

Signals

Properties

None

Errors

None

Methods

GetKeys ( ) → as

Description: Retrieve all the keys of the service. This method should be used only for introspection purposes.

Returns:

as: keys The list of keys.

GetValue ( s ) → v

Description: Get a parameter value.

Parameters:*

s: key The parameter key string.

Returns:

v: value The value associated with the key.

SetValue ( sv )

Description: Set a parameter value.

Parameters:*

s: key The parameter key string.

v: value The new value associated with the key.

IsProfilable ( s ) → b

Description: Return true if a parameter depends on the current profile.

Parameters:*

s: key The parameter key string.

Returns:

b: profileable True if a parameter depends on the current profile.

GetType ( s ) → s

Description: Return a string representing the type of the parameter.

Parameters:*

s: key The parameter key string.

Returns:

s: type A string representing the type of the parameter.

Signals

Notify ( sv )

Description: Sent whenever there is a change in a parameter value in the service

Parameters:

s: key The parameter key string.

v: value The new value of the parameter.