comparison libpurple/certificate.c @ 19044:602295db8e6b

- Register the certificate-stored and certificate-deleted signals
author William Ehlhardt <williamehlhardt@gmail.com>
date Fri, 27 Jul 2007 06:56:00 +0000
parents 8b627694bf4a
children 8599a27ad69c
comparison
equal deleted inserted replaced
19043:8026af6fbb3b 19044:602295db8e6b
30 30
31 #include "certificate.h" 31 #include "certificate.h"
32 #include "debug.h" 32 #include "debug.h"
33 #include "internal.h" 33 #include "internal.h"
34 #include "request.h" 34 #include "request.h"
35 #include "signals.h"
35 #include "util.h" 36 #include "util.h"
36 37
37 /** List holding pointers to all registered certificate schemes */ 38 /** List holding pointers to all registered certificate schemes */
38 static GList *cert_schemes = NULL; 39 static GList *cert_schemes = NULL;
39 /** List of registered Verifiers */ 40 /** List of registered Verifiers */
1011 1012
1012 if (success) { 1013 if (success) {
1013 /* Register the Pool */ 1014 /* Register the Pool */
1014 cert_pools = g_list_prepend(cert_pools, pool); 1015 cert_pools = g_list_prepend(cert_pools, pool);
1015 1016
1017 /* TODO: Emit a signal that the pool got registered */
1018
1019 purple_signal_register(pool, /* Signals emitted from pool */
1020 "certificate-stored",
1021 purple_marshal_VOID__POINTER_POINTER,
1022 NULL, /* No callback return value */
1023 2, /* Two non-data arguments */
1024 purple_value_new(PURPLE_TYPE_SUBTYPE,
1025 PURPLE_SUBTYPE_CERTIFICATEPOOL),
1026 purple_value_new(PURPLE_TYPE_STRING));
1027
1028 purple_signal_register(pool, /* Signals emitted from pool */
1029 "certificate-deleted",
1030 purple_marshal_VOID__POINTER_POINTER,
1031 NULL, /* No callback return value */
1032 2, /* Two non-data arguments */
1033 purple_value_new(PURPLE_TYPE_SUBTYPE,
1034 PURPLE_SUBTYPE_CERTIFICATEPOOL),
1035 purple_value_new(PURPLE_TYPE_STRING));
1036
1016 return TRUE; 1037 return TRUE;
1017 } else { 1038 } else {
1018 return FALSE; 1039 return FALSE;
1019 } 1040 }
1020 1041
1045 } 1066 }
1046 1067
1047 cert_pools = g_list_remove(cert_pools, pool); 1068 cert_pools = g_list_remove(cert_pools, pool);
1048 1069
1049 /* TODO: Signalling? */ 1070 /* TODO: Signalling? */
1071 purple_signal_unregister(pool, "certificate-stored");
1072 purple_signal_unregister(pool, "certificate-deleted");
1050 1073
1051 return TRUE; 1074 return TRUE;
1052 } 1075 }