main
3
HAL Library

# main

## Synopsis

    #define     HAL_LINUX_HOTPLUG_TIMEOUT
    #define     DIE                             (expr)
    extern      dbus_bool_t is_probing;
    double      parse_double                    (const char *str);
    dbus_int32_t parse_dec                      (const char *str);
    dbus_int32_t parse_hex                      (const char *str);
    double      find_double                     (char *pre,
                                                 char *s);
    int         find_bcd2                       (char *pre,
                                                 char *s);
    char*       find_string                     (char *pre,
                                                 char *s);
    char*       (*ComputeFDI)                   (const char *udi,
                                                 int append_num);
    char*       rename_and_maybe_add            (const char *udi,
                                                 ComputeFDI naming_func,
                                                 const char *namespace);
    char*       find_udi_from_sysfs_path        (const char *path,
                                                 int max_time_to_try);
    char*       find_parent_udi_from_sysfs_path (const char *path,
                                                 int max_time_to_try);
    const char* get_last_element                (const char *s);
    char*       read_single_line                (char *filename_format,
                                                 ...);
    void        find_and_set_physical_device    (char *udi);
    char*       find_udi_by_key_value           (const char *key,
                                                 const char *value,
                                                 int max_time_to_try);
    const char* drivers_lookup                  (const char *device_path);
    void        drivers_collect                 (const char *bus_name);
    extern      LibHalFunctions hal_functions;
    extern      DBusConnection* dbus_connection;

## Description

## Details

### HAL_LINUX_HOTPLUG_TIMEOUT

    #define HAL_LINUX_HOTPLUG_TIMEOUT 30

### DIE()

    #define     DIE(expr)

`expr` :

### is_probing

    extern dbus_bool_t is_probing;

### parse_double ()

    double      parse_double                    (const char *str);

`str` :

Returns :

### parse_dec ()

    dbus_int32_t parse_dec                      (const char *str);

`str` :

Returns :

### parse_hex ()

    dbus_int32_t parse_hex                      (const char *str);

`str` :

Returns :

### find_double ()

    double      find_double                     (char *pre,
                                                 char *s);

`pre` :

`s` :

Returns :

### find_bcd2 ()

    int         find_bcd2                       (char *pre,
                                                 char *s);

`pre` :

`s` :

Returns :

### find_string ()

    char*       find_string                     (char *pre,
                                                 char *s);

`pre` :

`s` :

Returns :

### ComputeFDI ()

    char*       (*ComputeFDI)                   (const char *udi,
                                                 int append_num);

`udi` :

`append_num` :

Returns :

### rename_and_maybe_add ()

    char*       rename_and_maybe_add            (const char *udi,
                                                 ComputeFDI naming_func,
                                                 const char *namespace);

`udi` :

`naming_func` :

`namespace` :

Returns :

### find_udi_from_sysfs_path ()

    char*       find_udi_from_sysfs_path        (const char *path,
                                                 int max_time_to_try);

`path` :

`max_time_to_try` :

Returns :

### find_parent_udi_from_sysfs_path ()

    char*       find_parent_udi_from_sysfs_path (const char *path,
                                                 int max_time_to_try);

`path` :

`max_time_to_try` :

Returns :

### get_last_element ()

    const char* get_last_element                (const char *s);

`s` :

Returns :

### read_single_line ()

    char*       read_single_line                (char *filename_format,
                                                 ...);

`filename_format` :

`...` :

Returns :

### find_and_set_physical_device ()

    void        find_and_set_physical_device    (char *udi);

`udi` :

### find_udi_by_key_value ()

    char*       find_udi_by_key_value           (const char *key,
                                                 const char *value,
                                                 int max_time_to_try);

`key` :

`value` :

`max_time_to_try` :

Returns :

### drivers_lookup ()

    const char* drivers_lookup                  (const char *device_path);

`device_path` :

Returns :

### drivers_collect ()

    void        drivers_collect                 (const char *bus_name);

`bus_name` :

### hal_functions

    extern LibHalFunctions hal_functions;

### dbus_connection

    extern DBusConnection* dbus_connection;