changeset 18926:8c4d52bc0319

- Add unregister_scheme
author William Ehlhardt <williamehlhardt@gmail.com>
date Thu, 21 Jun 2007 00:28:31 +0000
parents 3298421a330e
children 9abc911c65aa
files libpurple/certificate.c libpurple/certificate.h
diffstat 2 files changed, 26 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/certificate.c	Wed Jun 20 22:42:47 2007 +0000
+++ b/libpurple/certificate.c	Thu Jun 21 00:28:31 2007 +0000
@@ -77,3 +77,19 @@
 	/* TODO: Signalling and such? */
 	return TRUE;
 }
+
+gboolean
+purple_certificate_unregister_scheme(PurpleCertificateScheme *scheme)
+{
+	if (NULL == scheme) {
+		purple_debug_warning("certificate",
+				     "Attempting to unregister NULL scheme");
+	}
+
+	/* TODO: signalling? */
+
+	/* TODO: unregister all CertificatePools for this scheme! */
+	cert_schemes = g_list_remove(cert_schemes, scheme);
+
+	return TRUE;
+}
--- a/libpurple/certificate.h	Wed Jun 20 22:42:47 2007 +0000
+++ b/libpurple/certificate.h	Thu Jun 21 00:28:31 2007 +0000
@@ -119,6 +119,16 @@
 gboolean
 purple_certificate_register_scheme(PurpleCertificateScheme *scheme);
 
+/** Unregister a CertificateScheme from libpurple
+ *
+ * @param scheme    Scheme to unregister.
+ *                  If the scheme is not registered, this is a no-op.
+ *
+ * @return TRUE if the unregister completed successfully
+ */
+gboolean
+purple_certificate_unregister_scheme(PurpleCertificateScheme *scheme);
+
 /* TODO: ADD STUFF HERE */
 
 /*@}*/