void * gaim_notify_email(void *handle, const char *subject, const char *from, const char *to, const char *url, GCallback cb, void *user_data) { GaimNotifyUiOps *ops; ops = gaim_get_notify_ui_ops(); if (ops != NULL && ops->notify_email != NULL) { GaimNotifyInfo *info; info = g_new0(GaimNotifyInfo, 1); info->type = GAIM_NOTIFY_EMAIL; info->handle = handle; info->ui_handle = ops->notify_email(subject, from, to, url, cb, user_data); handles = g_list_append(handles, info); return info->ui_handle; } return NULL; }
void * gaim_notify_email(void *handle, const char *subject, const char *from, const char *to, const char *url, GaimNotifyCloseCallback cb, gpointer user_data) { GaimNotifyUiOps *ops; ops = gaim_notify_get_ui_ops(); if (ops != NULL && ops->notify_email != NULL) { GaimNotifyInfo *info; info = g_new0(GaimNotifyInfo, 1); info->type = GAIM_NOTIFY_EMAIL; info->handle = handle; info->ui_handle = ops->notify_email(handle, subject, from, to, url); info->cb = cb; info->cb_user_data = user_data; if (info->ui_handle != NULL) { handles = g_list_append(handles, info); return info->ui_handle; } else { if (info->cb != NULL) info->cb(info->cb_user_data); g_free(info); return NULL; } } else { if (cb != NULL) cb(user_data); } return NULL; }