Method

GIRepositoryRepositoryrequire_private

since: 2.80

Declaration [src]

GITypelib*
gi_repository_require_private (
  GIRepository* repository,
  const char* typelib_dir,
  const char* namespace_,
  const char* version,
  GIRepositoryLoadFlags flags,
  GError** error
)

Description [src]

Force the namespace namespace_ to be loaded if it isn’t already.

If namespace_ is not loaded, this function will search for a .typelib file within the private directory only. In addition, a version version of namespace should be specified. If version is not specified, the latest will be used.

Available since: 2.80

Parameters

typelib_dir

Type: const char*

Private directory where to find the requested typelib.

The data is owned by the caller of the method.
The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.
namespace_

Type: const char*

GI namespace to use, e.g. Gtk.

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

Type: const char*

Version of namespace, may be NULL for latest.

The argument can be NULL.
The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
flags

Type: GIRepositoryLoadFlags

Set of GIRepositoryLoadFlags, may be 0.

error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the method if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: GITypelib

A pointer to the GITypelib if successful, NULL otherwise.

The returned data is owned by the instance.