X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-pair.h;h=f2deaf33cb492cdc83011e51780da717cc19c12c;hp=e1ebbfd2e1376ed1113e84d167ef093af18afcbc;hb=0666d51e7a618734ce58cb5a77192c645d5f1eee;hpb=bc321ae5f719ae474bb91af2a5dc544f64ab7d80 diff --git a/src/modest-pair.h b/src/modest-pair.h index e1ebbfd..f2deaf3 100644 --- a/src/modest-pair.h +++ b/src/modest-pair.h @@ -67,16 +67,27 @@ ModestPair* modest_pair_new (gpointer first, gpointer second, gboolean own); void modest_pair_free (ModestPair *self); - /** * modest_pair_list_free: * @pairs: a valid ModestPairList * - * convenience function to destroy all pairs in a list + * Convenience function to destroy all pairs in a list and the list itself. + * + */ +void modest_pair_list_free (ModestPairList *pairs); + +/** + * modest_pair_list_find_by_first + * @pairs: A valid ModestPairList + * @first: The first element of the pair to be found. + * @func: The function to call for each element. It should return 0 when the desired element is found. + * + * Find an element with a matching first entry. * - * Returns: NULL + * Returns: a previously allocated ModestPair instance, or NULL if none was found. */ -ModestPairList *modest_pair_list_free (ModestPairList *pairs); +ModestPair* modest_pair_list_find_by_first_as_string (ModestPairList *pairs, + const gchar* first); G_END_DECLS