summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gweather: Fix _gweather_info_new_clone() throwing warningswip/hadess/weather-fixesBastien Nocera2021-01-121-2/+3
| | | | | | | Order the properties to be copied onto the new object in an order that wouldn't throw warnings, eg. the "enabled-providers" property doesn't like to be set if the "application-id" and "contact-info" properties aren't set.
* tests: Fix weather test not setting contact infoBastien Nocera2021-01-121-0/+1
|
* gweather: Fix GWeatherInfo memory leakBastien Nocera2021-01-121-0/+1
|
* 40.alpha40.alphaBastien Nocera2021-01-121-0/+23
|
* metno: Mention API users mailing-list in docsBastien Nocera2021-01-121-1/+1
|
* ci: Bump last ABI breakBastien Nocera2021-01-121-1/+1
|
* gweather: Add required "contact-info" propertyBastien Nocera2021-01-124-2/+71
| | | | | Similarly to the application ID, contact information must be provided to use the online weather providers.
* gweather: Add API doc for enabled-properties getter/setterBastien Nocera2021-01-121-0/+19
|
* gweather: Change the user-agent when the app ID changesBastien Nocera2021-01-121-0/+5
| | | | As uncommon as that might be...
* gweather: Don't make online calls when changing providersBastien Nocera2021-01-121-1/+0
|
* gweather: Require an app id to enable weather providersBastien Nocera2021-01-121-1/+7
| | | | And mention that in the gweather_info_set_application_id() API doc.
* gweather: Set the HTTP user-agent using the application-idBastien Nocera2021-01-121-4/+6
|
* gweather: Require an app-id to run gweather_info_update()Bastien Nocera2021-01-121-0/+6
|
* tests: Add application-ids to testsBastien Nocera2021-01-122-0/+2
|
* ci: Bump last ABI breakBastien Nocera2021-01-121-1/+1
|
* gweather: Add application-id propertyBastien Nocera2021-01-124-1/+80
| | | | | We will use this to supplement the user-agent so that individual applications using libgweather are, well, identifiable.
* gweather: Disable all weather providers by defaultBastien Nocera2021-01-121-1/+1
|
* gweather: Fix GWEATHER_PROVIDER_ALL valueBastien Nocera2021-01-121-1/+1
| | | | | 1+1«2+1«3+1«4+1«5 = 61 Not 31...
* gweather: Remove unused includesBastien Nocera2021-01-121-2/+0
|
* metno: Use "&" as arguments separator in queryBastien Nocera2021-01-121-1/+1
| | | | | | | | According to the HTML5 spec ";" is no longer allowed. This was automatically rewritten in Varnish, but was temporary measure and was likely to disappear if on cache/load balancer change. Closes: #72
* metno: Use GNOME-specific subdomainBastien Nocera2021-01-121-1/+4
| | | | This allows the API provider to track libgweather usage.
* gweather: Fix build warning wrt g_autoptr() usageBastien Nocera2021-01-121-1/+1
| | | | | | | | | libgweather/gweather-location.c: In function ‘gweather_location_common_deserialize’: libgweather/gweather-location.c:1591:5: warning: passing argument 1 of ‘glib_autoptr_cleanup_GWeatherLocation’ from incompatible pointer type [-Wincompatible-pointer-types] 1591 | g_autoptr(GWeatherLocation) *by_station_code = NULL; | ^~~~~~~~~ | | | GWeatherLocation *** {aka struct _GWeatherLocation ***}
* yrno: The XML API isn't the "New API" anymoreBastien Nocera2021-01-121-1/+1
| | | | It's very much the old legacy API now.
* yrno: Rename elementsBastien Nocera2021-01-121-3/+3
| | | | | They were never master/slave elements, but parent/child, as is common in XML.
* gweather: Cleanup argument to _gweather_info_new_clone()Bastien Nocera2021-01-125-17/+17
| | | | | Was "info", "other" and "master_info" depending on the caller. Call them all "original" or "original_info".
* gweather: Fix _gweather_info_new_clone() not copying all propertiesBastien Nocera2021-01-121-1/+4
| | | | | Make sure to also copy the "enabled-providers" property when cloning the info object.
* gweather: Don't do network I/O when calling gweather_info_new()Bastien Nocera2021-01-121-9/+7
| | | | | The old code used to start doing network I/O when we didn't even have the enabled-providers set.
* MAINTAINERS: Remove fileBastien Nocera2021-01-121-29/+0
| | | | It was outdated, and duplicates the content of the DOAP file.
* HACKING: Rename HACKING fileBastien Nocera2021-01-121-0/+0
|
* README: Remove linkBastien Nocera2021-01-121-1/+0
| | | | | We don't use autotools anymore, and it was what required this link, so remove it.
* gweather: Use g_clear_* macros when possibleBastien Nocera2021-01-121-16/+5
|
* gweather: Remove intermediate private struct for GWeatherInfoBastien Nocera2021-01-1211-533/+387
|
* gweather: Remove GWEATHER_EXTERN usageBastien Nocera2021-01-1211-141/+2
|
* build: Use external file as a symbol export mapBastien Nocera2021-01-122-0/+20
| | | | Rather than relying on GWEATHER_EXTERN.
* metno: Use compat 2.0 APIBastien Nocera2021-01-121-3/+3
| | | | | | | Version 1.9, which we were using, was deprecated and will be removed soon, so migrate to the compat XML output of the v2.0 API. Closes: #65
* tests: Fix name of libgweather automated testBastien Nocera2021-01-121-1/+1
|
* tests: Make it easier to see soup status on failureBastien Nocera2021-01-121-1/+7
| | | | | | | Can be useful if libsoup and dependencies aren't installed properly and, say, SSL/TLS support is broken. GWeather:ERROR:test_libgweather.c:427:test_metar_weather_stations: assertion failed (msg->status_code >= 200): (6 >= 200)
* gweather: Only use 4 significant decimals for locationsBastien Nocera2021-01-126-9/+46
| | | | | | | | | | 1/1000th of a degree of longitude or latitude corresponds to around 100 meters. There's no reason for the weather to be any more precise than this. See https://www.thoughtco.com/degree-of-latitude-and-longitude-distance-4070616 Closes: #69
* gweather: Remove comment about work-aroundBastien Nocera2021-01-121-5/+0
| | | | We will be adding code here.
* ci: Bump last ABI break to when yr.no's name changeBastien Nocera2021-01-121-1/+1
|
* metno: Rename yr.no backend to met.noBastien Nocera2021-01-1225-140/+140
| | | | | | | "The Yr API is now officially discontinued, and the Yr is now trademarked for the website and mobile apps only." Closes: #64
* ci: Lint Python script in the CIBastien Nocera2021-01-111-1/+1
| | | | Add pylint to the CI environment so that we check the Python script.
* data: Run pylint test over variant DB generatorBenjamin Berg2021-01-112-0/+7
| | | | When available, run pylint over the DB generator to ensure a good style.
* location: Clarify purpose of year start/end informationBenjamin Berg2021-01-111-1/+2
|
* location-entry: Sort locations in drop-downBenjamin Berg2021-01-111-5/+40
| | | | | | | | | | | | | | | The order of locations as returned by GWeatherLocation used to be sorted by the localised name. However, that requires quite a lot of resources and is not needed in many usecases. As such, sort the resulting tree model by location name. Note that this actually changes the behaviour slightly as Countries were grouped by region before and are now all sorted by name. To do so, add a new column that allows direct comparison for sorting purposes. Note that this cannot be the same as the compare name, because order needs to be reversed for sorting but must remain the same for matching.
* location-entry: Use a list store instead of a tree storeBenjamin Berg2021-01-111-9/+9
| | | | | | It looks like at one point the idea was to use a hierarchical structure for the entries. However, it really is a flat list, so there is no need to use a tree store for it.
* location-entry: Port location entry to new iteration APIBenjamin Berg2021-01-111-13/+7
| | | | So that it doesn't cause the whole world to be kept in memory forever.
* test: Add tree walk testBenjamin Berg2021-01-111-0/+54
|
* gweather: Port to new GVariant based in-memory DBBenjamin Berg2021-01-1111-928/+713
| | | | | | | This makes GWeather use a memory mapped GVariant as an in-memory database. Doing this allows much faster access and decreases memory consumption considerably as items can be fetched from the database on-demand.
* gweather: Add generated GVariant access file for databaseBenjamin Berg2021-01-111-0/+2134
|