diff options
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 336 |
1 files changed, 168 insertions, 168 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 4f310db812..06ea94a594 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -72,7 +72,7 @@ #define w(x) #define d(x) -extern const char *x_mailer; +extern const gchar *x_mailer; /* used for both just filtering a folder + uid's, and for filtering a whole folder */ /* used both for fetching mail, and for filtering mail */ @@ -84,7 +84,7 @@ struct _filter_mail_msg { CamelUIDCache *cache; /* UID cache if we are to cache the uids, NULL otherwise */ CamelOperation *cancel; CamelFilterDriver *driver; - int delete; /* delete messages after filtering them? */ + gint delete; /* delete messages after filtering them? */ CamelFolder *destination; /* default destination for any messages, NULL for none */ }; @@ -93,12 +93,12 @@ struct _fetch_mail_msg { struct _filter_mail_msg fmsg; CamelOperation *cancel; /* we have our own cancellation struct, the other should be empty */ - int keep; /* keep on server? */ + gint keep; /* keep on server? */ - char *source_uri; + gchar *source_uri; - void (*done)(const char *source, void *data); - void *data; + void (*done)(const gchar *source, gpointer data); + gpointer data; }; static gchar * @@ -197,7 +197,7 @@ static MailMsgInfo em_filter_folder_element_info = { void mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids, - const char *type, gboolean notify, + const gchar *type, gboolean notify, CamelOperation *cancel) { struct _filter_mail_msg *m; @@ -240,12 +240,12 @@ mail_filter_junk (CamelFolder *folder, GPtrArray *uids) /* ********************************************************************** */ /* Temporary workaround for various issues. Gone before 0.11 */ -static char * +static gchar * uid_cachename_hack (CamelStore *store) { CamelURL *url = CAMEL_SERVICE (store)->url; - char *encoded_url, *filename; - const char *evolution_dir; + gchar *encoded_url, *filename; + const gchar *evolution_dir; encoded_url = g_strdup_printf ("%s%s%s@%s", url->user, url->authmech ? ";auth=" : "", @@ -270,7 +270,7 @@ static void fetch_mail_exec (struct _fetch_mail_msg *m) { struct _filter_mail_msg *fm = (struct _filter_mail_msg *)m; - int i; + gint i; if (m->cancel) camel_operation_register (m->cancel); @@ -282,7 +282,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m) /* FIXME: this should support keep_on_server too, which would then perform a spool access thingy, right? problem is matching raw messages to uid's etc. */ if (!strncmp (m->source_uri, "mbox:", 5)) { - char *path = mail_tool_do_movemail (m->source_uri, &fm->base.ex); + gchar *path = mail_tool_do_movemail (m->source_uri, &fm->base.ex); if (path && !camel_exception_is_set (&fm->base.ex)) { camel_folder_freeze (fm->destination); @@ -301,7 +301,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m) /* this handles 'keep on server' stuff, if we have any new uid's to copy across, we need to copy them to a new array 'cause of the way fetch_mail_free works */ CamelUIDCache *cache = NULL; - char *cachename; + gchar *cachename; cachename = uid_cachename_hack (folder->parent_store); cache = camel_uid_cache_new (cachename); @@ -334,7 +334,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m) if (fm->delete && !camel_exception_is_set (&fm->base.ex)) { /* not keep on server - just delete all the actual messages on the server */ for (i=0;i<folder_uids->len;i++) { - d(printf("force delete uid '%s'\n", (char *)folder_uids->pdata[i])); + d(printf("force delete uid '%s'\n", (gchar *)folder_uids->pdata[i])); camel_folder_delete_message(folder, folder_uids->pdata[i]); } } @@ -397,10 +397,10 @@ static MailMsgInfo fetch_mail_info = { /* ouch, a 'do everything' interface ... */ void -mail_fetch_mail (const char *source, int keep, const char *type, CamelOperation *cancel, - CamelFilterGetFolderFunc get_folder, void *get_data, - CamelFilterStatusFunc *status, void *status_data, - void (*done)(const char *source, void *data), void *data) +mail_fetch_mail (const gchar *source, gint keep, const gchar *type, CamelOperation *cancel, + CamelFilterGetFolderFunc get_folder, gpointer get_data, + CamelFilterStatusFunc *status, gpointer status_data, + void (*done)(const gchar *source, gpointer data), gpointer data) { struct _fetch_mail_msg *m; struct _filter_mail_msg *fm; @@ -443,21 +443,21 @@ static const gchar *resent_recipients[] = { /* send 1 message to a specific transport */ static void -mail_send_message(CamelFolder *queue, const char *uid, const char *destination, CamelFilterDriver *driver, CamelException *ex) +mail_send_message(CamelFolder *queue, const gchar *uid, const gchar *destination, CamelFilterDriver *driver, CamelException *ex) { EAccount *account = NULL; const CamelInternetAddress *iaddr; CamelAddress *from, *recipients; CamelMessageInfo *info = NULL; CamelTransport *xport = NULL; - char *transport_url = NULL; - char *sent_folder_uri = NULL; - const char *resent_from, *tmp; + gchar *transport_url = NULL; + gchar *sent_folder_uri = NULL; + const gchar *resent_from, *tmp; CamelFolder *folder = NULL; GString *err = NULL; struct _camel_header_raw *xev, *header; CamelMimeMessage *message; - int i; + gint i; message = camel_folder_get_message(queue, uid, ex); if (!message) @@ -470,7 +470,7 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination, tmp = camel_header_raw_find(&xev, "X-Evolution-Account", NULL); if (tmp) { - char *name; + gchar *name; name = g_strstrip(g_strdup(tmp)); if ((account = mail_config_get_account_by_uid(name)) @@ -507,7 +507,7 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination, recipients = (CamelAddress *) camel_internet_address_new (); for (i = 0; i < 3; i++) { - const char *type; + const gchar *type; type = resent_from ? resent_recipients[i] : normal_recipients[i]; iaddr = camel_mime_message_get_recipients (message, type); @@ -530,7 +530,7 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination, camel_mime_message_set_date(message, CAMEL_MESSAGE_DATE_CURRENT, 0); for (header = xev;header;header=header->next) { - char *uri; + gchar *uri; if (strcmp(header->name, "X-Evolution-PostTo") != 0) continue; @@ -595,9 +595,9 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination, sent_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT); if (folder != sent_folder) { - const char *name; + const gchar *name; - camel_object_get (folder, NULL, CAMEL_OBJECT_DESCRIPTION, (char **) &name, 0); + camel_object_get (folder, NULL, CAMEL_OBJECT_DESCRIPTION, (gchar **) &name, 0); if (err->len) g_string_append(err, "\n\n"); g_string_append_printf (err, _("Failed to append to %s: %s\n" @@ -656,24 +656,24 @@ struct _send_queue_msg { MailMsg base; CamelFolder *queue; - char *destination; + gchar *destination; CamelFilterDriver *driver; CamelOperation *cancel; /* we use camelfilterstatusfunc, even though its not the filter doing it */ CamelFilterStatusFunc *status; - void *status_data; + gpointer status_data; - void (*done)(const char *destination, void *data); - void *data; + void (*done)(const gchar *destination, gpointer data); + gpointer data; }; static void -report_status (struct _send_queue_msg *m, enum camel_filter_status_t status, int pc, const char *desc, ...) +report_status (struct _send_queue_msg *m, enum camel_filter_status_t status, gint pc, const gchar *desc, ...) { va_list ap; - char *str; + gchar *str; if (m->status) { va_start (ap, desc); @@ -690,7 +690,7 @@ send_queue_exec (struct _send_queue_msg *m) CamelFolder *sent_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT); GPtrArray *uids, *send_uids = NULL; CamelException ex; - int i, j; + gint i, j; d(printf("sending queue\n")); @@ -731,7 +731,7 @@ send_queue_exec (struct _send_queue_msg *m) used as a mechanism to accumualte warning messages and present them back to the user. */ for (i = 0, j = 0; i < send_uids->len; i++) { - int pc = (100 * i) / send_uids->len; + gint pc = (100 * i) / send_uids->len; report_status (m, CAMEL_FILTER_STATUS_START, pc, _("Sending message %d of %d"), i+1, send_uids->len); if (!m->cancel) @@ -828,11 +828,11 @@ static MailMsgInfo send_queue_info = { /* same interface as fetch_mail, just 'cause i'm lazy today (and we need to run it from the same spot?) */ void -mail_send_queue(CamelFolder *queue, const char *destination, - const char *type, CamelOperation *cancel, - CamelFilterGetFolderFunc get_folder, void *get_data, - CamelFilterStatusFunc *status, void *status_data, - void (*done)(const char *destination, void *data), void *data) +mail_send_queue(CamelFolder *queue, const gchar *destination, + const gchar *type, CamelOperation *cancel, + CamelFilterGetFolderFunc get_folder, gpointer get_data, + CamelFilterStatusFunc *status, gpointer status_data, + void (*done)(const gchar *destination, gpointer data), gpointer data) { struct _send_queue_msg *m; @@ -867,10 +867,10 @@ struct _append_msg { CamelFolder *folder; CamelMimeMessage *message; CamelMessageInfo *info; - char *appended_uid; + gchar *appended_uid; - void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, const char *appended_uid, void *data); - void *data; + void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, gint ok, const gchar *appended_uid, gpointer data); + gpointer data; }; static gchar * @@ -911,8 +911,8 @@ static MailMsgInfo append_mail_info = { void mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageInfo *info, - void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, const char *appended_uid, void *data), - void *data) + void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, gint ok, const gchar *appended_uid, gpointer data), + gpointer data) { struct _append_msg *m; @@ -943,11 +943,11 @@ struct _transfer_msg { CamelFolder *source; GPtrArray *uids; gboolean delete; - char *dest_uri; + gchar *dest_uri; guint32 dest_flags; - void (*done)(gboolean ok, void *data); - void *data; + void (*done)(gboolean ok, gpointer data); + gpointer data; }; static gchar * @@ -981,7 +981,7 @@ transfer_messages_exec (struct _transfer_msg *m) /* make sure all deleted messages are marked as seen */ if (m->delete) { - int i; + gint i; for (i = 0; i < m->uids->len; i++) camel_folder_set_message_flags (m->source, m->uids->pdata[i], @@ -1020,10 +1020,10 @@ static MailMsgInfo transfer_messages_info = { void mail_transfer_messages (CamelFolder *source, GPtrArray *uids, gboolean delete_from_source, - const char *dest_uri, + const gchar *dest_uri, guint32 dest_flags, - void (*done) (gboolean ok, void *data), - void *data) + void (*done) (gboolean ok, gpointer data), + gpointer data) { struct _transfer_msg *m; @@ -1051,15 +1051,15 @@ struct _get_folderinfo_msg { CamelStore *store; CamelFolderInfo *info; - gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data); - void *data; + gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data); + gpointer data; gboolean can_clear; /* whether we can clear folder info */ }; static gchar * get_folderinfo_desc (struct _get_folderinfo_msg *m) { - char *ret, *name; + gchar *ret, *name; name = camel_service_get_name((CamelService *)m->store, TRUE); ret = g_strdup_printf(_("Scanning folders in \"%s\""), name); @@ -1079,7 +1079,7 @@ static void get_folderinfo_done (struct _get_folderinfo_msg *m) { if (!m->info && camel_exception_is_set (&m->base.ex)) { - char *url; + gchar *url; url = camel_service_get_url (CAMEL_SERVICE (m->store)); w(g_warning ("Error getting folder info from store at %s: %s", @@ -1109,11 +1109,11 @@ static MailMsgInfo get_folderinfo_info = { (MailMsgFreeFunc) get_folderinfo_free }; -int -mail_get_folderinfo (CamelStore *store, CamelOperation *op, gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data), void *data) +gint +mail_get_folderinfo (CamelStore *store, CamelOperation *op, gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data), gpointer data) { struct _get_folderinfo_msg *m; - int id; + gint id; m = mail_msg_new(&get_folderinfo_info); if (op) { @@ -1135,18 +1135,18 @@ mail_get_folderinfo (CamelStore *store, CamelOperation *op, gboolean (*done)(Cam /* ** ATTACH MESSAGES ****************************************************** */ struct _build_data { - void (*done)(CamelFolder *folder, GPtrArray *uids, CamelMimePart *part, char *subject, void *data); - void *data; + void (*done)(CamelFolder *folder, GPtrArray *uids, CamelMimePart *part, gchar *subject, gpointer data); + gpointer data; }; static void -do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *data) +do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, gpointer data) { struct _build_data *d = data; CamelMultipart *multipart; CamelMimePart *part; - char *subject; - int i; + gchar *subject; + gint i; if (messages->len == 0) { d->done(folder, messages, NULL, NULL, d->data); @@ -1183,7 +1183,7 @@ do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void mail_build_attachment(CamelFolder *folder, GPtrArray *uids, - void (*done)(CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, char *subject, void *data), void *data) + void (*done)(CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, gchar *subject, gpointer data), gpointer data) { struct _build_data *d; @@ -1201,11 +1201,11 @@ mail_build_attachment(CamelFolder *folder, GPtrArray *uids, struct _get_folder_msg { MailMsg base; - char *uri; + gchar *uri; guint32 flags; CamelFolder *folder; - void (*done) (char *uri, CamelFolder *folder, void *data); - void *data; + void (*done) (gchar *uri, CamelFolder *folder, gpointer data); + gpointer data; }; static gchar * @@ -1243,13 +1243,13 @@ static MailMsgInfo get_folder_info = { (MailMsgFreeFunc) get_folder_free }; -int -mail_get_folder (const char *uri, guint32 flags, - void (*done)(char *uri, CamelFolder *folder, void *data), - void *data, MailMsgDispatchFunc dispatch) +gint +mail_get_folder (const gchar *uri, guint32 flags, + void (*done)(gchar *uri, CamelFolder *folder, gpointer data), + gpointer data, MailMsgDispatchFunc dispatch) { struct _get_folder_msg *m; - int id; + gint id; m = mail_msg_new(&get_folder_info); m->uri = g_strdup (uri); @@ -1269,8 +1269,8 @@ struct _get_quota_msg { CamelFolder *folder; CamelFolderQuotaInfo *quota; - void (*done) (CamelFolder *folder, CamelFolderQuotaInfo *quota, void *data); - void *data; + void (*done) (CamelFolder *folder, CamelFolderQuotaInfo *quota, gpointer data); + gpointer data; }; static gchar * @@ -1309,13 +1309,13 @@ static MailMsgInfo get_quota_info = { (MailMsgFreeFunc) get_quota_free }; -int +gint mail_get_folder_quota (CamelFolder *folder, - void (*done)(CamelFolder *folder, CamelFolderQuotaInfo *quota, void *data), - void *data, MailMsgDispatchFunc dispatch) + void (*done)(CamelFolder *folder, CamelFolderQuotaInfo *quota, gpointer data), + gpointer data, MailMsgDispatchFunc dispatch) { struct _get_quota_msg *m; - int id; + gint id; g_return_val_if_fail (folder != NULL, -1); @@ -1336,10 +1336,10 @@ mail_get_folder_quota (CamelFolder *folder, struct _get_store_msg { MailMsg base; - char *uri; + gchar *uri; CamelStore *store; - void (*done) (char *uri, CamelStore *store, void *data); - void *data; + void (*done) (gchar *uri, CamelStore *store, gpointer data); + gpointer data; }; static gchar * @@ -1381,11 +1381,11 @@ static MailMsgInfo get_store_info = { (MailMsgFreeFunc) get_store_free }; -int -mail_get_store (const char *uri, CamelOperation *op, void (*done) (char *uri, CamelStore *store, void *data), void *data) +gint +mail_get_store (const gchar *uri, CamelOperation *op, void (*done) (gchar *uri, CamelStore *store, gpointer data), gpointer data) { struct _get_store_msg *m; - int id; + gint id; m = mail_msg_new (&get_store_info); if (op) { @@ -1409,8 +1409,8 @@ struct _remove_folder_msg { CamelFolder *folder; gboolean removed; - void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, void *data); - void *data; + void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, gpointer data); + gpointer data; }; static gchar * @@ -1438,7 +1438,7 @@ remove_folder_rec (CamelStore *store, CamelFolderInfo *fi, CamelException *ex) if (!CAMEL_IS_VEE_FOLDER (folder)) { GPtrArray *uids = camel_folder_get_uids (folder); - int i; + gint i; /* Delete every message in this folder, then expunge it */ camel_folder_freeze (folder); @@ -1506,7 +1506,7 @@ static MailMsgInfo remove_folder_info = { }; void -mail_remove_folder (CamelFolder *folder, void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, void *data), void *data) +mail_remove_folder (CamelFolder *folder, void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, gpointer data), gpointer data) { struct _remove_folder_msg *m; @@ -1527,8 +1527,8 @@ struct _sync_folder_msg { MailMsg base; CamelFolder *folder; - void (*done) (CamelFolder *folder, void *data); - void *data; + void (*done) (CamelFolder *folder, gpointer data); + gpointer data; }; static gchar * @@ -1566,7 +1566,7 @@ static MailMsgInfo sync_folder_info = { }; void -mail_sync_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data) +mail_sync_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data) { struct _sync_folder_msg *m; @@ -1585,15 +1585,15 @@ struct _sync_store_msg { MailMsg base; CamelStore *store; - int expunge; - void (*done) (CamelStore *store, void *data); - void *data; + gint expunge; + void (*done) (CamelStore *store, gpointer data); + gpointer data; }; static gchar * sync_store_desc (struct _sync_store_msg *m) { - char *uri, *res; + gchar *uri, *res; uri = camel_url_to_string(((CamelService *)m->store)->url, CAMEL_URL_HIDE_ALL); res = g_strdup_printf(m->expunge @@ -1633,7 +1633,7 @@ static MailMsgInfo sync_store_info = { }; void -mail_sync_store(CamelStore *store, int expunge, void (*done) (CamelStore *store, void *data), void *data) +mail_sync_store(CamelStore *store, gint expunge, void (*done) (CamelStore *store, gpointer data), gpointer data) { struct _sync_store_msg *m; @@ -1674,7 +1674,7 @@ static MailMsgInfo refresh_folder_info = { }; void -mail_refresh_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data) +mail_refresh_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data) { struct _sync_folder_msg *m; @@ -1711,7 +1711,7 @@ static MailMsgInfo expunge_folder_info = { }; void -mail_expunge_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data) +mail_expunge_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data) { struct _sync_folder_msg *m; @@ -1730,8 +1730,8 @@ struct _empty_trash_msg { MailMsg base; EAccount *account; - void (*done) (EAccount *account, void *data); - void *data; + void (*done) (EAccount *account, gpointer data); + gpointer data; }; static gchar * @@ -1749,9 +1749,9 @@ empty_trash_desc (struct _empty_trash_msg *m) static void empty_trash_exec (struct _empty_trash_msg *m) { - const char *evolution_dir; + const gchar *evolution_dir; CamelFolder *trash; - char *uri; + gchar *uri; if (m->account) { trash = mail_tool_get_trash (m->account->source->url, FALSE, &m->base.ex); @@ -1791,7 +1791,7 @@ static MailMsgInfo empty_trash_info = { }; void -mail_empty_trash(EAccount *account, void (*done) (EAccount *account, void *data), void *data) +mail_empty_trash(EAccount *account, void (*done) (EAccount *account, gpointer data), gpointer data) { struct _empty_trash_msg *m; @@ -1811,9 +1811,9 @@ struct _get_message_msg { MailMsg base; CamelFolder *folder; - char *uid; - void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data); - void *data; + gchar *uid; + void (*done) (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data); + gpointer data; CamelMimeMessage *message; CamelOperation *cancel; }; @@ -1857,9 +1857,9 @@ static MailMsgInfo get_message_info = { }; void -mail_get_message(CamelFolder *folder, const char *uid, void (*done) (CamelFolder *folder, const char *uid, - CamelMimeMessage *msg, void *data), - void *data, MailMsgDispatchFunc dispatch) +mail_get_message(CamelFolder *folder, const gchar *uid, void (*done) (CamelFolder *folder, const gchar *uid, + CamelMimeMessage *msg, gpointer data), + gpointer data, MailMsgDispatchFunc dispatch) { struct _get_message_msg *m; @@ -1868,13 +1868,13 @@ mail_get_message(CamelFolder *folder, const char *uid, void (*done) (CamelFolder camel_object_ref(folder); m->uid = g_strdup(uid); m->data = data; - m->done = (void (*) (CamelFolder *, const char *, CamelMimeMessage *, void *)) done; + m->done = (void (*) (CamelFolder *, const gchar *, CamelMimeMessage *, gpointer )) done; m->cancel = camel_operation_new(NULL, NULL); dispatch (m); } -typedef void (*get_done)(CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *); +typedef void (*get_done)(CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, CamelException *); static void get_messagex_done (struct _get_message_msg *m) @@ -1896,8 +1896,8 @@ static MailMsgInfo get_messagex_info = { /* This is temporary, to avoid having to rewrite everything that uses mail_get_message; it adds an exception argument to the callback */ CamelOperation * -mail_get_messagex(CamelFolder *folder, const char *uid, void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *), - void *data, MailMsgDispatchFunc dispatch) +mail_get_messagex(CamelFolder *folder, const gchar *uid, void (*done) (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, CamelException *), + gpointer data, MailMsgDispatchFunc dispatch) { struct _get_message_msg *m; @@ -1906,7 +1906,7 @@ mail_get_messagex(CamelFolder *folder, const char *uid, void (*done) (CamelFolde camel_object_ref(folder); m->uid = g_strdup(uid); m->data = data; - m->done = (void (*) (CamelFolder *, const char *, CamelMimeMessage *, void *)) done; + m->done = (void (*) (CamelFolder *, const gchar *, CamelMimeMessage *, gpointer )) done; m->cancel = camel_operation_new(NULL, NULL); dispatch (m); @@ -1923,8 +1923,8 @@ struct _get_messages_msg { GPtrArray *uids; GPtrArray *messages; - void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data); - void *data; + void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer data); + gpointer data; }; static gchar * @@ -1938,11 +1938,11 @@ get_messages_desc (struct _get_messages_msg *m) static void get_messages_exec (struct _get_messages_msg *m) { - int i; + gint i; CamelMimeMessage *message; for (i=0; i<m->uids->len; i++) { - int pc = ((i+1) * 100) / m->uids->len; + gint pc = ((i+1) * 100) / m->uids->len; message = camel_folder_get_message(m->folder, m->uids->pdata[i], &m->base.ex); camel_operation_progress(m->base.cancel, pc); @@ -1963,7 +1963,7 @@ get_messages_done (struct _get_messages_msg *m) static void get_messages_free (struct _get_messages_msg *m) { - int i; + gint i; em_utils_uids_free (m->uids); for (i=0;i<m->messages->len;i++) { @@ -1984,8 +1984,8 @@ static MailMsgInfo get_messages_info = { void mail_get_messages(CamelFolder *folder, GPtrArray *uids, - void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data), - void *data) + void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer data), + gpointer data) { struct _get_messages_msg *m; @@ -2007,9 +2007,9 @@ struct _save_messages_msg { CamelFolder *folder; GPtrArray *uids; - char *path; - void (*done)(CamelFolder *folder, GPtrArray *uids, char *path, void *data); - void *data; + gchar *path; + void (*done)(CamelFolder *folder, GPtrArray *uids, gchar *path, gpointer data); + gpointer data; }; static gchar * @@ -2024,7 +2024,7 @@ static void save_prepare_part (CamelMimePart *mime_part) { CamelDataWrapper *wrapper; - int parts, i; + gint parts, i; wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part)); if (!wrapper) @@ -2058,8 +2058,8 @@ save_messages_exec (struct _save_messages_msg *m) CamelStreamFilter *filtered_stream; CamelMimeFilterFrom *from_filter; CamelStream *stream; - int i; - char *from, *path; + gint i; + gchar *from, *path; if (strstr (m->path, "://")) path = m->path; @@ -2077,7 +2077,7 @@ save_messages_exec (struct _save_messages_msg *m) for (i=0; i<m->uids->len; i++) { CamelMimeMessage *message; - int pc = ((i+1) * 100) / m->uids->len; + gint pc = ((i+1) * 100) / m->uids->len; message = camel_folder_get_message(m->folder, m->uids->pdata[i], &m->base.ex); camel_operation_progress(m->base.cancel, pc); @@ -2129,12 +2129,12 @@ static MailMsgInfo save_messages_info = { (MailMsgFreeFunc) save_messages_free }; -int -mail_save_messages(CamelFolder *folder, GPtrArray *uids, const char *path, - void (*done) (CamelFolder *folder, GPtrArray *uids, char *path, void *data), void *data) +gint +mail_save_messages(CamelFolder *folder, GPtrArray *uids, const gchar *path, + void (*done) (CamelFolder *folder, GPtrArray *uids, gchar *path, gpointer data), gpointer data) { struct _save_messages_msg *m; - int id; + gint id; m = mail_msg_new(&save_messages_info); m->folder = folder; @@ -2156,9 +2156,9 @@ struct _save_part_msg { MailMsg base; CamelMimePart *part; - char *path; - void (*done)(CamelMimePart *part, char *path, int saved, void *data); - void *data; + gchar *path; + void (*done)(CamelMimePart *part, gchar *path, gint saved, gpointer data); + gpointer data; gboolean readonly; }; @@ -2173,7 +2173,7 @@ save_part_exec (struct _save_part_msg *m) { CamelDataWrapper *content; CamelStream *stream; - char *path; + gchar *path; if (strstr (m->path, "://")) path = m->path; @@ -2234,12 +2234,12 @@ static MailMsgInfo save_part_info = { (MailMsgFreeFunc) save_part_free }; -int -mail_save_part (CamelMimePart *part, const char *path, - void (*done)(CamelMimePart *part, char *path, int saved, void *data), void *data, gboolean readonly) +gint +mail_save_part (CamelMimePart *part, const gchar *path, + void (*done)(CamelMimePart *part, gchar *path, gint saved, gpointer data), gpointer data, gboolean readonly) { struct _save_part_msg *m; - int id; + gint id; m = mail_msg_new (&save_part_info); m->part = part; camel_object_ref (part); @@ -2261,9 +2261,9 @@ struct _prep_offline_msg { MailMsg base; CamelOperation *cancel; - char *uri; - void (*done)(const char *uri, void *data); - void *data; + gchar *uri; + void (*done)(const gchar *uri, gpointer data); + gpointer data; }; static void @@ -2317,10 +2317,10 @@ static MailMsgInfo prep_offline_info = { }; void -mail_prep_offline(const char *uri, +mail_prep_offline(const gchar *uri, CamelOperation *cancel, - void (*done)(const char *, void *data), - void *data) + void (*done)(const gchar *, gpointer data), + gpointer data) { struct _prep_offline_msg *m; @@ -2342,15 +2342,15 @@ struct _set_offline_msg { CamelStore *store; gboolean offline; - void (*done)(CamelStore *store, void *data); - void *data; + void (*done)(CamelStore *store, gpointer data); + gpointer data; }; static gchar * set_offline_desc (struct _set_offline_msg *m) { - char *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE); - char *msg; + gchar *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE); + gchar *msg; msg = g_strdup_printf(m->offline?_("Disconnecting from %s"):_("Reconnecting to %s"), service_name); @@ -2413,13 +2413,13 @@ static MailMsgInfo set_offline_info = { (MailMsgFreeFunc) set_offline_free }; -int +gint mail_store_set_offline (CamelStore *store, gboolean offline, - void (*done)(CamelStore *, void *data), - void *data) + void (*done)(CamelStore *, gpointer data), + gpointer data) { struct _set_offline_msg *m; - int id; + gint id; /* Cancel any pending connect first so the set_offline_op * thread won't get queued behind a hung connect op. @@ -2442,11 +2442,11 @@ mail_store_set_offline (CamelStore *store, gboolean offline, /* ** Prepare OFFLINE ***************************************************** */ -static char * +static gchar * prepare_offline_desc (struct _set_offline_msg *m) { - char *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE); - char *msg; + gchar *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE); + gchar *msg; msg = g_strdup_printf (_("Preparing account '%s' for offline"), service_name); g_free(service_name); @@ -2487,11 +2487,11 @@ static MailMsgInfo prepare_offline_info = { (MailMsgFreeFunc) prepare_offline_free }; -int +gint mail_store_prepare_offline (CamelStore *store) { struct _set_offline_msg *m; - int id; + gint id; /* Cancel any pending connect first so the set_offline_op * thread won't get queued behind a hung connect op. @@ -2511,7 +2511,7 @@ mail_store_prepare_offline (CamelStore *store) /* ** Execute Shell Command ***************************************************** */ void -mail_execute_shell_command (CamelFilterDriver *driver, int argc, char **argv, void *data) +mail_execute_shell_command (CamelFilterDriver *driver, gint argc, gchar **argv, gpointer data) { if (argc <= 0) return; @@ -2523,12 +2523,12 @@ mail_execute_shell_command (CamelFilterDriver *driver, int argc, char **argv, vo struct _check_msg { MailMsg base; - char *url; + gchar *url; CamelProviderType type; GList *authtypes; - void (*done)(const char *url, CamelProviderType type, GList *types, void *data); - void *data; + void (*done)(const gchar *url, CamelProviderType type, GList *types, gpointer data); + gpointer data; }; static gchar * @@ -2574,11 +2574,11 @@ static MailMsgInfo check_service_info = { (MailMsgFreeFunc) check_service_free }; -int -mail_check_service(const char *url, CamelProviderType type, void (*done)(const char *url, CamelProviderType type, GList *authtypes, void *data), void *data) +gint +mail_check_service(const gchar *url, CamelProviderType type, void (*done)(const gchar *url, CamelProviderType type, GList *authtypes, gpointer data), gpointer data) { struct _check_msg *m; - int id; + gint id; m = mail_msg_new (&check_service_info); m->url = g_strdup(url); |