lib/remote: Add a method to return the URL
authorJoaquim Rocha <jrocha@endlessm.com>
Fri, 24 Nov 2017 13:56:28 +0000 (14:56 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 28 Nov 2017 18:53:25 +0000 (18:53 +0000)
commita1745e1a79ea1c41cc62e91b346a2a9961997a76
treecd9f63af831901d5b25bc051e3df983c09f191f6
parent6f1bf70a769204f0627a9d499ec9cf223947a325
lib/remote: Add a method to return the URL

When using dynamic remotes (LAN and USB), we cannot use their name with
the common remote related ops (ostree_repo_remote_...) because ostree
doesn't keep this type of remotes in its internal hash table.
Unfortunately this means that we cannot access the URL of those remotes
either (in order to e.g. set the right URL for those remotes in
Flatpak).

Since the URL is actually stored in a key file that belongs to the
OstreeRemote, then we can simply allow users access to it through a
getter.

So this patch adds a method that allows to return the URL directly from
the OstreeRemote without having to go through the OstreeRepo.

The test-repo-finder-config is also updated by this patch to check if
the URL is correct.

Closes: #1353
Approved by: cgwalters
apidoc/ostree-experimental-sections.txt
src/libostree/libostree-experimental.sym
src/libostree/ostree-remote.c
src/libostree/ostree-remote.h
tests/test-repo-finder-config.c