aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/local
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@src.gnome.org>2003-08-27 02:16:51 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-08-27 02:16:51 +0800
commit04b9ec51d45f2efb3b8118eef99c7592ba269792 (patch)
tree2ed61b2ef50a2f74fcc4911b1145367514d721e7 /camel/providers/local
parent173fc4ff4c7f267cefeeeed0a7a93a7f1f245c62 (diff)
downloadgsoc2013-evolution-04b9ec51d45f2efb3b8118eef99c7592ba269792.tar.gz
gsoc2013-evolution-04b9ec51d45f2efb3b8118eef99c7592ba269792.tar.zst
gsoc2013-evolution-04b9ec51d45f2efb3b8118eef99c7592ba269792.zip
temporarily reverting my camel namespace patches until after we merge in some of the other branches
svn path=/trunk/; revision=22373
Diffstat (limited to 'camel/providers/local')
-rw-r--r--camel/providers/local/camel-local-summary.c30
-rw-r--r--camel/providers/local/camel-local-summary.h2
-rw-r--r--camel/providers/local/camel-maildir-summary.c4
-rw-r--r--camel/providers/local/camel-mbox-folder.c2
-rw-r--r--camel/providers/local/camel-mbox-summary.c28
-rw-r--r--camel/providers/local/camel-mh-summary.c2
-rw-r--r--camel/providers/local/camel-spool-summary.h2
7 files changed, 35 insertions, 35 deletions
diff --git a/camel/providers/local/camel-local-summary.c b/camel/providers/local/camel-local-summary.c
index 42534b361d..807b04e4b0 100644
--- a/camel/providers/local/camel-local-summary.c
+++ b/camel/providers/local/camel-local-summary.c
@@ -41,7 +41,7 @@
#define CAMEL_LOCAL_SUMMARY_VERSION (0x200)
-static CamelMessageInfo * message_info_new (CamelFolderSummary *, struct _camel_header_raw *);
+static CamelMessageInfo * message_info_new (CamelFolderSummary *, struct _header_raw *);
static int local_summary_decode_x_evolution(CamelLocalSummary *cls, const char *xev, CamelMessageInfo *mi);
static char *local_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelMessageInfo *mi);
@@ -192,8 +192,8 @@ do_stat_ci(CamelLocalSummary *cls, struct _stat_info *info, CamelMessageContentI
if (ci->encoding)
info->citotal += strlen(ci->encoding) + 4;
if (ci->type) {
- CamelContentType *ct = ci->type;
- struct _camel_header_param *param;
+ struct _header_content_type *ct = ci->type;
+ struct _header_param *param;
info->citotal += sizeof(*ct) + 4;
if (ct->type)
@@ -308,7 +308,7 @@ camel_local_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const Cam
* Return value: -1 on error, otherwise the number of bytes written.
**/
int
-camel_local_summary_write_headers(int fd, struct _camel_header_raw *header, const char *xevline, const char *status, const char *xstatus)
+camel_local_summary_write_headers(int fd, struct _header_raw *header, const char *xevline, const char *status, const char *xstatus)
{
int outlen = 0, len;
int newfd;
@@ -463,7 +463,7 @@ static char *
local_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelMessageInfo *mi)
{
GString *out = g_string_new("");
- struct _camel_header_param *params = NULL;
+ struct _header_param *params = NULL;
GString *val = g_string_new("");
CamelFlag *flag = mi->user_flags;
CamelTag *tag = mi->user_tags;
@@ -492,7 +492,7 @@ local_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelMessageInfo
g_string_append_c (val, ',');
flag = flag->next;
}
- camel_header_set_param (&params, "flags", val->str);
+ header_set_param (&params, "flags", val->str);
g_string_truncate (val, 0);
}
if (tag) {
@@ -504,11 +504,11 @@ local_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelMessageInfo
g_string_append_c (val, ',');
tag = tag->next;
}
- camel_header_set_param (&params, "tags", val->str);
+ header_set_param (&params, "tags", val->str);
}
g_string_free (val, TRUE);
- camel_header_param_list_format_append (out, params);
- camel_header_param_list_free (params);
+ header_param_list_format_append (out, params);
+ header_param_list_free (params);
}
ret = out->str;
g_string_free (out, FALSE);
@@ -519,13 +519,13 @@ local_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelMessageInfo
static int
local_summary_decode_x_evolution(CamelLocalSummary *cls, const char *xev, CamelMessageInfo *mi)
{
- struct _camel_header_param *params, *scan;
+ struct _header_param *params, *scan;
guint32 uid, flags;
char *header;
int i;
/* check for uid/flags */
- header = camel_header_token_decode(xev);
+ header = header_token_decode(xev);
if (header && strlen(header) == strlen("00000000-0000")
&& sscanf(header, "%08x-%04x", &uid, &flags) == 2) {
char uidstr[20];
@@ -546,7 +546,7 @@ local_summary_decode_x_evolution(CamelLocalSummary *cls, const char *xev, CamelM
/* check for additional data */
header = strchr(xev, ';');
if (header) {
- params = camel_header_param_list_decode(header+1);
+ params = header_param_list_decode(header+1);
scan = params;
while (scan) {
if (!strcasecmp(scan->name, "flags")) {
@@ -572,13 +572,13 @@ local_summary_decode_x_evolution(CamelLocalSummary *cls, const char *xev, CamelM
}
scan = scan->next;
}
- camel_header_param_list_free(params);
+ header_param_list_free(params);
}
return 0;
}
static CamelMessageInfo *
-message_info_new(CamelFolderSummary *s, struct _camel_header_raw *h)
+message_info_new(CamelFolderSummary *s, struct _header_raw *h)
{
CamelMessageInfo *mi;
CamelLocalSummary *cls = (CamelLocalSummary *)s;
@@ -588,7 +588,7 @@ message_info_new(CamelFolderSummary *s, struct _camel_header_raw *h)
const char *xev;
int doindex = FALSE;
- xev = camel_header_raw_find(&h, "X-Evolution", NULL);
+ xev = header_raw_find(&h, "X-Evolution", NULL);
if (xev==NULL || camel_local_summary_decode_x_evolution(cls, xev, mi) == -1) {
/* to indicate it has no xev header */
mi->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED | CAMEL_MESSAGE_FOLDER_NOXEV;
diff --git a/camel/providers/local/camel-local-summary.h b/camel/providers/local/camel-local-summary.h
index 25d77e62c3..0995331ab1 100644
--- a/camel/providers/local/camel-local-summary.h
+++ b/camel/providers/local/camel-local-summary.h
@@ -82,7 +82,7 @@ char *camel_local_summary_encode_x_evolution(CamelLocalSummary *cls, const Camel
int camel_local_summary_decode_x_evolution(CamelLocalSummary *cls, const char *xev, CamelMessageInfo *info);
/* utility functions - write headers to a file with optional X-Evolution header and/or status header */
-int camel_local_summary_write_headers(int fd, struct _camel_header_raw *header, const char *xevline, const char *status, const char *xstatus);
+int camel_local_summary_write_headers(int fd, struct _header_raw *header, const char *xevline, const char *status, const char *xstatus);
#endif /* ! _CAMEL_LOCAL_SUMMARY_H */
diff --git a/camel/providers/local/camel-maildir-summary.c b/camel/providers/local/camel-maildir-summary.c
index 37e1ac2ce7..2075694f63 100644
--- a/camel/providers/local/camel-maildir-summary.c
+++ b/camel/providers/local/camel-maildir-summary.c
@@ -48,7 +48,7 @@
#define CAMEL_MAILDIR_SUMMARY_VERSION (0x2000)
static CamelMessageInfo *message_info_load(CamelFolderSummary *s, FILE *in);
-static CamelMessageInfo *message_info_new(CamelFolderSummary *, struct _camel_header_raw *);
+static CamelMessageInfo *message_info_new(CamelFolderSummary *, struct _header_raw *);
static void message_info_free(CamelFolderSummary *, CamelMessageInfo *mi);
static int maildir_summary_load(CamelLocalSummary *cls, int forceindex, CamelException *ex);
@@ -256,7 +256,7 @@ static CamelMessageInfo *maildir_summary_add(CamelLocalSummary *cls, CamelMimeMe
return mi;
}
-static CamelMessageInfo *message_info_new(CamelFolderSummary * s, struct _camel_header_raw *h)
+static CamelMessageInfo *message_info_new(CamelFolderSummary * s, struct _header_raw *h)
{
CamelMessageInfo *mi, *info;
CamelMaildirSummary *mds = (CamelMaildirSummary *)s;
diff --git a/camel/providers/local/camel-mbox-folder.c b/camel/providers/local/camel-mbox-folder.c
index 01c3d7811e..942610d5a9 100644
--- a/camel/providers/local/camel-mbox-folder.c
+++ b/camel/providers/local/camel-mbox-folder.c
@@ -376,7 +376,7 @@ retry:
camel_mime_parser_scan_from(parser, TRUE);
camel_mime_parser_seek(parser, frompos, SEEK_SET);
- if (camel_mime_parser_step(parser, NULL, NULL) != CAMEL_MIME_PARSER_STATE_FROM
+ if (camel_mime_parser_step(parser, NULL, NULL) != HSCAN_FROM
|| camel_mime_parser_tell_start_from(parser) != frompos) {
g_warning("Summary doesn't match the folder contents! eek!\n"
diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c
index 4018fc93c9..88d2a3e9a7 100644
--- a/camel/providers/local/camel-mbox-summary.c
+++ b/camel/providers/local/camel-mbox-summary.c
@@ -49,7 +49,7 @@
static int summary_header_load (CamelFolderSummary *, FILE *);
static int summary_header_save (CamelFolderSummary *, FILE *);
-static CamelMessageInfo * message_info_new (CamelFolderSummary *, struct _camel_header_raw *);
+static CamelMessageInfo * message_info_new (CamelFolderSummary *, struct _header_raw *);
static CamelMessageInfo * message_info_new_from_parser (CamelFolderSummary *, CamelMimeParser *);
static CamelMessageInfo * message_info_load (CamelFolderSummary *, FILE *);
static int message_info_save (CamelFolderSummary *, FILE *, CamelMessageInfo *);
@@ -187,7 +187,7 @@ summary_header_save(CamelFolderSummary *s, FILE *out)
}
static CamelMessageInfo *
-message_info_new(CamelFolderSummary *s, struct _camel_header_raw *h)
+message_info_new(CamelFolderSummary *s, struct _header_raw *h)
{
CamelMessageInfo *mi;
CamelMboxSummary *mbs = (CamelMboxSummary *)s;
@@ -204,16 +204,16 @@ message_info_new(CamelFolderSummary *s, struct _camel_header_raw *h)
if (mbs->xstatus) {
/* check for existance of status & x-status headers */
- status = camel_header_raw_find(&h, "Status", NULL);
+ status = header_raw_find(&h, "Status", NULL);
if (status)
flags = decode_status(status);
- xstatus = camel_header_raw_find(&h, "X-Status", NULL);
+ xstatus = header_raw_find(&h, "X-Status", NULL);
if (xstatus)
flags |= decode_status(xstatus);
}
#endif
/* if we have an xev header, use it, else assign a new one */
- xev = camel_header_raw_find(&h, "X-Evolution", NULL);
+ xev = header_raw_find(&h, "X-Evolution", NULL);
if (xev != NULL
&& camel_local_summary_decode_x_evolution((CamelLocalSummary *)s, xev, mi) == 0) {
uid = camel_message_info_uid(mi);
@@ -355,7 +355,7 @@ summary_update(CamelLocalSummary *cls, off_t offset, CamelFolderChangeInfo *chan
camel_mime_parser_seek(mp, offset, SEEK_SET);
if (offset > 0) {
- if (camel_mime_parser_step(mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM
+ if (camel_mime_parser_step(mp, NULL, NULL) == HSCAN_FROM
&& camel_mime_parser_tell_start_from(mp) == offset) {
camel_mime_parser_unstep(mp);
} else {
@@ -380,7 +380,7 @@ summary_update(CamelLocalSummary *cls, off_t offset, CamelFolderChangeInfo *chan
}
mbs->changes = changeinfo;
- while (camel_mime_parser_step(mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM) {
+ while (camel_mime_parser_step(mp, NULL, NULL) == HSCAN_FROM) {
CamelMessageInfo *info;
off_t pc = camel_mime_parser_tell_start_from (mp) + 1;
@@ -394,7 +394,7 @@ summary_update(CamelLocalSummary *cls, off_t offset, CamelFolderChangeInfo *chan
break;
}
- g_assert(camel_mime_parser_step(mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM_END);
+ g_assert(camel_mime_parser_step(mp, NULL, NULL) == HSCAN_FROM_END);
}
camel_object_unref(CAMEL_OBJECT (mp));
@@ -638,7 +638,7 @@ mbox_summary_sync_quick(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChan
camel_mime_parser_seek(mp, info->frompos, SEEK_SET);
- if (camel_mime_parser_step(mp, 0, 0) != CAMEL_MIME_PARSER_STATE_FROM) {
+ if (camel_mime_parser_step(mp, 0, 0) != HSCAN_FROM) {
g_warning("Expected a From line here, didn't get it");
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
_("Summary and folder mismatch, even after a sync"));
@@ -653,7 +653,7 @@ mbox_summary_sync_quick(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChan
goto error;
}
- if (camel_mime_parser_step(mp, 0, 0) == CAMEL_MIME_PARSER_STATE_FROM_END) {
+ if (camel_mime_parser_step(mp, 0, 0) == HSCAN_FROM_END) {
g_warning("camel_mime_parser_step failed (2)");
goto error;
}
@@ -667,7 +667,7 @@ mbox_summary_sync_quick(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChan
/* SIGH: encode_param_list is about the only function which folds headers by itself.
This should be fixed somehow differently (either parser doesn't fold headers,
or param_list doesn't, or something */
- xevtmp = camel_header_unfold(xevnew);
+ xevtmp = header_unfold(xevnew);
/* the raw header contains a leading ' ', so (dis)count that too */
if (strlen(xev)-1 != strlen(xevtmp)) {
printf ("strlen(xev)-1 = %d; strlen(xevtmp) = %d\n", strlen(xev)-1, strlen(xevtmp));
@@ -839,7 +839,7 @@ camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderCh
camel_mime_parser_seek(mp, info->frompos, SEEK_SET);
}
- if (camel_mime_parser_step(mp, &buffer, &len) != CAMEL_MIME_PARSER_STATE_FROM) {
+ if (camel_mime_parser_step(mp, &buffer, &len) != HSCAN_FROM) {
g_warning("Expected a From line here, didn't get it");
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
_("Summary and folder mismatch, even after a sync"));
@@ -885,7 +885,7 @@ camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderCh
if (info && info->info.flags & (CAMEL_MESSAGE_FOLDER_NOXEV | CAMEL_MESSAGE_FOLDER_FLAGGED)) {
d(printf("Updating header for %s flags = %08x\n", camel_message_info_uid(info), info->info.flags));
- if (camel_mime_parser_step(mp, &buffer, &len) == CAMEL_MIME_PARSER_STATE_FROM_END) {
+ if (camel_mime_parser_step(mp, &buffer, &len) == HSCAN_FROM_END) {
g_warning("camel_mime_parser_step failed (2)");
goto error;
}
@@ -918,7 +918,7 @@ camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderCh
camel_mime_parser_drop_step(mp);
if (info) {
d(printf("looking for message content to copy across from %d\n", (int)camel_mime_parser_tell(mp)));
- while (camel_mime_parser_step(mp, &buffer, &len) == CAMEL_MIME_PARSER_STATE_PRE_FROM) {
+ while (camel_mime_parser_step(mp, &buffer, &len) == HSCAN_PRE_FROM) {
/*d(printf("copying mbox contents to tmp: '%.*s'\n", len, buffer));*/
if (write(fdout, buffer, len) != len) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
diff --git a/camel/providers/local/camel-mh-summary.c b/camel/providers/local/camel-mh-summary.c
index 5dd26ac9ba..25794fa258 100644
--- a/camel/providers/local/camel-mh-summary.c
+++ b/camel/providers/local/camel-mh-summary.c
@@ -314,7 +314,7 @@ mh_summary_sync_message(CamelLocalSummary *cls, CamelMessageInfo *info, CamelExc
mp = camel_mime_parser_new();
camel_mime_parser_init_with_fd(mp, fd);
- if (camel_mime_parser_step(mp, 0, 0) != CAMEL_MIME_PARSER_STATE_EOF) {
+ if (camel_mime_parser_step(mp, 0, 0) != HSCAN_EOF) {
xev = camel_mime_parser_header(mp, "X-Evolution", &xevoffset);
d(printf("xev = '%s'\n", xev));
xevnew = camel_local_summary_encode_x_evolution(cls, info);
diff --git a/camel/providers/local/camel-spool-summary.h b/camel/providers/local/camel-spool-summary.h
index b72aeda527..7813243a69 100644
--- a/camel/providers/local/camel-spool-summary.h
+++ b/camel/providers/local/camel-spool-summary.h
@@ -63,7 +63,7 @@ char *camel_spool_summary_encode_x_evolution(CamelSpoolSummary *cls, const Camel
int camel_spool_summary_decode_x_evolution(CamelSpoolSummary *cls, const char *xev, CamelMessageInfo *info);
/* utility functions - write headers to a file with optional X-Evolution header */
-int camel_spool_summary_write_headers(int fd, struct _camel_header_raw *header, char *xevline);
+int camel_spool_summary_write_headers(int fd, struct _header_raw *header, char *xevline);
#endif /* ! _CAMEL_SPOOL_SUMMARY_H */