hf-util
3
HAL Library

# hf-util

## Synopsis

    #define     HF_COMPUTER
    #define     HF_BOOL_TO_STRING               (val)
    #define     HF_LIST_FOREACH                 (var, head)
    extern      int hf_is_waiting;
    HalDevice*  hf_device_new                   (HalDevice *parent);
    gboolean    hf_device_preprobe              (HalDevice *device);
    void        hf_device_add                   (HalDevice *device);
    gboolean    hf_device_preprobe_and_add      (HalDevice *device);
    void        hf_device_remove                (HalDevice *device);
    void        hf_device_remove_children       (HalDevice *device);
    void        hf_device_remove_tree           (HalDevice *device);
    void        hf_device_set_udi               (HalDevice *device,
                                                 const char *format,
                                                 ...);
    void        hf_device_set_full_udi          (HalDevice *device,
                                                 const char *format,
                                                 ...);
    void        hf_device_property_set_string_printf
                                                (HalDevice *device,
                                                 const char *key,
                                                 const char *format,
                                                 ...);
    void        hf_device_set_input             (HalDevice *device,
                                                 const char *class,
                                                 const char *devname);
    gboolean    hal_properties_equal            (HalProperty *a,
                                                 HalProperty *b);
    HalDevice*  hf_device_store_match           (HalDeviceStore *store,
                                                 ...);
    HalDevice*  hf_device_store_get_parent      (HalDeviceStore *store,
                                                 HalDevice *device);
    GSList*     hf_device_store_get_children    (HalDeviceStore *store,
                                                 HalDevice *device);
    gboolean    hf_has_sysctl                   (const char *format,
                                                 ...);
    gboolean    hf_get_int_sysctl               (int *value,
                                                 GError **err,
                                                 const char *format,
                                                 ...);
    char*       hf_get_string_sysctl            (GError **err,
                                                 const char *format,
                                                 ...);
    char*       hf_run                          (GError **err,
                                                 const char *format,
                                                 ...);
    int         hf_runner_run_sync              (HalDevice *device,
                                                 int timeout,
                                                 const char *command_line,
                                                 ...);
    int         hf_strv_find                    (char **strv,
                                                 const char *elem);

## Description

## Details

### HF_COMPUTER

    #define HF_COMPUTER		"/org/freedesktop/Hal/devices/computer"

### HF_BOOL_TO_STRING()

    #define HF_BOOL_TO_STRING(val)	((val) ? "true" : "false")

`val` :

### HF_LIST_FOREACH()

    #define     HF_LIST_FOREACH(var, head)

`var` :

`head` :

### hf_is_waiting

    extern int hf_is_waiting;

### hf_device_new ()

    HalDevice*  hf_device_new                   (HalDevice *parent);

`parent` :

Returns :

### hf_device_preprobe ()

    gboolean    hf_device_preprobe              (HalDevice *device);

`device` :

Returns :

### hf_device_add ()

    void        hf_device_add                   (HalDevice *device);

`device` :

### hf_device_preprobe_and_add ()

    gboolean    hf_device_preprobe_and_add      (HalDevice *device);

`device` :

Returns :

### hf_device_remove ()

    void        hf_device_remove                (HalDevice *device);

`device` :

### hf_device_remove_children ()

    void        hf_device_remove_children       (HalDevice *device);

`device` :

### hf_device_remove_tree ()

    void        hf_device_remove_tree           (HalDevice *device);

`device` :

### hf_device_set_udi ()

    void        hf_device_set_udi               (HalDevice *device,
                                                 const char *format,
                                                 ...);

`device` :

`format` :

`...` :

### hf_device_set_full_udi ()

    void        hf_device_set_full_udi          (HalDevice *device,
                                                 const char *format,
                                                 ...);

`device` :

`format` :

`...` :

### hf_device_property_set_string_printf ()

    void        hf_device_property_set_string_printf
                                                (HalDevice *device,
                                                 const char *key,
                                                 const char *format,
                                                 ...);

`device` :

`key` :

`format` :

`...` :

### hf_device_set_input ()

    void        hf_device_set_input             (HalDevice *device,
                                                 const char *class,
                                                 const char *devname);

`device` :

`class` :

`devname` :

### hal_properties_equal ()

    gboolean    hal_properties_equal            (HalProperty *a,
                                                 HalProperty *b);

`a` :

`b` :

Returns :

### hf_device_store_match ()

    HalDevice*  hf_device_store_match           (HalDeviceStore *store,
                                                 ...);

`store` :

`...` :

Returns :

### hf_device_store_get_parent ()

    HalDevice*  hf_device_store_get_parent      (HalDeviceStore *store,
                                                 HalDevice *device);

`store` :

`device` :

Returns :

### hf_device_store_get_children ()

    GSList*     hf_device_store_get_children    (HalDeviceStore *store,
                                                 HalDevice *device);

`store` :

`device` :

Returns :

### hf_has_sysctl ()

    gboolean    hf_has_sysctl                   (const char *format,
                                                 ...);

`format` :

`...` :

Returns :

### hf_get_int_sysctl ()

    gboolean    hf_get_int_sysctl               (int *value,
                                                 GError **err,
                                                 const char *format,
                                                 ...);

`value` :

`err` :

`format` :

`...` :

Returns :

### hf_get_string_sysctl ()

    char*       hf_get_string_sysctl            (GError **err,
                                                 const char *format,
                                                 ...);

`err` :

`format` :

`...` :

Returns :

### hf_run ()

    char*       hf_run                          (GError **err,
                                                 const char *format,
                                                 ...);

`err` :

`format` :

`...` :

Returns :

### hf_runner_run_sync ()

    int         hf_runner_run_sync              (HalDevice *device,
                                                 int timeout,
                                                 const char *command_line,
                                                 ...);

`device` :

`timeout` :

`command_line` :

`...` :

Returns :

### hf_strv_find ()

    int         hf_strv_find                    (char **strv,
                                                 const char *elem);

`strv` :

`elem` :

Returns :