comparison libpurple/certificate.h @ 18995:47b06daea9d1

- Add pool retrieve, contains, and store functions to certificate API - Minor doc clarification
author William Ehlhardt <williamehlhardt@gmail.com>
date Sun, 08 Jul 2007 00:42:01 +0000
parents bf23d58ec9c3
children dc60287ce426
comparison
equal deleted inserted replaced
18994:bf23d58ec9c3 18995:47b06daea9d1
71 }; 71 };
72 72
73 /** 73 /**
74 * Database for retrieval or storage of Certificates 74 * Database for retrieval or storage of Certificates
75 * 75 *
76 * More or less a hash table; all lookups and writes are performed by a string 76 * More or less a hash table; all lookups and writes are controlled by a string
77 * key. 77 * key.
78 */ 78 */
79 struct _PurpleCertificatePool 79 struct _PurpleCertificatePool
80 { 80 {
81 /** Scheme this Pool operates for */ 81 /** Scheme this Pool operates for */
436 * ~/.purple/certificates/scheme_name/pool_name/unique_id 436 * ~/.purple/certificates/scheme_name/pool_name/unique_id
437 */ 437 */
438 gchar * 438 gchar *
439 purple_certificate_pool_mkpath(PurpleCertificatePool *pool, const gchar *id); 439 purple_certificate_pool_mkpath(PurpleCertificatePool *pool, const gchar *id);
440 440
441 /**
442 * Check for presence of an ID in a pool.
443 * @param pool Pool to look in
444 * @param id ID to look for
445 * @return TRUE if the ID is in the pool, else FALSE
446 */
447 gboolean
448 purple_certificate_pool_contains(PurpleCertificatePool *pool, const gchar *id);
449
450 /**
451 * Retrieve a certificate from a pool.
452 * @param pool Pool to fish in
453 * @param id ID to look up
454 * @return Retrieved certificate, or NULL if it wasn't there
455 */
456 PurpleCertificate *
457 purple_certificate_pool_retrieve(PurpleCertificatePool *pool, const gchar *id);
458
459 /**
460 * Add a certificate to a pool
461 *
462 * Any pre-existing certificate of the same ID will be overwritten.
463 *
464 * @param pool Pool to add to
465 * @param id ID to store the certificate with
466 * @param crt Certificate to store
467 * @return TRUE if the operation succeeded, otherwise FALSE
468 */
469 gboolean
470 purple_certificate_pool_store(PurpleCertificatePool *pool, const gchar *id, PurpleCertificate *crt);
471
441 /*@}*/ 472 /*@}*/
442 473
443 /*****************************************************************************/ 474 /*****************************************************************************/
444 /** @name Certificate Subsystem API */ 475 /** @name Certificate Subsystem API */
445 /*****************************************************************************/ 476 /*****************************************************************************/