Mercurial > pidgin
changeset 17910:668a294f9a72
- Added certificate.[ch] and got them integrated into the build
author | William Ehlhardt <williamehlhardt@gmail.com> |
---|---|
date | Fri, 01 Jun 2007 23:54:46 +0000 |
parents | f7bf776d628a |
children | 91feef6cbede |
files | libpurple/Makefile.am libpurple/certificate.c libpurple/certificate.h |
diffstat | 3 files changed, 120 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/Makefile.am Fri Jun 01 23:53:05 2007 +0000 +++ b/libpurple/Makefile.am Fri Jun 01 23:54:46 2007 +0000 @@ -36,6 +36,7 @@ accountopt.c \ blist.c \ buddyicon.c \ + certificate.c \ cipher.c \ circbuffer.c \ cmds.c \ @@ -85,6 +86,7 @@ accountopt.h \ blist.h \ buddyicon.h \ + certificate.h \ cipher.h \ circbuffer.h \ cmds.h \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libpurple/certificate.c Fri Jun 01 23:54:46 2007 +0000 @@ -0,0 +1,44 @@ +/** + * @file certificate.h Public-Key Certificate API + * @ingroup core + */ + +/* + * + * purple + * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <glib.h> + +#include "certificate.h" + +/** List holding pointers to all registered certificate schemes */ +GList *cert_schemes = NULL; + +struct _Certificate +{ + /** Scheme this certificate is under */ + CertificateScheme * scheme; + /** Opaque pointer to internal data */ + gpointer data; +}; + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libpurple/certificate.h Fri Jun 01 23:54:46 2007 +0000 @@ -0,0 +1,74 @@ +/** + * @file certificate.h Public-Key Certificate API + * @ingroup core + */ + +/* + * + * purple + * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _PURPLE_CERTIFICATE_H +#define _PURPLE_CERTIFICATE_H + +#include <glib.h> + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +typedef struct _CertificateScheme CertificateScheme; + +/** A certificate type + * + * A CertificateScheme must implement all of the fields in the structure, + * and register it using TODO:purple_register_certscheme() + * + * There may be only ONE + */ +struct _CertificateScheme +{ + /** Name of the certificate type + * ex: "x509", "pgp", etc. + * This must be globally unique - you may not register more than one + * CertificateScheme of the same name at a time. + */ + gchar * name; + + /* TODO: Fill out this structure */ +}; + + +/*****************************************************************************/ +/** @name PurpleCertificate Subsystem API */ +/*****************************************************************************/ +/*@{*/ + +/* TODO: ADD STUFF HERE */ + +/*@}*/ + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _PURPLE_CERTIFICATE_H */