geoclue-accuracy

## geoclue-accuracy geoclue-accuracy — Methods for manipulating GeoclueAccuracy structure |

## Synopsis

    #define             GEOCLUE_ACCURACY_TYPE
    typedef             GeoclueAccuracy;
    GeoclueAccuracy *   geoclue_accuracy_copy               (GeoclueAccuracy *accuracy);
    void                geoclue_accuracy_free               (GeoclueAccuracy *accuracy);
    void                geoclue_accuracy_get_details        (GeoclueAccuracy *accuracy,
                                                             GeoclueAccuracyLevel *level,
                                                             double *horizontal_accuracy,
                                                             double *vertical_accuracy);
    GeoclueAccuracy *   geoclue_accuracy_new                (GeoclueAccuracyLevel level,
                                                             double horizontal_accuracy,
                                                             double vertical_accuracy);
    void                geoclue_accuracy_set_details        (GeoclueAccuracy *accuracy,
                                                             GeoclueAccuracyLevel level,
                                                             double horizontal_accuracy,
                                                             double vertical_accuracy);

## Description

A GeoclueAccuracy holds accuracy information: a GeoclueAccuracyLevel and metric values for horizontal and vertical accuracy. The last two will only be defined if GeoclueAccuracyLevel is `GEOCLUE_ACCURACY_LEVEL_DETAILED`. These values should be set and queried using provided functions.

## Details

### GEOCLUE_ACCURACY_TYPE

    #define GEOCLUE_ACCURACY_TYPE (dbus_g_type_get_struct ("GValueArray", G_TYPE_INT, G_TYPE_DOUBLE, G_TYPE_DOUBLE, G_TYPE_INVALID))

### GeoclueAccuracy

    typedef GValueArray GeoclueAccuracy;

### geoclue_accuracy_copy ()

    GeoclueAccuracy *   geoclue_accuracy_copy               (GeoclueAccuracy *accuracy);

Creates a copy of `accuracy`.

`accuracy` : | A GeoclueAccuracy
Returns : | A newly allocated GeoclueAccuracy

### geoclue_accuracy_free ()

    void                geoclue_accuracy_free               (GeoclueAccuracy *accuracy);

Frees the GeoclueAccuracy.

`accuracy` : | A GeoclueAccuracy

### geoclue_accuracy_get_details ()

    void                geoclue_accuracy_get_details        (GeoclueAccuracy *accuracy,
                                                             GeoclueAccuracyLevel *level,
                                                             double *horizontal_accuracy,
                                                             double *vertical_accuracy);

`horizontal_accuracy` and `vertical_accuracy` will only be defined if `level` is `GEOCLUE_ACCURACY_LEVEL_DETAILED`.

`accuracy` : | A GeoclueAccuracy
`level` : | Pointer to returned GeoclueAccuracyLevel or `NULL`
`horizontal_accuracy` : | Pointer to returned horizontal accuracy in meters or `NULL`
`vertical_accuracy` : | Pointer to returned vertical accuracy in meters or `NULL`

### geoclue_accuracy_new ()

    GeoclueAccuracy *   geoclue_accuracy_new                (GeoclueAccuracyLevel level,
                                                             double horizontal_accuracy,
                                                             double vertical_accuracy);

Creates a new GeoclueAccuracy with given values. Use 0 for horizontal_accuracy and vertical_accuracy if `level` is not `GEOCLUE_ACCURACY_LEVEL_DETAILED`.

`level` : | A GeoclueAccuracyLevel
`horizontal_accuracy` : | Horizontal accuracy in meters
`vertical_accuracy` : | Vertical accuracy in meters
Returns : | New GeoclueAccuracy.

### geoclue_accuracy_set_details ()

    void                geoclue_accuracy_set_details        (GeoclueAccuracy *accuracy,
                                                             GeoclueAccuracyLevel level,
                                                             double horizontal_accuracy,
                                                             double vertical_accuracy);

Replaces `accuracy` values with given ones.

`accuracy` : | A GeoclueAccuracy
`level` : | A GeoclueAccuracyLevel
`horizontal_accuracy` : | Horizontal accuracy in meters
`vertical_accuracy` : | Vertical accuracy in meters