1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-03 07:31:00 +01:00

C api: nix_export_std_string -> nix_observe_string

This commit is contained in:
José Luis Lafuente 2024-03-27 17:50:36 +01:00
parent 940ff6535c
commit d96b52bd8b
No known key found for this signature in database
GPG key ID: 8A3455EBE455489A
8 changed files with 92 additions and 76 deletions

View file

@ -71,11 +71,12 @@ void nix_store_free(Store * store);
* @brief get the URI of a nix store
* @param[out] context Optional, stores error information
* @param[in] store nix store reference
* @param[out] dest The allocated area to write the string to.
* @param[in] n Maximum size of the returned string.
* @param[in] callback Called with the URI.
* @param[in] user_data optional, arbitrary data, passed to the callback when it's called.
* @see nix_observe_string
* @return error code, NIX_OK on success.
*/
nix_err nix_store_get_uri(nix_c_context * context, Store * store, char * dest, unsigned int n);
nix_err nix_store_get_uri(nix_c_context * context, Store * store, void * callback, void * user_data);
// returns: owned StorePath*
/**
@ -130,11 +131,12 @@ nix_err nix_store_realise(
* If the store doesn't have a version (like the dummy store), returns an empty string.
* @param[out] context Optional, stores error information
* @param[in] store nix store reference
* @param[out] dest The allocated area to write the string to.
* @param[in] n Maximum size of the returned string.
* @param[in] callback Called with the version.
* @param[in] user_data optional, arbitrary data, passed to the callback when it's called.
* @see nix_observe_string
* @return error code, NIX_OK on success.
*/
nix_err nix_store_get_version(nix_c_context *, Store * store, char * dest, unsigned int n);
nix_err nix_store_get_version(nix_c_context * context, Store * store, void * callback, void * user_data);
// cffi end
#ifdef __cplusplus