diff libpurple/certificate.h @ 19026:b3acaf46d9ad

- Add pool_get_idlist / pool_destroy_idlist
author William Ehlhardt <williamehlhardt@gmail.com>
date Mon, 16 Jul 2007 23:59:14 +0000
parents eb86ff3ba21a
children 86403f33720b
line wrap: on
line diff
--- a/libpurple/certificate.h	Sun Jul 15 06:28:08 2007 +0000
+++ b/libpurple/certificate.h	Mon Jul 16 23:59:14 2007 +0000
@@ -118,6 +118,9 @@
 	 *  @return TRUE if the operation succeeded, otherwise FALSE
 	 */
 	gboolean (* put_cert)(const gchar *id, PurpleCertificate *crt);
+
+	/** Returns a list of IDs stored in the pool */
+	GList * (* get_idlist)(void);
 };
 
 /** A certificate type
@@ -522,6 +525,24 @@
 gboolean
 purple_certificate_pool_store(PurpleCertificatePool *pool, const gchar *id, PurpleCertificate *crt);
 
+/**
+ * Get the list of IDs currently in the pool.
+ *
+ * @param pool   Pool to enumerate
+ * @return GList pointing to newly-allocated id strings. Free using
+ *         purple_certificate_pool_destroy_idlist()
+ */
+GList *
+purple_certificate_pool_get_idlist(PurpleCertificatePool *pool);
+
+/**
+ * Destroys the result given by purple_certificate_pool_get_idlist()
+ *
+ * @param idlist ID List to destroy
+ */
+void
+purple_certificate_pool_destroy_idlist(GList *idlist);
+
 /*@}*/
 
 /*****************************************************************************/