Method

GIRepositoryRepositoryget_dependencies

since: 2.80

Declaration

char**
gi_repository_get_dependencies (
  GIRepository* repository,
  const char* namespace_,
  size_t* n_dependencies_out
)

Description

Retrieves all (transitive) versioned dependencies for namespace_.

The returned strings are of the form namespace-version.

Note: namespace_ must have already been loaded using a function such as gi_repository_require() before calling this function.

To get only the immediate dependencies for namespace_, use gi_repository_get_immediate_dependencies().

The list is guaranteed to be NULL terminated. The NULL terminator is not counted in n_dependencies_out.

Available since: 2.80

Parameters

namespace_

Type: const char*

Namespace of interest.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
n_dependencies_out

Type: size_t*

Return location for the number of dependencies.

The argument will be set by the function.
The argument can be NULL.

Return value

Type: An array of utf8

String array of all versioned dependencies.

The length of the array is in the n_dependencies_out argument.
The caller of the method takes ownership of the data, and is responsible for freeing it.
Each element is a NUL terminated UTF-8 string.