gsignond_plugin_proxy_factory_get_plugin_types(
GSignondPluginProxyFactory* factory)
{
+ g_return_val_if_fail(factory, NULL);
+
if (factory->methods == NULL) {
_enumerate_plugins (factory);
}
gsignond_plugin_proxy_factory_get_plugin_mechanisms(
GSignondPluginProxyFactory* factory, const gchar* plugin_type)
{
+ g_return_val_if_fail(factory && plugin_type, NULL);
g_return_val_if_fail(factory->methods_to_mechanisms, NULL);
if (factory->methods == NULL) {
static void check_plugin(GSignondPlugin* plugin)
{
- gchar* type;
- gchar** mechanisms;
+ gchar* type = NULL;
+ gchar** mechanisms = NULL;
fail_if(plugin == NULL);
g_object_get(plugin, "type", &type, "mechanisms", &mechanisms, NULL);
+ fail_if(type == NULL || mechanisms == NULL);
fail_unless(g_strcmp0(type, "password") == 0);
fail_unless(g_strcmp0(mechanisms[0], "password") == 0);
fail_unless(mechanisms[1] == NULL);
fail_if(factory == NULL);
const gchar *pass_method = NULL;
const gchar** pmethods = NULL;
-
+
const gchar** methods = gsignond_plugin_proxy_factory_get_plugin_types(
factory);
fail_if(methods == NULL);
}
pmethods++;
}
+ fail_if(pass_method == NULL);
const gchar** mechanisms =
gsignond_plugin_proxy_factory_get_plugin_mechanisms(factory,
pass_method);
fail_if(mechanisms == NULL);
+ fail_if(mechanisms[0] == NULL);
fail_if(strcmp(mechanisms[0], "password") != 0);
fail_if(mechanisms[1] != NULL);