Top |
GClueAccuracyLevel | accuracy-level | Write / Construct Only |
GClueClientProxy * | client | Read |
gchar * | desktop-id | Write / Construct Only |
GClueLocationProxy * | location | Read |
GClueSimple make it very simple to get latest location and monitoring location updates. It takes care of the boring tasks of creating a GClueClientProxy instance, starting it, waiting till we have a location fix and then creating a GClueLocationProxy instance for it.
Use gclue_simple_new()
or gclue_simple_new_sync()
to create a new
GClueSimple instance. Once you have a GClueSimple instance, you can get the
latest location using gclue_simple_get_location()
or reading the
“location” property. To monitor location updates, connect to
notify signal for this property.
While most applications will find this API very useful, it is most useful for applications that simply want to get the current location as quickly as possible and do not care about accuracy (much).
void gclue_simple_new (const char *desktop_id
,GClueAccuracyLevel accuracy_level
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously creates a GClueSimple instance. Use
gclue_simple_new_finish()
to get the created GClueSimple instance.
See gclue_simple_new_sync()
for the synchronous, blocking version
of this function.
desktop_id |
The desktop file id (the basename of the desktop file). |
|
accuracy_level |
The requested accuracy level as GClueAccuracyLevel. |
|
cancellable |
A GCancellable or |
[allow-none] |
callback |
A GAsyncReadyCallback to call when the results are ready. |
|
user_data |
User data to pass to |
GClueSimple * gclue_simple_new_finish (GAsyncResult *result
,GError **error
);
Finishes an operation started with gclue_simple_new()
.
result |
The GAsyncResult obtained from the GAsyncReadyCallback passed to
|
|
error |
Return location for error or |
GClueSimple * gclue_simple_new_sync (const char *desktop_id
,GClueAccuracyLevel accuracy_level
,GCancellable *cancellable
,GError **error
);
The synchronous and blocking version of gclue_simple_new()
.
desktop_id |
The desktop file id (the basename of the desktop file). |
|
accuracy_level |
The requested accuracy level as GClueAccuracyLevel. |
|
cancellable |
A GCancellable or |
[allow-none] |
error |
Return location for error or |
GClueClient *
gclue_simple_get_client (GClueSimple *simple
);
Gets the client proxy.
GClueLocation *
gclue_simple_get_location (GClueSimple *simple
);
Gets the current location.
“accuracy-level”
property“accuracy-level” GClueAccuracyLevel
The requested maximum accuracy level.
Flags: Write / Construct Only
Default value: GCLUE_ACCURACY_LEVEL_NONE
“desktop-id”
property“desktop-id” gchar *
The Desktop ID of the application.
Flags: Write / Construct Only
Default value: NULL