Function
Clapperenhancer_check
since: 0.8
Declaration [src]
gboolean
clapper_enhancer_check (
GType iface_type,
const gchar* scheme,
const gchar* host,
const gchar** name
)
Description [src]
Check if an enhancer of type
is available for given scheme
and host
.
A check that compares requested capabilites of all available Clapper enhancers,
thus it is fast but does not guarantee that the found one will succeed. Please note
that this function will always return FALSE
if Clapper was built without enhancers
loader functionality. To check that, use CLAPPER_WITH_ENHANCERS_LOADER
.
This function can be used to quickly determine early if Clapper will at least try to handle URI and with one of its enhancers and which one.
Example:
gboolean supported = clapper_enhancer_check (CLAPPER_TYPE_EXTRACTABLE, "https", "example.com", NULL);
For self hosted services a custom URI scheme
without host
can be used. Enhancers should announce
support for such schemes by defining them in their plugin info files.
gboolean supported = clapper_enhancer_check (CLAPPER_TYPE_EXTRACTABLE, "example", NULL, NULL);
Available since: 0.8
Parameters
iface_type
-
Type:
GType
An interface
GType
. scheme
-
Type:
const gchar*
An URI scheme.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. host
-
Type:
const gchar*
An URI host.
The argument can be NULL
.The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. name
-
Type:
const gchar**
Return location for found enhancer name.
The argument will be set by the function. The argument can be NULL
.The returned data is owned by the function. The value is a NUL terminated UTF-8 string.