The Usage interface provides access to subsystem resource management. The usage manager keeps track of all users per resource and will enable or disable the associated hardware/software as requested. Before an application can make use of a subsystem, it needs to request the resource first and is only allowed to use it if the request has been granted.
org.freesmartphone.Usage
Description: Register yourself as provider for a given resource.
Providers can chose the name of the resource freely, note that there are some well known names such as:
The resource name.
o: pathThe resource path.
Description: Unregister yourself as provider for a given resource.
Leaving the bus will automatically unregister yourself for all resources you are providing.
The resource name.
Description: List available resources.
An array of resource names.
Description: Get the current resource policy for a given resource.
The resource name.
The resource policy. Expected values are:
Description: Set a new resource policy for a given resource.
The resource name.
s: policyThe new resource policy. See GetResourcePolicy for a list of valid values.
Description: Get the current state for a given resource.
The resource name.
The resource state. True if the resource is currently enabled.
Description: Get the users which currently use a given resource.
The resource name.
An array of bus names using the resource.
Description: Request occupation of a given resource. An error is returned if the resource was not occupied sucessfully.
The resource name.
Description: Release a given resource.
Resources in use get autoreleased when a client leaves the bus.
The resource name.
Description: Triggers a suspend on all managed resources and puts the device into suspend mode. When the device comes back from suspend, all resources are resumed. All Resources need to implement Suspend and Resume if they have anything to prepare / recover on suspend and resume.
Description: Triggers a shutdown of all managed resources and powers the device down.
Description: Triggers a reboot of the device.
Description: Sent whenever a resource is added or removed.
The name of the resource.
b: availabilityThe resource availability. True if the resource is currently available.
Description: Sent whenever a resource status changes.
The name of the resource.
b: stateThe resource state. True if the resource is currently enabled.
a{sv}: attributesThe new status of the resource. Expected values are:
Description: Sent whenever a system state action is performed.
The name of the action. Expected values are:
Description: Raised, if the requested policy is unknown.
Description: Raised, if the requested resource is set to policy "disabled".
Description: Raised, if the requested resource is unknown.
Description: Raised, if a (new) resource has already been registered.
Description: Raised, if the to-be-disabled (by policy) resource is still in use.
Description: Raised, if the requested resource has already been requested by the same user.
Description: Raised, if the to-be-released resource has never been requested by the user.