| exo Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#include <exo-hal/exo-hal.h> gboolean exo_hal_init (void); gboolean exo_hal_udi_validate (const gchar *udi,gssize len,gchar **end); gchar * exo_hal_drive_compute_display_name (struct LibHalContext_s *context,struct LibHalDrive_s *drive); GList * exo_hal_drive_compute_icon_list (struct LibHalContext_s *context,struct LibHalDrive_s *drive); gchar * exo_hal_volume_compute_display_name (struct LibHalContext_s *context,struct LibHalVolume_s *volume,struct LibHalDrive_s *drive); GList * exo_hal_volume_compute_icon_list (struct LibHalContext_s *context,struct LibHalVolume_s *volume,struct LibHalDrive_s *drive);
This is an additional library that ships with the exo package and offers support functions for HAL integration, that are used by exo-mount and Thunar to figure out display names and icons to visually present HAL devices to the user. The library may also be used by other components to offer smooth integration between various parts of the desktop, making sure that the same names and icons are used for devices everywhere.
Since HAL is currently an optional dependency for Xfce, you should first check whether HAL support is
really available by calling the
function, which returns exo_hal_init()TRUE if HAL support is available and the other functions will
be able to do their work, or FALSE if the functions will return hardcoded default
values instead. The also takes
care of setting up the internationalization support, so make sure you call it first.
exo_hal_init()
The HAL support module is not part of the main exo library, so you if you want to
use any of these functions you will need to explicitly link to the exo-hal library.
This is done with the pkg-config utility, using exo-hal-0.3 as
the package name.
gboolean exo_hal_init (void);
Initializes the HAL support module, which includes setting up the
internationalization support. Returns TRUE if support for HAL was
enabled at compile time, FALSE otherwise.
Make sure you call this function first prior to calling any of the functions below.
Returns : |
TRUE if HAL support is available, FALSE otherwise.
|
Since 0.3.1.13
gboolean exo_hal_udi_validate (const gchar *udi,gssize len,gchar **end);
Checks that the given range of the udi is a valid HAL device UDI (i.e. a valid
D-BUS object path name in the D-BUS protocol). Part of the validation ensures
that the udi contains only ASCII.
If end is non-NULL, then then end of the valid range will be stored there (i.e. the
start of the first invalid character if some bytes were invalid, or unt