summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-01-04service: Standalone GClueLocation classZeeshan Ali8-74/+484
GClueLocation does not inherit from and therefore does not depend on GeocodeLocation class anymore. This is in preparation for dropping the internal geocode-glib copy in a following patch.
2019-01-04service: Drop a redundant 'const'Zeeshan Ali1-1/+1
This was generating a warning from gcc.
2019-01-04Drop use of deprecated g_type_class_add_private()Zeeshan Ali19-113/+121
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.
2019-01-03dbus,manager: Add DeleteClient() methodZeeshan Ali2-16/+83
Add a method for apps to explicitly delete their client objects. This is useful for long-running applications (e.g gnome-settings-daemon) for freeing their associated resources while they are not using Geoclue. This will also allow geoclue to exit when it's not actually being used by these applications. Relevant: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/127 Fixes #99.
2019-01-03wifi: Only refresh location on BSS list changesZeeshan Ali1-7/+16
If BSS list hasn't changed since the last location refresh, not much point in refreshing location and sending redundant query to MLS. Fixes #100.
2019-01-03wifi: Wait 10 seconds between scans for high-accuracy caseZeeshan Ali1-10/+13
Typically people can't go very far in 10 seconds so no need to scan continuously for even high-accuracy requests. Fixes #100.
2019-01-03wifi: Don't schedule location refresh on BSS addition/removalZeeshan Ali1-25/+0
Let's wait for the scan to be complete (takes 5 seconds currently) before refreshing location to avoid spamming Mozilla Location Service. Fixes #100.
2019-01-03wifi: Add a debug log about refreshing locationZeeshan Ali1-0/+1
2019-01-03wifi: Move a debug logZeeshan Ali1-8/+9
Log addition of new BSS after actually adding it and only if it's really new.
2019-01-03wifi: Debug message on removing BSS (AP)Zeeshan Ali1-2/+19
2018-12-31service,manager: New API for mult-client appsZeeshan Ali2-17/+89
We modified `Manager.GetClient` method in 3e1d9bf4 (service: Allow multiple clients on the same connection) and while that made things possible for the Flatpak location portal, it meant us creating redundant clients for existing system apps (e.g gnome-settings-daemon) and we don't want that. This patch changes `GetClient` to the old behaviour of reusing existing clients and adds a new method `CreateClient` that always creates a new client object. Fixes #96. Also related: #79.
2018-12-31service: Log info on vanished peer to debug logZeeshan Ali1-0/+9
2018-12-27service: Fix check for bus name matchZeeshan Ali1-1/+5
Fixes #97.
2018-12-27service,manager: `active` now means non-0 clientsZeeshan Ali1-16/+11
With the current definition of service being active to be non-0 number of active clients, we can end up exiting even though multiple clients are connected. We don't want that since the client information is not persistent.
2018-12-27service: Keep a count of number of clientsZeeshan Ali1-4/+5
g_list_length() could be an expensive call, depending on number of clients so best to just keep our own counter for number of connected clients.
2018-12-27service: Remove a redundant 'const' qualifier from a fieldZeeshan Ali1-1/+1
2018-12-27service: Rename `num_clients` field to `last_client_id`Zeeshan Ali1-2/+2
`num_clients` is confusing.
2018-12-27docs: Fix two linksZeeshan Ali1-8/+10
2018-12-22wifi: Tell wpa_supplicant to keep scanningZeeshan Ali1-0/+126
It seems by default, wpa_supplicant won't keep a list of BSS around but only if it has done a scan recently. This means we currently end up with very bad accuracy since we only send out the ESSID of the currently connected WiFi (if any). To fix this, we'll now tell wpa_supplicant to start a scan when the source is started. We keep doing that continuously if accuracy is street level or higher, but wait 5 minutues between scans if requested accuracy is lower than that. Fixes #91.
2018-12-21wpa_supplicant: Add Scanning APIZeeshan Ali2-0/+11
We'll need this in a following patch to start WiFi scan to be able to get the most accurate location. Related: #91
2018-11-06web-source: fix type mismatch on unused parameterWill Thompson1-1/+1
src/gclue-web-source.c:181:35: warning: passing argument 2 of ‘on_network_changed’ makes integer from pointer without a cast [-Wint-conversion] on_network_changed (NULL, NULL, user_data); ^~~~ src/freedesktop/geoclue/geoclue/src/gclue-web-source.c:135:38: note: expected ‘gboolean’ {aka ‘int’} but argument is of type ‘void *’ gboolean available G_GNUC_UNUSED,
2018-11-06web-source: drop GLib < 2.44 fallback pathWill Thompson1-12/+0
Since 5ae456312c941ba2951563de0aef64ca5c25b0e6, GLib 2.44 has been a hard dependency.
2018-11-06meson: require GLib >= 2.44Will Thompson1-3/+3
This matches the Autotools change in 5ae456312c941ba2951563de0aef64ca5c25b0e6. Even though the Autotools build was subsequently dropped, the use of g_autofree remains.
2018-11-06build: restore support for modem gps locationsValentin Blot1-0/+4
Macros GCLUE_USE_3G_SOURCE, GCLUE_USE_CDMA_SOURCE, GCLUE_USE_MODEM_GPS_SOURCE and GCLUE_USE_NMEA_SOURCE are not defined anymore since the move to meson build system, therefore location through modem gps is unavailable. This commit adds the macro definitions when the corresponding options are enabled.
2018-11-01service-client: Fix a check for system appZeeshan Ali1-1/+1
We don't want to stop a system app client on agent's behalf but our check for system apps was inverted so we ended up doing the opposite. :( Thanks to Florian Müllner for pointing this out.
2018-11-01Bump versionZeeshan Ali1-1/+1
2018-11-01service: Allow multiple clients on the same connectionZeeshan Ali1-30/+28
This is needed to ease the implementation of the Flatpak location portal. Fixes #79.
2018-10-29web-source: Update internet availability when connectivity changesBastien Nocera1-0/+20
Going from limited ("captive portal") to full internet should update the internet availability.
2018-10-29web-source: Minimise get_internet_available() callsBastien Nocera1-10/+9
Rather than calling get_internet_available() too often, use the cached ->internet_available variable and call get_internet_available() when network status has actually changed.
2018-10-22Trivia: Fix several typosLaurent Bigonville2-3/+3
Thanks to lintian
2018-10-21build: Gather common path variables in root meson.buildJan Alexander Steffens (heftig)7-25/+21
This eliminates a lot of get_option and some join_paths.
2018-10-21build: Make dbus_interface_dir absoluteJan Alexander Steffens (heftig)1-4/+4
Removes the need for a separate abs_dbus_interface_dir.
2018-10-21build: Rename abs_header_dir to include_subdirJan Alexander Steffens (heftig)2-6/+6
This is a better name as it's not absolute but a subdirectory of the includedir, relative to the prefix. Also rename the identical install_dir in public-api.
2018-10-21build: Fix a double space (whitespace)Jan Alexander Steffens (heftig)1-1/+1
2018-10-21build: Ensure SYSCONFDIR is absoluteJan Alexander Steffens (heftig)1-1/+1
Much like libexecdir, sysconfdir is relative if and only if contained within the prefix.
2018-10-21build: Use join_paths for LOCALEDIR and public-api install_dirJan Alexander Steffens (heftig)2-2/+2
These were missed in dc46a4d942dc.
2018-10-16Release 2.5.12.5.1Zeeshan Ali2-1/+7
2018-10-15Re-add gclue_accuracy_level_get_string()Zeeshan Ali3-1/+55
This function was being generated when we were using autotools because it was part of our template. We unintentially dropped it when we ported to meson's gnome.mkenums_simple() as that uses it's own template that doesn't include this function. This broke ABI in 2.5.0 and hence we now re-add it, implementing it manually. Fixes #90.
2018-10-15build: Use join_paths instead of concatenating the paths manuallyLaurent Bigonville5-12/+12
2018-10-15build: Set absolute path of libexecdirLaurent Bigonville2-2/+2
get_option('libexecdir') contains the path to libexecdir WITHOUT the prefix, we need to prepend the correct prefix to the expanded path is correct
2018-10-14Release 2.5.02.5.0Zeeshan Ali2-1/+27
2018-10-02build: Don't hardcode the path of python3Ting-Wei Lan2-2/+2
Hardcoding paths to interpreters seldom works on *BSD. The ports system allows users to choose their preferred installation prefix as long as it is not /usr. This makes it nearly impossible to have a common path of python3 which works on both GNU/Linux and *BSD.
2018-09-25CI: Build with NMEA source enabledZeeshan Ali1-3/+3
2018-09-25CI: Always keep build artifactsZeeshan Ali1-3/+3
2018-09-25CI: Keep all build artifactsZeeshan Ali1-3/+3
2018-09-25build: Correct python pathZeeshan Ali1-1/+1
On debian-based systems, there is no '/bin/python3'.
2018-09-25build: Install demo agent to autostart directory tooZeeshan Ali2-6/+40
We were doing this already but forgot to port this from autotools to meson.
2018-09-24CI: Save artifacts on build failureZeeshan Ali1-0/+15
2018-09-24CI: Fetch gettext & ModemManager from distroZeeshan Ali1-5/+1
I'm not sure why we were building these from sources.
2018-09-24CI: no need to checkout geoclueZeeshan Ali1-3/+3
CI already does this for us. Before this change, we were always building the master branch and that meant merge requests weren't getting tested.