aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-07-01 12:48:28 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-07-01 12:48:28 +0800
commitb95075468947bc79594acd973d780819b92e10f1 (patch)
tree5124c702ab9c941bfef662b497afae060b9a122e /camel/providers
parentf7019627af193bfa63271e6cef3a523ad5da9c5e (diff)
downloadgsoc2013-evolution-b95075468947bc79594acd973d780819b92e10f1.tar
gsoc2013-evolution-b95075468947bc79594acd973d780819b92e10f1.tar.gz
gsoc2013-evolution-b95075468947bc79594acd973d780819b92e10f1.tar.bz2
gsoc2013-evolution-b95075468947bc79594acd973d780819b92e10f1.tar.lz
gsoc2013-evolution-b95075468947bc79594acd973d780819b92e10f1.tar.xz
gsoc2013-evolution-b95075468947bc79594acd973d780819b92e10f1.tar.zst
gsoc2013-evolution-b95075468947bc79594acd973d780819b92e10f1.zip
Renamed _by_uid methods. Since we no longer have get-by-number methods, no
2000-07-01 Jeffrey Stedfast <fejj@helixcode.com> * camel-folder.c: Renamed _by_uid methods. Since we no longer have get-by-number methods, no need to have the _by_uid extensions. (get_message_by_uid): Renamed to get_message (delete_message_by_uid): Renamed to delete_message (summary_get_by_uid): Renamed to get_message_info * providers/mbox/camel-mbox-folder.c: * providers/pop3/camel-pop3-folder.c: * providers/imap/camel-imap-folder.c: * providers/vee/camel-vee-folder.c: Updated to reflect camel-folder changes. svn path=/trunk/; revision=3843
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/imap/camel-imap-folder.c28
-rw-r--r--camel/providers/mbox/camel-mbox-folder.c22
-rw-r--r--camel/providers/pop3/camel-pop3-folder.c49
-rw-r--r--camel/providers/vee/camel-vee-folder.c24
4 files changed, 59 insertions, 64 deletions
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 431c705f65..e1eebb0624 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -71,14 +71,12 @@ static gboolean imap_parse_subfolder_line (gchar *buf, gchar **flags, gchar **se
static GPtrArray *imap_get_subfolder_names (CamelFolder *folder, CamelException *ex);
static GPtrArray *imap_get_summary (CamelFolder *folder, CamelException *ex);
static void imap_free_summary (CamelFolder *folder, GPtrArray *array);
-static CamelMimeMessage *imap_get_message_by_uid (CamelFolder *folder, const gchar *uid,
- CamelException *ex);
+static CamelMimeMessage *imap_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex);
+static void imap_delete_message (CamelFolder *folder, const gchar *uid, CamelException *ex);
static void imap_expunge (CamelFolder *folder, CamelException *ex);
-static void imap_delete_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex);
-
-static const CamelMessageInfo *imap_summary_get_by_uid (CamelFolder *f, const char *uid);
+static const CamelMessageInfo *imap_get_message_info (CamelFolder *folder, const char *uid);
static GList *imap_search_by_expression (CamelFolder *folder, const char *expression, CamelException *ex);
@@ -113,14 +111,14 @@ camel_imap_folder_class_init (CamelImapFolderClass *camel_imap_folder_class)
camel_folder_class->get_subfolder_names = imap_get_subfolder_names;
camel_folder_class->get_message_count = imap_get_message_count;
- camel_folder_class->get_message_by_uid = imap_get_message_by_uid;
+ camel_folder_class->get_message = imap_get_message;
camel_folder_class->append_message = imap_append_message;
- camel_folder_class->delete_message_by_uid = imap_delete_message_by_uid;
+ camel_folder_class->delete_message = imap_delete_message;
camel_folder_class->copy_message_to = imap_copy_message_to;
camel_folder_class->move_message_to = imap_move_message_to;
camel_folder_class->get_summary = imap_get_summary;
- camel_folder_class->summary_get_by_uid = imap_summary_get_by_uid;
+ camel_folder_class->get_message_info = imap_get_message_info;
camel_folder_class->free_summary = imap_free_summary;
camel_folder_class->search_by_expression = imap_search_by_expression;
@@ -565,7 +563,7 @@ imap_move_message_to (CamelFolder *source, const char *uid, CamelFolder *destina
g_free (result);
g_free (folder_path);
- if (!(info = (CamelMessageInfo *)imap_summary_get_by_uid (source, uid))) {
+ if (!(info = (CamelMessageInfo *)imap_get_message_info (source, uid))) {
CamelService *service = CAMEL_SERVICE (store);
camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
@@ -730,11 +728,11 @@ imap_get_subfolder_names (CamelFolder *folder, CamelException *ex)
}
static void
-imap_delete_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
+imap_delete_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
{
CamelMessageInfo *info;
- if (!(info = (CamelMessageInfo *)imap_summary_get_by_uid (folder, uid))) {
+ if (!(info = (CamelMessageInfo *)imap_get_message_info (folder, uid))) {
CamelService *service = CAMEL_SERVICE (folder->parent_store);
camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
@@ -747,7 +745,7 @@ imap_delete_message_by_uid (CamelFolder *folder, const gchar *uid, CamelExceptio
}
static CamelMimeMessage *
-imap_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
+imap_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
{
CamelStream *msgstream;
/*CamelStreamFilter *f_stream;*/
@@ -1111,7 +1109,7 @@ imap_free_summary (CamelFolder *folder, GPtrArray *array)
/* get a single message info, by uid */
static const CamelMessageInfo *
-imap_summary_get_by_uid (CamelFolder *folder, const char *uid)
+imap_get_message_info (CamelFolder *folder, const char *uid)
{
CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
CamelMessageInfo *info = NULL;
@@ -1248,7 +1246,7 @@ imap_get_message_flags (CamelFolder *folder, const char *uid, CamelException *ex
{
CamelMessageInfo *info;
- if (!(info = (CamelMessageInfo *)imap_summary_get_by_uid (folder, uid))) {
+ if (!(info = (CamelMessageInfo *)imap_get_message_info (folder, uid))) {
CamelService *service = CAMEL_SERVICE (folder->parent_store);
camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
@@ -1265,7 +1263,7 @@ imap_set_message_flags (CamelFolder *folder, const char *uid, guint32 flags, gui
{
CamelMessageInfo *info;
- if (!(info = (CamelMessageInfo *)imap_summary_get_by_uid (folder, uid))) {
+ if (!(info = (CamelMessageInfo *)imap_get_message_info (folder, uid))) {
CamelService *service = CAMEL_SERVICE (folder->parent_store);
camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c
index dee06ed39d..09b718a1de 100644
--- a/camel/providers/mbox/camel-mbox-folder.c
+++ b/camel/providers/mbox/camel-mbox-folder.c
@@ -68,17 +68,13 @@ static GPtrArray *mbox_get_uids (CamelFolder *folder, CamelException *ex);
static GPtrArray *mbox_get_subfolder_names (CamelFolder *folder, CamelException *ex);
static GPtrArray *mbox_get_summary (CamelFolder *folder, CamelException *ex);
static void mbox_free_summary (CamelFolder *folder, GPtrArray *array);
-static CamelMimeMessage *mbox_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex);
+static CamelMimeMessage *mbox_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex);
static void mbox_expunge (CamelFolder *folder, CamelException *ex);
-#if 0
-static void _copy_message_to (CamelFolder *folder, CamelMimeMessage *message, CamelFolder *dest_folder, CamelException *ex);
-static const gchar *_get_message_uid (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex);
-#endif
-static void mbox_delete_message_by_uid(CamelFolder *folder, const gchar *uid, CamelException *ex);
+static void mbox_delete_message (CamelFolder *folder, const gchar *uid, CamelException *ex);
-static const CamelMessageInfo *mbox_summary_get_by_uid(CamelFolder *f, const char *uid);
+static const CamelMessageInfo *mbox_get_message_info (CamelFolder *folder, const char *uid);
static GList *mbox_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex);
@@ -111,12 +107,12 @@ camel_mbox_folder_class_init (CamelMboxFolderClass *camel_mbox_folder_class)
camel_folder_class->free_summary = mbox_free_summary;
camel_folder_class->expunge = mbox_expunge;
- camel_folder_class->get_message_by_uid = mbox_get_message_by_uid;
- camel_folder_class->delete_message_by_uid = mbox_delete_message_by_uid;
+ camel_folder_class->get_message = mbox_get_message;
+ camel_folder_class->delete_message = mbox_delete_message;
camel_folder_class->search_by_expression = mbox_search_by_expression;
- camel_folder_class->summary_get_by_uid = mbox_summary_get_by_uid;
+ camel_folder_class->get_message_info = mbox_get_message_info;
camel_folder_class->get_message_flags = mbox_get_message_flags;
camel_folder_class->set_message_flags = mbox_set_message_flags;
@@ -406,7 +402,7 @@ mbox_get_subfolder_names (CamelFolder *folder, CamelException *ex)
}
static void
-mbox_delete_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
+mbox_delete_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
{
CamelMessageInfo *info;
CamelMboxFolder *mf = CAMEL_MBOX_FOLDER (folder);
@@ -419,7 +415,7 @@ mbox_delete_message_by_uid (CamelFolder *folder, const gchar *uid, CamelExceptio
}
static CamelMimeMessage *
-mbox_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
+mbox_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
{
CamelMboxFolder *mbox_folder = CAMEL_MBOX_FOLDER (folder);
CamelStream *message_stream = NULL;
@@ -504,7 +500,7 @@ mbox_free_summary (CamelFolder *folder, GPtrArray *array)
/* get a single message info, by uid */
static const CamelMessageInfo *
-mbox_summary_get_by_uid (CamelFolder *folder, const char *uid)
+mbox_get_message_info (CamelFolder *folder, const char *uid)
{
CamelMboxFolder *mbox_folder = CAMEL_MBOX_FOLDER (folder);
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
index aebe62bbde..fbfb8c6129 100644
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ b/camel/providers/pop3/camel-pop3-folder.c
@@ -36,19 +36,19 @@
#define CF_CLASS(o) (CAMEL_FOLDER_CLASS (GTK_OBJECT (o)->klass))
static CamelFolderClass *parent_class;
-static void finalize (GtkObject *object);
+static void pop3_finalize (GtkObject *object);
static void pop3_sync (CamelFolder *folder, gboolean expunge,
CamelException *ex);
-static gint get_message_count (CamelFolder *folder, CamelException *ex);
-static GPtrArray *get_uids (CamelFolder *folder, CamelException *ex);
-static void free_uids (CamelFolder *folder, GPtrArray *uids);
-static CamelMimeMessage *get_message_by_uid (CamelFolder *folder,
- const char *uid,
- CamelException *ex);
-static void delete_message_by_uid (CamelFolder *folder, const char *uid,
- CamelException *ex);
+static gint pop3_get_message_count (CamelFolder *folder, CamelException *ex);
+static GPtrArray *pop3_get_uids (CamelFolder *folder, CamelException *ex);
+static void pop3_free_uids (CamelFolder *folder, GPtrArray *uids);
+static CamelMimeMessage *pop3_get_message (CamelFolder *folder,
+ const char *uid,
+ CamelException *ex);
+static void pop3_delete_message (CamelFolder *folder, const char *uid,
+ CamelException *ex);
static void
@@ -64,14 +64,14 @@ camel_pop3_folder_class_init (CamelPop3FolderClass *camel_pop3_folder_class)
/* virtual method overload */
camel_folder_class->sync = pop3_sync;
- camel_folder_class->get_message_count = get_message_count;
- camel_folder_class->get_uids = get_uids;
- camel_folder_class->free_uids = free_uids;
+ camel_folder_class->get_message_count = pop3_get_message_count;
+ camel_folder_class->get_uids = pop3_get_uids;
+ camel_folder_class->free_uids = pop3_free_uids;
- camel_folder_class->get_message_by_uid = get_message_by_uid;
- camel_folder_class->delete_message_by_uid = delete_message_by_uid;
+ camel_folder_class->get_message = pop3_get_message;
+ camel_folder_class->delete_message = pop3_delete_message;
- object_class->finalize = finalize;
+ object_class->finalize = pop3_finalize;
}
static void
@@ -113,7 +113,7 @@ camel_pop3_folder_get_type (void)
}
void
-finalize (GtkObject *object)
+pop3_finalize (GtkObject *object)
{
CamelPop3Folder *pop3_folder = CAMEL_POP3_FOLDER (object);
@@ -175,7 +175,7 @@ uid_to_number (CamelFolder *folder, const char *uid, CamelException *ex)
CamelPop3Folder *pop3_folder = CAMEL_POP3_FOLDER (folder);
int i;
- if (!get_uids (folder, ex))
+ if (!pop3_get_uids (folder, ex))
return -1;
for (i = 0; i < pop3_folder->uids->len; i++) {
@@ -188,7 +188,7 @@ uid_to_number (CamelFolder *folder, const char *uid, CamelException *ex)
static CamelMimeMessage *
-get_message_by_uid (CamelFolder *folder, const char *uid, CamelException *ex)
+pop3_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
{
int status, num;
char *result, *body;
@@ -235,8 +235,8 @@ get_message_by_uid (CamelFolder *folder, const char *uid, CamelException *ex)
}
static void
-delete_message_by_uid (CamelFolder *folder, const char *uid,
- CamelException *ex)
+pop3_delete_message (CamelFolder *folder, const char *uid,
+ CamelException *ex)
{
int status, num;
char *resp;
@@ -257,18 +257,18 @@ delete_message_by_uid (CamelFolder *folder, const char *uid,
}
static gint
-get_message_count (CamelFolder *folder, CamelException *ex)
+pop3_get_message_count (CamelFolder *folder, CamelException *ex)
{
CamelPop3Folder *pop3_folder = CAMEL_POP3_FOLDER (folder);
- if (!get_uids (folder, ex))
+ if (!pop3_get_uids (folder, ex))
return -1;
return pop3_folder->uids->len;
}
static GPtrArray *
-get_uids (CamelFolder *folder, CamelException *ex)
+pop3_get_uids (CamelFolder *folder, CamelException *ex)
{
CamelPop3Store *pop3_store = CAMEL_POP3_STORE (folder->parent_store);
CamelPop3Folder *pop3_folder = CAMEL_POP3_FOLDER (folder);
@@ -329,7 +329,8 @@ get_uids (CamelFolder *folder, CamelException *ex)
}
static void
-free_uids (CamelFolder *folder, GPtrArray *uids)
+pop3_free_uids (CamelFolder *folder, GPtrArray *uids)
{
;
}
+
diff --git a/camel/providers/vee/camel-vee-folder.c b/camel/providers/vee/camel-vee-folder.c
index 9d0d33b475..9df922c832 100644
--- a/camel/providers/vee/camel-vee-folder.c
+++ b/camel/providers/vee/camel-vee-folder.c
@@ -48,9 +48,9 @@ GPtrArray *vee_get_summary (CamelFolder *folder, CamelException *ex);
void vee_free_summary (CamelFolder *folder, GPtrArray *array);
static gint vee_get_message_count (CamelFolder *folder, CamelException *ex);
-static CamelMimeMessage *vee_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex);
+static CamelMimeMessage *vee_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex);
-static const CamelMessageInfo *vee_summary_get_by_uid(CamelFolder *f, const char *uid);
+static const CamelMessageInfo *vee_get_message_info (CamelFolder *folder, const char *uid);
static GList *vee_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex);
static guint32 vee_get_message_flags (CamelFolder *folder, const char *uid, CamelException *ex);
@@ -111,9 +111,9 @@ camel_vee_folder_class_init (CamelVeeFolderClass *klass)
folder_class->get_uids = vee_get_uids;
folder_class->get_summary = vee_get_summary;
folder_class->free_summary = vee_free_summary;
- folder_class->get_message_by_uid = vee_get_message_by_uid;
+ folder_class->get_message = vee_get_message;
- folder_class->summary_get_by_uid = vee_summary_get_by_uid;
+ folder_class->get_message_info = vee_get_message_info;
folder_class->get_message_count = vee_get_message_count;
folder_class->search_by_expression = vee_search_by_expression;
@@ -193,10 +193,10 @@ message_changed(CamelFolder *f, const char *uid, CamelVeeFolder *mf)
char *vuid;
printf("VMessage changed: %s\n", uid);
- info = camel_folder_summary_get_by_uid(f, uid);
+ info = camel_folder_get_message_info(f, uid);
vuid = g_strdup_printf("%p:%s", f, uid);
- vinfo = (CamelMessageInfo *)vee_summary_get_by_uid((CamelFolder *)mf, vuid);
+ vinfo = (CamelMessageInfo *)vee_get_message_info((CamelFolder *)mf, vuid);
if (info && vinfo) {
vinfo->flags = info->flags;
camel_flag_list_free(&vinfo->user_flags);
@@ -291,7 +291,7 @@ get_real_message (CamelFolder *folder, const char *uid,
{
CamelVeeMessageInfo *mi;
- mi = (CamelVeeMessageInfo *)vee_summary_get_by_uid(folder, uid);
+ mi = (CamelVeeMessageInfo *)vee_get_message_info(folder, uid);
if (mi == NULL) {
camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
"No such message %s in %s", uid,
@@ -304,7 +304,7 @@ get_real_message (CamelFolder *folder, const char *uid,
return TRUE;
}
-static CamelMimeMessage *vee_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
+static CamelMimeMessage *vee_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
{
const char *real_uid;
CamelFolder *real_folder;
@@ -312,7 +312,7 @@ static CamelMimeMessage *vee_get_message_by_uid (CamelFolder *folder, const gcha
if (!get_real_message (folder, uid, &real_folder, &real_uid, ex))
return NULL;
- return camel_folder_get_message_by_uid(real_folder, real_uid, ex);
+ return camel_folder_get_message (real_folder, real_uid, ex);
}
GPtrArray *vee_get_summary (CamelFolder *folder, CamelException *ex)
@@ -327,7 +327,7 @@ void vee_free_summary (CamelFolder *folder, GPtrArray *array)
/* no op */
}
-static const CamelMessageInfo *vee_summary_get_by_uid(CamelFolder *f, const char *uid)
+static const CamelMessageInfo *vee_get_message_info (CamelFolder *f, const char *uid)
{
CamelVeeFolder *vf = (CamelVeeFolder *)f;
@@ -478,7 +478,7 @@ vee_folder_build(CamelVeeFolder *vf, CamelException *ex)
matches = camel_folder_search_by_expression(f, vf->expression, ex);
match = matches;
while (match) {
- info = camel_folder_summary_get_by_uid(f, match->data);
+ info = camel_folder_get_message_info(f, match->data);
if (info) {
mi = g_malloc0(sizeof(*mi));
mi->info.subject = g_strdup(info->subject);
@@ -553,7 +553,7 @@ vee_folder_build_folder(CamelVeeFolder *vf, CamelFolder *source, CamelException
matches = camel_folder_search_by_expression(f, vf->expression, ex);
match = matches;
while (match) {
- info = camel_folder_summary_get_by_uid(f, match->data);
+ info = camel_folder_get_message_info(f, match->data);
if (info) {
mi = g_malloc0(sizeof(*mi));
mi->info.subject = g_strdup(info->subject);