Esempio n. 1
0
/*
 * Helper function for lasso_identity_get_offerings, match them with a service
 * type string */
static
void add_matching_resource_offering_to_list(G_GNUC_UNUSED char *name, LassoDiscoResourceOffering *offering,
	struct HelperStruct *ctx)
{
	if (ctx->service_type == NULL ||
		( offering->ServiceInstance != NULL &&
		offering->ServiceInstance->ServiceType != NULL &&
		strcmp(offering->ServiceInstance->ServiceType, ctx->service_type) == 0)) {
		lasso_list_add_gobject(ctx->list, offering);
	}
}
Esempio n. 2
0
/**
 * array_to_glist_gobject:
 * @array: a perl array
 *
 * Convert a perl array of #GObject to a #GList of #GObject objects
 *
 * Return value: a newly created #GList of #GObject objects
 */
G_GNUC_UNUSED static GList*
array_to_glist_gobject(AV *array) {
       I32 len, i;
       GList *result = NULL;

       if (! array)
               return NULL;
       len = av_len(array);
       for (i=len-1; i >= 0; i--) {
               SV **sv;

               sv = av_fetch(array, i, 0);
               lasso_list_add_gobject(result, gperl_get_object(*sv));
       }

       return result;
}