freesmartphone.org Resource Interface

Description

The Resource interface provides access to a resource as visible from the FSO usage subsystem. Every resource provider has to implement this interface. Applications other than FSO usage are not allowed to use this interface, they have to use the org.freesmartphone.Usage API.

Namespace

org.freesmartphone.Resource

Methods

Signals

None

Properties

None

Errors

Methods

Enable ( )

Description: Enable the resource.

Disable ( )

Description: Disable the resource.

Suspend ( )

Description: Suspend the resource.

Resume ( )

Description: Resume the resource.

GetDependencies ( ) → a{sv}

Description: The resource is able to lists its dependencies. For example a resource can depend on another resource. If this resource is enabled the dependency resource will be enabled first.

Returns:

a{sv}: dependencies Dependencies required for resource operation. Expected values are:

  • “services”: A comma-separated string of service names
  • “processes”: A comma-separated string of process names
Dependencies are being activated / deactivated as defined by the resource lifecycle.

GetDefaultPolicy ( ) → s

Description: The resource is able to provide the default policy to use.

Returns:

s: policy The default policy to use for this resource. See GetResourcePolicy for a list of possible values.

Errors

NotEnabled

Description: Raised, if the resource is not enabled.

UnableToEnable

Description: Raised, if the resource can not be enabled.