[evolution-data-server/camel-gobject: 331/331] Merge branch 'master' into camel-gobject.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/camel-gobject: 331/331] Merge branch 'master' into camel-gobject.
- Date: Thu, 1 Apr 2010 03:23:04 +0000 (UTC)
commit 3ad2bd12666912cd690aa600d46c290808f21470
Merge: c440b42 e264f47
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Mar 31 23:09:24 2010 -0400
Merge branch 'master' into camel-gobject.
Makefile.am | 4 +-
NEWS | 33 +
addressbook/backends/ldap/e-book-backend-ldap.c | 2 +
addressbook/libebook/Makefile.am | 2 +-
addressbook/libebook/e-address-western.c | 2 +-
addressbook/libebook/e-book-query.c | 30 +-
addressbook/libebook/e-book-view.c | 6 +-
addressbook/libebook/e-book.c | 99 +-
addressbook/libebook/e-contact.c | 62 +-
addressbook/libebook/e-contact.h | 5 +
addressbook/libebook/e-destination.c | 50 +-
addressbook/libebook/e-error.h | 7 +
addressbook/libebook/e-name-western.c | 2 +-
addressbook/libebook/e-vcard.c | 48 +-
addressbook/libebook/e-vcard.h | 21 +
addressbook/libedata-book/Makefile.am | 2 +-
addressbook/libedata-book/e-book-backend-cache.c | 18 +-
.../libedata-book/e-book-backend-db-cache.c | 26 +-
addressbook/libedata-book/e-book-backend-factory.c | 4 +-
addressbook/libedata-book/e-book-backend-sexp.c | 6 +-
addressbook/libedata-book/e-book-backend-summary.c | 16 +-
addressbook/libedata-book/e-book-backend-sync.c | 24 +-
addressbook/libedata-book/e-book-backend.c | 30 +-
addressbook/libedata-book/e-data-book-view.c | 12 +-
addressbook/libedata-book/e-data-book.h | 6 +
.../backends/google/e-cal-backend-google-utils.c | 2 +-
.../backends/groupwise/e-cal-backend-groupwise.c | 162 +-
calendar/backends/weather/Makefile.am | 3 +-
calendar/libecal/Makefile.am | 2 +-
calendar/libecal/e-cal-check-timezones.c | 48 +-
calendar/libecal/e-cal-component.c | 68 +-
calendar/libecal/e-cal-recur.c | 2 +-
calendar/libecal/e-cal-system-timezone.c | 293 ++
calendar/libecal/e-cal-time-util.c | 50 +-
calendar/libecal/e-cal-util.c | 38 +-
calendar/libecal/e-cal-util.h | 13 +
calendar/libecal/e-cal-view.c | 8 +-
calendar/libecal/e-cal.c | 118 +-
calendar/libedata-cal/Makefile.am | 2 +-
calendar/libedata-cal/e-cal-backend-cache.c | 39 +-
calendar/libedata-cal/e-cal-backend-factory.c | 6 +-
calendar/libedata-cal/e-cal-backend-file-store.c | 5 +
calendar/libedata-cal/e-cal-backend-file-store.h | 5 +
.../libedata-cal/e-cal-backend-loader-factory.h | 5 +
calendar/libedata-cal/e-cal-backend-sexp.c | 18 +-
calendar/libedata-cal/e-cal-backend-store.c | 100 +
calendar/libedata-cal/e-cal-backend-store.h | 5 +
calendar/libedata-cal/e-cal-backend-sync.c | 50 +-
calendar/libedata-cal/e-cal-backend-util.c | 24 +-
calendar/libedata-cal/e-cal-backend.c | 35 +-
calendar/libedata-cal/e-data-cal-view.c | 24 +-
calendar/libedata-cal/e-data-cal.c | 12 +
calendar/libedata-cal/e-data-cal.h | 6 +
calendar/tests/ecal/test-ecal-create-object--2.c | 12 +-
camel/Makefile.am | 11 +-
camel/camel-arg.h | 2 +-
camel/camel-block-file.c | 16 +-
camel/camel-cipher-context.c | 12 +-
camel/camel-data-cache.c | 22 +-
camel/camel-db.c | 276 ++-
camel/camel-db.h | 153 +-
camel/camel-debug.c | 13 +-
camel/camel-debug.h | 4 -
camel/camel-digest-folder.c | 391 --
camel/camel-digest-folder.h | 78 -
camel/camel-digest-store.c | 142 -
camel/camel-digest-store.h | 74 -
camel/camel-digest-summary.c | 58 -
camel/camel-digest-summary.h | 75 -
camel/camel-disco-store.c | 6 +-
camel/camel-file-utils.c | 47 +-
camel/camel-file-utils.h | 4 -
camel/camel-filter-driver.c | 2 +-
camel/camel-filter-driver.h | 9 -
camel/camel-folder-search.c | 10 +-
camel/camel-folder-summary.c | 156 +-
camel/camel-folder-summary.h | 27 +
camel/camel-folder-thread.c | 4 +-
camel/camel-folder.c | 50 +-
camel/camel-folder.h | 7 +
camel/camel-html-parser.c | 2 +-
camel/camel-i18n.h | 60 -
camel/camel-list-utils.c | 12 +-
camel/camel-lock.c | 8 +-
camel/camel-mempool.c | 220 ++
camel/camel-mempool.h | 71 +
camel/camel-mime-filter-progress.c | 2 +
camel/camel-mime-filter-progress.h | 5 +
camel/camel-mime-message.c | 2 +
camel/camel-mime-parser.c | 63 +-
camel/camel-mime-part-utils.c | 11 +-
camel/camel-mime-part.c | 4 +
camel/camel-mime-utils.c | 114 +-
camel/camel-mime-utils.h | 13 -
camel/camel-msgport.c | 47 +
camel/camel-msgport.h | 11 +
camel/camel-net-utils.c | 15 +
camel/camel-news-address.c | 36 -
camel/camel-news-address.h | 74 -
camel/camel-nntp-address.c | 6 +-
camel/camel-object.c | 282 +--
camel/camel-object.h | 27 +-
camel/camel-offline-store.c | 7 +
camel/camel-operation.c | 8 +-
camel/camel-private.h | 8 +-
camel/camel-process.c | 159 -
camel/camel-process.h | 46 -
camel/camel-provider.c | 4 +-
camel/camel-search-sql-sexp.c | 5 +
camel/camel-search-sql.c | 5 +-
camel/camel-seekable-stream.c | 2 +-
camel/camel-session.c | 19 +
camel/camel-store.c | 20 +-
camel/camel-store.h | 37 +-
camel/camel-stream-vfs.c | 4 +
camel/camel-stream-vfs.h | 17 +-
camel/camel-string-utils.c | 12 +-
camel/camel-tcp-stream-ssl.c | 8 +
camel/camel-tcp-stream.c | 4 +
camel/camel-text-index.c | 13 +-
camel/camel-trie.c | 10 +
camel/camel-uid-cache.c | 6 +-
camel/camel-utf8.c | 14 +-
camel/camel-vee-folder.c | 10 +
camel/camel-vee-store.h | 6 +
camel/camel-vee-summary.c | 30 +-
camel/camel.c | 5 +
camel/camel.h | 6 +-
camel/providers/groupwise/Makefile.am | 88 +-
camel/providers/groupwise/camel-groupwise-folder.c | 50 +-
.../providers/groupwise/camel-groupwise-provider.c | 7 +-
camel/providers/groupwise/camel-groupwise-store.c | 2 +-
.../providers/groupwise/camel-groupwise-summary.c | 2 +-
camel/providers/groupwise/camel-groupwise-utils.c | 6 +-
camel/providers/imap/camel-imap-command.c | 12 +-
camel/providers/imap/camel-imap-message-cache.c | 10 +-
camel/providers/imap/camel-imap-search.c | 2 +-
camel/providers/imap/camel-imap-store-summary.c | 4 +-
camel/providers/imap/camel-imap-summary.c | 2 +-
camel/providers/imap/camel-imap-utils.c | 18 +-
camel/providers/imapx/Makefile.am | 14 +-
camel/providers/imapx/camel-imapx-folder.c | 109 +-
camel/providers/imapx/camel-imapx-folder.h | 11 +-
camel/providers/imapx/camel-imapx-provider.c | 7 +-
camel/providers/imapx/camel-imapx-server.c | 1757 ++++++----
camel/providers/imapx/camel-imapx-server.h | 23 +-
camel/providers/imapx/camel-imapx-store-summary.c | 10 +-
camel/providers/imapx/camel-imapx-store-summary.h | 6 +-
camel/providers/imapx/camel-imapx-store.c | 597 +++-
camel/providers/imapx/camel-imapx-store.h | 8 +
camel/providers/imapx/camel-imapx-stream.c | 36 +-
camel/providers/imapx/camel-imapx-summary.c | 2 +-
camel/providers/imapx/camel-imapx-tokenise.h | 75 +-
camel/providers/imapx/camel-imapx-tokens.txt | 1 +
camel/providers/imapx/camel-imapx-utils.c | 82 +-
camel/providers/imapx/camel-imapx-utils.h | 2 +-
camel/providers/imapx/camel-imapx-view-summary.c | 2 +-
camel/providers/local/camel-local-summary.c | 2 +-
camel/providers/local/camel-maildir-summary.c | 16 +-
camel/providers/local/camel-mbox-summary.c | 2 +-
camel/providers/local/camel-mh-summary.c | 2 +-
camel/providers/nntp/camel-nntp-store-summary.c | 4 +-
camel/providers/nntp/camel-nntp-stream.c | 2 +-
camel/providers/pop3/camel-pop3-engine.c | 4 +-
camel/providers/pop3/camel-pop3-stream.c | 4 +-
camel/providers/smtp/camel-smtp-transport.c | 2 +
configure.ac | 37 +-
docs/reference/Makefile.am | 3 +-
docs/reference/addressbook/libebook/Makefile.am | 2 +
.../addressbook/libebook/libebook-docs.sgml | 35 +-
.../addressbook/libebook/libebook-sections.txt | 2 +-
.../addressbook/libedata-book/Makefile.am | 1 +
.../libedata-book/libedata-book-docs.sgml | 35 +-
docs/reference/calendar/libecal/Makefile.am | 2 +
docs/reference/calendar/libecal/libecal-docs.sgml | 35 +-
docs/reference/calendar/libedata-cal/Makefile.am | 2 +
.../calendar/libedata-cal/libedata-cal-docs.sgml | 38 +-
.../libedata-cal/libedata-cal-sections.txt | 10 +-
.../calendar/libedata-cal/tmpl/e-cal-backend.sgml | 44 +
.../libedata-cal/tmpl/e-data-cal-common.sgml | 194 -
.../calendar/libedata-cal/tmpl/e-data-cal.sgml | 37 +
docs/reference/camel/Makefile.am | 4 +-
docs/reference/camel/camel-docs.sgml | 381 +--
docs/reference/camel/camel-sections.txt | 187 +-
docs/reference/camel/camel.types | 3 -
docs/reference/camel/tmpl/camel-debug.sgml | 6 -
docs/reference/camel/tmpl/camel-digest-folder.sgml | 16 -
docs/reference/camel/tmpl/camel-digest-store.sgml | 15 -
.../reference/camel/tmpl/camel-digest-summary.sgml | 14 -
docs/reference/camel/tmpl/camel-file-utils.sgml | 10 -
docs/reference/camel/tmpl/camel-filter-driver.sgml | 30 -
docs/reference/camel/tmpl/camel-folder.sgml | 9 +
docs/reference/camel/tmpl/camel-mempool.sgml | 83 +
docs/reference/camel/tmpl/camel-mime-utils.sgml | 61 -
docs/reference/camel/tmpl/camel-multipart.sgml | 2 +
docs/reference/camel/tmpl/camel-news-address.sgml | 16 -
docs/reference/camel/tmpl/camel-object.sgml | 52 -
.../camel/tmpl/camel-partition-table.sgml | 2 +
docs/reference/camel/tmpl/camel-process.sgml | 23 -
docs/reference/camel/tmpl/camel-store.sgml | 9 +-
docs/reference/camel/tmpl/camel-unused.sgml | 939 +----
docs/reference/libebackend/Makefile.am | 2 +
docs/reference/libebackend/libebackend-docs.xml | 28 +-
docs/reference/libedataserver/Makefile.am | 2 +
.../libedataserver/libedataserver-docs.sgml | 39 +-
.../libedataserver/libedataserver-sections.txt | 112 -
.../libedataserver/tmpl/e-categories.sgml | 18 -
docs/reference/libedataserver/tmpl/e-memory.sgml | 194 -
.../libedataserver/tmpl/e-source-list.sgml | 10 -
docs/reference/libedataserver/tmpl/e-source.sgml | 27 -
docs/reference/libedataserver/tmpl/e-util.sgml | 10 -
docs/reference/libedataserverui/Makefile.am | 2 +
.../libedataserverui/libedataserverui-docs.sgml | 36 +-
.../libedataserverui/libedataserverui-sections.txt | 21 +-
.../libedataserverui/libedataserverui.types | 2 -
.../libedataserverui/tmpl/e-source-selector.sgml | 9 +
.../tmpl/libedataserverui-unused.sgml | 62 +
git.mk | 177 +-
libebackend/e-file-cache.c | 4 +-
libebackend/e-offline-listener.c | 17 +
libebackend/e-offline-listener.h | 12 +
libedataserver/Makefile.am | 14 +-
libedataserver/e-account-list.c | 6 +-
libedataserver/e-account.c | 10 +-
libedataserver/e-categories.c | 60 +-
libedataserver/e-categories.h | 6 -
libedataserver/e-data-server-util.c | 26 +-
libedataserver/e-data-server-util.h | 5 -
libedataserver/e-flag.c | 14 +
libedataserver/e-flag.h | 5 +
libedataserver/e-iconv.c | 616 ---
libedataserver/e-iconv.h | 50 -
libedataserver/e-memory.c | 898 +-----
libedataserver/e-memory.h | 43 +-
libedataserver/e-msgport.c | 1426 -------
libedataserver/e-msgport.h | 120 -
libedataserver/e-proxy.c | 20 +
libedataserver/e-proxy.h | 5 +
libedataserver/e-sexp.c | 8 +-
libedataserver/e-source-group.c | 23 +-
libedataserver/e-source-list.c | 37 +-
libedataserver/e-source-list.h | 4 -
libedataserver/e-source.c | 77 +-
libedataserver/e-source.h | 9 -
libedataserver/e-time-utils.c | 11 +-
libedataserver/e-trie.c | 377 --
libedataserver/e-trie.h | 47 -
libedataserver/e-uid.c | 2 +-
libedataserver/libedataserver-private.h | 6 +-
libedataserver/md5-utils.c | 354 --
libedataserver/md5-utils.h | 63 -
libedataserverui/Makefile.am | 2 -
libedataserverui/e-book-auth-util.c | 2 +-
libedataserverui/e-category-completion.c | 5 +
libedataserverui/e-category-completion.h | 5 +
libedataserverui/e-cell-renderer-color.c | 5 +
libedataserverui/e-cell-renderer-color.h | 5 +
libedataserverui/e-contact-store.c | 12 +-
libedataserverui/e-destination-store.c | 6 +-
libedataserverui/e-name-selector-dialog.c | 27 +-
libedataserverui/e-name-selector-entry.c | 9 +-
libedataserverui/e-name-selector-entry.h | 12 +
libedataserverui/e-name-selector-list.c | 26 +-
libedataserverui/e-name-selector-model.c | 12 +-
libedataserverui/e-name-selector.c | 10 +-
libedataserverui/e-passwords.c | 29 +-
libedataserverui/e-source-combo-box.c | 14 +
libedataserverui/e-source-combo-box.h | 5 +
libedataserverui/e-source-option-menu.c | 324 --
libedataserverui/e-source-option-menu.h | 65 -
libedataserverui/e-source-selector-dialog.c | 8 +-
libedataserverui/e-source-selector.c | 790 +++--
libedataserverui/e-source-selector.h | 95 +-
libedataserverui/e-tree-model-generator.c | 8 +-
po/bn.po | 1689 +++++-----
po/ca.po | 2460 +++++++------
po/da.po | 2356 +++++++------
po/el.po | 3911 ++++++++++----------
po/eu.po | 2056 +++++------
po/fr.po | 794 ++--
po/hu.po | 2041 +++++------
po/it.po | 2505 +++++++------
po/ko.po | 3295 +++++++++--------
po/lt.po | 2362 ++++++------
po/pa.po | 2501 +++++++------
po/pl.po | 2290 ++++++------
po/pt.po | 2281 ++++++------
po/sv.po | 801 +++--
po/uk.po | 1202 ++++---
servers/groupwise/soup-soap-message.c | 6 +-
servers/groupwise/soup-soap-response.c | 34 +-
win32/Makefile.am | 21 -
win32/README | 12 -
win32/dummy.la | 32 -
win32/libedataserverui.def | 115 -
295 files changed, 23061 insertions(+), 26498 deletions(-)
---
diff --cc camel/Makefile.am
index 09e73ae,37d067e..60f6402
--- a/camel/Makefile.am
+++ b/camel/Makefile.am
@@@ -246,8 -237,9 +239,7 @@@ libcamelinclude_HEADERS =
camel-data-wrapper.h \
camel-db.h \
camel-debug.h \
- camel-exception-list.def \
- camel-exception.h \
camel-file-utils.h \
- camel-i18n.h \
camel-iconv.h \
camel-index.h \
camel-internet-address.h \
diff --cc camel/camel-block-file.c
index 263f035,c64d1e4..cdc6b70
--- a/camel/camel-block-file.c
+++ b/camel/camel-block-file.c
@@@ -353,19 -360,13 +353,19 @@@ camel_cache_remove(c, key)
*
* @block_size is currently ignored and is set to CAMEL_BLOCK_SIZE.
*
- * Return value: The new block file, or NULL if it could not be created.
+ * Returns: The new block file, or NULL if it could not be created.
**/
-CamelBlockFile *camel_block_file_new(const gchar *path, gint flags, const gchar version[8], gsize block_size)
+CamelBlockFile *
+camel_block_file_new (const gchar *path,
+ gint flags,
+ const gchar version[8],
+ gsize block_size,
+ GError **error)
{
+ CamelBlockFileClass *class;
CamelBlockFile *bs;
- bs = (CamelBlockFile *)camel_object_new(camel_block_file_get_type());
+ bs = g_object_new (CAMEL_TYPE_BLOCK_FILE, NULL);
memcpy(bs->version, version, 8);
bs->path = g_strdup(path);
bs->flags = flags;
@@@ -468,11 -466,9 +468,11 @@@ camel_block_file_delete(CamelBlockFile
* Allocate a new block, return a pointer to it. Old blocks
* may be flushed to disk during this call.
*
- * Return value: The block, or NULL if an error occured.
+ * Returns: The block, or NULL if an error occured.
**/
-CamelBlock *camel_block_file_new_block(CamelBlockFile *bs)
+CamelBlock *
+camel_block_file_new_block (CamelBlockFile *bs,
+ GError **error)
{
CamelBlock *bl;
@@@ -540,13 -531,10 +540,13 @@@ camel_block_file_free_block (CamelBlock
*
* Retreive a block @id.
*
- * Return value: The block, or NULL if blockid is invalid or a file error
+ * Returns: The block, or NULL if blockid is invalid or a file error
* occured.
**/
-CamelBlock *camel_block_file_get_block(CamelBlockFile *bs, camel_block_t id)
+CamelBlock *
+camel_block_file_get_block (CamelBlockFile *bs,
+ camel_block_t id,
+ GError **error)
{
CamelBlock *bl, *flush, *prev;
diff --cc camel/camel-cipher-context.c
index 993c87c,5c75487..d5df0c2
--- a/camel/camel-cipher-context.c
+++ b/camel/camel-cipher-context.c
@@@ -88,17 -115,12 +88,17 @@@ cipher_sign (CamelCipherContext *ctx
* Converts the (unsigned) part @ipart into a new self-contained mime part @opart.
* This may be a multipart/signed part, or a simple part for enveloped types.
*
- * Return value: 0 for success or -1 for failure.
+ * Returns: 0 for success or -1 for failure.
**/
gint
-camel_cipher_sign (CamelCipherContext *context, const gchar *userid, CamelCipherHash hash,
- struct _CamelMimePart *ipart, struct _CamelMimePart *opart, CamelException *ex)
-{
+camel_cipher_sign (CamelCipherContext *context,
+ const gchar *userid,
+ CamelCipherHash hash,
+ CamelMimePart *ipart,
+ CamelMimePart *opart,
+ GError **error)
+{
+ CamelCipherContextClass *class;
gint retval;
g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
@@@ -199,17 -202,12 +199,17 @@@ cipher_encrypt (CamelCipherContext *con
* Encrypts (and optionally signs) the cleartext input stream and
* writes the resulting ciphertext to the output stream.
*
- * Return value: 0 for success or -1 for failure.
+ * Returns: 0 for success or -1 for failure.
**/
gint
-camel_cipher_encrypt (CamelCipherContext *context, const gchar *userid, GPtrArray *recipients,
- struct _CamelMimePart *ipart, struct _CamelMimePart *opart, CamelException *ex)
-{
+camel_cipher_encrypt (CamelCipherContext *context,
+ const gchar *userid,
+ GPtrArray *recipients,
+ CamelMimePart *ipart,
+ CamelMimePart *opart,
+ GError **error)
+{
+ CamelCipherContextClass *class;
gint retval;
g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
@@@ -253,15 -242,11 +253,15 @@@ cipher_decrypt (CamelCipherContext *con
*
* Decrypts @ipart into @opart.
*
- * Return value: A validity/encryption status.
+ * Returns: A validity/encryption status.
**/
CamelCipherValidity *
-camel_cipher_decrypt(CamelCipherContext *context, struct _CamelMimePart *ipart, struct _CamelMimePart *opart, CamelException *ex)
+camel_cipher_decrypt (CamelCipherContext *context,
+ CamelMimePart *ipart,
+ CamelMimePart *opart,
+ GError **error)
{
+ CamelCipherContextClass *class;
CamelCipherValidity *valid;
g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), NULL);
@@@ -814,15 -674,12 +816,15 @@@ cc_prepare_sign (CamelMimePart *part
*
* The transfer encoding paramaters for the part may be changed by this function.
*
- * Return value: -1 on error;
+ * Returns: -1 on error;
**/
gint
-camel_cipher_canonical_to_stream(CamelMimePart *part, guint32 flags, CamelStream *ostream)
+camel_cipher_canonical_to_stream (CamelMimePart *part,
+ guint32 flags,
+ CamelStream *ostream,
+ GError **error)
{
- CamelStreamFilter *filter;
+ CamelStream *filter;
CamelMimeFilter *canon;
gint res = -1;
diff --cc camel/camel-data-cache.c
index f036def,f133cab..c6e1c8d
--- a/camel/camel-data-cache.c
+++ b/camel/camel-data-cache.c
@@@ -271,12 -205,10 +269,10 @@@ data_cache_expire(CamelDataCache *cdc,
continue;
g_string_printf (s, "%s/%s", path, dname);
- dd(printf("Checking '%s' for expiry\n", s->str));
if (g_stat(s->str, &st) == 0
&& S_ISREG(st.st_mode)
- && ((cdc->expire_age != -1 && st.st_mtime + cdc->expire_age < now)
- || (cdc->expire_access != -1 && st.st_atime + cdc->expire_access < now))) {
+ && ((cdc->priv->expire_age != -1 && st.st_mtime + cdc->priv->expire_age < now)
+ || (cdc->priv->expire_access != -1 && st.st_atime + cdc->priv->expire_access < now))) {
- dd(printf("Has expired! Removing!\n"));
g_unlink(s->str);
stream = camel_object_bag_get(cdc->priv->busy_bag, s->str);
if (stream) {
@@@ -311,11 -243,9 +307,9 @@@ data_cache_path(CamelDataCache *cdc, gi
#endif
if (create)
g_mkdir_with_parents (dir, 0700);
- } else if (cdc->expire_age != -1 || cdc->expire_access != -1) {
+ } else if (cdc->priv->expire_age != -1 || cdc->priv->expire_access != -1) {
time_t now;
- dd(printf("Checking expire cycle time on dir '%s'\n", dir));
-
/* This has a race, but at worst we re-run an expire cycle which is safe */
now = time(NULL);
if (cdc->priv->expire_last[hash] + CAMEL_DATA_CACHE_CYCLE_TIME < now) {
@@@ -395,13 -321,10 +389,13 @@@ camel_data_cache_add (CamelDataCache *c
* multiple callers, so ensure the stream is in a valid state
* through external locking.
*
- * Return value: A cache item, or NULL if the cache item does not exist.
+ * Returns: A cache item, or NULL if the cache item does not exist.
**/
CamelStream *
-camel_data_cache_get(CamelDataCache *cdc, const gchar *path, const gchar *key, CamelException *ex)
+camel_data_cache_get (CamelDataCache *cdc,
+ const gchar *path,
+ const gchar *key,
+ GError **error)
{
gchar *real;
CamelStream *stream;
@@@ -430,13 -352,12 +424,15 @@@
*
* Lookup the filename for an item in the cache
*
- * Return value: The filename for a cache item
+ * Returns: The filename for a cache item
+ *
+ * Since: 2.26
**/
gchar *
-camel_data_cache_get_filename (CamelDataCache *cdc, const gchar *path, const gchar *key, CamelException *ex)
+camel_data_cache_get_filename (CamelDataCache *cdc,
+ const gchar *path,
+ const gchar *key,
+ GError **error)
{
gchar *real;
@@@ -454,13 -375,10 +450,13 @@@
*
* Remove/expire a cache item.
*
- * Return value:
+ * Returns:
**/
gint
-camel_data_cache_remove(CamelDataCache *cdc, const gchar *path, const gchar *key, CamelException *ex)
+camel_data_cache_remove (CamelDataCache *cdc,
+ const gchar *path,
+ const gchar *key,
+ GError **error)
{
CamelStream *stream;
gchar *real;
@@@ -502,13 -418,10 +498,13 @@@
*
* CURRENTLY UNIMPLEMENTED
*
- * Return value: -1 on error.
+ * Returns: -1 on error.
**/
-gint camel_data_cache_rename(CamelDataCache *cache,
- const gchar *old, const gchar *new, CamelException *ex)
+gint
+camel_data_cache_rename (CamelDataCache *cache,
+ const gchar *old,
+ const gchar *new,
+ GError **error)
{
/* blah dont care yet */
return -1;
@@@ -524,12 -437,10 +520,12 @@@
*
* CURRENTLY_UNIMPLEMENTED
*
- * Return value: -1 on error.
+ * Returns: -1 on error.
**/
gint
-camel_data_cache_clear(CamelDataCache *cache, const gchar *path, CamelException *ex)
+camel_data_cache_clear (CamelDataCache *cache,
+ const gchar *path,
+ GError **error)
{
/* nor for this? */
return -1;
diff --cc camel/camel-db.c
index 22a6dac,fd7674e..5862ce6
--- a/camel/camel-db.c
+++ b/camel/camel-db.c
@@@ -393,9 -392,13 +393,14 @@@ cdb_sql_exec (sqlite3 *db
return 0;
}
+ /**
+ * camel_db_open:
+ *
+ * Since: 2.24
+ **/
CamelDB *
-camel_db_open (const gchar *path, CamelException *ex)
+camel_db_open (const gchar *path,
+ GError **error)
{
static GOnce vfs_once = G_ONCE_INIT;
CamelDB *cdb;
@@@ -458,13 -454,22 +463,23 @@@
return cdb;
}
+ /**
+ * camel_db_clone:
+ *
+ * Since: 2.26
+ **/
CamelDB *
-camel_db_clone (CamelDB *cdb, CamelException *ex)
+camel_db_clone (CamelDB *cdb,
+ GError **error)
{
- return camel_db_open(cdb->priv->file_name, ex);
+ return camel_db_open (cdb->priv->file_name, error);
}
+ /**
+ * camel_db_close:
+ *
+ * Since: 2.24
+ **/
void
camel_db_close (CamelDB *cdb)
{
@@@ -493,11 -503,13 +513,15 @@@ camel_db_set_collate (CamelDB *cdb, con
return ret;
}
- /* Should this be really exposed ? */
+ /**
+ * camel_db_command:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_command (CamelDB *cdb, const gchar *stmt, CamelException *ex)
+camel_db_command (CamelDB *cdb,
+ const gchar *stmt,
+ GError **error)
{
gint ret;
@@@ -513,9 -527,13 +537,14 @@@
return ret;
}
+ /**
+ * camel_db_begin_transaction:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_begin_transaction (CamelDB *cdb, CamelException *ex)
+camel_db_begin_transaction (CamelDB *cdb,
+ GError **error)
{
if (!cdb)
return -1;
@@@ -525,12 -543,16 +554,17 @@@
g_mutex_lock (cdb->lock);
STARTTS("BEGIN");
- return (cdb_sql_exec (cdb->db, "BEGIN", ex));
+ return (cdb_sql_exec (cdb->db, "BEGIN", error));
}
+ /**
+ * camel_db_end_transaction:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_end_transaction (CamelDB *cdb, CamelException *ex)
+camel_db_end_transaction (CamelDB *cdb,
+ GError **error)
{
gint ret;
if (!cdb)
@@@ -547,9 -569,13 +581,14 @@@
return ret;
}
+ /**
+ * camel_db_abort_transaction:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_abort_transaction (CamelDB *cdb, CamelException *ex)
+camel_db_abort_transaction (CamelDB *cdb,
+ GError **error)
{
gint ret;
@@@ -562,21 -588,27 +601,31 @@@
return ret;
}
+ /**
+ * camel_db_add_to_transaction:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_add_to_transaction (CamelDB *cdb, const gchar *stmt, CamelException *ex)
+camel_db_add_to_transaction (CamelDB *cdb,
+ const gchar *stmt,
+ GError **error)
{
if (!cdb)
return -1;
- return (cdb_sql_exec (cdb->db, stmt, ex));
+ return (cdb_sql_exec (cdb->db, stmt, error));
}
+ /**
+ * camel_db_transaction_command:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_transaction_command (CamelDB *cdb, GSList *qry_list, CamelException *ex)
+camel_db_transaction_command (CamelDB *cdb,
+ GSList *qry_list,
+ GError **error)
{
gint ret;
const gchar *query;
@@@ -619,11 -651,13 +668,16 @@@ count_cb (gpointer data, gint argc, gch
return 0;
}
+ /**
+ * camel_db_count_message_info:
+ *
+ * Since: 2.26
+ **/
gint
-camel_db_count_message_info (CamelDB *cdb, const gchar *query, guint32 *count, CamelException *ex)
+camel_db_count_message_info (CamelDB *cdb,
+ const gchar *query,
+ guint32 *count,
+ GError **error)
{
gint ret = -1;
gchar *errmsg = NULL;
@@@ -664,11 -697,13 +718,16 @@@
return ret;
}
+ /**
+ * camel_db_count_junk_message_info:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_count_junk_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, CamelException *ex)
+camel_db_count_junk_message_info (CamelDB *cdb,
+ const gchar *table_name,
+ guint32 *count,
+ GError **error)
{
gint ret;
gchar *query;
@@@ -684,11 -719,13 +743,16 @@@
return ret;
}
+ /**
+ * camel_db_count_unread_message_info:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_count_unread_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, CamelException *ex)
+camel_db_count_unread_message_info (CamelDB *cdb,
+ const gchar *table_name,
+ guint32 *count,
+ GError **error)
{
gint ret;
gchar *query;
@@@ -704,11 -741,13 +768,16 @@@
return ret;
}
+ /**
+ * camel_db_count_visible_unread_message_info:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_count_visible_unread_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, CamelException *ex)
+camel_db_count_visible_unread_message_info (CamelDB *cdb,
+ const gchar *table_name,
+ guint32 *count,
+ GError **error)
{
gint ret;
gchar *query;
@@@ -724,11 -763,13 +793,16 @@@
return ret;
}
+ /**
+ * camel_db_count_visible_message_info:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_count_visible_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, CamelException *ex)
+camel_db_count_visible_message_info (CamelDB *cdb,
+ const gchar *table_name,
+ guint32 *count,
+ GError **error)
{
gint ret;
gchar *query;
@@@ -744,11 -785,13 +818,16 @@@
return ret;
}
+ /**
+ * camel_db_count_junk_not-deleted_message_info:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_count_junk_not_deleted_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, CamelException *ex)
+camel_db_count_junk_not_deleted_message_info (CamelDB *cdb,
+ const gchar *table_name,
+ guint32 *count,
+ GError **error)
{
gint ret;
gchar *query;
@@@ -764,11 -807,13 +843,16 @@@
return ret;
}
+ /**
+ * camel_db_count_deleted_message_info:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_count_deleted_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, CamelException *ex)
+camel_db_count_deleted_message_info (CamelDB *cdb,
+ const gchar *table_name,
+ guint32 *count,
+ GError **error)
{
gint ret;
gchar *query;
@@@ -784,11 -829,13 +868,16 @@@
return ret;
}
+ /**
+ * camel_db_count_total_message_info:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_count_total_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, CamelException *ex)
+camel_db_count_total_message_info (CamelDB *cdb,
+ const gchar *table_name,
+ guint32 *count,
+ GError **error)
{
gint ret;
@@@ -805,12 -852,13 +894,17 @@@
return ret;
}
+ /**
+ * camel_db_select:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_select (CamelDB *cdb, const gchar * stmt, CamelDBSelectCB callback, gpointer data, CamelException *ex)
+camel_db_select (CamelDB *cdb,
+ const gchar *stmt,
+ CamelDBSelectCB callback,
+ gpointer data,
+ GError **error)
{
gchar *errmsg = NULL;
/*int nrecs = 0;*/
@@@ -855,10 -902,13 +949,15 @@@
return ret;
}
+ /**
+ * camel_db_create_vfolder:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_create_vfolder (CamelDB *db, const gchar *folder_name, CamelException *ex)
+camel_db_create_vfolder (CamelDB *db,
+ const gchar *folder_name,
+ GError **error)
{
gint ret;
gchar *table_creation_query, *safe_index;
@@@ -880,10 -930,13 +979,15 @@@
return ret;
}
+ /**
+ * camel_db_recreate_vfolder:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_recreate_vfolder (CamelDB *db, const gchar *folder_name, CamelException *ex)
+camel_db_recreate_vfolder (CamelDB *db,
+ const gchar *folder_name,
+ GError **error)
{
gint ret;
gchar *table_query;
@@@ -894,14 -947,16 +998,19 @@@
sqlite3_free (table_query);
- return camel_db_create_vfolder (db, folder_name, ex);
+ return camel_db_create_vfolder (db, folder_name, error);
}
+ /**
+ * camel_db_delete_uid_from_vfolder:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_delete_uid_from_vfolder (CamelDB *db, gchar *folder_name, gchar *vuid, CamelException *ex)
+camel_db_delete_uid_from_vfolder (CamelDB *db,
+ gchar *folder_name,
+ gchar *vuid,
+ GError **error)
{
gchar *del_query;
gint ret;
@@@ -915,11 -970,13 +1024,16 @@@
return ret;
}
+ /**
+ * camel_db_delete_uid_from_vfolder_transaction:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_delete_uid_from_vfolder_transaction (CamelDB *db, const gchar *folder_name, const gchar *vuid, CamelException *ex)
+camel_db_delete_uid_from_vfolder_transaction (CamelDB *db,
+ const gchar *folder_name,
+ const gchar *vuid,
+ GError **error)
{
gchar *del_query;
gint ret;
@@@ -953,14 -1010,13 +1067,19 @@@ read_uids_flags_callback (gpointer ref
return 0;
}
+ /**
+ * camel_db_get_folder_uids_flags:
+ *
+ * Since: 2.26
+ **/
gint
-camel_db_get_folder_uids_flags (CamelDB *db, const gchar *folder_name, const gchar *sort_by, const gchar *collate, GPtrArray *summary, GHashTable *table, CamelException *ex)
+camel_db_get_folder_uids_flags (CamelDB *db,
+ const gchar *folder_name,
+ const gchar *sort_by,
+ const gchar *collate,
+ GPtrArray *summary,
+ GHashTable *table,
+ GError **error)
{
GPtrArray *uids = summary;
GPtrArray *flags = g_ptr_array_new ();
@@@ -1003,13 -1059,13 +1122,18 @@@ read_uids_callback (gpointer ref, gint
return 0;
}
+ /**
+ * camel_db_get_folder_uids:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_get_folder_uids (CamelDB *db, const gchar *folder_name, const gchar *sort_by, const gchar *collate, GPtrArray *array, CamelException *ex)
+camel_db_get_folder_uids (CamelDB *db,
+ const gchar *folder_name,
+ const gchar *sort_by,
+ const gchar *collate,
+ GPtrArray *array,
+ GError **error)
{
gchar *sel_query;
gint ret;
@@@ -1022,10 -1078,13 +1146,15 @@@
return ret;
}
+ /**
+ * camel_db_get_folder_junk_uids:
+ *
+ * Since: 2.24
+ **/
GPtrArray *
-camel_db_get_folder_junk_uids (CamelDB *db, gchar *folder_name, CamelException *ex)
+camel_db_get_folder_junk_uids (CamelDB *db,
+ gchar *folder_name,
+ GError **error)
{
gchar *sel_query;
gint ret;
@@@ -1044,10 -1103,13 +1173,15 @@@
return array;
}
+ /**
+ * camel_db_get_folder_deleted_uids:
+ *
+ * Since: 2.24
+ **/
GPtrArray *
-camel_db_get_folder_deleted_uids (CamelDB *db, gchar *folder_name, CamelException *ex)
+camel_db_get_folder_deleted_uids (CamelDB *db,
+ gchar *folder_name,
+ GError **error)
{
gchar *sel_query;
gint ret;
@@@ -1086,10 -1148,13 +1220,15 @@@ read_preview_callback (gpointer ref, gi
return 0;
}
+ /**
+ * camel_db_get_folder_preview:
+ *
+ * Since: 2.28
+ **/
GHashTable *
-camel_db_get_folder_preview (CamelDB *db, gchar *folder_name, CamelException *ex)
+camel_db_get_folder_preview (CamelDB *db,
+ gchar *folder_name,
+ GError **error)
{
gchar *sel_query;
gint ret;
@@@ -1108,12 -1173,13 +1247,17 @@@
return hash;
}
+ /**
+ * camel_db_write_preview_record:
+ *
+ * Since: 2.28
+ **/
gint
-camel_db_write_preview_record (CamelDB *db, gchar *folder_name, const gchar *uid, const gchar *msg, CamelException *ex)
+camel_db_write_preview_record (CamelDB *db,
+ gchar *folder_name,
+ const gchar *uid,
+ const gchar *msg,
+ GError **error)
{
gchar *query;
gint ret;
@@@ -1145,11 -1211,13 +1289,16 @@@ read_vuids_callback (gpointer ref, gin
return 0;
}
+ /**
+ * camel_db_get_vuids_from_vfolder:
+ *
+ * Since: 2.24
+ **/
GPtrArray *
-camel_db_get_vuids_from_vfolder (CamelDB *db, gchar *folder_name, gchar *filter, CamelException *ex)
+camel_db_get_vuids_from_vfolder (CamelDB *db,
+ gchar *folder_name,
+ gchar *filter,
+ GError **error)
{
gchar *sel_query;
gchar *cond = NULL;
@@@ -1177,11 -1245,13 +1326,16 @@@
return array;
}
+ /**
+ * camel_db_add_to_vfolder:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_add_to_vfolder (CamelDB *db, gchar *folder_name, gchar *vuid, CamelException *ex)
+camel_db_add_to_vfolder (CamelDB *db,
+ gchar *folder_name,
+ gchar *vuid,
+ GError **error)
{
gchar *ins_query;
gint ret;
@@@ -1195,11 -1265,13 +1349,16 @@@
return ret;
}
+ /**
+ * camel_db_add_to_vfolder_transaction:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_add_to_vfolder_transaction (CamelDB *db, const gchar *folder_name, const gchar *vuid, CamelException *ex)
+camel_db_add_to_vfolder_transaction (CamelDB *db,
+ gchar *folder_name,
+ gchar *vuid,
+ GError **error)
{
gchar *ins_query;
gint ret;
@@@ -1213,9 -1285,13 +1372,14 @@@
return ret;
}
+ /**
+ * camel_db_create_folders_table:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_create_folders_table (CamelDB *cdb, CamelException *ex)
+camel_db_create_folders_table (CamelDB *cdb,
+ GError **error)
{
const gchar *query = "CREATE TABLE IF NOT EXISTS folders ( folder_name TEXT PRIMARY KEY, version REAL, flags INTEGER, nextuid INTEGER, time NUMERIC, saved_count INTEGER, unread_count INTEGER, deleted_count INTEGER, junk_count INTEGER, visible_count INTEGER, jnd_count INTEGER, bdata TEXT )";
CAMEL_DB_RELEASE_SQLITE_MEMORY;
@@@ -1352,11 -1420,13 +1516,16 @@@ camel_db_migrate_folder_recreate (Camel
return ret;
}
+ /**
+ * camel_db_reset_folder_version:
+ *
+ * Since: 2.28
+ **/
gint
-camel_db_reset_folder_version (CamelDB *cdb, const gchar *folder_name, gint reset_version, CamelException *ex)
+camel_db_reset_folder_version (CamelDB *cdb,
+ const gchar *folder_name,
+ gint reset_version,
+ GError **error)
{
gint ret = 0;
gchar *version_creation_query;
@@@ -1430,10 -1495,13 +1599,15 @@@ camel_db_get_folder_version (CamelDB *c
return version;
}
+ /**
+ * camel_db_prepare_message_info_table:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_prepare_message_info_table (CamelDB *cdb, const gchar *folder_name, CamelException *ex)
+camel_db_prepare_message_info_table (CamelDB *cdb,
+ const gchar *folder_name,
+ GError **error)
{
gint ret, current_version;
@@@ -1512,28 -1598,13 +1686,43 @@@ write_mir (CamelDB *cdb
return ret;
}
+ /**
++ * camel_db_write_fresh_message_info_record:
++ *
++ * Since: 2.26
++ **/
+gint
+camel_db_write_fresh_message_info_record (CamelDB *cdb,
+ const gchar *folder_name,
+ CamelMIRecord *record,
+ GError **error)
+{
+ return write_mir (cdb, folder_name, record, error, FALSE);
+}
+
++/**
++ * camel_db_write_message_info_record:
++ *
++ * Since: 2.24
++ **/
+gint
+camel_db_write_message_info_record (CamelDB *cdb,
+ const gchar *folder_name,
+ CamelMIRecord *record,
+ GError **error)
+{
+ return write_mir (cdb, folder_name, record, error, TRUE);
+}
+
++/**
+ * camel_db_write_folder_info_record:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_write_folder_info_record (CamelDB *cdb, CamelFIRecord *record, CamelException *ex)
+camel_db_write_folder_info_record (CamelDB *cdb,
+ CamelFIRecord *record,
+ GError **error)
{
gint ret;
@@@ -1620,11 -1691,13 +1809,16 @@@ read_fir_callback (gpointer ref, gint
return 0;
}
+ /**
+ * camel_db_read_folder_info_record:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_read_folder_info_record (CamelDB *cdb, const gchar *folder_name, CamelFIRecord **record, CamelException *ex)
+camel_db_read_folder_info_record (CamelDB *cdb,
+ const gchar *folder_name,
+ CamelFIRecord **record,
+ GError **error)
{
gchar *query;
gint ret;
@@@ -1636,13 -1709,13 +1830,18 @@@
return (ret);
}
+ /**
+ * camel_db_read_message_info_record_with_uid:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_read_message_info_record_with_uid (CamelDB *cdb, const gchar *folder_name, const gchar *uid, gpointer p, CamelDBSelectCB read_mir_callback, CamelException *ex)
+camel_db_read_message_info_record_with_uid (CamelDB *cdb,
+ const gchar *folder_name,
+ const gchar *uid,
+ gpointer p,
+ CamelDBSelectCB read_mir_callback,
+ GError **error)
{
gchar *query;
gint ret;
@@@ -1654,12 -1727,13 +1853,17 @@@
return (ret);
}
+ /**
+ * camel_db_read_message_info_records:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_read_message_info_records (CamelDB *cdb, const gchar *folder_name, gpointer p, CamelDBSelectCB read_mir_callback, CamelException *ex)
+camel_db_read_message_info_records (CamelDB *cdb,
+ const gchar *folder_name,
+ gpointer p,
+ CamelDBSelectCB read_mir_callback,
+ GError **error)
{
gchar *query;
gint ret;
@@@ -1671,9 -1745,13 +1875,14 @@@
return (ret);
}
+ /**
+ * camel_db_create_deleted_table:
+ *
+ * Since: 2.24
+ **/
static gint
-camel_db_create_deleted_table (CamelDB *cdb, CamelException *ex)
+camel_db_create_deleted_table (CamelDB *cdb,
+ GError **error)
{
gint ret;
gchar *table_creation_query;
@@@ -1696,11 -1773,13 +1905,16 @@@ camel_db_trim_deleted_table (CamelDB *c
return ret;
}
+ /**
+ * camel_db_delete_uid:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_delete_uid (CamelDB *cdb, const gchar *folder, const gchar *uid, CamelException *ex)
+camel_db_delete_uid (CamelDB *cdb,
+ const gchar *folder,
+ const gchar *uid,
+ GError **error)
{
gchar *tab;
gint ret;
@@@ -1805,32 -1879,38 +2019,47 @@@ cdb_delete_ids (CamelDB *cdb
return ret;
}
+ /**
+ * camel_db_delete_uids:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_delete_uids (CamelDB *cdb, const gchar * folder_name, GSList *uids, CamelException *ex)
+camel_db_delete_uids (CamelDB *cdb,
+ const gchar *folder_name,
+ GSList *uids,
+ GError **error)
{
if (!uids || !uids->data)
return 0;
- return cdb_delete_ids (cdb, folder_name, uids, "", "uid", ex);
+ return cdb_delete_ids (cdb, folder_name, uids, "", "uid", error);
}
+ /**
+ * camel_db_delete_vuids:
+ *
+ * Since: 2.26
+ **/
gint
-camel_db_delete_vuids (CamelDB *cdb, const gchar * folder_name, const gchar *hash, GSList *uids, CamelException *ex)
+camel_db_delete_vuids (CamelDB *cdb,
+ const gchar *folder_name,
+ const gchar *hash,
+ GSList *uids,
+ GError **error)
{
- return cdb_delete_ids (cdb, folder_name, uids, hash, "vuid", ex);
+ return cdb_delete_ids (cdb, folder_name, uids, hash, "vuid", error);
}
+ /**
+ * camel_db_clear_folder_summary:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_clear_folder_summary (CamelDB *cdb, gchar *folder, CamelException *ex)
+camel_db_clear_folder_summary (CamelDB *cdb,
+ gchar *folder,
+ GError **error)
{
gint ret;
@@@ -1866,10 -1946,13 +2095,15 @@@
return ret;
}
+ /**
+ * camel_db_delete_folder:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_delete_folder (CamelDB *cdb, const gchar *folder, CamelException *ex)
+camel_db_delete_folder (CamelDB *cdb,
+ const gchar *folder,
+ GError **error)
{
gint ret;
gchar *del;
@@@ -1903,11 -1986,13 +2137,16 @@@
return ret;
}
+ /**
+ * camel_db_rename_folder:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_rename_folder (CamelDB *cdb, const gchar *old_folder, const gchar *new_folder, CamelException *ex)
+camel_db_rename_folder (CamelDB *cdb,
+ const gchar *old_folder,
+ const gchar *new_folder,
+ GError **error)
{
gint ret;
gchar *cmd, *tab;
@@@ -2029,10 -2134,13 +2288,15 @@@ camel_db_get_column_name (const gchar *
}
+ /**
+ * camel_db_migrate_vfolders_to_14:
+ *
+ * Since: 2.24
+ **/
gint
-camel_db_migrate_vfolders_to_14 (CamelDB *cdb, const gchar *folder, CamelException *ex)
+camel_db_migrate_vfolders_to_14 (CamelDB *cdb,
+ const gchar *folder,
+ GError **error)
{
gchar *cmd = sqlite3_mprintf ("ALTER TABLE %Q ADD COLUMN flags INTEGER", folder);
gint ret;
@@@ -2044,9 -2152,13 +2308,14 @@@
return ret;
}
+ /**
+ * camel_db_start_in_memory_transactions:
+ *
+ * Since: 2.26
+ **/
gint
-camel_db_start_in_memory_transactions (CamelDB *cdb, CamelException *ex)
+camel_db_start_in_memory_transactions (CamelDB *cdb,
+ GError **error)
{
gint ret;
gchar *cmd = sqlite3_mprintf ("ATTACH DATABASE ':memory:' AS %s", CAMEL_DB_IN_MEMORY_DB);
@@@ -2063,10 -2175,13 +2332,15 @@@
return ret;
}
+ /**
+ * camel_db_flush_in_memory_transactions:
+ *
+ * Since: 2.26
+ **/
gint
-camel_db_flush_in_memory_transactions (CamelDB *cdb, const gchar * folder_name, CamelException *ex)
+camel_db_flush_in_memory_transactions (CamelDB *cdb,
+ const gchar *folder_name,
+ GError **error)
{
gint ret;
gchar *cmd = sqlite3_mprintf ("INSERT INTO %Q SELECT * FROM %Q", folder_name, CAMEL_DB_IN_MEMORY_TABLE);
diff --cc camel/camel-db.h
index 1ca50b3,27a59f8..8f8d28c
--- a/camel/camel-db.h
+++ b/camel/camel-db.h
@@@ -13,14 -13,44 +18,42 @@@
#define CAMEL_DB_FILE "folders.db"
/* Hopefully no one will create a folder named EVO_IN_meM_hAnDlE */
+
+ /**
+ * CAMEL_DB_IN_MEMORY_TABLE:
+ *
+ * Since: 2.26
+ **/
#define CAMEL_DB_IN_MEMORY_TABLE "EVO_IN_meM_hAnDlE.temp"
+
+ /**
+ * CAMEL_DB_IN_MEMORY_DB:
+ *
+ * Since: 2.26
+ **/
#define CAMEL_DB_IN_MEMORY_DB "EVO_IN_meM_hAnDlE"
+
+ /**
+ * CAMEL_DB_IN_MEMORY_TABLE_LIMIT:
+ *
+ * Since: 2.26
+ **/
#define CAMEL_DB_IN_MEMORY_TABLE_LIMIT 100000
-#include "camel-exception.h"
-
typedef struct _CamelDBPrivate CamelDBPrivate;
+ /**
+ * CamelDBCollate:
+ *
+ * Since: 2.24
+ **/
typedef gint(*CamelDBCollate)(gpointer ,int,gconstpointer ,int,gconstpointer );
+ /**
+ * CamelDB:
+ *
+ * Since: 2.24
+ **/
struct _CamelDB {
sqlite3 *db;
GMutex *lock;
@@@ -106,66 -194,72 +197,72 @@@ typedef struct _CamelFIRecord
} CamelFIRecord;
typedef struct _CamelDB CamelDB;
+
+ /**
+ * CamelDBSelectCB:
+ *
+ * Since: 2.24
+ **/
typedef gint (*CamelDBSelectCB) (gpointer data, gint ncol, gchar **colvalues, gchar **colnames);
-CamelDB * camel_db_open (const gchar *path, CamelException *ex);
-CamelDB * camel_db_clone (CamelDB *cdb, CamelException *ex);
+CamelDB * camel_db_open (const gchar *path, GError **error);
+CamelDB * camel_db_clone (CamelDB *cdb, GError **error);
void camel_db_close (CamelDB *cdb);
-gint camel_db_command (CamelDB *cdb, const gchar *stmt, CamelException *ex);
+gint camel_db_command (CamelDB *cdb, const gchar *stmt, GError **error);
-gint camel_db_transaction_command (CamelDB *cdb, GSList *qry_list, CamelException *ex);
+gint camel_db_transaction_command (CamelDB *cdb, GSList *qry_list, GError **error);
-gint camel_db_begin_transaction (CamelDB *cdb, CamelException *ex);
-gint camel_db_add_to_transaction (CamelDB *cdb, const gchar *query, CamelException *ex);
-gint camel_db_end_transaction (CamelDB *cdb, CamelException *ex);
-gint camel_db_abort_transaction (CamelDB *cdb, CamelException *ex);
-gint camel_db_clear_folder_summary (CamelDB *cdb, gchar *folder, CamelException *ex);
-gint camel_db_rename_folder (CamelDB *cdb, const gchar *old_folder, const gchar *new_folder, CamelException *ex);
+gint camel_db_begin_transaction (CamelDB *cdb, GError **error);
+gint camel_db_add_to_transaction (CamelDB *cdb, const gchar *query, GError **error);
+gint camel_db_end_transaction (CamelDB *cdb, GError **error);
+gint camel_db_abort_transaction (CamelDB *cdb, GError **error);
+gint camel_db_clear_folder_summary (CamelDB *cdb, gchar *folder, GError **error);
+gint camel_db_rename_folder (CamelDB *cdb, const gchar *old_folder, const gchar *new_folder, GError **error);
-gint camel_db_delete_folder (CamelDB *cdb, const gchar *folder, CamelException *ex);
-gint camel_db_delete_uid (CamelDB *cdb, const gchar *folder, const gchar *uid, CamelException *ex);
-/*int camel_db_delete_uids (CamelDB *cdb, CamelException *ex, gint nargs, ... );*/
-gint camel_db_delete_uids (CamelDB *cdb, const gchar * folder_name, GSList *uids, CamelException *ex);
-gint camel_db_delete_vuids (CamelDB *cdb, const gchar * folder_name, const gchar *shash, GSList *uids, CamelException *ex);
+gint camel_db_delete_folder (CamelDB *cdb, const gchar *folder, GError **error);
+gint camel_db_delete_uid (CamelDB *cdb, const gchar *folder, const gchar *uid, GError **error);
+/*int camel_db_delete_uids (CamelDB *cdb, GError **error, gint nargs, ... );*/
+gint camel_db_delete_uids (CamelDB *cdb, const gchar * folder_name, GSList *uids, GError **error);
+gint camel_db_delete_vuids (CamelDB *cdb, const gchar * folder_name, const gchar *shash, GSList *uids, GError **error);
-gint camel_db_create_folders_table (CamelDB *cdb, CamelException *ex);
-gint camel_db_select (CamelDB *cdb, const gchar * stmt, CamelDBSelectCB callback, gpointer data, CamelException *ex);
+gint camel_db_create_folders_table (CamelDB *cdb, GError **error);
+gint camel_db_select (CamelDB *cdb, const gchar * stmt, CamelDBSelectCB callback, gpointer data, GError **error);
-gint camel_db_write_folder_info_record (CamelDB *cdb, CamelFIRecord *record, CamelException *ex);
-gint camel_db_read_folder_info_record (CamelDB *cdb, const gchar *folder_name, CamelFIRecord **record, CamelException *ex);
+gint camel_db_write_folder_info_record (CamelDB *cdb, CamelFIRecord *record, GError **error);
+gint camel_db_read_folder_info_record (CamelDB *cdb, const gchar *folder_name, CamelFIRecord **record, GError **error);
-gint camel_db_prepare_message_info_table (CamelDB *cdb, const gchar *folder_name, CamelException *ex);
+gint camel_db_prepare_message_info_table (CamelDB *cdb, const gchar *folder_name, GError **error);
-gint camel_db_write_message_info_record (CamelDB *cdb, const gchar *folder_name, CamelMIRecord *record, CamelException *ex);
-gint camel_db_write_fresh_message_info_record (CamelDB *cdb, const gchar *folder_name, CamelMIRecord *record, CamelException *ex);
-gint camel_db_read_message_info_records (CamelDB *cdb, const gchar *folder_name, gpointer p, CamelDBSelectCB read_mir_callback, CamelException *ex);
-gint camel_db_read_message_info_record_with_uid (CamelDB *cdb, const gchar *folder_name, const gchar *uid, gpointer p, CamelDBSelectCB read_mir_callback, CamelException *ex);
+gint camel_db_write_message_info_record (CamelDB *cdb, const gchar *folder_name, CamelMIRecord *record, GError **error);
+gint camel_db_write_fresh_message_info_record (CamelDB *cdb, const gchar *folder_name, CamelMIRecord *record, GError **error);
+gint camel_db_read_message_info_records (CamelDB *cdb, const gchar *folder_name, gpointer p, CamelDBSelectCB read_mir_callback, GError **error);
+gint camel_db_read_message_info_record_with_uid (CamelDB *cdb, const gchar *folder_name, const gchar *uid, gpointer p, CamelDBSelectCB read_mir_callback, GError **error);
-gint camel_db_count_junk_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, CamelException *ex);
-gint camel_db_count_unread_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, CamelException *ex);
-gint camel_db_count_deleted_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, CamelException *ex);
-gint camel_db_count_total_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, CamelException *ex);
+gint camel_db_count_junk_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, GError **error);
+gint camel_db_count_unread_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, GError **error);
+gint camel_db_count_deleted_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, GError **error);
+gint camel_db_count_total_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, GError **error);
-gint camel_db_count_visible_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, CamelException *ex);
-gint camel_db_count_visible_unread_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, CamelException *ex);
+gint camel_db_count_visible_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, GError **error);
+gint camel_db_count_visible_unread_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, GError **error);
-gint camel_db_count_junk_not_deleted_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, CamelException *ex);
-gint camel_db_count_message_info (CamelDB *cdb, const gchar *query, guint32 *count, CamelException *ex);
+gint camel_db_count_junk_not_deleted_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, GError **error);
+gint camel_db_count_message_info (CamelDB *cdb, const gchar *query, guint32 *count, GError **error);
void camel_db_camel_mir_free (CamelMIRecord *record);
-gint camel_db_create_vfolder (CamelDB *db, const gchar *folder_name, CamelException *ex);
-gint camel_db_recreate_vfolder (CamelDB *db, const gchar *folder_name, CamelException *ex);
-gint camel_db_delete_uid_from_vfolder (CamelDB *db, gchar *folder_name, gchar *vuid, CamelException *ex);
-gint camel_db_delete_uid_from_vfolder_transaction (CamelDB *db, const gchar *folder_name, const gchar *vuid, CamelException *ex);
-GPtrArray * camel_db_get_vuids_from_vfolder (CamelDB *db, gchar *folder_name, gchar *filter, CamelException *ex);
-gint camel_db_add_to_vfolder (CamelDB *db, gchar *folder_name, gchar *vuid, CamelException *ex);
-gint camel_db_add_to_vfolder_transaction (CamelDB *db, const gchar *folder_name, const gchar *vuid, CamelException *ex);
+gint camel_db_create_vfolder (CamelDB *db, const gchar *folder_name, GError **error);
+gint camel_db_recreate_vfolder (CamelDB *db, const gchar *folder_name, GError **error);
+gint camel_db_delete_uid_from_vfolder (CamelDB *db, gchar *folder_name, gchar *vuid, GError **error);
+gint camel_db_delete_uid_from_vfolder_transaction (CamelDB *db, const gchar *folder_name, const gchar *vuid, GError **error);
+GPtrArray * camel_db_get_vuids_from_vfolder (CamelDB *db, gchar *folder_name, gchar *filter, GError **error);
+gint camel_db_add_to_vfolder (CamelDB *db, gchar *folder_name, gchar *vuid, GError **error);
+gint camel_db_add_to_vfolder_transaction (CamelDB *db, gchar *folder_name, gchar *vuid, GError **error);
-gint camel_db_get_folder_uids (CamelDB *db, const gchar *folder_name, const gchar *sort_by, const gchar *collate, GPtrArray *array, CamelException *ex);
-gint camel_db_get_folder_uids_flags (CamelDB *db, const gchar *folder_name, const gchar *sort_by, const gchar *collate, GPtrArray *summary, GHashTable *table, CamelException *ex);
+gint camel_db_get_folder_uids (CamelDB *db, const gchar *folder_name, const gchar *sort_by, const gchar *collate, GPtrArray *array, GError **error);
+gint camel_db_get_folder_uids_flags (CamelDB *db, const gchar *folder_name, const gchar *sort_by, const gchar *collate, GPtrArray *summary, GHashTable *table, GError **error);
-GPtrArray * camel_db_get_folder_junk_uids (CamelDB *db, gchar *folder_name, CamelException *ex);
-GPtrArray * camel_db_get_folder_deleted_uids (CamelDB *db, gchar *folder_name, CamelException *ex);
+GPtrArray * camel_db_get_folder_junk_uids (CamelDB *db, gchar *folder_name, GError **error);
+GPtrArray * camel_db_get_folder_deleted_uids (CamelDB *db, gchar *folder_name, GError **error);
gchar * camel_db_sqlize_string (const gchar *string);
void camel_db_free_sqlized_string (gchar *string);
diff --cc camel/camel-debug.c
index e75a59f,d3d3d84..8dfeb11
--- a/camel/camel-debug.c
+++ b/camel/camel-debug.c
@@@ -33,13 -33,10 +33,10 @@@ gint camel_verbose_debug
static GHashTable *debug_table = NULL;
/**
- * camel_debug_init:
+ * debug_init:
* @void:
*
- * Init camel debug. Maintain legacy CAMEL_VERBOSE_DEBUG as well as the
- * new CAMEL_DEBUG based environment variable interfaces.
- *
- * CAMEL_VERBOSE_DEBUG is set to a number to turn debug on.
+ * Init camel debug.
*
* CAMEL_DEBUG is set to a comma separated list of modules to debug.
* The modules can contain module-specific specifiers after a ':', or
diff --cc camel/camel-disco-store.c
index d602c07,0771bde..fcaf74d
--- a/camel/camel-disco-store.c
+++ b/camel/camel-disco-store.c
@@@ -359,21 -390,19 +359,21 @@@ camel_disco_store_can_work_offline (Cam
* can be used as a simple way to set a generic error message in @ex
* for operations that won't work offline.
*
- * Return value: whether or not @store is online.
+ * Returns: whether or not @store is online.
**/
gboolean
-camel_disco_store_check_online (CamelDiscoStore *store, CamelException *ex)
+camel_disco_store_check_online (CamelDiscoStore *store,
+ GError **error)
{
- if (camel_disco_store_status (store) != CAMEL_DISCO_STORE_ONLINE) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("You must be working online to "
- "complete this operation"));
- return FALSE;
- }
+ if (camel_disco_store_status (store) == CAMEL_DISCO_STORE_ONLINE)
+ return TRUE;
- return TRUE;
+ g_set_error (
+ error, CAMEL_SERVICE_ERROR,
+ CAMEL_SERVICE_ERROR_UNAVAILABLE,
+ _("You must be working online to complete this operation"));
+
+ return FALSE;
}
void
diff --cc camel/camel-filter-driver.h
index 18933c6,e1d6116..fd6a14c
--- a/camel/camel-filter-driver.h
+++ b/camel/camel-filter-driver.h
@@@ -111,23 -92,14 +111,14 @@@ void camel_filter_driver_flus
gint camel_filter_driver_filter_message (CamelFilterDriver *driver, CamelMimeMessage *message,
CamelMessageInfo *info, const gchar *uid,
CamelFolder *source, const gchar *source_url,
- const gchar *original_source_url, CamelException *ex);
+ const gchar *original_source_url, GError **error);
gint camel_filter_driver_filter_mbox (CamelFilterDriver *driver, const gchar *mbox,
- const gchar *original_source_url, CamelException *ex);
+ const gchar *original_source_url, GError **error);
gint camel_filter_driver_filter_folder (CamelFilterDriver *driver, CamelFolder *folder, CamelUIDCache *cache,
- GPtrArray *uids, gboolean remove, CamelException *ex);
+ GPtrArray *uids, gboolean remove, GError **error);
- #if 0
- /* generate the search query/action string for a filter option */
- void camel_filter_driver_expand_option (CamelFilterDriver *d, GString *s, GString *action, struct filter_option *op);
-
- /* get info about rules (options) */
- gint camel_filter_driver_rule_count (CamelFilterDriver *d);
- struct filter_option *camel_filter_driver_rule_get (CamelFilterDriver *d, gint n);
- #endif
-
G_END_DECLS
-#endif /* _CAMEL_FILTER_DRIVER_H */
+#endif /* CAMEL_FILTER_DRIVER_H */
diff --cc camel/camel-folder-search.c
index b936767,93ac4ee..702ac25
--- a/camel/camel-folder-search.c
+++ b/camel/camel-folder-search.c
@@@ -570,13 -565,10 +572,13 @@@ do_search_in_memory (const gchar *expr
* Run a search. Search must have had Folder already set on it, and
* it must implement summaries.
*
- * Return value:
+ * Returns:
**/
GPtrArray *
-camel_folder_search_search(CamelFolderSearch *search, const gchar *expr, GPtrArray *uids, CamelException *ex)
+camel_folder_search_search (CamelFolderSearch *search,
+ const gchar *expr,
+ GPtrArray *uids,
+ GError **error)
{
ESExpResult *r;
GPtrArray *matches = NULL, *summary_set;
diff --cc camel/camel-folder-summary.c
index db3c2d1,7513bf9..1c2d035
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@@ -1493,9 -821,13 +1508,10 @@@ remove_cache (CamelSession *session, Ca
{
struct _folder_summary_free_msg *m = (struct _folder_summary_free_msg *)msg;
CamelFolderSummary *s = m->summary;
- CamelException ex;
+ GSList *to_free_list = NULL, *l;
CAMEL_DB_RELEASE_SQLITE_MEMORY;
- camel_exception_init (&ex);
- camel_folder_sync (s->folder, FALSE, &ex);
- camel_exception_clear (&ex);
+ camel_folder_sync (s->folder, FALSE, NULL);
if (time(NULL) - s->cache_load_time < SUMMARY_CACHE_DROP)
return;
@@@ -1647,9 -999,14 +1678,15 @@@ static CamelSessionThreadOps preview_up
};
/* end */
+
+ /**
+ * camel_folder_summary_reload_from_db:
+ *
+ * Since: 2.24
+ **/
gint
-camel_folder_summary_reload_from_db (CamelFolderSummary *s, CamelException *ex)
+camel_folder_summary_reload_from_db (CamelFolderSummary *s,
+ GError **error)
{
CamelDB *cdb;
gchar *folder_name;
@@@ -1699,14 -1061,14 +1741,16 @@@ camel_folder_summary_add_preview (Camel
* @s: #CamelFolderSummary object
* @at_least: How many infos already loaded are considered fine to not reload all of them.
* Use -1 to force reload of all of them if not in memory yet.
- * @ex: #CamelException object.
+ * @error: return location for a #GError, or %NULL
*
* Loads all infos into memory, if they are not yet.
+ *
+ * Since: 2.28
**/
void
-camel_folder_summary_ensure_infos_loaded (CamelFolderSummary *s, gint at_least, CamelException *ex)
+camel_folder_summary_ensure_infos_loaded (CamelFolderSummary *s,
+ gint at_least,
+ GError **error)
{
guint loaded, known;
@@@ -1740,9 -1108,13 +1789,14 @@@ camel_folder_summary_get_flag_cache (Ca
return p->flag_cache;
}
+ /**
+ * camel_folder_summary_load_from_db:
+ *
+ * Since: 2.24
+ **/
gint
-camel_folder_summary_load_from_db (CamelFolderSummary *s, CamelException *ex)
+camel_folder_summary_load_from_db (CamelFolderSummary *s,
+ GError **error)
{
CamelDB *cdb;
gchar *folder_name;
@@@ -2219,9 -1599,13 +2278,14 @@@ msg_save_preview (const gchar *uid, gpo
camel_db_write_preview_record (folder->parent_store->cdb_w, folder->full_name, uid, (gchar *)value, NULL);
}
+ /**
+ * camel_folder_summary_save_to_db:
+ *
+ * Since: 2.24
+ **/
gint
-camel_folder_summary_save_to_db (CamelFolderSummary *s, CamelException *ex)
+camel_folder_summary_save_to_db (CamelFolderSummary *s,
+ GError **error)
{
CamelDB *cdb = s->folder->parent_store->cdb_w;
CamelFIRecord *record;
@@@ -2302,9 -1683,13 +2366,14 @@@
return ret;
}
+ /**
+ * camel_folder_summary_header_save_to_db:
+ *
+ * Since: 2.24
+ **/
gint
-camel_folder_summary_header_save_to_db (CamelFolderSummary *s, CamelException *ex)
+camel_folder_summary_header_save_to_db (CamelFolderSummary *s,
+ GError **error)
{
CamelDB *cdb = s->folder->parent_store->cdb_w;
CamelFIRecord *record;
@@@ -2474,11 -1859,13 +2543,16 @@@ exception
return -1;
}
+ /**
+ * camel_folder_summary_header_load_from_db:
+ *
+ * Since: 2.24
+ **/
gint
-camel_folder_summary_header_load_from_db (CamelFolderSummary *s, CamelStore *store, const gchar *folder_name, CamelException *ex)
+camel_folder_summary_header_load_from_db (CamelFolderSummary *s,
+ CamelStore *store,
+ const gchar *folder_name,
+ GError **error)
{
CamelDB *cdb;
CamelFIRecord *record;
@@@ -4965,11 -4859,80 +5060,18 @@@ camel_message_info_user_tag(const Camel
return info_user_tag(mi, id);
}
-static gboolean
-info_set_flags(CamelMessageInfo *info, guint32 flags, guint32 set)
-{
- guint32 old;
- CamelMessageInfoBase *mi = (CamelMessageInfoBase *)info;
- gint read=0, deleted=0, junk=0;
- /* TODO: locking? */
-
- if (flags & CAMEL_MESSAGE_SEEN && ((set & CAMEL_MESSAGE_SEEN) != (mi->flags & CAMEL_MESSAGE_SEEN)))
- { read = set & CAMEL_MESSAGE_SEEN ? 1 : -1; d(printf("Setting read as %d\n", set & CAMEL_MESSAGE_SEEN ? 1 : 0));}
-
- if (flags & CAMEL_MESSAGE_DELETED && ((set & CAMEL_MESSAGE_DELETED) != (mi->flags & CAMEL_MESSAGE_DELETED)))
- { deleted = set & CAMEL_MESSAGE_DELETED ? 1 : -1; d(printf("Setting deleted as %d\n", set & CAMEL_MESSAGE_DELETED ? 1 : 0));}
-
- if (flags & CAMEL_MESSAGE_JUNK && ((set & CAMEL_MESSAGE_JUNK) != (mi->flags & CAMEL_MESSAGE_JUNK)))
- { junk = set & CAMEL_MESSAGE_JUNK ? 1 : -1; d(printf("Setting junk as %d\n", set & CAMEL_MESSAGE_JUNK ? 1 : 0));}
-
- old = mi->flags;
- mi->flags = (old & ~flags) | (set & flags);
- if (old != mi->flags) {
- mi->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
- mi->dirty = TRUE;
- if (mi->summary)
- camel_folder_summary_touch(mi->summary);
- }
-
- if (((old & ~CAMEL_MESSAGE_SYSTEM_MASK) == (mi->flags & ~CAMEL_MESSAGE_SYSTEM_MASK)) && !((set & CAMEL_MESSAGE_JUNK_LEARN) && !(set & CAMEL_MESSAGE_JUNK)))
- return FALSE;
-
- if (mi->summary) {
- if (read && junk == 0 && !(mi->flags & CAMEL_MESSAGE_JUNK))
- mi->summary->unread_count -= read;
- else if (junk > 0)
- mi->summary->unread_count -= (old & CAMEL_MESSAGE_SEEN) ? 0 : 1;
- else if (junk < 0)
- mi->summary->unread_count -= (old & CAMEL_MESSAGE_SEEN) ? 0 : -1;
-
- if (deleted)
- mi->summary->deleted_count += deleted;
- if (junk)
- mi->summary->junk_count += junk;
- if (junk && !deleted)
- mi->summary->junk_not_deleted_count += junk;
- else if ((mi->flags & CAMEL_MESSAGE_JUNK) && deleted)
- mi->summary->junk_not_deleted_count -= deleted;
-
- if (((junk && !(mi->flags & CAMEL_MESSAGE_DELETED)))|| (deleted && !(mi->flags & CAMEL_MESSAGE_JUNK)) )
- mi->summary->visible_count -= junk ? junk : deleted;
- }
- if (mi->uid)
- g_hash_table_replace (_PRIVATE(mi->summary)->flag_cache, (gchar *)mi->uid, GUINT_TO_POINTER(mi->flags));
- if (mi->summary && mi->summary->folder && mi->uid) {
- CamelFolderChangeInfo *changes = camel_folder_change_info_new();
-
- camel_folder_change_info_change_uid(changes, camel_message_info_uid(info));
- camel_object_trigger_event(mi->summary->folder, "folder_changed", changes);
- camel_folder_change_info_free(changes);
- }
-
- d(printf("%d %d %d %d %d\n", mi->summary->unread_count, mi->summary->deleted_count, mi->summary->junk_count, mi->summary->junk_not_deleted_count, mi->summary->visible_count));
- return TRUE;
-}
+
+ /**
+ * camel_folder_summary_update_flag_cache:
+ *
+ * Since: 2.26
+ **/
void
camel_folder_summary_update_flag_cache (CamelFolderSummary *s, const gchar *uid, guint32 flag)
{
- g_hash_table_replace (_PRIVATE(s)->flag_cache, (gchar *) uid, GUINT_TO_POINTER(flag));
+ g_hash_table_replace (CAMEL_FOLDER_SUMMARY_GET_PRIVATE(s)->flag_cache, (gchar *) uid, GUINT_TO_POINTER(flag));
}
+
/**
* camel_message_info_set_flags:
* @mi: a #CamelMessageInfo
@@@ -5074,13 -5082,75 +5176,24 @@@ camel_message_info_dump (CamelMessageIn
camel_content_info_dump(((CamelMessageInfoBase *) mi)->content, 0);
}
-static void
-camel_folder_summary_class_init (CamelFolderSummaryClass *klass)
-{
- camel_folder_summary_parent = camel_type_get_global_classfuncs (camel_object_get_type ());
-
- klass->summary_header_load = summary_header_load;
- klass->summary_header_save = summary_header_save;
-
- klass->summary_header_from_db = summary_header_from_db;
- klass->summary_header_to_db = summary_header_to_db;
- klass->message_info_from_db = message_info_from_db;
- klass->message_info_to_db = message_info_to_db;
- klass->content_info_from_db = content_info_from_db;
- klass->content_info_to_db = content_info_to_db;
-
- klass->message_info_new_from_header = message_info_new_from_header;
- klass->message_info_new_from_parser = message_info_new_from_parser;
- klass->message_info_new_from_message = message_info_new_from_message;
- klass->message_info_load = message_info_load;
- klass->message_info_save = message_info_save;
- klass->meta_message_info_save = meta_message_info_save;
- klass->message_info_free = message_info_free;
- klass->message_info_clone = message_info_clone;
- klass->message_info_from_uid = message_info_from_uid;
-
- klass->content_info_new_from_header = content_info_new_from_header;
- klass->content_info_new_from_parser = content_info_new_from_parser;
- klass->content_info_new_from_message = content_info_new_from_message;
- klass->content_info_load = content_info_load;
- klass->content_info_save = content_info_save;
- klass->content_info_free = content_info_free;
-
- klass->next_uid_string = next_uid_string;
-
- klass->info_ptr = info_ptr;
- klass->info_uint32 = info_uint32;
- klass->info_time = info_time;
- klass->info_user_flag = info_user_flag;
- klass->info_user_tag = info_user_tag;
-
-#if 0
- klass->info_set_string = info_set_string;
- klass->info_set_uint32 = info_set_uint32;
- klass->info_set_time = info_set_time;
- klass->info_set_ptr = info_set_ptr;
-#endif
- klass->info_set_user_flag = info_set_user_flag;
- klass->info_set_user_tag = info_set_user_tag;
-
- klass->info_set_flags = info_set_flags;
-
-}
+/* Utils */
+
+ /**
+ * camel_folder_summary_set_need_preview:
+ *
+ * Since: 2.28
+ **/
void
camel_folder_summary_set_need_preview (CamelFolderSummary *summary, gboolean preview)
{
- _PRIVATE(summary)->need_preview = preview;
+ CAMEL_FOLDER_SUMMARY_GET_PRIVATE(summary)->need_preview = preview;
}
+ /**
+ * camel_folder_summary_get_need_preview:
+ *
+ * Since: 2.28
+ **/
gboolean
camel_folder_summary_get_need_preview (CamelFolderSummary *summary)
{
diff --cc camel/camel-folder.c
index 35e3318,e9a280b..0e5f826
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@@ -28,14 -28,15 +28,13 @@@
#include <string.h>
-#include <glib.h>
#include <glib/gi18n-lib.h>
- #include <libedataserver/e-memory.h>
-
#include "camel-db.h"
#include "camel-debug.h"
-#include "camel-exception.h"
#include "camel-filter-driver.h"
#include "camel-folder.h"
+ #include "camel-mempool.h"
#include "camel-mime-message.h"
#include "camel-operation.h"
#include "camel-private.h"
@@@ -127,121 -197,81 +126,126 @@@ folder_dispose (GObject *object
}
static void
-camel_folder_finalize (CamelObject *object)
+folder_finalize (GObject *object)
{
- CamelFolder *camel_folder = CAMEL_FOLDER (object);
- struct _CamelFolderPrivate *p = camel_folder->priv;
-
- g_free(camel_folder->name);
- g_free(camel_folder->full_name);
- g_free(camel_folder->description);
+ CamelFolder *folder;
+ CamelFolderPrivate *priv;
- if (camel_folder->parent_store)
- camel_object_unref (camel_folder->parent_store);
+ folder = CAMEL_FOLDER (object);
+ priv = CAMEL_FOLDER_GET_PRIVATE (object);
- if (camel_folder->summary) {
- camel_folder->summary->folder = NULL;
- camel_object_unref (camel_folder->summary);
- }
+ g_free (folder->name);
+ g_free (folder->full_name);
+ g_free (folder->description);
- camel_folder_change_info_free(p->changed_frozen);
+ camel_folder_change_info_free (priv->changed_frozen);
- g_static_rec_mutex_free(&p->lock);
- g_static_mutex_free(&p->change_lock);
+ g_static_rec_mutex_free (&priv->lock);
+ g_static_mutex_free (&priv->change_lock);
- g_free(p);
+ /* Chain up to parent's finalize () method. */
+ G_OBJECT_CLASS (camel_folder_parent_class)->finalize (object);
}
-/**
- * camel_folder_set_lock_async:
- * @folder: a #CamelFolder
- * @skip_folder_lock:
- *
- * FIXME Document me!
- *
- * Since: 2.30
- **/
-void
-camel_folder_set_lock_async (CamelFolder *folder, gboolean skip_folder_lock)
+static void
+camel_folder_class_init (CamelFolderClass *class)
{
- folder->priv->skip_folder_lock = skip_folder_lock;
+ GObjectClass *object_class;
+ CamelObjectClass *camel_object_class;
+
+ g_type_class_add_private (class, sizeof (CamelFolderPrivate));
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->dispose = folder_dispose;
+ object_class->finalize = folder_finalize;
+
+ camel_object_class = CAMEL_OBJECT_CLASS (class);
+ camel_object_class->getv = folder_getv;
+ camel_object_class->free = folder_free;
+
+ class->refresh_info = refresh_info;
+ class->get_name = get_name;
+ class->get_full_name = get_full_name;
+ class->get_parent_store = get_parent_store;
+ class->get_message_count = get_message_count;
+ class->get_permanent_flags = get_permanent_flags;
+ class->get_message_flags = get_message_flags;
+ class->set_message_flags = set_message_flags;
+ class->get_message_user_flag = get_message_user_flag;
+ class->set_message_user_flag = set_message_user_flag;
+ class->get_message_user_tag = get_message_user_tag;
+ class->set_message_user_tag = set_message_user_tag;
+ class->get_uids = get_uids;
+ class->get_uncached_uids = get_uncached_uids;
+ class->free_uids = free_uids;
+ class->cmp_uids = cmp_uids;
+ class->sort_uids = sort_uids;
+ class->get_summary = get_summary;
+ class->free_summary = free_summary;
+ class->search_free = search_free;
+ class->get_message_info = get_message_info;
+ class->ref_message_info = ref_message_info;
+ class->free_message_info = free_message_info;
+ class->transfer_messages_to = transfer_messages_to;
+ class->delete = delete;
+ class->rename = folder_rename;
+ class->freeze = freeze;
+ class->sync_message = NULL;
+ class->thaw = thaw;
+ class->is_frozen = is_frozen;
+ class->get_quota_info = get_quota_info;
+
+ camel_object_class_add_event (
+ camel_object_class, "folder_changed", folder_changed);
+ camel_object_class_add_event (
+ camel_object_class, "deleted", NULL);
+ camel_object_class_add_event (
+ camel_object_class, "renamed", NULL);
}
-CamelType
-camel_folder_get_type (void)
+static void
+camel_folder_init (CamelFolder *folder)
{
- static CamelType camel_folder_type = CAMEL_INVALID_TYPE;
+ folder->priv = CAMEL_FOLDER_GET_PRIVATE (folder);
- if (camel_folder_type == CAMEL_INVALID_TYPE) {
- camel_folder_type = camel_type_register (CAMEL_OBJECT_TYPE, "CamelFolder",
- sizeof (CamelFolder),
- sizeof (CamelFolderClass),
- (CamelObjectClassInitFunc) camel_folder_class_init,
- NULL,
- (CamelObjectInitFunc) camel_folder_init,
- (CamelObjectFinalizeFunc) camel_folder_finalize );
- }
+ folder->priv->frozen = 0;
+ folder->priv->changed_frozen = camel_folder_change_info_new ();
- return camel_folder_type;
+ g_static_rec_mutex_init (&folder->priv->lock);
+ g_static_mutex_init (&folder->priv->change_lock);
}
-static gchar *
-get_filename (CamelFolder *folder, const gchar *uid, CamelException *ex)
+GQuark
+camel_folder_error_quark (void)
{
- w(g_warning ("CamelFolder::get_filename not implemented for '%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder))));
- return g_strdup ("/dev/null");
+ static GQuark quark = 0;
+
+ if (G_UNLIKELY (quark == 0)) {
+ const gchar *string = "camel-folder-error-quark";
+ quark = g_quark_from_static_string (string);
+ }
+
+ return quark;
}
+ /**
+ * camel_folder_get_filename:
+ *
+ * Since: 2.26
+ **/
gchar *
-camel_folder_get_filename (CamelFolder *folder, const gchar *uid, CamelException *ex)
+camel_folder_get_filename (CamelFolder *folder,
+ const gchar *uid,
+ GError **error)
{
- return CF_CLASS (folder)->get_filename (folder, uid, ex);
+ CamelFolderClass *class;
+
+ g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
+
+ class = CAMEL_FOLDER_GET_CLASS (folder);
+ g_return_val_if_fail (class->get_filename != NULL, NULL);
+
+ return class->get_filename (folder, uid, error);
}
/**
@@@ -1208,37 -1146,24 +1212,39 @@@ camel_folder_get_message (CamelFolder *
* Ensure that a message identified by UID has been synced in the folder (so
* that camel_folder_get_message on it later will work in offline mode).
*
+ * Returns: %TRUE on success, %FALSE on failure
++ *
+ * Since: 2.26
**/
-void
-camel_folder_sync_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
+gboolean
+camel_folder_sync_message (CamelFolder *folder,
+ const gchar *uid,
+ GError **error)
{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- CAMEL_FOLDER_REC_LOCK(folder, lock);
+ CamelFolderClass *class;
+ gboolean success = FALSE;
+
+ g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
+
+ class = CAMEL_FOLDER_GET_CLASS (folder);
+
+ CAMEL_FOLDER_REC_LOCK (folder, lock);
/* Use the sync_message method if the class implements it. */
- if (CF_CLASS (folder)->sync_message)
- CF_CLASS (folder)->sync_message (folder, uid, ex);
+ if (class->sync_message != NULL)
+ success = class->sync_message (folder, uid, error);
else {
CamelMimeMessage *message;
- message = CF_CLASS (folder)->get_message (folder, uid, ex);
- if (message)
- camel_object_unref(message);
+ message = class->get_message (folder, uid, error);
+ if (message != NULL) {
+ g_object_unref (message);
+ success = TRUE;
+ }
}
- CAMEL_FOLDER_REC_UNLOCK(folder, lock);
+
+ CAMEL_FOLDER_REC_UNLOCK (folder, lock);
+
+ return success;
}
static GPtrArray *
@@@ -1334,21 -1249,14 +1340,23 @@@ get_uncached_uids (CamelFolder *folder
* which are locally cached but should never filter out a uid which is not
* locally cached. Free the result by called #camel_folder_free_uids.
* Frees the array of UIDs returned by #camel_folder_get_uids.
+ *
+ * Since: 2.26
**/
GPtrArray *
-camel_folder_get_uncached_uids (CamelFolder *folder, GPtrArray * uids, CamelException *ex)
+camel_folder_get_uncached_uids (CamelFolder *folder,
+ GPtrArray *uids,
+ GError **error)
{
+ CamelFolderClass *class;
+
g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
- return CF_CLASS (folder)->get_uncached_uids(folder, uids, ex);
+ g_return_val_if_fail (uids != NULL, NULL);
+
+ class = CAMEL_FOLDER_GET_CLASS (folder);
+ g_return_val_if_fail (class->get_uncached_uids != NULL, NULL);
+
+ return class->get_uncached_uids (folder, uids, error);
}
static gint
@@@ -1370,14 -1278,12 +1378,16 @@@ cmp_uids (CamelFolder *folder, const gc
*
* Note that the default compare function expects a decimal number at the beginning of a uid,
* thus if provider uses different uid values, then it should subclass this function.
+ *
+ * Since: 2.28
**/
gint
-camel_folder_cmp_uids (CamelFolder *folder, const gchar *uid1, const gchar *uid2)
+camel_folder_cmp_uids (CamelFolder *folder,
+ const gchar *uid1,
+ const gchar *uid2)
{
+ CamelFolderClass *class;
+
g_return_val_if_fail (CAMEL_IS_FOLDER (folder), 0);
g_return_val_if_fail (uid1 != NULL, 0);
g_return_val_if_fail (uid2 != NULL, 0);
@@@ -1412,20 -1315,15 +1422,22 @@@ sort_uids (CamelFolder *folder, GPtrArr
* @uids: array of uids
*
* Sorts the array of UIDs.
+ *
+ * Since: 2.24
**/
void
-camel_folder_sort_uids (CamelFolder *folder, GPtrArray *uids)
+camel_folder_sort_uids (CamelFolder *folder,
+ GPtrArray *uids)
{
+ CamelFolderClass *class;
+
g_return_if_fail (CAMEL_IS_FOLDER (folder));
+ g_return_if_fail (uids != NULL);
- CF_CLASS (folder)->sort_uids (folder, uids);
+ class = CAMEL_FOLDER_GET_CLASS (folder);
+ g_return_if_fail (class->sort_uids != NULL);
+
+ class->sort_uids (folder, uids);
}
static GPtrArray *
@@@ -1542,13 -1456,14 +1554,15 @@@ camel_folder_search_by_expression (Came
* Searches the folder for count of messages matching the given search expression.
*
* Returns: an interger
+ *
+ * Since: 2.26
**/
guint32
-camel_folder_count_by_expression (CamelFolder *folder, const gchar *expression,
- CamelException *ex)
+camel_folder_count_by_expression (CamelFolder *folder,
+ const gchar *expression,
+ GError **error)
{
- guint32 ret;
+ CamelFolderClass *class;
g_return_val_if_fail (CAMEL_IS_FOLDER (folder), 0);
g_return_val_if_fail (folder->folder_flags & CAMEL_FOLDER_HAS_SEARCH_CAPABILITY, 0);
@@@ -2370,15 -2215,15 +2392,15 @@@ camel_folder_change_info_new (void
CamelFolderChangeInfo *info;
info = g_slice_new (CamelFolderChangeInfo);
- info->uid_added = g_ptr_array_new();
- info->uid_removed = g_ptr_array_new();
- info->uid_changed = g_ptr_array_new();
- info->uid_recent = g_ptr_array_new();
+ info->uid_added = g_ptr_array_new ();
+ info->uid_removed = g_ptr_array_new ();
+ info->uid_changed = g_ptr_array_new ();
+ info->uid_recent = g_ptr_array_new ();
info->priv = g_slice_new (struct _CamelFolderChangeInfoPrivate);
- info->priv->uid_stored = g_hash_table_new(g_str_hash, g_str_equal);
+ info->priv->uid_stored = g_hash_table_new (g_str_hash, g_str_equal);
info->priv->uid_source = NULL;
- info->priv->uid_filter = g_ptr_array_new();
- info->priv->uid_pool = camel_mempool_new(512, 256, CAMEL_MEMPOOL_ALIGN_BYTE);
+ info->priv->uid_filter = g_ptr_array_new ();
- info->priv->uid_pool = e_mempool_new (512, 256, E_MEMPOOL_ALIGN_BYTE);
++ info->priv->uid_pool = camel_mempool_new (512, 256, CAMEL_MEMPOOL_ALIGN_BYTE);
return info;
}
@@@ -2400,10 -2245,10 +2422,10 @@@ camel_folder_change_info_add_source (Ca
p = info->priv;
if (p->uid_source == NULL)
- p->uid_source = g_hash_table_new(g_str_hash, g_str_equal);
+ p->uid_source = g_hash_table_new (g_str_hash, g_str_equal);
- if (g_hash_table_lookup(p->uid_source, uid) == NULL)
- g_hash_table_insert(p->uid_source, camel_mempool_strdup(p->uid_pool, uid), GINT_TO_POINTER (1));
+ if (g_hash_table_lookup (p->uid_source, uid) == NULL)
- g_hash_table_insert (p->uid_source, e_mempool_strdup (p->uid_pool, uid), GINT_TO_POINTER (1));
++ g_hash_table_insert (p->uid_source, camel_mempool_strdup (p->uid_pool, uid), GINT_TO_POINTER (1));
}
/**
@@@ -2430,8 -2275,8 +2452,8 @@@ camel_folder_change_info_add_source_lis
for (i=0;i<list->len;i++) {
gchar *uid = list->pdata[i];
- if (g_hash_table_lookup(p->uid_source, uid) == NULL)
- g_hash_table_insert(p->uid_source, camel_mempool_strdup(p->uid_pool, uid), GINT_TO_POINTER (1));
+ if (g_hash_table_lookup (p->uid_source, uid) == NULL)
- g_hash_table_insert (p->uid_source, e_mempool_strdup (p->uid_pool, uid), GINT_TO_POINTER (1));
++ g_hash_table_insert (p->uid_source, camel_mempool_strdup (p->uid_pool, uid), GINT_TO_POINTER (1));
}
}
@@@ -2539,10 -2384,10 +2561,10 @@@ change_info_recent_uid (CamelFolderChan
p = info->priv;
/* always add to recent, but dont let anyone else know */
- if (!g_hash_table_lookup_extended(p->uid_stored, uid, (gpointer *)&olduid, (gpointer *)&olduids)) {
- olduid = camel_mempool_strdup(p->uid_pool, uid);
+ if (!g_hash_table_lookup_extended (p->uid_stored, uid, (gpointer *)&olduid, (gpointer *)&olduids)) {
- olduid = e_mempool_strdup (p->uid_pool, uid);
++ olduid = camel_mempool_strdup (p->uid_pool, uid);
}
- g_ptr_array_add(info->uid_recent, olduid);
+ g_ptr_array_add (info->uid_recent, olduid);
}
static void
@@@ -2555,10 -2400,10 +2577,10 @@@ change_info_filter_uid (CamelFolderChan
p = info->priv;
/* always add to filter, but dont let anyone else know */
- if (!g_hash_table_lookup_extended(p->uid_stored, uid, (gpointer *)&olduid, (gpointer *)&olduids)) {
- olduid = camel_mempool_strdup(p->uid_pool, uid);
+ if (!g_hash_table_lookup_extended (p->uid_stored, uid, (gpointer *)&olduid, (gpointer *)&olduids)) {
- olduid = e_mempool_strdup (p->uid_pool, uid);
++ olduid = camel_mempool_strdup (p->uid_pool, uid);
}
- g_ptr_array_add(p->uid_filter, olduid);
+ g_ptr_array_add (p->uid_filter, olduid);
}
static void
@@@ -2620,9 -2465,9 +2642,9 @@@ camel_folder_change_info_add_uid (Camel
return;
}
- olduid = e_mempool_strdup (p->uid_pool, uid);
- olduid = camel_mempool_strdup(p->uid_pool, uid);
- g_ptr_array_add(info->uid_added, olduid);
- g_hash_table_insert(p->uid_stored, olduid, info->uid_added);
++ olduid = camel_mempool_strdup (p->uid_pool, uid);
+ g_ptr_array_add (info->uid_added, olduid);
+ g_hash_table_insert (p->uid_stored, olduid, info->uid_added);
}
/**
@@@ -2653,9 -2498,9 +2675,9 @@@ camel_folder_change_info_remove_uid (Ca
return;
}
- olduid = e_mempool_strdup (p->uid_pool, uid);
- olduid = camel_mempool_strdup(p->uid_pool, uid);
- g_ptr_array_add(info->uid_removed, olduid);
- g_hash_table_insert(p->uid_stored, olduid, info->uid_removed);
++ olduid = camel_mempool_strdup (p->uid_pool, uid);
+ g_ptr_array_add (info->uid_removed, olduid);
+ g_hash_table_insert (p->uid_stored, olduid, info->uid_removed);
}
/**
@@@ -2681,9 -2526,9 +2703,9 @@@ camel_folder_change_info_change_uid (Ca
return;
}
- olduid = e_mempool_strdup (p->uid_pool, uid);
- olduid = camel_mempool_strdup(p->uid_pool, uid);
- g_ptr_array_add(info->uid_changed, olduid);
- g_hash_table_insert(p->uid_stored, olduid, info->uid_changed);
++ olduid = camel_mempool_strdup (p->uid_pool, uid);
+ g_ptr_array_add (info->uid_changed, olduid);
+ g_hash_table_insert (p->uid_stored, olduid, info->uid_changed);
}
/**
@@@ -2737,18 -2582,18 +2759,18 @@@ camel_folder_change_info_clear (CamelFo
p = info->priv;
- g_ptr_array_set_size(info->uid_added, 0);
- g_ptr_array_set_size(info->uid_removed, 0);
- g_ptr_array_set_size(info->uid_changed, 0);
- g_ptr_array_set_size(info->uid_recent, 0);
+ g_ptr_array_set_size (info->uid_added, 0);
+ g_ptr_array_set_size (info->uid_removed, 0);
+ g_ptr_array_set_size (info->uid_changed, 0);
+ g_ptr_array_set_size (info->uid_recent, 0);
if (p->uid_source) {
- g_hash_table_destroy(p->uid_source);
+ g_hash_table_destroy (p->uid_source);
p->uid_source = NULL;
}
- g_hash_table_destroy(p->uid_stored);
- p->uid_stored = g_hash_table_new(g_str_hash, g_str_equal);
- g_ptr_array_set_size(p->uid_filter, 0);
- camel_mempool_flush(p->uid_pool, TRUE);
+ g_hash_table_destroy (p->uid_stored);
+ p->uid_stored = g_hash_table_new (g_str_hash, g_str_equal);
+ g_ptr_array_set_size (p->uid_filter, 0);
- e_mempool_flush (p->uid_pool, TRUE);
++ camel_mempool_flush (p->uid_pool, TRUE);
}
/**
@@@ -2767,16 -2612,16 +2789,16 @@@ camel_folder_change_info_free (CamelFol
p = info->priv;
if (p->uid_source)
- g_hash_table_destroy(p->uid_source);
+ g_hash_table_destroy (p->uid_source);
- g_hash_table_destroy(p->uid_stored);
- g_ptr_array_free(p->uid_filter, TRUE);
- camel_mempool_destroy(p->uid_pool);
+ g_hash_table_destroy (p->uid_stored);
+ g_ptr_array_free (p->uid_filter, TRUE);
- e_mempool_destroy (p->uid_pool);
++ camel_mempool_destroy (p->uid_pool);
g_slice_free (struct _CamelFolderChangeInfoPrivate, p);
- g_ptr_array_free(info->uid_added, TRUE);
- g_ptr_array_free(info->uid_removed, TRUE);
- g_ptr_array_free(info->uid_changed, TRUE);
- g_ptr_array_free(info->uid_recent, TRUE);
+ g_ptr_array_free (info->uid_added, TRUE);
+ g_ptr_array_free (info->uid_removed, TRUE);
+ g_ptr_array_free (info->uid_changed, TRUE);
+ g_ptr_array_free (info->uid_recent, TRUE);
g_slice_free (CamelFolderChangeInfo, info);
}
diff --cc camel/camel-folder.h
index 3756863,26bc55c..b279900
--- a/camel/camel-folder.h
+++ b/camel/camel-folder.h
@@@ -159,165 -127,159 +164,167 @@@ struct _CamelFolder
#define CAMEL_FOLDER_IS_JUNK (1<<5)
#define CAMEL_FOLDER_FILTER_JUNK (1<<6)
-typedef struct {
+struct _CamelFolderClass {
CamelObjectClass parent_class;
- /* Virtual methods */
- void (*refresh_info) (CamelFolder *folder, CamelException *ex);
-
- void (*sync) (CamelFolder *folder, gboolean expunge,
- CamelException *ex);
-
- const gchar * (*get_name) (CamelFolder *folder);
- const gchar * (*get_full_name) (CamelFolder *folder);
-
- CamelStore * (*get_parent_store) (CamelFolder *folder);
-
- void (*expunge) (CamelFolder *folder,
- CamelException *ex);
-
- gint (*get_message_count) (CamelFolder *folder);
-
- void (*append_message) (CamelFolder *folder,
- CamelMimeMessage *message,
- const CamelMessageInfo *info,
- gchar **appended_uid,
- CamelException *ex);
-
- guint32 (*get_permanent_flags) (CamelFolder *folder);
- guint32 (*get_message_flags) (CamelFolder *folder,
- const gchar *uid);
- gboolean (*set_message_flags) (CamelFolder *folder,
- const gchar *uid,
- guint32 flags, guint32 set);
-
- gboolean (*get_message_user_flag) (CamelFolder *folder,
- const gchar *uid,
- const gchar *name);
- void (*set_message_user_flag) (CamelFolder *folder,
- const gchar *uid,
- const gchar *name,
- gboolean value);
-
- const gchar * (*get_message_user_tag) (CamelFolder *folder,
- const gchar *uid,
- const gchar *name);
- void (*set_message_user_tag) (CamelFolder *folder,
- const gchar *uid,
- const gchar *name,
- const gchar *value);
-
- CamelMimeMessage * (*get_message) (CamelFolder *folder,
- const gchar *uid,
- CamelException *ex);
-
- GPtrArray * (*get_uids) (CamelFolder *folder);
- void (*free_uids) (CamelFolder *folder,
- GPtrArray *array);
-
- gint (* cmp_uids) (CamelFolder *folder, const gchar *uid1, const gchar *uid2);
- void (* sort_uids) (CamelFolder *folder, GPtrArray *uids);
-
- GPtrArray * (*get_summary) (CamelFolder *folder);
- void (*free_summary) (CamelFolder *folder,
- GPtrArray *summary);
-
- gboolean (*has_search_capability) (CamelFolder *folder);
-
- GPtrArray * (*search_by_expression) (CamelFolder *, const gchar *, CamelException *);
- GPtrArray * (*search_by_uids) (CamelFolder *, const gchar *, GPtrArray *uids, CamelException *);
-
- void (*search_free) (CamelFolder *folder, GPtrArray *result);
-
- CamelMessageInfo * (*get_message_info) (CamelFolder *, const gchar *uid);
- void (*ref_message_info) (CamelFolder *, CamelMessageInfo *);
- void (*free_message_info) (CamelFolder *, CamelMessageInfo *);
-
- void (*transfer_messages_to) (CamelFolder *source,
- GPtrArray *uids,
- CamelFolder *destination,
- GPtrArray **transferred_uids,
- gboolean delete_originals,
- CamelException *ex);
-
- void (*delete) (CamelFolder *folder);
- void (*rename) (CamelFolder *folder, const gchar *newname);
-
- void (*freeze) (CamelFolder *folder);
- void (*thaw) (CamelFolder *folder);
- gboolean (*is_frozen) (CamelFolder *folder);
-
- CamelFolderQuotaInfo * (*get_quota_info) (CamelFolder *folder);
- guint32 (*count_by_expression) (CamelFolder *, const gchar *, CamelException *);
- void (*sync_message) (CamelFolder *folder,
- const gchar *uid,
- CamelException *ex);
- GPtrArray * (*get_uncached_uids)(CamelFolder *, GPtrArray * uids, CamelException *);
- gchar * (*get_filename) (CamelFolder *, const gchar *uid, CamelException *);
-} CamelFolderClass;
+ gboolean (*refresh_info) (CamelFolder *folder,
+ GError **error);
+ gboolean (*sync) (CamelFolder *folder,
+ gboolean expunge,
+ GError **error);
+ const gchar * (*get_name) (CamelFolder *folder);
+ const gchar * (*get_full_name) (CamelFolder *folder);
+ struct _CamelStore *
+ (*get_parent_store) (CamelFolder *folder);
+ gboolean (*expunge) (CamelFolder *folder,
+ GError **error);
+ gint (*get_message_count) (CamelFolder *folder);
+ gboolean (*append_message) (CamelFolder *folder,
+ CamelMimeMessage *message,
+ const CamelMessageInfo *info,
+ gchar **appended_uid,
+ GError **error);
+ guint32 (*get_permanent_flags) (CamelFolder *folder);
+ guint32 (*get_message_flags) (CamelFolder *folder,
+ const gchar *uid);
+ gboolean (*set_message_flags) (CamelFolder *folder,
+ const gchar *uid,
+ guint32 flags, guint32 set);
+ gboolean (*get_message_user_flag)(CamelFolder *folder,
+ const gchar *uid,
+ const gchar *name);
+ void (*set_message_user_flag)(CamelFolder *folder,
+ const gchar *uid,
+ const gchar *name,
+ gboolean value);
+ const gchar * (*get_message_user_tag) (CamelFolder *folder,
+ const gchar *uid,
+ const gchar *name);
+ void (*set_message_user_tag) (CamelFolder *folder,
+ const gchar *uid,
+ const gchar *name,
+ const gchar *value);
+ CamelMimeMessage *
+ (*get_message) (CamelFolder *folder,
+ const gchar *uid,
+ GError **error);
+ GPtrArray * (*get_uids) (CamelFolder *folder);
+ void (*free_uids) (CamelFolder *folder,
+ GPtrArray *array);
+ gint (*cmp_uids) (CamelFolder *folder,
+ const gchar *uid1,
+ const gchar *uid2);
+ void (*sort_uids) (CamelFolder *folder,
+ GPtrArray *uids);
+ GPtrArray * (*get_summary) (CamelFolder *folder);
+ void (*free_summary) (CamelFolder *folder,
+ GPtrArray *summary);
+ gboolean (*has_search_capability)(CamelFolder *folder);
+ GPtrArray * (*search_by_expression) (CamelFolder *folder,
+ const gchar *expression,
+ GError **error);
+ GPtrArray * (*search_by_uids) (CamelFolder *folder,
+ const gchar *expression,
+ GPtrArray *uids,
+ GError **error);
+ void (*search_free) (CamelFolder *folder,
+ GPtrArray *result);
+ CamelMessageInfo *
+ (*get_message_info) (CamelFolder *folder,
+ const gchar *uid);
+ void (*ref_message_info) (CamelFolder *folder,
+ CamelMessageInfo *info);
+ void (*free_message_info) (CamelFolder *folder,
+ CamelMessageInfo *info);
+ gboolean (*transfer_messages_to) (CamelFolder *source,
+ GPtrArray *uids,
+ CamelFolder *destination,
+ GPtrArray **transferred_uids,
+ gboolean delete_originals,
+ GError **error);
+ void (*delete) (CamelFolder *folder);
+ void (*rename) (CamelFolder *folder,
+ const gchar *newname);
+ void (*freeze) (CamelFolder *folder);
+ void (*thaw) (CamelFolder *folder);
+ gboolean (*is_frozen) (CamelFolder *folder);
+ CamelFolderQuotaInfo *
+ (*get_quota_info) (CamelFolder *folder);
+ guint32 (*count_by_expression) (CamelFolder *folder,
+ const gchar *expression,
+ GError **error);
+ gboolean (*sync_message) (CamelFolder *folder,
+ const gchar *uid,
+ GError **error);
+ GPtrArray * (*get_uncached_uids) (CamelFolder *folder,
+ GPtrArray *uids,
+ GError **error);
+ gchar * (*get_filename) (CamelFolder *folder,
+ const gchar *uid,
+ GError **error);
+};
-/* Standard Camel function */
-CamelType camel_folder_get_type (void);
+GType camel_folder_get_type (void);
+GQuark camel_folder_error_quark (void) G_GNUC_CONST;
/* public methods */
-void camel_folder_construct (CamelFolder *folder,
- CamelStore *parent_store,
- const gchar *full_name,
- const gchar *name);
-
-void camel_folder_refresh_info (CamelFolder *folder,
- CamelException *ex);
-void camel_folder_sync (CamelFolder *folder,
- gboolean expunge,
- CamelException *ex);
-void camel_folder_set_lock_async (CamelFolder *folder,
- gboolean skip_folder_lock);
-
-CamelStore * camel_folder_get_parent_store (CamelFolder *folder);
+void camel_folder_construct (CamelFolder *folder,
+ struct _CamelStore *parent_store,
+ const gchar *full_name,
+ const gchar *name);
+
+gboolean camel_folder_refresh_info (CamelFolder *folder,
+ GError **error);
+gboolean camel_folder_sync (CamelFolder *folder,
+ gboolean expunge,
+ GError **error);
++void camel_folder_set_lock_async (CamelFolder *folder,
++ gboolean skip_folder_lock);
+
+struct _CamelStore *
+ camel_folder_get_parent_store (CamelFolder *folder);
/* delete operations */
-void camel_folder_expunge (CamelFolder *folder,
- CamelException *ex);
+gboolean camel_folder_expunge (CamelFolder *folder,
+ GError **error);
/* folder name operations */
-const gchar * camel_folder_get_name (CamelFolder *folder);
-const gchar * camel_folder_get_full_name (CamelFolder *folder);
+const gchar * camel_folder_get_name (CamelFolder *folder);
+const gchar * camel_folder_get_full_name (CamelFolder *folder);
/* various properties accessors */
-guint32 camel_folder_get_permanent_flags (CamelFolder *folder);
+guint32 camel_folder_get_permanent_flags(CamelFolder *folder);
#ifndef CAMEL_DISABLE_DEPRECATED
-guint32 camel_folder_get_message_flags (CamelFolder *folder,
- const gchar *uid);
-
-gboolean camel_folder_set_message_flags (CamelFolder *folder,
- const gchar *uid,
- guint32 flags,
- guint32 set);
-
-gboolean camel_folder_get_message_user_flag (CamelFolder *folder,
- const gchar *uid,
- const gchar *name);
-
-void camel_folder_set_message_user_flag (CamelFolder *folder,
- const gchar *uid,
- const gchar *name,
- gboolean value);
-
-const gchar * camel_folder_get_message_user_tag (CamelFolder *folder,
- const gchar *uid,
- const gchar *name);
-
-void camel_folder_set_message_user_tag (CamelFolder *folder,
- const gchar *uid,
- const gchar *name,
- const gchar *value);
+guint32 camel_folder_get_message_flags (CamelFolder *folder,
+ const gchar *uid);
+
+gboolean camel_folder_set_message_flags (CamelFolder *folder,
+ const gchar *uid,
+ guint32 flags,
+ guint32 set);
+
+gboolean camel_folder_get_message_user_flag
+ (CamelFolder *folder,
+ const gchar *uid,
+ const gchar *name);
+
+void camel_folder_set_message_user_flag
+ (CamelFolder *folder,
+ const gchar *uid,
+ const gchar *name,
+ gboolean value);
+
+const gchar * camel_folder_get_message_user_tag
+ (CamelFolder *folder,
+ const gchar *uid,
+ const gchar *name);
+
+void camel_folder_set_message_user_tag
+ (CamelFolder *folder,
+ const gchar *uid,
+ const gchar *name,
+ const gchar *value);
#endif /* CAMEL_DISABLE_DEPRECATED */
/* message manipulation */
diff --cc camel/camel-lock.c
index a4e712f,f871bbc..82295f6
--- a/camel/camel-lock.c
+++ b/camel/camel-lock.c
@@@ -69,11 -70,10 +69,11 @@@
* Create an exclusive lock using .lock semantics.
* All locks are equivalent to write locks (exclusive).
*
- * Return value: -1 on error, sets @ex appropriately.
+ * Returns: -1 on error, sets @ex appropriately.
**/
gint
-camel_lock_dot(const gchar *path, CamelException *ex)
+camel_lock_dot (const gchar *path,
+ GError **error)
{
#ifdef USE_DOT
gchar *locktmp, *lock;
@@@ -183,12 -178,10 +183,12 @@@ camel_unlock_dot(const gchar *path
* @type is CAMEL_LOCK_WRITE or CAMEL_LOCK_READ,
* to create exclusive or shared read locks
*
- * Return value: -1 on error.
+ * Returns: -1 on error.
**/
gint
-camel_lock_fcntl(gint fd, CamelLockType type, CamelException *ex)
+camel_lock_fcntl (gint fd,
+ CamelLockType type,
+ GError **error)
{
#ifdef USE_FCNTL
struct flock lock;
@@@ -251,12 -242,10 +251,12 @@@ camel_unlock_fcntl(gint fd
* @type is CAMEL_LOCK_WRITE or CAMEL_LOCK_READ,
* to create exclusive or shared read locks
*
- * Return value: -1 on error.
+ * Returns: -1 on error.
**/
gint
-camel_lock_flock(gint fd, CamelLockType type, CamelException *ex)
+camel_lock_flock (gint fd,
+ CamelLockType type,
+ GError **error)
{
#ifdef USE_FLOCK
gint op;
@@@ -306,13 -293,10 +306,13 @@@ camel_unlock_flock(gint fd
* Attempt to lock a folder, multiple attempts will be made using all
* locking strategies available.
*
- * Return value: -1 on error, @ex will describe the locking system that failed.
+ * Returns: -1 on error, @ex will describe the locking system that failed.
**/
gint
-camel_lock_folder(const gchar *path, gint fd, CamelLockType type, CamelException *ex)
+camel_lock_folder (const gchar *path,
+ gint fd,
+ CamelLockType type,
+ GError **error)
{
gint retry = 0;
diff --cc camel/camel-mime-filter-progress.c
index 696bc14,c4dcfee..ad0357a
--- a/camel/camel-mime-filter-progress.c
+++ b/camel/camel-mime-filter-progress.c
@@@ -122,21 -128,17 +122,23 @@@ camel_mime_filter_progress_init (CamelM
* streaming progress.
*
* Returns: a new #CamelMimeFilter object
+ *
+ * Since: 2.24
**/
CamelMimeFilter *
-camel_mime_filter_progress_new (CamelOperation *operation, gsize total)
+camel_mime_filter_progress_new (CamelOperation *operation,
+ gsize total)
{
CamelMimeFilter *filter;
+ CamelMimeFilterProgressPrivate *priv;
+
+ g_return_val_if_fail (operation != NULL, NULL);
+
+ filter = g_object_new (CAMEL_TYPE_MIME_FILTER_PROGRESS, NULL);
+ priv = CAMEL_MIME_FILTER_PROGRESS_GET_PRIVATE (filter);
- filter = (CamelMimeFilter *) camel_object_new (camel_mime_filter_progress_get_type ());
- ((CamelMimeFilterProgress *) filter)->operation = operation;
- ((CamelMimeFilterProgress *) filter)->total = total;
+ priv->operation = operation;
+ priv->total = total;
return filter;
}
diff --cc camel/camel-mime-filter-progress.h
index e30c9bc,12d3608..701aa94
--- a/camel/camel-mime-filter-progress.h
+++ b/camel/camel-mime-filter-progress.h
@@@ -51,13 -32,20 +51,18 @@@
G_BEGIN_DECLS
-typedef struct _CamelMimeFilterProgressClass CamelMimeFilterProgressClass;
typedef struct _CamelMimeFilterProgress CamelMimeFilterProgress;
+typedef struct _CamelMimeFilterProgressClass CamelMimeFilterProgressClass;
+typedef struct _CamelMimeFilterProgressPrivate CamelMimeFilterProgressPrivate;
+ /**
+ * CamelMimeFilterProgress:
+ *
+ * Since: 2.24
+ **/
struct _CamelMimeFilterProgress {
CamelMimeFilter parent;
-
- CamelOperation *operation;
- gsize total;
- gsize count;
+ CamelMimeFilterProgressPrivate *priv;
};
struct _CamelMimeFilterProgressClass {
diff --cc camel/camel-mime-parser.c
index 7312358,76569e3..1ade04a
--- a/camel/camel-mime-parser.c
+++ b/camel/camel-mime-parser.c
@@@ -33,6 -33,9 +33,7 @@@
#include <sys/stat.h>
#include <sys/types.h>
-#include <glib.h>
+
-#include "camel-mempool.h"
#include "camel-mime-filter.h"
#include "camel-mime-parser.h"
#include "camel-mime-utils.h"
@@@ -314,10 -348,12 +319,12 @@@ camel_mime_parser_header(CamelMimeParse
* current state of the parser. These headers are valid
* until the next call to parser_step(), or parser_drop_step().
*
- * Return value: The raw headers, or NULL if there are no headers
+ * Returns: The raw headers, or NULL if there are no headers
* defined for the current part or state. These are READ ONLY.
+ *
+ * Since: 2.22
**/
-struct _camel_header_raw *
+GQueue *
camel_mime_parser_headers_raw(CamelMimeParser *m)
{
struct _header_scan_state *s = _PRIVATE(m);
@@@ -436,16 -476,14 +449,16 @@@ camel_mime_parser_init_with_fd(CamelMim
* the stream. As a result, seekable streams should only
* be seeked using the parser seek function.
*
- * Return value: -1 on error.
+ * Returns: -1 on error.
**/
gint
-camel_mime_parser_init_with_stream(CamelMimeParser *m, CamelStream *stream)
+camel_mime_parser_init_with_stream (CamelMimeParser *parser,
+ CamelStream *stream,
+ GError **error)
{
- struct _header_scan_state *s = _PRIVATE(m);
+ struct _header_scan_state *s = _PRIVATE (parser);
- return folder_scan_init_with_stream(s, stream);
+ return folder_scan_init_with_stream (s, stream, error);
}
/**
diff --cc camel/camel-mime-part-utils.c
index 6c69fa8,477401e..f33cd8e
--- a/camel/camel-mime-part-utils.c
+++ b/camel/camel-mime-part-utils.c
@@@ -77,17 -74,17 +77,21 @@@ simple_data_wrapper_construct_from_pars
d(printf("message part kept in memory!\n"));
mem = camel_stream_mem_new_with_byte_array (buffer);
- camel_data_wrapper_construct_from_stream (dw, mem);
- camel_object_unref (mem);
+ retval = camel_data_wrapper_construct_from_stream (dw, mem, error);
+ g_object_unref (mem);
+
+ return (retval == 0);
}
- /* This replaces the data wrapper repository ... and/or could be replaced by it? */
+ /**
+ * camel_mime_part_construct_content_from_parser:
+ *
+ * Since: 2.24
+ **/
-void
-camel_mime_part_construct_content_from_parser (CamelMimePart *dw, CamelMimeParser *mp)
+gboolean
+camel_mime_part_construct_content_from_parser (CamelMimePart *dw,
+ CamelMimeParser *mp,
+ GError **error)
{
CamelDataWrapper *content = NULL;
CamelContentType *ct;
@@@ -146,13 -144,15 +150,18 @@@
}
g_free (encoding);
+
+ return success;
}
+ /**
+ * camel_mime_message_build_preview:
+ *
+ * Since: 2.28
+ **/
gboolean
-camel_mime_message_build_preview (CamelMimePart *msg, CamelMessageInfo *info)
+camel_mime_message_build_preview (CamelMimePart *msg,
+ CamelMessageInfo *info)
{
CamelDataWrapper *dw;
gboolean got_plain = FALSE;
diff --cc camel/camel-net-utils.c
index 6920c44,3ca1ae1..7e20a62
--- a/camel/camel-net-utils.c
+++ b/camel/camel-net-utils.c
@@@ -663,11 -659,13 +663,16 @@@ cs_getaddrinfo(gpointer data
}
#endif /* NEED_ADDRINFO */
+ /**
+ * camel_getaddrinfo:
+ *
+ * Since: 2.22
+ **/
struct addrinfo *
-camel_getaddrinfo(const gchar *name, const gchar *service, const struct addrinfo *hints, CamelException *ex)
+camel_getaddrinfo (const gchar *name,
+ const gchar *service,
+ const struct addrinfo *hints,
+ GError **error)
{
struct _addrinfo_msg *msg;
struct addrinfo *res = NULL;
@@@ -804,13 -802,13 +814,18 @@@ cs_getnameinfo(gpointer data
}
#endif
+ /**
+ * camel_getnameinfo:
+ *
+ * Since: 2.22
+ **/
gint
-camel_getnameinfo(const struct sockaddr *sa, socklen_t salen, gchar **host, gchar **serv, gint flags, CamelException *ex)
+camel_getnameinfo (const struct sockaddr *sa,
+ socklen_t salen,
+ gchar **host,
+ gchar **serv,
+ gint flags,
+ GError **error)
{
struct _addrinfo_msg *msg;
gint result;
diff --cc camel/camel-object.c
index 965cfaf,e8f4b25..bb0752f
--- a/camel/camel-object.c
+++ b/camel/camel-object.c
@@@ -77,9 -85,30 +77,7 @@@ typedef struct _CamelHookPai
gpointer data;
} CamelHookPair;
-struct _CamelObjectBagKey {
- struct _CamelObjectBagKey *next;
-
- gpointer key; /* the key reserved */
- gint waiters; /* count of threads waiting for key */
- pthread_t owner; /* the thread that has reserved the bag for a new entry */
- gint have_owner;
- GCond *cond;
-};
-
-struct _CamelObjectBag {
- GHashTable *object_table; /* object by key */
- GHashTable *key_table; /* key by object */
- GEqualFunc equal_key;
- CamelCopyFunc copy_key;
- GFreeFunc free_key;
-
- struct _CamelObjectBagKey *reserved;
-};
-
-/* used to tag a bag hookpair */
-static const gchar bag_name[] = "object:bag";
-
/* meta-data stuff */
- static void co_metadata_free(CamelObject *obj, CamelObjectMeta *meta);
- static CamelObjectMeta *co_metadata_get(CamelObject *obj);
static CamelHookPair *co_metadata_pair(CamelObject *obj, gint create);
static const gchar meta_name[] = "object:meta";
@@@ -158,11 -239,8 +156,8 @@@ cobject_getv (CamelObject *o
switch (tag & CAMEL_ARG_TAG) {
case CAMEL_OBJECT_ARG_DESCRIPTION:
- *arg->ca_str = (gchar *)o->klass->name;
+ *arg->ca_str = (gchar *) G_OBJECT_CLASS_NAME (class);
break;
- case CAMEL_OBJECT_ARG_METADATA:
- *arg->ca_ptr = co_metadata_get(o);
- break;
case CAMEL_OBJECT_ARG_STATE_FILE: {
CamelHookPair *pair = co_metadata_pair(o, FALSE);
@@@ -518,25 -516,116 +410,23 @@@ object_dispose (GObject *object
}
static void
-camel_type_class_init(CamelObjectClass *klass, CamelObjectClass *type)
-{
- if (type->parent)
- camel_type_class_init(klass, type->parent);
-
- if (type->klass_init)
- type->klass_init(klass);
-}
-
-static CamelType
-co_type_register(CamelType parent, const gchar * name,
- /*guint ver, guint rev,*/
- gsize object_size, gsize klass_size,
- CamelObjectClassInitFunc class_init,
- CamelObjectClassFinalizeFunc class_finalise,
- CamelObjectInitFunc object_init,
- CamelObjectFinalizeFunc object_finalise)
+camel_object_class_init (CamelObjectClass *class)
{
- CamelObjectClass *klass;
- /*int offset;
- gsize size;*/
-
- TYPE_LOCK();
-
- camel_type_init(); /* has a static boolean itself */
-
- /* Have to check creation, it might've happened in another thread before we got here */
- klass = g_hash_table_lookup(type_table, name);
- if (klass != NULL) {
- if (klass->klass_size != klass_size || klass->object_size != object_size
- || klass->klass_init != class_init || klass->klass_finalise != class_finalise
- || klass->init != object_init || klass->finalise != object_finalise) {
- g_warning("camel_type_register: Trying to re-register class '%s'", name);
- klass = NULL;
- }
- TYPE_UNLOCK();
- return klass;
- }
-
- /* this is for objects with no parent as part of their struct ('interfaces'?) */
- /*offset = parent?parent->klass_size:0;
- offset = (offset + 3) & (~3);
-
- size = offset + klass_size;
-
- klass = g_slice_alloc0(size);
-
- klass->klass_size = size;
- klass->klass_data = offset;
+ GObjectClass *object_class;
- offset = parent?parent->object_size:0;
- offset = (offset + 3) & (~3);
+ object_class = G_OBJECT_CLASS (class);
+ object_class->dispose = object_dispose;
- klass->object_size = offset + object_size;
- klass->object_data = offset;*/
+ class->hooks = NULL;
- if (parent
- && klass_size < parent->klass_size) {
- g_warning("camel_type_register: '%s' has smaller class size than parent '%s'", name, parent->name);
- TYPE_UNLOCK();
- return NULL;
- }
-
- klass = g_slice_alloc0 (klass_size);
- klass->klass_size = klass_size;
- klass->object_size = object_size;
- klass->lock = g_mutex_new();
- klass->hooks = NULL;
-
- klass->parent = parent;
- if (parent) {
- klass->next = parent->child;
- parent->child = klass;
- }
- klass->name = name;
-
- /*klass->version = ver;
- klass->revision = rev;*/
-
- klass->klass_init = class_init;
- klass->klass_finalise = class_finalise;
+ class->getv = cobject_getv;
+ class->setv = cobject_setv;
+ class->free = cobject_free;
- class->meta_get = cobject_meta_get;
- class->meta_set = cobject_meta_set;
- klass->init = object_init;
- klass->finalise = object_finalise;
+ class->state_read = cobject_state_read;
+ class->state_write = cobject_state_write;
- /* setup before class init, incase class init func uses the type or looks it up ? */
- g_hash_table_insert(type_table, (gpointer)name, klass);
-
- camel_type_class_init(klass, klass);
-
- TYPE_UNLOCK();
-
- return klass;
-}
-
-CamelType
-camel_type_register(CamelType parent, const gchar * name,
- /*guint ver, guint rev,*/
- gsize object_size, gsize klass_size,
- CamelObjectClassInitFunc class_init,
- CamelObjectClassFinalizeFunc class_finalise,
- CamelObjectInitFunc object_init,
- CamelObjectFinalizeFunc object_finalise)
-{
- if (parent != NULL && parent->magic != CAMEL_OBJECT_CLASS_MAGIC) {
- g_warning("camel_type_register: invalid junk parent class for '%s'", name);
- return NULL;
- }
-
- return co_type_register(parent, name, object_size, klass_size, class_init, class_finalise, object_init, object_finalise);
+ camel_object_class_add_event (class, "finalize", NULL);
}
static void
@@@ -603,28 -963,23 +493,23 @@@ camel_object_class_add_event (CamelObje
static void
camel_object_free_hooks(CamelObject *o)
{
- CamelHookPair *pair, *next;
+ CamelHookPair *pair, *next;
- if (o->hooks) {
- g_assert(o->hooks->depth == 0);
- g_assert((o->hooks->flags & CAMEL_HOOK_PAIR_REMOVED) == 0);
+ if (o->hooks) {
+ g_assert(o->hooks->depth == 0);
+ g_assert((o->hooks->flags & CAMEL_HOOK_PAIR_REMOVED) == 0);
- pair = o->hooks->list;
- while (pair) {
- next = pair->next;
+ pair = o->hooks->list;
+ while (pair) {
+ next = pair->next;
- if (pair->name == meta_name) {
- co_metadata_free(o, pair->data);
- g_free(pair->func.filename);
- }
-
- pair_free(pair);
- pair = next;
- }
- g_static_rec_mutex_free(&o->hooks->lock);
- hooks_free(o->hooks);
- o->hooks = NULL;
- }
+ pair_free(pair);
+ pair = next;
+ }
+ g_static_rec_mutex_free(&o->hooks->lock);
+ hooks_free(o->hooks);
+ o->hooks = NULL;
+ }
}
/* return (allocate if required) the object's hook list, locking at the same time */
@@@ -954,80 -1300,11 +839,19 @@@ camel_object_get (gpointer vo
return ret;
}
- gpointer
- camel_object_get_ptr (gpointer vo,
- GError **error,
- gint tag)
- {
- CamelObjectClass *class;
- CamelObject *o = vo;
- CamelArgGetV args;
- gint ret = 0;
- gpointer val = NULL;
-
- g_return_val_if_fail(CAMEL_IS_OBJECT(o), NULL);
- g_return_val_if_fail((tag & CAMEL_ARG_TYPE) == CAMEL_ARG_OBJ
- || (tag & CAMEL_ARG_TYPE) == CAMEL_ARG_STR
- || (tag & CAMEL_ARG_TYPE) == CAMEL_ARG_PTR, NULL);
-
- /* woefully inefficient, *shrug */
- args.argc = 1;
- args.argv[0].tag = tag;
- args.argv[0].ca_ptr = &val;
-
- class = CAMEL_OBJECT_GET_CLASS (o);
- g_return_val_if_fail (class->getv != NULL, NULL);
-
- ret = class->getv(o, error, &args);
- if (ret != 0)
- return NULL;
- else
- return val;
- }
-
- gint
- camel_object_get_int (gpointer vo,
- GError **error,
- gint tag)
- {
- CamelObjectClass *class;
- CamelObject *o = vo;
- CamelArgGetV args;
- gint ret = 0;
- gint val = 0;
-
- g_return_val_if_fail(CAMEL_IS_OBJECT(o), 0);
- g_return_val_if_fail((tag & CAMEL_ARG_TYPE) == CAMEL_ARG_INT
- || (tag & CAMEL_ARG_TYPE) == CAMEL_ARG_BOO, 0);
-
- /* woefully inefficient, *shrug */
- args.argc = 1;
- args.argv[0].tag = tag;
- args.argv[0].ca_int = &val;
-
- class = CAMEL_OBJECT_GET_CLASS (o);
- g_return_val_if_fail (class->getv != NULL, 0);
-
- ret = class->getv(o, error, &args);
- if (ret != 0)
- return 0;
- else
- return val;
- }
-
-gint camel_object_getv(gpointer vo, CamelException *ex, CamelArgGetV *args)
+gint
+camel_object_getv (gpointer vo,
+ GError **error,
+ CamelArgGetV *args)
{
+ CamelObjectClass *class;
+
g_return_val_if_fail(CAMEL_IS_OBJECT(vo), -1);
- return ((CamelObject *)vo)->klass->getv(vo, ex, args);
+ class = CAMEL_OBJECT_GET_CLASS (vo);
+ g_return_val_if_fail (class->getv != NULL, -1);
+
+ return class->getv (vo, error, args);
}
/* NB: If this doesn't return NULL, then you must unget_hooks when done */
diff --cc camel/camel-object.h
index cccb381,61fb6aa..17c3fcc
--- a/camel/camel-object.h
+++ b/camel/camel-object.h
@@@ -69,8 -42,37 +69,7 @@@ G_BEGIN_DECL
typedef struct _CamelObjectClass CamelObjectClass;
typedef struct _CamelObject CamelObject;
typedef guint CamelObjectHookID;
- typedef struct _CamelObjectMeta CamelObjectMeta;
-typedef void (*CamelObjectClassInitFunc) (CamelObjectClass *);
-typedef void (*CamelObjectClassFinalizeFunc) (CamelObjectClass *);
-typedef void (*CamelObjectInitFunc) (CamelObject *, CamelObjectClass *);
-typedef void (*CamelObjectFinalizeFunc) (CamelObject *);
-
typedef gboolean (*CamelObjectEventPrepFunc) (CamelObject *, gpointer);
typedef void (*CamelObjectEventHookFunc) (CamelObject *, gpointer, gpointer);
@@@ -94,21 -91,18 +91,11 @@@ enum
/* sets where the persistent data should reside, otherwise it isn't persistent */
CAMEL_OBJECT_STATE_FILE = CAMEL_OBJECT_ARG_STATE_FILE | CAMEL_ARG_STR,
/* returns a GSList CamelProperties of persistent properties */
- CAMEL_OBJECT_PERSISTENT_PROPERTIES = CAMEL_OBJECT_ARG_PERSISTENT_PROPERTIES | CAMEL_ARG_PTR
- };
-
- /* returned by get::CAMEL_OBJECT_METADATA */
- struct _CamelObjectMeta {
- CamelObjectMeta *next;
-
- gchar *value;
- gchar name[1]; /* allocated as part of structure */
+ CAMEL_OBJECT_PERSISTENT_PROPERTIES = CAMEL_OBJECT_ARG_PERSISTENT_PROPERTIES
};
-typedef enum _CamelObjectFlags {
- CAMEL_OBJECT_DESTROY = (1<<0)
-} CamelObjectFlags;
-
-/* TODO: create a simpleobject which has no events on it, or an interface for events */
struct _CamelObject {
- struct _CamelObjectClass *klass;
-
- guint32 magic; /* only really needed for debugging ... */
+ GObject parent;
/* current hooks on this object */
struct _CamelHookList *hooks;
@@@ -123,25 -139,68 +110,21 @@@ struct _CamelObjectClass
/* root-class fields follow, type system above */
/* get/set interface */
- gint (*setv)(struct _CamelObject *, struct _CamelException *ex, CamelArgV *args);
- gint (*getv)(struct _CamelObject *, struct _CamelException *ex, CamelArgGetV *args);
+ gint (*setv)(CamelObject *, GError **error, CamelArgV *args);
+ gint (*getv)(CamelObject *, GError **error, CamelArgGetV *args);
/* we only free 1 at a time, and only pointer types, obviously */
- void (*free)(struct _CamelObject *, guint32 tag, gpointer ptr);
+ void (*free)(CamelObject *, guint32 tag, gpointer ptr);
- /* get/set meta-data interface */
- gchar *(*meta_get)(CamelObject *, const gchar * name);
- gboolean (*meta_set)(CamelObject *, const gchar * name, const gchar *value);
-
/* persistence stuff */
- gint (*state_read)(struct _CamelObject *, FILE *fp);
- gint (*state_write)(struct _CamelObject *, FILE *fp);
+ gint (*state_read)(CamelObject *, FILE *fp);
+ gint (*state_write)(CamelObject *, FILE *fp);
};
-/* The type system .... it's pretty simple..... */
-void camel_type_init (void);
-CamelType camel_type_register(CamelType parent, const gchar * name, /*guint ver, guint rev,*/
- gsize instance_size,
- gsize classfuncs_size,
- CamelObjectClassInitFunc class_init,
- CamelObjectClassFinalizeFunc class_finalize,
- CamelObjectInitFunc instance_init,
- CamelObjectFinalizeFunc instance_finalize);
-
-/* deprecated interface */
-#define camel_type_get_global_classfuncs(x) ((CamelObjectClass *)(x))
-
/* object class methods (types == classes now) */
-const gchar *camel_type_to_name (CamelType type);
-CamelType camel_name_to_type (const gchar *name);
void camel_object_class_add_event (CamelObjectClass *klass, const gchar *name, CamelObjectEventPrepFunc prep);
-void camel_object_class_dump_tree (CamelType root);
-
-/* casting */
-CamelObject *camel_object_cast(CamelObject *obj, CamelType ctype);
-gboolean camel_object_is(CamelObject *obj, CamelType ctype);
-
-CamelObjectClass *camel_object_class_cast (CamelObjectClass *klass, CamelType ctype);
-gboolean camel_object_class_is (CamelObjectClass *klass, CamelType ctype);
-
-CamelType camel_object_get_type (void);
-
-CamelObject *camel_object_new (CamelType type);
-
-void camel_object_ref(gpointer);
-void camel_object_unref(gpointer);
-
-#ifdef CAMEL_DEBUG
-#define camel_object_ref(o) (printf("%s (%s:%d):ref (%p)\n", __FUNCTION__, __FILE__, __LINE__, o), camel_object_ref(o))
-#define camel_object_unref(o) (printf("%s (%s:%d):unref (%p)\n", __FUNCTION__, __FILE__, __LINE__, o), camel_object_unref (o))
-#endif
+GType camel_object_get_type (void);
+GQuark camel_error_quark (void) G_GNUC_CONST;
/* hooks */
CamelObjectHookID camel_object_hook_event(gpointer obj, const gchar *name, CamelObjectEventHookFunc hook, gpointer data);
@@@ -150,19 -209,11 +133,11 @@@ void camel_object_unhook_event(gpointe
void camel_object_trigger_event(gpointer obj, const gchar *name, gpointer event_data);
/* get/set methods */
-gint camel_object_set(gpointer obj, struct _CamelException *ex, ...);
-gint camel_object_setv(gpointer obj, struct _CamelException *ex, CamelArgV *);
-gint camel_object_get(gpointer obj, struct _CamelException *ex, ...);
-gint camel_object_getv(gpointer obj, struct _CamelException *ex, CamelArgGetV *);
+gint camel_object_set(gpointer obj, GError **error, ...);
+gint camel_object_setv(gpointer obj, GError **error, CamelArgV *);
+gint camel_object_get(gpointer obj, GError **error, ...);
+gint camel_object_getv(gpointer obj, GError **error, CamelArgGetV *);
- /* not very efficient one-time calls */
- gpointer camel_object_get_ptr(gpointer vo, GError **error, gint tag);
- gint camel_object_get_int(gpointer vo, GError **error, gint tag);
-
- /* meta-data for user-specific data */
- gchar *camel_object_meta_get(gpointer vo, const gchar * name);
- gboolean camel_object_meta_set(gpointer vo, const gchar * name, const gchar *value);
-
/* reads/writes the state from/to the CAMEL_OBJECT_STATE_FILE */
gint camel_object_state_read(gpointer vo);
gint camel_object_state_write(gpointer vo);
diff --cc camel/camel-offline-store.c
index 80e7a09,5cf2681..554e1d1
--- a/camel/camel-offline-store.c
+++ b/camel/camel-offline-store.c
@@@ -77,10 -103,11 +77,12 @@@ camel_offline_store_init (CamelOfflineS
*
* Return the network state either #CAMEL_OFFLINE_STORE_NETWORK_AVAIL
* or #CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL.
+ *
+ * Since: 2.24
**/
gint
-camel_offline_store_get_network_state (CamelOfflineStore *store, CamelException *ex)
+camel_offline_store_get_network_state (CamelOfflineStore *store,
+ GError **error)
{
return store->state;
}
@@@ -147,10 -176,15 +149,15 @@@ camel_offline_store_set_network_state (
store->state = state;
}
+ /**
+ * camel_offline_store_prepare_for_offline:
+ *
+ * Since: 2.22
+ **/
void
-camel_offline_store_prepare_for_offline (CamelOfflineStore *store, CamelException *ex)
+camel_offline_store_prepare_for_offline (CamelOfflineStore *store,
+ GError **error)
{
- CamelException lex;
CamelService *service = CAMEL_SERVICE (store);
gboolean network_state = camel_session_get_network_state (service->session);
diff --cc camel/camel-provider.c
index f785003,7a652d4..9513867
--- a/camel/camel-provider.c
+++ b/camel/camel-provider.c
@@@ -346,11 -341,10 +346,11 @@@ camel_provider_list(gboolean load
* This returns the CamelProvider that would be used to handle
* @url_string, loading it in from disk if necessary.
*
- * Return value: the provider, or %NULL, in which case @error will be set.
- * Returns: the provider, or %NULL, in which case @ex will be set.
++ * Returns: the provider, or %NULL, in which case @error will be set.
**/
CamelProvider *
-camel_provider_get(const gchar *url_string, CamelException *ex)
+camel_provider_get (const gchar *url_string,
+ GError **error)
{
CamelProvider *provider = NULL;
gchar *protocol;
diff --cc camel/camel-seekable-stream.c
index 0ab658c,1d6001e..a3675b5
--- a/camel/camel-seekable-stream.c
+++ b/camel/camel-seekable-stream.c
@@@ -105,22 -112,21 +105,22 @@@ camel_seekable_stream_init (CamelSeekab
* to the range specified by its lower and upper bounds, and the
* stream's eos state will be updated.
*
- * Return value: new position, %-1 if operation failed.
+ * Returns: new position, %-1 if operation failed.
**/
off_t
-camel_seekable_stream_seek (CamelSeekableStream *stream, off_t offset,
- CamelStreamSeekPolicy policy)
+camel_seekable_stream_seek (CamelSeekableStream *stream,
+ off_t offset,
+ CamelStreamSeekPolicy policy,
+ GError **error)
{
+ CamelSeekableStreamClass *class;
+
g_return_val_if_fail (CAMEL_IS_SEEKABLE_STREAM (stream), -1);
- return CSS_CLASS (stream)->seek (stream, offset, policy);
-}
+ class = CAMEL_SEEKABLE_STREAM_GET_CLASS (stream);
+ g_return_val_if_fail (class->seek != NULL, -1);
-static off_t
-stream_tell (CamelSeekableStream *stream)
-{
- return stream->position;
+ return class->seek (stream, offset, policy, error);
}
/**
diff --cc camel/camel-session.c
index 2c5139b,5b626ac..00844f2
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@@ -569,12 -428,14 +569,17 @@@ camel_session_alert_user (CamelSession
g_return_val_if_fail (CAMEL_IS_SESSION (session), FALSE);
g_return_val_if_fail (prompt != NULL, FALSE);
- return CS_CLASS (session)->alert_user (session, type, prompt, cancel);
+ class = CAMEL_SESSION_GET_CLASS (session);
+ g_return_val_if_fail (class->alert_user != NULL, FALSE);
+
+ return class->alert_user (session, type, prompt, cancel);
}
+ /**
+ * camel_session_lookup_addressbook:
+ *
+ * Since: 2.22
+ **/
gboolean
camel_session_lookup_addressbook (CamelSession *session, const gchar *name)
{
@@@ -877,23 -840,13 +894,25 @@@ camel_session_get_junk_headers (CamelSe
* @message Message to forward.
* @address Where forward to.
* @ex Exception.
+ *
+ * Since: 2.26
**/
void
-camel_session_forward_to (CamelSession *session, CamelFolder *folder, CamelMimeMessage *message, const gchar *address, CamelException *ex)
+camel_session_forward_to (CamelSession *session,
+ CamelFolder *folder,
+ CamelMimeMessage *message,
+ const gchar *address,
+ GError **error)
{
+ CamelSessionClass *class;
+
g_return_if_fail (CAMEL_IS_SESSION (session));
+ g_return_if_fail (CAMEL_IS_FOLDER (folder));
+ g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
+ g_return_if_fail (address != NULL);
+
+ class = CAMEL_SESSION_GET_CLASS (session);
+ g_return_if_fail (class->forward_to != NULL);
- CS_CLASS (session)->forward_to (session, folder, message, address, ex);
+ class->forward_to (session, folder, message, address, error);
}
diff --cc camel/camel-store.c
index b75fd32,e62fa99..be8ebaf
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@@ -1019,14 -1011,14 +1021,14 @@@ folder_info_cmp (gconstpointer ap, gcon
/**
* camel_folder_info_build:
* @folders: an array of #CamelFolderInfo
-- * @namespace: an ignorable prefix on the folder names
++ * @name_space: an ignorable prefix on the folder names
* @separator: the hieararchy separator character
* @short_names: %TRUE if the (short) name of a folder is the part after
* the last @separator in the full name. %FALSE if it is the full name.
*
* This takes an array of folders and attaches them together according
* to the hierarchy described by their full_names and @separator. If
-- * @namespace is non-%NULL, then it will be ignored as a full_name
++ * @name_space is non-%NULL, then it will be ignored as a full_name
* prefix, for purposes of comparison. If necessary,
* #camel_folder_info_build will create additional #CamelFolderInfo with
* %NULL urls to fill in gaps in the tree. The value of @short_names
@@@ -1038,7 -1030,7 +1040,7 @@@
* Returns: the top level of the tree of linked folder info.
**/
CamelFolderInfo *
--camel_folder_info_build (GPtrArray *folders, const gchar *namespace,
++camel_folder_info_build (GPtrArray *folders, const gchar *name_space,
gchar separator, gboolean short_names)
{
CamelFolderInfo *fi, *pfi, *top = NULL, *tail = NULL;
@@@ -1046,9 -1038,9 +1048,9 @@@
gchar *p, *pname;
gint i, nlen;
-- if (!namespace)
-- namespace = "";
-- nlen = strlen (namespace);
++ if (!name_space)
++ name_space = "";
++ nlen = strlen (name_space);
qsort (folders->pdata, folders->len, sizeof (folders->pdata[0]), folder_info_cmp);
@@@ -1062,7 -1054,7 +1064,7 @@@
/* Now find parents. */
for (i = 0; i < folders->len; i++) {
fi = folders->pdata[i];
-- if (!strncmp (namespace, fi->full_name, nlen)
++ if (!strncmp (name_space, fi->full_name, nlen)
&& (p = strrchr(fi->full_name+nlen, separator))) {
pname = g_strndup(fi->full_name, p - fi->full_name);
pfi = g_hash_table_lookup(hash, pname);
@@@ -1389,19 -1383,14 +1391,21 @@@ camel_store_folder_uri_equal (CamelStor
* Default behavior is that all Inbox folders are intended to be refreshed.
*
* Returns: whether folder should be checked for new mails
+ *
+ * Since: 2.22
**/
gboolean
-camel_store_can_refresh_folder (CamelStore *store, CamelFolderInfo *info, CamelException *ex)
+camel_store_can_refresh_folder (CamelStore *store,
+ CamelFolderInfo *info,
+ GError **error)
{
- g_return_val_if_fail (store != NULL, FALSE);
+ CamelStoreClass *class;
+
+ g_return_val_if_fail (CAMEL_IS_STORE (store), FALSE);
g_return_val_if_fail (info != NULL, FALSE);
- return CS_CLASS (store)->can_refresh_folder (store, info, ex);
+ class = CAMEL_STORE_GET_CLASS (store);
+ g_return_val_if_fail (class->can_refresh_folder != NULL, FALSE);
+
+ return class->can_refresh_folder (store, info, error);
}
diff --cc camel/camel-store.h
index 06c9c2e,3f688ea..028db84
--- a/camel/camel-store.h
+++ b/camel/camel-store.h
@@@ -142,17 -115,21 +142,25 @@@ typedef struct _CamelRenameInfo
#define CAMEL_STORE_FILTER_INBOX (1 << 2)
#define CAMEL_STORE_VJUNK (1 << 3)
#define CAMEL_STORE_PROXY (1 << 4)
+
+ /**
+ * CAMEL_STORE_IS_MIGRATING:
+ *
+ * Since: 2.26
+ **/
#define CAMEL_STORE_IS_MIGRATING (1 << 5)
+ #define CAMEL_STORE_ASYNC (1 << 6)
+
struct _CamelDB;
+typedef struct _CamelStore CamelStore;
+typedef struct _CamelStoreClass CamelStoreClass;
+typedef struct _CamelStorePrivate CamelStorePrivate;
+
struct _CamelStore {
- CamelService parent_object;
- struct _CamelStorePrivate *priv;
+ CamelService parent;
+ CamelStorePrivate *priv;
CamelObjectBag *folders;
struct _CamelDB *cdb_r;
@@@ -179,136 -156,144 +187,141 @@@
#define CAMEL_STORE_FOLDER_INFO_RECURSIVE (1 << 1)
#define CAMEL_STORE_FOLDER_INFO_SUBSCRIBED (1 << 2)
#define CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL (1 << 3) /* don't include vTrash/vJunk folders */
- /* Fetch only the subscription list. Clients should use this */
- /* flag for requesting the list of folders available for */
- /* subscription. Used in Exchange / IMAP connectors for public */
- /* folder fetching */
+ /**
+ * CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST:
+ *
+ * Fetch only the subscription list. Clients should use this
+ * flag for requesting the list of folders available for
+ * subscription. Used in Exchange / IMAP connectors for public
+ * folder fetching.
+ *
+ * Since: 2.28
+ **/
#define CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST (1 << 4)
-typedef struct {
+struct _CamelStoreClass {
CamelServiceClass parent_class;
- GHashFunc hash_folder_name;
- GCompareFunc compare_folder_name;
-
- CamelFolder * (*get_folder) (CamelStore *store,
- const gchar *folder_name,
- guint32 flags,
- CamelException *ex);
-
- CamelFolder * (*get_inbox) (CamelStore *store, CamelException *ex);
- CamelFolder * (*get_trash) (CamelStore *store, CamelException *ex);
- CamelFolder * (*get_junk) (CamelStore *store, CamelException *ex);
-
- CamelFolderInfo *(*create_folder) (CamelStore *store,
- const gchar *parent_name,
- const gchar *folder_name,
- CamelException *ex);
- void (*delete_folder) (CamelStore *store,
- const gchar *folder_name,
- CamelException *ex);
- void (*rename_folder) (CamelStore *store,
- const gchar *old_name,
- const gchar *new_name,
- CamelException *ex);
-
- void (*sync) (CamelStore *store, gint expunge, CamelException *ex);
-
- CamelFolderInfo *(*get_folder_info) (CamelStore *store,
- const gchar *top,
- guint32 flags,
- CamelException *ex);
- void (*free_folder_info) (CamelStore *store,
- CamelFolderInfo *fi);
-
- gboolean (*folder_subscribed) (CamelStore *store,
- const gchar *folder_name);
- void (*subscribe_folder) (CamelStore *store,
- const gchar *folder_name,
- CamelException *ex);
- void (*unsubscribe_folder) (CamelStore *store,
- const gchar *folder_name,
- CamelException *ex);
- void (*noop) (CamelStore *store,
- CamelException *ex);
-
- gboolean (*can_refresh_folder) (CamelStore *store,
- CamelFolderInfo *info,
- CamelException *ex);
-
-} CamelStoreClass;
-
-/* Standard Camel function */
-CamelType camel_store_get_type (void);
-
-/* public methods */
-CamelFolder * camel_store_get_folder (CamelStore *store,
+ GHashFunc hash_folder_name;
+ GCompareFunc compare_folder_name;
+
+ CamelFolder * (*get_folder) (CamelStore *store,
const gchar *folder_name,
guint32 flags,
- CamelException *ex);
-CamelFolder * camel_store_get_inbox (CamelStore *store,
- CamelException *ex);
-CamelFolder * camel_store_get_trash (CamelStore *store,
- CamelException *ex);
-CamelFolder * camel_store_get_junk (CamelStore *store,
- CamelException *ex);
-
-CamelFolderInfo *camel_store_create_folder (CamelStore *store,
+ GError **error);
+ CamelFolder * (*get_inbox) (CamelStore *store,
+ GError **error);
+ CamelFolder * (*get_trash) (CamelStore *store,
+ GError **error);
+ CamelFolder * (*get_junk) (CamelStore *store,
+ GError **error);
+ CamelFolderInfo *
+ (*create_folder) (CamelStore *store,
const gchar *parent_name,
const gchar *folder_name,
- CamelException *ex);
-void camel_store_delete_folder (CamelStore *store,
+ GError **error);
+ gboolean (*delete_folder) (CamelStore *store,
const gchar *folder_name,
- CamelException *ex);
-void camel_store_rename_folder (CamelStore *store,
- const gchar *old_namein,
+ GError **error);
+ gboolean (*rename_folder) (CamelStore *store,
+ const gchar *old_name,
const gchar *new_name,
- CamelException *ex);
-
-void camel_store_sync (CamelStore *store, gint expunge, CamelException *ex);
-
-CamelFolderInfo *camel_store_get_folder_info (CamelStore *store,
+ GError **error);
+ gboolean (*sync) (CamelStore *store,
+ gint expunge,
+ GError **error);
+ CamelFolderInfo *
+ (*get_folder_info) (CamelStore *store,
const gchar *top,
guint32 flags,
- CamelException *ex);
-void camel_store_free_folder_info (CamelStore *store,
+ GError **error);
+ void (*free_folder_info) (CamelStore *store,
CamelFolderInfo *fi);
+ gboolean (*folder_subscribed) (CamelStore *store,
+ const gchar *folder_name);
+ gboolean (*subscribe_folder) (CamelStore *store,
+ const gchar *folder_name,
+ GError **error);
+ gboolean (*unsubscribe_folder) (CamelStore *store,
+ const gchar *folder_name,
+ GError **error);
+ gboolean (*noop) (CamelStore *store,
+ GError **error);
+ gboolean (*can_refresh_folder) (CamelStore *store,
+ CamelFolderInfo *info,
+ GError **error);
+};
-void camel_store_free_folder_info_full (CamelStore *store,
- CamelFolderInfo *fi);
-void camel_store_free_folder_info_nop (CamelStore *store,
- CamelFolderInfo *fi);
-
-CamelFolderInfo *camel_folder_info_new (void);
-void camel_folder_info_free (CamelFolderInfo *fi);
+GType camel_store_get_type (void);
+GQuark camel_store_error_quark (void) G_GNUC_CONST;
+CamelFolder * camel_store_get_folder (CamelStore *store,
+ const gchar *folder_name,
+ guint32 flags,
+ GError **error);
+CamelFolder * camel_store_get_inbox (CamelStore *store,
+ GError **error);
+CamelFolder * camel_store_get_trash (CamelStore *store,
+ GError **error);
+CamelFolder * camel_store_get_junk (CamelStore *store,
+ GError **error);
+CamelFolderInfo *
+ camel_store_create_folder (CamelStore *store,
+ const gchar *parent_name,
+ const gchar *folder_name,
+ GError **error);
+gboolean camel_store_delete_folder (CamelStore *store,
+ const gchar *folder_name,
+ GError **error);
+gboolean camel_store_rename_folder (CamelStore *store,
+ const gchar *old_namein,
+ const gchar *new_name,
+ GError **error);
+gboolean camel_store_sync (CamelStore *store,
+ gint expunge,
+ GError **error);
+CamelFolderInfo *
+ camel_store_get_folder_info (CamelStore *store,
+ const gchar *top,
+ guint32 flags,
+ GError **error);
+void camel_store_free_folder_info (CamelStore *store,
+ CamelFolderInfo *fi);
+void camel_store_free_folder_info_full
+ (CamelStore *store,
+ CamelFolderInfo *fi);
+void camel_store_free_folder_info_nop(CamelStore *store,
+ CamelFolderInfo *fi);
+CamelFolderInfo *
+ camel_folder_info_new (void);
+void camel_folder_info_free (CamelFolderInfo *fi);
+ #ifndef CAMEL_DISABLE_DEPRECATED
-CamelFolderInfo *camel_folder_info_build (GPtrArray *folders,
- const gchar *namespace,
- gchar separator,
- gboolean short_names);
++CamelFolderInfo *
++ camel_folder_info_build (GPtrArray *folders,
++ const gchar *name_space,
++ gchar separator,
++ gboolean short_names);
+ #endif /* CAMEL_DISABLE_DEPRECATED */
-CamelFolderInfo *camel_folder_info_clone (CamelFolderInfo *fi);
-
-gboolean camel_store_supports_subscriptions (CamelStore *store);
-
-gboolean camel_store_folder_subscribed (CamelStore *store,
- const gchar *folder_name);
-void camel_store_subscribe_folder (CamelStore *store,
- const gchar *folder_name,
- CamelException *ex);
-void camel_store_unsubscribe_folder (CamelStore *store,
- const gchar *folder_name,
- CamelException *ex);
-
-void camel_store_noop (CamelStore *store,
- CamelException *ex);
-
-gint camel_store_folder_uri_equal (CamelStore *store,
- const gchar *uri0,
- const gchar *uri1);
-
-gboolean camel_store_can_refresh_folder (CamelStore *store,
- CamelFolderInfo *info,
- CamelException *ex);
+CamelFolderInfo *
+ camel_folder_info_clone (CamelFolderInfo *fi);
+gboolean camel_store_supports_subscriptions
+ (CamelStore *store);
+gboolean camel_store_folder_subscribed (CamelStore *store,
+ const gchar *folder_name);
+gboolean camel_store_subscribe_folder (CamelStore *store,
+ const gchar *folder_name,
+ GError **error);
+gboolean camel_store_unsubscribe_folder (CamelStore *store,
+ const gchar *folder_name,
+ GError **error);
+gboolean camel_store_noop (CamelStore *store,
+ GError **error);
+gint camel_store_folder_uri_equal (CamelStore *store,
+ const gchar *uri0,
+ const gchar *uri1);
+gboolean camel_store_can_refresh_folder (CamelStore *store,
+ CamelFolderInfo *info,
+ GError **error);
- #ifndef CAMEL_DISABLE_DEPRECATED
- CamelFolderInfo *
- camel_folder_info_build (GPtrArray *folders,
- const gchar *namespace,
- gchar separator,
- gboolean short_names);
- #endif /* CAMEL_DISABLE_DEPRECATED */
-
G_END_DECLS
#endif /* CAMEL_STORE_H */
diff --cc camel/camel-stream-vfs.h
index ac5a634,822fefe..ed98918
--- a/camel/camel-stream-vfs.h
+++ b/camel/camel-stream-vfs.h
@@@ -65,12 -50,24 +65,23 @@@ typedef struct
} CamelStreamVFSClass;
-/* Standard Camel function */
-CamelType camel_stream_vfs_get_type (void);
+GType camel_stream_vfs_get_type (void);
+ /**
+ * CamelStreamVFSOpenMethod:
+ * CAMEL_STREAM_VFS_CREATE:
+ * Writable, creates new file or replaces old file.
+ * CAMEL_STREAM_VFS_APPEND:
+ * Writable, creates new file or appends at the end of the old file.
+ * CAMEL_STREAM_VFS_READ:
+ * Readable, opens existing file for reading.
+ *
+ * Since: 2.24
+ **/
typedef enum {
- CAMEL_STREAM_VFS_CREATE, /* writable, creates new file or replaces old file */
- CAMEL_STREAM_VFS_APPEND, /* writable, creates new file or appends at the end of the old file */
- CAMEL_STREAM_VFS_READ /* readable, opens existing file for reading */
+ CAMEL_STREAM_VFS_CREATE,
+ CAMEL_STREAM_VFS_APPEND,
+ CAMEL_STREAM_VFS_READ
} CamelStreamVFSOpenMethod;
/* public methods */
diff --cc camel/camel-tcp-stream.c
index 9f93999,9584806..0e3304e
--- a/camel/camel-tcp-stream.c
+++ b/camel/camel-tcp-stream.c
@@@ -123,20 -170,23 +123,22 @@@ camel_tcp_stream_setsockopt (CamelTcpSt
*
* Returns: the stream's local address (which must be freed with
* #g_free) if the stream is connected, or %NULL if not
+ *
+ * Since: 2.22
**/
struct sockaddr *
-camel_tcp_stream_get_local_address (CamelTcpStream *stream, socklen_t *len)
+camel_tcp_stream_get_local_address (CamelTcpStream *stream,
+ socklen_t *len)
{
+ CamelTcpStreamClass *class;
+
g_return_val_if_fail (CAMEL_IS_TCP_STREAM (stream), NULL);
- g_return_val_if_fail(len != NULL, NULL);
+ g_return_val_if_fail (len != NULL, NULL);
- return CTS_CLASS (stream)->get_local_address (stream, len);
-}
+ class = CAMEL_TCP_STREAM_GET_CLASS (stream);
+ g_return_val_if_fail (class->get_local_address != NULL, NULL);
-static struct sockaddr *
-tcp_get_remote_address (CamelTcpStream *stream, socklen_t *len)
-{
- w(g_warning ("CamelTcpStream::get_remote_address called on default implementation"));
- return NULL;
+ return class->get_local_address (stream, len);
}
/**
@@@ -148,18 -198,14 +150,20 @@@
*
* Returns: the stream's remote address (which must be freed with
* #g_free) if the stream is connected, or %NULL if not.
+ *
+ * Since: 2.22
**/
struct sockaddr *
-camel_tcp_stream_get_remote_address (CamelTcpStream *stream, socklen_t *len)
+camel_tcp_stream_get_remote_address (CamelTcpStream *stream,
+ socklen_t *len)
{
+ CamelTcpStreamClass *class;
+
g_return_val_if_fail (CAMEL_IS_TCP_STREAM (stream), NULL);
- g_return_val_if_fail(len != NULL, NULL);
+ g_return_val_if_fail (len != NULL, NULL);
+
+ class = CAMEL_TCP_STREAM_GET_CLASS (stream);
+ g_return_val_if_fail (class->get_remote_address != NULL, NULL);
- return CTS_CLASS (stream)->get_remote_address (stream, len);
+ return class->get_remote_address (stream, len);
}
diff --cc camel/camel-text-index.c
index 94569e3,7050fc5..5b52898
--- a/camel/camel-text-index.c
+++ b/camel/camel-text-index.c
@@@ -33,13 -33,12 +33,12 @@@
#include <sys/stat.h>
#include <sys/types.h>
-#include <glib.h>
#include <glib/gstdio.h>
+#include <glib/gi18n-lib.h>
- #include <libedataserver/e-memory.h>
-
#include "camel-block-file.h"
#include "camel-list-utils.h"
+ #include "camel-mempool.h"
#include "camel-object.h"
#include "camel-partition-table.h"
#include "camel-private.h"
@@@ -70,10 -68,10 +69,10 @@@ static gint text_index_compress_nosync
struct _CamelTextIndexNamePrivate {
GString *buffer;
camel_key_t nameid;
- EMemPool *pool;
+ CamelMemPool *pool;
};
-CamelTextIndexName *camel_text_index_name_new(CamelTextIndex *idx, const gchar *name, camel_key_t nameid);
+CamelTextIndexName *camel_text_index_name_new (CamelTextIndex *idx, const gchar *name, camel_key_t nameid);
/* ****************************** */
@@@ -1446,33 -1379,20 +1445,33 @@@ camel_text_index_validate (CamelTextInd
/* CamelTextIndexName */
/* ********************************************************************** */
-static CamelIndexNameClass *camel_text_index_name_parent;
+G_DEFINE_TYPE (CamelTextIndexName, camel_text_index_name, CAMEL_TYPE_INDEX_NAME)
+
+static void
+text_index_name_finalize (GObject *object)
+{
+ CamelTextIndexNamePrivate *priv;
+
+ priv = CAMEL_TEXT_INDEX_NAME_GET_PRIVATE (object);
+
+ g_hash_table_destroy (CAMEL_TEXT_INDEX_NAME (object)->parent.words);
+
+ g_string_free (priv->buffer, TRUE);
- e_mempool_destroy (priv->pool);
++ camel_mempool_destroy (priv->pool);
-#define CIN_CLASS(o) ((CamelTextIndexNameClass *)(((CamelObject *)o)->classfuncs))
-#define CIN_PRIVATE(o) (((CamelTextIndexName *)(o))->priv)
+ /* Chain up to parent's finalize() method. */
+ G_OBJECT_CLASS (camel_text_index_name_parent_class)->finalize (object);
+}
static void
-text_index_name_add_word(CamelIndexName *idn, const gchar *word)
+text_index_name_add_word (CamelIndexName *idn, const gchar *word)
{
- struct _CamelTextIndexNamePrivate *p = ((CamelTextIndexName *)idn)->priv;
+ CamelTextIndexNamePrivate *p = ((CamelTextIndexName *)idn)->priv;
- if (g_hash_table_lookup(idn->words, word) == NULL) {
- gchar *w = camel_mempool_strdup(p->pool, word);
+ if (g_hash_table_lookup (idn->words, word) == NULL) {
- gchar *w = e_mempool_strdup (p->pool, word);
++ gchar *w = camel_mempool_strdup (p->pool, word);
- g_hash_table_insert(idn->words, w, w);
+ g_hash_table_insert (idn->words, w, w);
}
}
@@@ -1595,29 -1522,46 +1594,29 @@@ camel_text_index_name_class_init (Camel
}
static void
-camel_text_index_name_finalise(CamelTextIndexName *idn)
+camel_text_index_name_init (CamelTextIndexName *text_index_name)
{
- CamelTextIndexNamePrivate *p = CIN_PRIVATE(idn);
-
- g_hash_table_destroy(idn->parent.words);
+ text_index_name->priv =
+ CAMEL_TEXT_INDEX_NAME_GET_PRIVATE (text_index_name);
- g_string_free(p->buffer, TRUE);
- camel_mempool_destroy(p->pool);
+ text_index_name->parent.words = g_hash_table_new (
+ g_str_hash, g_str_equal);
- g_free(p);
-}
-
-CamelType
-camel_text_index_name_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_index_name_get_type(), "CamelTextIndexName",
- sizeof (CamelTextIndexName),
- sizeof (CamelTextIndexNameClass),
- (CamelObjectClassInitFunc) camel_text_index_name_class_init,
- NULL,
- (CamelObjectInitFunc) camel_text_index_name_init,
- (CamelObjectFinalizeFunc) camel_text_index_name_finalise);
- }
-
- return type;
+ text_index_name->priv->buffer = g_string_new ("");
+ text_index_name->priv->pool =
- e_mempool_new (256, 128, E_MEMPOOL_ALIGN_BYTE);
++ camel_mempool_new (256, 128, CAMEL_MEMPOOL_ALIGN_BYTE);
}
CamelTextIndexName *
-camel_text_index_name_new(CamelTextIndex *idx, const gchar *name, camel_key_t nameid)
+camel_text_index_name_new (CamelTextIndex *idx, const gchar *name, camel_key_t nameid)
{
- CamelTextIndexName *idn = (CamelTextIndexName *)camel_object_new(camel_text_index_name_get_type());
+ CamelTextIndexName *idn = g_object_new (CAMEL_TYPE_TEXT_INDEX_NAME, NULL);
CamelIndexName *cin = &idn->parent;
- CamelTextIndexNamePrivate *p = CIN_PRIVATE(idn);
+ CamelTextIndexNamePrivate *p = CAMEL_TEXT_INDEX_NAME_GET_PRIVATE (idn);
cin->index = (CamelIndex *)idx;
- camel_object_ref((CamelObject *)idx);
- cin->name = camel_mempool_strdup(p->pool, name);
+ g_object_ref (idx);
- cin->name = e_mempool_strdup (p->pool, name);
++ cin->name = camel_mempool_strdup (p->pool, name);
p->nameid = nameid;
return idn;
diff --cc camel/camel-vee-folder.c
index 94a5dcf,6647c17..dd390e0
--- a/camel/camel-vee-folder.c
+++ b/camel/camel-vee-folder.c
@@@ -1932,156 -1898,312 +1932,166 @@@ camel_vee_folder_class_init (CamelVeeFo
}
static void
-vee_freeze (CamelFolder *folder)
+camel_vee_folder_init (CamelVeeFolder *vee_folder)
{
- CamelVeeFolder *vfolder = (CamelVeeFolder *)folder;
- struct _CamelVeeFolderPrivate *p = _PRIVATE(vfolder);
- GList *node;
+ CamelFolder *folder = CAMEL_FOLDER (vee_folder);
- CAMEL_VEE_FOLDER_LOCK(vfolder, subfolder_lock);
+ vee_folder->priv = CAMEL_VEE_FOLDER_GET_PRIVATE (vee_folder);
- node = p->folders;
- while (node) {
- CamelFolder *f = node->data;
+ folder->folder_flags |= (CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY |
+ CAMEL_FOLDER_HAS_SEARCH_CAPABILITY);
- camel_folder_freeze(f);
- node = node->next;
- }
+ /* FIXME: what to do about user flags if the subfolder doesn't support them? */
+ folder->permanent_flags = CAMEL_MESSAGE_ANSWERED |
+ CAMEL_MESSAGE_DELETED |
+ CAMEL_MESSAGE_DRAFT |
+ CAMEL_MESSAGE_FLAGGED |
+ CAMEL_MESSAGE_SEEN;
- CAMEL_VEE_FOLDER_UNLOCK(vfolder, subfolder_lock);
+ vee_folder->changes = camel_folder_change_info_new ();
+ vee_folder->search = camel_folder_search_new ();
+ vee_folder->hashes = g_hash_table_new_full (
+ g_str_hash, g_str_equal, g_free, NULL);
- /* call parent implementation */
- CAMEL_FOLDER_CLASS (camel_vee_folder_parent)->freeze(folder);
+ /* Loaded is no longer used.*/
+ vee_folder->loaded = NULL;
+ vee_folder->deleted = FALSE;
+ vee_folder->priv->summary_lock = g_mutex_new ();
+ vee_folder->priv->subfolder_lock = g_mutex_new ();
+ vee_folder->priv->changed_lock = g_mutex_new ();
+ vee_folder->priv->unread_vfolder = -1;
}
-static void
-vee_thaw(CamelFolder *folder)
++/**
++ * camel_vee_folder_mask_event_folder_changed:
++ *
++ * Since: 2.26
++ **/
+void
+camel_vee_folder_construct (CamelVeeFolder *vf, CamelStore *parent_store, const gchar *full, const gchar *name, guint32 flags)
{
- CamelVeeFolder *vfolder = (CamelVeeFolder *)folder;
- struct _CamelVeeFolderPrivate *p = _PRIVATE(vfolder);
- GList *node;
-
- CAMEL_VEE_FOLDER_LOCK(vfolder, subfolder_lock);
-
- node = p->folders;
- while (node) {
- CamelFolder *f = node->data;
-
- camel_folder_thaw(f);
- node = node->next;
- }
-
- CAMEL_VEE_FOLDER_UNLOCK(vfolder, subfolder_lock);
-
- /* call parent implementation */
- CAMEL_FOLDER_CLASS (camel_vee_folder_parent)->thaw(folder);
-}
+ CamelFolder *folder = (CamelFolder *)vf;
-/* vfolder base implementaitons */
-static void
-vee_add_folder(CamelVeeFolder *vf, CamelFolder *sub)
-{
- CamelException ex = CAMEL_EXCEPTION_INITIALISER;
+ vf->flags = flags;
+ camel_folder_construct (folder, parent_store, full, name);
- vee_rebuild_folder (vf, sub, &ex);
+ folder->summary = camel_vee_summary_new (folder);
- camel_exception_clear (&ex);
+ if (CAMEL_IS_VEE_STORE (parent_store))
+ vf->parent_vee_store = (CamelVeeStore *)parent_store;
}
-static void
-vee_remove_folder(CamelVeeFolder *vf, CamelFolder *sub)
+/**
+ * camel_vee_folder_new:
+ * @parent_store: the parent CamelVeeStore
+ * @full: the full path to the vfolder.
+ * @flags: flags of some kind
+ *
+ * Create a new CamelVeeFolder object.
+ *
+ * Return value: A new CamelVeeFolder widget.
+ **/
+CamelFolder *
+camel_vee_folder_new (CamelStore *parent_store, const gchar *full, guint32 flags)
{
- gchar *shash, hash[8];
- CamelVeeFolder *folder_unmatched = vf->parent_vee_store ? vf->parent_vee_store->folder_unmatched : NULL;
+ CamelVeeFolder *vf;
+ gchar *tmp;
- camel_vee_folder_hash_folder(sub, hash);
- vee_folder_remove_folder(vf, sub);
- shash = g_strdup_printf("%c%c%c%c%c%c%c%c", hash[0], hash[1], hash[2], hash[3], hash[4], hash[5], hash[6], hash[7]);
- if (g_hash_table_lookup (vf->hashes, shash)) {
- g_hash_table_remove (vf->hashes, shash);
- }
+ if (CAMEL_IS_VEE_STORE (parent_store) && strcmp (full, CAMEL_UNMATCHED_NAME) == 0) {
+ vf = ((CamelVeeStore *)parent_store)->folder_unmatched;
+ g_object_ref (vf);
+ } else {
+ const gchar *name = strrchr (full, '/');
- if (folder_unmatched && g_hash_table_lookup (folder_unmatched->hashes, shash)) {
- g_hash_table_remove (folder_unmatched->hashes, shash);
+ if (name == NULL)
+ name = full;
+ else
+ name++;
+ vf = g_object_new (CAMEL_TYPE_VEE_FOLDER, NULL);
+ camel_vee_folder_construct (vf, parent_store, full, name, flags);
}
- g_free(shash);
+ d (printf ("returning folder %s %p, count = %d\n", full, vf, camel_folder_get_message_count ((CamelFolder *)vf)));
+ if (vf) {
+ tmp = g_strdup_printf ("%s/%s.cmeta", ((CamelService *)parent_store)->url->path, full);
+ camel_object_set (vf, NULL, CAMEL_OBJECT_STATE_FILE, tmp, NULL);
+ g_free (tmp);
+ if (camel_object_state_read (vf) == -1) {
+ /* setup defaults: we have none currently */
+ }
+ }
+ return (CamelFolder *)vf;
}
-static void
-vee_set_expression(CamelVeeFolder *vf, const gchar *query)
++/**
++ * camel_vee_folder_unmask_event_folder_changed:
++ *
++ * Since: 2.26
++ **/
+void
+camel_vee_folder_set_expression (CamelVeeFolder *vf, const gchar *query)
{
- struct _CamelVeeFolderPrivate *p = _PRIVATE(vf);
- GList *node;
- CamelException ex = CAMEL_EXCEPTION_INITIALISER;
-
- CAMEL_VEE_FOLDER_LOCK(vf, subfolder_lock);
-
- /* no change, do nothing */
- if ((vf->expression && query && strcmp(vf->expression, query) == 0)
- || (vf->expression == NULL && query == NULL)) {
- CAMEL_VEE_FOLDER_UNLOCK(vf, subfolder_lock);
- return;
- }
-
- /* Recreate the table when the query changes, only if we are not setting it first */
- if (vf->expression) {
- CamelFolderSummary *s = ((CamelFolder *)vf)->summary;
- camel_folder_summary_clear (s);
- camel_db_recreate_vfolder (((CamelFolder *) vf)->parent_store->cdb_w, ((CamelFolder *) vf)->full_name, &ex);
- camel_exception_clear (&ex);
- s->junk_count = 0;
- s->deleted_count = 0;
- s->unread_count = 0;
- s->visible_count = 0;
- s->junk_not_deleted_count = 0;
- }
-
- g_free(vf->expression);
- if (query)
- vf->expression = g_strdup(query);
-
- node = p->folders;
- while (node) {
- CamelFolder *f = node->data;
-
- if (camel_vee_folder_rebuild_folder (vf, f, &ex) == -1)
- break;
-
- camel_exception_clear (&ex);
-
- node = node->next;
- }
-
- camel_exception_clear (&ex);
-
- CAMEL_VEE_FOLDER_LOCK(vf, changed_lock);
- g_list_free(p->folders_changed);
- p->folders_changed = NULL;
- CAMEL_VEE_FOLDER_UNLOCK(vf, changed_lock);
-
- CAMEL_VEE_FOLDER_UNLOCK(vf, subfolder_lock);
+ CAMEL_VEE_FOLDER_GET_CLASS (vf)->set_expression (vf, query);
}
-/* This entire code will be useless, since we sync the counts always. */
-static gint
-vf_getv(CamelObject *object, CamelException *ex, CamelArgGetV *args)
+/**
+ * camel_vee_folder_add_folder:
+ * @vf: Virtual Folder object
+ * @sub: source CamelFolder to add to @vf
+ *
+ * Adds @sub as a source folder to @vf.
+ **/
+void
+camel_vee_folder_add_folder (CamelVeeFolder *vf, CamelFolder *sub)
{
- CamelFolder *folder = (CamelFolder *)object;
- CamelVeeFolder *vf = (CamelVeeFolder *)folder;
+ CamelVeeFolderPrivate *p = CAMEL_VEE_FOLDER_GET_PRIVATE (vf);
gint i;
- guint32 tag;
- gint unread = -1, deleted = 0, junked = 0, visible = 0, count = -1, junked_not_deleted = -1;
-
- for (i=0;i<args->argc;i++) {
- CamelArgGet *arg = &args->argv[i];
-
- tag = arg->tag;
-
- /* NB: this is a copy of camel-folder.c with the unread count logic altered.
- makes sure its still atomically calculated */
- switch (tag & CAMEL_ARG_TAG) {
- case CAMEL_FOLDER_ARG_UNREAD:
- case CAMEL_FOLDER_ARG_DELETED:
- case CAMEL_FOLDER_ARG_JUNKED:
- case CAMEL_FOLDER_ARG_JUNKED_NOT_DELETED:
- case CAMEL_FOLDER_ARG_VISIBLE:
-
- if (vf->expression && vf->priv->unread_vfolder == -1)
- camel_vee_summary_load_check_unread_vfolder ((CamelVeeSummary *)folder->summary);
-
- /* This is so we can get the values atomically, and also so we can calculate them only once */
- if (unread == -1) {
- gint j;
- CamelMessageInfoBase *info;
- CamelVeeMessageInfo *vinfo;
-
- unread = deleted = visible = junked = junked_not_deleted = 0;
- count = camel_folder_summary_count(folder->summary);
- for (j=0; j<count; j++) {
- if ((info = (CamelMessageInfoBase *) camel_folder_summary_index(folder->summary, j))) {
- guint32 flags;
-
- vinfo = (CamelVeeMessageInfo *) info;
- flags = vinfo->old_flags; /* ? vinfo->old_flags : camel_message_info_flags(info); */
-
- if ((flags & (CAMEL_MESSAGE_SEEN)) == 0)
- unread++;
- if (flags & CAMEL_MESSAGE_DELETED)
- deleted++;
- if (flags & CAMEL_MESSAGE_JUNK) {
- junked++;
- if (!(flags & CAMEL_MESSAGE_DELETED))
- junked_not_deleted++;
- }
- if ((flags & (CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_JUNK)) == 0)
- visible++;
- camel_message_info_free(info);
- }
- }
- }
-
- switch (tag & CAMEL_ARG_TAG) {
- case CAMEL_FOLDER_ARG_UNREAD:
- if (vf->priv->unread_vfolder == 1)
- count = unread == -1 ? 0 : unread - junked_not_deleted;
- else
- count = unread == -1 ? 0 : unread;
- break;
- case CAMEL_FOLDER_ARG_DELETED:
- count = deleted == -1 ? 0 : deleted;
- break;
- case CAMEL_FOLDER_ARG_JUNKED:
- count = junked == -1 ? 0 : junked;
- break;
- case CAMEL_FOLDER_ARG_JUNKED_NOT_DELETED:
- count = junked_not_deleted == -1 ? 0 : junked_not_deleted;
- break;
- case CAMEL_FOLDER_ARG_VISIBLE:
- if (vf->priv->unread_vfolder == 1)
- count = unread == -1 ? 0 : unread - junked_not_deleted;
- else
- count = visible == -1 ? 0 : visible;
-
- break;
- }
- folder->summary->unread_count = unread == -1 ? 0 : unread;
- folder->summary->deleted_count = deleted == -1 ? 0 : deleted;
- junked = folder->summary->junk_count = junked == -1 ? 0 : junked;
- folder->summary->junk_not_deleted_count = junked_not_deleted == -1 ? 0 : junked_not_deleted;
- folder->summary->visible_count = visible == -1 ? 0 : visible;
- *arg->ca_int = count;
- break;
- default:
- continue;
- }
+ CamelVeeFolder *folder_unmatched = vf->parent_vee_store ? vf->parent_vee_store->folder_unmatched : NULL;
- arg->tag = (tag & CAMEL_ARG_TYPE) | CAMEL_ARG_IGNORE;
+ if (vf == (CamelVeeFolder *)sub) {
+ g_warning ("Adding a virtual folder to itself as source, ignored");
+ return;
}
- return ((CamelObjectClass *)camel_vee_folder_parent)->getv(object, ex, args);
-}
-
-static void
-camel_vee_folder_class_init (CamelVeeFolderClass *klass)
-{
- CamelFolderClass *folder_class = (CamelFolderClass *) klass;
-
- camel_vee_folder_parent = CAMEL_FOLDER_CLASS(camel_type_get_global_classfuncs (camel_folder_get_type ()));
-
- ((CamelObjectClass *)klass)->getv = vf_getv;
-
- folder_class->refresh_info = vee_refresh_info;
- folder_class->sync = vee_sync;
- folder_class->expunge = vee_expunge;
+ CAMEL_VEE_FOLDER_LOCK (vf, subfolder_lock);
- folder_class->get_message = vee_get_message;
- folder_class->append_message = vee_append_message;
- folder_class->transfer_messages_to = vee_transfer_messages_to;
-
- folder_class->search_by_expression = vee_search_by_expression;
- folder_class->search_by_uids = vee_search_by_uids;
- folder_class->count_by_expression = vee_count_by_expression;
+ /* for normal vfolders we want only unique ones, for unmatched we want them all recorded */
+ if (g_list_find (p->folders, sub) == NULL) {
+ g_object_ref (sub);
+ p->folders = g_list_append (p->folders, sub);
- folder_class->rename = vee_rename;
- folder_class->delete = vee_delete;
+ CAMEL_FOLDER_LOCK (vf, change_lock);
- folder_class->freeze = vee_freeze;
- folder_class->thaw = vee_thaw;
+ /* update the freeze state of 'sub' to match our freeze state */
+ for (i = 0; i < ((CamelFolder *)vf)->priv->frozen; i++)
+ camel_folder_freeze (sub);
- klass->set_expression = vee_set_expression;
- klass->add_folder = vee_add_folder;
- klass->remove_folder = vee_remove_folder;
- klass->rebuild_folder = vee_rebuild_folder;
- klass->folder_changed = folder_changed_base;
- klass->folder_renamed = folder_renamed_base;
-}
+ CAMEL_FOLDER_UNLOCK (vf, change_lock);
+ }
+ if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0 && !CAMEL_IS_VEE_FOLDER (sub) && folder_unmatched != NULL) {
+ CamelVeeFolderPrivate *up = CAMEL_VEE_FOLDER_GET_PRIVATE (folder_unmatched);
+ g_object_ref (sub);
+ up->folders = g_list_append (up->folders, sub);
-static void
-camel_vee_folder_init (CamelVeeFolder *obj)
-{
- struct _CamelVeeFolderPrivate *p;
- CamelFolder *folder = (CamelFolder *)obj;
+ CAMEL_FOLDER_LOCK (folder_unmatched, change_lock);
- p = _PRIVATE(obj) = g_malloc0(sizeof(*p));
+ /* update the freeze state of 'sub' to match Unmatched's freeze state */
+ for (i = 0; i < ((CamelFolder *)folder_unmatched)->priv->frozen; i++)
+ camel_folder_freeze (sub);
- folder->folder_flags |= (CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY |
- CAMEL_FOLDER_HAS_SEARCH_CAPABILITY);
+ CAMEL_FOLDER_UNLOCK (folder_unmatched, change_lock);
+ }
- /* FIXME: what to do about user flags if the subfolder doesn't support them? */
- folder->permanent_flags = CAMEL_MESSAGE_ANSWERED |
- CAMEL_MESSAGE_DELETED |
- CAMEL_MESSAGE_DRAFT |
- CAMEL_MESSAGE_FLAGGED |
- CAMEL_MESSAGE_SEEN;
+ CAMEL_VEE_FOLDER_UNLOCK (vf, subfolder_lock);
- obj->changes = camel_folder_change_info_new();
- obj->search = camel_folder_search_new();
- obj->hashes = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
- /* Loaded is no longer used.*/
- obj->loaded = NULL;
- obj->deleted = FALSE;
- p->summary_lock = g_mutex_new();
- p->subfolder_lock = g_mutex_new();
- p->changed_lock = g_mutex_new();
- p->unread_vfolder = -1;
-}
+ d (printf ("camel_vee_folder_add_folder (%s, %s)\n", ((CamelFolder *)vf)->full_name, sub->full_name));
-/**
- * camel_vee_folder_mask_event_folder_changed:
- *
- * Since: 2.26
- **/
-void
-camel_vee_folder_mask_event_folder_changed (CamelVeeFolder *vf, CamelFolder *sub)
-{
- camel_object_unhook_event((CamelObject *)sub, "folder_changed", (CamelObjectEventHookFunc) folder_changed, vf);
+ camel_object_hook_event ((CamelObject *)sub, "folder_changed", (CamelObjectEventHookFunc)folder_changed, vf);
+ camel_object_hook_event ((CamelObject *)sub, "deleted", (CamelObjectEventHookFunc)subfolder_deleted, vf);
+ camel_object_hook_event ((CamelObject *)sub, "renamed", (CamelObjectEventHookFunc)folder_renamed, vf);
+ CAMEL_VEE_FOLDER_GET_CLASS (vf)->add_folder (vf, sub);
}
/**
diff --cc camel/camel.h
index 34aa9af,dac00c0..29ac5d3
--- a/camel/camel.h
+++ b/camel/camel.h
@@@ -34,11 -32,6 +34,8 @@@
#include <camel/camel-cipher-context.h>
#include <camel/camel-data-cache.h>
#include <camel/camel-data-wrapper.h>
+#include <camel/camel-db.h>
+#include <camel/camel-debug.h>
- #include <camel/camel-digest-folder.h>
- #include <camel/camel-digest-store.h>
- #include <camel/camel-digest-summary.h>
#include <camel/camel-disco-diary.h>
#include <camel/camel-disco-folder.h>
#include <camel/camel-disco-store.h>
@@@ -90,10 -83,8 +88,9 @@@
#include <camel/camel-multipart-encrypted.h>
#include <camel/camel-multipart-signed.h>
#include <camel/camel-net-utils.h>
- #include <camel/camel-news-address.h>
#include <camel/camel-nntp-address.h>
#include <camel/camel-object.h>
+#include <camel/camel-object-bag.h>
#include <camel/camel-offline-folder.h>
#include <camel/camel-offline-journal.h>
#include <camel/camel-offline-store.h>
diff --cc camel/providers/groupwise/camel-groupwise-folder.c
index 3a45561,0b0d296..3695760
--- a/camel/providers/groupwise/camel-groupwise-folder.c
+++ b/camel/providers/groupwise/camel-groupwise-folder.c
@@@ -774,8 -771,9 +775,9 @@@ groupwise_sync (CamelFolder *folder, gb
container_id = camel_groupwise_store_container_id_lookup (gw_store, folder->full_name);
if (folder->folder_flags & CAMEL_FOLDER_HAS_BEEN_DELETED)
- return;
+ return TRUE;
+ changes = camel_folder_change_info_new ();
count = camel_folder_summary_count (folder->summary);
CAMEL_GROUPWISE_FOLDER_REC_LOCK (folder, cache_lock);
for (i=0; i < count; i++) {
@@@ -1777,6 -1777,7 +1787,7 @@@ gw_update_cache (CamelFolder *folder, G
camel_operation_end (NULL);
g_free (container_id);
g_string_free (str, TRUE);
- groupwise_sync_summary (folder, ex);
++ groupwise_sync_summary (folder, NULL);
camel_object_trigger_event (folder, "folder_changed", changes);
camel_folder_change_info_free (changes);
@@@ -2348,6 -2343,7 +2359,7 @@@ gw_update_all_items (CamelFolder *folde
index ++;
}
- groupwise_sync_summary (folder, ex);
++ groupwise_sync_summary (folder, NULL);
camel_object_trigger_event (folder, "folder_changed", changes);
if (item_list) {
diff --cc camel/providers/groupwise/camel-groupwise-provider.c
index 19c339f,125a44f..81c3352
--- a/camel/providers/groupwise/camel-groupwise-provider.c
+++ b/camel/providers/groupwise/camel-groupwise-provider.c
@@@ -120,15 -126,11 +120,10 @@@ voi
camel_provider_module_init(void)
{
CamelProvider *imap_provider = NULL;
- CamelException ex = CAMEL_EXCEPTION_INITIALISER;
gboolean use_imap = g_getenv ("USE_IMAP") != NULL;
- if (use_imap) {
- #ifdef ENABLE_IMAPX
+ if (use_imap)
- imap_provider = camel_provider_get("imapx://", &ex);
+ imap_provider = camel_provider_get("imapx://", NULL);
- #else
- imap_provider = camel_provider_get("imap://", NULL);
- #endif
- }
groupwise_provider.url_hash = groupwise_url_hash;
groupwise_provider.url_equal = groupwise_url_equal;
diff --cc camel/providers/groupwise/camel-groupwise-store.c
index 9fdc748,0e70bed..691a83e
--- a/camel/providers/groupwise/camel-groupwise-store.c
+++ b/camel/providers/groupwise/camel-groupwise-store.c
@@@ -1154,10 -1123,10 +1154,10 @@@ groupwise_get_folder_info (CamelStore *
CamelGroupwiseStore *groupwise_store = CAMEL_GROUPWISE_STORE (store);
CamelFolderInfo *info = NULL;
- /* Do not call groupwise_store_connected function as it would internall call folders_sync
+ /* Do not call groupwise_store_connected function as it would internall call folders_sync
to populate the hash table which is used for mapping container id */
if (!(((CamelOfflineStore *) store)->state == CAMEL_OFFLINE_STORE_NETWORK_AVAIL
- && camel_service_connect ((CamelService *)store, ex)))
+ && camel_service_connect ((CamelService *)store, error)))
goto offline;
CAMEL_SERVICE_REC_LOCK (store, connect_lock);
diff --cc camel/providers/imap/camel-imap-message-cache.c
index 0f2abd2,484ff7b..3c64ce1
--- a/camel/providers/imap/camel-imap-message-cache.c
+++ b/camel/providers/imap/camel-imap-message-cache.c
@@@ -154,9 -155,9 +154,9 @@@ cache_put (CamelImapMessageCache *cache
* camel_imap_message_cache_new:
* @path: directory to use for storage
* @summary: CamelFolderSummary for the folder we are caching
- * @ex: a CamelException
+ * @error: return location for a #GError, or %NULL
*
- * Return value: a new CamelImapMessageCache object using @path for
+ * Returns: a new CamelImapMessageCache object using @path for
* storage. If cache files already exist in @path, then any that do not
* correspond to messages in @summary will be deleted.
* @path is scanned for its contents, which means creating a cache object can be
@@@ -463,9 -461,9 +463,9 @@@ camel_imap_message_cache_insert_wrappe
* @cache: the cache
* @uid: the UID of the data to get
* @part_spec: the part_spec of the data to get
- * @ex: exception
+ * @error: return location for a #GError, or %NULL
*
- * Return value: the filename of a cache item
+ * Returns: the filename of a cache item
**/
gchar *
camel_imap_message_cache_get_filename (CamelImapMessageCache *cache,
@@@ -493,9 -491,9 +493,9 @@@
* @cache: the cache
* @uid: the UID of the data to get
* @part_spec: the part_spec of the data to get
- * @ex: exception
+ * @error: return location for a #GError, or %NULL
*
- * Return value: a CamelStream containing the cached data (which the
+ * Returns: a CamelStream containing the cached data (which the
* caller must unref), or %NULL if that data is not cached.
**/
CamelStream *
diff --cc camel/providers/imapx/camel-imapx-folder.c
index 240e7c2,35468d8..d3844e8
--- a/camel/providers/imapx/camel-imapx-folder.c
+++ b/camel/providers/imapx/camel-imapx-folder.c
@@@ -103,32 -120,8 +119,8 @@@ camel_imapx_folder_new(CamelStore *stor
return folder;
}
- #if 0
- /* experimental interfaces */
- void
- camel_imapx_folder_open(CamelIMAPXFolder *folder, GError **error)
- {
- /* */
- }
-
- void
- camel_imapx_folder_delete(CamelIMAPXFolder *folder, GError **error)
- {
- }
-
- void
- camel_imapx_folder_rename(CamelIMAPXFolder *folder, const gchar *new, GError **error)
- {
- }
-
- void
- camel_imapx_folder_close(CamelIMAPXFolder *folder, GError **error)
- {
- }
- #endif
-
static void
-imapx_refresh_info (CamelFolder *folder, CamelException *ex)
+imapx_refresh_info (CamelFolder *folder, GError **error)
{
CamelIMAPXStore *istore = (CamelIMAPXStore *)folder->parent_store;
@@@ -154,9 -147,10 +146,10 @@@ imapx_expunge (CamelFolder *folder, Cam
}
static void
-imapx_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
+imapx_sync (CamelFolder *folder, gboolean expunge, GError **error)
{
CamelIMAPXStore *is = (CamelIMAPXStore *)folder->parent_store;
+ CamelException eex = CAMEL_EXCEPTION_INITIALISER;
if (CAMEL_OFFLINE_STORE (is)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
return;
diff --cc camel/providers/imapx/camel-imapx-server.c
index 0fa3dff,fd587df..4c3153b
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@@ -990,9 -1029,38 +1029,38 @@@ found
return job;
}
+ static CamelIMAPXJob *
+ imapx_is_job_in_queue (CamelIMAPXServer *is, const gchar *folder_name, guint32 type, const gchar *uid)
+ {
+ CamelDListNode *node;
+ CamelIMAPXJob *job = NULL;
+ gboolean found = FALSE;
+
+ QUEUE_LOCK(is);
+
+ for (node = is->jobs.head;node->next;node = job->msg.ln.next) {
+ job = (CamelIMAPXJob *) node;
+
+ if (!job || !(job->type & type))
+ continue;
+
+ if (imapx_job_matches (folder_name, job, type, uid)) {
+ found = TRUE;
+ break;
+ }
+ }
+
+ QUEUE_UNLOCK (is);
+
+ if (found)
+ return job;
+ else
+ return NULL;
+ }
+
/* handle any untagged responses */
static gint
-imapx_untagged(CamelIMAPXServer *imap, CamelException *ex)
+imapx_untagged(CamelIMAPXServer *imap, GError **error)
{
guint id, len;
guchar *token, *p, c;
@@@ -3661,13 -4103,13 +4103,13 @@@ camel_imapx_server_append_message(Camel
/* chen cleanup this later */
uid = imapx_get_temp_uid ();
- stream = camel_data_cache_add (ifolder->cache, "tmp", uid, NULL);
+ stream = camel_data_cache_add (ifolder->cache, "new", uid, NULL);
if (stream == NULL) {
camel_exception_setv(ex, 2, "Cannot create spool file: %s", g_strerror((gint) errno));
- goto fail;
+ return;
}
- filter = (CamelStream *)camel_stream_filter_new_with_stream(stream);
+ filter = camel_stream_filter_new (stream);
camel_object_unref(stream);
canon = camel_mime_filter_canon_new(CAMEL_MIME_FILTER_CANON_CRLF);
camel_stream_filter_add((CamelStreamFilter *)filter, canon);
@@@ -4004,13 -4383,26 +4383,26 @@@ done
camel_folder_free_uids (folder, uids);
}
+ void
+ camel_imapx_server_sync_changes(CamelIMAPXServer *is, CamelFolder *folder, CamelException *ex)
+ {
+ imapx_server_sync_changes (is, folder, IMAPX_PRIORITY_SYNC_CHANGES, ex);
+ }
+
/* expunge-uids? */
void
-camel_imapx_server_expunge(CamelIMAPXServer *is, CamelFolder *folder, CamelException *ex)
+camel_imapx_server_expunge(CamelIMAPXServer *is, CamelFolder *folder, GError **error)
{
CamelIMAPXJob *job;
+ gboolean registered;
/* Do we really care to wait for this one to finish? */
+ QUEUE_LOCK (is);
+
+ if (imapx_is_job_in_queue (is, folder->full_name, IMAPX_JOB_EXPUNGE, NULL)) {
+ QUEUE_UNLOCK (is);
+ return;
+ }
job = g_malloc0(sizeof(*job));
job->type = IMAPX_JOB_EXPUNGE;
@@@ -4063,10 -4460,13 +4460,13 @@@ imapx_list_cmp(gconstpointer ap, gconst
}
GPtrArray *
-camel_imapx_server_list(CamelIMAPXServer *is, const gchar *top, guint32 flags, CamelException *ex)
+camel_imapx_server_list(CamelIMAPXServer *is, const gchar *top, guint32 flags, GError **error)
{
CamelIMAPXJob *job;
- GPtrArray *folders;
+ GPtrArray *folders = NULL;
+ gchar *encoded_name;
+
+ encoded_name = camel_utf8_utf7 (top);
job = g_malloc0(sizeof(*job));
job->type = IMAPX_JOB_LIST;
diff --cc camel/providers/imapx/camel-imapx-server.h
index 760d6aa,037d653..f318e9a
--- a/camel/providers/imapx/camel-imapx-server.h
+++ b/camel/providers/imapx/camel-imapx-server.h
@@@ -108,9 -114,10 +114,10 @@@ struct _CamelIMAPXServerClass
CamelType camel_imapx_server_get_type (void);
CamelIMAPXServer *camel_imapx_server_new(struct _CamelStore *store, struct _CamelURL *url);
- gboolean camel_imapx_server_connect(CamelIMAPXServer *is, gint state);
+ gboolean camel_imapx_server_connect(CamelIMAPXServer *is, gint state, CamelException *ex);
+ gboolean imapx_connect_to_server (CamelIMAPXServer *is, CamelException *ex);
-GPtrArray *camel_imapx_server_list(CamelIMAPXServer *is, const gchar *top, guint32 flags, CamelException *ex);
+GPtrArray *camel_imapx_server_list(CamelIMAPXServer *is, const gchar *top, guint32 flags, GError **error);
void camel_imapx_server_refresh_info(CamelIMAPXServer *is, CamelFolder *folder, struct _CamelException *ex);
void camel_imapx_server_sync_changes(CamelIMAPXServer *is, CamelFolder *folder, CamelException *ex);
diff --cc camel/providers/imapx/camel-imapx-store.c
index 9e09c08,8fb5686..6b014f4
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@@ -441,9 -476,327 +475,327 @@@ imapx_match_pattern(CamelIMAPXStoreName
return n == 0 && (p == '%' || p == 0);
}
+ static void
+ imapx_unmark_folder_subscribed (CamelIMAPXStore *istore, const gchar *folder_name, gboolean emit_signal, CamelException *ex)
+ {
+ CamelStoreInfo *si;
+
+ si = camel_store_summary_path((CamelStoreSummary *)istore->summary, folder_name);
+ if (si) {
+ if (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) {
+ si->flags &= ~CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
+ camel_store_summary_touch((CamelStoreSummary *)istore->summary);
+ camel_store_summary_save((CamelStoreSummary *)istore->summary);
+ }
+ camel_store_summary_info_free((CamelStoreSummary *)istore->summary, si);
+ }
+
+ if (emit_signal) {
+ CamelFolderInfo *fi;
+
+ fi = imapx_build_folder_info(istore, folder_name);
+ camel_object_trigger_event (CAMEL_OBJECT (istore), "folder_unsubscribed", fi);
+ camel_folder_info_free (fi);
+ }
+ }
+
+ static void
+ imapx_mark_folder_subscribed (CamelIMAPXStore *istore, const gchar *folder_name, gboolean emit_signal, CamelException *ex)
+ {
+ CamelStoreInfo *si;
+
+ si = camel_store_summary_path((CamelStoreSummary *)istore->summary, folder_name);
+ if (si) {
+ if ((si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) == 0) {
+ si->flags |= CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
+ camel_store_summary_touch((CamelStoreSummary *)istore->summary);
+ camel_store_summary_save((CamelStoreSummary *)istore->summary);
+ }
+ camel_store_summary_info_free((CamelStoreSummary *)istore->summary, si);
+ }
+
+ if (emit_signal) {
+ CamelFolderInfo *fi;
+
+ fi = imapx_build_folder_info(istore, folder_name);
+ camel_object_trigger_event (CAMEL_OBJECT (istore), "folder_subscribed", fi);
+ camel_folder_info_free (fi);
+ }
+ }
+
+ static void
+ imapx_subscribe_folder (CamelStore *store, const gchar *folder_name, gboolean emit_signal, CamelException *ex)
+ {
+ CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
+
+ if (CAMEL_OFFLINE_STORE(store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
+ return;
+
+ if (istore->server && camel_imapx_server_connect (istore->server, TRUE, ex))
+ camel_imapx_server_manage_subscription (istore->server, folder_name, TRUE, ex);
+
+ if (!camel_exception_is_set (ex))
+ imapx_mark_folder_subscribed (istore, folder_name, emit_signal, ex);
+ }
+
+ static void
+ imapx_unsubscribe_folder (CamelStore *store, const gchar *folder_name, gboolean emit_signal, CamelException *ex)
+ {
+ CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
+
+ if (CAMEL_OFFLINE_STORE(store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
+ return;
+
+ if (istore->server && camel_imapx_server_connect (istore->server, TRUE, ex))
+ camel_imapx_server_manage_subscription (istore->server, folder_name, FALSE, ex);
+
+ if (!camel_exception_is_set (ex))
+ imapx_unmark_folder_subscribed (istore, folder_name, emit_signal, ex);
+ }
+
+ static void
+ imapx_store_subscribe_folder (CamelStore *store, const gchar *folder_name, CamelException *ex)
+ {
+ imapx_subscribe_folder (store, folder_name, TRUE, ex);
+ }
+
+ static void
+ imapx_store_unsubscribe_folder (CamelStore *store, const gchar *folder_name, CamelException *ex)
+ {
+ CamelException eex = CAMEL_EXCEPTION_INITIALISER;
+
+ if (!ex)
+ ex = &eex;
+
+ imapx_unsubscribe_folder (store, folder_name, TRUE, ex);
+ }
+
+ static void
+ imapx_delete_folder_from_cache (CamelIMAPXStore *istore, const gchar *folder_name, CamelException *ex)
+ {
+ gchar *state_file;
+ gchar *folder_dir, *storage_path;
+ CamelFolderInfo *fi;
+
+ storage_path = g_strdup_printf ("%s/folders", istore->storage_path);
+ folder_dir = imapx_path_to_physical (storage_path, folder_name);
+ g_free (storage_path);
+ if (g_access (folder_dir, F_OK) != 0) {
+ g_free (folder_dir);
+ goto event;
+ }
+
+ /* Delete summary and all the data */
+ state_file = g_strdup_printf ("%s/cmeta", folder_dir);
+ g_unlink (state_file);
+ g_free (state_file);
+
+ camel_db_delete_folder (((CamelStore *)istore)->cdb_w, folder_name, ex);
+ g_rmdir (folder_dir);
+
+ state_file = g_strdup_printf("%s/subfolders", folder_dir);
+ g_rmdir(state_file);
+ g_free(state_file);
+
+ g_rmdir (folder_dir);
+ g_free (folder_dir);
+
+ event:
+ camel_store_summary_remove_path((CamelStoreSummary *)istore->summary, folder_name);
+ camel_store_summary_save((CamelStoreSummary *)istore->summary);
+
+ fi = imapx_build_folder_info(istore, folder_name);
+ camel_object_trigger_event (CAMEL_OBJECT (istore), "folder_deleted", fi);
+ camel_folder_info_free (fi);
+ }
+
+ static void
+ imapx_delete_folder (CamelStore *store, const gchar *folder_name, CamelException *ex)
+ {
+ CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
+
+ if (CAMEL_OFFLINE_STORE (store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL) {
+ camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
+ _("You must be working online to complete this operation"));
+ return;
+ }
+
+ if (istore->server && camel_imapx_server_connect (istore->server, TRUE, ex))
+ camel_imapx_server_delete_folder (istore->server, folder_name, ex);
+
+ if (!camel_exception_is_set (ex))
+ imapx_delete_folder_from_cache (istore, folder_name, ex);
+ }
+
+
+ static void
+ rename_folder_info (CamelIMAPXStore *istore, const gchar *old_name, const gchar *new_name, CamelException *ex)
+ {
+ gint i, count;
+ CamelStoreInfo *si;
+ gint olen = strlen(old_name);
+ const gchar *path;
+ gchar *npath, *nfull;
+
+ count = camel_store_summary_count((CamelStoreSummary *)istore->summary);
+ for (i=0;i<count;i++) {
+ si = camel_store_summary_index((CamelStoreSummary *)istore->summary, i);
+ if (si == NULL)
+ continue;
+ path = camel_store_info_path(istore->summary, si);
+ if (strncmp(path, old_name, olen) == 0) {
+ if (strlen(path) > olen)
+ npath = g_strdup_printf("%s/%s", new_name, path+olen+1);
+ else
+ npath = g_strdup(new_name);
+ nfull = camel_imapx_store_summary_path_to_full(istore->summary, npath, istore->dir_sep);
+
+ /* workaround for broken server (courier uses '.') that doesn't rename
+ subordinate folders as required by rfc 2060 */
+ if (istore->dir_sep == '.') {
+ camel_imapx_server_rename_folder (istore->server, path, nfull, ex);
+ }
+
+ camel_store_info_set_string((CamelStoreSummary *)istore->summary, si, CAMEL_STORE_INFO_PATH, npath);
+ camel_store_info_set_string((CamelStoreSummary *)istore->summary, si, CAMEL_IMAPX_STORE_INFO_FULL_NAME, nfull);
+
+ camel_store_summary_touch((CamelStoreSummary *)istore->summary);
+ g_free(nfull);
+ g_free(npath);
+ }
+ camel_store_summary_info_free((CamelStoreSummary *)istore->summary, si);
+ }
+ }
+
+ static void
+ imapx_rename_folder (CamelStore *store, const gchar *old, const gchar *new, CamelException *ex)
+ {
+ CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
+ gchar *oldpath, *newpath, *storage_path;
+
+
+ if (CAMEL_OFFLINE_STORE (store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL) {
+ camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
+ _("You must be working online to complete this operation"));
+ return;
+ }
+
+ if (istore->rec_options & IMAPX_SUBSCRIPTIONS)
+ imapx_unsubscribe_folder (store, old, FALSE, ex);
+
+ if (istore->server && camel_imapx_server_connect (istore->server, TRUE, ex))
+ camel_imapx_server_rename_folder (istore->server, old, new, ex);
+
+ if (camel_exception_is_set (ex)) {
+ imapx_subscribe_folder (store, old, FALSE, ex);
+ return;
+ }
+
+ /* rename summary, and handle broken server */
+ rename_folder_info(istore, old, new, ex);
+
+ if (istore->rec_options & IMAPX_SUBSCRIPTIONS)
+ imapx_subscribe_folder (store, new, FALSE, ex);
+
+ storage_path = g_strdup_printf("%s/folders", istore->storage_path);
+ oldpath = imapx_path_to_physical (storage_path, old);
+ newpath = imapx_path_to_physical (storage_path, new);
+ g_free(storage_path);
+
+ /* So do we care if this didn't work? Its just a cache? */
+ if (g_rename (oldpath, newpath) == -1) {
+ g_warning ("Could not rename message cache '%s' to '%s': %s: cache reset",
+ oldpath, newpath, g_strerror (errno));
+ }
+
+ g_free (oldpath);
+ g_free (newpath);
+ }
+
+ static CamelFolderInfo *
+ imapx_create_folder (CamelStore *store, const gchar *parent_name, const gchar *folder_name, CamelException *ex)
+ {
+ const gchar *c;
+ CamelStoreInfo *si;
+ CamelIMAPXStoreNamespace *ns;
+ CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
+ gchar *real_name, *full_name, *parent_real;
+ CamelFolderInfo *fi = NULL;
+ gchar dir_sep;
+
+ if (CAMEL_OFFLINE_STORE (store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL) {
+ camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
+ _("You must be working online to complete this operation"));
+ return NULL;
+ }
+
+ if (!(istore->server && camel_imapx_server_connect (istore->server, TRUE, ex)))
+ return NULL;
+
+ if (!parent_name)
+ parent_name = "";
+
+ ns = camel_imapx_store_summary_namespace_find_path (istore->summary, parent_name);
+ if (ns)
+ dir_sep = ns->sep;
+ else
+ dir_sep = '/';
+
+ c = folder_name;
+ while (*c && *c != dir_sep && !strchr ("#%*", *c))
+ c++;
+
+ if (*c != '\0') {
+ camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_PATH,
+ _("The folder name \"%s\" is invalid because it contains the character \"%c\""),
+ folder_name, *c);
+ return NULL;
+ }
+
+ parent_real = camel_imapx_store_summary_full_from_path(istore->summary, parent_name);
+ if (parent_real == NULL) {
+ camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_STATE,
+ _("Unknown parent folder: %s"), parent_name);
+ return NULL;
+ }
+
+ si = camel_store_summary_path ((CamelStoreSummary *)istore->summary, parent_name);
+ if (si && si->flags & CAMEL_STORE_INFO_FOLDER_NOINFERIORS) {
+ camel_exception_set (ex, CAMEL_EXCEPTION_FOLDER_INVALID_STATE,
+ _("The parent folder is not allowed to contain subfolders"));
+ return NULL;
+ }
+
+ if (si)
+ camel_store_summary_info_free ((CamelStoreSummary *) istore->summary, si);
+
+ real_name = camel_imapx_store_summary_path_to_full (istore->summary, folder_name, dir_sep);
+ full_name = imapx_concat (istore, parent_real, real_name);
+ g_free(real_name);
+
+ camel_imapx_server_create_folder (istore->server, full_name, ex);
+
+ if (!camel_exception_is_set (ex)) {
+ CamelIMAPXStoreInfo *si;
+
+ si = camel_imapx_store_summary_add_from_full(istore->summary, full_name, dir_sep);
+ camel_store_summary_save((CamelStoreSummary *)istore->summary);
+ fi = imapx_build_folder_info(istore, camel_store_info_path(istore->summary, si));
+ fi->flags |= CAMEL_FOLDER_NOCHILDREN;
+ camel_object_trigger_event (CAMEL_OBJECT (store), "folder_created", fi);
+ }
+
+
+ g_free (full_name);
+ g_free(parent_real);
+
+ return fi;
+ }
+
+
static CamelFolderInfo *
get_folder_info_offline (CamelStore *store, const gchar *top,
- guint32 flags, CamelException *ex)
+ guint32 flags, GError **error)
{
CamelIMAPXStore *imapx_store = CAMEL_IMAPX_STORE (store);
gboolean include_inbox = FALSE;
diff --cc camel/providers/imapx/camel-imapx-view-summary.c
index 904a5fb,b8a6a3e..2837f3b
--- a/camel/providers/imapx/camel-imapx-view-summary.c
+++ b/camel/providers/imapx/camel-imapx-view-summary.c
@@@ -44,10 -44,10 +44,10 @@@ static CamelViewSummaryDiskClass *cmvs_
*
* Create a new CamelIMAPXViewSummary object.
*
- * Return value: A new CamelIMAPXViewSummary widget.
+ * Returns: A new CamelIMAPXViewSummary widget.
**/
CamelIMAPXViewSummary *
-camel_imapx_view_summary_new(const gchar *base, CamelException *ex)
+camel_imapx_view_summary_new(const gchar *base, GError **error)
{
return (CamelIMAPXViewSummary *)camel_view_summary_disk_construct(camel_object_new(camel_imapx_view_summary_get_type()), base, ex);
}
diff --cc camel/providers/local/camel-local-summary.c
index c48577b,b3fd143..323d6fd
--- a/camel/providers/local/camel-local-summary.c
+++ b/camel/providers/local/camel-local-summary.c
@@@ -340,12 -325,11 +340,12 @@@ camel_local_summary_add (CamelLocalSumm
* If @status is non NULL, then a Status header line is also written.
* The headers written are termianted with a blank line.
*
- * Return value: -1 on error, otherwise the number of bytes written.
+ * Returns: -1 on error, otherwise the number of bytes written.
**/
gint
-camel_local_summary_write_headers(gint fd, struct _camel_header_raw *header, const gchar *xevline, const gchar *status, const gchar *xstatus)
+camel_local_summary_write_headers(gint fd, GQueue *header_queue, const gchar *xevline, const gchar *status, const gchar *xstatus)
{
+ GList *link;
gint outlen = 0, len;
gint newfd;
FILE *out;
diff --cc camel/providers/local/camel-maildir-summary.c
index f6d7074,0b3535e..9108056
--- a/camel/providers/local/camel-maildir-summary.c
+++ b/camel/providers/local/camel-maildir-summary.c
@@@ -36,8 -36,13 +36,6 @@@
#include <glib/gi18n-lib.h>
- #include <libedataserver/e-memory.h>
-
-#include "camel-db.h"
-#include "camel-mempool.h"
-#include "camel-mime-message.h"
-#include "camel-operation.h"
-#include "camel-private.h"
-#include "camel-store.h"
-#include "camel-string-utils.h"
#include "camel-maildir-summary.h"
#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
diff --cc camel/providers/local/camel-mh-summary.c
index 2ce55b1,2150bc2..40a2c9d
--- a/camel/providers/local/camel-mh-summary.c
+++ b/camel/providers/local/camel-mh-summary.c
@@@ -94,17 -121,12 +94,17 @@@ camel_mh_summary_init (CamelMhSummary *
*
* Create a new CamelMhSummary object.
*
- * Return value: A new #CamelMhSummary object.
+ * Returns: A new #CamelMhSummary object.
**/
-CamelMhSummary *camel_mh_summary_new(struct _CamelFolder *folder, const gchar *filename, const gchar *mhdir, CamelIndex *index)
+CamelMhSummary *
+camel_mh_summary_new (CamelFolder *folder,
+ const gchar *filename,
+ const gchar *mhdir,
+ CamelIndex *index)
{
- CamelMhSummary *o = (CamelMhSummary *)camel_object_new(camel_mh_summary_get_type ());
+ CamelMhSummary *o;
+ o = g_object_new (CAMEL_TYPE_MH_SUMMARY, NULL);
((CamelFolderSummary *)o)->folder = folder;
if (folder) {
camel_db_set_collate (folder->parent_store->cdb_r, "uid", "mh_uid_sort", (CamelDBCollate)camel_local_frompos_sort);
diff --cc camel/providers/nntp/camel-nntp-stream.c
index 46e10f1,4f2ade1..3165946
--- a/camel/providers/nntp/camel-nntp-stream.c
+++ b/camel/providers/nntp/camel-nntp-stream.c
@@@ -252,10 -248,10 +252,10 @@@ camel_nntp_stream_init (CamelNNTPStrea
* Returns a NULL stream. A null stream is always at eof, and
* always returns success for all reads and writes.
*
- * Return value: the stream
+ * Returns: the stream
**/
CamelStream *
-camel_nntp_stream_new(CamelStream *source)
+camel_nntp_stream_new (CamelStream *source)
{
CamelNNTPStream *is;
diff --cc camel/providers/pop3/camel-pop3-engine.c
index 8d4b936,1888c14..064ee0c
--- a/camel/providers/pop3/camel-pop3-engine.c
+++ b/camel/providers/pop3/camel-pop3-engine.c
@@@ -28,10 -28,13 +28,12 @@@
#include <stdio.h>
#include <string.h>
-#include <glib.h>
#include <glib/gi18n-lib.h>
++#include <camel/camel-private.h>
++
#include "camel-pop3-engine.h"
#include "camel-pop3-stream.h"
-#include "camel-sasl.h"
-#include "camel-service.h"
/* max 'outstanding' bytes in output stream, so we can't deadlock waiting
for the server to accept our data when pipelining */
diff --cc camel/providers/pop3/camel-pop3-stream.c
index bca4fdd,486fc52..b59d497
--- a/camel/providers/pop3/camel-pop3-stream.c
+++ b/camel/providers/pop3/camel-pop3-stream.c
@@@ -31,10 -31,18 +31,12 @@@
#include <stdio.h>
#include <string.h>
-#include <glib.h>
++#include <camel/camel-private.h>
+
#include "camel-pop3-stream.h"
-extern gint camel_verbose_debug;
#define dd(x) (camel_verbose_debug?(x):0)
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelStream */
-#define CS_CLASS(so) CAMEL_POP3_STREAM_CLASS(CAMEL_OBJECT_GET_CLASS(so))
-
#define CAMEL_POP3_STREAM_SIZE (4096)
#define CAMEL_POP3_STREAM_LINE (1024) /* maximum line size */
@@@ -252,10 -249,10 +254,10 @@@ camel_pop3_stream_init (CamelPOP3Strea
* Returns a NULL stream. A null stream is always at eof, and
* always returns success for all reads and writes.
*
- * Return value: the stream
+ * Returns: the stream
**/
CamelStream *
-camel_pop3_stream_new(CamelStream *source)
+camel_pop3_stream_new (CamelStream *source)
{
CamelPOP3Stream *is;
diff --cc camel/providers/smtp/camel-smtp-transport.c
index d824651,41d398b..3f807b5
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@@ -36,11 -36,31 +36,13 @@@
#include <glib/gi18n-lib.h>
-#undef MIN
-#undef MAX
++#include <camel/camel-private.h>
+
-#include "camel-exception.h"
-#include "camel-mime-filter-progress.h"
-#include "camel-mime-filter-crlf.h"
-#include "camel-mime-message.h"
-#include "camel-mime-part.h"
-#include "camel-multipart.h"
-#include "camel-net-utils.h"
-#include "camel-operation.h"
-#include "camel-sasl.h"
-#include "camel-session.h"
#include "camel-smtp-transport.h"
-#include "camel-stream-buffer.h"
-#include "camel-stream-filter.h"
-#include "camel-stream-null.h"
-#include "camel-tcp-stream-raw.h"
-#include "camel-tcp-stream.h"
-#ifdef HAVE_SSL
-#include "camel-tcp-stream-ssl.h"
-#endif
+#undef MIN
+#undef MAX
-extern gint camel_verbose_debug;
#define d(x) (camel_verbose_debug ? (x) : 0)
/* Specified in RFC 821 */
diff --cc docs/reference/camel/Makefile.am
index 2d5dec5,2b7704a..c4bc694
--- a/docs/reference/camel/Makefile.am
+++ b/docs/reference/camel/Makefile.am
@@@ -14,10 -14,10 +14,10 @@@ HTML_DIR = $(datadir)/gtk-doc/htm
SCAN_OPTIONS = --deprecated-guards="CAMEL_DISABLE_DEPRECATED"
# Extra options to pass to gtkdoc-scangobj
-SCANGOBJ_OPTIONS=--type-init-func="camel_init (\".\", 0)"
+SCANGOBJ_OPTIONS = --type-init-func="g_thread_init (NULL); g_type_init ()"
# Extra options to supply to gtkdoc-mkdb
- MKDB_OPTIONS = --sgml-mode --output-format=xml --ignore-files=trio
+ MKDB_OPTIONS = --sgml-mode --output-format=xml --name-space=camel
# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
GTKDOC_CFLAGS = \
diff --cc docs/reference/camel/camel-sections.txt
index 46722da,bf0147c..91c26c0
--- a/docs/reference/camel/camel-sections.txt
+++ b/docs/reference/camel/camel-sections.txt
@@@ -1497,12 -1241,39 +1430,30 @@@ camel_multipart_get_typ
<SECTION>
<FILE>camel-object</FILE>
<TITLE>CamelObject</TITLE>
-CAMEL_OBJECT_TRACK_INSTANCES
-CamelType
CamelObject
-CAMEL_CHECK_CAST
-CAMEL_CHECK_CLASS_CAST
-CAMEL_CHECK_TYPE
-CAMEL_CHECK_CLASS_TYPE
-camel_object_type
-CAMEL_OBJECT_TYPE
-CAMEL_OBJECT_GET_TYPE
CamelObjectHookID
- CamelObjectMeta
+ CamelObjectClassInitFunc
+ CamelObjectClassFinalizeFunc
+ CamelObjectInitFunc
+ CamelObjectFinalizeFunc
CamelObjectEventPrepFunc
CamelObjectEventHookFunc
+ CAMEL_INVALID_TYPE
+ CamelObjectFlags
+ camel_type_init
+ camel_type_register
+ camel_type_get_global_classfuncs
+ camel_type_to_name
+ camel_name_to_type
camel_object_class_add_event
+ camel_object_class_dump_tree
+ camel_object_cast
+ camel_object_is
+ camel_object_class_cast
+ camel_object_class_is
+ camel_object_new
+ camel_object_ref
+ camel_object_unref
camel_object_hook_event
camel_object_remove_event
camel_object_unhook_event
diff --cc docs/reference/camel/camel.types
index 8d8b533,e69de29..14c14cc
--- a/docs/reference/camel/camel.types
+++ b/docs/reference/camel/camel.types
@@@ -1,92 -1,0 +1,89 @@@
+camel_address_get_type
+camel_block_file_get_type
+camel_key_file_get_type
+camel_certdb_get_type
+camel_cipher_context_get_type
+camel_data_cache_get_type
+camel_data_wrapper_get_type
- camel_digest_folder_get_type
- camel_digest_store_get_type
- camel_digest_summary_get_type
+camel_disco_diary_get_type
+camel_disco_folder_get_type
+camel_disco_store_get_type
+camel_filter_driver_get_type
+camel_folder_get_type
+camel_folder_search_get_type
+camel_folder_summary_get_type
+camel_gpg_context_get_type
+camel_html_parser_get_type
+camel_http_stream_get_type
+camel_index_cursor_get_type
+camel_index_name_get_type
+camel_index_get_type
+camel_internet_address_get_type
+camel_medium_get_type
+camel_mime_filter_basic_get_type
+camel_mime_filter_bestenc_get_type
+camel_mime_filter_canon_get_type
+camel_mime_filter_charset_get_type
+camel_mime_filter_crlf_get_type
+camel_mime_filter_enriched_get_type
+camel_mime_filter_from_get_type
+camel_mime_filter_gzip_get_type
+camel_mime_filter_get_type
+camel_mime_filter_html_get_type
+camel_mime_filter_index_get_type
+camel_mime_filter_linewrap_get_type
+camel_mime_filter_pgp_get_type
+camel_mime_filter_progress_get_type
+camel_mime_filter_save_get_type
+camel_mime_filter_tohtml_get_type
+camel_mime_filter_windows_get_type
+camel_mime_filter_yenc_get_type
+camel_mime_message_get_type
+camel_mime_parser_get_type
+camel_mime_part_get_type
+camel_multipart_encrypted_get_type
+camel_multipart_get_type
+camel_multipart_signed_get_type
+camel_nntp_address_get_type
+camel_object_get_type
+camel_offline_folder_get_type
+camel_offline_journal_get_type
+camel_offline_store_get_type
+camel_partition_table_get_type
+camel_key_table_get_type
+camel_sasl_anonymous_get_type
+camel_sasl_cram_md5_get_type
+camel_sasl_digest_md5_get_type
+camel_sasl_gssapi_get_type
+camel_sasl_get_type
+camel_sasl_login_get_type
+camel_sasl_ntlm_get_type
+camel_sasl_plain_get_type
+camel_sasl_popb4smtp_get_type
+camel_seekable_stream_get_type
+camel_seekable_substream_get_type
+camel_service_get_type
+camel_session_get_type
+camel_smime_context_get_type
+camel_store_get_type
+camel_store_summary_get_type
+camel_stream_buffer_get_type
+camel_stream_filter_get_type
+camel_stream_fs_get_type
+camel_stream_get_type
+camel_stream_mem_get_type
+camel_stream_null_get_type
+camel_stream_process_get_type
+camel_stream_vfs_get_type
+camel_tcp_stream_get_type
+camel_tcp_stream_raw_get_type
+camel_tcp_stream_ssl_get_type
+camel_text_index_cursor_get_type
+camel_text_index_key_cursor_get_type
+camel_text_index_name_get_type
+camel_text_index_get_type
+camel_transport_get_type
+camel_vee_folder_get_type
+camel_vee_store_get_type
+camel_vee_summary_get_type
+camel_vtrash_folder_get_type
diff --cc docs/reference/camel/tmpl/camel-folder.sgml
index 1cfc6db,b4f0723..fd6cad2
--- a/docs/reference/camel/tmpl/camel-folder.sgml
+++ b/docs/reference/camel/tmpl/camel-folder.sgml
@@@ -121,10 -130,18 +121,19 @@@ CamelFolde
@folder:
@expunge:
- ex:
+ error:
+ Returns:
+ <!-- ##### FUNCTION camel_folder_set_lock_async ##### -->
+ <para>
+
+ </para>
+
+ @folder:
+ @skip_folder_lock:
+
+
<!-- ##### FUNCTION camel_folder_get_parent_store ##### -->
<para>
diff --cc docs/reference/camel/tmpl/camel-multipart.sgml
index dbda444,90a1010..656f03b
--- a/docs/reference/camel/tmpl/camel-multipart.sgml
+++ b/docs/reference/camel/tmpl/camel-multipart.sgml
@@@ -9,11 -9,11 +9,13 @@@ CamelMultipar
</para>
++
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
++
<!-- ##### SECTION Stability_Level ##### -->
diff --cc docs/reference/camel/tmpl/camel-object.sgml
index d86b939,82289eb..ce2b548
--- a/docs/reference/camel/tmpl/camel-object.sgml
+++ b/docs/reference/camel/tmpl/camel-object.sgml
@@@ -29,15 -108,39 +29,6 @@@ CamelObjec
</para>
- <!-- ##### STRUCT CamelObjectMeta ##### -->
- <para>
-
- </para>
-
- @next:
- @value:
- @name:
-
-<!-- ##### USER_FUNCTION CamelObjectClassInitFunc ##### -->
-<para>
-
-</para>
-
- Param1:
-
-
-<!-- ##### USER_FUNCTION CamelObjectClassFinalizeFunc ##### -->
-<para>
-
-</para>
-
- Param1:
-
-
-<!-- ##### USER_FUNCTION CamelObjectInitFunc ##### -->
-<para>
-
-</para>
-
- Param1:
- Param2:
-
-
-<!-- ##### USER_FUNCTION CamelObjectFinalizeFunc ##### -->
-<para>
-
-</para>
-
- Param1:
-
-
<!-- ##### USER_FUNCTION CamelObjectEventPrepFunc ##### -->
<para>
diff --cc docs/reference/camel/tmpl/camel-partition-table.sgml
index c282caf,b9eaafc..d2802d7
--- a/docs/reference/camel/tmpl/camel-partition-table.sgml
+++ b/docs/reference/camel/tmpl/camel-partition-table.sgml
@@@ -9,11 -9,11 +9,13 @@@ CamelKeyTabl
</para>
++
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
++
<!-- ##### SECTION Stability_Level ##### -->
diff --cc docs/reference/camel/tmpl/camel-store.sgml
index c9ff49b,7a581ca..ce86f74
--- a/docs/reference/camel/tmpl/camel-store.sgml
+++ b/docs/reference/camel/tmpl/camel-store.sgml
@@@ -447,7 -459,7 +454,7 @@@ CamelStor
</para>
@folders:
-- namespace:
++ name_space:
@separator:
@short_names:
@Returns:
diff --cc docs/reference/camel/tmpl/camel-unused.sgml
index 5ce4142,31b7f28..497bcce
--- a/docs/reference/camel/tmpl/camel-unused.sgml
+++ b/docs/reference/camel/tmpl/camel-unused.sgml
@@@ -78,52 -150,76 +150,52 @@@ camel-imap-type
camel-local-private
--<!-- ##### SECTION ./tmpl/camel-md5-utils.sgml:Long_Description ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### SECTION ./tmpl/camel-md5-utils.sgml:See_Also ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### SECTION ./tmpl/camel-md5-utils.sgml:Short_Description ##### -->
-
-
-
-<!-- ##### SECTION ./tmpl/camel-md5-utils.sgml:Stability_Level ##### -->
-
-
-
-<!-- ##### SECTION ./tmpl/camel-md5-utils.sgml:Title ##### -->
-camel-md5-utils
-
-
-<!-- ##### SECTION ./tmpl/camel-mime-part-utils.sgml:Long_Description ##### -->
++<!-- ##### SECTION ./tmpl/camel-news-address.sgml:Long_Description ##### -->
<para>
</para>
- <!-- ##### SECTION ./tmpl/camel-md5-utils.sgml:See_Also ##### -->
-<!-- ##### SECTION ./tmpl/camel-mime-part-utils.sgml:See_Also ##### -->
++<!-- ##### SECTION ./tmpl/camel-news-address.sgml:See_Also ##### -->
<para>
</para>
- <!-- ##### SECTION ./tmpl/camel-md5-utils.sgml:Short_Description ##### -->
-<!-- ##### SECTION ./tmpl/camel-mime-part-utils.sgml:Short_Description ##### -->
++<!-- ##### SECTION ./tmpl/camel-news-address.sgml:Short_Description ##### -->
- <!-- ##### SECTION ./tmpl/camel-md5-utils.sgml:Stability_Level ##### -->
-<!-- ##### SECTION ./tmpl/camel-mime-part-utils.sgml:Stability_Level ##### -->
++<!-- ##### SECTION ./tmpl/camel-news-address.sgml:Stability_Level ##### -->
- <!-- ##### SECTION ./tmpl/camel-md5-utils.sgml:Title ##### -->
- camel-md5-utils
-<!-- ##### SECTION ./tmpl/camel-mime-part-utils.sgml:Title ##### -->
-camel-mime-part-utils
++<!-- ##### SECTION ./tmpl/camel-news-address.sgml:Title ##### -->
++CamelNewsAddress
- <!-- ##### SECTION ./tmpl/camel-mime-part-utils.sgml:Long_Description ##### -->
-<!-- ##### SECTION ./tmpl/camel-news-address.sgml:Long_Description ##### -->
++<!-- ##### SECTION ./tmpl/camel-nntp-address.sgml:Long_Description ##### -->
<para>
</para>
- <!-- ##### SECTION ./tmpl/camel-mime-part-utils.sgml:See_Also ##### -->
-<!-- ##### SECTION ./tmpl/camel-news-address.sgml:See_Also ##### -->
++<!-- ##### SECTION ./tmpl/camel-nntp-address.sgml:See_Also ##### -->
<para>
</para>
- <!-- ##### SECTION ./tmpl/camel-mime-part-utils.sgml:Short_Description ##### -->
-<!-- ##### SECTION ./tmpl/camel-news-address.sgml:Short_Description ##### -->
++<!-- ##### SECTION ./tmpl/camel-nntp-address.sgml:Short_Description ##### -->
- <!-- ##### SECTION ./tmpl/camel-mime-part-utils.sgml:Stability_Level ##### -->
-<!-- ##### SECTION ./tmpl/camel-news-address.sgml:Stability_Level ##### -->
++<!-- ##### SECTION ./tmpl/camel-nntp-address.sgml:Stability_Level ##### -->
- <!-- ##### SECTION ./tmpl/camel-mime-part-utils.sgml:Title ##### -->
- camel-mime-part-utils
-<!-- ##### SECTION ./tmpl/camel-news-address.sgml:Title ##### -->
-CamelNewsAddress
++<!-- ##### SECTION ./tmpl/camel-nntp-address.sgml:Title ##### -->
++CamelNNTPAddress
<!-- ##### SECTION ./tmpl/camel-nntp-private.sgml:Long_Description ##### -->
@@@ -302,12 -382,12 +358,6 @@@ camel-type
@f:
@l:
--<!-- ##### MACRO CAMEL_IMAP_MESSAGE_RECENT ##### -->
--<para>
--
--</para>
--
--
<!-- ##### MACRO CAMEL_IMAP_WRAPPER_LOCK ##### -->
<para>
@@@ -324,13 -404,7 +374,7 @@@
@f:
@l:
--<!-- ##### MACRO CAMEL_INTERFACE_TYPE ##### -->
- <para>
-
- </para>
-
-
+<!-- ##### MACRO CAMEL_INVALID_TYPE ##### -->
<para>
</para>
@@@ -352,16 -426,16 +396,6 @@@
@f:
@l:
--<!-- ##### MACRO CAMEL_MAKE_CLASS ##### -->
--<para>
--
--</para>
--
-- type:
-- tname:
-- parent:
-- pname:
--
<!-- ##### MACRO CAMEL_NNTP_FOLDER_LOCK ##### -->
<para>
@@@ -412,47 -481,25 +441,14 @@@
</para>
+ @parent:
-<!-- ##### STRUCT CamelDigestSummary ##### -->
-<para>
-
-</para>
-
- parent_object:
-
-<!-- ##### STRUCT CamelISubscribe ##### -->
+<!-- ##### STRUCT CamelException ##### -->
<para>
</para>
- iface:
- subscribed:
- subscribe:
- unsubscribe:
- <!-- ##### SIGNAL CamelFolder::deleted ##### -->
- <para>
-
- </para>
-
- @camelfolder: the object which received the signal.
- @arg1:
-
- <!-- ##### SIGNAL CamelFolder::folder-changed ##### -->
- <para>
-
- </para>
-
- @camelfolder: the object which received the signal.
- @arg1:
-
- <!-- ##### SIGNAL CamelFolder::renamed ##### -->
- <para>
-
- </para>
-
- @camelfolder: the object which received the signal.
- @arg1:
-
- <!-- ##### STRUCT CamelISubscribe ##### -->
- <para>
-
- </para>
-
- @iface:
- @subscribed:
- @subscribe:
- @unsubscribe:
-
<!-- ##### STRUCT CamelImapFolderPrivate ##### -->
<para>
@@@ -466,29 -513,30 +462,6 @@@
</para>
--<!-- ##### STRUCT CamelInterface ##### -->
--<para>
--
--</para>
--
-
- <!-- ##### STRUCT CamelIterator ##### -->
- <para>
-
- </para>
-
- @klass:
-
- <!-- ##### STRUCT CamelIteratorVTable ##### -->
- <para>
-
- </para>
-
- @free:
- @next:
- @reset:
- @length:
-
- type:
-
-<!-- ##### STRUCT CamelIterator ##### -->
-<para>
-
-</para>
-
- klass:
-
-<!-- ##### STRUCT CamelIteratorVTable ##### -->
-<para>
-
-</para>
-
- free:
- next:
- reset:
- length:
-
<!-- ##### STRUCT CamelLocalFolderPrivate ##### -->
<para>
@@@ -496,13 -544,13 +469,13 @@@
@search_lock:
--<!-- ##### STRUCT CamelMD5Context ##### -->
++<!-- ##### STRUCT CamelMimeFilterChomp ##### -->
<para>
</para>
--<!-- ##### STRUCT CamelMimeFilterChomp ##### -->
++<!-- ##### STRUCT CamelNNTPAddress ##### -->
<para>
</para>
@@@ -568,577 -608,450 +533,155 @@@
</para>
- @camelobject: the object which received the signal.
- @arg1:
+ @parent:
+ @priv:
- <!-- ##### TYPEDEF CamelObjectClassFinalizeFunc ##### -->
-<!-- ##### STRUCT CamelObjectMeta ##### -->
-<para>
-
-</para>
-
- next:
- value:
- name:
-
-<!-- ##### STRUCT CamelSimpleDataWrapper ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### STRUCT CamelStreamDataWrapper ##### -->
++<!-- ##### USER_FUNCTION CamelObjectClassFinalizeFunc ##### -->
<para>
</para>
++ Param1:
- <!-- ##### TYPEDEF CamelObjectClassInitFunc ##### -->
-<!-- ##### MACRO NI_MAXHOST ##### -->
++<!-- ##### USER_FUNCTION CamelObjectClassInitFunc ##### -->
<para>
</para>
++ Param1:
- <!-- ##### TYPEDEF CamelObjectFinalizeFunc ##### -->
-<!-- ##### MACRO NI_MAXSERV ##### -->
++<!-- ##### USER_FUNCTION CamelObjectFinalizeFunc ##### -->
<para>
</para>
++ Param1:
-<!-- ##### FUNCTION add_recipients ##### -->
+<!-- ##### ENUM CamelObjectFlags ##### -->
<para>
</para>
- recipient_list:
- recipients:
- recipient_type:
- Returns:
+ CAMEL_OBJECT_DESTROY:
- <!-- ##### TYPEDEF CamelObjectInitFunc ##### -->
-<!-- ##### STRUCT addrinfo ##### -->
++<!-- ##### USER_FUNCTION CamelObjectInitFunc ##### -->
<para>
</para>
-
- <!-- ##### SIGNAL CamelSession::online ##### -->
- <para>
-
- </para>
-
- @camelsession: the object which received the signal.
- @arg1:
- ai_flags:
- ai_family:
- ai_socktype:
- ai_protocol:
- ai_addrlen:
- ai_addr:
- ai_canonname:
- ai_next:
++ Param1:
++ Param2:
-<!-- ##### FUNCTION camel_base64_decode_simple ##### -->
-<para>
-
-</para>
-
- data:
- len:
- Returns:
-
-<!-- ##### FUNCTION camel_base64_decode_step ##### -->
-<para>
-
-</para>
-
- in:
- len:
- out:
- state:
- save:
- Returns:
-
-<!-- ##### FUNCTION camel_base64_encode_close ##### -->
-<para>
-
-</para>
-
- in:
- inlen:
- break_lines:
- out:
- state:
- save:
- Returns:
-
-<!-- ##### FUNCTION camel_base64_encode_simple ##### -->
-<para>
-
-</para>
-
- data:
- len:
- Returns:
-
-<!-- ##### FUNCTION camel_base64_encode_step ##### -->
-<para>
-
-</para>
-
- in:
- inlen:
- break_lines:
- out:
- state:
- save:
- Returns:
-
-<!-- ##### FUNCTION camel_block_file_get_type ##### -->
-<para>
-
-</para>
-
- Returns:
-
-<!-- ##### FUNCTION camel_digest_folder_new ##### -->
-<para>
-
-</para>
-
- parent_store:
- message:
- Returns:
-
-<!-- ##### FUNCTION camel_digest_store_new ##### -->
-<para>
-
-</para>
-
- url:
- Returns:
-
-<!-- ##### FUNCTION camel_digest_summary_new ##### -->
-<para>
-
-</para>
-
- Returns:
-
-<!-- ##### FUNCTION camel_file_util_decode_size_t ##### -->
-<para>
-
-</para>
-
- in:
- dest:
- Returns:
-
-<!-- ##### FUNCTION camel_file_util_encode_size_t ##### -->
+<!-- ##### STRUCT CamelSimpleDataWrapper ##### -->
<para>
</para>
- out:
- value:
- Returns:
- <!-- ##### SIGNAL CamelStore::folder-created ##### -->
- <para>
-
- </para>
-
- @camelstore: the object which received the signal.
- @arg1:
-
- <!-- ##### SIGNAL CamelStore::folder-deleted ##### -->
- <para>
-
- </para>
-
- @camelstore: the object which received the signal.
- @arg1:
-
- <!-- ##### SIGNAL CamelStore::folder-opened ##### -->
- <para>
-
- </para>
-
- @camelstore: the object which received the signal.
- @arg1:
-
- <!-- ##### SIGNAL CamelStore::folder-renamed ##### -->
- <para>
-
- </para>
-
- @camelstore: the object which received the signal.
- @arg1:
-
- <!-- ##### SIGNAL CamelStore::folder-subscribed ##### -->
- <para>
-
- </para>
-
- @camelstore: the object which received the signal.
- @arg1:
-
- <!-- ##### SIGNAL CamelStore::folder-unsubscribed ##### -->
- <para>
-
- </para>
-
- @camelstore: the object which received the signal.
- @arg1:
-
-<!-- ##### FUNCTION camel_filter_driver_expand_option ##### -->
+<!-- ##### STRUCT CamelStreamDataWrapper ##### -->
<para>
</para>
- d:
- s:
- action:
- op:
- <!-- ##### TYPEDEF CamelType ##### -->
- <para>
-
- </para>
-
-
- <!-- ##### ENUM ExceptionId ##### -->
- <para>
-
- </para>
-
-
- <!-- ##### MACRO NI_MAXHOST ##### -->
- <para>
-
- </para>
-
-
- <!-- ##### MACRO NI_MAXSERV ##### -->
- <para>
-
- </para>
-
-
- <!-- ##### FUNCTION add_recipients ##### -->
- <para>
-
- </para>
-
- @recipient_list:
- @recipients:
- @recipient_type:
- @Returns:
-
- <!-- ##### STRUCT addrinfo ##### -->
- <para>
-
- </para>
-
- @ai_flags:
- @ai_family:
- @ai_socktype:
- @ai_protocol:
- @ai_addrlen:
- @ai_addr:
- @ai_canonname:
- @ai_next:
-
- <!-- ##### FUNCTION camel_block_file_get_type ##### -->
- <para>
-
- </para>
-
- @Returns:
-
- <!-- ##### FUNCTION camel_cipher_context_construct ##### -->
- <para>
-
- </para>
-
- @context:
- @session:
-
- <!-- ##### FUNCTION camel_exception_clear ##### -->
- <para>
-
- </para>
-
- @ex:
-
- <!-- ##### FUNCTION camel_exception_free ##### -->
- <para>
-
- </para>
-
- @ex:
-
- <!-- ##### FUNCTION camel_exception_get_description ##### -->
- <para>
-
- </para>
-
- @ex:
- @Returns:
-
- <!-- ##### FUNCTION camel_exception_get_id ##### -->
- <para>
-
- </para>
-
- @ex:
- @Returns:
-
- <!-- ##### FUNCTION camel_exception_init ##### -->
- <para>
-
- </para>
-
- @ex:
-
- <!-- ##### MACRO camel_exception_is_set ##### -->
- <para>
-
- </para>
-
- @ex:
-
- <!-- ##### FUNCTION camel_exception_new ##### -->
- <para>
-
- </para>
-
- @Returns:
-
- <!-- ##### FUNCTION camel_exception_set ##### -->
- <para>
-
- </para>
-
- @ex:
- @id:
- @desc:
-
- <!-- ##### FUNCTION camel_exception_setv ##### -->
- <para>
-
- </para>
-
- @ex:
- @id:
- @format:
- @Varargs:
-
- <!-- ##### FUNCTION camel_exception_xfer ##### -->
-<!-- ##### FUNCTION camel_filter_driver_rule_count ##### -->
++<!-- ##### FUNCTION camel_name_to_type ##### -->
<para>
</para>
- @ex_dst:
- @ex_src:
-
- <!-- ##### FUNCTION camel_file_util_decode_size_t ##### -->
- <para>
-
- </para>
-
- @in:
- @dest:
- @Returns:
-
- <!-- ##### FUNCTION camel_file_util_encode_size_t ##### -->
- <para>
-
- </para>
-
- @out:
- @value:
- @Returns:
-
- <!-- ##### FUNCTION camel_folder_set_lock_async ##### -->
- <para>
-
- </para>
-
- @folder:
- @async:
-
- <!-- ##### FUNCTION camel_folder_summary_array_free ##### -->
- <para>
-
- </para>
-
- @summary:
- @array:
-
- <!-- ##### STRUCT camel_header_raw ##### -->
- <para>
-
- </para>
-
- @next:
- d:
+ name:
- @value:
- @offset:
-
- <!-- ##### FUNCTION camel_header_raw_find_next ##### -->
- <para>
-
- </para>
-
- @header_queue:
- @header_name:
- @offset:
- @last_value:
- @Returns:
-
- <!-- ##### FUNCTION camel_header_raw_fold ##### -->
- <para>
-
- </para>
-
- @list:
-
- <!-- ##### FUNCTION camel_header_raw_replace ##### -->
- <para>
-
- </para>
-
- @header_queue:
- @header_name:
- @header_value:
- @offset:
-
- <!-- ##### FUNCTION camel_imap_store_summary_namespace_new ##### -->
- <para>
-
- </para>
-
- @s:
- @full_name:
- @dir_sep:
- @Returns:
-
- <!-- ##### FUNCTION camel_imap_store_summary_namespace_set ##### -->
- <para>
-
- </para>
-
- @s:
- @ns:
-
- <!-- ##### FUNCTION camel_index_name_get_type ##### -->
- <para>
-
- </para>
-
- @Returns:
-
- <!-- ##### MACRO camel_interface_cast ##### -->
- <para>
-
- </para>
-
- @g_class:
- @g_type:
- @Returns:
-
- <!-- ##### MACRO camel_interface_is ##### -->
- <para>
-
- </para>
-
- @g_class:
- @g_type:
@Returns:
- <!-- ##### FUNCTION camel_interface_register ##### -->
-<!-- ##### FUNCTION camel_filter_driver_rule_get ##### -->
++<!-- ##### FUNCTION camel_nntp_address_add ##### -->
<para>
</para>
- @parent:
- d:
- n:
++ a:
+ name:
- @classfuncs_size:
- @class_init:
- @class_finalize:
@Returns:
- <!-- ##### VARIABLE camel_interface_type ##### -->
- <para>
-
- </para>
-
-
- <!-- ##### FUNCTION camel_isubscribe_get_type ##### -->
-<!-- ##### FUNCTION camel_folder_summary_array_free ##### -->
-<para>
-
-</para>
-
- summary:
- array:
-
-<!-- ##### FUNCTION camel_imap_store_summary_namespace_new ##### -->
++<!-- ##### FUNCTION camel_nntp_address_get ##### -->
<para>
</para>
- s:
- full_name:
- dir_sep:
++ a:
++ index:
++ namep:
@Returns:
- <!-- ##### FUNCTION camel_isubscribe_subscribe ##### -->
-<!-- ##### FUNCTION camel_imap_store_summary_namespace_set ##### -->
-<para>
-
-</para>
-
- s:
- ns:
-
-<!-- ##### FUNCTION camel_index_name_get_type ##### -->
++<!-- ##### FUNCTION camel_nntp_address_new ##### -->
<para>
</para>
- @store:
- @folder_name:
- @ex:
-
- <!-- ##### FUNCTION camel_isubscribe_subscribed ##### -->
- <para>
-
- </para>
-
- @store:
- @name:
@Returns:
- <!-- ##### FUNCTION camel_isubscribe_unsubscribe ##### -->
- <para>
-
- </para>
-
- @store:
- @folder_name:
- @ex:
-
- <!-- ##### FUNCTION camel_iterator_free ##### -->
-<!-- ##### FUNCTION camel_interface_cast ##### -->
++<!-- ##### FUNCTION camel_object_cast ##### -->
<para>
</para>
- @it:
-
- <!-- ##### FUNCTION camel_iterator_length ##### -->
- <para>
-
- </para>
-
- @it:
- klass:
++ obj:
+ @ctype:
@Returns:
- <!-- ##### FUNCTION camel_iterator_new ##### -->
-<!-- ##### FUNCTION camel_interface_is ##### -->
++<!-- ##### FUNCTION camel_object_class_cast ##### -->
<para>
</para>
- k:
+ klass:
- @size:
- @Returns:
-
- <!-- ##### FUNCTION camel_iterator_next ##### -->
- <para>
-
- </para>
-
- @it:
- @ex:
- @Returns:
-
- <!-- ##### FUNCTION camel_iterator_reset ##### -->
- <para>
-
- </para>
-
- @it:
-
- <!-- ##### FUNCTION camel_key_file_get_type ##### -->
- <para>
-
- </para>
-
- @Returns:
-
- <!-- ##### FUNCTION camel_key_table_get_type ##### -->
- <para>
-
- </para>
-
- @Returns:
-
- <!-- ##### FUNCTION camel_md5_final ##### -->
- <para>
-
- </para>
-
- @ctx:
- @digest:
-
- <!-- ##### FUNCTION camel_md5_get_digest ##### -->
- <para>
-
- </para>
-
- @buffer:
- @buffer_size:
- @digest:
-
- <!-- ##### FUNCTION camel_md5_get_digest_from_file ##### -->
- <para>
-
- </para>
-
- @filename:
- @digest:
-
- <!-- ##### FUNCTION camel_md5_init ##### -->
- <para>
-
- </para>
-
- @ctx:
-
- <!-- ##### FUNCTION camel_md5_update ##### -->
- <para>
-
- </para>
-
- @ctx:
- @buf:
- @len:
-
- <!-- ##### FUNCTION camel_medium_get_content_object ##### -->
- <para>
-
- </para>
-
- @medium:
+ @ctype:
@Returns:
- <!-- ##### FUNCTION camel_medium_set_content_object ##### -->
-<!-- ##### FUNCTION camel_interface_register ##### -->
-<para>
-
-</para>
-
- parent:
- name:
- classfuncs_size:
- class_init:
- class_finalize:
- Returns:
-
-<!-- ##### VARIABLE camel_interface_type ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### FUNCTION camel_isubscribe_get_type ##### -->
-<para>
-
-</para>
-
- Returns:
-
-<!-- ##### FUNCTION camel_isubscribe_subscribe ##### -->
-<para>
-
-</para>
-
- store:
- folder_name:
- ex:
-
-<!-- ##### FUNCTION camel_isubscribe_subscribed ##### -->
-<para>
-
-</para>
-
- store:
- name:
- Returns:
-
-<!-- ##### FUNCTION camel_isubscribe_unsubscribe ##### -->
-<para>
-
-</para>
-
- store:
- folder_name:
- ex:
-
-<!-- ##### FUNCTION camel_iterator_free ##### -->
++<!-- ##### FUNCTION camel_object_class_dump_tree ##### -->
<para>
</para>
- @medium:
- @content:
-
- <!-- ##### FUNCTION camel_mime_filter_basic_new_type ##### -->
- <para>
-
- </para>
-
- @type:
- @Returns:
- it:
++ root:
- <!-- ##### FUNCTION camel_mime_filter_charset_new_convert ##### -->
-<!-- ##### FUNCTION camel_iterator_length ##### -->
-<para>
-
-</para>
-
- it:
- Returns:
-
-<!-- ##### FUNCTION camel_iterator_new ##### -->
++<!-- ##### FUNCTION camel_object_class_is ##### -->
<para>
</para>
- @from_charset:
- @to_charset:
+ @klass:
- size:
- Returns:
-
-<!-- ##### FUNCTION camel_iterator_next ##### -->
-<para>
-
-</para>
-
- it:
- ex:
- Returns:
-
-<!-- ##### FUNCTION camel_iterator_reset ##### -->
-<para>
-
-</para>
-
- it:
-
-<!-- ##### FUNCTION camel_key_file_get_type ##### -->
-<para>
-
-</para>
-
- Returns:
-
-<!-- ##### FUNCTION camel_key_table_get_type ##### -->
-<para>
-
-</para>
-
- Returns:
-
-<!-- ##### FUNCTION camel_md5_final ##### -->
-<para>
-
-</para>
-
- ctx:
- digest:
-
-<!-- ##### FUNCTION camel_md5_get_digest ##### -->
-<para>
-
-</para>
-
- buffer:
- buffer_size:
- digest:
-
-<!-- ##### FUNCTION camel_md5_get_digest_from_file ##### -->
-<para>
-
-</para>
-
- filename:
- digest:
-
-<!-- ##### FUNCTION camel_md5_init ##### -->
-<para>
-
-</para>
-
- ctx:
-
-<!-- ##### FUNCTION camel_md5_update ##### -->
-<para>
-
-</para>
-
- ctx:
- buf:
- len:
-
-<!-- ##### FUNCTION camel_mkdir ##### -->
-<para>
-
-</para>
-
- path:
- mode:
- Returns:
-
-<!-- ##### FUNCTION camel_news_address_new ##### -->
-<para>
-
-</para>
-
++ ctype:
@Returns:
- <!-- ##### FUNCTION camel_mime_filter_index_new_index ##### -->
-<!-- ##### FUNCTION camel_object_class_add_interface ##### -->
-<para>
-
-</para>
-
- klass:
- itype:
-
+ <!-- ##### FUNCTION camel_object_get_int ##### -->
<para>
</para>
- @index:
+ @vo:
- ex:
++ error:
+ @tag:
@Returns:
- <!-- ##### FUNCTION camel_mime_filter_save_new_with_stream ##### -->
-<!-- ##### FUNCTION camel_object_get_interface ##### -->
++<!-- ##### FUNCTION camel_object_get_ptr ##### -->
<para>
</para>
- @stream:
+ @vo:
- itype:
++ error:
++ tag:
@Returns:
- <!-- ##### FUNCTION camel_mime_part_get_content_MD5 ##### -->
-<!-- ##### FUNCTION camel_object_get_ptr ##### -->
++<!-- ##### FUNCTION camel_object_is ##### -->
<para>
</para>
- @mime_part:
- vo:
- ex:
- tag:
++ obj:
++ ctype:
@Returns:
- <!-- ##### FUNCTION camel_mime_part_set_content_MD5 ##### -->
- <para>
-
- </para>
-
- @mime_part:
- @md5sum:
-
- <!-- ##### MACRO camel_name_to_type ##### -->
+ <!-- ##### FUNCTION camel_object_meta_get ##### -->
<para>
</para>
@@@ -1151,109 -1065,46 +695,32 @@@
</para>
- @instance:
- @g_type:
- @Returns:
-
- <!-- ##### FUNCTION camel_object_class_add_interface ##### -->
- <para>
-
- </para>
-
- @klass:
- @itype:
-
- <!-- ##### MACRO camel_object_class_cast ##### -->
- <para>
-
- </para>
-
- @g_class:
- @g_type:
- @Returns:
-
- <!-- ##### MACRO camel_object_class_dump_tree ##### -->
- <para>
-
- </para>
-
- @g_type:
-
- <!-- ##### MACRO camel_object_class_is ##### -->
- <para>
-
- </para>
-
- @g_class:
- @g_type:
- @Returns:
-
- <!-- ##### MACRO camel_object_get_interface ##### -->
- <para>
-
- </para>
-
- @instance:
- @g_type:
- @Returns:
-
- <!-- ##### MACRO camel_object_is ##### -->
- <para>
-
- </para>
-
- @instance:
- @g_type:
+ @vo:
+ @name:
+ @value:
@Returns:
- <!-- ##### MACRO camel_object_new ##### -->
-<!-- ##### FUNCTION camel_object_new_name ##### -->
-<para>
-
-</para>
-
- name:
- Returns:
-
-<!-- ##### FUNCTION camel_partition_table_get_type ##### -->
++<!-- ##### FUNCTION camel_object_new ##### -->
<para>
</para>
+ type:
@Returns:
- <!-- ##### FUNCTION camel_object_new_name ##### -->
- <para>
-
- </para>
-
- @name:
- @Returns:
-
- <!-- ##### MACRO camel_object_ref ##### -->
-<!-- ##### FUNCTION camel_process_fork ##### -->
++<!-- ##### FUNCTION camel_object_ref ##### -->
<para>
</para>
- path:
- argv:
- infd:
- outfd:
- errfd:
- ex:
- Returns:
++ Param1:
- <!-- ##### VARIABLE camel_object_type ##### -->
-<!-- ##### FUNCTION camel_process_wait ##### -->
++<!-- ##### FUNCTION camel_object_unref ##### -->
<para>
</para>
-
- <!-- ##### MACRO camel_object_unref ##### -->
- <para>
-
- </para>
-
-
- <!-- ##### FUNCTION camel_partition_table_get_type ##### -->
- <para>
-
- </para>
-
- @Returns:
-
- <!-- ##### FUNCTION camel_sasl_authenticated ##### -->
- <para>
-
- </para>
-
- @sasl:
- @Returns:
- pid:
- Returns:
++ Param1:
<!-- ##### FUNCTION camel_search_build_match_regex ##### -->
<para>
@@@ -1356,61 -1207,15 +823,14 @@@
@type:
@words:
- <!-- ##### FUNCTION camel_stream_filter_new_with_stream ##### -->
- <para>
-
- </para>
-
- @stream:
- @Returns:
-
--<!-- ##### FUNCTION camel_stream_vfs_new_with_handle ##### -->
- <para>
-
- </para>
-
- @handle:
- @Returns:
-
- <!-- ##### FUNCTION camel_stream_vprintf ##### -->
- <para>
-
- </para>
-
- @stream:
- @fmt:
- @ap:
- @Returns:
-
- <!-- ##### FUNCTION camel_text_index_get_type ##### -->
- <para>
-
- </para>
-
- @Returns:
-
- <!-- ##### FUNCTION camel_text_index_key_cursor_get_type ##### -->
- <para>
-
- </para>
-
- @Returns:
-
- <!-- ##### FUNCTION camel_text_index_name_get_type ##### -->
- <para>
-
- </para>
-
- @Returns:
-
+<!-- ##### MACRO camel_type_get_global_classfuncs ##### -->
<para>
</para>
- @type:
- handle:
- Returns:
++ x:
- <!-- ##### MACRO camel_type_init ##### -->
-<!-- ##### FUNCTION camel_text_index_get_type ##### -->
++<!-- ##### FUNCTION camel_type_init ##### -->
<para>
</para>
@@@ -1421,22 -1227,13 +841,22 @@@
</para>
+ parent:
+ name:
+ instance_size:
+ classfuncs_size:
+ class_init:
+ class_finalize:
+ instance_init:
+ instance_finalize:
@Returns:
- <!-- ##### MACRO camel_type_to_name ##### -->
-<!-- ##### FUNCTION camel_text_index_name_get_type ##### -->
++<!-- ##### FUNCTION camel_type_to_name ##### -->
<para>
</para>
- @g_class:
++ type:
@Returns:
<!-- ##### FUNCTION camel_ustrstrcase ##### -->
@@@ -1448,20 -1245,26 +868,3 @@@
@needle:
@Returns:
- <!-- ##### FUNCTION groupwise_refresh_folder ##### -->
- <para>
-
- </para>
-
- @folder:
- @ex:
-
- <!-- ##### FUNCTION gw_get_path ##### -->
- <para>
-
- </para>
-
- @gw_store:
- @folder_name:
- @Returns:
-
-<!-- ##### VARIABLE camel_verbose_debug ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### FUNCTION groupwise_refresh_folder ##### -->
-<para>
-
-</para>
-
- folder:
- ex:
-
-<!-- ##### FUNCTION gw_get_path ##### -->
-<para>
-
-</para>
-
- gw_store:
- folder_name:
- Returns:
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]