ostree-repo: Clarify error behaviour of remote option getters

Clarify the documentation for functions like
ostree_repo_get_remote_boolean_option(), stating what out_value will be
set to on error.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Closes: #676
Approved by: cgwalters
This commit is contained in:
Philip Withnall 2017-02-09 19:49:06 +00:00 committed by Atomic Bot
parent b13ead1c5b
commit e6a8979e05
1 changed files with 6 additions and 4 deletions

View File

@ -284,7 +284,7 @@ _ostree_repo_remote_name_is_file (const char *remote_name)
* OSTree remotes are represented by keyfile groups, formatted like: * OSTree remotes are represented by keyfile groups, formatted like:
* `[remote "remotename"]`. This function returns a value named @option_name * `[remote "remotename"]`. This function returns a value named @option_name
* underneath that group, or @default_value if the remote exists but not the * underneath that group, or @default_value if the remote exists but not the
* option name. * option name. If an error is returned, @out_value will be set to %NULL.
* *
* Returns: %TRUE on success, otherwise %FALSE with @error set * Returns: %TRUE on success, otherwise %FALSE with @error set
*/ */
@ -360,8 +360,9 @@ ostree_repo_get_remote_option (OstreeRepo *self,
* *
* OSTree remotes are represented by keyfile groups, formatted like: * OSTree remotes are represented by keyfile groups, formatted like:
* `[remote "remotename"]`. This function returns a value named @option_name * `[remote "remotename"]`. This function returns a value named @option_name
* underneath that group, and returns it as an zero terminated array of strings. * underneath that group, and returns it as a zero terminated array of strings.
* If the option is not set, @out_value will be set to %NULL. * If the option is not set, or if an error is returned, @out_value will be set
* to %NULL.
* *
* Returns: %TRUE on success, otherwise %FALSE with @error set * Returns: %TRUE on success, otherwise %FALSE with @error set
*/ */
@ -435,7 +436,8 @@ ostree_repo_get_remote_list_option (OstreeRepo *self,
* OSTree remotes are represented by keyfile groups, formatted like: * OSTree remotes are represented by keyfile groups, formatted like:
* `[remote "remotename"]`. This function returns a value named @option_name * `[remote "remotename"]`. This function returns a value named @option_name
* underneath that group, and returns it as a boolean. * underneath that group, and returns it as a boolean.
* If the option is not set, @out_value will be set to @default_value. * If the option is not set, @out_value will be set to @default_value. If an
* error is returned, @out_value will be set to %FALSE.
* *
* Returns: %TRUE on success, otherwise %FALSE with @error set * Returns: %TRUE on success, otherwise %FALSE with @error set
*/ */