# Class e.p.h.h.HALResource(ResourceProvider):

Part of elisa.plugins.hal.hal_resource View In Hierarchy

HAL resource provider. Provides volumes:// URI and sends messages on the bus when devices are plugged or unplugged (devices include CDs and DVDs).

Line # | Kind | Name | Docs
--- | --- | --- | ---
56 | Method | initialize | Initialize the component.
83 | Method | clean | Clean the component.
99 | Method | get | Simple method to retrieve volumes. You can access it with
153 | Method | stop_volume_manager_monitoring | Neutralize some of the volume_manager monitoring settings so
161 | Method | restore_volume_manager_monitoring | Restore the volume_manager gconf settings

Inherited from ResourceProvider:

Line # | Kind | Name | Docs
--- | --- | --- | ---
94 | Method | post | Update the resource pointed by `uri` with `parameters`.
107 | Method | put | Put one resource into another. Both resources are identified with URIs.
129 | Method | delete | Delete a Resource represented by a URI.

Inherited from Component (via ResourceProvider):

Line # | Kind | Name | Docs
--- | --- | --- | ---
85 | Class | PathDescriptor | Undocumented
97 | Class Method | create | Create and initialize the component.

Inherited from Loggable (via ResourceProvider, Component):

Line # | Kind | Name | Docs
--- | --- | --- | ---
81 | Method | __init__ | Undocumented

def initialize(self):
overrides elisa.core.component.Component.initialize

Initialize the component.

This method is called by `Component.create` to finish the initialization of a component.

Returns | a deferred called when a component is fully initialized (type: `twisted.internet.defer.Deferred` )

def clean(self):
overrides elisa.core.component.Component.clean

Clean the component.

This method is called when a component is not needed anymore to clean its state.

Returns | a deferred called when the component has finished cleaning its state (type: `twisted.internet.defer.Deferred` )

def get(self, uri, context_model=None):
overrides elisa.core.components.resource_provider.ResourceProvider.get
Simple method to retrieve volumes. You can access it with `volumes://` and apply a filter parameter. If you specify it only these kind of volumes show up. Example:

:

     C{volumes://localhost/?filter=dvd,cdda}

would only give you dvds and cddas. The three knows filters are: dvd, removable and cdda.

The default is that all filters are applied (like filter=dvd,cdda,removable).

In return you get a `elisa.plugins.base.models.device.DevicesModel`

def stop_volume_manager_monitoring(self):
Neutralize some of the volume_manager monitoring settings so that the user won't see rhythmbox pop up when an iPod is inserted (for example).

def restore_volume_manager_monitoring(self):
Restore the volume_manager gconf settings