geoclue-accuracy

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

## Functions

#define | GEOCLUE_ACCURACY_TYPE
GeoclueAccuracy * | geoclue_accuracy_new ()
void | geoclue_accuracy_free ()
void | geoclue_accuracy_get_details ()
void | geoclue_accuracy_set_details ()
GeoclueAccuracy * | geoclue_accuracy_copy ()

## Types and Values

typedef | GeoclueAccuracy

## 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.

## Functions

### 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))

### 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`.

#### Parameters

level | A GeoclueAccuracyLevel |
horizontal_accuracy | Horizontal accuracy in meters |
vertical_accuracy | Vertical accuracy in meters |

#### Returns

New GeoclueAccuracy.

### geoclue_accuracy_free ()

    void
    geoclue_accuracy_free (GeoclueAccuracy *accuracy);

Frees the GeoclueAccuracy.

#### Parameters

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`.

#### Parameters

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_set_details ()

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

Replaces `accuracy` values with given ones.

#### Parameters

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

### geoclue_accuracy_copy ()

    GeoclueAccuracy *
    geoclue_accuracy_copy (GeoclueAccuracy *accuracy);

Creates a copy of `accuracy` .

#### Parameters

accuracy | A GeoclueAccuracy |

#### Returns

A newly allocated GeoclueAccuracy

## Types and Values

### GeoclueAccuracy

    typedef GValueArray GeoclueAccuracy;