From: Stef Walter Date: Wed, 19 Oct 2011 10:13:03 +0000 (+0200) Subject: gcr: Add function to get the elements of a union collection X-Git-Tag: 3.3.1~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb973d9c553412cb66f6ec9be005d4cdab67eb0e;p=platform%2Fupstream%2Fgcr.git gcr: Add function to get the elements of a union collection --- diff --git a/gcr/gcr-union-collection.c b/gcr/gcr-union-collection.c index 459fbcc..ce7e465 100644 --- a/gcr/gcr-union-collection.c +++ b/gcr/gcr-union-collection.c @@ -338,3 +338,19 @@ gcr_union_collection_size (GcrUnionCollection *self) g_return_val_if_fail (GCR_IS_UNION_COLLECTION (self), FALSE); return g_hash_table_size (self->pv->collections); } + +/** + * gcr_union_collection_elements: + * @self: the union collection + * + * Get the collections that have been added to this union. + * + * Returns: (element-type Gcr.Collection) (transfer container): collections + * added to the union + */ +GList * +gcr_union_collection_elements (GcrUnionCollection *self) +{ + g_return_val_if_fail (GCR_IS_UNION_COLLECTION (self), NULL); + return g_hash_table_get_values (self->pv->collections); +} diff --git a/gcr/gcr-union-collection.h b/gcr/gcr-union-collection.h index 4628799..15c207f 100644 --- a/gcr/gcr-union-collection.h +++ b/gcr/gcr-union-collection.h @@ -71,6 +71,8 @@ gboolean gcr_union_collection_have (GcrUnionCollec guint gcr_union_collection_size (GcrUnionCollection *self); +GList * gcr_union_collection_elements (GcrUnionCollection *self); + G_END_DECLS #endif /* __GCR_UNION_COLLECTION_H__ */