Mercurial > pidgin
changeset 18988:4189fc3befba
- Add purple_certificate_import
author | William Ehlhardt <williamehlhardt@gmail.com> |
---|---|
date | Fri, 06 Jul 2007 00:28:14 +0000 |
parents | a763dd083b79 |
children | 43d1ee6a3ed5 |
files | libpurple/certificate.c libpurple/certificate.h |
diffstat | 2 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/certificate.c Fri Jul 06 00:21:42 2007 +0000 +++ b/libpurple/certificate.c Fri Jul 06 00:28:14 2007 +0000 @@ -125,6 +125,16 @@ g_list_free(crt_list); } +PurpleCertificate * +purple_import_certificate(PurpleCertificateScheme *scheme, const gchar *filename) +{ + g_return_val_if_fail(scheme, NULL); + g_return_val_if_fail(scheme->import_certificate, NULL); + g_return_val_if_fail(filename, NULL); + + return (scheme->import_certificate)(filename); +} + gboolean purple_certificate_export(const gchar *filename, PurpleCertificate *crt) {
--- a/libpurple/certificate.h Fri Jul 06 00:21:42 2007 +0000 +++ b/libpurple/certificate.h Fri Jul 06 00:28:14 2007 +0000 @@ -368,6 +368,16 @@ purple_certificate_destroy_list (GList * crt_list); /** + * Imports a PurpleCertificate from a file + * + * @param scheme Scheme to import under + * @param filename File path to import from + * @return Pointer to a new PurpleCertificate, or NULL on failure + */ +PurpleCertificate * +purple_import_certificate(PurpleCertificateScheme *scheme, const gchar *filename); + +/** * Exports a PurpleCertificate to a file * * @param filename File to export the certificate to