aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-stream-mem.h9
-rw-r--r--camel/camel-types.h3
-rw-r--r--camel/providers/imap/camel-imap-folder.c6
-rw-r--r--camel/providers/imap/camel-imap-summary.c28
5 files changed, 30 insertions, 21 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index a7dc884bdd..b0f9b68e0f 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,10 @@
2000-06-07 Jeffrey Stedfast <fejj@helixcode.com>
+ * providers/imap/camel-imap-summary.c: Now builds (not that it's worth much yet).
+
+ * providers/imap/camel-imap-folder.c (imap_get_uids): Now uses the correct
+ cast to a CamelImapMessageInfo structure (should get rid of compile warnings).
+
* providers/imap/Makefile.am: Added rules to build
camel-imap-stream
diff --git a/camel/camel-stream-mem.h b/camel/camel-stream-mem.h
index e508644e6b..cf62f09547 100644
--- a/camel/camel-stream-mem.h
+++ b/camel/camel-stream-mem.h
@@ -41,19 +41,20 @@ extern "C" {
#define CAMEL_STREAM_MEM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_STREAM_MEM_TYPE, CamelStreamMemClass))
#define CAMEL_IS_STREAM_MEM(o) (GTK_CHECK_TYPE((o), CAMEL_STREAM_MEM_TYPE))
-struct _CamelStreamMem
-{
+typedef struct _CamelStreamMemClass CamelStreamMemClass;
+
+struct _CamelStreamMem {
CamelSeekableStream parent_object;
gboolean owner; /* do we own the buffer? */
GByteArray *buffer;
};
-typedef struct {
+struct _CamelStreamMemClass {
CamelSeekableStreamClass parent_class;
/* Virtual methods */
-} CamelStreamMemClass;
+};
/* Standard Gtk function */
GtkType camel_stream_mem_get_type (void);
diff --git a/camel/camel-types.h b/camel/camel-types.h
index 706440b64d..3ae1626752 100644
--- a/camel/camel-types.h
+++ b/camel/camel-types.h
@@ -65,3 +65,6 @@ typedef struct _CamelTransport CamelTransport;
#endif /* __cplusplus */
#endif /* CAMEL_TYPES_H */
+
+
+
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index a45d9bd35b..b1e6fc9011 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -454,7 +454,7 @@ imap_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelExcept
g_return_if_fail (message != NULL);
/* write the message to a CamelStreamMem so we can get it's size */
- mem = (CamelStreamMem *)camel_stream_mem_new();
+ mem = CAMEL_STREAM_MEM (camel_stream_mem_new());
if (camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), CAMEL_STREAM (mem)) == -1) {
CamelService *service = CAMEL_SERVICE (folder->parent_store);
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
@@ -500,7 +500,7 @@ imap_get_uids (CamelFolder *folder, CamelException *ex)
array = g_ptr_array_new ();
g_ptr_array_set_size (array, count);
for (i = 0; i < count; i++) {
- info = CAMEL_IMAP_MESSAGE_INFO (camel_folder_summary_index(CAMEL_FOLDER_SUMMARY (imap_folder->summary), i));
+ info = (CamelImapMessageInfo *) camel_folder_summary_index(CAMEL_FOLDER_SUMMARY (imap_folder->summary), i);
array->pdata[i] = g_strdup(info->info.uid);
}
@@ -673,7 +673,7 @@ imap_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *
}
/* where we read from */
- message_stream = (CamelStreamMem *)camel_stream_mem_new_with_buffer (result, strlen(result));
+ message_stream = CAMEL_STREAM_MEM (camel_stream_mem_new_with_buffer (result, strlen(result)));
if (message_stream == NULL)
goto fail;
diff --git a/camel/providers/imap/camel-imap-summary.c b/camel/providers/imap/camel-imap-summary.c
index 29fece6831..3b3d6fb4b1 100644
--- a/camel/providers/imap/camel-imap-summary.c
+++ b/camel/providers/imap/camel-imap-summary.c
@@ -110,7 +110,7 @@ static void
camel_imap_summary_init (CamelImapSummary *obj)
{
struct _CamelImapSummaryPrivate *p;
- struct _CamelFolderSummary *s = (CamelFolderSummary *)obj;
+ struct _CamelFolderSummary *s = (CamelFolderSummary *) obj;
p = _PRIVATE(obj) = g_malloc0(sizeof(*p));
@@ -142,7 +142,7 @@ camel_imap_summary_finalise (GtkObject *obj)
CamelImapSummary *
camel_imap_summary_new (const char *filename, const char *imap_name, ibex *index)
{
- CamelImapSummary *new = CAMEL_IMAP_SUMMARY ( gtk_type_new (camel_imap_summary_get_type ()));
+ CamelImapSummary *new = CAMEL_IMAP_SUMMARY (gtk_type_new(camel_imap_summary_get_type ()));
if (new) {
/* ?? */
camel_folder_summary_set_build_content(CAMEL_FOLDER_SUMMARY (new), TRUE);
@@ -209,7 +209,7 @@ message_info_new (CamelFolderSummary *s, struct _header_raw *h)
if (mi) {
const char *xev;
guint32 uid, flags;
- CamelImapMessageInfo *mbi = CAMEL_IMAP_MESSAGE_INFO (mi);
+ CamelImapMessageInfo *mbi = (CamelImapMessageInfo *) mi;
xev = header_raw_find(&h, "X-Evolution", NULL);
if (xev && header_evolution_decode(xev, &uid, &flags) != -1) {
@@ -235,7 +235,7 @@ message_info_new_from_parser (CamelFolderSummary *s, CamelMimeParser *mp)
mi = ((CamelFolderSummaryClass *)camel_imap_summary_parent)->message_info_new_from_parser(s, mp);
if (mi) {
- CamelImapMessageInfo *mbi = (CamelImapMessageInfo *)mi;
+ CamelImapMessageInfo *mbi = (CamelImapMessageInfo *) mi;
mbi->frompos = camel_mime_parser_tell_start_from(mp);
@@ -258,11 +258,11 @@ message_info_load (CamelFolderSummary *s, FILE *in)
io(printf("loading imap message info\n"));
- mi = ((CamelFolderSummaryClass *)camel_imap_summary_parent)->message_info_load(s, in);
+ mi = ((CamelFolderSummaryClass *) camel_imap_summary_parent)->message_info_load(s, in);
if (mi) {
- CamelImapMessageInfo *mbi = CAMEL_IMAP_MESSAGE_INFO (mi);
+ CamelImapMessageInfo *mbi = (CamelImapMessageInfo *) mi;
- camel_folder_summary_decode_uint32(in, &mbi->frompos);
+ camel_folder_summary_decode_uint32(in, (guint32) &mbi->frompos);
}
return mi;
}
@@ -270,11 +270,11 @@ message_info_load (CamelFolderSummary *s, FILE *in)
static int
message_info_save (CamelFolderSummary *s, FILE *out, CamelMessageInfo *mi)
{
- CamelImapMessageInfo *mbi = (CamelImapMessageInfo *)mi;
+ CamelImapMessageInfo *mbi = (CamelImapMessageInfo *) mi;
io(printf("saving imap message info\n"));
- ((CamelFolderSummaryClass *)camel_imap_summary_parent)->message_info_save(s, out, mi);
+ ((CamelFolderSummaryClass *) camel_imap_summary_parent)->message_info_save(s, out, mi);
return camel_folder_summary_encode_uint32(out, mbi->frompos);
}
@@ -387,7 +387,7 @@ camel_imap_summary_load (CamelImapSummary *mbs, int forceindex)
for (i=0;i<camel_folder_summary_count(s);i++) {
CamelMessageInfo *mi = camel_folder_summary_index(s, i);
if (!ibex_contains_name(mbs->index, mi->uid)) {
- minstart = ((CamelImapMessageInfo *)mi)->frompos;
+ minstart = ((CamelImapMessageInfo *) mi)->frompos;
printf("Found unindexed message: %s\n", mi->uid);
break;
}
@@ -538,7 +538,7 @@ camel_imap_summary_expunge (CamelImapSummary *mbs)
CamelMimeParser *mp = NULL;
int i, count;
CamelImapMessageInfo *info;
- CamelFolderSummary *s = CAMEL_FOLDER_SUMMARY mbs);
+ CamelFolderSummary *s = (CamelFolderSummary *) mbs;
int fd = -1, fdout= -1;
off_t offset = 0;
char *tmpname = 0;
@@ -561,7 +561,7 @@ camel_imap_summary_expunge (CamelImapSummary *mbs)
d(printf("Performing expunge, %d messages in inbox\n", count));
for (i=0;quick && i<count;i++) {
info = (CamelImapMessageInfo *)camel_folder_summary_index(s, i);
- if (info->info.flags & (CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_FOLDER_NOXEV))
+ if (info->info.flags & (CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_FOLDER_NOXEV))
quick = FALSE;
else
work |= (info->info.flags & CAMEL_MESSAGE_FOLDER_FLAGGED) != 0;
@@ -599,7 +599,7 @@ camel_imap_summary_expunge (CamelImapSummary *mbs)
off_t frompos, bodypos;
off_t xevoffset;
- info = (CamelImapMessageInfo *)camel_folder_summary_index(s, i);
+ info = (CamelImapMessageInfo *) camel_folder_summary_index(s, i);
g_assert(info);
@@ -616,7 +616,7 @@ camel_imap_summary_expunge (CamelImapSummary *mbs)
count--;
i--;
info = NULL;
- } else if (info->info.flags & (CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_FLAGGED)) {
+ } else if (info->info.flags & (CAMEL_MESSAGE_FOLDER_NOXEV | CAMEL_MESSAGE_FOLDER_FLAGGED)) {
int xevok = FALSE;
d(printf("Updating header for %s flags = %08x\n", info->info.uid, info->info.flags));