Geoclue Reference Manual | ||||
---|---|---|---|---|
Top | Description |
geoclue-accuracygeoclue-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))
geoclue_accuracy_copy ()
GeoclueAccuracy * geoclue_accuracy_copy (GeoclueAccuracy *accuracy
);
Creates a copy of accuracy
.
|
A GeoclueAccuracy |
Returns : |
A newly allocated GeoclueAccuracy |
geoclue_accuracy_free ()
void geoclue_accuracy_free (GeoclueAccuracy *accuracy
);
Frees the GeoclueAccuracy.
|
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
.
|
A GeoclueAccuracy |
|
Pointer to returned GeoclueAccuracyLevel or NULL
|
|
Pointer to returned horizontal accuracy in meters or NULL
|
|
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
.
|
A GeoclueAccuracyLevel |
|
Horizontal accuracy in meters |
|
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.
|
A GeoclueAccuracy |
|
A GeoclueAccuracyLevel |
|
Horizontal accuracy in meters |
|
Vertical accuracy in meters |