diff libpurple/certificate.h @ 19018:d6f902265076

- Add purple_certificate_copy and associated machinery
author William Ehlhardt <williamehlhardt@gmail.com>
date Fri, 13 Jul 2007 08:38:21 +0000
parents b1090cbfc286
children d69355001a6e
line wrap: on
line diff
--- a/libpurple/certificate.h	Fri Jul 13 08:10:33 2007 +0000
+++ b/libpurple/certificate.h	Fri Jul 13 08:38:21 2007 +0000
@@ -162,6 +162,16 @@
 	 */
 	gboolean (* export_certificate)(const gchar *filename, PurpleCertificate *crt);
 
+	/**
+	 * Duplicates a certificate
+	 *
+	 * Certificates are generally assumed to be read-only, so feel free to
+	 * do any sort of reference-counting magic you want here. If this ever
+	 * changes, please remember to change the magic accordingly.
+	 * @return Reference to the new copy
+	 */
+	PurpleCertificate * (* copy_certificate)(PurpleCertificate *crt);
+
 	/** Destroys and frees a Certificate structure
 	 *
 	 *  Destroys a Certificate's internal data structures and calls
@@ -360,6 +370,15 @@
 /*@{*/
 
 /**
+ * Makes a duplicate of a certificate
+ *
+ * @param crt        Instance to duplicate
+ * @return Pointer to new instance
+ */
+PurpleCertificate *
+purple_certificate_copy(PurpleCertificate *crt);
+
+/**
  * Destroys and free()'s a Certificate
  *
  * @param crt        Instance to destroy. May be NULL.