comparison libpurple/request.c @ 32555:ca8b2ec198d9

Add a function for prompting about a certificate. This is basically a small wrapper around the request field API.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 26 Feb 2012 04:37:10 +0000
parents c3eaa2a6aa42
children
comparison
equal deleted inserted replaced
32554:03dcb0185c82 32555:ca8b2ec198d9
1664 } 1664 }
1665 1665
1666 return NULL; 1666 return NULL;
1667 } 1667 }
1668 1668
1669 void *
1670 purple_request_certificate(void *handle, const char *title,
1671 const char *primary, const char *secondary,
1672 PurpleCertificate *cert,
1673 const char *ok_text, GCallback ok_cb,
1674 const char *cancel_text, GCallback cancel_cb,
1675 void *user_data)
1676 {
1677 PurpleRequestFields *fields;
1678 PurpleRequestFieldGroup *group;
1679 PurpleRequestField *field;
1680
1681 fields = purple_request_fields_new();
1682 group = purple_request_field_group_new(NULL);
1683 purple_request_fields_add_group(fields, group);
1684 field = purple_request_field_certificate_new("certificate", "Certificate", cert);
1685 purple_request_field_group_add_field(group, field);
1686
1687 return purple_request_fields(handle, title, primary, secondary, fields,
1688 ok_text, ok_cb, cancel_text, cancel_cb,
1689 NULL, NULL, NULL, user_data);
1690 }
1691
1669 static void 1692 static void
1670 purple_request_close_info(PurpleRequestInfo *info) 1693 purple_request_close_info(PurpleRequestInfo *info)
1671 { 1694 {
1672 PurpleRequestUiOps *ops; 1695 PurpleRequestUiOps *ops;
1673 1696