Declaration [src]

cog_modules_get_preferred (
  GIOExtensionPoint* extension_point,
  const char* preferred_module,
  size_t is_supported_offset

Description [src]

Retrieves the default class which implements a certain extension point.

If preferred_module is not NULL, then the implementation named by it will be tried first. After that, or if NULL, all other implementations will be tried in order of decreasing priority.

If is_supported_offset is non-zero, then it is the offset into the class vtable at which there is a function which takes no arguments and returns a boolean. This function will be called on each candidate implementation to check whether it is usable or not.


extension_point GIOExtensionPoint*

Name of the extension point for which to obtain a module.

 The data is owned by the caller of the function.
preferred_module const char*

Name of the preferred module, which overrides the default preferred one.

 The argument can be NULL.
 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
is_supported_offset size_t

A vtable offset, or zero.

Return value

Returns: GType

A type that can be instantiated to implement extension_point, or G_TYPE_INVALID if there are o usable implementations.