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