summaryrefslogtreecommitdiff
path: root/libs
Commit message (Collapse)AuthorAgeFilesLines
* build: Declare a variable for the internal grlnet dependencyEmmanuele Bassi2022-09-281-1/+2
| | | | | | | | When using grilo as a subproject we don't have access to the pkg-config variables. This means any attempt at checking if grilo was built against libsoup3 or libsoup2.4 will fail when using grilo as a subproject. Fixes: 34d3c58 ("build: Allow building grilo as a Meson subproject")
* build: Let Meson fill out the pkg-config directoriesEmmanuele Bassi2022-09-282-6/+0
| | | | | | | | There's no need for us to define variables for prefixes, exec prefixes, and datarootdirs. Meson already fills out the prefix, bindir, libdir, and datadir variables with appropriate values that can be expanded and overridden.
* net: Use GTask instead of GSimpleAsyncResultVictor Toso2022-08-272-110/+85
| | | | Long overdue. Bye GSimpleAsyncResult.
* net: Document changed "throttling" property behaviourBastien Nocera2022-08-121-0/+8
| | | | | We needed to change the runtime behaviour when compiled against libsoup3 to avoid an API/ABI change.
* net: Add support for libsoup3 through a compile-time optionBastien Nocera2022-07-052-31/+134
| | | | | | | | Add 'soup3' build option to make it easier to build the grl-net library against either libsoup 2.x or libsoup 3.x. The API version used is exported in the soupapiversion variable of the pkg-config file. Based on work by Daniel Kolesa <dkolesa@igalia.com>
* net: Simplify error reportingBastien Nocera2022-07-051-9/+4
| | | | | libsoup3 doesn't return a partial response on failure like libsoup2 used to do, so remove that from the error parsing.
* net: Remove intermediate private structBastien Nocera2022-07-053-79/+57
|
* net: Split GrlNetWcPrivate definitionBastien Nocera2022-07-052-16/+46
|
* net: Make it possible to defer session creationBastien Nocera2022-07-051-7/+14
| | | | This will be used in the soup3 port.
* net: Cache user-agent propertyBastien Nocera2022-07-051-2/+6
| | | | So we don't rely on a SoupSession keeping it.
* net: Remove direct libsoup dep from mock backendBastien Nocera2022-07-041-6/+12
| | | | | The mock backend just manipulates URIs, so require a newer version of GLib and use GUri to parse those instead of SoupURI.
* net: Fix double-free when using GrlNet in PythonBastien Nocera2021-10-041-1/+1
| | | | | | grl_net_wc_request_finish() claims to have a "transfer full" content argument but it actually returns a pointer to a variable inside the GrlNetWc object, leading to possible double-frees.
* net: Fix TLS cert validation not being done for any network callBastien Nocera2021-06-221-0/+1
| | | | | | | | | | | The default SoupSessionAsync behaviour does not perform any TLS certificate validation, unless the ssl-use-system-ca-file property is set to true. See https://blogs.gnome.org/mcatanzaro/2021/05/25/reminder-soupsessionsync-and-soupsessionasync-default-to-no-tls-certificate-verification/ This mitigates CVE-2016-20011. Closes: #146
* net: Fix wrong printf format under 32-bitRosen Penev2020-09-201-1/+1
| | | | | | | | | | | | | | | | | Found with -Wformat : In file included from ../src/grilo.h:31, from ../libs/net/grl-net-wc.c:52: ../libs/net/grl-net-wc.c: In function 'get_url': ../libs/net/grl-net-wc.c:770:16: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'gint64' {aka 'long long int'} [-Wformat=] 770 | GRL_DEBUG ("delaying web request by %lu seconds", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 771 | priv->last_request - now); | ~~~~~~~~~~~~~~~~~~~~~~~~ | | | gint64 {aka long long int}
* pls: fix extra token on ifndef TOTEM_PL_IS_PARSERVictor Toso2020-02-211-1/+1
| | | | | | | | Removes the following warning: > ../libs/pls/grl-pls.c:50:27: warning: extra tokens at end of #ifndef > directive > 50 | #ifndef TOTEM_PL_IS_PARSER(x) > | ^
* pls: don't use GTimeVal on newer glibVictor Toso2020-02-211-1/+9
| | | | | | On 2.62.0 we can use new API and avoid GTimeVal usage in grl-pls.c. As 2.62 is a bit new, wrap the old code to avoid warnings on new builds. It can be removed after bumping glib to >= 2.62.0
* net: Drop usage of deprecated GTimeValVictor Toso2020-02-211-9/+9
| | | | | We can easily replace it with timestamp in seconds for the throttling feature.
* pls: Support totem-pl-parser 3.26.4Bastien Nocera2019-11-121-1/+5
|
* build: Add a Meson dependency variable for libgrlplsSam Thursfield2019-09-301-0/+6
| | | | | | | This enables the library to be used when Grilo is embedded as a Meson subproject. See: https://gitlab.gnome.org/GNOME/grilo-plugins/merge_requests/68
* build: Use variables in pc filesJan Tojnar2019-09-122-6/+6
| | | | | | | | | | | Recently, we started prefixing the values of all variables defined in pc files with `prefix` meson variable. While this works even when `datadir` option is absolute (supported by some meson forks), it leads to inflexible pc files even when prefixing is not strictly necessary. In this commit, we are constructing variables for pkg-config files separately from paths used for installation, obtaining nice .pc files in the common case, while still supporting unusual platforms like Nix.
* build: generate .pc filesworldofpeace2019-09-122-0/+32
| | | | | | | The generated .pc have been kept essentially identical to the original ones with the same variables. To squash warnings the meson_version was also bumped
* pls: Simplify thumbnail validity handlingBastien Nocera2019-02-181-11/+5
| | | | | | There's really no need to get both G_FILE_ATTRIBUTE_THUMBNAILING_FAILED and G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID as they're generated from a single variable in GIO.
* meson: build and run unit testsVictor Toso2018-08-301-1/+10
| | | | | | | | | | Test builds were missing in meson. Building and running with a 10s timeout (instead of 30s as default). Also created a include_directory for GrlNet library to be included in tests. Signed-off-by: Victor Toso <victortoso@gnome.org>
* build: Remove autotools supportVictor Toso2018-07-303-172/+0
|
* net: Remove deprecated g_type_class_add_private()Victor Toso2018-07-251-9/+2
| | | | | Similar to previous commit but for the libs. Only the net library uses g_type_class_add_private().
* net-wc: Add G_DEFINE_AUTOPTR_CLEANUP_FUNCYi-Soo An2018-07-131-0/+2
| | | | | | To support g_autoptr, it is added. https://gitlab.gnome.org/GNOME/grilo/merge_requests/10
* build: Improve docs and introspectionJan Alexander Steffens (heftig)2017-02-213-12/+12
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=778612
* build: add Meson build supportJuan A. Suarez Romero2017-02-143-0/+108
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=775950
* net: Always return an error on failureBastien Nocera2016-10-241-0/+3
| | | | | | | When getting a "Gateway timeout" error, or any other errors not handled in the switch statement, we should make sure to return an error. https://bugzilla.gnome.org/show_bug.cgi?id=773422
* net: Downgrade verbose error output to a GRL_DEBUG()Bastien Nocera2016-10-241-1/+1
| | | | | | And don't mark debug strings as translatable. https://bugzilla.gnome.org/show_bug.cgi?id=773422
* net: Check for throttling only if setVictor Toso2016-09-221-2/+5
| | | | | | | Otherwise, we might add several 0 seconds delay on multiple fetch requests leading to unexpected behavior (assertion) https://bugzilla.gnome.org/show_bug.cgi?id=771338
* net: Initialize GTimeVal for throttlingVictor Toso2016-09-051-2/+4
| | | | | | | The last_request variable was never initialized leading to delay between request to not work. https://bugzilla.gnome.org/show_bug.cgi?id=769331
* Fix annotationMathieu Bridon2016-08-251-1/+2
| | | | | | Bindings are broken without this. https://bugzilla.gnome.org/show_bug.cgi?id=769830
* net: use G_IO_ERROR_FAILED instead of GRL_NET_WC_ERROR_UNAVAILABLEVictor Toso2016-06-162-7/+8
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=764077
* net: use G_IO_ERROR on cancelled operationVictor Toso2016-06-162-6/+7
| | | | | | | By deprecating GRL_NET_WC_ERROR_CANCELLED we can use G_IO_ERROR_CANCELLED instead. https://bugzilla.gnome.org/show_bug.cgi?id=764077
* net: use G_IO_ERROR_PROXY_FAILED instead of GRL_NET_WC_ERROR_PROXY_ERRORVictor Toso2016-06-062-3/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=764077
* net: Set proper error when operation is cancelledVictor Toso2016-06-061-3/+7
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=764077
* net: Better error message when a mock file is absentBastien Nocera2015-12-161-4/+3
| | | | | Now we'll print the path of the missing file, instead of a glib message about it.
* core: merge GrlMediaBox into GrlMediaJuan A. Suarez Romero2015-12-161-12/+11
| | | | | | | | | Get rid of GrlMediaBox and use instead GrlMedia. Also, all references to "box" are converted to "container", as container is a more suitable name than boxes. https://bugzilla.gnome.org/show_bug.cgi?id=755551
* core: merge GrlMediaAudio into GrlMediaJuan A. Suarez Romero2015-12-161-5/+4
| | | | | | Get rid of GrlMediaAudio and use instead GrlMedia. https://bugzilla.gnome.org/show_bug.cgi?id=755551
* pls: annotate that filter_func can be NULLXavier Claessens2015-09-231-3/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=755433
* net: Remove support for libsoup < 2.42Bastien Nocera2015-09-232-28/+2
| | | | Was released 2.5 years ago.
* core: Generate .gitgnore in libs/pls tooMathieu Duponchelle2015-07-171-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=748455
* introspection: Install to the correct placesMathieu Duponchelle2015-07-172-4/+4
| | | | | | | | | | make distcheck was failing on my end, because it sets a prefix which has to be taken into account, this fixes that issue as shown in the example in: /usr/share/gobject-introspection-1.0/Makefile.introspection https://bugzilla.gnome.org/show_bug.cgi?id=749587
* pls: Avoid NULL dereferenceBastien Nocera2015-07-101-1/+1
| | | | | | | | | | From coverity: libs/pls/grl-pls.c:624: var_deref_op: Dereferencing null pointer "valid_entries". valid_entries can be NULL, so check its value before using it in the debug output. https://bugzilla.gnome.org/show_bug.cgi?id=749887
* pls: Support older versions of totem-pl-parserBastien Nocera2015-02-171-0/+5
| | | | But no need to recompile grilo to support newer versions.
* pls: Export the "audio-track" playlist attributeBastien Nocera2015-02-171-0/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=744168
* core: Rename GrlOperationOptions "flags" to "resolution-flags"Bastien Nocera2015-02-171-2/+2
| | | | | | | And add the associated functions as well. Deprecate the old functions. https://bugzilla.gnome.org/show_bug.cgi?id=724308
* net: Check object before increasing refcountJuan A. Suarez Romero2014-11-181-1/+1
| | | | | | Check if object is non-NULL before increasing its reference count. Fixes e823b8fe63846a9c60ebd59a8bf07e9c602a8528.
* net: add GIR annotations for grl_net_wc_request_finish()Marc-André Lureau2014-11-171-2/+2
| | | | | | Annotate out arguments and the memory ownership. https://bugzilla.gnome.org/show_bug.cgi?id=740186