repo: Add ostree_repo_remote_get_gpg_verify()

Trivial function, but it does at least centralize the default value.
This commit is contained in:
Matthew Barnes committed 2015-04-16 18:13:13 -04:00
1 parent d7a6f257a0
commit 54bf665521
4 files changed
+31 -3

No files matched your search

+23
View File
@@ -1068,6 +1068,29 @@ ostree_repo_remote_get_url (OstreeRepo *self,
return ret;
}
/**
* ostree_repo_remote_get_gpg_verify:
* @self: Repo
* @name: Name of remote
* @out_gpg_verify: (out) (allow-none): Remote's GPG option
* @error: Error
*
* Return whether GPG verification is enabled for the remote named @name
* through @out_gpg_verify. It is an error if the provided remote does
* not exist.
*
* Returns: %TRUE on success, %FALSE on failure
*/
gboolean
ostree_repo_remote_get_gpg_verify (OstreeRepo *self,
const char *name,
gboolean *out_gpg_verify,
GError **error)
{
return _ostree_repo_get_remote_boolean_option (self, name, "gpg-verify",
TRUE, out_gpg_verify, error);
}
static gboolean
ostree_repo_mode_to_string (OstreeRepoMode mode,
const char **out_mode,