| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This can abort at runtime if the object pointed to by user_data is already
gone by the time the callback is run.
|
| |
|
|
|
|
|
| |
Reduces memory usage considerably for me: from 370 MiB RSS to just 24 MiB
after a day.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the only parameter of the 'fix-gps' signal to a NULL terminated
array of strings, i.e. G_TYPE_STRV.
The on_get_gps_nmea_ready function in gclue-modem-manager.c now emits
'fix-gps' with NMEA GGA and RMC sentences read from ModemManager.
The signal handler on_fix_gps in gclue-modem-gps.c now accepts a string
array argument and calls gclue_location_create_from_nmeas to create a
new location.
Fixes #147.
|
|
|
|
|
|
| |
Return the correct enum also in g_return_val_if_fail calls.
These were missed in in commit 2d1968f84fa81 (merge request !94).
|
|
|
|
|
|
|
| |
It has been deprecated since GObject 2.58.
Replace with *_get_instance_private() functions generated by GObject
G_ADD_PRIVATE macro.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The start_source() and stop_source() functions in GClueLocationSource
are chained up by all the start() and stop() method implementations in
GClueLocationSource subclasses to determine when to really start and
stop the source and allocate / free the needed resources.
Commit 0661107fe0 made start_source() return TRUE when the source was
already active, which caused the resources already reserved for the
physical source to be reserved again. The source class implementations
are typically designed to hold just one set of resources, so the
references to previously reserved resources are lost, that is they leak.
An example of this is the GSocketClient reference (priv->client) held by
GClueNMEASource.
Another visible (in the debug log) example of the extra resources are
callbacks connected to the "fix-*" signals of the physical sources (see
gclue_modem_gps_start() for example). With more than one client using
the same source, all clients receive the same location update N times,
where N is the number of clients using the source.
Make GClueLocationSource.start() and .stop() methods return enums
GClueLocationSourceStartResult and GClueLocationSourceStopResult which
gives subclasses more information on when to allocate resources on
starting and stopping.
The start_source() function now returns the value
GCLUE_LOCATION_SOURCE_START_RESULT_ALREADY_STARTED when the source is
already active. The subclass start() method implementations are changed
to return immediately when they get this value from the base class.
This effectively reverts the first diff in commit 0661107fe0
"location-source: Return source state from start_source and
stop_source".
The behaviour of stop() method subclass implementations remains the
same. Freeing of resources is always attempted, except when the value
GCLUE_LOCATION_SOURCE_STOP_RESULT_STILL_USED is returned from the base
class.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This add support for RMC based NMEA sentences.
Benefit
=======
When NMEA updates are not very frequent due DBUS scheduling
(It is scheduled to give updates every 30 seconds)
processing information obtained from previous location
will provide an average speed while $GPRMC data may
provide an instantaneous speed every time it gets an update.
more: http://aprs.gids.nl/nmea/#rmc
https://gitlab.freedesktop.org/geoclue/geoclue/issues/48
Based on a patch from Iqbal Inzamam (https://gitlab.freedesktop.org/inzamam.15)
|
|
|
|
|
|
|
|
|
| |
Use the G_ADD_PRIVATE() macro instead.
This doesn't fix the issue in geocode-glib but that's not an issue since
we plan to drop geocode-glib (#88).
Fixes #98.
|
| |
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=105993
|
| |
|
|
|
|
| |
And avoid a crash.
|
|
|
|
|
|
|
|
|
| |
Add gclue_location_create_from_gga() the creates a GClueLocation object
out of an NMEA GGA sentence. This function works with the help of
get_accuracy_from_hdop(), parse_coordinate_string() and
parse_altitude_string() that are moved from gclue-modem-gps.c.
https://bugs.freedesktop.org/show_bug.cgi?id=90974
|
|
|
|
|
|
|
| |
Latitude and longitude don't have the same number of digits
on the left side of the decimal point in the GGA NMEA sentence.
https://bugs.freedesktop.org/show_bug.cgi?id=89715
|
|
|
|
|
|
|
|
| |
This patch switches the code from use of GeocodeLocation to
GClueLocation. This is needed for the new API which will be added to
GClueLocation.
https://bugs.freedesktop.org/show_bug.cgi?id=89395
|
|
|
|
|
|
|
| |
GClueModem is not an interface and the new GClueModemManager class now
implements this interface using ModemManager. This is pretty useless on
its own right now but its intended to make it easy to add alternative
Modem source(s), e.g ofono-based.
|
|
|
|
|
|
|
| |
Instead of deriving from GClueModemSource class, GClueModemGPS now just
uses GClueModem singleton to talk to ModemManager.
Refer to 9231e64 ("Add GClueModem class") for rationale.
|
|
|
|
|
| |
This will ensure that baseclass will stops the source before the source
free the resources that might be needed for stopping the source.
|
|
|
|
|
| |
Since location is retrieved asynchronously, its possible that source was
stopped in between.
|
| |
|
|
|