evolution-data-server r9288 - in trunk: camel camel/providers/groupwise camel/providers/imap camel/providers/imap4 camel/providers/imapp camel/providers/local camel/providers/nntp camel/providers/pop3 docs/reference/camel/tmpl
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9288 - in trunk: camel camel/providers/groupwise camel/providers/imap camel/providers/imap4 camel/providers/imapp camel/providers/local camel/providers/nntp camel/providers/pop3 docs/reference/camel/tmpl
- Date: Wed, 6 Aug 2008 16:57:37 +0000 (UTC)
Author: mbarnes
Date: Wed Aug 6 16:57:37 2008
New Revision: 9288
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9288&view=rev
Log:
2008-08-06 Matthew Barnes <mbarnes redhat com>
** Fixes bug #545877
Use CamelDList instead of EDList throughout Camel.
Modified:
trunk/camel/ChangeLog
trunk/camel/camel-block-file.c
trunk/camel/camel-block-file.h
trunk/camel/camel-cipher-context.c
trunk/camel/camel-cipher-context.h
trunk/camel/camel-filter-driver.c
trunk/camel/camel-iconv.c
trunk/camel/camel-index-control.c
trunk/camel/camel-list-utils.c
trunk/camel/camel-list-utils.h
trunk/camel/camel-object.c
trunk/camel/camel-offline-journal.c
trunk/camel/camel-offline-journal.h
trunk/camel/camel-operation.c
trunk/camel/camel-partition-table.c
trunk/camel/camel-partition-table.h
trunk/camel/camel-private.h
trunk/camel/camel-provider.c
trunk/camel/camel-service.c
trunk/camel/camel-text-index.c
trunk/camel/providers/groupwise/ChangeLog
trunk/camel/providers/groupwise/camel-groupwise-folder.c
trunk/camel/providers/groupwise/camel-groupwise-journal.c
trunk/camel/providers/groupwise/camel-groupwise-journal.h
trunk/camel/providers/imap/ChangeLog
trunk/camel/providers/imap/camel-imap-journal.c
trunk/camel/providers/imap/camel-imap-journal.h
trunk/camel/providers/imap/camel-imap-search.c
trunk/camel/providers/imap/camel-imap-search.h
trunk/camel/providers/imap/camel-imap-store.h
trunk/camel/providers/imap/camel-imap-wrapper.c
trunk/camel/providers/imap4/ChangeLog
trunk/camel/providers/imap4/camel-imap4-command.c
trunk/camel/providers/imap4/camel-imap4-command.h
trunk/camel/providers/imap4/camel-imap4-engine.c
trunk/camel/providers/imap4/camel-imap4-engine.h
trunk/camel/providers/imap4/camel-imap4-journal.c
trunk/camel/providers/imap4/camel-imap4-journal.h
trunk/camel/providers/imap4/camel-imap4-search.h
trunk/camel/providers/imapp/ChangeLog
trunk/camel/providers/imapp/camel-imapp-driver.c
trunk/camel/providers/imapp/camel-imapp-driver.h
trunk/camel/providers/imapp/camel-imapp-engine.c
trunk/camel/providers/imapp/camel-imapp-engine.h
trunk/camel/providers/imapp/camel-imapp-store.c
trunk/camel/providers/local/ChangeLog
trunk/camel/providers/local/camel-maildir-store.c
trunk/camel/providers/nntp/camel-nntp-private.h
trunk/camel/providers/pop3/ChangeLog
trunk/camel/providers/pop3/camel-pop3-engine.c
trunk/camel/providers/pop3/camel-pop3-engine.h
trunk/docs/reference/camel/tmpl/camel-folder-search.sgml
trunk/docs/reference/camel/tmpl/camel-imap-folder.sgml
trunk/docs/reference/camel/tmpl/camel-imap-utils.sgml
trunk/docs/reference/camel/tmpl/camel-provider.sgml
trunk/docs/reference/camel/tmpl/camel-vee-folder.sgml
Modified: trunk/camel/camel-block-file.c
==============================================================================
--- trunk/camel/camel-block-file.c (original)
+++ trunk/camel/camel-block-file.c Wed Aug 6 16:57:37 2008
@@ -35,10 +35,9 @@
#include <glib.h>
#include <glib/gstdio.h>
-#include <libedataserver/e-msgport.h>
-
#include "camel-block-file.h"
#include "camel-file-utils.h"
+#include "camel-list-utils.h"
#include "camel-private.h"
#define d(x) /*(printf("%s(%d):%s: ", __FILE__, __LINE__, __PRETTY_FUNCTION__),(x))*/
@@ -70,9 +69,9 @@
static pthread_mutex_t block_file_lock = PTHREAD_MUTEX_INITIALIZER;
/* lru cache of block files */
-static EDList block_file_list = E_DLIST_INITIALISER(block_file_list);
+static CamelDList block_file_list = CAMEL_DLIST_INITIALISER(block_file_list);
/* list to store block files that are actually intialised */
-static EDList block_file_active_list = E_DLIST_INITIALISER(block_file_active_list);
+static CamelDList block_file_active_list = CAMEL_DLIST_INITIALISER(block_file_active_list);
static int block_file_count = 0;
static int block_file_threshhold = 10;
@@ -165,7 +164,7 @@
bs->fd = -1;
bs->block_size = CAMEL_BLOCK_SIZE;
- e_dlist_init(&bs->block_cache);
+ camel_dlist_init(&bs->block_cache);
bs->blocks = g_hash_table_new((GHashFunc)block_hash_func, NULL);
/* this cache size and the text index size have been tuned for about the best
with moderate memory usage. Doubling the memory usage barely affects performance. */
@@ -180,7 +179,7 @@
/* link into lru list */
LOCK(block_file_lock);
- e_dlist_addhead(&block_file_list, (EDListNode *)p);
+ camel_dlist_addhead(&block_file_list, (CamelDListNode *)p);
#if 0
{
@@ -212,7 +211,7 @@
LOCK(block_file_lock);
if (bs->fd != -1)
block_file_count--;
- e_dlist_remove((EDListNode *)p);
+ camel_dlist_remove((CamelDListNode *)p);
UNLOCK(block_file_lock);
bl = (CamelBlock *)bs->block_cache.head;
@@ -294,8 +293,8 @@
}
LOCK(block_file_lock);
- e_dlist_remove((EDListNode *)p);
- e_dlist_addtail(&block_file_active_list, (EDListNode *)p);
+ camel_dlist_remove((CamelDListNode *)p);
+ camel_dlist_addtail(&block_file_active_list, (CamelDListNode *)p);
block_file_count++;
@@ -335,8 +334,8 @@
block_file_unuse(CamelBlockFile *bs)
{
LOCK(block_file_lock);
- e_dlist_remove((EDListNode *)bs->priv);
- e_dlist_addtail(&block_file_list, (EDListNode *)bs->priv);
+ camel_dlist_remove((CamelDListNode *)bs->priv);
+ camel_dlist_addtail(&block_file_list, (CamelDListNode *)bs->priv);
UNLOCK(block_file_lock);
CAMEL_BLOCK_FILE_UNLOCK(bs, io_lock);
@@ -581,7 +580,7 @@
if (flush->refcount == 0) {
if (sync_block_nolock(bs, flush) != -1) {
g_hash_table_remove(bs->blocks, GUINT_TO_POINTER(flush->id));
- e_dlist_remove((EDListNode *)flush);
+ camel_dlist_remove((CamelDListNode *)flush);
g_free(flush);
bs->block_cache_count--;
}
@@ -592,10 +591,10 @@
/* UNLOCK io_lock */
block_file_unuse(bs);
} else {
- e_dlist_remove((EDListNode *)bl);
+ camel_dlist_remove((CamelDListNode *)bl);
}
- e_dlist_addhead(&bs->block_cache, (EDListNode *)bl);
+ camel_dlist_addhead(&bs->block_cache, (CamelDListNode *)bl);
bl->refcount++;
CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
@@ -620,7 +619,7 @@
CAMEL_BLOCK_FILE_LOCK(bs, cache_lock);
g_hash_table_remove(bs->blocks, GUINT_TO_POINTER(bl->id));
- e_dlist_remove((EDListNode *)bl);
+ camel_dlist_remove((CamelDListNode *)bl);
bl->flags |= CAMEL_BLOCK_DETACHED;
CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
@@ -638,7 +637,7 @@
CAMEL_BLOCK_FILE_LOCK(bs, cache_lock);
g_hash_table_insert(bs->blocks, GUINT_TO_POINTER(bl->id), bl);
- e_dlist_addtail(&bs->block_cache, (EDListNode *)bl);
+ camel_dlist_addtail(&bs->block_cache, (CamelDListNode *)bl);
bl->flags &= ~CAMEL_BLOCK_DETACHED;
CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
@@ -812,8 +811,8 @@
static pthread_mutex_t key_file_lock = PTHREAD_MUTEX_INITIALIZER;
/* lru cache of block files */
-static EDList key_file_list = E_DLIST_INITIALISER(key_file_list);
-static EDList key_file_active_list = E_DLIST_INITIALISER(key_file_active_list);
+static CamelDList key_file_list = CAMEL_DLIST_INITIALISER(key_file_list);
+static CamelDList key_file_active_list = CAMEL_DLIST_INITIALISER(key_file_active_list);
static int key_file_count = 0;
static const int key_file_threshhold = 10;
@@ -833,7 +832,7 @@
pthread_mutex_init(&p->lock, NULL);
LOCK(key_file_lock);
- e_dlist_addhead(&key_file_list, (EDListNode *)p);
+ camel_dlist_addhead(&key_file_list, (CamelDListNode *)p);
UNLOCK(key_file_lock);
}
@@ -843,7 +842,7 @@
struct _CamelKeyFilePrivate *p = bs->priv;
LOCK(key_file_lock);
- e_dlist_remove((EDListNode *)p);
+ camel_dlist_remove((CamelDListNode *)p);
if (bs-> fp) {
key_file_count--;
@@ -924,8 +923,8 @@
}
LOCK(key_file_lock);
- e_dlist_remove((EDListNode *)p);
- e_dlist_addtail(&key_file_active_list, (EDListNode *)p);
+ camel_dlist_remove((CamelDListNode *)p);
+ camel_dlist_addtail(&key_file_active_list, (CamelDListNode *)p);
key_file_count++;
@@ -958,8 +957,8 @@
key_file_unuse(CamelKeyFile *bs)
{
LOCK(key_file_lock);
- e_dlist_remove((EDListNode *)bs->priv);
- e_dlist_addtail(&key_file_list, (EDListNode *)bs->priv);
+ camel_dlist_remove((CamelDListNode *)bs->priv);
+ camel_dlist_addtail(&key_file_list, (CamelDListNode *)bs->priv);
UNLOCK(key_file_lock);
CAMEL_KEY_FILE_UNLOCK(bs, lock);
Modified: trunk/camel/camel-block-file.h
==============================================================================
--- trunk/camel/camel-block-file.h (original)
+++ trunk/camel/camel-block-file.h Wed Aug 6 16:57:37 2008
@@ -22,8 +22,8 @@
#define _CAMEL_BLOCK_FILE_H
#include <camel/camel-object.h>
+#include <camel/camel-list-utils.h>
#include <glib.h>
-#include <libedataserver/e-msgport.h>
#include <stdio.h>
#include <sys/types.h>
@@ -87,7 +87,7 @@
/* make private? */
int block_cache_limit;
int block_cache_count;
- EDList block_cache;
+ CamelDList block_cache;
GHashTable *blocks;
};
Modified: trunk/camel/camel-cipher-context.c
==============================================================================
--- trunk/camel/camel-cipher-context.c (original)
+++ trunk/camel/camel-cipher-context.c Wed Aug 6 16:57:37 2008
@@ -381,9 +381,9 @@
g_assert (validity != NULL);
memset(validity, 0, sizeof(*validity));
- e_dlist_init(&validity->children);
- e_dlist_init(&validity->sign.signers);
- e_dlist_init(&validity->encrypt.encrypters);
+ camel_dlist_init(&validity->children);
+ camel_dlist_init(&validity->sign.signers);
+ camel_dlist_init(&validity->encrypt.encrypters);
}
gboolean
@@ -470,14 +470,14 @@
camel_cipher_validity_add_certinfo(CamelCipherValidity *vin, enum _camel_cipher_validity_mode_t mode, const char *name, const char *email)
{
CamelCipherCertInfo *info;
- EDList *list;
+ CamelDList *list;
info = g_malloc0(sizeof(*info));
info->name = g_strdup(name);
info->email = g_strdup(email);
list = (mode==CAMEL_CIPHER_VALIDITY_SIGN)?&vin->sign.signers:&vin->encrypt.encrypters;
- e_dlist_addtail(list, (EDListNode *)info);
+ camel_dlist_addtail(list, (CamelDListNode *)info);
printf("adding certinfo %s <%s>\n", name?name:"unset", email?email:"unset");
}
@@ -532,13 +532,13 @@
if (validity == NULL)
return;
- while ((child = (CamelCipherValidity *)e_dlist_remhead(&validity->children)))
+ while ((child = (CamelCipherValidity *)camel_dlist_remhead(&validity->children)))
camel_cipher_validity_free(child);
- while ((info = (CamelCipherCertInfo *)e_dlist_remhead(&validity->sign.signers)))
+ while ((info = (CamelCipherCertInfo *)camel_dlist_remhead(&validity->sign.signers)))
ccv_certinfo_free(info);
- while ((info = (CamelCipherCertInfo *)e_dlist_remhead(&validity->encrypt.encrypters)))
+ while ((info = (CamelCipherCertInfo *)camel_dlist_remhead(&validity->encrypt.encrypters)))
ccv_certinfo_free(info);
camel_cipher_validity_clear(validity);
Modified: trunk/camel/camel-cipher-context.h
==============================================================================
--- trunk/camel/camel-cipher-context.h (original)
+++ trunk/camel/camel-cipher-context.h Wed Aug 6 16:57:37 2008
@@ -23,12 +23,10 @@
#ifndef CAMEL_CIPHER_CONTEXT_H
#define CAMEL_CIPHER_CONTEXT_H
+#include <camel/camel-list-utils.h>
#include <camel/camel-session.h>
#include <camel/camel-exception.h>
-/* FIXME: camelise */
-#include <libedataserver/e-msgport.h>
-
#define CAMEL_CIPHER_CONTEXT_TYPE (camel_cipher_context_get_type ())
#define CAMEL_CIPHER_CONTEXT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_CIPHER_CONTEXT_TYPE, CamelCipherContext))
#define CAMEL_CIPHER_CONTEXT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_CIPHER_CONTEXT_TYPE, CamelCipherContextClass))
@@ -83,17 +81,17 @@
struct _CamelCipherValidity {
struct _CamelCipherValidity *next;
struct _CamelCipherValidity *prev;
- EDList children;
+ CamelDList children;
struct {
enum _camel_cipher_validity_sign_t status;
char *description;
- EDList signers; /* CamelCipherCertInfo's */
+ CamelDList signers; /* CamelCipherCertInfo's */
} sign;
struct {
enum _camel_cipher_validity_encrypt_t status;
char *description;
- EDList encrypters; /* CamelCipherCertInfo's */
+ CamelDList encrypters; /* CamelCipherCertInfo's */
} encrypt;
};
Modified: trunk/camel/camel-filter-driver.c
==============================================================================
--- trunk/camel/camel-filter-driver.c (original)
+++ trunk/camel/camel-filter-driver.c Wed Aug 6 16:57:37 2008
@@ -40,12 +40,12 @@
#endif
#include <libedataserver/e-sexp.h>
-#include <libedataserver/e-msgport.h>
#include "camel-debug.h"
#include "camel-file-utils.h"
#include "camel-filter-driver.h"
#include "camel-filter-search.h"
+#include "camel-list-utils.h"
#include "camel-mime-message.h"
#include "camel-private.h"
#include "camel-service.h"
@@ -117,7 +117,7 @@
FILE *logfile; /* log file */
- EDList rules; /* list of _filter_rule structs */
+ CamelDList rules; /* list of _filter_rule structs */
CamelException *ex;
@@ -215,7 +215,7 @@
p = _PRIVATE (obj) = g_malloc0 (sizeof (*p));
- e_dlist_init(&p->rules);
+ camel_dlist_init(&p->rules);
p->eval = e_sexp_new ();
/* Load in builtin symbols */
@@ -265,7 +265,7 @@
camel_object_unref (p->defaultfolder);
}
- while ((node = (struct _filter_rule *)e_dlist_remhead(&p->rules))) {
+ while ((node = (struct _filter_rule *)camel_dlist_remhead(&p->rules))) {
g_free(node->match);
g_free(node->action);
g_free(node->name);
@@ -374,7 +374,7 @@
node->match = g_strdup(match);
node->action = g_strdup(action);
node->name = g_strdup(name);
- e_dlist_addtail(&p->rules, (EDListNode *)node);
+ camel_dlist_addtail(&p->rules, (CamelDListNode *)node);
}
int
@@ -386,7 +386,7 @@
node = (struct _filter_rule *) p->rules.head;
while (node->next) {
if (!strcmp (node->name, name)) {
- e_dlist_remove ((EDListNode *) node);
+ camel_dlist_remove ((CamelDListNode *) node);
g_free (node->match);
g_free (node->action);
g_free (node->name);
Modified: trunk/camel/camel-iconv.c
==============================================================================
--- trunk/camel/camel-iconv.c (original)
+++ trunk/camel/camel-iconv.c Wed Aug 6 16:57:37 2008
@@ -53,18 +53,18 @@
#define UNLOCK()
#endif
-typedef struct _EDListNode {
- struct _EDListNode *next;
- struct _EDListNode *prev;
-} EDListNode;
-
-typedef struct _EDList {
- struct _EDListNode *head;
- struct _EDListNode *tail;
- struct _EDListNode *tailpred;
-} EDList;
+typedef struct _CamelDListNode {
+ struct _CamelDListNode *next;
+ struct _CamelDListNode *prev;
+} CamelDListNode;
+
+typedef struct _CamelDList {
+ struct _CamelDListNode *head;
+ struct _CamelDListNode *tail;
+ struct _CamelDListNode *tailpred;
+} CamelDList;
-#define E_DLIST_INITIALISER(l) { (EDListNode *)&l.tail, 0, (EDListNode *)&l.head }
+#define CAMEL_DLIST_INITIALISER(l) { (CamelDListNode *)&l.tail, 0, (CamelDListNode *)&l.head }
struct _iconv_cache_node {
struct _iconv_cache_node *next;
@@ -82,12 +82,12 @@
char *conv;
- EDList open; /* stores iconv_cache_nodes, busy ones up front */
+ CamelDList open; /* stores iconv_cache_nodes, busy ones up front */
};
#define E_ICONV_CACHE_SIZE (16)
-static EDList iconv_cache_list;
+static CamelDList iconv_cache_list;
static GHashTable *iconv_cache;
static GHashTable *iconv_cache_open;
static unsigned int iconv_cache_size = 0;
@@ -160,32 +160,32 @@
/* Another copy of this trivial list implementation
Why? This stuff gets called a lot (potentially), should run fast,
and g_list's are f@@#$ed up to make this a hassle */
-static void e_dlist_init(EDList *v)
+static void camel_dlist_init(CamelDList *v)
{
- v->head = (EDListNode *)&v->tail;
+ v->head = (CamelDListNode *)&v->tail;
v->tail = NULL;
- v->tailpred = (EDListNode *)&v->head;
+ v->tailpred = (CamelDListNode *)&v->head;
}
-static EDListNode *e_dlist_addhead(EDList *l, EDListNode *n)
+static CamelDListNode *camel_dlist_addhead(CamelDList *l, CamelDListNode *n)
{
n->next = l->head;
- n->prev = (EDListNode *)&l->head;
+ n->prev = (CamelDListNode *)&l->head;
l->head->prev = n;
l->head = n;
return n;
}
-static EDListNode *e_dlist_addtail(EDList *l, EDListNode *n)
+static CamelDListNode *camel_dlist_addtail(CamelDList *l, CamelDListNode *n)
{
- n->next = (EDListNode *)&l->tail;
+ n->next = (CamelDListNode *)&l->tail;
n->prev = l->tailpred;
l->tailpred->next = n;
l->tailpred = n;
return n;
}
-static EDListNode *e_dlist_remove(EDListNode *n)
+static CamelDListNode *camel_dlist_remove(CamelDListNode *n)
{
n->next->prev = n->prev;
n->prev->next = n->next;
@@ -285,7 +285,7 @@
g_hash_table_insert(iconv_charsets, from, to);
}
- e_dlist_init(&iconv_cache_list);
+ camel_dlist_init(&iconv_cache_list);
iconv_cache = g_hash_table_new(g_str_hash, g_str_equal);
iconv_cache_open = g_hash_table_new(NULL, NULL);
@@ -470,7 +470,7 @@
ic = g_hash_table_lookup(iconv_cache, tofrom);
if (ic) {
- e_dlist_remove((EDListNode *)ic);
+ camel_dlist_remove((CamelDListNode *)ic);
} else {
struct _iconv_cache *last = (struct _iconv_cache *)iconv_cache_list.tailpred;
struct _iconv_cache *prev;
@@ -480,7 +480,7 @@
in = (struct _iconv_cache_node *)last->open.head;
if (in->next && !in->busy) {
cd(printf("Flushing iconv converter '%s'\n", last->conv));
- e_dlist_remove((EDListNode *)last);
+ camel_dlist_remove((CamelDListNode *)last);
g_hash_table_remove(iconv_cache, last->conv);
flush_entry(last);
iconv_cache_size--;
@@ -492,13 +492,13 @@
iconv_cache_size++;
ic = g_malloc(sizeof(*ic));
- e_dlist_init(&ic->open);
+ camel_dlist_init(&ic->open);
ic->conv = g_strdup(tofrom);
g_hash_table_insert(iconv_cache, ic->conv, ic);
cd(printf("Creating iconv converter '%s'\n", ic->conv));
}
- e_dlist_addhead(&iconv_cache_list, (EDListNode *)ic);
+ camel_dlist_addhead(&iconv_cache_list, (CamelDListNode *)ic);
/* If we have a free iconv, use it */
in = (struct _iconv_cache_node *)ic->open.tailpred;
@@ -515,8 +515,8 @@
/* resets the converter */
iconv(ip, &buggy_iconv_buf, &buggy_iconv_len, &buggy_iconv_buf, &buggy_iconv_len);
in->busy = TRUE;
- e_dlist_remove((EDListNode *)in);
- e_dlist_addhead(&ic->open, (EDListNode *)in);
+ camel_dlist_remove((CamelDListNode *)in);
+ camel_dlist_addhead(&ic->open, (CamelDListNode *)in);
}
} else {
cd(printf("creating new iconv converter '%s'\n", ic->conv));
@@ -524,7 +524,7 @@
in = g_malloc(sizeof(*in));
in->ip = ip;
in->parent = ic;
- e_dlist_addhead(&ic->open, (EDListNode *)in);
+ camel_dlist_addhead(&ic->open, (CamelDListNode *)in);
if (ip != (iconv_t)-1) {
g_hash_table_insert(iconv_cache_open, ip, in);
in->busy = TRUE;
@@ -560,9 +560,9 @@
in = g_hash_table_lookup(iconv_cache_open, ip);
if (in) {
cd(printf("closing iconv converter '%s'\n", in->parent->conv));
- e_dlist_remove((EDListNode *)in);
+ camel_dlist_remove((CamelDListNode *)in);
in->busy = FALSE;
- e_dlist_addtail(&in->parent->open, (EDListNode *)in);
+ camel_dlist_addtail(&in->parent->open, (CamelDListNode *)in);
} else {
g_warning("trying to close iconv i dont know about: %p", ip);
iconv_close(ip);
Modified: trunk/camel/camel-index-control.c
==============================================================================
--- trunk/camel/camel-index-control.c (original)
+++ trunk/camel/camel-index-control.c Wed Aug 6 16:57:37 2008
@@ -16,8 +16,7 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <libedataserver/e-msgport.h>
-
+#include "camel-list-utils.h"
#include "camel-object.h"
#include "camel-text-index.h"
Modified: trunk/camel/camel-list-utils.c
==============================================================================
--- trunk/camel/camel-list-utils.c (original)
+++ trunk/camel/camel-list-utils.c Wed Aug 6 16:57:37 2008
@@ -35,7 +35,8 @@
* Initialise a double-linked list header. All list headers must be
* initialised before use.
**/
-void camel_dlist_init(CamelDList *v)
+void
+camel_dlist_init (CamelDList *v)
{
v->head = (CamelDListNode *)&v->tail;
v->tail = NULL;
@@ -51,7 +52,8 @@
*
* Return value: @n.
**/
-CamelDListNode *camel_dlist_addhead(CamelDList *l, CamelDListNode *n)
+CamelDListNode *
+camel_dlist_addhead (CamelDList *l, CamelDListNode *n)
{
n->next = l->head;
n->prev = (CamelDListNode *)&l->head;
@@ -69,7 +71,8 @@
*
* Return value: @n.
**/
-CamelDListNode *camel_dlist_addtail(CamelDList *l, CamelDListNode *n)
+CamelDListNode *
+camel_dlist_addtail (CamelDList *l, CamelDListNode *n)
{
n->next = (CamelDListNode *)&l->tail;
n->prev = l->tailpred;
@@ -86,7 +89,8 @@
*
* Return value: @n.
**/
-CamelDListNode *camel_dlist_remove(CamelDListNode *n)
+CamelDListNode *
+camel_dlist_remove (CamelDListNode *n)
{
n->next->prev = n->prev;
n->prev->next = n->next;
@@ -102,7 +106,8 @@
* xReturn value: The previously first-node in the list, or NULLif @l
* is an empty list.
**/
-CamelDListNode *camel_dlist_remhead(CamelDList *l)
+CamelDListNode *
+camel_dlist_remhead (CamelDList *l)
{
CamelDListNode *n, *nn;
@@ -125,7 +130,8 @@
* Return value: The previously last-node in the list, or NULL if @l
* is an empty list.
**/
-CamelDListNode *camel_dlist_remtail(CamelDList *l)
+CamelDListNode *
+camel_dlist_remtail (CamelDList *l)
{
CamelDListNode *n, *np;
@@ -147,7 +153,8 @@
*
* Return value: %TRUE if @l is an empty list, %FALSE otherwise.
**/
-int camel_dlist_empty(CamelDList *l)
+int
+camel_dlist_empty (CamelDList *l)
{
return (l->head == (CamelDListNode *)&l->tail);
}
@@ -160,7 +167,8 @@
*
* Return value: The number of nodes.
**/
-int camel_dlist_length(CamelDList *l)
+int
+camel_dlist_length (CamelDList *l)
{
CamelDListNode *n, *nn;
int count = 0;
@@ -178,12 +186,14 @@
/* This is just for orthogonal completeness */
-void camel_slist_init(CamelSList *v)
+void
+camel_slist_init (CamelSList *v)
{
v->head = NULL;
}
-CamelSListNode *camel_slist_addhead(CamelSList *l, CamelSListNode *n)
+CamelSListNode *
+camel_slist_addhead (CamelSList *l, CamelSListNode *n)
{
n->next = l->head;
l->head = n;
@@ -191,7 +201,8 @@
return n;
}
-CamelSListNode *camel_slist_addtail(CamelSList *l, CamelSListNode *n)
+CamelSListNode *
+camel_slist_addtail (CamelSList *l, CamelSListNode *n)
{
CamelSListNode *p;
@@ -204,7 +215,8 @@
return n;
}
-CamelSListNode *camel_slist_remove(CamelSList *l, CamelSListNode *n)
+CamelSListNode *
+camel_slist_remove (CamelSList *l, CamelSListNode *n)
{
CamelSListNode *p, *q;
@@ -222,7 +234,8 @@
return NULL;
}
-CamelSListNode *camel_slist_remhead(CamelSList *l)
+CamelSListNode *
+camel_slist_remhead (CamelSList *l)
{
CamelSListNode *n;
@@ -233,7 +246,8 @@
return n;
}
-CamelSListNode *camel_slist_remtail(CamelSList *l)
+CamelSListNode *
+camel_slist_remtail (CamelSList *l)
{
CamelSListNode *n, *p;
@@ -250,12 +264,14 @@
return n;
}
-int camel_slist_empty(CamelSList *l)
+int
+camel_slist_empty (CamelSList *l)
{
return (l->head == NULL);
}
-int camel_slist_length(CamelSList *l)
+int
+camel_slist_length (CamelSList *l)
{
CamelSListNode *n;
int count = 0;
Modified: trunk/camel/camel-list-utils.h
==============================================================================
--- trunk/camel/camel-list-utils.h (original)
+++ trunk/camel/camel-list-utils.h Wed Aug 6 16:57:37 2008
@@ -22,6 +22,8 @@
#ifndef _CAMEL_LIST_UTILS_H
#define _CAMEL_LIST_UTILS_H
+#include <glib.h>
+
G_BEGIN_DECLS
/* This is a copy of Amiga's Exec lists, the head and tail nodes are
Modified: trunk/camel/camel-object.c
==============================================================================
--- trunk/camel/camel-object.c (original)
+++ trunk/camel/camel-object.c Wed Aug 6 16:57:37 2008
@@ -33,9 +33,9 @@
#include <glib/gstdio.h>
#include <libedataserver/e-data-server-util.h>
-#include <libedataserver/e-msgport.h>
#include "camel-file-utils.h"
+#include "camel-list-utils.h"
#include "camel-object.h"
#define d(x)
Modified: trunk/camel/camel-offline-journal.c
==============================================================================
--- trunk/camel/camel-offline-journal.c (original)
+++ trunk/camel/camel-offline-journal.c Wed Aug 6 16:57:37 2008
@@ -85,18 +85,18 @@
{
journal->folder = NULL;
journal->filename = NULL;
- e_dlist_init (&journal->queue);
+ camel_dlist_init (&journal->queue);
}
static void
camel_offline_journal_finalize (CamelObject *object)
{
CamelOfflineJournal *journal = (CamelOfflineJournal *) object;
- EDListNode *entry;
+ CamelDListNode *entry;
g_free (journal->filename);
- while ((entry = e_dlist_remhead (&journal->queue)))
+ while ((entry = camel_dlist_remhead (&journal->queue)))
CAMEL_OFFLINE_JOURNAL_GET_CLASS (journal)->entry_free (journal, entry);
}
@@ -111,7 +111,7 @@
void
camel_offline_journal_construct (CamelOfflineJournal *journal, CamelFolder *folder, const char *filename)
{
- EDListNode *entry;
+ CamelDListNode *entry;
FILE *fp;
journal->filename = g_strdup (filename);
@@ -119,7 +119,7 @@
if ((fp = g_fopen (filename, "rb"))) {
while ((entry = CAMEL_OFFLINE_JOURNAL_GET_CLASS (journal)->entry_load (journal, fp)))
- e_dlist_addtail (&journal->queue, entry);
+ camel_dlist_addtail (&journal->queue, entry);
fclose (fp);
}
@@ -155,7 +155,7 @@
int
camel_offline_journal_write (CamelOfflineJournal *journal, CamelException *ex)
{
- EDListNode *entry;
+ CamelDListNode *entry;
FILE *fp;
int fd;
@@ -205,7 +205,7 @@
int
camel_offline_journal_replay (CamelOfflineJournal *journal, CamelException *ex)
{
- EDListNode *entry, *next;
+ CamelDListNode *entry, *next;
CamelException lex;
int failed = 0;
@@ -220,7 +220,7 @@
camel_exception_clear (&lex);
failed++;
} else {
- e_dlist_remove (entry);
+ camel_dlist_remove (entry);
}
entry = next;
}
Modified: trunk/camel/camel-offline-journal.h
==============================================================================
--- trunk/camel/camel-offline-journal.h (original)
+++ trunk/camel/camel-offline-journal.h Wed Aug 6 16:57:37 2008
@@ -29,7 +29,7 @@
#include <glib.h>
-#include <libedataserver/e-msgport.h>
+#include <camel/camel-list-utils.h>
#include <camel/camel-object.h>
#define CAMEL_TYPE_OFFLINE_JOURNAL (camel_offline_journal_get_type ())
@@ -52,18 +52,18 @@
struct _CamelFolder *folder;
char *filename;
- EDList queue;
+ CamelDList queue;
};
struct _CamelOfflineJournalClass {
CamelObjectClass parent_class;
/* entry methods */
- void (* entry_free) (CamelOfflineJournal *journal, EDListNode *entry);
+ void (* entry_free) (CamelOfflineJournal *journal, CamelDListNode *entry);
- EDListNode * (* entry_load) (CamelOfflineJournal *journal, FILE *in);
- int (* entry_write) (CamelOfflineJournal *journal, EDListNode *entry, FILE *out);
- int (* entry_play) (CamelOfflineJournal *journal, EDListNode *entry, CamelException *ex);
+ CamelDListNode * (* entry_load) (CamelOfflineJournal *journal, FILE *in);
+ int (* entry_write) (CamelOfflineJournal *journal, CamelDListNode *entry, FILE *out);
+ int (* entry_play) (CamelOfflineJournal *journal, CamelDListNode *entry, CamelException *ex);
};
Modified: trunk/camel/camel-operation.c
==============================================================================
--- trunk/camel/camel-operation.c (original)
+++ trunk/camel/camel-operation.c Wed Aug 6 16:57:37 2008
@@ -35,8 +35,7 @@
#include <glib.h>
-#include <libedataserver/e-msgport.h> /* for EDList */
-
+#include "camel-list-utils.h"
#include "camel-operation.h"
#include "camel-msgport.h"
@@ -87,7 +86,7 @@
static unsigned int stamp (void);
-static EDList operation_list = E_DLIST_INITIALISER(operation_list);
+static CamelDList operation_list = CAMEL_DLIST_INITIALISER(operation_list);
static pthread_key_t operation_key;
static pthread_once_t operation_once = PTHREAD_ONCE_INIT;
@@ -139,7 +138,7 @@
cc->cancel_fd = -1;
LOCK();
- e_dlist_addtail(&operation_list, (EDListNode *)cc);
+ camel_dlist_addtail(&operation_list, (CamelDListNode *)cc);
UNLOCK();
return cc;
@@ -210,7 +209,7 @@
if (cc->refcount == 1) {
CamelOperationMsg *msg;
- e_dlist_remove((EDListNode *)cc);
+ camel_dlist_remove((CamelDListNode *)cc);
while ((msg = (CamelOperationMsg *)camel_msgport_try_pop(cc->cancel_port)))
g_free(msg);
Modified: trunk/camel/camel-partition-table.c
==============================================================================
--- trunk/camel/camel-partition-table.c (original)
+++ trunk/camel/camel-partition-table.c Wed Aug 6 16:57:37 2008
@@ -32,9 +32,8 @@
#include <sys/types.h>
#include <unistd.h>
-#include <libedataserver/e-msgport.h>
-
#include "camel-block-file.h"
+#include "camel-list-utils.h"
#include "camel-partition-table.h"
/* Do we synchronously write table updates - makes the
@@ -64,7 +63,7 @@
{
struct _CamelPartitionTablePrivate *p;
- e_dlist_init(&cpi->partition);
+ camel_dlist_init(&cpi->partition);
p = cpi->priv = g_malloc0(sizeof(*cpi->priv));
pthread_mutex_init(&p->lock, NULL);
@@ -79,7 +78,7 @@
p = cpi->priv;
if (cpi->blocks) {
- while ((bl = (CamelBlock *)e_dlist_remhead(&cpi->partition))) {
+ while ((bl = (CamelBlock *)camel_dlist_remhead(&cpi->partition))) {
camel_block_file_sync_block(cpi->blocks, bl);
camel_block_file_unref_block(cpi->blocks, bl);
}
@@ -213,7 +212,7 @@
d(printf("Adding partition block, used = %d, hashid = %08x\n", ptb->used, ptb->partition[0].hashid));
/* if we have no data, prime initial block */
- if (ptb->used == 0 && e_dlist_empty(&cpi->partition) && ptb->next == 0) {
+ if (ptb->used == 0 && camel_dlist_empty(&cpi->partition) && ptb->next == 0) {
pblock = camel_block_file_new_block(bs);
if (pblock == NULL) {
camel_block_file_unref_block(bs, block);
@@ -234,7 +233,7 @@
root = ptb->next;
camel_block_file_detach_block(bs, block);
- e_dlist_addtail(&cpi->partition, (EDListNode *)block);
+ camel_dlist_addtail(&cpi->partition, (CamelDListNode *)block);
} while (root);
return cpi;
Modified: trunk/camel/camel-partition-table.h
==============================================================================
--- trunk/camel/camel-partition-table.h (original)
+++ trunk/camel/camel-partition-table.h Wed Aug 6 16:57:37 2008
@@ -23,9 +23,9 @@
#include <camel/camel-object.h>
#include <glib.h>
-#include <libedataserver/e-msgport.h>
#include "camel-block-file.h"
+#include "camel-list-utils.h"
G_BEGIN_DECLS
@@ -76,7 +76,7 @@
void *is_key_data;
/* we keep a list of partition blocks active at all times */
- EDList partition;
+ CamelDList partition;
};
struct _CamelPartitionTableClass {
Modified: trunk/camel/camel-private.h
==============================================================================
--- trunk/camel/camel-private.h (original)
+++ trunk/camel/camel-private.h Wed Aug 6 16:57:37 2008
@@ -31,7 +31,6 @@
#endif
#include <pthread.h>
-#include <libedataserver/e-msgport.h>
G_BEGIN_DECLS
Modified: trunk/camel/camel-provider.c
==============================================================================
--- trunk/camel/camel-provider.c (original)
+++ trunk/camel/camel-provider.c Wed Aug 6 16:57:37 2008
@@ -39,8 +39,6 @@
#include <glib/gstdio.h>
#include <gmodule.h>
-#include <libedataserver/e-msgport.h>
-
#include "camel-exception.h"
#include "camel-private.h"
#include "camel-provider.h"
Modified: trunk/camel/camel-service.c
==============================================================================
--- trunk/camel/camel-service.c (original)
+++ trunk/camel/camel-service.c Wed Aug 6 16:57:37 2008
@@ -37,8 +37,6 @@
#include <glib.h>
#include <glib/gi18n-lib.h>
-#include <libedataserver/e-msgport.h>
-
#include "camel-exception.h"
#include "camel-operation.h"
#include "camel-private.h"
Modified: trunk/camel/camel-text-index.c
==============================================================================
--- trunk/camel/camel-text-index.c (original)
+++ trunk/camel/camel-text-index.c Wed Aug 6 16:57:37 2008
@@ -37,9 +37,9 @@
#include <glib/gstdio.h>
#include <libedataserver/e-memory.h>
-#include <libedataserver/e-msgport.h>
#include "camel-block-file.h"
+#include "camel-list-utils.h"
#include "camel-object.h"
#include "camel-partition-table.h"
#include "camel-private.h"
@@ -125,7 +125,7 @@
/* Cache of words to write */
int word_cache_limit;
int word_cache_count;
- EDList word_cache;
+ CamelDList word_cache;
GHashTable *words;
GStaticRecMutex lock;
};
@@ -213,7 +213,7 @@
w->names[0] = nameid;
g_hash_table_insert(p->words, w->word, w);
- e_dlist_addhead(&p->word_cache, (EDListNode *)w);
+ camel_dlist_addhead(&p->word_cache, (CamelDListNode *)w);
p->word_cache_count++;
ww = (struct _CamelTextIndexWord *)p->word_cache.tailpred;
wp = ww->prev;
@@ -225,7 +225,7 @@
camel_block_file_touch_block(p->blocks, p->blocks->root_block);
/* if this call fails - we still point to the old data - not fatal */
camel_key_table_set_data(p->word_index, ww->wordid, ww->data);
- e_dlist_remove((EDListNode *)ww);
+ camel_dlist_remove((CamelDListNode *)ww);
g_hash_table_remove(p->words, ww->word);
g_free(ww->word);
g_free(ww);
@@ -235,8 +235,8 @@
wp = wp->prev;
}
} else {
- e_dlist_remove((EDListNode *)w);
- e_dlist_addhead(&p->word_cache, (EDListNode *)w);
+ camel_dlist_remove((CamelDListNode *)w);
+ camel_dlist_addhead(&p->word_cache, (CamelDListNode *)w);
w->names[w->used] = nameid;
w->used++;
if (w->used == sizeof(w->names)/sizeof(w->names[0])) {
@@ -279,9 +279,9 @@
/* this doesn't really need to be dropped, its only used in updates anyway */
p->word_cache_limit = 1024;
- work = !e_dlist_empty(&p->word_cache);
+ work = !camel_dlist_empty(&p->word_cache);
- while ( (ww = (struct _CamelTextIndexWord *)e_dlist_remhead(&p->word_cache)) ) {
+ while ( (ww = (struct _CamelTextIndexWord *)camel_dlist_remhead(&p->word_cache)) ) {
if (ww->used > 0) {
io(printf("writing key file entry '%s' [%x]\n", ww->word, ww->data));
if (camel_key_file_write(p->links, &ww->data, ww->used, ww->names) != -1) {
@@ -757,7 +757,7 @@
p = CTI_PRIVATE(idx) = g_malloc0(sizeof(*p));
- e_dlist_init(&p->word_cache);
+ camel_dlist_init(&p->word_cache);
p->words = g_hash_table_new(g_str_hash, g_str_equal);
p->word_cache_count = 0;
/* this cache size and the block cache size have been tuned for about the best
@@ -774,7 +774,7 @@
camel_index_sync((CamelIndex *)idx);
- g_assert(e_dlist_empty(&p->word_cache));
+ g_assert(camel_dlist_empty(&p->word_cache));
g_assert(g_hash_table_size(p->words) == 0);
g_hash_table_destroy(p->words);
Modified: trunk/camel/providers/groupwise/camel-groupwise-folder.c
==============================================================================
--- trunk/camel/providers/groupwise/camel-groupwise-folder.c (original)
+++ trunk/camel/providers/groupwise/camel-groupwise-folder.c Wed Aug 6 16:57:37 2008
@@ -40,8 +40,6 @@
#include <glib.h>
#include <glib/gi18n-lib.h>
-#include <libedataserver/e-msgport.h>
-
#include <e-gw-connection.h>
#include <e-gw-item.h>
Modified: trunk/camel/providers/groupwise/camel-groupwise-journal.c
==============================================================================
--- trunk/camel/providers/groupwise/camel-groupwise-journal.c (original)
+++ trunk/camel/providers/groupwise/camel-groupwise-journal.c Wed Aug 6 16:57:37 2008
@@ -54,10 +54,10 @@
static void camel_groupwise_journal_init (CamelGroupwiseJournal *journal, CamelGroupwiseJournalClass *klass);
static void camel_groupwise_journal_finalize (CamelObject *object);
-static void groupwise_entry_free (CamelOfflineJournal *journal, EDListNode *entry);
-static EDListNode *groupwise_entry_load (CamelOfflineJournal *journal, FILE *in);
-static int groupwise_entry_write (CamelOfflineJournal *journal, EDListNode *entry, FILE *out);
-static int groupwise_entry_play (CamelOfflineJournal *journal, EDListNode *entry, CamelException *ex);
+static void groupwise_entry_free (CamelOfflineJournal *journal, CamelDListNode *entry);
+static CamelDListNode *groupwise_entry_load (CamelOfflineJournal *journal, FILE *in);
+static int groupwise_entry_write (CamelOfflineJournal *journal, CamelDListNode *entry, FILE *out);
+static int groupwise_entry_play (CamelOfflineJournal *journal, CamelDListNode *entry, CamelException *ex);
static CamelOfflineJournalClass *parent_class = NULL;
@@ -108,7 +108,7 @@
}
static void
-groupwise_entry_free (CamelOfflineJournal *journal, EDListNode *entry)
+groupwise_entry_free (CamelOfflineJournal *journal, CamelDListNode *entry)
{
CamelGroupwiseJournalEntry *groupwise_entry = (CamelGroupwiseJournalEntry *) entry;
@@ -118,7 +118,7 @@
g_free (groupwise_entry);
}
-static EDListNode *
+static CamelDListNode *
groupwise_entry_load (CamelOfflineJournal *journal, FILE *in)
{
CamelGroupwiseJournalEntry *entry;
@@ -145,7 +145,7 @@
goto exception;
}
- return (EDListNode *) entry;
+ return (CamelDListNode *) entry;
exception:
@@ -159,7 +159,7 @@
}
static int
-groupwise_entry_write (CamelOfflineJournal *journal, EDListNode *entry, FILE *out)
+groupwise_entry_write (CamelOfflineJournal *journal, CamelDListNode *entry, FILE *out)
{
CamelGroupwiseJournalEntry *groupwise_entry = (CamelGroupwiseJournalEntry *) entry;
@@ -302,7 +302,7 @@
}
static int
-groupwise_entry_play (CamelOfflineJournal *journal, EDListNode *entry, CamelException *ex)
+groupwise_entry_play (CamelOfflineJournal *journal, CamelDListNode *entry, CamelException *ex)
{
CamelGroupwiseJournalEntry *groupwise_entry = (CamelGroupwiseJournalEntry *) entry;
@@ -404,7 +404,7 @@
entry->type = CAMEL_GROUPWISE_JOURNAL_ENTRY_APPEND;
entry->uid = uid;
- e_dlist_addtail (&journal->queue, (EDListNode *) entry);
+ camel_dlist_addtail (&journal->queue, (CamelDListNode *) entry);
if (appended_uid)
*appended_uid = g_strdup (uid);
@@ -430,7 +430,7 @@
entry->original_uid = g_strdup (original_uid);
entry->source_container = g_strdup (camel_groupwise_store_container_id_lookup (gw_store, ((CamelFolder *)source_folder)->name));
- e_dlist_addtail (&journal->queue, (EDListNode *) entry);
+ camel_dlist_addtail (&journal->queue, (CamelDListNode *) entry);
if (transferred_uid)
*transferred_uid = g_strdup (uid);
Modified: trunk/camel/providers/groupwise/camel-groupwise-journal.h
==============================================================================
--- trunk/camel/providers/groupwise/camel-groupwise-journal.h (original)
+++ trunk/camel/providers/groupwise/camel-groupwise-journal.h Wed Aug 6 16:57:37 2008
@@ -52,7 +52,7 @@
};
struct _CamelGroupwiseJournalEntry {
- EDListNode node;
+ CamelDListNode node;
int type;
Modified: trunk/camel/providers/imap/camel-imap-journal.c
==============================================================================
--- trunk/camel/providers/imap/camel-imap-journal.c (original)
+++ trunk/camel/providers/imap/camel-imap-journal.c Wed Aug 6 16:57:37 2008
@@ -52,10 +52,10 @@
static void camel_imap_journal_init (CamelIMAPJournal *journal, CamelIMAPJournalClass *klass);
static void camel_imap_journal_finalize (CamelObject *object);
-static void imap_entry_free (CamelOfflineJournal *journal, EDListNode *entry);
-static EDListNode *imap_entry_load (CamelOfflineJournal *journal, FILE *in);
-static int imap_entry_write (CamelOfflineJournal *journal, EDListNode *entry, FILE *out);
-static int imap_entry_play (CamelOfflineJournal *journal, EDListNode *entry, CamelException *ex);
+static void imap_entry_free (CamelOfflineJournal *journal, CamelDListNode *entry);
+static CamelDListNode *imap_entry_load (CamelOfflineJournal *journal, FILE *in);
+static int imap_entry_write (CamelOfflineJournal *journal, CamelDListNode *entry, FILE *out);
+static int imap_entry_play (CamelOfflineJournal *journal, CamelDListNode *entry, CamelException *ex);
static void unref_folder (gpointer key, gpointer value, gpointer data);
static void free_uids (GPtrArray *array);
static void close_folder (gpointer name, gpointer folder, gpointer data);
@@ -132,7 +132,7 @@
}
static void
-imap_entry_free (CamelOfflineJournal *journal, EDListNode *entry)
+imap_entry_free (CamelOfflineJournal *journal, CamelDListNode *entry)
{
CamelIMAPJournalEntry *imap_entry = (CamelIMAPJournalEntry *) entry;
@@ -180,7 +180,7 @@
return uids;
}
-static EDListNode *
+static CamelDListNode *
imap_entry_load (CamelOfflineJournal *journal, FILE *in)
{
CamelIMAPJournalEntry *entry;
@@ -217,7 +217,7 @@
}
d(g_print ("CHEN DEBUG: Atlast got one entry \n"));
- return (EDListNode *) entry;
+ return (CamelDListNode *) entry;
exception:
switch (entry->type) {
@@ -245,7 +245,7 @@
}
static int
-imap_entry_write (CamelOfflineJournal *journal, EDListNode *entry, FILE *out)
+imap_entry_write (CamelOfflineJournal *journal, CamelDListNode *entry, FILE *out)
{
CamelIMAPJournalEntry *imap_entry = (CamelIMAPJournalEntry *) entry;
GPtrArray *uids = NULL;
@@ -311,7 +311,7 @@
}
int
-imap_entry_play (CamelOfflineJournal *journal, EDListNode *entry, CamelException *ex)
+imap_entry_play (CamelOfflineJournal *journal, CamelDListNode *entry, CamelException *ex)
{
CamelIMAPJournalEntry *imap_entry = (CamelIMAPJournalEntry *) entry;
@@ -436,7 +436,7 @@
va_end (ap);
- e_dlist_addtail (&journal->queue, (EDListNode *) entry);
+ camel_dlist_addtail (&journal->queue, (CamelDListNode *) entry);
camel_offline_journal_write (journal, NULL);
}
Modified: trunk/camel/providers/imap/camel-imap-journal.h
==============================================================================
--- trunk/camel/providers/imap/camel-imap-journal.h (original)
+++ trunk/camel/providers/imap/camel-imap-journal.h Wed Aug 6 16:57:37 2008
@@ -28,6 +28,7 @@
#include <glib.h>
+#include <camel/camel-list-utils.h>
#include <camel/camel-offline-journal.h>
#include <camel/camel-mime-message.h>
@@ -53,7 +54,7 @@
} CamelOfflineAction;
struct _CamelIMAPJournalEntry {
- EDListNode node;
+ CamelDListNode node;
CamelOfflineAction type;
Modified: trunk/camel/providers/imap/camel-imap-search.c
==============================================================================
--- trunk/camel/providers/imap/camel-imap-search.c (original)
+++ trunk/camel/providers/imap/camel-imap-search.c Wed Aug 6 16:57:37 2008
@@ -115,7 +115,7 @@
static void
camel_imap_search_init(CamelImapSearch *is)
{
- e_dlist_init(&is->matches);
+ camel_dlist_init(&is->matches);
is->matches_hash = g_hash_table_new(g_str_hash, g_str_equal);
is->matches_count = 0;
is->lastuid = 0;
@@ -126,7 +126,7 @@
{
struct _match_record *mr;
- while ( (mr = (struct _match_record *)e_dlist_remtail(&is->matches)) )
+ while ( (mr = (struct _match_record *)camel_dlist_remtail(&is->matches)) )
free_match(is, mr);
g_hash_table_destroy(is->matches_hash);
if (is->cache)
@@ -395,7 +395,7 @@
mr = g_hash_table_lookup(is->matches_hash, hash);
if (mr == NULL) {
while (is->matches_count >= MATCH_CACHE_SIZE) {
- mr = (struct _match_record *)e_dlist_remtail(&is->matches);
+ mr = (struct _match_record *)camel_dlist_remtail(&is->matches);
if (mr) {
printf("expiring match '%s' (%s)\n", mr->hash, mr->terms[0]);
g_hash_table_remove(is->matches_hash, mr->hash);
@@ -409,10 +409,10 @@
g_hash_table_insert(is->matches_hash, mr->hash, mr);
is->matches_count++;
} else {
- e_dlist_remove((EDListNode *)mr);
+ camel_dlist_remove((CamelDListNode *)mr);
}
- e_dlist_addhead(&is->matches, (EDListNode *)mr);
+ camel_dlist_addhead(&is->matches, (CamelDListNode *)mr);
/* what about offline mode? */
/* We could cache those results too, or should we cache them elsewhere? */
Modified: trunk/camel/providers/imap/camel-imap-search.h
==============================================================================
--- trunk/camel/providers/imap/camel-imap-search.h (original)
+++ trunk/camel/providers/imap/camel-imap-search.h Wed Aug 6 16:57:37 2008
@@ -27,7 +27,7 @@
#define _CAMEL_IMAP_SEARCH_H
#include <camel/camel-folder-search.h>
-#include <libedataserver/e-msgport.h>
+#include <camel/camel-list-utils.h>
#include <camel/camel-data-cache.h>
#define CAMEL_IMAP_SEARCH_TYPE (camel_imap_search_get_type ())
@@ -49,7 +49,7 @@
/* cache of body search matches */
unsigned int matches_count;
- EDList matches;
+ CamelDList matches;
GHashTable *matches_hash;
};
Modified: trunk/camel/providers/imap/camel-imap-store.h
==============================================================================
--- trunk/camel/providers/imap/camel-imap-store.h (original)
+++ trunk/camel/providers/imap/camel-imap-store.h Wed Aug 6 16:57:37 2008
@@ -26,18 +26,18 @@
#define CAMEL_IMAP_STORE_H 1
#include "camel-imap-types.h"
+#include <camel/camel-msgport.h>
#include <camel/camel-offline-store.h>
#include <sys/time.h>
#ifdef ENABLE_THREADS
-#include <libedataserver/e-msgport.h>
G_BEGIN_DECLS
typedef struct _CamelImapMsg CamelImapMsg;
struct _CamelImapMsg {
- EMsg msg;
+ CamelMsg msg;
void (*receive)(CamelImapStore *store, struct _CamelImapMsg *m);
void (*free)(CamelImapStore *store, struct _CamelImapMsg *m);
Modified: trunk/camel/providers/imap/camel-imap-wrapper.c
==============================================================================
--- trunk/camel/providers/imap/camel-imap-wrapper.c (original)
+++ trunk/camel/providers/imap/camel-imap-wrapper.c Wed Aug 6 16:57:37 2008
@@ -28,8 +28,6 @@
#include <errno.h>
#include <string.h>
-#include <libedataserver/e-msgport.h>
-
#include "camel-exception.h"
#include "camel-mime-filter-basic.h"
#include "camel-mime-filter-charset.h"
Modified: trunk/camel/providers/imap4/camel-imap4-command.c
==============================================================================
--- trunk/camel/providers/imap4/camel-imap4-command.c (original)
+++ trunk/camel/providers/imap4/camel-imap4-command.c Wed Aug 6 16:57:37 2008
@@ -334,8 +334,8 @@
g_string_free (str, FALSE);
ic = g_new0 (CamelIMAP4Command, 1);
- ((EDListNode *) ic)->next = NULL;
- ((EDListNode *) ic)->prev = NULL;
+ ((CamelDListNode *) ic)->next = NULL;
+ ((CamelDListNode *) ic)->prev = NULL;
ic->untagged = g_hash_table_new (g_str_hash, g_str_equal);
ic->status = CAMEL_IMAP4_COMMAND_QUEUED;
ic->result = CAMEL_IMAP4_RESULT_NONE;
Modified: trunk/camel/providers/imap4/camel-imap4-command.h
==============================================================================
--- trunk/camel/providers/imap4/camel-imap4-command.h (original)
+++ trunk/camel/providers/imap4/camel-imap4-command.h Wed Aug 6 16:57:37 2008
@@ -27,10 +27,9 @@
#include <glib.h>
-#include <libedataserver/e-msgport.h>
-
#include <camel/camel-stream.h>
#include <camel/camel-exception.h>
+#include <camel/camel-list-utils.h>
#include <camel/camel-data-wrapper.h>
G_BEGIN_DECLS
@@ -93,7 +92,7 @@
};
struct _CamelIMAP4Command {
- EDListNode node;
+ CamelDListNode node;
struct _CamelIMAP4Engine *engine;
Modified: trunk/camel/providers/imap4/camel-imap4-engine.c
==============================================================================
--- trunk/camel/providers/imap4/camel-imap4-engine.c (original)
+++ trunk/camel/providers/imap4/camel-imap4-engine.c Wed Aug 6 16:57:37 2008
@@ -116,14 +116,14 @@
engine->folder = NULL;
- e_dlist_init (&engine->queue);
+ camel_dlist_init (&engine->queue);
}
static void
camel_imap4_engine_finalize (CamelObject *object)
{
CamelIMAP4Engine *engine = (CamelIMAP4Engine *) object;
- EDListNode *node;
+ CamelDListNode *node;
if (engine->istream)
camel_object_unref (engine->istream);
@@ -141,7 +141,7 @@
if (engine->folder)
camel_object_unref (engine->folder);
- while ((node = e_dlist_remhead (&engine->queue))) {
+ while ((node = camel_dlist_remhead (&engine->queue))) {
node->next = NULL;
node->prev = NULL;
@@ -1365,7 +1365,7 @@
int retries = 0;
int retval;
- if (e_dlist_empty (&engine->queue))
+ if (camel_dlist_empty (&engine->queue))
return 0;
retry:
@@ -1382,7 +1382,7 @@
if (!connected) {
/* pop the first command and act as tho it failed (which, technically, it did...) */
- ic = (CamelIMAP4Command *) e_dlist_remhead (&engine->queue);
+ ic = (CamelIMAP4Command *) camel_dlist_remhead (&engine->queue);
ic->status = CAMEL_IMAP4_COMMAND_ERROR;
camel_exception_xfer (&ic->ex, &rex);
camel_imap4_command_unref (ic);
@@ -1393,7 +1393,7 @@
/* check to see if we need to pre-queue a SELECT, if so do it */
engine_prequeue_folder_select (engine);
- engine->current = ic = (CamelIMAP4Command *) e_dlist_remhead (&engine->queue);
+ engine->current = ic = (CamelIMAP4Command *) camel_dlist_remhead (&engine->queue);
ic->status = CAMEL_IMAP4_COMMAND_ACTIVE;
if ((retval = imap4_process_command (engine, ic)) != -1) {
@@ -1407,7 +1407,7 @@
* over to @nic and pretend we just processed @nic.
**/
- nic = (CamelIMAP4Command *) e_dlist_remhead (&engine->queue);
+ nic = (CamelIMAP4Command *) camel_dlist_remhead (&engine->queue);
nic->status = ic->status;
nic->result = ic->result;
@@ -1424,7 +1424,7 @@
retval = ic->id;
} else if (!engine->reconnecting && retries < 3) {
/* put @ic back in the queue and retry */
- e_dlist_addhead (&engine->queue, (EDListNode *) ic);
+ camel_dlist_addhead (&engine->queue, (CamelDListNode *) ic);
camel_imap4_command_reset (ic);
retries++;
goto retry;
@@ -1466,7 +1466,7 @@
va_end (args);
ic->id = engine->nextid++;
- e_dlist_addtail (&engine->queue, (EDListNode *) ic);
+ camel_dlist_addtail (&engine->queue, (CamelDListNode *) ic);
camel_imap4_command_ref (ic);
return ic;
@@ -1497,15 +1497,15 @@
ic = camel_imap4_command_newv (engine, (CamelIMAP4Folder *) folder, format, args);
va_end (args);
- if (e_dlist_empty (&engine->queue)) {
- e_dlist_addtail (&engine->queue, (EDListNode *) ic);
+ if (camel_dlist_empty (&engine->queue)) {
+ camel_dlist_addtail (&engine->queue, (CamelDListNode *) ic);
ic->id = engine->nextid++;
} else {
CamelIMAP4Command *nic;
- EDListNode *node;
+ CamelDListNode *node;
- node = (EDListNode *) ic;
- e_dlist_addhead (&engine->queue, node);
+ node = (CamelDListNode *) ic;
+ camel_dlist_addhead (&engine->queue, node);
nic = (CamelIMAP4Command *) node->next;
ic->id = nic->id - 1;
@@ -1536,12 +1536,12 @@
void
camel_imap4_engine_dequeue (CamelIMAP4Engine *engine, CamelIMAP4Command *ic)
{
- EDListNode *node = (EDListNode *) ic;
+ CamelDListNode *node = (CamelDListNode *) ic;
if (node->next == NULL && node->prev == NULL)
return;
- e_dlist_remove (node);
+ camel_dlist_remove (node);
node->next = NULL;
node->prev = NULL;
Modified: trunk/camel/providers/imap4/camel-imap4-engine.h
==============================================================================
--- trunk/camel/providers/imap4/camel-imap4-engine.h (original)
+++ trunk/camel/providers/imap4/camel-imap4-engine.h Wed Aug 6 16:57:37 2008
@@ -27,11 +27,10 @@
#include <glib.h>
-#include <libedataserver/e-msgport.h>
-
#include <camel/camel-stream.h>
#include <camel/camel-folder.h>
#include <camel/camel-session.h>
+#include <camel/camel-list-utils.h>
#define CAMEL_TYPE_IMAP4_ENGINE (camel_imap4_engine_get_type ())
#define CAMEL_IMAP4_ENGINE(obj) (CAMEL_CHECK_CAST ((obj), CAMEL_TYPE_IMAP4_ENGINE, CamelIMAP4Engine))
@@ -182,7 +181,7 @@
struct _CamelIMAP4Folder *folder; /* currently selected folder */
- EDList queue; /* queue of waiting commands */
+ CamelDList queue; /* queue of waiting commands */
struct _CamelIMAP4Command *current;
};
Modified: trunk/camel/providers/imap4/camel-imap4-journal.c
==============================================================================
--- trunk/camel/providers/imap4/camel-imap4-journal.c (original)
+++ trunk/camel/providers/imap4/camel-imap4-journal.c Wed Aug 6 16:57:37 2008
@@ -50,10 +50,10 @@
static void camel_imap4_journal_init (CamelIMAP4Journal *journal, CamelIMAP4JournalClass *klass);
static void camel_imap4_journal_finalize (CamelObject *object);
-static void imap4_entry_free (CamelOfflineJournal *journal, EDListNode *entry);
-static EDListNode *imap4_entry_load (CamelOfflineJournal *journal, FILE *in);
-static int imap4_entry_write (CamelOfflineJournal *journal, EDListNode *entry, FILE *out);
-static int imap4_entry_play (CamelOfflineJournal *journal, EDListNode *entry, CamelException *ex);
+static void imap4_entry_free (CamelOfflineJournal *journal, CamelDListNode *entry);
+static CamelDListNode *imap4_entry_load (CamelOfflineJournal *journal, FILE *in);
+static int imap4_entry_write (CamelOfflineJournal *journal, CamelDListNode *entry, FILE *out);
+static int imap4_entry_play (CamelOfflineJournal *journal, CamelDListNode *entry, CamelException *ex);
static CamelOfflineJournalClass *parent_class = NULL;
@@ -111,7 +111,7 @@
}
static void
-imap4_entry_free (CamelOfflineJournal *journal, EDListNode *entry)
+imap4_entry_free (CamelOfflineJournal *journal, CamelDListNode *entry)
{
CamelIMAP4JournalEntry *imap4_entry = (CamelIMAP4JournalEntry *) entry;
@@ -119,7 +119,7 @@
g_free (imap4_entry);
}
-static EDListNode *
+static CamelDListNode *
imap4_entry_load (CamelOfflineJournal *journal, FILE *in)
{
CamelIMAP4JournalEntry *entry;
@@ -139,7 +139,7 @@
goto exception;
}
- return (EDListNode *) entry;
+ return (CamelDListNode *) entry;
exception:
@@ -157,7 +157,7 @@
}
static int
-imap4_entry_write (CamelOfflineJournal *journal, EDListNode *entry, FILE *out)
+imap4_entry_write (CamelOfflineJournal *journal, CamelDListNode *entry, FILE *out)
{
CamelIMAP4JournalEntry *imap4_entry = (CamelIMAP4JournalEntry *) entry;
@@ -259,7 +259,7 @@
}
static int
-imap4_entry_play (CamelOfflineJournal *journal, EDListNode *entry, CamelException *ex)
+imap4_entry_play (CamelOfflineJournal *journal, CamelDListNode *entry, CamelException *ex)
{
CamelIMAP4JournalEntry *imap4_entry = (CamelIMAP4JournalEntry *) entry;
@@ -347,7 +347,7 @@
entry->type = CAMEL_IMAP4_JOURNAL_ENTRY_APPEND;
entry->v.append_uid = uid;
- e_dlist_addtail (&journal->queue, (EDListNode *) entry);
+ camel_dlist_addtail (&journal->queue, (CamelDListNode *) entry);
info = camel_folder_summary_info_new_from_message (folder->summary, message);
g_free(info->uid);
Modified: trunk/camel/providers/imap4/camel-imap4-journal.h
==============================================================================
--- trunk/camel/providers/imap4/camel-imap4-journal.h (original)
+++ trunk/camel/providers/imap4/camel-imap4-journal.h Wed Aug 6 16:57:37 2008
@@ -50,7 +50,7 @@
};
struct _CamelIMAP4JournalEntry {
- EDListNode node;
+ CamelDListNode node;
int type;
Modified: trunk/camel/providers/imap4/camel-imap4-search.h
==============================================================================
--- trunk/camel/providers/imap4/camel-imap4-search.h (original)
+++ trunk/camel/providers/imap4/camel-imap4-search.h Wed Aug 6 16:57:37 2008
@@ -24,10 +24,9 @@
#ifndef __CAMEL_IMAP4_SEARCH_H__
#define __CAMEL_IMAP4_SEARCH_H__
-#include <libedataserver/e-msgport.h>
-
#include <camel/camel-data-cache.h>
#include <camel/camel-folder-search.h>
+#include <camel/camel-list-utils.h>
#define CAMEL_IMAP4_SEARCH_TYPE (camel_imap4_search_get_type ())
#define CAMEL_IMAP4_SEARCH(obj) CAMEL_CHECK_CAST (obj, camel_imap4_search_get_type (), CamelIMAP4Search)
@@ -52,7 +51,7 @@
CamelDataCache *cache; /* disk-cache for searches */
/* cache of body search matches */
- EDList matches;
+ CamelDList matches;
GHashTable *matches_hash;
unsigned int matches_count;
};
Modified: trunk/camel/providers/imapp/camel-imapp-driver.c
==============================================================================
--- trunk/camel/providers/imapp/camel-imapp-driver.c (original)
+++ trunk/camel/providers/imapp/camel-imapp-driver.c Wed Aug 6 16:57:37 2008
@@ -11,6 +11,7 @@
#include "camel-folder-summary.h"
#include "camel-mime-utils.h"
+#include "camel-msgport.h"
#include "camel-sasl.h"
#include "camel-store.h"
#include "camel-stream-mem.h"
@@ -41,8 +42,8 @@
object_init(CamelIMAPPDriver *ie, CamelIMAPPDriverClass *ieclass)
{
ie->summary = g_ptr_array_new();
- e_dlist_init(&ie->body_fetch);
- e_dlist_init(&ie->body_fetch_done);
+ camel_dlist_init(&ie->body_fetch);
+ camel_dlist_init(&ie->body_fetch_done);
}
static void
@@ -462,7 +463,7 @@
fd->done = done;
fd->data = data;
- e_dlist_addtail(&id->body_fetch, (EDListNode *)&fd);
+ camel_dlist_addtail(&id->body_fetch, (CamelDListNode *)&fd);
CAMEL_TRY {
camel_imapp_driver_select(id, folder);
@@ -477,7 +478,7 @@
/* FIXME: do exception properly */
} CAMEL_DONE;
- e_dlist_remove((EDListNode *)&fd);
+ camel_dlist_remove((CamelDListNode *)&fd);
return fd.data;
}
@@ -760,8 +761,8 @@
while (fn) {
if (!strcmp(finfo->uid, fd->uid) && !strcmp(finfo->section, fd->section)) {
fd->done(sdata, fd);
- e_dlist_remove((EDListNode *)fd);
- e_dlist_addtail(&sdata->body_fetch_done, (EDListNode *)fd);
+ camel_dlist_remove((CamelDListNode *)fd);
+ camel_dlist_addtail(&sdata->body_fetch_done, (CamelDListNode *)fd);
break;
}
fd = fn;
@@ -794,7 +795,7 @@
typedef struct _CamelIMAPPMsg CamelIMAPPMsg;
struct _CamelIMAPPMsg {
- EMsg msg;
+ CamelMsg msg;
CamelOperation *cancel;
CamelException *ex;
camel_imapp_msg_t type;
@@ -930,7 +931,7 @@
/*m = (CamelIMAPPMsg *)camel_msgport_try_pop(id->queue);*/
switch (m->type) {
case CAMEL_IMAPP_MSG_FETCH:
- /*e_dlist_addtail(&id->fetch_queue, (EDListNode *)m);*/
+ /*camel_dlist_addtail(&id->fetch_queue, (CamelDListNode *)m);*/
camel_imapp_driver_select(id, m->data.fetch.folder);
break;
case CAMEL_IMAPP_MSG_LIST:
Modified: trunk/camel/providers/imapp/camel-imapp-driver.h
==============================================================================
--- trunk/camel/providers/imapp/camel-imapp-driver.h (original)
+++ trunk/camel/providers/imapp/camel-imapp-driver.h Wed Aug 6 16:57:37 2008
@@ -2,9 +2,10 @@
#ifndef _CAMEL_IMAPP_DRIVER_H
#define _CAMEL_IMAPP_DRIVER_H
+#include <camel/camel-list-utils.h>
#include <camel/camel-object.h>
+
#include "camel-imapp-stream.h"
-#include <libedataserver/e-msgport.h>
#define CAMEL_IMAPP_DRIVER_TYPE (camel_imapp_driver_get_type ())
#define CAMEL_IMAPP_DRIVER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAPP_DRIVER_TYPE, CamelIMAPPDriver))
@@ -63,8 +64,8 @@
/* sem_t list_sem; for controlled access to list variables */
/* this is so the node is always in a list - easier exception management */
- EDList body_fetch;
- EDList body_fetch_done;
+ CamelDList body_fetch;
+ CamelDList body_fetch_done;
/* factory to get an appropriate sasl mech */
CamelIMAPPSASLFunc get_sasl;
Modified: trunk/camel/providers/imapp/camel-imapp-engine.c
==============================================================================
--- trunk/camel/providers/imapp/camel-imapp-engine.c (original)
+++ trunk/camel/providers/imapp/camel-imapp-engine.c Wed Aug 6 16:57:37 2008
@@ -41,8 +41,8 @@
object_init(CamelIMAPPEngine *ie, CamelIMAPPEngineClass *ieclass)
{
ie->handlers = g_hash_table_new(g_str_hash, g_str_equal);
- e_dlist_init(&ie->active);
- e_dlist_init(&ie->done);
+ camel_dlist_init(&ie->active);
+ camel_dlist_init(&ie->done);
ie->port = camel_msgport_new();
@@ -510,7 +510,7 @@
}
if (imap->literal == NULL) {
- ic = (CamelIMAPPCommand *)e_dlist_remhead(&imap->queue);
+ ic = (CamelIMAPPCommand *)camel_dlist_remhead(&imap->queue);
if (ic) {
printf("found outstanding op, queueing\n");
camel_imapp_engine_command_queue(imap, ic);
@@ -536,8 +536,8 @@
printf("Got completion response for command %05u '%s'\n", ic->tag, ic->name);
printf("%p: removing command from qwueue, we were at '%s'\n", ic, ic->current->data);
printf("%p: removing command\n", ic);
- e_dlist_remove((EDListNode *)ic);
- e_dlist_addtail(&imap->done, (EDListNode *)ic);
+ camel_dlist_remove((CamelDListNode *)ic);
+ camel_dlist_addtail(&imap->done, (CamelDListNode *)ic);
if (imap->literal == ic)
imap->literal = NULL;
ic->status = imap_parse_status(imap->stream);
@@ -561,12 +561,12 @@
printf("Warning: continuation command '%s' finished with outstanding continuation\n", imap->literal->name);
ic = imap->literal;
/* set the command complete with a failure code? */
- e_dlist_remove((EDListNode *)ic);
- e_dlist_addtail(&imap->done, (EDListNode *)ic);
+ camel_dlist_remove((CamelDListNode *)ic);
+ camel_dlist_addtail(&imap->done, (CamelDListNode *)ic);
imap->literal = NULL;
}
- ic = (CamelIMAPPCommand *)e_dlist_remhead(&imap->queue);
+ ic = (CamelIMAPPCommand *)camel_dlist_remhead(&imap->queue);
if (ic) {
printf("found outstanding op, queueing\n");
camel_imapp_engine_command_queue(imap, ic);
@@ -585,7 +585,7 @@
unsigned char *token;
int tok;
- if ((icwait && icwait->status != NULL) || e_dlist_empty(&imap->active))
+ if ((icwait && icwait->status != NULL) || camel_dlist_empty(&imap->active))
return 0;
/* handle exceptions here? */
@@ -602,7 +602,7 @@
else
camel_exception_throw(1, "unexpected server response: %s", token);
- if (e_dlist_empty(&imap->active))
+ if (camel_dlist_empty(&imap->active))
return 0;
return 1;
@@ -619,7 +619,7 @@
ic->name = name;
ic->mem = (CamelStreamMem *)camel_stream_mem_new();
ic->select = g_strdup(select);
- e_dlist_init(&ic->parts);
+ camel_dlist_init(&ic->parts);
if (fmt && fmt[0]) {
va_start(ap, fmt);
@@ -667,7 +667,7 @@
imap_free_status(ic->status);
g_free(ic->select);
- while ( (cp = ((CamelIMAPPCommandPart *)e_dlist_remhead(&ic->parts))) ) {
+ while ( (cp = ((CamelIMAPPCommandPart *)camel_dlist_remhead(&ic->parts))) ) {
g_free(cp->data);
if (cp->ob)
camel_object_unref(cp->ob);
@@ -688,7 +688,7 @@
if (ic->mem)
imap_engine_command_complete(imap, ic);
- camel_msgport_push(imap->port, (EMsg *)ic);
+ camel_msgport_push(imap->port, (CamelMsg *)ic);
}
CamelIMAPPCommand *
@@ -827,14 +827,14 @@
/* FIXME: hackish? */
g_byte_array_set_size(ic->mem->buffer, 0);
- e_dlist_addtail(&ic->parts, (EDListNode *)cp);
+ camel_dlist_addtail(&ic->parts, (CamelDListNode *)cp);
}
#if c(!)0
-static int len(EDList *list)
+static int len(CamelDList *list)
{
int count = 0;
- EDListNode *n = list->head;
+ CamelDListNode *n = list->head;
while (n->next) {
n = n->next;
@@ -1023,7 +1023,7 @@
/* first, check if command can be sent yet ... queue if not */
if (imap->literal != NULL) {
printf("%p: queueing while literal active\n", ic);
- e_dlist_addtail(&imap->queue, (EDListNode *)ic);
+ camel_dlist_addtail(&imap->queue, (CamelDListNode *)ic);
return;
}
@@ -1040,11 +1040,11 @@
printf("%p: active literal\n", ic);
g_assert(cp->next);
imap->literal = ic;
- e_dlist_addtail(&imap->active, (EDListNode *)ic);
+ camel_dlist_addtail(&imap->active, (CamelDListNode *)ic);
} else {
printf("%p: active non-literal\n", ic);
g_assert(cp->next && cp->next->next == NULL);
- e_dlist_addtail(&imap->active, (EDListNode *)ic);
+ camel_dlist_addtail(&imap->active, (CamelDListNode *)ic);
}
}
Modified: trunk/camel/providers/imapp/camel-imapp-engine.h
==============================================================================
--- trunk/camel/providers/imapp/camel-imapp-engine.h (original)
+++ trunk/camel/providers/imapp/camel-imapp-engine.h Wed Aug 6 16:57:37 2008
@@ -2,10 +2,11 @@
#ifndef _CAMEL_IMAPP_ENGINE_H
#define _CAMEL_IMAPP_ENGINE_H
+#include <camel/camel-list-utils.h>
+#include <camel/camel-msgport.h>
#include <camel/camel-object.h>
#include "camel-imapp-stream.h"
-#include <libedataserver/e-msgport.h>
#include "camel-imapp-folder.h"
#define CAMEL_IMAPP_ENGINE_TYPE (camel_imapp_engine_get_type ())
@@ -49,7 +50,7 @@
typedef void (*CamelIMAPPCommandFunc)(struct _CamelIMAPPEngine *engine, struct _CamelIMAPPCommand *, void *data);
struct _CamelIMAPPCommand {
- EMsg msg;
+ CamelMsg msg;
const char *name; /* command name/type (e.g. FETCH) */
@@ -60,7 +61,7 @@
unsigned int tag;
struct _CamelStreamMem *mem; /* for building the part */
- EDList parts;
+ CamelDList parts;
CamelIMAPPCommandPart *current;
CamelIMAPPCommandFunc complete;
@@ -100,7 +101,7 @@
CamelObject parent_object;
/* incoming requests */
- EMsgPort *port;
+ CamelMsgPort *port;
CamelIMAPPStream *stream;
@@ -116,9 +117,9 @@
char *select; /* *currently* selected folder */
char *last_select; /* last selected or to-be selected folder (e.g. outstanding queued select) */
CamelIMAPPCommand *literal;/* current literal op */
- EDList active; /* active queue */
- EDList queue; /* outstanding queue */
- EDList done; /* done queue, awaiting reclamation */
+ CamelDList active; /* active queue */
+ CamelDList queue; /* outstanding queue */
+ CamelDList done; /* done queue, awaiting reclamation */
/* keep track of running a select */
struct _CamelIMAPPSelectResponse *select_response;
Modified: trunk/camel/providers/imapp/camel-imapp-store.c
==============================================================================
--- trunk/camel/providers/imapp/camel-imapp-store.c (original)
+++ trunk/camel/providers/imapp/camel-imapp-store.c Wed Aug 6 16:57:37 2008
@@ -861,7 +861,7 @@
camel_folder_summary_add(((CamelFolder *)istore->selected)->summary, info);
camel_folder_change_info_add_uid(istore->selected->changes, finfo->uid);
if (pending) {
- e_dlist_remove((EDListNode *)pending);
+ camel_dlist_remove((CamelDListNode *)pending);
g_hash_table_remove(istore->pending_fetch_table, finfo->uid);
/*e_memchunk_free(istore->pending_fetch_chunks, pending);*/
}
@@ -881,7 +881,7 @@
camel_folder_change_info_add_uid(istore->selected->changes, finfo->uid);
if (pending) {
/* FIXME: use a dlist */
- e_dlist_remove((EDListNode *)pending);
+ camel_dlist_remove((CamelDListNode *)pending);
g_hash_table_remove(istore->pending_fetch_table, camel_message_info_uid(pending->info));
camel_message_info_free(pending->info);
/*e_memchunk_free(istore->pending_fetch_chunks, pending);*/
@@ -891,7 +891,7 @@
pending = e_memchunk_alloc(istore->pending_fetch_chunks);
pending->info = info;
g_hash_table_insert(istore->pending_fetch_table, (char *)camel_message_info_uid(info), pending);
- e_dlist_addtail(&istore->pending_fetch_list, (EDListNode *)pending);
+ camel_dlist_addtail(&istore->pending_fetch_list, (CamelDListNode *)pending);
}
} else {
if (pending == NULL)
@@ -979,7 +979,7 @@
fn = fn->next;
}
- printf("The pending list should now be empty: %s\n", e_dlist_empty(&istore->pending_fetch_list)?"TRUE":"FALSE");
+ printf("The pending list should now be empty: %s\n", camel_dlist_empty(&istore->pending_fetch_list)?"TRUE":"FALSE");
for (i=0;i<10;i++) {
info = camel_folder_summary_index(((CamelFolder *)istore->selected)->summary, i);
if (info) {
Modified: trunk/camel/providers/local/camel-maildir-store.c
==============================================================================
--- trunk/camel/providers/local/camel-maildir-store.c (original)
+++ trunk/camel/providers/local/camel-maildir-store.c Wed Aug 6 16:57:37 2008
@@ -33,6 +33,7 @@
#include <glib/gi18n-lib.h>
#include "camel-exception.h"
+#include "camel-list-utils.h"
#include "camel-private.h"
#include "camel-url.h"
@@ -402,7 +403,7 @@
static int
scan_dirs(CamelStore *store, guint32 flags, CamelFolderInfo *topfi, CamelURL *url, CamelException *ex)
{
- EDList queue = E_DLIST_INITIALISER(queue);
+ CamelDList queue = CAMEL_DLIST_INITIALISER(queue);
struct _scan_node *sn;
const char *root = ((CamelService *)store)->url->path;
char *tmp;
@@ -414,16 +415,16 @@
sn = g_malloc0(sizeof(*sn));
sn->fi = topfi;
- e_dlist_addtail(&queue, (EDListNode *)sn);
+ camel_dlist_addtail(&queue, (CamelDListNode *)sn);
g_hash_table_insert(visited, sn, sn);
- while (!e_dlist_empty(&queue)) {
+ while (!camel_dlist_empty(&queue)) {
char *name;
DIR *dir;
struct dirent *d;
CamelFolderInfo *last;
- sn = (struct _scan_node *)e_dlist_remhead(&queue);
+ sn = (struct _scan_node *)camel_dlist_remhead(&queue);
last = (CamelFolderInfo *)&sn->fi->child;
@@ -482,7 +483,7 @@
g_hash_table_insert(visited, snew, snew);
if (((flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) != 0))
- e_dlist_addtail(&queue, (EDListNode *)snew);
+ camel_dlist_addtail(&queue, (CamelDListNode *)snew);
}
}
g_free(tmp);
Modified: trunk/camel/providers/nntp/camel-nntp-private.h
==============================================================================
--- trunk/camel/providers/nntp/camel-nntp-private.h (original)
+++ trunk/camel/providers/nntp/camel-nntp-private.h Wed Aug 6 16:57:37 2008
@@ -30,8 +30,6 @@
#include <config.h>
#endif
-#include <libedataserver/e-msgport.h>
-
G_BEGIN_DECLS
struct _CamelNNTPStorePrivate {
Modified: trunk/camel/providers/pop3/camel-pop3-engine.c
==============================================================================
--- trunk/camel/providers/pop3/camel-pop3-engine.c (original)
+++ trunk/camel/providers/pop3/camel-pop3-engine.c Wed Aug 6 16:57:37 2008
@@ -60,9 +60,9 @@
static void
camel_pop3_engine_init(CamelPOP3Engine *pe, CamelPOP3EngineClass *peclass)
{
- e_dlist_init(&pe->active);
- e_dlist_init(&pe->queue);
- e_dlist_init(&pe->done);
+ camel_dlist_init(&pe->active);
+ camel_dlist_init(&pe->queue);
+ camel_dlist_init(&pe->done);
pe->state = CAMEL_POP3_ENGINE_DISCONNECT;
}
@@ -255,13 +255,13 @@
{
if (((pe->capa & CAMEL_POP3_CAP_PIPE) == 0 || (pe->sentlen + strlen(pc->data)) > CAMEL_POP3_SEND_LIMIT)
&& pe->current != NULL) {
- e_dlist_addtail(&pe->queue, (EDListNode *)pc);
+ camel_dlist_addtail(&pe->queue, (CamelDListNode *)pc);
return FALSE;
}
/* ??? */
if (camel_stream_write((CamelStream *)pe->stream, pc->data, strlen(pc->data)) == -1) {
- e_dlist_addtail(&pe->queue, (EDListNode *)pc);
+ camel_dlist_addtail(&pe->queue, (CamelDListNode *)pc);
return FALSE;
}
@@ -272,7 +272,7 @@
if (pe->current == NULL)
pe->current = pc;
else
- e_dlist_addtail(&pe->active, (EDListNode *)pc);
+ camel_dlist_addtail(&pe->active, (CamelDListNode *)pc);
return TRUE;
}
@@ -326,11 +326,11 @@
break;
}
- e_dlist_addtail(&pe->done, (EDListNode *)pc);
+ camel_dlist_addtail(&pe->done, (CamelDListNode *)pc);
pe->sentlen -= strlen(pc->data);
/* Set next command */
- pe->current = (CamelPOP3Command *)e_dlist_remhead(&pe->active);
+ pe->current = (CamelPOP3Command *)camel_dlist_remhead(&pe->active);
/* check the queue for sending any we can now send also */
pw = (CamelPOP3Command *)pe->queue.head;
@@ -344,7 +344,7 @@
if (camel_stream_write((CamelStream *)pe->stream, pw->data, strlen(pw->data)) == -1)
goto ioerror;
- e_dlist_remove((EDListNode *)pw);
+ camel_dlist_remove((CamelDListNode *)pw);
pe->sentlen += strlen(pw->data);
pw->state = CAMEL_POP3_COMMAND_DISPATCHED;
@@ -352,7 +352,7 @@
if (pe->current == NULL)
pe->current = pw;
else
- e_dlist_addtail(&pe->active, (EDListNode *)pw);
+ camel_dlist_addtail(&pe->active, (CamelDListNode *)pw);
pw = pn;
pn = pn->next;
@@ -366,19 +366,19 @@
return pe->current==NULL?0:1;
ioerror:
/* we assume all outstanding commands are gunna fail now */
- while ( (pw = (CamelPOP3Command*)e_dlist_remhead(&pe->active)) ) {
+ while ( (pw = (CamelPOP3Command*)camel_dlist_remhead(&pe->active)) ) {
pw->state = CAMEL_POP3_COMMAND_ERR;
- e_dlist_addtail(&pe->done, (EDListNode *)pw);
+ camel_dlist_addtail(&pe->done, (CamelDListNode *)pw);
}
- while ( (pw = (CamelPOP3Command*)e_dlist_remhead(&pe->queue)) ) {
+ while ( (pw = (CamelPOP3Command*)camel_dlist_remhead(&pe->queue)) ) {
pw->state = CAMEL_POP3_COMMAND_ERR;
- e_dlist_addtail(&pe->done, (EDListNode *)pw);
+ camel_dlist_addtail(&pe->done, (CamelDListNode *)pw);
}
if (pe->current) {
pe->current->state = CAMEL_POP3_COMMAND_ERR;
- e_dlist_addtail(&pe->done, (EDListNode *)pe->current);
+ camel_dlist_addtail(&pe->done, (CamelDListNode *)pe->current);
pe->current = NULL;
}
@@ -410,7 +410,7 @@
camel_pop3_engine_command_free(CamelPOP3Engine *pe, CamelPOP3Command *pc)
{
if (pe->current != pc)
- e_dlist_remove((EDListNode *)pc);
+ camel_dlist_remove((CamelDListNode *)pc);
g_free(pc->data);
g_free(pc);
}
Modified: trunk/camel/providers/pop3/camel-pop3-engine.h
==============================================================================
--- trunk/camel/providers/pop3/camel-pop3-engine.h (original)
+++ trunk/camel/providers/pop3/camel-pop3-engine.h Wed Aug 6 16:57:37 2008
@@ -22,7 +22,7 @@
#define _CAMEL_POP3_ENGINE_H
#include <camel/camel-object.h>
-#include <libedataserver/e-msgport.h>
+#include <camel/camel-list-utils.h>
#include "camel-pop3-stream.h"
#define CAMEL_POP3_ENGINE(obj) CAMEL_CHECK_CAST (obj, camel_pop3_engine_get_type (), CamelPOP3Engine)
@@ -110,9 +110,9 @@
unsigned int sentlen; /* data sent (so we dont overflow network buffer) */
- EDList active; /* active commands */
- EDList queue; /* queue of waiting commands */
- EDList done; /* list of done commands, awaiting free */
+ CamelDList active; /* active commands */
+ CamelDList queue; /* queue of waiting commands */
+ CamelDList done; /* list of done commands, awaiting free */
CamelPOP3Command *current; /* currently busy (downloading) response */
};
Modified: trunk/docs/reference/camel/tmpl/camel-folder-search.sgml
==============================================================================
--- trunk/docs/reference/camel/tmpl/camel-folder-search.sgml (original)
+++ trunk/docs/reference/camel/tmpl/camel-folder-search.sgml Wed Aug 6 16:57:37 2008
@@ -29,8 +29,6 @@
@folder:
@summary:
@summary_set:
- query:
- summary_hash:
@current:
@current_message:
@body_index:
Modified: trunk/docs/reference/camel/tmpl/camel-imap-folder.sgml
==============================================================================
--- trunk/docs/reference/camel/tmpl/camel-imap-folder.sgml (original)
+++ trunk/docs/reference/camel/tmpl/camel-imap-folder.sgml Wed Aug 6 16:57:37 2008
@@ -26,6 +26,7 @@
@priv:
@search:
@cache:
+ journal:
@need_rescan:
@need_refresh:
@read_only:
Modified: trunk/docs/reference/camel/tmpl/camel-imap-utils.sgml
==============================================================================
--- trunk/docs/reference/camel/tmpl/camel-imap-utils.sgml (original)
+++ trunk/docs/reference/camel/tmpl/camel-imap-utils.sgml Wed Aug 6 16:57:37 2008
@@ -149,8 +149,9 @@
</para>
- is:
- Returns:
+ body_p:
+ folder:
+ ci:
<!-- ##### FUNCTION imap_is_atom ##### -->
Modified: trunk/docs/reference/camel/tmpl/camel-provider.sgml
==============================================================================
--- trunk/docs/reference/camel/tmpl/camel-provider.sgml (original)
+++ trunk/docs/reference/camel/tmpl/camel-provider.sgml Wed Aug 6 16:57:37 2008
@@ -356,6 +356,7 @@
@CAMEL_PROVIDER_CONF_ENTRY:
@CAMEL_PROVIDER_CONF_LABEL:
@CAMEL_PROVIDER_CONF_HIDDEN:
+ CAMEL_PROVIDER_CONF_OPTIONS:
<!-- ##### STRUCT CamelProviderConfEntry ##### -->
<para>
Modified: trunk/docs/reference/camel/tmpl/camel-vee-folder.sgml
==============================================================================
--- trunk/docs/reference/camel/tmpl/camel-vee-folder.sgml (original)
+++ trunk/docs/reference/camel/tmpl/camel-vee-folder.sgml Wed Aug 6 16:57:37 2008
@@ -29,6 +29,7 @@
@changes:
@search:
@parent_vee_store:
+ hashes:
<!-- ##### MACRO CAMEL_UNMATCHED_NAME ##### -->
<para>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]