evolution-data-server r9749 - in branches/camel-gobject/camel: . providers/groupwise providers/imap providers/imap4 providers/imapp providers/local providers/nntp providers/pop3 providers/sendmail providers/smtp tests/folder tests/lib tests/message tests/mime-filter tests/smime
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9749 - in branches/camel-gobject/camel: . providers/groupwise providers/imap providers/imap4 providers/imapp providers/local providers/nntp providers/pop3 providers/sendmail providers/smtp tests/folder tests/lib tests/message tests/mime-filter tests/smime
- Date: Mon, 10 Nov 2008 00:44:12 +0000 (UTC)
Author: mbarnes
Date: Mon Nov 10 00:44:12 2008
New Revision: 9749
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9749&view=rev
Log:
Get all the direct GObject substitutions out of the way.
Modified:
branches/camel-gobject/camel/camel-address.c
branches/camel-gobject/camel/camel-address.h
branches/camel-gobject/camel/camel-block-file.c
branches/camel-gobject/camel/camel-block-file.h
branches/camel-gobject/camel/camel-certdb.c
branches/camel-gobject/camel/camel-certdb.h
branches/camel-gobject/camel/camel-cipher-context.c
branches/camel-gobject/camel/camel-cipher-context.h
branches/camel-gobject/camel/camel-data-cache.c
branches/camel-gobject/camel/camel-data-cache.h
branches/camel-gobject/camel/camel-data-wrapper.c
branches/camel-gobject/camel/camel-data-wrapper.h
branches/camel-gobject/camel/camel-digest-folder.c
branches/camel-gobject/camel/camel-digest-folder.h
branches/camel-gobject/camel/camel-digest-store.c
branches/camel-gobject/camel/camel-digest-store.h
branches/camel-gobject/camel/camel-digest-summary.c
branches/camel-gobject/camel/camel-digest-summary.h
branches/camel-gobject/camel/camel-disco-diary.c
branches/camel-gobject/camel/camel-disco-diary.h
branches/camel-gobject/camel/camel-disco-folder.c
branches/camel-gobject/camel/camel-disco-folder.h
branches/camel-gobject/camel/camel-disco-store.c
branches/camel-gobject/camel/camel-disco-store.h
branches/camel-gobject/camel/camel-filter-driver.c
branches/camel-gobject/camel/camel-filter-driver.h
branches/camel-gobject/camel/camel-filter-search.c
branches/camel-gobject/camel/camel-folder-search.c
branches/camel-gobject/camel/camel-folder-search.h
branches/camel-gobject/camel/camel-folder-summary.c
branches/camel-gobject/camel/camel-folder-summary.h
branches/camel-gobject/camel/camel-folder-thread.c
branches/camel-gobject/camel/camel-folder.c
branches/camel-gobject/camel/camel-folder.h
branches/camel-gobject/camel/camel-gpg-context.c
branches/camel-gobject/camel/camel-gpg-context.h
branches/camel-gobject/camel/camel-html-parser.c
branches/camel-gobject/camel/camel-html-parser.h
branches/camel-gobject/camel/camel-http-stream.c
branches/camel-gobject/camel/camel-http-stream.h
branches/camel-gobject/camel/camel-index-control.c
branches/camel-gobject/camel/camel-index.c
branches/camel-gobject/camel/camel-index.h
branches/camel-gobject/camel/camel-internet-address.c
branches/camel-gobject/camel/camel-internet-address.h
branches/camel-gobject/camel/camel-medium.c
branches/camel-gobject/camel/camel-medium.h
branches/camel-gobject/camel/camel-mime-filter-basic.c
branches/camel-gobject/camel/camel-mime-filter-basic.h
branches/camel-gobject/camel/camel-mime-filter-bestenc.c
branches/camel-gobject/camel/camel-mime-filter-bestenc.h
branches/camel-gobject/camel/camel-mime-filter-canon.c
branches/camel-gobject/camel/camel-mime-filter-canon.h
branches/camel-gobject/camel/camel-mime-filter-charset.c
branches/camel-gobject/camel/camel-mime-filter-charset.h
branches/camel-gobject/camel/camel-mime-filter-crlf.c
branches/camel-gobject/camel/camel-mime-filter-crlf.h
branches/camel-gobject/camel/camel-mime-filter-enriched.c
branches/camel-gobject/camel/camel-mime-filter-enriched.h
branches/camel-gobject/camel/camel-mime-filter-from.c
branches/camel-gobject/camel/camel-mime-filter-from.h
branches/camel-gobject/camel/camel-mime-filter-gzip.c
branches/camel-gobject/camel/camel-mime-filter-gzip.h
branches/camel-gobject/camel/camel-mime-filter-html.c
branches/camel-gobject/camel/camel-mime-filter-html.h
branches/camel-gobject/camel/camel-mime-filter-index.c
branches/camel-gobject/camel/camel-mime-filter-index.h
branches/camel-gobject/camel/camel-mime-filter-linewrap.c
branches/camel-gobject/camel/camel-mime-filter-linewrap.h
branches/camel-gobject/camel/camel-mime-filter-pgp.c
branches/camel-gobject/camel/camel-mime-filter-pgp.h
branches/camel-gobject/camel/camel-mime-filter-progress.c
branches/camel-gobject/camel/camel-mime-filter-progress.h
branches/camel-gobject/camel/camel-mime-filter-save.c
branches/camel-gobject/camel/camel-mime-filter-save.h
branches/camel-gobject/camel/camel-mime-filter-tohtml.c
branches/camel-gobject/camel/camel-mime-filter-tohtml.h
branches/camel-gobject/camel/camel-mime-filter-windows.c
branches/camel-gobject/camel/camel-mime-filter-windows.h
branches/camel-gobject/camel/camel-mime-filter-yenc.c
branches/camel-gobject/camel/camel-mime-filter-yenc.h
branches/camel-gobject/camel/camel-mime-filter.c
branches/camel-gobject/camel/camel-mime-filter.h
branches/camel-gobject/camel/camel-mime-message.c
branches/camel-gobject/camel/camel-mime-message.h
branches/camel-gobject/camel/camel-mime-parser.c
branches/camel-gobject/camel/camel-mime-parser.h
branches/camel-gobject/camel/camel-mime-part-utils.c
branches/camel-gobject/camel/camel-mime-part.c
branches/camel-gobject/camel/camel-mime-part.h
branches/camel-gobject/camel/camel-movemail.c
branches/camel-gobject/camel/camel-multipart-encrypted.c
branches/camel-gobject/camel/camel-multipart-encrypted.h
branches/camel-gobject/camel/camel-multipart-signed.c
branches/camel-gobject/camel/camel-multipart-signed.h
branches/camel-gobject/camel/camel-multipart.c
branches/camel-gobject/camel/camel-multipart.h
branches/camel-gobject/camel/camel-news-address.c
branches/camel-gobject/camel/camel-news-address.h
branches/camel-gobject/camel/camel-nntp-address.c
branches/camel-gobject/camel/camel-nntp-address.h
branches/camel-gobject/camel/camel-object.c
branches/camel-gobject/camel/camel-object.h
branches/camel-gobject/camel/camel-offline-folder.c
branches/camel-gobject/camel/camel-offline-folder.h
branches/camel-gobject/camel/camel-offline-journal.c
branches/camel-gobject/camel/camel-offline-journal.h
branches/camel-gobject/camel/camel-offline-store.c
branches/camel-gobject/camel/camel-offline-store.h
branches/camel-gobject/camel/camel-partition-table.c
branches/camel-gobject/camel/camel-partition-table.h
branches/camel-gobject/camel/camel-provider.h
branches/camel-gobject/camel/camel-sasl-anonymous.c
branches/camel-gobject/camel/camel-sasl-anonymous.h
branches/camel-gobject/camel/camel-sasl-cram-md5.c
branches/camel-gobject/camel/camel-sasl-cram-md5.h
branches/camel-gobject/camel/camel-sasl-digest-md5.c
branches/camel-gobject/camel/camel-sasl-digest-md5.h
branches/camel-gobject/camel/camel-sasl-gssapi.c
branches/camel-gobject/camel/camel-sasl-gssapi.h
branches/camel-gobject/camel/camel-sasl-kerberos4.c
branches/camel-gobject/camel/camel-sasl-kerberos4.h
branches/camel-gobject/camel/camel-sasl-login.c
branches/camel-gobject/camel/camel-sasl-login.h
branches/camel-gobject/camel/camel-sasl-ntlm.c
branches/camel-gobject/camel/camel-sasl-ntlm.h
branches/camel-gobject/camel/camel-sasl-plain.c
branches/camel-gobject/camel/camel-sasl-plain.h
branches/camel-gobject/camel/camel-sasl-popb4smtp.c
branches/camel-gobject/camel/camel-sasl-popb4smtp.h
branches/camel-gobject/camel/camel-sasl.c
branches/camel-gobject/camel/camel-sasl.h
branches/camel-gobject/camel/camel-search-private.c
branches/camel-gobject/camel/camel-seekable-stream.c
branches/camel-gobject/camel/camel-seekable-stream.h
branches/camel-gobject/camel/camel-seekable-substream.c
branches/camel-gobject/camel/camel-seekable-substream.h
branches/camel-gobject/camel/camel-service.c
branches/camel-gobject/camel/camel-service.h
branches/camel-gobject/camel/camel-session.c
branches/camel-gobject/camel/camel-session.h
branches/camel-gobject/camel/camel-smime-context.c
branches/camel-gobject/camel/camel-smime-context.h
branches/camel-gobject/camel/camel-store-summary.c
branches/camel-gobject/camel/camel-store-summary.h
branches/camel-gobject/camel/camel-store.c
branches/camel-gobject/camel/camel-store.h
branches/camel-gobject/camel/camel-stream-buffer.c
branches/camel-gobject/camel/camel-stream-buffer.h
branches/camel-gobject/camel/camel-stream-filter.c
branches/camel-gobject/camel/camel-stream-filter.h
branches/camel-gobject/camel/camel-stream-fs.c
branches/camel-gobject/camel/camel-stream-fs.h
branches/camel-gobject/camel/camel-stream-mem.c
branches/camel-gobject/camel/camel-stream-mem.h
branches/camel-gobject/camel/camel-stream-null.c
branches/camel-gobject/camel/camel-stream-null.h
branches/camel-gobject/camel/camel-stream-process.c
branches/camel-gobject/camel/camel-stream-process.h
branches/camel-gobject/camel/camel-stream-vfs.c
branches/camel-gobject/camel/camel-stream-vfs.h
branches/camel-gobject/camel/camel-stream.c
branches/camel-gobject/camel/camel-stream.h
branches/camel-gobject/camel/camel-tcp-stream-openssl.c
branches/camel-gobject/camel/camel-tcp-stream-raw.c
branches/camel-gobject/camel/camel-tcp-stream-raw.h
branches/camel-gobject/camel/camel-tcp-stream-ssl.c
branches/camel-gobject/camel/camel-tcp-stream-ssl.h
branches/camel-gobject/camel/camel-tcp-stream.c
branches/camel-gobject/camel/camel-tcp-stream.h
branches/camel-gobject/camel/camel-text-index.c
branches/camel-gobject/camel/camel-text-index.h
branches/camel-gobject/camel/camel-transport.c
branches/camel-gobject/camel/camel-transport.h
branches/camel-gobject/camel/camel-vee-folder.c
branches/camel-gobject/camel/camel-vee-folder.h
branches/camel-gobject/camel/camel-vee-store.c
branches/camel-gobject/camel/camel-vee-store.h
branches/camel-gobject/camel/camel-vee-summary.c
branches/camel-gobject/camel/camel-vee-summary.h
branches/camel-gobject/camel/camel-vtrash-folder.c
branches/camel-gobject/camel/camel-vtrash-folder.h
branches/camel-gobject/camel/camel.c
branches/camel-gobject/camel/providers/groupwise/camel-groupwise-folder.c
branches/camel-gobject/camel/providers/groupwise/camel-groupwise-folder.h
branches/camel-gobject/camel/providers/groupwise/camel-groupwise-journal.c
branches/camel-gobject/camel/providers/groupwise/camel-groupwise-journal.h
branches/camel-gobject/camel/providers/groupwise/camel-groupwise-store-summary.c
branches/camel-gobject/camel/providers/groupwise/camel-groupwise-store-summary.h
branches/camel-gobject/camel/providers/groupwise/camel-groupwise-store.c
branches/camel-gobject/camel/providers/groupwise/camel-groupwise-store.h
branches/camel-gobject/camel/providers/groupwise/camel-groupwise-summary.c
branches/camel-gobject/camel/providers/groupwise/camel-groupwise-summary.h
branches/camel-gobject/camel/providers/groupwise/camel-groupwise-transport.c
branches/camel-gobject/camel/providers/groupwise/camel-groupwise-transport.h
branches/camel-gobject/camel/providers/groupwise/camel-groupwise-utils.c
branches/camel-gobject/camel/providers/imap/camel-imap-command.c
branches/camel-gobject/camel/providers/imap/camel-imap-folder.c
branches/camel-gobject/camel/providers/imap/camel-imap-folder.h
branches/camel-gobject/camel/providers/imap/camel-imap-journal.c
branches/camel-gobject/camel/providers/imap/camel-imap-journal.h
branches/camel-gobject/camel/providers/imap/camel-imap-message-cache.c
branches/camel-gobject/camel/providers/imap/camel-imap-message-cache.h
branches/camel-gobject/camel/providers/imap/camel-imap-search.c
branches/camel-gobject/camel/providers/imap/camel-imap-search.h
branches/camel-gobject/camel/providers/imap/camel-imap-store-summary.c
branches/camel-gobject/camel/providers/imap/camel-imap-store-summary.h
branches/camel-gobject/camel/providers/imap/camel-imap-store.c
branches/camel-gobject/camel/providers/imap/camel-imap-store.h
branches/camel-gobject/camel/providers/imap/camel-imap-summary.c
branches/camel-gobject/camel/providers/imap/camel-imap-summary.h
branches/camel-gobject/camel/providers/imap/camel-imap-wrapper.c
branches/camel-gobject/camel/providers/imap/camel-imap-wrapper.h
branches/camel-gobject/camel/providers/imap4/camel-imap4-command.c
branches/camel-gobject/camel/providers/imap4/camel-imap4-engine.c
branches/camel-gobject/camel/providers/imap4/camel-imap4-engine.h
branches/camel-gobject/camel/providers/imap4/camel-imap4-folder.c
branches/camel-gobject/camel/providers/imap4/camel-imap4-folder.h
branches/camel-gobject/camel/providers/imap4/camel-imap4-journal.c
branches/camel-gobject/camel/providers/imap4/camel-imap4-journal.h
branches/camel-gobject/camel/providers/imap4/camel-imap4-search.c
branches/camel-gobject/camel/providers/imap4/camel-imap4-search.h
branches/camel-gobject/camel/providers/imap4/camel-imap4-store-summary.c
branches/camel-gobject/camel/providers/imap4/camel-imap4-store-summary.h
branches/camel-gobject/camel/providers/imap4/camel-imap4-store.c
branches/camel-gobject/camel/providers/imap4/camel-imap4-store.h
branches/camel-gobject/camel/providers/imap4/camel-imap4-stream.c
branches/camel-gobject/camel/providers/imap4/camel-imap4-stream.h
branches/camel-gobject/camel/providers/imap4/camel-imap4-summary.c
branches/camel-gobject/camel/providers/imap4/camel-imap4-summary.h
branches/camel-gobject/camel/providers/imapp/camel-imapp-driver.c
branches/camel-gobject/camel/providers/imapp/camel-imapp-driver.h
branches/camel-gobject/camel/providers/imapp/camel-imapp-engine.c
branches/camel-gobject/camel/providers/imapp/camel-imapp-engine.h
branches/camel-gobject/camel/providers/imapp/camel-imapp-fetch-stream.c
branches/camel-gobject/camel/providers/imapp/camel-imapp-fetch-stream.h
branches/camel-gobject/camel/providers/imapp/camel-imapp-folder.c
branches/camel-gobject/camel/providers/imapp/camel-imapp-folder.h
branches/camel-gobject/camel/providers/imapp/camel-imapp-store-summary.c
branches/camel-gobject/camel/providers/imapp/camel-imapp-store-summary.h
branches/camel-gobject/camel/providers/imapp/camel-imapp-store.c
branches/camel-gobject/camel/providers/imapp/camel-imapp-store.h
branches/camel-gobject/camel/providers/imapp/camel-imapp-stream.c
branches/camel-gobject/camel/providers/imapp/camel-imapp-stream.h
branches/camel-gobject/camel/providers/imapp/camel-imapp-summary.c
branches/camel-gobject/camel/providers/imapp/camel-imapp-summary.h
branches/camel-gobject/camel/providers/imapp/camel-imapp-utils.c
branches/camel-gobject/camel/providers/local/camel-local-folder.c
branches/camel-gobject/camel/providers/local/camel-local-folder.h
branches/camel-gobject/camel/providers/local/camel-local-store.c
branches/camel-gobject/camel/providers/local/camel-local-store.h
branches/camel-gobject/camel/providers/local/camel-local-summary.c
branches/camel-gobject/camel/providers/local/camel-local-summary.h
branches/camel-gobject/camel/providers/local/camel-maildir-folder.c
branches/camel-gobject/camel/providers/local/camel-maildir-folder.h
branches/camel-gobject/camel/providers/local/camel-maildir-store.c
branches/camel-gobject/camel/providers/local/camel-maildir-store.h
branches/camel-gobject/camel/providers/local/camel-maildir-summary.c
branches/camel-gobject/camel/providers/local/camel-maildir-summary.h
branches/camel-gobject/camel/providers/local/camel-mbox-folder.c
branches/camel-gobject/camel/providers/local/camel-mbox-folder.h
branches/camel-gobject/camel/providers/local/camel-mbox-store.c
branches/camel-gobject/camel/providers/local/camel-mbox-store.h
branches/camel-gobject/camel/providers/local/camel-mbox-summary.c
branches/camel-gobject/camel/providers/local/camel-mbox-summary.h
branches/camel-gobject/camel/providers/local/camel-mh-folder.c
branches/camel-gobject/camel/providers/local/camel-mh-folder.h
branches/camel-gobject/camel/providers/local/camel-mh-store.c
branches/camel-gobject/camel/providers/local/camel-mh-store.h
branches/camel-gobject/camel/providers/local/camel-mh-summary.c
branches/camel-gobject/camel/providers/local/camel-mh-summary.h
branches/camel-gobject/camel/providers/local/camel-spool-folder.c
branches/camel-gobject/camel/providers/local/camel-spool-folder.h
branches/camel-gobject/camel/providers/local/camel-spool-store.c
branches/camel-gobject/camel/providers/local/camel-spool-store.h
branches/camel-gobject/camel/providers/local/camel-spool-summary.c
branches/camel-gobject/camel/providers/local/camel-spool-summary.h
branches/camel-gobject/camel/providers/nntp/camel-nntp-folder.c
branches/camel-gobject/camel/providers/nntp/camel-nntp-folder.h
branches/camel-gobject/camel/providers/nntp/camel-nntp-store-summary.c
branches/camel-gobject/camel/providers/nntp/camel-nntp-store-summary.h
branches/camel-gobject/camel/providers/nntp/camel-nntp-store.c
branches/camel-gobject/camel/providers/nntp/camel-nntp-store.h
branches/camel-gobject/camel/providers/nntp/camel-nntp-stream.c
branches/camel-gobject/camel/providers/nntp/camel-nntp-stream.h
branches/camel-gobject/camel/providers/nntp/camel-nntp-summary.c
branches/camel-gobject/camel/providers/nntp/camel-nntp-summary.h
branches/camel-gobject/camel/providers/pop3/camel-pop3-engine.c
branches/camel-gobject/camel/providers/pop3/camel-pop3-engine.h
branches/camel-gobject/camel/providers/pop3/camel-pop3-folder.c
branches/camel-gobject/camel/providers/pop3/camel-pop3-folder.h
branches/camel-gobject/camel/providers/pop3/camel-pop3-store.c
branches/camel-gobject/camel/providers/pop3/camel-pop3-store.h
branches/camel-gobject/camel/providers/pop3/camel-pop3-stream.c
branches/camel-gobject/camel/providers/pop3/camel-pop3-stream.h
branches/camel-gobject/camel/providers/sendmail/camel-sendmail-transport.c
branches/camel-gobject/camel/providers/sendmail/camel-sendmail-transport.h
branches/camel-gobject/camel/providers/smtp/camel-smtp-transport.c
branches/camel-gobject/camel/providers/smtp/camel-smtp-transport.h
branches/camel-gobject/camel/tests/folder/test1.c
branches/camel-gobject/camel/tests/folder/test10.c
branches/camel-gobject/camel/tests/folder/test4.c
branches/camel-gobject/camel/tests/folder/test5.c
branches/camel-gobject/camel/tests/folder/test8.c
branches/camel-gobject/camel/tests/folder/test9.c
branches/camel-gobject/camel/tests/lib/camel-test.h
branches/camel-gobject/camel/tests/lib/folders.c
branches/camel-gobject/camel/tests/lib/messages.c
branches/camel-gobject/camel/tests/lib/session.c
branches/camel-gobject/camel/tests/lib/session.h
branches/camel-gobject/camel/tests/message/test4.c
branches/camel-gobject/camel/tests/mime-filter/test-charset.c
branches/camel-gobject/camel/tests/mime-filter/test-crlf.c
branches/camel-gobject/camel/tests/smime/pgp-mime.c
branches/camel-gobject/camel/tests/smime/pgp.c
branches/camel-gobject/camel/tests/smime/pkcs7.c
Modified: branches/camel-gobject/camel/camel-address.c
==============================================================================
--- branches/camel-gobject/camel/camel-address.c (original)
+++ branches/camel-gobject/camel/camel-address.c Mon Nov 10 00:44:12 2008
@@ -30,7 +30,7 @@
static void
camel_address_class_init (CamelAddressClass *klass)
{
- camel_address_parent = camel_type_get_global_classfuncs (camel_object_get_type ());
+ camel_address_parent = g_type_class_peek (camel_object_get_type ());
}
static void
@@ -46,12 +46,12 @@
g_ptr_array_free(((CamelAddress *)obj)->addresses, TRUE);
}
-CamelType
+GType
camel_address_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_object_get_type (), "CamelAddress",
sizeof (CamelAddress),
sizeof (CamelAddressClass),
@@ -90,7 +90,7 @@
CamelAddress *
camel_address_new_clone (const CamelAddress *addr)
{
- CamelAddress *new = CAMEL_ADDRESS(camel_object_new(CAMEL_OBJECT_GET_TYPE(addr)));
+ CamelAddress *new = CAMEL_ADDRESS(camel_object_new(G_OBJECT_TYPE(addr)));
camel_address_cat(new, addr);
return new;
Modified: branches/camel-gobject/camel/camel-address.h
==============================================================================
--- branches/camel-gobject/camel/camel-address.h (original)
+++ branches/camel-gobject/camel/camel-address.h Mon Nov 10 00:44:12 2008
@@ -25,9 +25,9 @@
#include <glib.h>
#include <camel/camel-object.h>
-#define CAMEL_ADDRESS(obj) CAMEL_CHECK_CAST (obj, camel_address_get_type (), CamelAddress)
-#define CAMEL_ADDRESS_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_address_get_type (), CamelAddressClass)
-#define CAMEL_IS_ADDRESS(obj) CAMEL_CHECK_TYPE (obj, camel_address_get_type ())
+#define CAMEL_ADDRESS(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_address_get_type (), CamelAddress)
+#define CAMEL_ADDRESS_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_address_get_type (), CamelAddressClass)
+#define CAMEL_IS_ADDRESS(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_address_get_type ())
G_BEGIN_DECLS
@@ -55,7 +55,7 @@
void (*remove) (CamelAddress *, int index);
};
-CamelType camel_address_get_type (void);
+GType camel_address_get_type (void);
CamelAddress *camel_address_new (void);
CamelAddress *camel_address_new_clone (const CamelAddress *addr);
int camel_address_length (CamelAddress *addr);
Modified: branches/camel-gobject/camel/camel-block-file.c
==============================================================================
--- branches/camel-gobject/camel/camel-block-file.c (original)
+++ branches/camel-gobject/camel/camel-block-file.c Mon Nov 10 00:44:12 2008
@@ -239,12 +239,12 @@
g_free(p);
}
-CamelType
+GType
camel_block_file_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_object_get_type(), "CamelBlockFile",
sizeof (CamelBlockFile),
sizeof (CamelBlockFileClass),
@@ -373,7 +373,7 @@
bs->root_block = camel_block_file_get_block(bs, 0);
if (bs->root_block == NULL) {
- camel_object_unref((CamelObject *)bs);
+ g_object_unref((CamelObject *)bs);
return NULL;
}
camel_block_file_detach_block(bs, bs->root_block);
@@ -389,13 +389,13 @@
CBF_CLASS(bs)->init_root(bs);
camel_block_file_touch_block(bs, bs->root_block);
if (block_file_use(bs) == -1) {
- camel_object_unref((CamelObject *)bs);
+ g_object_unref((CamelObject *)bs);
return NULL;
}
if (sync_block_nolock(bs, bs->root_block) == -1
|| ftruncate(bs->fd, bs->root->last) == -1) {
block_file_unuse(bs);
- camel_object_unref((CamelObject *)bs);
+ g_object_unref((CamelObject *)bs);
return NULL;
}
block_file_unuse(bs);
@@ -858,12 +858,12 @@
g_free(p);
}
-CamelType
+GType
camel_key_file_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_object_get_type(), "CamelKeyFile",
sizeof (CamelKeyFile),
sizeof (CamelKeyFileClass),
@@ -992,7 +992,7 @@
kf->last = 8;
if (key_file_use(kf) == -1) {
- camel_object_unref((CamelObject *)kf);
+ g_object_unref((CamelObject *)kf);
kf = NULL;
} else {
fseek(kf->fp, 0, SEEK_END);
@@ -1010,7 +1010,7 @@
kf->flags &= ~(O_CREAT|O_EXCL|O_TRUNC);
if (err) {
- camel_object_unref((CamelObject *)kf);
+ g_object_unref((CamelObject *)kf);
kf = NULL;
}
}
Modified: branches/camel-gobject/camel/camel-block-file.h
==============================================================================
--- branches/camel-gobject/camel/camel-block-file.h (original)
+++ branches/camel-gobject/camel/camel-block-file.h Mon Nov 10 00:44:12 2008
@@ -98,7 +98,7 @@
int (*init_root)(CamelBlockFile *);
};
-CamelType camel_block_file_get_type(void);
+GType camel_block_file_get_type(void);
CamelBlockFile *camel_block_file_new(const char *path, int flags, const char version[8], size_t block_size);
int camel_block_file_rename(CamelBlockFile *bs, const char *path);
@@ -134,7 +134,7 @@
CamelObjectClass parent;
};
-CamelType camel_key_file_get_type(void);
+GType camel_key_file_get_type(void);
CamelKeyFile * camel_key_file_new(const char *path, int flags, const char version[8]);
int camel_key_file_rename(CamelKeyFile *kf, const char *path);
Modified: branches/camel-gobject/camel/camel-certdb.c
==============================================================================
--- branches/camel-gobject/camel/camel-certdb.c (original)
+++ branches/camel-gobject/camel/camel-certdb.c Mon Nov 10 00:44:12 2008
@@ -65,12 +65,12 @@
static CamelObjectClass *parent_class = NULL;
-CamelType
+GType
camel_certdb_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_object_get_type (),
"CamelCertDB",
sizeof (CamelCertDB),
@@ -88,7 +88,7 @@
static void
camel_certdb_class_init (CamelCertDBClass *klass)
{
- parent_class = camel_type_get_global_classfuncs (camel_object_get_type ());
+ parent_class = g_type_class_peek (camel_object_get_type ());
klass->header_load = certdb_header_load;
klass->header_save = certdb_header_save;
@@ -169,10 +169,10 @@
pthread_mutex_lock (&default_certdb_lock);
if (default_certdb)
- camel_object_unref (default_certdb);
+ g_object_unref (default_certdb);
if (certdb)
- camel_object_ref (certdb);
+ g_object_ref (certdb);
default_certdb = certdb;
@@ -188,7 +188,7 @@
pthread_mutex_lock (&default_certdb_lock);
if (default_certdb)
- camel_object_ref (default_certdb);
+ g_object_ref (default_certdb);
certdb = default_certdb;
Modified: branches/camel-gobject/camel/camel-certdb.h
==============================================================================
--- branches/camel-gobject/camel/camel-certdb.h (original)
+++ branches/camel-gobject/camel/camel-certdb.h Mon Nov 10 00:44:12 2008
@@ -28,9 +28,9 @@
#include <camel/camel-object.h>
#define CAMEL_CERTDB_TYPE (camel_certdb_get_type ())
-#define CAMEL_CERTDB(obj) (CAMEL_CHECK_CAST (obj, camel_certdb_get_type (), CamelCertDB))
-#define CAMEL_CERTDB_CLASS(klass) (CAMEL_CHECK_CLASS_CAST (klass, camel_certdb_get_type (), CamelCertDBClass))
-#define CAMEL_IS_CERTDB(obj) (CAMEL_CHECK_TYPE (obj, camel_certdb_get_type ()))
+#define CAMEL_CERTDB(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, camel_certdb_get_type (), CamelCertDB))
+#define CAMEL_CERTDB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, camel_certdb_get_type (), CamelCertDBClass))
+#define CAMEL_IS_CERTDB(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_certdb_get_type ()))
G_BEGIN_DECLS
@@ -102,7 +102,7 @@
};
-CamelType camel_certdb_get_type (void);
+GType camel_certdb_get_type (void);
CamelCertDB *camel_certdb_new (void);
Modified: branches/camel-gobject/camel/camel-cipher-context.c
==============================================================================
--- branches/camel-gobject/camel/camel-cipher-context.c (original)
+++ branches/camel-gobject/camel/camel-cipher-context.c Mon Nov 10 00:44:12 2008
@@ -71,7 +71,7 @@
context = CAMEL_CIPHER_CONTEXT (camel_object_new (CAMEL_CIPHER_CONTEXT_TYPE));
- camel_object_ref (session);
+ g_object_ref (session);
context->session = session;
return context;
@@ -90,7 +90,7 @@
g_return_if_fail (CAMEL_IS_CIPHER_CONTEXT (context));
g_return_if_fail (CAMEL_IS_SESSION (session));
- camel_object_ref (session);
+ g_object_ref (session);
context->session = session;
}
@@ -559,7 +559,7 @@
{
CamelCipherContext *context = (CamelCipherContext *)o;
- camel_object_unref (CAMEL_OBJECT (context->session));
+ g_object_unref (CAMEL_OBJECT (context->session));
g_mutex_free (context->priv->lock);
@@ -569,7 +569,7 @@
static void
camel_cipher_context_class_init (CamelCipherContextClass *camel_cipher_context_class)
{
- parent_class = camel_type_get_global_classfuncs (camel_object_get_type ());
+ parent_class = g_type_class_peek (camel_object_get_type ());
camel_cipher_context_class->hash_to_id = cipher_hash_to_id;
camel_cipher_context_class->id_to_hash = cipher_id_to_hash;
@@ -581,12 +581,12 @@
camel_cipher_context_class->export_keys = cipher_export_keys;
}
-CamelType
+GType
camel_cipher_context_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_object_get_type (),
"CamelCipherContext",
sizeof (CamelCipherContext),
@@ -656,13 +656,13 @@
filter = camel_stream_filter_new_with_stream(ostream);
canon = camel_mime_filter_canon_new(flags);
camel_stream_filter_add(filter, canon);
- camel_object_unref(canon);
+ g_object_unref(canon);
if (camel_data_wrapper_write_to_stream((CamelDataWrapper *)part, (CamelStream *)filter) != -1
&& camel_stream_flush((CamelStream *)filter) != -1)
res = 0;
- camel_object_unref(filter);
+ g_object_unref(filter);
camel_stream_reset(ostream);
return res;
Modified: branches/camel-gobject/camel/camel-cipher-context.h
==============================================================================
--- branches/camel-gobject/camel/camel-cipher-context.h (original)
+++ branches/camel-gobject/camel/camel-cipher-context.h Mon Nov 10 00:44:12 2008
@@ -28,9 +28,9 @@
#include <camel/camel-exception.h>
#define CAMEL_CIPHER_CONTEXT_TYPE (camel_cipher_context_get_type ())
-#define CAMEL_CIPHER_CONTEXT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_CIPHER_CONTEXT_TYPE, CamelCipherContext))
-#define CAMEL_CIPHER_CONTEXT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_CIPHER_CONTEXT_TYPE, CamelCipherContextClass))
-#define CAMEL_IS_CIPHER_CONTEXT(o) (CAMEL_CHECK_TYPE((o), CAMEL_CIPHER_CONTEXT_TYPE))
+#define CAMEL_CIPHER_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_CIPHER_CONTEXT_TYPE, CamelCipherContext))
+#define CAMEL_CIPHER_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_CIPHER_CONTEXT_TYPE, CamelCipherContextClass))
+#define CAMEL_IS_CIPHER_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_CIPHER_CONTEXT_TYPE))
G_BEGIN_DECLS
@@ -133,7 +133,7 @@
struct _CamelStream *ostream, CamelException *ex);
} CamelCipherContextClass;
-CamelType camel_cipher_context_get_type (void);
+GType camel_cipher_context_get_type (void);
CamelCipherContext *camel_cipher_context_new (CamelSession *session);
Modified: branches/camel-gobject/camel/camel-data-cache.c
==============================================================================
--- branches/camel-gobject/camel/camel-data-cache.c (original)
+++ branches/camel-gobject/camel/camel-data-cache.c Mon Nov 10 00:44:12 2008
@@ -96,14 +96,14 @@
g_free (cdc->path);
}
-CamelType
+GType
camel_data_cache_get_type(void)
{
- static CamelType camel_data_cache_type = CAMEL_INVALID_TYPE;
+ static GType camel_data_cache_type = G_TYPE_INVALID;
- if (camel_data_cache_type == CAMEL_INVALID_TYPE) {
+ if (camel_data_cache_type == G_TYPE_INVALID) {
camel_data_cache_type = camel_type_register(
- CAMEL_OBJECT_TYPE, "CamelDataCache",
+ CAMEL_TYPE_OBJECT, "CamelDataCache",
sizeof (CamelDataCache),
sizeof (CamelDataCacheClass),
(CamelObjectClassInitFunc) data_cache_class_init,
@@ -218,7 +218,7 @@
stream = camel_object_bag_get(cdc->priv->busy_bag, s->str);
if (stream) {
camel_object_bag_remove(cdc->priv->busy_bag, stream);
- camel_object_unref(stream);
+ g_object_unref(stream);
}
}
}
@@ -301,7 +301,7 @@
if (stream) {
g_unlink(real);
camel_object_bag_remove(cdc->priv->busy_bag, stream);
- camel_object_unref(stream);
+ g_object_unref(stream);
}
} while (stream != NULL);
@@ -372,7 +372,7 @@
stream = camel_object_bag_get(cdc->priv->busy_bag, real);
if (stream) {
camel_object_bag_remove(cdc->priv->busy_bag, stream);
- camel_object_unref(stream);
+ g_object_unref(stream);
}
/* maybe we were a mem stream */
Modified: branches/camel-gobject/camel/camel-data-cache.h
==============================================================================
--- branches/camel-gobject/camel/camel-data-cache.h (original)
+++ branches/camel-gobject/camel/camel-data-cache.h Mon Nov 10 00:44:12 2008
@@ -30,9 +30,9 @@
#include <camel/camel-exception.h>
#define CAMEL_DATA_CACHE_TYPE (camel_data_cache_get_type ())
-#define CAMEL_DATA_CACHE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_DATA_CACHE_TYPE, CamelFolder))
-#define CAMEL_DATA_CACHE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_DATA_CACHE_TYPE, CamelFolderClass))
-#define CAMEL_IS_DATA_CACHE(o) (CAMEL_CHECK_TYPE((o), CAMEL_DATA_CACHE_TYPE))
+#define CAMEL_DATA_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_DATA_CACHE_TYPE, CamelFolder))
+#define CAMEL_DATA_CACHE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_DATA_CACHE_TYPE, CamelFolderClass))
+#define CAMEL_IS_DATA_CACHE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_DATA_CACHE_TYPE))
G_BEGIN_DECLS
@@ -86,7 +86,7 @@
const char *path, CamelException *ex);
/* Standard Camel function */
-CamelType camel_data_cache_get_type (void);
+GType camel_data_cache_get_type (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/camel-data-wrapper.c
==============================================================================
--- branches/camel-gobject/camel/camel-data-wrapper.c (original)
+++ branches/camel-gobject/camel/camel-data-wrapper.c Mon Nov 10 00:44:12 2008
@@ -54,7 +54,7 @@
static void
camel_data_wrapper_class_init (CamelDataWrapperClass *camel_data_wrapper_class)
{
- parent_class = camel_type_get_global_classfuncs (camel_object_get_type ());
+ parent_class = g_type_class_peek (camel_object_get_type ());
/* virtual method definition */
camel_data_wrapper_class->write_to_stream = write_to_stream;
@@ -93,16 +93,16 @@
camel_content_type_unref (camel_data_wrapper->mime_type);
if (camel_data_wrapper->stream)
- camel_object_unref (camel_data_wrapper->stream);
+ g_object_unref (camel_data_wrapper->stream);
}
-CamelType
+GType
camel_data_wrapper_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (CAMEL_OBJECT_TYPE,
+ if (type == G_TYPE_INVALID) {
+ type = camel_type_register (CAMEL_TYPE_OBJECT,
"CamelDataWrapper",
sizeof (CamelDataWrapper),
sizeof (CamelDataWrapperClass),
@@ -188,17 +188,17 @@
case CAMEL_TRANSFER_ENCODING_BASE64:
filter = (CamelMimeFilter *) camel_mime_filter_basic_new_type (CAMEL_MIME_FILTER_BASIC_BASE64_DEC);
camel_stream_filter_add (CAMEL_STREAM_FILTER (fstream), filter);
- camel_object_unref (filter);
+ g_object_unref (filter);
break;
case CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE:
filter = (CamelMimeFilter *) camel_mime_filter_basic_new_type (CAMEL_MIME_FILTER_BASIC_QP_DEC);
camel_stream_filter_add (CAMEL_STREAM_FILTER (fstream), filter);
- camel_object_unref (filter);
+ g_object_unref (filter);
break;
case CAMEL_TRANSFER_ENCODING_UUENCODE:
filter = (CamelMimeFilter *) camel_mime_filter_basic_new_type (CAMEL_MIME_FILTER_BASIC_UU_DEC);
camel_stream_filter_add (CAMEL_STREAM_FILTER (fstream), filter);
- camel_object_unref (filter);
+ g_object_unref (filter);
break;
default:
break;
@@ -208,12 +208,12 @@
filter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_DECODE,
CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
camel_stream_filter_add (CAMEL_STREAM_FILTER (fstream), filter);
- camel_object_unref (filter);
+ g_object_unref (filter);
}
ret = camel_data_wrapper_write_to_stream (data_wrapper, fstream);
camel_stream_flush (fstream);
- camel_object_unref (fstream);
+ g_object_unref (fstream);
return ret;
}
@@ -243,10 +243,10 @@
construct_from_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
{
if (data_wrapper->stream)
- camel_object_unref (data_wrapper->stream);
+ g_object_unref (data_wrapper->stream);
data_wrapper->stream = stream;
- camel_object_ref (stream);
+ g_object_ref (stream);
return 0;
}
Modified: branches/camel-gobject/camel/camel-data-wrapper.h
==============================================================================
--- branches/camel-gobject/camel/camel-data-wrapper.h (original)
+++ branches/camel-gobject/camel/camel-data-wrapper.h Mon Nov 10 00:44:12 2008
@@ -32,9 +32,9 @@
#include <camel/camel-mime-utils.h>
#define CAMEL_DATA_WRAPPER_TYPE (camel_data_wrapper_get_type ())
-#define CAMEL_DATA_WRAPPER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_DATA_WRAPPER_TYPE, CamelDataWrapper))
-#define CAMEL_DATA_WRAPPER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_DATA_WRAPPER_TYPE, CamelDataWrapperClass))
-#define CAMEL_IS_DATA_WRAPPER(o) (CAMEL_CHECK_TYPE((o), CAMEL_DATA_WRAPPER_TYPE))
+#define CAMEL_DATA_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_DATA_WRAPPER_TYPE, CamelDataWrapper))
+#define CAMEL_DATA_WRAPPER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_DATA_WRAPPER_TYPE, CamelDataWrapperClass))
+#define CAMEL_IS_DATA_WRAPPER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_DATA_WRAPPER_TYPE))
G_BEGIN_DECLS
@@ -74,7 +74,7 @@
} CamelDataWrapperClass;
/* Standard Camel function */
-CamelType camel_data_wrapper_get_type (void);
+GType camel_data_wrapper_get_type (void);
/* public methods */
CamelDataWrapper *camel_data_wrapper_new(void);
Modified: branches/camel-gobject/camel/camel-digest-folder.c
==============================================================================
--- branches/camel-gobject/camel/camel-digest-folder.c (original)
+++ branches/camel-gobject/camel/camel-digest-folder.c Mon Nov 10 00:44:12 2008
@@ -74,7 +74,7 @@
{
CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS (camel_digest_folder_class);
- parent_class = CAMEL_FOLDER_CLASS (camel_type_get_global_classfuncs (camel_folder_get_type ()));
+ parent_class = CAMEL_FOLDER_CLASS (g_type_class_peek (camel_folder_get_type ()));
/* virtual method definition */
@@ -116,26 +116,26 @@
CamelFolder *folder = CAMEL_FOLDER (object);
if (folder->summary) {
- camel_object_unref (folder->summary);
+ g_object_unref (folder->summary);
folder->summary = NULL;
}
- camel_object_unref (digest_folder->priv->message);
+ g_object_unref (digest_folder->priv->message);
if (digest_folder->priv->search)
- camel_object_unref (digest_folder->priv->search);
+ g_object_unref (digest_folder->priv->search);
g_mutex_free (digest_folder->priv->search_lock);
g_free (digest_folder->priv);
}
-CamelType
+GType
camel_digest_folder_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (CAMEL_FOLDER_TYPE,
"CamelDigestFolder",
sizeof (CamelDigestFolder),
@@ -233,7 +233,7 @@
camel_folder_construct (folder, parent_store, "folder_name", "short_name");
- camel_object_ref (message);
+ g_object_ref (message);
digest_folder->priv->message = message;
construct_summary (folder, CAMEL_MULTIPART (wrapper));
@@ -312,7 +312,7 @@
return NULL;
message = CAMEL_MIME_MESSAGE (wrapper);
- camel_object_ref (message);
+ g_object_ref (message);
return message;
}
Modified: branches/camel-gobject/camel/camel-digest-folder.h
==============================================================================
--- branches/camel-gobject/camel/camel-digest-folder.h (original)
+++ branches/camel-gobject/camel/camel-digest-folder.h Mon Nov 10 00:44:12 2008
@@ -30,9 +30,9 @@
#include <camel/camel-folder.h>
#include <camel/camel-mime-message.h>
-#define CAMEL_DIGEST_FOLDER(obj) CAMEL_CHECK_CAST (obj, camel_digest_folder_get_type (), CamelDigestFolder)
-#define CAMEL_DIGEST_FOLDER_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_digest_folder_get_type (), CamelDigestFolderClass)
-#define CAMEL_IS_DIGEST_FOLDER(obj) CAMEL_CHECK_TYPE (obj, camel_digest_folder_get_type ())
+#define CAMEL_DIGEST_FOLDER(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_digest_folder_get_type (), CamelDigestFolder)
+#define CAMEL_DIGEST_FOLDER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_digest_folder_get_type (), CamelDigestFolderClass)
+#define CAMEL_IS_DIGEST_FOLDER(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_digest_folder_get_type ())
G_BEGIN_DECLS
@@ -49,7 +49,7 @@
};
-CamelType camel_digest_folder_get_type (void);
+GType camel_digest_folder_get_type (void);
CamelFolder *camel_digest_folder_new (CamelStore *parent_store, CamelMimeMessage *message);
Modified: branches/camel-gobject/camel/camel-digest-store.c
==============================================================================
--- branches/camel-gobject/camel/camel-digest-store.c (original)
+++ branches/camel-gobject/camel/camel-digest-store.c Mon Nov 10 00:44:12 2008
@@ -52,12 +52,12 @@
static CamelStoreClass *parent_class = NULL;
-CamelType
+GType
camel_digest_store_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_store_get_type (),
"CamelDigestStore",
sizeof (CamelDigestStore),
@@ -77,7 +77,7 @@
CamelObjectClass *object_class = (CamelObjectClass *) klass;
CamelStoreClass *store_class = (CamelStoreClass *) klass;
- parent_class = CAMEL_STORE_CLASS(camel_type_get_global_classfuncs (camel_store_get_type ()));
+ parent_class = CAMEL_STORE_CLASS(g_type_class_peek (camel_store_get_type ()));
/* virtual method overload */
object_class->setv = digest_setv;
Modified: branches/camel-gobject/camel/camel-digest-store.h
==============================================================================
--- branches/camel-gobject/camel/camel-digest-store.h (original)
+++ branches/camel-gobject/camel/camel-digest-store.h Mon Nov 10 00:44:12 2008
@@ -28,9 +28,9 @@
#include <glib.h>
#include <camel/camel-store.h>
-#define CAMEL_DIGEST_STORE(obj) CAMEL_CHECK_CAST (obj, camel_digest_store_get_type (), CamelDigestStore)
-#define CAMEL_DIGEST_STORE_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_digest_store_get_type (), CamelDigestStoreClass)
-#define CAMEL_IS_DIGEST_STORE(obj) CAMEL_CHECK_TYPE (obj, camel_digest_store_get_type ())
+#define CAMEL_DIGEST_STORE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_digest_store_get_type (), CamelDigestStore)
+#define CAMEL_DIGEST_STORE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_digest_store_get_type (), CamelDigestStoreClass)
+#define CAMEL_IS_DIGEST_STORE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_digest_store_get_type ())
G_BEGIN_DECLS
@@ -46,7 +46,7 @@
};
-CamelType camel_digest_store_get_type (void);
+GType camel_digest_store_get_type (void);
CamelStore *camel_digest_store_new (const char *url);
Modified: branches/camel-gobject/camel/camel-digest-summary.c
==============================================================================
--- branches/camel-gobject/camel/camel-digest-summary.c (original)
+++ branches/camel-gobject/camel/camel-digest-summary.c Mon Nov 10 00:44:12 2008
@@ -37,12 +37,12 @@
static CamelFolderSummaryClass *parent_class = NULL;
-CamelType
+GType
camel_digest_summary_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (
camel_folder_summary_get_type (),
"CamelDigestSummary",
@@ -60,7 +60,7 @@
static void
camel_digest_summary_class_init (CamelDigestSummaryClass *klass)
{
- parent_class = CAMEL_FOLDER_SUMMARY_CLASS (camel_type_get_global_classfuncs (camel_folder_summary_get_type ()));
+ parent_class = CAMEL_FOLDER_SUMMARY_CLASS (g_type_class_peek (camel_folder_summary_get_type ()));
}
static void
Modified: branches/camel-gobject/camel/camel-digest-summary.h
==============================================================================
--- branches/camel-gobject/camel/camel-digest-summary.h (original)
+++ branches/camel-gobject/camel/camel-digest-summary.h Mon Nov 10 00:44:12 2008
@@ -29,9 +29,9 @@
#include <camel/camel-folder.h>
#include <camel/camel-exception.h>
-#define CAMEL_DIGEST_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_digest_summary_get_type (), CamelDigestSummary)
-#define CAMEL_DIGEST_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_digest_summary_get_type (), CamelDigestSummaryClass)
-#define CAMEL_IS_DIGEST_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_digest_summary_get_type ())
+#define CAMEL_DIGEST_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_digest_summary_get_type (), CamelDigestSummary)
+#define CAMEL_DIGEST_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_digest_summary_get_type (), CamelDigestSummaryClass)
+#define CAMEL_IS_DIGEST_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_digest_summary_get_type ())
G_BEGIN_DECLS
@@ -49,7 +49,7 @@
};
-CamelType camel_digest_summary_get_type (void);
+GType camel_digest_summary_get_type (void);
CamelFolderSummary *camel_digest_summary_new (void);
Modified: branches/camel-gobject/camel/camel-disco-diary.c
==============================================================================
--- branches/camel-gobject/camel/camel-disco-diary.c (original)
+++ branches/camel-gobject/camel/camel-disco-diary.c Mon Nov 10 00:44:12 2008
@@ -61,7 +61,7 @@
static void
unref_folder (gpointer key, gpointer value, gpointer data)
{
- camel_object_unref (value);
+ g_object_unref (value);
}
static void
@@ -86,14 +86,14 @@
}
}
-CamelType
+GType
camel_disco_diary_get_type (void)
{
- static CamelType camel_disco_diary_type = CAMEL_INVALID_TYPE;
+ static GType camel_disco_diary_type = G_TYPE_INVALID;
- if (camel_disco_diary_type == CAMEL_INVALID_TYPE) {
+ if (camel_disco_diary_type == G_TYPE_INVALID) {
camel_disco_diary_type = camel_type_register (
- CAMEL_OBJECT_TYPE, "CamelDiscoDiary",
+ CAMEL_TYPE_OBJECT, "CamelDiscoDiary",
sizeof (CamelDiscoDiary),
sizeof (CamelDiscoDiaryClass),
(CamelObjectClassInitFunc) camel_disco_diary_class_init,
@@ -277,7 +277,7 @@
{
g_free (name);
camel_folder_sync (folder, FALSE, NULL);
- camel_object_unref (folder);
+ g_object_unref (folder);
}
void
@@ -434,7 +434,7 @@
diary->file = g_fopen (filename, "a+b");
if (!diary->file) {
- camel_object_unref (diary);
+ g_object_unref (diary);
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
"Could not open journal file: %s",
g_strerror (errno));
Modified: branches/camel-gobject/camel/camel-disco-diary.h
==============================================================================
--- branches/camel-gobject/camel/camel-disco-diary.h (original)
+++ branches/camel-gobject/camel/camel-disco-diary.h Mon Nov 10 00:44:12 2008
@@ -31,9 +31,9 @@
#include <stdio.h>
#define CAMEL_DISCO_DIARY_TYPE (camel_disco_diary_get_type ())
-#define CAMEL_DISCO_DIARY(obj) (CAMEL_CHECK_CAST((obj), CAMEL_DISCO_DIARY_TYPE, CamelDiscoDiary))
-#define CAMEL_DISCO_DIARY_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_DISCO_DIARY_TYPE, CamelDiscoDiaryClass))
-#define CAMEL_IS_DISCO_DIARY(o) (CAMEL_CHECK_TYPE((o), CAMEL_DISCO_DIARY_TYPE))
+#define CAMEL_DISCO_DIARY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_DISCO_DIARY_TYPE, CamelDiscoDiary))
+#define CAMEL_DISCO_DIARY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_DISCO_DIARY_TYPE, CamelDiscoDiaryClass))
+#define CAMEL_IS_DISCO_DIARY(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_DISCO_DIARY_TYPE))
G_BEGIN_DECLS
@@ -88,7 +88,7 @@
const char *uid);
/* Standard Camel function */
-CamelType camel_disco_diary_get_type (void);
+GType camel_disco_diary_get_type (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/camel-disco-folder.c
==============================================================================
--- branches/camel-gobject/camel/camel-disco-folder.c (original)
+++ branches/camel-gobject/camel/camel-disco-folder.c Mon Nov 10 00:44:12 2008
@@ -70,7 +70,7 @@
{
CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS (camel_disco_folder_class);
- parent_class = CAMEL_FOLDER_CLASS (camel_type_get_global_classfuncs (camel_folder_get_type ()));
+ parent_class = CAMEL_FOLDER_CLASS (g_type_class_peek (camel_folder_get_type ()));
((CamelObjectClass *)camel_folder_class)->getv = disco_getv;
((CamelObjectClass *)camel_folder_class)->setv = disco_setv;
@@ -129,7 +129,7 @@
if (m->changes)
camel_folder_change_info_free(m->changes);
- camel_object_unref(m->folder);
+ g_object_unref(m->folder);
}
static CamelSessionThreadOps cdf_sync_ops = {
@@ -150,7 +150,7 @@
m->changes = camel_folder_change_info_new();
camel_folder_change_info_cat(m->changes, changes);
m->folder = folder;
- camel_object_ref(folder);
+ g_object_ref(folder);
camel_session_thread_queue(session, &m->msg, 0);
}
}
@@ -161,13 +161,13 @@
camel_object_hook_event(folder, "folder_changed", (CamelObjectEventHookFunc)cdf_folder_changed, NULL);
}
-CamelType
+GType
camel_disco_folder_get_type (void)
{
- static CamelType camel_disco_folder_type = CAMEL_INVALID_TYPE;
+ static GType camel_disco_folder_type = G_TYPE_INVALID;
int i;
- if (camel_disco_folder_type == CAMEL_INVALID_TYPE) {
+ if (camel_disco_folder_type == G_TYPE_INVALID) {
camel_disco_folder_type = camel_type_register (
CAMEL_FOLDER_TYPE, "CamelDiscoFolder",
sizeof (CamelDiscoFolder),
@@ -438,7 +438,7 @@
CamelException *ex)
{
g_warning ("CamelDiscoFolder::cache_message not implemented for '%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (disco_folder)));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (disco_folder)));
}
/**
Modified: branches/camel-gobject/camel/camel-disco-folder.h
==============================================================================
--- branches/camel-gobject/camel/camel-disco-folder.h (original)
+++ branches/camel-gobject/camel/camel-disco-folder.h Mon Nov 10 00:44:12 2008
@@ -29,9 +29,9 @@
#include "camel-folder.h"
#define CAMEL_DISCO_FOLDER_TYPE (camel_disco_folder_get_type ())
-#define CAMEL_DISCO_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_DISCO_FOLDER_TYPE, CamelDiscoFolder))
-#define CAMEL_DISCO_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_DISCO_FOLDER_TYPE, CamelDiscoFolderClass))
-#define CAMEL_IS_DISCO_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_DISCO_FOLDER_TYPE))
+#define CAMEL_DISCO_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_DISCO_FOLDER_TYPE, CamelDiscoFolder))
+#define CAMEL_DISCO_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_DISCO_FOLDER_TYPE, CamelDiscoFolderClass))
+#define CAMEL_IS_DISCO_FOLDER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_DISCO_FOLDER_TYPE))
G_BEGIN_DECLS
@@ -121,7 +121,7 @@
CamelException *ex);
/* Standard Camel function */
-CamelType camel_disco_folder_get_type (void);
+GType camel_disco_folder_get_type (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/camel-disco-store.c
==============================================================================
--- branches/camel-gobject/camel/camel-disco-store.c (original)
+++ branches/camel-gobject/camel/camel-disco-store.c Mon Nov 10 00:44:12 2008
@@ -71,7 +71,7 @@
CamelStoreClass *camel_store_class =
CAMEL_STORE_CLASS (camel_disco_store_class);
- parent_class = CAMEL_STORE_CLASS (camel_type_get_global_classfuncs (camel_store_get_type ()));
+ parent_class = CAMEL_STORE_CLASS (g_type_class_peek (camel_store_get_type ()));
/* virtual method definition */
camel_disco_store_class->set_status = set_status;
@@ -90,12 +90,12 @@
camel_store_class->get_folder_info = disco_get_folder_info;
}
-CamelType
+GType
camel_disco_store_get_type (void)
{
- static CamelType camel_disco_store_type = CAMEL_INVALID_TYPE;
+ static GType camel_disco_store_type = G_TYPE_INVALID;
- if (camel_disco_store_type == CAMEL_INVALID_TYPE) {
+ if (camel_disco_store_type == G_TYPE_INVALID) {
camel_disco_store_type = camel_type_register (
CAMEL_STORE_TYPE,
"CamelDiscoStore",
@@ -173,9 +173,9 @@
disconnect could be called, which will remove store->diary and unref it */
store->status = CAMEL_DISCO_STORE_RESYNCING;
diary = store->diary;
- camel_object_ref(diary);
+ g_object_ref(diary);
camel_disco_diary_replay(diary, ex);
- camel_object_unref(diary);
+ g_object_unref(diary);
store->status = CAMEL_DISCO_STORE_ONLINE;
if (camel_exception_is_set (ex))
return FALSE;
@@ -321,12 +321,12 @@
folders = camel_object_bag_list(((CamelStore *)disco_store)->folders);
for (i=0;i<folders->len;i++) {
folder = folders->pdata[i];
- if (CAMEL_CHECK_TYPE(folder, CAMEL_DISCO_FOLDER_TYPE)
+ if (G_TYPE_CHECK_INSTANCE_TYPE(folder, CAMEL_DISCO_FOLDER_TYPE)
&& (sync || ((CamelDiscoFolder *)folder)->offline_sync)) {
camel_disco_folder_prepare_for_offline((CamelDiscoFolder *)folder, "", &x);
camel_exception_clear(&x);
}
- camel_object_unref(folder);
+ g_object_unref(folder);
}
g_ptr_array_free(folders, TRUE);
}
@@ -366,7 +366,7 @@
can_work_offline (CamelDiscoStore *disco_store)
{
g_warning ("CamelDiscoStore::can_work_offline not implemented for '%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (disco_store)));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (disco_store)));
return FALSE;
}
@@ -430,12 +430,12 @@
folders = camel_object_bag_list(((CamelStore *)disco_store)->folders);
for (i=0;i<folders->len;i++) {
folder = folders->pdata[i];
- if (CAMEL_CHECK_TYPE(folder, CAMEL_DISCO_FOLDER_TYPE)
+ if (G_TYPE_CHECK_INSTANCE_TYPE(folder, CAMEL_DISCO_FOLDER_TYPE)
&& (sync || ((CamelDiscoFolder *)folder)->offline_sync)) {
camel_disco_folder_prepare_for_offline((CamelDiscoFolder *)folder, "(match-all)", &x);
camel_exception_clear(&x);
}
- camel_object_unref(folder);
+ g_object_unref(folder);
}
g_ptr_array_free(folders, TRUE);
}
Modified: branches/camel-gobject/camel/camel-disco-store.h
==============================================================================
--- branches/camel-gobject/camel/camel-disco-store.h (original)
+++ branches/camel-gobject/camel/camel-disco-store.h Mon Nov 10 00:44:12 2008
@@ -29,9 +29,9 @@
#include <camel/camel-store.h>
#define CAMEL_DISCO_STORE_TYPE (camel_disco_store_get_type ())
-#define CAMEL_DISCO_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_DISCO_STORE_TYPE, CamelDiscoStore))
-#define CAMEL_DISCO_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_DISCO_STORE_TYPE, CamelDiscoStoreClass))
-#define CAMEL_IS_DISCO_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_DISCO_STORE_TYPE))
+#define CAMEL_DISCO_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_DISCO_STORE_TYPE, CamelDiscoStore))
+#define CAMEL_DISCO_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_DISCO_STORE_TYPE, CamelDiscoStoreClass))
+#define CAMEL_IS_DISCO_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_DISCO_STORE_TYPE))
G_BEGIN_DECLS
@@ -102,7 +102,7 @@
/* Standard Camel function */
-CamelType camel_disco_store_get_type (void);
+GType camel_disco_store_get_type (void);
/* Public methods */
CamelDiscoStoreStatus camel_disco_store_status (CamelDiscoStore *store);
Modified: branches/camel-gobject/camel/camel-filter-driver.c
==============================================================================
--- branches/camel-gobject/camel/camel-filter-driver.c (original)
+++ branches/camel-gobject/camel/camel-filter-driver.c Mon Nov 10 00:44:12 2008
@@ -180,13 +180,13 @@
static CamelObjectClass *camel_filter_driver_parent;
-CamelType
+GType
camel_filter_driver_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (CAMEL_OBJECT_TYPE,
+ if (type == G_TYPE_INVALID) {
+ type = camel_type_register (CAMEL_TYPE_OBJECT,
"CamelFilterDriver",
sizeof (CamelFilterDriver),
sizeof (CamelFilterDriverClass),
@@ -204,7 +204,7 @@
{
/*CamelObjectClass *object_class = (CamelObjectClass *) klass;*/
- camel_filter_driver_parent = camel_type_get_global_classfuncs(camel_object_get_type());
+ camel_filter_driver_parent = g_type_class_peek(camel_object_get_type());
}
static void
@@ -262,7 +262,7 @@
if (p->defaultfolder) {
camel_folder_thaw (p->defaultfolder);
- camel_object_unref (p->defaultfolder);
+ g_object_unref (p->defaultfolder);
}
while ((node = (struct _filter_rule *)camel_dlist_remhead(&p->rules))) {
@@ -272,7 +272,7 @@
g_free(node);
}
- camel_object_unref(p->session);
+ g_object_unref(p->session);
g_free (p);
}
@@ -288,7 +288,7 @@
CamelFilterDriver *d = (CamelFilterDriver *)camel_object_new(camel_filter_driver_get_type());
d->priv->session = session;
- camel_object_ref((CamelObject *)session);
+ g_object_ref((CamelObject *)session);
return d;
}
@@ -353,14 +353,14 @@
if (p->defaultfolder) {
camel_folder_thaw (p->defaultfolder);
- camel_object_unref (p->defaultfolder);
+ g_object_unref (p->defaultfolder);
}
p->defaultfolder = def;
if (p->defaultfolder) {
camel_folder_freeze (p->defaultfolder);
- camel_object_ref (p->defaultfolder);
+ g_object_ref (p->defaultfolder);
}
}
@@ -792,34 +792,34 @@
stream = camel_stream_fs_new_with_fd (pipe_to_child);
if (camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (p->message), stream) == -1) {
- camel_object_unref (stream);
+ g_object_unref (stream);
close (pipe_from_child);
goto wait;
}
if (camel_stream_flush (stream) == -1) {
- camel_object_unref (stream);
+ g_object_unref (stream);
close (pipe_from_child);
goto wait;
}
- camel_object_unref (stream);
+ g_object_unref (stream);
stream = camel_stream_fs_new_with_fd (pipe_from_child);
mem = camel_stream_mem_new ();
if (camel_stream_write_to_stream (stream, mem) == -1) {
- camel_object_unref (stream);
- camel_object_unref (mem);
+ g_object_unref (stream);
+ g_object_unref (mem);
goto wait;
}
- camel_object_unref (stream);
+ g_object_unref (stream);
camel_stream_reset (mem);
parser = camel_mime_parser_new ();
camel_mime_parser_init_with_stream (parser, mem);
camel_mime_parser_scan_from (parser, FALSE);
- camel_object_unref (mem);
+ g_object_unref (mem);
message = camel_mime_message_new ();
if (camel_mime_part_construct_from_parser ((CamelMimePart *) message, parser) == -1) {
@@ -827,15 +827,15 @@
_("Invalid message stream received from %s: %s"),
argv[0]->value.string,
g_strerror (camel_mime_parser_errno (parser)));
- camel_object_unref (message);
+ g_object_unref (message);
message = NULL;
} else {
- camel_object_unref (p->message);
+ g_object_unref (p->message);
p->message = message;
p->modified = TRUE;
}
- camel_object_unref (parser);
+ g_object_unref (parser);
wait:
context = g_main_context_new ();
@@ -1010,7 +1010,7 @@
if (folder != FOLDER_INVALID) {
camel_folder_sync (folder, FALSE, camel_exception_is_set(p->ex)?NULL : p->ex);
camel_folder_thaw (folder);
- camel_object_unref (folder);
+ g_object_unref (folder);
}
report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, g_hash_table_size(p->folders)* 100 / p->closed, _("Syncing folders"));
@@ -1239,7 +1239,7 @@
if (camel_mime_part_construct_from_parser (CAMEL_MIME_PART (msg), mp) == -1) {
camel_exception_set (ex, (errno==EINTR)?CAMEL_EXCEPTION_USER_CANCEL:CAMEL_EXCEPTION_SYSTEM, _("Cannot open message"));
report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Failed on message %d"), i);
- camel_object_unref (msg);
+ g_object_unref (msg);
goto fail;
}
@@ -1254,7 +1254,7 @@
last = camel_mime_parser_tell(mp);
status = camel_filter_driver_filter_message (driver, msg, info, NULL, NULL, source_url,
original_source_url ? original_source_url : source_url, ex);
- camel_object_unref (msg);
+ g_object_unref (msg);
if (camel_exception_is_set (ex) || status == -1) {
report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Failed on message %d"), i);
camel_message_info_free (info);
@@ -1282,7 +1282,7 @@
if (fd != -1)
close (fd);
if (mp)
- camel_object_unref (mp);
+ g_object_unref (mp);
return ret;
}
@@ -1393,7 +1393,7 @@
if (p->message) {
message = p->message;
- camel_object_ref (message);
+ g_object_ref (message);
} else {
const char *uid;
@@ -1456,7 +1456,7 @@
struct _camel_header_raw *h;
if (message) {
- camel_object_ref (message);
+ g_object_ref (message);
} else {
message = camel_folder_get_message (source, uid, ex);
if (!message)
@@ -1473,7 +1473,7 @@
uid = camel_message_info_uid (info);
if (message)
- camel_object_ref (message);
+ g_object_ref (message);
}
p->ex = ex;
@@ -1576,7 +1576,7 @@
}
if (p->message)
- camel_object_unref (p->message);
+ g_object_unref (p->message);
if (freeinfo)
camel_message_info_free (info);
@@ -1588,7 +1588,7 @@
camel_filter_driver_log (driver, FILTER_LOG_END, NULL);
if (p->message)
- camel_object_unref (p->message);
+ g_object_unref (p->message);
if (freeinfo)
camel_message_info_free (info);
Modified: branches/camel-gobject/camel/camel-filter-driver.h
==============================================================================
--- branches/camel-gobject/camel/camel-filter-driver.h (original)
+++ branches/camel-gobject/camel/camel-filter-driver.h Mon Nov 10 00:44:12 2008
@@ -29,9 +29,9 @@
#include <camel/camel-uid-cache.h>
#define CAMEL_FILTER_DRIVER_TYPE (camel_filter_driver_get_type ())
-#define CAMEL_FILTER_DRIVER(obj) CAMEL_CHECK_CAST (obj, CAMEL_FILTER_DRIVER_TYPE, CamelFilterDriver)
+#define CAMEL_FILTER_DRIVER(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, CAMEL_FILTER_DRIVER_TYPE, CamelFilterDriver)
#define CAMEL_FILTER_DRIVER_CLASS(klass) CAMEL__CHECK_CLASS_CAST (klass, CAMEL_FILTER_DRIVER_TYPE, CamelFilterDriverClass)
-#define CAMEL_IS_FILTER_DRIVER(obj) CAMEL_CHECK_TYPE (obj, CAMEL_FILTER_DRIVER_TYPE)
+#define CAMEL_IS_FILTER_DRIVER(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, CAMEL_FILTER_DRIVER_TYPE)
G_BEGIN_DECLS
@@ -67,7 +67,7 @@
typedef void (CamelFilterPlaySoundFunc) (CamelFilterDriver *driver, const char *filename, void *data);
typedef void (CamelFilterSystemBeepFunc) (CamelFilterDriver *driver, void *data);
-CamelType camel_filter_driver_get_type (void);
+GType camel_filter_driver_get_type (void);
CamelFilterDriver *camel_filter_driver_new (CamelSession *);
/* modifiers */
Modified: branches/camel-gobject/camel/camel-filter-search.c
==============================================================================
--- branches/camel-gobject/camel/camel-filter-search.c (original)
+++ branches/camel-gobject/camel/camel-filter-search.c Mon Nov 10 00:44:12 2008
@@ -591,7 +591,7 @@
stream = camel_stream_fs_new_with_fd (pipe_to_child);
camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), stream);
camel_stream_flush (stream);
- camel_object_unref (stream);
+ g_object_unref (stream);
context = g_main_context_new ();
child_watch_data.loop = g_main_loop_new (context, FALSE);
@@ -756,13 +756,13 @@
e_sexp_unref (sexp);
if (fms.message)
- camel_object_unref (fms.message);
+ g_object_unref (fms.message);
return retval;
error:
if (fms.message)
- camel_object_unref (fms.message);
+ g_object_unref (fms.message);
e_sexp_unref (sexp);
Modified: branches/camel-gobject/camel/camel-folder-search.c
==============================================================================
--- branches/camel-gobject/camel/camel-folder-search.c (original)
+++ branches/camel-gobject/camel/camel-folder-search.c Mon Nov 10 00:44:12 2008
@@ -99,7 +99,7 @@
static void
camel_folder_search_class_init (CamelFolderSearchClass *klass)
{
- camel_folder_search_parent = camel_type_get_global_classfuncs (camel_object_get_type ());
+ camel_folder_search_parent = g_type_class_peek (camel_object_get_type ());
klass->not = search_not;
@@ -144,12 +144,12 @@
g_free(p);
}
-CamelType
+GType
camel_folder_search_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_object_get_type (), "CamelFolderSearch",
sizeof (CamelFolderSearch),
sizeof (CamelFolderSearchClass),
@@ -213,7 +213,7 @@
/* c is sure messy sometimes */
func = *((void **)(((char *)klass)+builtins[i].offset));
if (func == NULL && builtins[i].flags&1) {
- g_warning("Search class doesn't implement '%s' method: %s", builtins[i].name, camel_type_to_name(CAMEL_OBJECT_GET_CLASS(search)));
+ g_warning("Search class doesn't implement '%s' method: %s", builtins[i].name, G_OBJECT_CLASS_NAME(CAMEL_OBJECT_GET_CLASS(search)));
func = (void *)search_dummy;
}
if (func != NULL) {
@@ -292,10 +292,10 @@
camel_folder_search_set_body_index(CamelFolderSearch *search, CamelIndex *index)
{
if (search->body_index)
- camel_object_unref((CamelObject *)search->body_index);
+ g_object_unref((CamelObject *)search->body_index);
search->body_index = index;
if (index)
- camel_object_ref((CamelObject *)index);
+ g_object_ref((CamelObject *)index);
}
/**
@@ -1135,11 +1135,11 @@
if (nc) {
while (!truth && (name = camel_index_cursor_next(nc)))
truth = strcmp(name, uid) == 0;
- camel_object_unref((CamelObject *)nc);
+ g_object_unref((CamelObject *)nc);
}
}
}
- camel_object_unref((CamelObject *)wc);
+ g_object_unref((CamelObject *)wc);
}
return truth;
@@ -1182,12 +1182,12 @@
mask = (GPOINTER_TO_INT(g_hash_table_lookup(ht, name))) | (1<<i);
g_hash_table_insert(ht, (char *) camel_pstring_peek(name), GINT_TO_POINTER(mask));
}
- camel_object_unref((CamelObject *)nc);
+ g_object_unref((CamelObject *)nc);
}
}
}
}
- camel_object_unref((CamelObject *)wc);
+ g_object_unref((CamelObject *)wc);
lambdafoo.uids = result;
lambdafoo.count = (1<<words->len) - 1;
@@ -1238,7 +1238,7 @@
}
}
- camel_object_unref (mem);
+ g_object_unref (mem);
}
return truth;
@@ -1256,7 +1256,7 @@
if (msg) {
mask = 0;
truth = match_words_1message((CamelDataWrapper *)msg, words, &mask);
- camel_object_unref((CamelObject *)msg);
+ g_object_unref((CamelObject *)msg);
} else {
camel_exception_clear(&x);
truth = FALSE;
Modified: branches/camel-gobject/camel/camel-folder-search.h
==============================================================================
--- branches/camel-gobject/camel/camel-folder-search.h (original)
+++ branches/camel-gobject/camel/camel-folder-search.h Mon Nov 10 00:44:12 2008
@@ -28,9 +28,9 @@
#include <camel/camel-index.h>
#define CAMEL_FOLDER_SEARCH_TYPE (camel_folder_search_get_type ())
-#define CAMEL_FOLDER_SEARCH(obj) CAMEL_CHECK_CAST (obj, camel_folder_search_get_type (), CamelFolderSearch)
-#define CAMEL_FOLDER_SEARCH_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_folder_search_get_type (), CamelFolderSearchClass)
-#define CAMEL_IS_FOLDER_SEARCH(obj) CAMEL_CHECK_TYPE (obj, camel_folder_search_get_type ())
+#define CAMEL_FOLDER_SEARCH(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_folder_search_get_type (), CamelFolderSearch)
+#define CAMEL_FOLDER_SEARCH_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_folder_search_get_type (), CamelFolderSearchClass)
+#define CAMEL_IS_FOLDER_SEARCH(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_folder_search_get_type ())
G_BEGIN_DECLS
@@ -114,7 +114,7 @@
ESExpResult * (*uid)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
};
-CamelType camel_folder_search_get_type (void);
+GType camel_folder_search_get_type (void);
CamelFolderSearch *camel_folder_search_new (void);
void camel_folder_search_construct (CamelFolderSearch *search);
Modified: branches/camel-gobject/camel/camel-folder-summary.c
==============================================================================
--- branches/camel-gobject/camel/camel-folder-summary.c (original)
+++ branches/camel-gobject/camel/camel-folder-summary.c Mon Nov 10 00:44:12 2008
@@ -188,7 +188,7 @@
static void free_o_name(void *key, void *value, void *data)
{
- camel_object_unref((CamelObject *)value);
+ g_object_unref((CamelObject *)value);
g_free(key);
}
@@ -220,22 +220,22 @@
#endif
if (p->filter_index)
- camel_object_unref((CamelObject *)p->filter_index);
+ g_object_unref((CamelObject *)p->filter_index);
if (p->filter_64)
- camel_object_unref((CamelObject *)p->filter_64);
+ g_object_unref((CamelObject *)p->filter_64);
if (p->filter_qp)
- camel_object_unref((CamelObject *)p->filter_qp);
+ g_object_unref((CamelObject *)p->filter_qp);
if (p->filter_uu)
- camel_object_unref((CamelObject *)p->filter_uu);
+ g_object_unref((CamelObject *)p->filter_uu);
if (p->filter_save)
- camel_object_unref((CamelObject *)p->filter_save);
+ g_object_unref((CamelObject *)p->filter_save);
if (p->filter_html)
- camel_object_unref((CamelObject *)p->filter_html);
+ g_object_unref((CamelObject *)p->filter_html);
if (p->filter_stream)
- camel_object_unref((CamelObject *)p->filter_stream);
+ g_object_unref((CamelObject *)p->filter_stream);
if (p->index)
- camel_object_unref((CamelObject *)p->index);
+ g_object_unref((CamelObject *)p->index);
/* Freeing memory occupied by meta-summary-header */
g_free(s->meta_summary->path);
@@ -250,12 +250,12 @@
g_free(p);
}
-CamelType
+GType
camel_folder_summary_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_object_get_type (), "CamelFolderSummary",
sizeof (CamelFolderSummary),
sizeof (CamelFolderSummaryClass),
@@ -326,11 +326,11 @@
struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
if (p->index)
- camel_object_unref((CamelObject *)p->index);
+ g_object_unref((CamelObject *)p->index);
p->index = index;
if (index)
- camel_object_ref((CamelObject *)index);
+ g_object_ref((CamelObject *)index);
}
@@ -846,7 +846,7 @@
static void remove_cache_end (CamelSession *session, CamelSessionThreadMsg *msg)
{
struct _folder_summary_free_msg *m = (struct _folder_summary_free_msg *)msg;
- camel_object_unref (m->summary);
+ g_object_unref (m->summary);
}
static CamelSessionThreadOps remove_timeout_ops = {
@@ -873,7 +873,7 @@
return TRUE;
m = camel_session_thread_msg_new(session, &remove_timeout_ops, sizeof(*m));
- camel_object_ref (s);
+ g_object_ref (s);
m->summary = s;
camel_session_thread_queue(session, &m->msg, 0);
@@ -1965,7 +1965,7 @@
if (name && p->index) {
camel_index_write_name(p->index, name);
- camel_object_unref((CamelObject *)name);
+ g_object_unref((CamelObject *)name);
camel_mime_filter_index_set_name(p->filter_index, NULL);
}
@@ -2014,7 +2014,7 @@
CamelStream *null = camel_stream_null_new();
p->filter_stream = camel_stream_filter_new_with_stream(null);
- camel_object_unref((CamelObject *)null);
+ g_object_unref((CamelObject *)null);
}
}
@@ -2022,7 +2022,7 @@
if (name) {
camel_index_write_name(p->index, name);
- camel_object_unref((CamelObject *)name);
+ g_object_unref((CamelObject *)name);
camel_mime_filter_index_set_name(p->filter_index, NULL);
}
@@ -4819,7 +4819,7 @@
camel_folder_summary_class_init (CamelFolderSummaryClass *klass)
{
CamelObjectClass *camel_object_class = CAMEL_OBJECT_CLASS (klass);
- camel_folder_summary_parent = camel_type_get_global_classfuncs (camel_object_get_type ());
+ camel_folder_summary_parent = g_type_class_peek (camel_object_get_type ());
klass->summary_header_load = summary_header_load;
klass->summary_header_save = summary_header_save;
Modified: branches/camel-gobject/camel/camel-folder-summary.h
==============================================================================
--- branches/camel-gobject/camel/camel-folder-summary.h (original)
+++ branches/camel-gobject/camel/camel-folder-summary.h Mon Nov 10 00:44:12 2008
@@ -29,9 +29,9 @@
#include <camel/camel-index.h>
#define CAMEL_FOLDER_SUMMARY_TYPE camel_folder_summary_get_type ()
-#define CAMEL_FOLDER_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_folder_summary_get_type (), CamelFolderSummary)
-#define CAMEL_FOLDER_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_folder_summary_get_type (), CamelFolderSummaryClass)
-#define CAMEL_IS_FOLDER_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_folder_summary_get_type ())
+#define CAMEL_FOLDER_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_folder_summary_get_type (), CamelFolderSummary)
+#define CAMEL_FOLDER_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_folder_summary_get_type (), CamelFolderSummaryClass)
+#define CAMEL_IS_FOLDER_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_folder_summary_get_type ())
G_BEGIN_DECLS
@@ -323,7 +323,7 @@
char *path; /* Path to meta-summary-file */
};
-CamelType camel_folder_summary_get_type (void);
+GType camel_folder_summary_get_type (void);
CamelFolderSummary *camel_folder_summary_new (struct _CamelFolder *folder);
/* Deprecated */
Modified: branches/camel-gobject/camel/camel-folder-thread.c
==============================================================================
--- branches/camel-gobject/camel/camel-folder-thread.c (original)
+++ branches/camel-gobject/camel/camel-folder-thread.c Mon Nov 10 00:44:12 2008
@@ -609,7 +609,7 @@
thread->tree = NULL;
thread->node_chunks = e_memchunk_new(32, sizeof(CamelFolderThreadNode));
thread->folder = folder;
- camel_object_ref((CamelObject *)folder);
+ g_object_ref((CamelObject *)folder);
/* get all of the summary items of interest in summary order */
if (uids) {
@@ -722,7 +722,7 @@
for (i=0;i<thread->summary->len;i++)
camel_folder_free_message_info(thread->folder, thread->summary->pdata[i]);
g_ptr_array_free(thread->summary, TRUE);
- camel_object_unref((CamelObject *)thread->folder);
+ g_object_unref((CamelObject *)thread->folder);
}
e_memchunk_destroy(thread->node_chunks);
g_free(thread);
Modified: branches/camel-gobject/camel/camel-folder.c
==============================================================================
--- branches/camel-gobject/camel/camel-folder.c (original)
+++ branches/camel-gobject/camel/camel-folder.c Mon Nov 10 00:44:12 2008
@@ -128,7 +128,7 @@
{
CamelObjectClass *camel_object_class = CAMEL_OBJECT_CLASS (camel_folder_class);
- parent_class = camel_type_get_global_classfuncs (camel_object_get_type ());
+ parent_class = g_type_class_peek (camel_object_get_type ());
/* virtual method definition */
camel_folder_class->sync = folder_sync;
@@ -200,11 +200,11 @@
g_free(camel_folder->description);
if (camel_folder->parent_store)
- camel_object_unref (camel_folder->parent_store);
+ g_object_unref (camel_folder->parent_store);
if (camel_folder->summary) {
camel_folder->summary->folder = NULL;
- camel_object_unref (camel_folder->summary);
+ g_object_unref (camel_folder->summary);
}
camel_folder_change_info_free(p->changed_frozen);
@@ -215,13 +215,13 @@
g_free(p);
}
-CamelType
+GType
camel_folder_get_type (void)
{
- static CamelType camel_folder_type = CAMEL_INVALID_TYPE;
+ static GType camel_folder_type = G_TYPE_INVALID;
- if (camel_folder_type == CAMEL_INVALID_TYPE) {
- camel_folder_type = camel_type_register (CAMEL_OBJECT_TYPE, "CamelFolder",
+ if (camel_folder_type == G_TYPE_INVALID) {
+ camel_folder_type = camel_type_register (CAMEL_TYPE_OBJECT, "CamelFolder",
sizeof (CamelFolder),
sizeof (CamelFolderClass),
(CamelObjectClassInitFunc) camel_folder_class_init,
@@ -258,7 +258,7 @@
folder->parent_store = parent_store;
if (parent_store)
- camel_object_ref(parent_store);
+ g_object_ref(parent_store);
folder->name = g_strdup (name);
folder->full_name = g_strdup (full_name);
@@ -279,7 +279,7 @@
folder_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
{
w(g_warning ("CamelFolder::sync not implemented for '%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder))));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (folder))));
}
@@ -573,7 +573,7 @@
expunge (CamelFolder *folder, CamelException *ex)
{
w(g_warning ("CamelFolder::expunge not implemented for '%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder))));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (folder))));
}
@@ -673,10 +673,10 @@
{
camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID,
_("Unsupported operation: append message: for %s"),
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (folder)));
w(g_warning ("CamelFolder::append_message not implemented for '%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder))));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (folder))));
return;
@@ -1099,7 +1099,7 @@
get_message (CamelFolder *folder, const char *uid, CamelException *ex)
{
w(g_warning ("CamelFolder::get_message not implemented for '%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder))));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (folder))));
return NULL;
}
@@ -1329,10 +1329,10 @@
{
camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID,
_("Unsupported operation: search by expression: for %s"),
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (folder)));
w(g_warning ("CamelFolder::search_by_expression not implemented for "
- "'%s'", camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder))));
+ "'%s'", G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (folder))));
return NULL;
}
@@ -1371,10 +1371,10 @@
{
camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID,
_("Unsupported operation: count by expression: for %s"),
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (folder)));
w(g_warning ("CamelFolder::count_by_expression not implemented for "
- "'%s'", camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder))));
+ "'%s'", G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (folder))));
return 0;
}
@@ -1411,10 +1411,10 @@
{
camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID,
_("Unsupported operation: search by UIDs: for %s"),
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (folder)));
w(g_warning ("CamelFolder::search_by_expression not implemented for "
- "'%s'", camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder))));
+ "'%s'", G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (folder))));
return NULL;
}
@@ -1502,7 +1502,7 @@
camel_message_info_set_flags(info, CAMEL_MESSAGE_DELETED, 0);
camel_folder_append_message (dest, msg, info, transferred_uid, ex);
- camel_object_unref (msg);
+ g_object_unref (msg);
if (delete_original && !camel_exception_is_set (ex))
camel_folder_set_message_flags (source, uid, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, ~0);
@@ -1882,7 +1882,7 @@
if (msg) {
camel_junk_plugin_report_junk (csp, msg);
- camel_object_unref (msg);
+ g_object_unref (msg);
}
}
camel_operation_end (NULL);
@@ -1898,7 +1898,7 @@
if (msg) {
camel_junk_plugin_report_notjunk (csp, msg);
- camel_object_unref (msg);
+ g_object_unref (msg);
}
}
camel_operation_end (NULL);
@@ -1957,7 +1957,7 @@
struct _folder_filter_msg *m = (struct _folder_filter_msg *)msg;
if (m->driver)
- camel_object_unref(m->driver);
+ g_object_unref(m->driver);
if (m->recents)
camel_folder_free_deep(m->folder, m->recents);
if (m->junk)
@@ -1967,7 +1967,7 @@
camel_folder_summary_save_to_db (m->folder->summary, &m->ex);
camel_folder_thaw(m->folder);
- camel_object_unref(m->folder);
+ g_object_unref(m->folder);
}
static CamelSessionThreadOps filter_ops = {
@@ -2005,7 +2005,7 @@
if (changed == NULL) {
w(g_warning ("Class %s is passing NULL to folder_changed event",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder))));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (folder))));
return TRUE;
}
@@ -2064,7 +2064,7 @@
msg->junk = junk;
msg->notjunk = notjunk;
msg->folder = folder;
- camel_object_ref(folder);
+ g_object_ref(folder);
camel_folder_freeze(folder);
/* Copy changes back to changed_frozen list to retain
* them while we are filtering */
Modified: branches/camel-gobject/camel/camel-folder.h
==============================================================================
--- branches/camel-gobject/camel/camel-folder.h (original)
+++ branches/camel-gobject/camel/camel-folder.h Mon Nov 10 00:44:12 2008
@@ -30,9 +30,9 @@
#include <camel/camel-folder-summary.h>
#define CAMEL_FOLDER_TYPE (camel_folder_get_type ())
-#define CAMEL_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_FOLDER_TYPE, CamelFolder))
-#define CAMEL_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_FOLDER_TYPE, CamelFolderClass))
-#define CAMEL_IS_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_FOLDER_TYPE))
+#define CAMEL_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_FOLDER_TYPE, CamelFolder))
+#define CAMEL_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_FOLDER_TYPE, CamelFolderClass))
+#define CAMEL_IS_FOLDER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_FOLDER_TYPE))
G_BEGIN_DECLS
@@ -214,7 +214,7 @@
} CamelFolderClass;
/* Standard Camel function */
-CamelType camel_folder_get_type (void);
+GType camel_folder_get_type (void);
/* public methods */
Modified: branches/camel-gobject/camel/camel-gpg-context.c
==============================================================================
--- branches/camel-gobject/camel/camel-gpg-context.c (original)
+++ branches/camel-gobject/camel/camel-gpg-context.c Mon Nov 10 00:44:12 2008
@@ -94,7 +94,7 @@
cipher = (CamelCipherContext *) ctx;
cipher->session = session;
- camel_object_ref (session);
+ g_object_ref (session);
return cipher;
}
@@ -249,7 +249,7 @@
gpg = g_new (struct _GpgCtx, 1);
gpg->mode = GPG_CTX_MODE_SIGN;
gpg->session = session;
- camel_object_ref (session);
+ g_object_ref (session);
gpg->userid_hint = g_hash_table_new (g_str_hash, g_str_equal);
gpg->complete = FALSE;
gpg->seen_eof1 = TRUE;
@@ -306,8 +306,8 @@
if ((filter = camel_mime_filter_charset_new_convert (charset, "UTF-8"))) {
fstream = camel_stream_filter_new_with_stream (stream);
camel_stream_filter_add (fstream, (CamelMimeFilter *) filter);
- camel_object_unref (filter);
- camel_object_unref (stream);
+ g_object_unref (filter);
+ g_object_unref (stream);
stream = (CamelStream *) fstream;
}
@@ -374,18 +374,18 @@
static void
gpg_ctx_set_istream (struct _GpgCtx *gpg, CamelStream *istream)
{
- camel_object_ref (istream);
+ g_object_ref (istream);
if (gpg->istream)
- camel_object_unref (gpg->istream);
+ g_object_unref (gpg->istream);
gpg->istream = istream;
}
static void
gpg_ctx_set_ostream (struct _GpgCtx *gpg, CamelStream *ostream)
{
- camel_object_ref (ostream);
+ g_object_ref (ostream);
if (gpg->ostream)
- camel_object_unref (gpg->ostream);
+ g_object_unref (gpg->ostream);
gpg->ostream = ostream;
gpg->seen_eof1 = FALSE;
}
@@ -421,7 +421,7 @@
return;
if (gpg->session)
- camel_object_unref (gpg->session);
+ g_object_unref (gpg->session);
g_hash_table_foreach (gpg->userid_hint, userid_hint_free, NULL);
g_hash_table_destroy (gpg->userid_hint);
@@ -458,12 +458,12 @@
}
if (gpg->istream)
- camel_object_unref (gpg->istream);
+ g_object_unref (gpg->istream);
if (gpg->ostream)
- camel_object_unref (gpg->ostream);
+ g_object_unref (gpg->ostream);
- camel_object_unref (gpg->diagnostics);
+ g_object_unref (gpg->diagnostics);
g_free (gpg);
}
@@ -1314,7 +1314,7 @@
printf("Writing gpg signing data to '%s'\n", name);
camel_stream_write_to_stream(istream, out);
camel_stream_reset(istream);
- camel_object_unref(out);
+ g_object_unref(out);
}
g_free(name);
camel_debug_end();
@@ -1363,7 +1363,7 @@
camel_content_type_unref(ct);
camel_medium_set_content_object((CamelMedium *)sigpart, dw);
- camel_object_unref(dw);
+ g_object_unref(dw);
camel_mime_part_set_description(sigpart, _("This is a digitally signed message part"));
@@ -1378,11 +1378,11 @@
mps->signature = sigpart;
mps->contentraw = istream;
camel_stream_reset(istream);
- camel_object_ref(istream);
+ g_object_ref(istream);
camel_medium_set_content_object((CamelMedium *)opart, (CamelDataWrapper *)mps);
fail:
- camel_object_unref(ostream);
+ g_object_unref(ostream);
if (gpg)
gpg_ctx_free (gpg);
@@ -1414,7 +1414,7 @@
ret = camel_stream_close (ostream);
}
- camel_object_unref(ostream);
+ g_object_unref(ostream);
if (ret == -1) {
g_unlink (template);
@@ -1463,7 +1463,7 @@
if (!(sigpart = camel_multipart_get_part (mps, CAMEL_MULTIPART_SIGNED_SIGNATURE))) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Cannot verify message signature: Incorrect message format"));
- camel_object_unref (istream);
+ g_object_unref (istream);
return NULL;
}
} else if (camel_content_type_is(ct, "application", "x-inlinepgp-signed")) {
@@ -1493,7 +1493,7 @@
printf("Writing gpg verify data to '%s'\n", name);
camel_stream_write_to_stream(istream, out);
camel_stream_reset(istream);
- camel_object_unref(out);
+ g_object_unref(out);
}
g_free(name);
@@ -1504,7 +1504,7 @@
if (out) {
printf("Writing gpg verify signature to '%s'\n", name);
camel_data_wrapper_write_to_stream((CamelDataWrapper *)sigpart, out);
- camel_object_unref(out);
+ g_object_unref(out);
}
g_free(name);
}
@@ -1563,7 +1563,7 @@
g_unlink (sigfile);
g_free (sigfile);
}
- camel_object_unref(istream);
+ g_object_unref(istream);
return validity;
@@ -1573,7 +1573,7 @@
gpg_ctx_free (gpg);
if (istream)
- camel_object_unref(istream);
+ g_object_unref(istream);
if (sigfile) {
g_unlink (sigfile);
@@ -1647,7 +1647,7 @@
camel_content_type_unref(ct);
camel_medium_set_content_object((CamelMedium *)encpart, dw);
- camel_object_unref(dw);
+ g_object_unref(dw);
camel_mime_part_set_description(encpart, _("This is a digitally encrypted message part"));
@@ -1659,9 +1659,9 @@
dw = camel_data_wrapper_new();
camel_data_wrapper_set_mime_type(dw, context->encrypt_protocol);
camel_data_wrapper_construct_from_stream(dw, vstream);
- camel_object_unref(vstream);
+ g_object_unref(vstream);
camel_medium_set_content_object((CamelMedium *)verpart, dw);
- camel_object_unref(dw);
+ g_object_unref(dw);
mpe = camel_multipart_encrypted_new();
ct = camel_content_type_new("multipart", "encrypted");
@@ -1671,19 +1671,19 @@
camel_multipart_set_boundary((CamelMultipart *)mpe, NULL);
mpe->decrypted = ipart;
- camel_object_ref(ipart);
+ g_object_ref(ipart);
camel_multipart_add_part((CamelMultipart *)mpe, verpart);
- camel_object_unref(verpart);
+ g_object_unref(verpart);
camel_multipart_add_part((CamelMultipart *)mpe, encpart);
- camel_object_unref(encpart);
+ g_object_unref(encpart);
camel_medium_set_content_object((CamelMedium *)opart, (CamelDataWrapper *)mpe);
fail:
gpg_ctx_free(gpg);
fail1:
- camel_object_unref(istream);
- camel_object_unref(ostream);
+ g_object_unref(istream);
+ g_object_unref(ostream);
return res;
}
@@ -1777,7 +1777,7 @@
rv = camel_data_wrapper_construct_from_stream(dw, ostream);
camel_data_wrapper_set_mime_type(dw, "application/octet-stream");
camel_medium_set_content_object((CamelMedium *)opart, dw);
- camel_object_unref(dw);
+ g_object_unref(dw);
/* Set mime/type of this new part to application/octet-stream to force type snooping */
camel_mime_part_set_content_type(opart, "application/octet-stream");
}
@@ -1807,8 +1807,8 @@
}
fail:
- camel_object_unref(ostream);
- camel_object_unref(istream);
+ g_object_unref(ostream);
+ g_object_unref(istream);
gpg_ctx_free (gpg);
return valid;
@@ -1905,7 +1905,7 @@
{
CamelCipherContextClass *cipher_class = CAMEL_CIPHER_CONTEXT_CLASS (klass);
- parent_class = CAMEL_CIPHER_CONTEXT_CLASS (camel_type_get_global_classfuncs (camel_cipher_context_get_type ()));
+ parent_class = CAMEL_CIPHER_CONTEXT_CLASS (g_type_class_peek (camel_cipher_context_get_type ()));
cipher_class->hash_to_id = gpg_hash_to_id;
cipher_class->id_to_hash = gpg_id_to_hash;
@@ -1935,12 +1935,12 @@
;
}
-CamelType
+GType
camel_gpg_context_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_cipher_context_get_type (),
"CamelGpgContext",
sizeof (CamelGpgContext),
Modified: branches/camel-gobject/camel/camel-gpg-context.h
==============================================================================
--- branches/camel-gobject/camel/camel-gpg-context.h (original)
+++ branches/camel-gobject/camel/camel-gpg-context.h Mon Nov 10 00:44:12 2008
@@ -27,9 +27,9 @@
#include <camel/camel-cipher-context.h>
#define CAMEL_GPG_CONTEXT_TYPE (camel_gpg_context_get_type ())
-#define CAMEL_GPG_CONTEXT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_GPG_CONTEXT_TYPE, CamelGpgContext))
-#define CAMEL_GPG_CONTEXT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_GPG_CONTEXT_TYPE, CamelGpgContextClass))
-#define CAMEL_IS_GPG_CONTEXT(o) (CAMEL_CHECK_TYPE((o), CAMEL_GPG_CONTEXT_TYPE))
+#define CAMEL_GPG_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_GPG_CONTEXT_TYPE, CamelGpgContext))
+#define CAMEL_GPG_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_GPG_CONTEXT_TYPE, CamelGpgContextClass))
+#define CAMEL_IS_GPG_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_GPG_CONTEXT_TYPE))
G_BEGIN_DECLS
@@ -48,7 +48,7 @@
};
-CamelType camel_gpg_context_get_type (void);
+GType camel_gpg_context_get_type (void);
CamelCipherContext *camel_gpg_context_new (CamelSession *session);
Modified: branches/camel-gobject/camel/camel-html-parser.c
==============================================================================
--- branches/camel-gobject/camel/camel-html-parser.c (original)
+++ branches/camel-gobject/camel/camel-html-parser.c Mon Nov 10 00:44:12 2008
@@ -70,12 +70,12 @@
/* ********************************************************************** */
-CamelType
+GType
camel_html_parser_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_object_get_type (), "CamelHTMLParser",
sizeof (CamelHTMLParser),
sizeof (CamelHTMLParserClass),
@@ -107,7 +107,7 @@
static void
camel_html_parser_class_init (CamelHTMLParserClass *klass)
{
- camel_html_parser_parent = CAMEL_OBJECT_CLASS (camel_type_get_global_classfuncs (camel_object_get_type ()));
+ camel_html_parser_parent = CAMEL_OBJECT_CLASS (g_type_class_peek (camel_object_get_type ()));
tokenise_setup();
}
Modified: branches/camel-gobject/camel/camel-html-parser.h
==============================================================================
--- branches/camel-gobject/camel/camel-html-parser.h (original)
+++ branches/camel-gobject/camel/camel-html-parser.h Mon Nov 10 00:44:12 2008
@@ -30,9 +30,9 @@
#include <camel/camel-object.h>
-#define CAMEL_HTML_PARSER(obj) CAMEL_CHECK_CAST (obj, camel_html_parser_get_type (), CamelHTMLParser)
-#define CAMEL_HTML_PARSER_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_html_parser_get_type (), CamelHTMLParserClass)
-#define CAMEL_IS_HTML_PARSER(obj) CAMEL_CHECK_TYPE (obj, camel_html_parser_get_type ())
+#define CAMEL_HTML_PARSER(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_html_parser_get_type (), CamelHTMLParser)
+#define CAMEL_HTML_PARSER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_html_parser_get_type (), CamelHTMLParserClass)
+#define CAMEL_IS_HTML_PARSER(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_html_parser_get_type ())
G_BEGIN_DECLS
@@ -67,7 +67,7 @@
CamelObjectClass parent_class;
};
-CamelType camel_html_parser_get_type (void);
+GType camel_html_parser_get_type (void);
CamelHTMLParser *camel_html_parser_new (void);
void camel_html_parser_set_data(CamelHTMLParser *hp, const char *start, int len, int last);
Modified: branches/camel-gobject/camel/camel-http-stream.c
==============================================================================
--- branches/camel-gobject/camel/camel-http-stream.c (original)
+++ branches/camel-gobject/camel/camel-http-stream.c Mon Nov 10 00:44:12 2008
@@ -59,7 +59,7 @@
CamelStreamClass *camel_stream_class =
CAMEL_STREAM_CLASS (camel_http_stream_class);
- parent_class = CAMEL_STREAM_CLASS (camel_type_get_global_classfuncs (camel_stream_get_type ()));
+ parent_class = CAMEL_STREAM_CLASS (g_type_class_peek (camel_stream_get_type ()));
/* virtual method overload */
camel_stream_class->read = stream_read;
@@ -92,7 +92,7 @@
CamelHttpStream *http = CAMEL_HTTP_STREAM (object);
if (http->parser)
- camel_object_unref(http->parser);
+ g_object_unref(http->parser);
if (http->content_type)
camel_content_type_unref (http->content_type);
@@ -101,7 +101,7 @@
camel_header_raw_clear (&http->headers);
if (http->session)
- camel_object_unref(http->session);
+ g_object_unref(http->session);
if (http->url)
camel_url_free (http->url);
@@ -113,17 +113,17 @@
g_free (http->authpass);
if (http->raw)
- camel_object_unref(http->raw);
+ g_object_unref(http->raw);
if (http->read)
- camel_object_unref(http->read);
+ g_object_unref(http->read);
}
-CamelType
+GType
camel_http_stream_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_stream_get_type (),
"CamelHttpStream",
sizeof (CamelHttpStream),
@@ -158,7 +158,7 @@
stream->method = method;
stream->session = session;
- camel_object_ref(session);
+ g_object_ref(session);
str = camel_url_to_string (url, 0);
stream->url = camel_url_new (str, NULL);
@@ -202,13 +202,13 @@
ai = camel_getaddrinfo(url->host, serv, &hints, NULL);
if (ai == NULL) {
- camel_object_unref (stream);
+ g_object_unref (stream);
return NULL;
}
if (camel_tcp_stream_connect (CAMEL_TCP_STREAM (stream), ai) == -1) {
errsave = errno;
- camel_object_unref (stream);
+ g_object_unref (stream);
camel_freeaddrinfo(ai);
errno = errsave;
return NULL;
@@ -226,17 +226,17 @@
http_disconnect(CamelHttpStream *http)
{
if (http->raw) {
- camel_object_unref(http->raw);
+ g_object_unref(http->raw);
http->raw = NULL;
}
if (http->read) {
- camel_object_unref(http->read);
+ g_object_unref(http->read);
http->read = NULL;
}
if (http->parser) {
- camel_object_unref(http->parser);
+ g_object_unref(http->parser);
http->parser = NULL;
}
}
@@ -288,7 +288,7 @@
int err;
if (http->parser)
- camel_object_unref (http->parser);
+ g_object_unref (http->parser);
http->parser = camel_mime_parser_new ();
camel_mime_parser_init_with_stream (http->parser, http->read);
@@ -332,7 +332,7 @@
err = camel_mime_parser_errno (http->parser);
if (err != 0) {
- camel_object_unref (http->parser);
+ g_object_unref (http->parser);
http->parser = NULL;
goto exception;
}
Modified: branches/camel-gobject/camel/camel-http-stream.h
==============================================================================
--- branches/camel-gobject/camel/camel-http-stream.h (original)
+++ branches/camel-gobject/camel/camel-http-stream.h Mon Nov 10 00:44:12 2008
@@ -30,9 +30,9 @@
#include <camel/camel-url.h>
#define CAMEL_HTTP_STREAM_TYPE (camel_http_stream_get_type ())
-#define CAMEL_HTTP_STREAM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_HTTP_STREAM_TYPE, CamelHttpStream))
-#define CAMEL_HTTP_STREAM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_HTTP_STREAM_TYPE, CamelHttpStreamClass))
-#define CAMEL_IS_HTTP_STREAM(o) (CAMEL_CHECK_TYPE((o), CAMEL_HTTP_STREAM_TYPE))
+#define CAMEL_HTTP_STREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_HTTP_STREAM_TYPE, CamelHttpStream))
+#define CAMEL_HTTP_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_HTTP_STREAM_TYPE, CamelHttpStreamClass))
+#define CAMEL_IS_HTTP_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_HTTP_STREAM_TYPE))
G_BEGIN_DECLS
@@ -82,7 +82,7 @@
};
/* Standard Camel function */
-CamelType camel_http_stream_get_type (void);
+GType camel_http_stream_get_type (void);
/* public methods */
CamelStream *camel_http_stream_new (CamelHttpMethod method, struct _CamelSession *session, CamelURL *url);
Modified: branches/camel-gobject/camel/camel-index-control.c
==============================================================================
--- branches/camel-gobject/camel/camel-index-control.c (original)
+++ branches/camel-gobject/camel/camel-index-control.c Mon Nov 10 00:44:12 2008
@@ -42,10 +42,10 @@
if (idx) {
printf(" Compressing ...\n");
if (camel_index_compress(idx) == -1) {
- camel_object_unref((CamelObject *)idx);
+ g_object_unref((CamelObject *)idx);
return 1;
}
- camel_object_unref((CamelObject *)idx);
+ g_object_unref((CamelObject *)idx);
} else {
printf(" Failed: %s\n", strerror (errno));
return 1;
@@ -66,7 +66,7 @@
if (idx) {
printf(" Dumping ...\n");
camel_text_index_dump((CamelTextIndex *)idx);
- camel_object_unref((CamelObject *)idx);
+ g_object_unref((CamelObject *)idx);
} else {
printf(" Failed: %s\n", strerror (errno));
return 1;
@@ -86,7 +86,7 @@
idx = (CamelIndex *)camel_text_index_new(argv[i], O_RDONLY);
if (idx) {
camel_text_index_info((CamelTextIndex *)idx);
- camel_object_unref((CamelObject *)idx);
+ g_object_unref((CamelObject *)idx);
} else {
printf(" Failed: %s\n", strerror (errno));
return 0;
@@ -106,7 +106,7 @@
idx = (CamelIndex *)camel_text_index_new(argv[i], O_RDONLY);
if (idx) {
camel_text_index_validate((CamelTextIndex *)idx);
- camel_object_unref((CamelObject *)idx);
+ g_object_unref((CamelObject *)idx);
} else {
printf(" Failed: %s\n", strerror (errno));
return 0;
@@ -176,7 +176,7 @@
null = camel_stream_null_new();
filter = (CamelStream *)camel_stream_filter_new_with_stream(null);
- camel_object_unref((CamelObject *)null);
+ g_object_unref((CamelObject *)null);
filter_index = camel_mime_filter_index_new_index(idx);
camel_stream_filter_add((CamelStreamFilter *)filter, (CamelMimeFilter *)filter_index);
@@ -188,21 +188,21 @@
name = g_strdup_printf("%s/%s", path, d->d_name);
stream = camel_stream_fs_new_with_name(name, O_RDONLY, 0);
camel_stream_write_to_stream(stream, filter);
- camel_object_unref((CamelObject *)stream);
+ g_object_unref((CamelObject *)stream);
g_free(name);
camel_index_write_name(idx, idn);
- camel_object_unref((CamelObject *)idn);
+ g_object_unref((CamelObject *)idn);
camel_mime_filter_index_set_name(filter_index, NULL);
}
closedir(dir);
camel_index_sync(idx);
- camel_object_unref((CamelObject *)idx);
+ g_object_unref((CamelObject *)idx);
- camel_object_unref((CamelObject *)filter);
- camel_object_unref((CamelObject *)filter_index);
+ g_object_unref((CamelObject *)filter);
+ g_object_unref((CamelObject *)filter_index);
return 0;
}
Modified: branches/camel-gobject/camel/camel-index.c
==============================================================================
--- branches/camel-gobject/camel/camel-index.c (original)
+++ branches/camel-gobject/camel/camel-index.c Mon Nov 10 00:44:12 2008
@@ -56,7 +56,7 @@
static void
camel_index_class_init(CamelIndexClass *klass)
{
- camel_index_parent = CAMEL_OBJECT_CLASS(camel_type_get_global_classfuncs(camel_object_get_type()));
+ camel_index_parent = CAMEL_OBJECT_CLASS(g_type_class_peek(camel_object_get_type()));
}
static void
@@ -76,12 +76,12 @@
g_free(idx->priv);
}
-CamelType
+GType
camel_index_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_object_get_type(), "CamelIndex",
sizeof (CamelIndex),
sizeof (CamelIndexClass),
@@ -288,7 +288,7 @@
static void
camel_index_name_class_init(CamelIndexNameClass *klass)
{
- camel_index_name_parent = CAMEL_OBJECT_CLASS(camel_type_get_global_classfuncs(camel_object_get_type()));
+ camel_index_name_parent = CAMEL_OBJECT_CLASS(g_type_class_peek(camel_object_get_type()));
}
static void
@@ -300,15 +300,15 @@
camel_index_name_finalise(CamelIndexName *idn)
{
if (idn->index)
- camel_object_unref((CamelObject *)idn->index);
+ g_object_unref((CamelObject *)idn->index);
}
-CamelType
+GType
camel_index_name_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_object_get_type(), "CamelIndexName",
sizeof (CamelIndexName),
sizeof (CamelIndexNameClass),
@@ -327,7 +327,7 @@
CamelIndexName *idn = (CamelIndexName *)camel_object_new(camel_index_name_get_type());
idn->index = idx;
- camel_object_ref((CamelObject *)idx);
+ g_object_ref((CamelObject *)idx);
return idn;
}
@@ -363,7 +363,7 @@
static void
camel_index_cursor_class_init(CamelIndexCursorClass *klass)
{
- camel_index_cursor_parent = CAMEL_OBJECT_CLASS(camel_type_get_global_classfuncs(camel_object_get_type()));
+ camel_index_cursor_parent = CAMEL_OBJECT_CLASS(g_type_class_peek(camel_object_get_type()));
}
static void
@@ -375,15 +375,15 @@
camel_index_cursor_finalise(CamelIndexCursor *idc)
{
if (idc->index)
- camel_object_unref((CamelObject *)idc->index);
+ g_object_unref((CamelObject *)idc->index);
}
-CamelType
+GType
camel_index_cursor_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_object_get_type(), "CamelIndexCursor",
sizeof (CamelIndexCursor),
sizeof (CamelIndexCursorClass),
@@ -402,7 +402,7 @@
CamelIndexCursor *idc = (CamelIndexCursor *)camel_object_new(camel_index_cursor_get_type());
idc->index = idx;
- camel_object_ref((CamelObject *)idx);
+ g_object_ref((CamelObject *)idx);
return idc;
}
Modified: branches/camel-gobject/camel/camel-index.h
==============================================================================
--- branches/camel-gobject/camel/camel-index.h (original)
+++ branches/camel-gobject/camel/camel-index.h Mon Nov 10 00:44:12 2008
@@ -24,25 +24,25 @@
#include <camel/camel-exception.h>
#include <camel/camel-object.h>
-#define CAMEL_INDEX(obj) CAMEL_CHECK_CAST (obj, camel_index_get_type (), CamelIndex)
-#define CAMEL_INDEX_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_index_get_type (), CamelIndexClass)
-#define CAMEL_IS_INDEX(obj) CAMEL_CHECK_TYPE (obj, camel_index_get_type ())
+#define CAMEL_INDEX(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_index_get_type (), CamelIndex)
+#define CAMEL_INDEX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_index_get_type (), CamelIndexClass)
+#define CAMEL_IS_INDEX(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_index_get_type ())
G_BEGIN_DECLS
typedef struct _CamelIndex CamelIndex;
typedef struct _CamelIndexClass CamelIndexClass;
-#define CAMEL_INDEX_NAME(obj) CAMEL_CHECK_CAST (obj, camel_index_name_get_type (), CamelIndexName)
-#define CAMEL_INDEX_NAME_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_index_name_get_type (), CamelIndexNameClass)
-#define CAMEL_IS_INDEX_NAME(obj) CAMEL_CHECK_TYPE (obj, camel_index_name_get_type ())
+#define CAMEL_INDEX_NAME(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_index_name_get_type (), CamelIndexName)
+#define CAMEL_INDEX_NAME_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_index_name_get_type (), CamelIndexNameClass)
+#define CAMEL_IS_INDEX_NAME(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_index_name_get_type ())
typedef struct _CamelIndexName CamelIndexName;
typedef struct _CamelIndexNameClass CamelIndexNameClass;
-#define CAMEL_INDEX_CURSOR(obj) CAMEL_CHECK_CAST (obj, camel_index_cursor_get_type (), CamelIndexCursor)
-#define CAMEL_INDEX_CURSOR_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_index_cursor_get_type (), CamelIndexCursorClass)
-#define CAMEL_IS_INDEX_CURSOR(obj) CAMEL_CHECK_TYPE (obj, camel_index_cursor_get_type ())
+#define CAMEL_INDEX_CURSOR(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_index_cursor_get_type (), CamelIndexCursor)
+#define CAMEL_INDEX_CURSOR_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_index_cursor_get_type (), CamelIndexCursorClass)
+#define CAMEL_IS_INDEX_CURSOR(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_index_cursor_get_type ())
typedef struct _CamelIndexCursor CamelIndexCursor;
typedef struct _CamelIndexCursorClass CamelIndexCursorClass;
@@ -66,7 +66,7 @@
void (*reset) (CamelIndexCursor *idc);
};
-CamelType camel_index_cursor_get_type(void);
+GType camel_index_cursor_get_type(void);
CamelIndexCursor *camel_index_cursor_new(CamelIndex *idx, const char *name);
@@ -96,7 +96,7 @@
size_t (*add_buffer)(CamelIndexName *name, const char *buffer, size_t len);
};
-CamelType camel_index_name_get_type (void);
+GType camel_index_name_get_type (void);
CamelIndexName *camel_index_name_new(CamelIndex *idx, const char *name);
@@ -142,7 +142,7 @@
/* flags, stored in 'state', set with set_state */
#define CAMEL_INDEX_DELETED (1<<0)
-CamelType camel_index_get_type (void);
+GType camel_index_get_type (void);
CamelIndex *camel_index_new(const char *path, int flags);
void camel_index_construct(CamelIndex *, const char *path, int flags);
Modified: branches/camel-gobject/camel/camel-internet-address.c
==============================================================================
--- branches/camel-gobject/camel/camel-internet-address.c (original)
+++ branches/camel-gobject/camel/camel-internet-address.c Mon Nov 10 00:44:12 2008
@@ -48,7 +48,7 @@
{
CamelAddressClass *address = (CamelAddressClass *) klass;
- camel_internet_address_parent = CAMEL_ADDRESS_CLASS(camel_type_get_global_classfuncs(camel_address_get_type()));
+ camel_internet_address_parent = CAMEL_ADDRESS_CLASS(g_type_class_peek(camel_address_get_type()));
address->decode = internet_decode;
address->encode = internet_encode;
@@ -63,12 +63,12 @@
{
}
-CamelType
+GType
camel_internet_address_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_address_get_type(), "CamelInternetAddress",
sizeof (CamelInternetAddress),
sizeof (CamelInternetAddressClass),
Modified: branches/camel-gobject/camel/camel-internet-address.h
==============================================================================
--- branches/camel-gobject/camel/camel-internet-address.h (original)
+++ branches/camel-gobject/camel/camel-internet-address.h Mon Nov 10 00:44:12 2008
@@ -24,9 +24,9 @@
#include <camel/camel-address.h>
-#define CAMEL_INTERNET_ADDRESS(obj) CAMEL_CHECK_CAST (obj, camel_internet_address_get_type (), CamelInternetAddress)
-#define CAMEL_INTERNET_ADDRESS_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_internet_address_get_type (), CamelInternetAddressClass)
-#define CAMEL_IS_INTERNET_ADDRESS(obj) CAMEL_CHECK_TYPE (obj, camel_internet_address_get_type ())
+#define CAMEL_INTERNET_ADDRESS(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_internet_address_get_type (), CamelInternetAddress)
+#define CAMEL_INTERNET_ADDRESS_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_internet_address_get_type (), CamelInternetAddressClass)
+#define CAMEL_IS_INTERNET_ADDRESS(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_internet_address_get_type ())
G_BEGIN_DECLS
@@ -42,7 +42,7 @@
CamelAddressClass parent_class;
};
-CamelType camel_internet_address_get_type (void);
+GType camel_internet_address_get_type (void);
CamelInternetAddress *camel_internet_address_new (void);
int camel_internet_address_add (CamelInternetAddress *addr, const char *name, const char *address);
Modified: branches/camel-gobject/camel/camel-medium.c
==============================================================================
--- branches/camel-gobject/camel/camel-medium.c (original)
+++ branches/camel-gobject/camel/camel-medium.c Mon Nov 10 00:44:12 2008
@@ -59,7 +59,7 @@
CamelDataWrapperClass *camel_data_wrapper_class =
CAMEL_DATA_WRAPPER_CLASS (camel_medium_class);
- parent_class = CAMEL_DATA_WRAPPER_CLASS (camel_type_get_global_classfuncs (camel_data_wrapper_get_type ()));
+ parent_class = CAMEL_DATA_WRAPPER_CLASS (g_type_class_peek (camel_data_wrapper_get_type ()));
/* virtual method overload */
camel_data_wrapper_class->is_offline = is_offline;
@@ -91,16 +91,16 @@
CamelMedium *medium = CAMEL_MEDIUM (object);
if (medium->content)
- camel_object_unref (medium->content);
+ g_object_unref (medium->content);
}
-CamelType
+GType
camel_medium_get_type (void)
{
- static CamelType camel_medium_type = CAMEL_INVALID_TYPE;
+ static GType camel_medium_type = G_TYPE_INVALID;
- if (camel_medium_type == CAMEL_INVALID_TYPE) {
+ if (camel_medium_type == G_TYPE_INVALID) {
camel_medium_type = camel_type_register (CAMEL_DATA_WRAPPER_TYPE, "medium",
sizeof (CamelMedium),
sizeof (CamelMediumClass),
@@ -123,7 +123,7 @@
static void
add_header (CamelMedium *medium, const char *name, const void *value)
{
- g_warning("No %s::add_header implemented, adding %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), name);
+ g_warning("No %s::add_header implemented, adding %s", G_OBJECT_CLASS_NAME(G_OBJECT_TYPE(medium)), name);
}
@@ -148,7 +148,7 @@
static void
set_header (CamelMedium *medium, const char *name, const void *value)
{
- g_warning("No %s::set_header implemented, setting %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), name);
+ g_warning("No %s::set_header implemented, setting %s", G_OBJECT_CLASS_NAME(G_OBJECT_TYPE(medium)), name);
}
@@ -177,7 +177,7 @@
static void
remove_header(CamelMedium *medium, const char *name)
{
- g_warning("No %s::remove_header implemented, removing %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), name);
+ g_warning("No %s::remove_header implemented, removing %s", G_OBJECT_CLASS_NAME(G_OBJECT_TYPE(medium)), name);
}
@@ -202,7 +202,7 @@
static const void *
get_header(CamelMedium *medium, const char *name)
{
- g_warning("No %s::get_header implemented, getting %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), name);
+ g_warning("No %s::get_header implemented, getting %s", G_OBJECT_CLASS_NAME(G_OBJECT_TYPE(medium)), name);
return NULL;
}
@@ -234,7 +234,7 @@
static GArray *
get_headers(CamelMedium *medium)
{
- g_warning("No %s::get_headers implemented", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)));
+ g_warning("No %s::get_headers implemented", G_OBJECT_CLASS_NAME(G_OBJECT_TYPE(medium)));
return NULL;
}
@@ -261,7 +261,7 @@
static void
free_headers (CamelMedium *medium, GArray *headers)
{
- g_warning("No %s::free_headers implemented", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)));
+ g_warning("No %s::free_headers implemented", G_OBJECT_CLASS_NAME(G_OBJECT_TYPE(medium)));
}
/**
@@ -310,8 +310,8 @@
set_content_object (CamelMedium *medium, CamelDataWrapper *content)
{
if (medium->content)
- camel_object_unref (medium->content);
- camel_object_ref (content);
+ g_object_unref (medium->content);
+ g_object_ref (content);
medium->content = content;
}
Modified: branches/camel-gobject/camel/camel-medium.h
==============================================================================
--- branches/camel-gobject/camel/camel-medium.h (original)
+++ branches/camel-gobject/camel/camel-medium.h Mon Nov 10 00:44:12 2008
@@ -30,9 +30,9 @@
#include <camel/camel-data-wrapper.h>
#define CAMEL_MEDIUM_TYPE (camel_medium_get_type ())
-#define CAMEL_MEDIUM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MEDIUM_TYPE, CamelMedium))
-#define CAMEL_MEDIUM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MEDIUM_TYPE, CamelMediumClass))
-#define CAMEL_IS_MEDIUM(o) (CAMEL_CHECK_TYPE((o), CAMEL_MEDIUM_TYPE))
+#define CAMEL_MEDIUM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_MEDIUM_TYPE, CamelMedium))
+#define CAMEL_MEDIUM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_MEDIUM_TYPE, CamelMediumClass))
+#define CAMEL_IS_MEDIUM(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_MEDIUM_TYPE))
G_BEGIN_DECLS
@@ -68,7 +68,7 @@
} CamelMediumClass;
/* Standard Camel function */
-CamelType camel_medium_get_type (void);
+GType camel_medium_get_type (void);
/* Header get/set interface */
void camel_medium_add_header (CamelMedium *medium, const char *name, const void *value);
Modified: branches/camel-gobject/camel/camel-mime-filter-basic.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-basic.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter-basic.c Mon Nov 10 00:44:12 2008
@@ -42,7 +42,7 @@
{
CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
- camel_mime_filter_basic_parent = CAMEL_MIME_FILTER_CLASS(camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
+ camel_mime_filter_basic_parent = CAMEL_MIME_FILTER_CLASS(g_type_class_peek (camel_mime_filter_get_type ()));
filter_class->reset = reset;
filter_class->filter = filter;
@@ -57,12 +57,12 @@
}
-CamelType
+GType
camel_mime_filter_basic_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_mime_filter_get_type (), "CamelMimeFilterBasic",
sizeof (CamelMimeFilterBasic),
sizeof (CamelMimeFilterBasicClass),
Modified: branches/camel-gobject/camel/camel-mime-filter-basic.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-basic.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter-basic.h Mon Nov 10 00:44:12 2008
@@ -24,9 +24,9 @@
#include <camel/camel-mime-filter.h>
-#define CAMEL_MIME_FILTER_BASIC(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_basic_get_type (), CamelMimeFilterBasic)
-#define CAMEL_MIME_FILTER_BASIC_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_basic_get_type (), CamelMimeFilterBasicClass)
-#define CAMEL_IS_MIME_FILTER_BASIC(obj) CAMEL_CHECK_TYPE (obj, camel_mime_filter_basic_get_type ())
+#define CAMEL_MIME_FILTER_BASIC(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_mime_filter_basic_get_type (), CamelMimeFilterBasic)
+#define CAMEL_MIME_FILTER_BASIC_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_mime_filter_basic_get_type (), CamelMimeFilterBasicClass)
+#define CAMEL_IS_MIME_FILTER_BASIC(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_mime_filter_basic_get_type ())
G_BEGIN_DECLS
@@ -57,7 +57,7 @@
CamelMimeFilterClass parent_class;
};
-CamelType camel_mime_filter_basic_get_type (void);
+GType camel_mime_filter_basic_get_type (void);
CamelMimeFilterBasic *camel_mime_filter_basic_new (void);
CamelMimeFilterBasic *camel_mime_filter_basic_new_type (CamelMimeFilterBasicType type);
Modified: branches/camel-gobject/camel/camel-mime-filter-bestenc.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-bestenc.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter-bestenc.c Mon Nov 10 00:44:12 2008
@@ -33,12 +33,12 @@
static CamelMimeFilterClass *camel_mime_filter_bestenc_parent;
-CamelType
+GType
camel_mime_filter_bestenc_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_mime_filter_get_type (), "CamelMimeFilterBestenc",
sizeof (CamelMimeFilterBestenc),
sizeof (CamelMimeFilterBestencClass),
@@ -180,7 +180,7 @@
{
CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
- camel_mime_filter_bestenc_parent = (CamelMimeFilterClass *)(camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
+ camel_mime_filter_bestenc_parent = (CamelMimeFilterClass *)(g_type_class_peek (camel_mime_filter_get_type ()));
filter_class->reset = reset;
filter_class->filter = filter;
Modified: branches/camel-gobject/camel/camel-mime-filter-bestenc.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-bestenc.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter-bestenc.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-mime-part.h>
#include <camel/camel-charset-map.h>
-#define CAMEL_MIME_FILTER_BESTENC(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_bestenc_get_type (), CamelMimeFilterBestenc)
-#define CAMEL_MIME_FILTER_BESTENC_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_bestenc_get_type (), CamelMimeFilterBestencClass)
-#define CAMEL_IS_MIME_FILTER_BESTENC(obj) CAMEL_CHECK_TYPE (obj, camel_mime_filter_bestenc_get_type ())
+#define CAMEL_MIME_FILTER_BESTENC(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_mime_filter_bestenc_get_type (), CamelMimeFilterBestenc)
+#define CAMEL_MIME_FILTER_BESTENC_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_mime_filter_bestenc_get_type (), CamelMimeFilterBestencClass)
+#define CAMEL_IS_MIME_FILTER_BESTENC(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_mime_filter_bestenc_get_type ())
G_BEGIN_DECLS
@@ -81,7 +81,7 @@
CamelMimeFilterClass parent_class;
};
-CamelType camel_mime_filter_bestenc_get_type (void);
+GType camel_mime_filter_bestenc_get_type (void);
CamelMimeFilterBestenc *camel_mime_filter_bestenc_new (unsigned int flags);
Modified: branches/camel-gobject/camel/camel-mime-filter-canon.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-canon.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter-canon.c Mon Nov 10 00:44:12 2008
@@ -49,12 +49,12 @@
mime_filter_class->reset = reset;
}
-CamelType
+GType
camel_mime_filter_canon_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_mime_filter_get_type(), "CamelMimeFilterCanon",
sizeof (CamelMimeFilterCanon),
sizeof (CamelMimeFilterCanonClass),
Modified: branches/camel-gobject/camel/camel-mime-filter-canon.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-canon.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter-canon.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-mime-filter.h>
#define CAMEL_MIME_FILTER_CANON_TYPE (camel_mime_filter_canon_get_type ())
-#define CAMEL_MIME_FILTER_CANON(obj) CAMEL_CHECK_CAST (obj, CAMEL_MIME_FILTER_CANON_TYPE, CamelMimeFilterCanon)
-#define CAMEL_MIME_FILTER_CANON_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, CAMEL_MIME_FILTER_CANON_TYPE, CamelMimeFilterCanonClass)
-#define CAMEL_IS_MIME_FILTER_CANON(obj) CAMEL_CHECK_TYPE (obj, CAMEL_MIME_FILTER_CANON_TYPE)
+#define CAMEL_MIME_FILTER_CANON(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, CAMEL_MIME_FILTER_CANON_TYPE, CamelMimeFilterCanon)
+#define CAMEL_MIME_FILTER_CANON_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, CAMEL_MIME_FILTER_CANON_TYPE, CamelMimeFilterCanonClass)
+#define CAMEL_IS_MIME_FILTER_CANON(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, CAMEL_MIME_FILTER_CANON_TYPE)
G_BEGIN_DECLS
@@ -51,7 +51,7 @@
CamelMimeFilterClass parent_class;
};
-CamelType camel_mime_filter_canon_get_type (void);
+GType camel_mime_filter_canon_get_type (void);
CamelMimeFilter *camel_mime_filter_canon_new(guint32 flags);
Modified: branches/camel-gobject/camel/camel-mime-filter-charset.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-charset.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter-charset.c Mon Nov 10 00:44:12 2008
@@ -40,12 +40,12 @@
static CamelMimeFilterClass *camel_mime_filter_charset_parent;
-CamelType
+GType
camel_mime_filter_charset_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_mime_filter_get_type (), "CamelMimeFilterCharset",
sizeof (CamelMimeFilterCharset),
sizeof (CamelMimeFilterCharsetClass),
@@ -227,7 +227,7 @@
{
CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
- camel_mime_filter_charset_parent = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
+ camel_mime_filter_charset_parent = CAMEL_MIME_FILTER_CLASS (g_type_class_peek (camel_mime_filter_get_type ()));
filter_class->reset = reset;
filter_class->filter = filter;
@@ -278,7 +278,7 @@
from_charset ? from_charset : "(null)",
to_charset ? to_charset : "(null)",
g_strerror (errno)));
- camel_object_unref (new);
+ g_object_unref (new);
new = NULL;
} else {
new->from = g_strdup (from_charset);
Modified: branches/camel-gobject/camel/camel-mime-filter-charset.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-charset.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter-charset.h Mon Nov 10 00:44:12 2008
@@ -25,9 +25,9 @@
#include <camel/camel-mime-filter.h>
#include <iconv.h>
-#define CAMEL_MIME_FILTER_CHARSET(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_charset_get_type (), CamelMimeFilterCharset)
-#define CAMEL_MIME_FILTER_CHARSET_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_charset_get_type (), CamelMimeFilterCharsetClass)
-#define CAMEL_IS_MIME_FILTER_CHARSET(obj) CAMEL_CHECK_TYPE (obj, camel_mime_filter_charset_get_type ())
+#define CAMEL_MIME_FILTER_CHARSET(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_mime_filter_charset_get_type (), CamelMimeFilterCharset)
+#define CAMEL_MIME_FILTER_CHARSET_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_mime_filter_charset_get_type (), CamelMimeFilterCharsetClass)
+#define CAMEL_IS_MIME_FILTER_CHARSET(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_mime_filter_charset_get_type ())
G_BEGIN_DECLS
@@ -47,7 +47,7 @@
CamelMimeFilterClass parent_class;
};
-CamelType camel_mime_filter_charset_get_type (void);
+GType camel_mime_filter_charset_get_type (void);
CamelMimeFilterCharset *camel_mime_filter_charset_new (void);
CamelMimeFilterCharset *camel_mime_filter_charset_new_convert (const char *from_charset, const char *to_charset);
Modified: branches/camel-gobject/camel/camel-mime-filter-crlf.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-crlf.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter-crlf.c Mon Nov 10 00:44:12 2008
@@ -41,12 +41,12 @@
mime_filter_class->reset = reset;
}
-CamelType
+GType
camel_mime_filter_crlf_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_mime_filter_get_type(), "CamelMimeFilterCRLF",
sizeof (CamelMimeFilterCRLF),
sizeof (CamelMimeFilterCRLFClass),
Modified: branches/camel-gobject/camel/camel-mime-filter-crlf.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-crlf.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter-crlf.h Mon Nov 10 00:44:12 2008
@@ -27,9 +27,9 @@
#include <camel/camel-mime-filter.h>
#define CAMEL_MIME_FILTER_CRLF_TYPE (camel_mime_filter_crlf_get_type ())
-#define CAMEL_MIME_FILTER_CRLF(obj) CAMEL_CHECK_CAST (obj, CAMEL_MIME_FILTER_CRLF_TYPE, CamelMimeFilterCRLF)
-#define CAMEL_MIME_FILTER_CRLF_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, CAMEL_MIME_FILTER_CRLF_TYPE, CamelMimeFilterCRLFClass)
-#define CAMEL_IS_MIME_FILTER_CRLF(obj) CAMEL_CHECK_TYPE (obj, CAMEL_MIME_FILTER_CRLF_TYPE)
+#define CAMEL_MIME_FILTER_CRLF(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, CAMEL_MIME_FILTER_CRLF_TYPE, CamelMimeFilterCRLF)
+#define CAMEL_MIME_FILTER_CRLF_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, CAMEL_MIME_FILTER_CRLF_TYPE, CamelMimeFilterCRLFClass)
+#define CAMEL_IS_MIME_FILTER_CRLF(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, CAMEL_MIME_FILTER_CRLF_TYPE)
G_BEGIN_DECLS
@@ -59,7 +59,7 @@
CamelMimeFilterClass parent_class;
};
-CamelType camel_mime_filter_crlf_get_type (void);
+GType camel_mime_filter_crlf_get_type (void);
CamelMimeFilter *camel_mime_filter_crlf_new (CamelMimeFilterCRLFDirection direction, CamelMimeFilterCRLFMode mode);
Modified: branches/camel-gobject/camel/camel-mime-filter-enriched.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-enriched.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter-enriched.c Mon Nov 10 00:44:12 2008
@@ -108,12 +108,12 @@
static CamelMimeFilterClass *parent_class = NULL;
-CamelType
+GType
camel_mime_filter_enriched_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_mime_filter_get_type (),
"CamelMimeFilterEnriched",
sizeof (CamelMimeFilterEnriched),
@@ -133,7 +133,7 @@
CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
int i;
- parent_class = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
+ parent_class = CAMEL_MIME_FILTER_CLASS (g_type_class_peek (camel_mime_filter_get_type ()));
filter_class->reset = filter_reset;
filter_class->filter = filter_filter;
@@ -609,7 +609,7 @@
camel_mime_filter_complete(filter, (char *)in, strlen(in), 0, &outbuf, &outlen, &outpre);
outbuf = g_strndup (outbuf, outlen);
- camel_object_unref (filter);
+ g_object_unref (filter);
return outbuf;
}
Modified: branches/camel-gobject/camel/camel-mime-filter-enriched.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-enriched.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter-enriched.h Mon Nov 10 00:44:12 2008
@@ -27,9 +27,9 @@
#include <camel/camel-mime-filter.h>
#define CAMEL_TYPE_MIME_FILTER_ENRICHED (camel_mime_filter_enriched_get_type ())
-#define CAMEL_MIME_FILTER_ENRICHED(obj) (CAMEL_CHECK_CAST (obj, CAMEL_TYPE_MIME_FILTER_ENRICHED, CamelMimeFilterEnriched))
-#define CAMEL_MIME_FILTER_ENRICHED_CLASS(klass) (CAMEL_CHECK_CLASS_CAST (klass, CAMEL_TYPE_MIME_FILTER_ENRICHED, CamelMimeFilterEnrichedClass))
-#define CAMEL_IS_MIME_FILTER_ENRICHED(obj) (CAMEL_CHECK_TYPE (obj, CAMEL_TYPE_MIME_FILTER_ENRICHED))
+#define CAMEL_MIME_FILTER_ENRICHED(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, CAMEL_TYPE_MIME_FILTER_ENRICHED, CamelMimeFilterEnriched))
+#define CAMEL_MIME_FILTER_ENRICHED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, CAMEL_TYPE_MIME_FILTER_ENRICHED, CamelMimeFilterEnrichedClass))
+#define CAMEL_IS_MIME_FILTER_ENRICHED(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, CAMEL_TYPE_MIME_FILTER_ENRICHED))
#define CAMEL_MIME_FILTER_ENRICHED_IS_RICHTEXT (1 << 0)
@@ -50,7 +50,7 @@
};
-CamelType camel_mime_filter_enriched_get_type (void);
+GType camel_mime_filter_enriched_get_type (void);
CamelMimeFilter *camel_mime_filter_enriched_new (guint32 flags);
char *camel_enriched_to_html(const char *in, guint32 flags);
Modified: branches/camel-gobject/camel/camel-mime-filter-from.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-from.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter-from.c Mon Nov 10 00:44:12 2008
@@ -35,12 +35,12 @@
static CamelMimeFilterClass *camel_mime_filter_from_parent;
-CamelType
+GType
camel_mime_filter_from_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_mime_filter_get_type (), "CamelMimeFilterFrom",
sizeof (CamelMimeFilterFrom),
sizeof (CamelMimeFilterFromClass),
@@ -157,7 +157,7 @@
{
CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
- camel_mime_filter_from_parent = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
+ camel_mime_filter_from_parent = CAMEL_MIME_FILTER_CLASS (g_type_class_peek (camel_mime_filter_get_type ()));
filter_class->filter = filter;
filter_class->complete = complete;
Modified: branches/camel-gobject/camel/camel-mime-filter-from.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-from.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter-from.h Mon Nov 10 00:44:12 2008
@@ -25,9 +25,9 @@
#include <camel/camel-mime-filter.h>
-#define CAMEL_MIME_FILTER_FROM(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_from_get_type (), CamelMimeFilterFrom)
-#define CAMEL_MIME_FILTER_FROM_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_from_get_type (), CamelMimeFilterFromClass)
-#define CAMEL_IS_MIME_FILTER_FROM(obj) CAMEL_CHECK_TYPE (obj, camel_mime_filter_from_get_type ())
+#define CAMEL_MIME_FILTER_FROM(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_mime_filter_from_get_type (), CamelMimeFilterFrom)
+#define CAMEL_MIME_FILTER_FROM_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_mime_filter_from_get_type (), CamelMimeFilterFromClass)
+#define CAMEL_IS_MIME_FILTER_FROM(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_mime_filter_from_get_type ())
G_BEGIN_DECLS
@@ -44,7 +44,7 @@
CamelMimeFilterClass parent_class;
};
-CamelType camel_mime_filter_from_get_type (void);
+GType camel_mime_filter_from_get_type (void);
CamelMimeFilterFrom *camel_mime_filter_from_new (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/camel-mime-filter-gzip.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-gzip.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter-gzip.c Mon Nov 10 00:44:12 2008
@@ -103,12 +103,12 @@
static CamelMimeFilterClass *parent_class = NULL;
-CamelType
+GType
camel_mime_filter_gzip_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_mime_filter_get_type (),
"CamelMimeFilterGZip",
sizeof (CamelMimeFilterGZip),
@@ -128,7 +128,7 @@
{
CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
- parent_class = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
+ parent_class = CAMEL_MIME_FILTER_CLASS (g_type_class_peek (camel_mime_filter_get_type ()));
filter_class->reset = filter_reset;
filter_class->filter = filter_filter;
@@ -458,7 +458,7 @@
retval = inflateInit2 (new->priv->stream, -MAX_WBITS);
if (retval != Z_OK) {
- camel_object_unref (new);
+ g_object_unref (new);
return NULL;
}
Modified: branches/camel-gobject/camel/camel-mime-filter-gzip.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-gzip.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter-gzip.h Mon Nov 10 00:44:12 2008
@@ -27,10 +27,10 @@
#include <camel/camel-mime-filter.h>
#define CAMEL_TYPE_MIME_FILTER_GZIP (camel_mime_filter_gzip_get_type ())
-#define CAMEL_MIME_FILTER_GZIP(obj) (CAMEL_CHECK_CAST ((obj), CAMEL_TYPE_MIME_FILTER_GZIP, CamelMimeFilterGZip))
-#define CAMEL_MIME_FILTER_GZIP_CLASS(klass) (CAMEL_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_MIME_FILTER_GZIP, CamelMimeFilterGZipClass))
-#define CAMEL_IS_MIME_FILTER_GZIP(obj) (CAMEL_CHECK_TYPE ((obj), CAMEL_TYPE_MIME_FILTER_GZIP))
-#define CAMEL_IS_MIME_FILTER_GZIP_CLASS(klass) (CAMEL_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_MIME_FILTER_GZIP))
+#define CAMEL_MIME_FILTER_GZIP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMEL_TYPE_MIME_FILTER_GZIP, CamelMimeFilterGZip))
+#define CAMEL_MIME_FILTER_GZIP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_MIME_FILTER_GZIP, CamelMimeFilterGZipClass))
+#define CAMEL_IS_MIME_FILTER_GZIP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMEL_TYPE_MIME_FILTER_GZIP))
+#define CAMEL_IS_MIME_FILTER_GZIP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_MIME_FILTER_GZIP))
#define CAMEL_MIME_FILTER_GZIP_GET_CLASS(obj) (CAMEL_CHECK_GET_CLASS ((obj), CAMEL_TYPE_MIME_FILTER_GZIP, CamelMimeFilterGZipClass))
G_BEGIN_DECLS
@@ -58,7 +58,7 @@
};
-CamelType camel_mime_filter_gzip_get_type (void);
+GType camel_mime_filter_gzip_get_type (void);
CamelMimeFilter *camel_mime_filter_gzip_new (CamelMimeFilterGZipMode mode, int level);
Modified: branches/camel-gobject/camel/camel-mime-filter-html.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-html.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter-html.c Mon Nov 10 00:44:12 2008
@@ -73,12 +73,12 @@
/* ********************************************************************** */
-CamelType
+GType
camel_mime_filter_html_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_mime_filter_get_type (), "CamelMimeFilterHTML",
sizeof (CamelMimeFilterHTML),
sizeof (CamelMimeFilterHTMLClass),
@@ -96,7 +96,7 @@
{
CamelMimeFilterHTML *f = (CamelMimeFilterHTML *)o;
- camel_object_unref((CamelObject *)f->priv->ctxt);
+ g_object_unref((CamelObject *)f->priv->ctxt);
g_free(f->priv);
}
@@ -168,7 +168,7 @@
{
CamelMimeFilterHTML *f = (CamelMimeFilterHTML *)mf;
- camel_object_unref((CamelObject *)f->priv->ctxt);
+ g_object_unref((CamelObject *)f->priv->ctxt);
f->priv->ctxt = camel_html_parser_new();
}
@@ -177,7 +177,7 @@
{
CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
- camel_mime_filter_html_parent = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
+ camel_mime_filter_html_parent = CAMEL_MIME_FILTER_CLASS (g_type_class_peek (camel_mime_filter_get_type ()));
filter_class->reset = reset;
filter_class->filter = filter;
Modified: branches/camel-gobject/camel/camel-mime-filter-html.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-html.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter-html.h Mon Nov 10 00:44:12 2008
@@ -25,9 +25,9 @@
#include <camel/camel-mime-filter.h>
-#define CAMEL_MIME_FILTER_HTML(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_html_get_type (), CamelMimeFilterHTML)
-#define CAMEL_MIME_FILTER_HTML_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_html_get_type (), CamelMimeFilterHTMLClass)
-#define CAMEL_IS_MIME_FILTER_HTML(obj) CAMEL_CHECK_TYPE (obj, camel_mime_filter_html_get_type ())
+#define CAMEL_MIME_FILTER_HTML(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_mime_filter_html_get_type (), CamelMimeFilterHTML)
+#define CAMEL_MIME_FILTER_HTML_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_mime_filter_html_get_type (), CamelMimeFilterHTMLClass)
+#define CAMEL_IS_MIME_FILTER_HTML(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_mime_filter_html_get_type ())
G_BEGIN_DECLS
@@ -44,7 +44,7 @@
CamelMimeFilterClass parent_class;
};
-CamelType camel_mime_filter_html_get_type (void);
+GType camel_mime_filter_html_get_type (void);
CamelMimeFilterHTML *camel_mime_filter_html_new (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/camel-mime-filter-index.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-index.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter-index.c Mon Nov 10 00:44:12 2008
@@ -26,12 +26,12 @@
static CamelMimeFilterClass *camel_mime_filter_index_parent;
-CamelType
+GType
camel_mime_filter_index_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_mime_filter_get_type (), "CamelMimeFilterIndex",
sizeof (CamelMimeFilterIndex),
sizeof (CamelMimeFilterIndexClass),
@@ -50,8 +50,8 @@
CamelMimeFilterIndex *f = (CamelMimeFilterIndex *)o;
if (f->name)
- camel_object_unref((CamelObject *)f->name);
- camel_object_unref((CamelObject *)f->index);
+ g_object_unref((CamelObject *)f->name);
+ g_object_unref((CamelObject *)f->index);
}
static void
@@ -94,7 +94,7 @@
{
CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
- camel_mime_filter_index_parent = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
+ camel_mime_filter_index_parent = CAMEL_MIME_FILTER_CLASS (g_type_class_peek (camel_mime_filter_get_type ()));
/*filter_class->reset = reset;*/
filter_class->filter = filter;
@@ -132,7 +132,7 @@
if (new) {
new->index = index;
if (index)
- camel_object_ref (index);
+ g_object_ref (index);
}
return new;
}
@@ -151,10 +151,10 @@
camel_mime_filter_index_set_name (CamelMimeFilterIndex *filter, CamelIndexName *name)
{
if (filter->name)
- camel_object_unref (filter->name);
+ g_object_unref (filter->name);
filter->name = name;
if (name)
- camel_object_ref (name);
+ g_object_ref (name);
}
@@ -173,10 +173,10 @@
size_t outlen, outspace;
camel_mime_filter_complete((CamelMimeFilter *)filter, "", 0, 0, &out, &outlen, &outspace);
- camel_object_unref (index);
+ g_object_unref (index);
}
filter->index = index;
if (index)
- camel_object_ref (index);
+ g_object_ref (index);
}
Modified: branches/camel-gobject/camel/camel-mime-filter-index.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-index.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter-index.h Mon Nov 10 00:44:12 2008
@@ -25,9 +25,9 @@
#include <camel/camel-mime-filter.h>
-#define CAMEL_MIME_FILTER_INDEX(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_index_get_type (), CamelMimeFilterIndex)
-#define CAMEL_MIME_FILTER_INDEX_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_index_get_type (), CamelMimeFilterIndexClass)
-#define CAMEL_IS_MIME_FILTER_INDEX(obj) CAMEL_CHECK_TYPE (obj, camel_mime_filter_index_get_type ())
+#define CAMEL_MIME_FILTER_INDEX(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_mime_filter_index_get_type (), CamelMimeFilterIndex)
+#define CAMEL_MIME_FILTER_INDEX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_mime_filter_index_get_type (), CamelMimeFilterIndexClass)
+#define CAMEL_IS_MIME_FILTER_INDEX(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_mime_filter_index_get_type ())
G_BEGIN_DECLS
@@ -46,7 +46,7 @@
CamelMimeFilterClass parent_class;
};
-CamelType camel_mime_filter_index_get_type (void);
+GType camel_mime_filter_index_get_type (void);
CamelMimeFilterIndex *camel_mime_filter_index_new (void);
CamelMimeFilterIndex *camel_mime_filter_index_new_index(struct _CamelIndex *index);
Modified: branches/camel-gobject/camel/camel-mime-filter-linewrap.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-linewrap.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter-linewrap.c Mon Nov 10 00:44:12 2008
@@ -48,12 +48,12 @@
mime_filter_class->reset = reset;
}
-CamelType
+GType
camel_mime_filter_linewrap_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_mime_filter_get_type(), "CamelMimeFilterLinewrap",
sizeof (CamelMimeFilterLinewrap),
sizeof (CamelMimeFilterLinewrapClass),
Modified: branches/camel-gobject/camel/camel-mime-filter-linewrap.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-linewrap.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter-linewrap.h Mon Nov 10 00:44:12 2008
@@ -25,9 +25,9 @@
#include <camel/camel-mime-filter.h>
#define CAMEL_MIME_FILTER_LINEWRAP_TYPE (camel_mime_filter_linewrap_get_type ())
-#define CAMEL_MIME_FILTER_LINEWRAP(obj) CAMEL_CHECK_CAST (obj, CAMEL_MIME_FILTER_LINEWRAP_TYPE, CamelMimeFilterLinewrap)
-#define CAMEL_MIME_FILTER_LINEWRAP_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, CAMEL_MIME_FILTER_LINEWRAP_TYPE, CamelMimeFilterLinewrapClass)
-#define CAMEL_IS_MIME_FILTER_LINEWRAP(obj) CAMEL_CHECK_TYPE (obj, CAMEL_MIME_FILTER_LINEWRAP_TYPE)
+#define CAMEL_MIME_FILTER_LINEWRAP(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, CAMEL_MIME_FILTER_LINEWRAP_TYPE, CamelMimeFilterLinewrap)
+#define CAMEL_MIME_FILTER_LINEWRAP_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, CAMEL_MIME_FILTER_LINEWRAP_TYPE, CamelMimeFilterLinewrapClass)
+#define CAMEL_IS_MIME_FILTER_LINEWRAP(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, CAMEL_MIME_FILTER_LINEWRAP_TYPE)
G_BEGIN_DECLS
@@ -46,7 +46,7 @@
CamelMimeFilterClass parent_class;
};
-CamelType camel_mime_filter_linewrap_get_type (void);
+GType camel_mime_filter_linewrap_get_type (void);
CamelMimeFilter *camel_mime_filter_linewrap_new (guint preferred_len, guint max_len, char indent_char);
Modified: branches/camel-gobject/camel/camel-mime-filter-pgp.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-pgp.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter-pgp.c Mon Nov 10 00:44:12 2008
@@ -56,12 +56,12 @@
mime_filter_class->reset = reset;
}
-CamelType
+GType
camel_mime_filter_pgp_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_mime_filter_get_type (),
"CamelMimeFilterPgp",
sizeof (CamelMimeFilterPgp),
Modified: branches/camel-gobject/camel/camel-mime-filter-pgp.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-pgp.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter-pgp.h Mon Nov 10 00:44:12 2008
@@ -25,9 +25,9 @@
#include <camel/camel-mime-filter.h>
#define CAMEL_MIME_FILTER_PGP_TYPE (camel_mime_filter_canon_get_type ())
-#define CAMEL_MIME_FILTER_PGP(obj) CAMEL_CHECK_CAST (obj, CAMEL_MIME_FILTER_PGP_TYPE, CamelMimeFilterPgp)
-#define CAMEL_MIME_FILTER_PGP_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, CAMEL_MIME_FILTER_PGP_TYPE, CamelMimeFilterPgpClass)
-#define CAMEL_IS_MIME_FILTER_PGP(obj) CAMEL_CHECK_TYPE (obj, CAMEL_MIME_FILTER_PGP_TYPE)
+#define CAMEL_MIME_FILTER_PGP(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, CAMEL_MIME_FILTER_PGP_TYPE, CamelMimeFilterPgp)
+#define CAMEL_MIME_FILTER_PGP_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, CAMEL_MIME_FILTER_PGP_TYPE, CamelMimeFilterPgpClass)
+#define CAMEL_IS_MIME_FILTER_PGP(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, CAMEL_MIME_FILTER_PGP_TYPE)
G_BEGIN_DECLS
@@ -40,7 +40,7 @@
CamelMimeFilterClass parent_class;
} CamelMimeFilterPgpClass;
-CamelType camel_mime_filter_pgp_get_type (void);
+GType camel_mime_filter_pgp_get_type (void);
CamelMimeFilter *camel_mime_filter_pgp_new(void);
Modified: branches/camel-gobject/camel/camel-mime-filter-progress.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-progress.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter-progress.c Mon Nov 10 00:44:12 2008
@@ -39,12 +39,12 @@
static CamelMimeFilterClass *parent_class = NULL;
-CamelType
+GType
camel_mime_filter_progress_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_mime_filter_get_type (),
"CamelMimeFilterProgress",
sizeof (CamelMimeFilterProgress),
@@ -113,7 +113,7 @@
{
CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
- parent_class = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
+ parent_class = CAMEL_MIME_FILTER_CLASS (g_type_class_peek (camel_mime_filter_get_type ()));
filter_class->reset = filter_reset;
filter_class->filter = filter_filter;
Modified: branches/camel-gobject/camel/camel-mime-filter-progress.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-progress.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter-progress.h Mon Nov 10 00:44:12 2008
@@ -27,9 +27,9 @@
#include <camel/camel-operation.h>
#include <camel/camel-mime-filter.h>
-#define CAMEL_MIME_FILTER_PROGRESS(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_progress_get_type (), CamelMimeFilterProgress)
-#define CAMEL_MIME_FILTER_PROGRESS_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_progress_get_type (), CamelMimeFilterProgressClass)
-#define CAMEL_IS_MIME_FILTER_PROGRESS(obj) CAMEL_CHECK_TYPE (obj, camel_mime_filter_progress_get_type ())
+#define CAMEL_MIME_FILTER_PROGRESS(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_mime_filter_progress_get_type (), CamelMimeFilterProgress)
+#define CAMEL_MIME_FILTER_PROGRESS_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_mime_filter_progress_get_type (), CamelMimeFilterProgressClass)
+#define CAMEL_IS_MIME_FILTER_PROGRESS(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_mime_filter_progress_get_type ())
G_BEGIN_DECLS
@@ -50,7 +50,7 @@
};
-CamelType camel_mime_filter_progress_get_type (void);
+GType camel_mime_filter_progress_get_type (void);
CamelMimeFilter *camel_mime_filter_progress_new (CamelOperation *operation, size_t total);
Modified: branches/camel-gobject/camel/camel-mime-filter-save.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-save.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter-save.c Mon Nov 10 00:44:12 2008
@@ -47,12 +47,12 @@
mime_filter_class->reset = reset;
}
-CamelType
+GType
camel_mime_filter_save_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_mime_filter_get_type(), "CamelMimeFilterSave",
sizeof (CamelMimeFilterSave),
sizeof (CamelMimeFilterSaveClass),
@@ -127,7 +127,7 @@
CamelMimeFilterSave *save = CAMEL_MIME_FILTER_SAVE (camel_object_new (CAMEL_MIME_FILTER_SAVE_TYPE));
save->stream = stream;
- camel_object_ref (stream);
+ g_object_ref (stream);
return (CamelMimeFilter *) save;
}
Modified: branches/camel-gobject/camel/camel-mime-filter-save.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-save.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter-save.h Mon Nov 10 00:44:12 2008
@@ -28,9 +28,9 @@
#include <camel/camel-seekable-stream.h>
#define CAMEL_MIME_FILTER_SAVE_TYPE (camel_mime_filter_save_get_type ())
-#define CAMEL_MIME_FILTER_SAVE(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_save_get_type (), CamelMimeFilterSave)
-#define CAMEL_MIME_FILTER_SAVE_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_save_get_type (), CamelMimeFilterSaveClass)
-#define CAMEL_IS_MIME_FILTER_SAVE(obj) CAMEL_CHECK_TYPE (obj, camel_mime_filter_save_get_type ())
+#define CAMEL_MIME_FILTER_SAVE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_mime_filter_save_get_type (), CamelMimeFilterSave)
+#define CAMEL_MIME_FILTER_SAVE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_mime_filter_save_get_type (), CamelMimeFilterSaveClass)
+#define CAMEL_IS_MIME_FILTER_SAVE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_mime_filter_save_get_type ())
G_BEGIN_DECLS
@@ -46,7 +46,7 @@
CamelMimeFilterClass parent_class;
};
-CamelType camel_mime_filter_save_get_type (void);
+GType camel_mime_filter_save_get_type (void);
CamelMimeFilter *camel_mime_filter_save_new (void);
CamelMimeFilter *camel_mime_filter_save_new_with_stream (CamelStream *stream);
Modified: branches/camel-gobject/camel/camel-mime-filter-tohtml.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-tohtml.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter-tohtml.c Mon Nov 10 00:44:12 2008
@@ -78,12 +78,12 @@
static CamelMimeFilterClass *camel_mime_filter_tohtml_parent;
-CamelType
+GType
camel_mime_filter_tohtml_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_mime_filter_get_type (),
"CamelMimeFilterToHTML",
sizeof (CamelMimeFilterToHTML),
@@ -413,7 +413,7 @@
{
CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
- camel_mime_filter_tohtml_parent = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
+ camel_mime_filter_tohtml_parent = CAMEL_MIME_FILTER_CLASS (g_type_class_peek (camel_mime_filter_get_type ()));
filter_class->reset = filter_reset;
filter_class->filter = filter_filter;
@@ -478,7 +478,7 @@
outbuf = g_strndup (outbuf, outlen);
- camel_object_unref (filter);
+ g_object_unref (filter);
return outbuf;
}
Modified: branches/camel-gobject/camel/camel-mime-filter-tohtml.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-tohtml.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter-tohtml.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-mime-filter.h>
-#define CAMEL_MIME_FILTER_TOHTML(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_tohtml_get_type (), CamelMimeFilterToHTML)
-#define CAMEL_MIME_FILTER_TOHTML_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_tohtml_get_type (), CamelMimeFilterToHTMLClass)
-#define CAMEL_IS_MIME_FILTER_TOHTML(obj) CAMEL_CHECK_TYPE (obj, camel_mime_filter_tohtml_get_type ())
+#define CAMEL_MIME_FILTER_TOHTML(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_mime_filter_tohtml_get_type (), CamelMimeFilterToHTML)
+#define CAMEL_MIME_FILTER_TOHTML_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_mime_filter_tohtml_get_type (), CamelMimeFilterToHTMLClass)
+#define CAMEL_IS_MIME_FILTER_TOHTML(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_mime_filter_tohtml_get_type ())
#define CAMEL_MIME_FILTER_TOHTML_PRE (1 << 0)
#define CAMEL_MIME_FILTER_TOHTML_CONVERT_NL (1 << 1)
@@ -63,7 +63,7 @@
};
-CamelType camel_mime_filter_tohtml_get_type (void);
+GType camel_mime_filter_tohtml_get_type (void);
CamelMimeFilter *camel_mime_filter_tohtml_new (guint32 flags, guint32 colour);
Modified: branches/camel-gobject/camel/camel-mime-filter-windows.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-windows.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter-windows.c Mon Nov 10 00:44:12 2008
@@ -41,12 +41,12 @@
static CamelMimeFilterClass *parent_class = NULL;
-CamelType
+GType
camel_mime_filter_windows_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_mime_filter_get_type (),
"CamelMimeFilterWindows",
sizeof (CamelMimeFilterWindows),
@@ -126,7 +126,7 @@
{
CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
- parent_class = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
+ parent_class = CAMEL_MIME_FILTER_CLASS (g_type_class_peek (camel_mime_filter_get_type ()));
filter_class->reset = filter_reset;
filter_class->filter = filter_filter;
Modified: branches/camel-gobject/camel/camel-mime-filter-windows.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-windows.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter-windows.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-mime-filter.h>
-#define CAMEL_MIME_FILTER_WINDOWS(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_windows_get_type (), CamelMimeFilterWindows)
-#define CAMEL_MIME_FILTER_WINDOWS_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_windows_get_type (), CamelMimeFilterWindowsClass)
-#define CAMEL_IS_MIME_FILTER_WINDOWS(obj) CAMEL_CHECK_TYPE (obj, camel_mime_filter_windows_get_type ())
+#define CAMEL_MIME_FILTER_WINDOWS(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_mime_filter_windows_get_type (), CamelMimeFilterWindows)
+#define CAMEL_MIME_FILTER_WINDOWS_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_mime_filter_windows_get_type (), CamelMimeFilterWindowsClass)
+#define CAMEL_IS_MIME_FILTER_WINDOWS(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_mime_filter_windows_get_type ())
G_BEGIN_DECLS
@@ -48,7 +48,7 @@
};
-CamelType camel_mime_filter_windows_get_type (void);
+GType camel_mime_filter_windows_get_type (void);
CamelMimeFilter *camel_mime_filter_windows_new (const char *claimed_charset);
Modified: branches/camel-gobject/camel/camel-mime-filter-yenc.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-yenc.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter-yenc.c Mon Nov 10 00:44:12 2008
@@ -42,12 +42,12 @@
static CamelMimeFilterClass *parent_class = NULL;
-CamelType
+GType
camel_mime_filter_yenc_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_mime_filter_get_type (),
"CamelMimeFilterYenc",
sizeof (CamelMimeFilterYenc),
@@ -67,7 +67,7 @@
{
CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
- parent_class = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
+ parent_class = CAMEL_MIME_FILTER_CLASS (g_type_class_peek (camel_mime_filter_get_type ()));
filter_class->reset = filter_reset;
filter_class->filter = filter_filter;
Modified: branches/camel-gobject/camel/camel-mime-filter-yenc.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter-yenc.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter-yenc.h Mon Nov 10 00:44:12 2008
@@ -27,10 +27,10 @@
#include <camel/camel-mime-filter.h>
#define CAMEL_TYPE_MIME_FILTER_YENC (camel_mime_filter_yenc_get_type ())
-#define CAMEL_MIME_FILTER_YENC(obj) (CAMEL_CHECK_CAST ((obj), CAMEL_TYPE_MIME_FILTER_YENC, CamelMimeFilterYenc))
-#define CAMEL_MIME_FILTER_YENC_CLASS(klass) (CAMEL_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_MIME_FILTER_YENC, CamelMimeFilterYencClass))
-#define CAMEL_IS_MIME_FILTER_YENC(obj) (CAMEL_CHECK_TYPE ((obj), CAMEL_TYPE_MIME_FILTER_YENC))
-#define CAMEL_IS_MIME_FILTER_YENC_CLASS(klass) (CAMEL_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_MIME_FILTER_YENC))
+#define CAMEL_MIME_FILTER_YENC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMEL_TYPE_MIME_FILTER_YENC, CamelMimeFilterYenc))
+#define CAMEL_MIME_FILTER_YENC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_MIME_FILTER_YENC, CamelMimeFilterYencClass))
+#define CAMEL_IS_MIME_FILTER_YENC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMEL_TYPE_MIME_FILTER_YENC))
+#define CAMEL_IS_MIME_FILTER_YENC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_MIME_FILTER_YENC))
#define CAMEL_MIME_FILTER_YENC_GET_CLASS(obj) (CAMEL_CHECK_GET_CLASS ((obj), CAMEL_TYPE_MIME_FILTER_YENC, CamelMimeFilterYencClass))
G_BEGIN_DECLS
@@ -80,7 +80,7 @@
};
-CamelType camel_mime_filter_yenc_get_type (void);
+GType camel_mime_filter_yenc_get_type (void);
CamelMimeFilter *camel_mime_filter_yenc_new (CamelMimeFilterYencDirection direction);
Modified: branches/camel-gobject/camel/camel-mime-filter.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter.c (original)
+++ branches/camel-gobject/camel/camel-mime-filter.c Mon Nov 10 00:44:12 2008
@@ -48,7 +48,7 @@
static void
camel_mime_filter_class_init (CamelMimeFilterClass *klass)
{
- camel_mime_filter_parent = camel_type_get_global_classfuncs (camel_object_get_type ());
+ camel_mime_filter_parent = g_type_class_peek (camel_object_get_type ());
klass->complete = complete;
}
@@ -79,13 +79,13 @@
g_free(p);
}
-CamelType
+GType
camel_mime_filter_get_type (void)
{
- static CamelType camel_mime_filter_type = CAMEL_INVALID_TYPE;
+ static GType camel_mime_filter_type = G_TYPE_INVALID;
- if (camel_mime_filter_type == CAMEL_INVALID_TYPE) {
- camel_mime_filter_type = camel_type_register (CAMEL_OBJECT_TYPE, "CamelMimeFilter",
+ if (camel_mime_filter_type == G_TYPE_INVALID) {
+ camel_mime_filter_type = camel_type_register (CAMEL_TYPE_OBJECT, "CamelMimeFilter",
sizeof (CamelMimeFilter),
sizeof (CamelMimeFilterClass),
(CamelObjectClassInitFunc) camel_mime_filter_class_init,
Modified: branches/camel-gobject/camel/camel-mime-filter.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-filter.h (original)
+++ branches/camel-gobject/camel/camel-mime-filter.h Mon Nov 10 00:44:12 2008
@@ -28,9 +28,9 @@
#include <camel/camel-object.h>
#define CAMEL_MIME_FILTER_TYPE (camel_mime_filter_get_type ())
-#define CAMEL_MIME_FILTER(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_get_type (), CamelMimeFilter)
-#define CAMEL_MIME_FILTER_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_get_type (), CamelMimeFilterClass)
-#define CAMEL_IS_MIME_FILTER(obj) CAMEL_CHECK_TYPE (obj, camel_mime_filter_get_type ())
+#define CAMEL_MIME_FILTER(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_mime_filter_get_type (), CamelMimeFilter)
+#define CAMEL_MIME_FILTER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_mime_filter_get_type (), CamelMimeFilterClass)
+#define CAMEL_IS_MIME_FILTER(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_mime_filter_get_type ())
G_BEGIN_DECLS
@@ -65,7 +65,7 @@
void (*reset)(CamelMimeFilter *f);
};
-CamelType camel_mime_filter_get_type (void);
+GType camel_mime_filter_get_type (void);
CamelMimeFilter *camel_mime_filter_new (void);
void camel_mime_filter_filter(CamelMimeFilter *filter,
Modified: branches/camel-gobject/camel/camel-mime-message.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-message.c (original)
+++ branches/camel-gobject/camel/camel-mime-message.c Mon Nov 10 00:44:12 2008
@@ -108,7 +108,7 @@
CamelMediumClass *camel_medium_class = CAMEL_MEDIUM_CLASS (camel_mime_message_class);
int i;
- parent_class = CAMEL_MIME_PART_CLASS (camel_type_get_global_classfuncs (camel_mime_part_get_type ()));
+ parent_class = CAMEL_MIME_PART_CLASS (g_type_class_peek (camel_mime_part_get_type ()));
header_name_table = g_hash_table_new (camel_strcase_hash, camel_strcase_equal);
for (i = 0;header_names[i]; i++)
@@ -156,21 +156,21 @@
g_free (message->message_id);
if (message->reply_to)
- camel_object_unref ((CamelObject *)message->reply_to);
+ g_object_unref ((CamelObject *)message->reply_to);
if (message->from)
- camel_object_unref ((CamelObject *)message->from);
+ g_object_unref ((CamelObject *)message->from);
g_hash_table_foreach (message->recipients, unref_recipient, NULL);
g_hash_table_destroy (message->recipients);
}
-CamelType
+GType
camel_mime_message_get_type (void)
{
- static CamelType camel_mime_message_type = CAMEL_INVALID_TYPE;
+ static GType camel_mime_message_type = G_TYPE_INVALID;
- if (camel_mime_message_type == CAMEL_INVALID_TYPE) {
+ if (camel_mime_message_type == G_TYPE_INVALID) {
camel_mime_message_type = camel_type_register (camel_mime_part_get_type(), "CamelMimeMessage",
sizeof (CamelMimeMessage),
sizeof (CamelMimeMessageClass),
@@ -186,7 +186,7 @@
static void
unref_recipient (gpointer key, gpointer value, gpointer user_data)
{
- camel_object_unref (value);
+ g_object_unref (value);
}
@@ -353,7 +353,7 @@
g_assert(msg);
if (msg->reply_to) {
- camel_object_unref ((CamelObject *)msg->reply_to);
+ g_object_unref ((CamelObject *)msg->reply_to);
msg->reply_to = NULL;
}
@@ -455,7 +455,7 @@
g_assert(msg);
if (msg->from) {
- camel_object_unref((CamelObject *)msg->from);
+ g_object_unref((CamelObject *)msg->from);
msg->from = NULL;
}
@@ -668,10 +668,10 @@
addr = camel_internet_address_new();
unfolded = camel_header_unfold (value);
if (camel_address_decode ((CamelAddress *) addr, unfolded) <= 0) {
- camel_object_unref(addr);
+ g_object_unref(addr);
} else {
if (message->from)
- camel_object_unref(message->from);
+ g_object_unref(message->from);
message->from = addr;
}
g_free (unfolded);
@@ -680,10 +680,10 @@
addr = camel_internet_address_new();
unfolded = camel_header_unfold (value);
if (camel_address_decode ((CamelAddress *) addr, unfolded) <= 0) {
- camel_object_unref(addr);
+ g_object_unref(addr);
} else {
if (message->reply_to)
- camel_object_unref(message->reply_to);
+ g_object_unref(message->reply_to);
message->reply_to = addr;
}
g_free (unfolded);
@@ -898,7 +898,7 @@
camel_stream_filter_remove (filter, idb);
if (idc != -1) {
camel_stream_filter_remove (filter, idc);
- camel_object_unref (charenc);
+ g_object_unref (charenc);
charenc = NULL;
}
@@ -934,15 +934,15 @@
/* and write it to the new stream */
camel_data_wrapper_write_to_stream (content, (CamelStream *)filter);
- camel_object_unref (charenc);
+ g_object_unref (charenc);
}
}
encoding = camel_mime_filter_bestenc_get_best_encoding (bestenc, enctype);
- camel_object_unref (filter);
- camel_object_unref (bestenc);
- camel_object_unref (null);
+ g_object_unref (filter);
+ g_object_unref (bestenc);
+ g_object_unref (null);
d(printf("done, best encoding = %d\n", encoding));
@@ -1061,7 +1061,7 @@
found = content_id && !strcmp (content_id, check->content_id) ? TRUE : FALSE;
if (found) {
check->part = part;
- camel_object_ref (part);
+ g_object_ref (part);
}
return !found;
Modified: branches/camel-gobject/camel/camel-mime-message.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-message.h (original)
+++ branches/camel-gobject/camel/camel-mime-message.h Mon Nov 10 00:44:12 2008
@@ -39,9 +39,9 @@
#define CAMEL_RECIPIENT_TYPE_RESENT_BCC "Resent-Bcc"
#define CAMEL_MIME_MESSAGE_TYPE (camel_mime_message_get_type ())
-#define CAMEL_MIME_MESSAGE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MIME_MESSAGE_TYPE, CamelMimeMessage))
-#define CAMEL_MIME_MESSAGE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MIME_MESSAGE_TYPE, CamelMimeMessageClass))
-#define CAMEL_IS_MIME_MESSAGE(o) (CAMEL_CHECK_TYPE((o), CAMEL_MIME_MESSAGE_TYPE))
+#define CAMEL_MIME_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_MIME_MESSAGE_TYPE, CamelMimeMessage))
+#define CAMEL_MIME_MESSAGE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_MIME_MESSAGE_TYPE, CamelMimeMessageClass))
+#define CAMEL_IS_MIME_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_MIME_MESSAGE_TYPE))
/* specify local time */
#define CAMEL_MESSAGE_DATE_CURRENT (~0)
@@ -80,7 +80,7 @@
/* Standard Camel function */
-CamelType camel_mime_message_get_type (void);
+GType camel_mime_message_get_type (void);
/* public methods */
Modified: branches/camel-gobject/camel/camel-mime-parser.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-parser.c (original)
+++ branches/camel-gobject/camel/camel-mime-parser.c Mon Nov 10 00:44:12 2008
@@ -193,7 +193,7 @@
static void
camel_mime_parser_class_init (CamelMimeParserClass *klass)
{
- camel_mime_parser_parent = camel_type_get_global_classfuncs (camel_object_get_type ());
+ camel_mime_parser_parent = g_type_class_peek (camel_object_get_type ());
}
static void
@@ -215,12 +215,12 @@
folder_scan_close(s);
}
-CamelType
+GType
camel_mime_parser_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_object_get_type (), "CamelMimeParser",
sizeof (CamelMimeParser),
sizeof (CamelMimeParserClass),
@@ -276,7 +276,7 @@
if (s->filterid == -1)
s->filterid++;
new->next = NULL;
- camel_object_ref((CamelObject *)mf);
+ g_object_ref((CamelObject *)mf);
/* yes, this is correct, since 'next' is the first element of the struct */
f = (struct _header_scan_filter *)&s->filters;
@@ -304,7 +304,7 @@
while (f && f->next) {
old = f->next;
if (old->id == id) {
- camel_object_unref((CamelObject *)old->filter);
+ g_object_unref((CamelObject *)old->filter);
f->next = old->next;
g_free(old);
/* there should only be a single matching id, but
@@ -1416,7 +1416,7 @@
if (s->fd != -1)
close(s->fd);
if (s->stream) {
- camel_object_unref((CamelObject *)s->stream);
+ g_object_unref((CamelObject *)s->stream);
}
g_free(s);
}
@@ -1488,7 +1488,7 @@
s->fd = -1;
}
if (s->stream) {
- camel_object_unref((CamelObject *)s->stream);
+ g_object_unref((CamelObject *)s->stream);
s->stream = NULL;
}
s->ioerrno = 0;
@@ -1509,7 +1509,7 @@
{
folder_scan_reset(s);
s->stream = stream;
- camel_object_ref((CamelObject *)stream);
+ g_object_ref((CamelObject *)stream);
return 0;
}
Modified: branches/camel-gobject/camel/camel-mime-parser.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-parser.h (original)
+++ branches/camel-gobject/camel/camel-mime-parser.h Mon Nov 10 00:44:12 2008
@@ -29,9 +29,9 @@
#include <camel/camel-mime-filter.h>
#include <camel/camel-stream.h>
-#define CAMEL_MIME_PARSER(obj) CAMEL_CHECK_CAST (obj, camel_mime_parser_get_type (), CamelMimeParser)
-#define CAMEL_MIME_PARSER_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_parser_get_type (), CamelMimeParserClass)
-#define CAMEL_IS_MIME_PARSER(obj) CAMEL_CHECK_TYPE (obj, camel_mime_parser_get_type ())
+#define CAMEL_MIME_PARSER(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_mime_parser_get_type (), CamelMimeParser)
+#define CAMEL_MIME_PARSER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_mime_parser_get_type (), CamelMimeParserClass)
+#define CAMEL_IS_MIME_PARSER(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_mime_parser_get_type ())
G_BEGIN_DECLS
@@ -76,7 +76,7 @@
void (*content) (CamelMimeParser *parser);
};
-CamelType camel_mime_parser_get_type (void);
+GType camel_mime_parser_get_type (void);
CamelMimeParser *camel_mime_parser_new (void);
/* quick-fix for parser not erroring, we can find out if it had an error afterwards */
Modified: branches/camel-gobject/camel/camel-mime-part-utils.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-part-utils.c (original)
+++ branches/camel-gobject/camel/camel-mime-part-utils.c Mon Nov 10 00:44:12 2008
@@ -73,7 +73,7 @@
mem = camel_stream_mem_new_with_byte_array (buffer);
camel_data_wrapper_construct_from_stream (dw, mem);
- camel_object_unref (mem);
+ g_object_unref (mem);
}
/* This replaces the data wrapper repository ... and/or could be replaced by it? */
@@ -131,7 +131,7 @@
/* would you believe you have to set this BEFORE you set the content object??? oh my god !!!! */
camel_data_wrapper_set_mime_type_field (content, camel_mime_part_get_content_type (dw));
camel_medium_set_content_object ((CamelMedium *)dw, content);
- camel_object_unref (content);
+ g_object_unref (content);
}
g_free (encoding);
Modified: branches/camel-gobject/camel/camel-mime-part.c
==============================================================================
--- branches/camel-gobject/camel/camel-mime-part.c (original)
+++ branches/camel-gobject/camel/camel-mime-part.c Mon Nov 10 00:44:12 2008
@@ -133,7 +133,7 @@
CamelMediumClass *camel_medium_class = CAMEL_MEDIUM_CLASS (camel_mime_part_class);
CamelDataWrapperClass *camel_data_wrapper_class = CAMEL_DATA_WRAPPER_CLASS (camel_mime_part_class);
- parent_class = CAMEL_MEDIUM_CLASS (camel_type_get_global_classfuncs (camel_medium_get_type ()));
+ parent_class = CAMEL_MEDIUM_CLASS (g_type_class_peek (camel_medium_get_type ()));
init_header_name_table();
camel_mime_part_class->construct_from_parser = construct_from_parser;
@@ -187,12 +187,12 @@
-CamelType
+GType
camel_mime_part_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (CAMEL_MEDIUM_TYPE,
"CamelMimePart",
sizeof (CamelMimePart),
@@ -872,7 +872,7 @@
/* if we have a character encoder, add that always */
if (charenc) {
camel_stream_filter_add(filter_stream, charenc);
- camel_object_unref (charenc);
+ g_object_unref (charenc);
}
/* we only re-do crlf on encoded blocks */
@@ -881,12 +881,12 @@
CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
camel_stream_filter_add(filter_stream, crlf);
- camel_object_unref (crlf);
+ g_object_unref (crlf);
}
if (filter) {
camel_stream_filter_add(filter_stream, filter);
- camel_object_unref (filter);
+ g_object_unref (filter);
}
stream = (CamelStream *)filter_stream;
@@ -902,7 +902,7 @@
if (filter_stream) {
errnosav = errno;
camel_stream_flush (stream);
- camel_object_unref (filter_stream);
+ g_object_unref (filter_stream);
errno = errnosav;
}
@@ -1008,7 +1008,7 @@
} else {
ret = camel_mime_part_construct_from_parser((CamelMimePart *)dw, mp);
}
- camel_object_unref((CamelObject *)mp);
+ g_object_unref((CamelObject *)mp);
return ret;
}
@@ -1055,12 +1055,12 @@
camel_data_wrapper_set_mime_type (dw, type);
stream = camel_stream_mem_new_with_buffer (data, length);
camel_data_wrapper_construct_from_stream (dw, stream);
- camel_object_unref (stream);
+ g_object_unref (stream);
camel_medium_set_content_object (medium, dw);
- camel_object_unref (dw);
+ g_object_unref (dw);
} else {
if (medium->content)
- camel_object_unref (medium->content);
+ g_object_unref (medium->content);
medium->content = NULL;
}
}
@@ -1088,7 +1088,7 @@
camel_data_wrapper_decode_to_stream (dw, (CamelStream *) null);
size = null->written;
- camel_object_unref (null);
+ g_object_unref (null);
return size;
}
Modified: branches/camel-gobject/camel/camel-mime-part.h
==============================================================================
--- branches/camel-gobject/camel/camel-mime-part.h (original)
+++ branches/camel-gobject/camel/camel-mime-part.h Mon Nov 10 00:44:12 2008
@@ -32,9 +32,9 @@
#include <camel/camel-mime-parser.h>
#define CAMEL_MIME_PART_TYPE (camel_mime_part_get_type ())
-#define CAMEL_MIME_PART(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MIME_PART_TYPE, CamelMimePart))
-#define CAMEL_MIME_PART_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MIME_PART_TYPE, CamelMimePartClass))
-#define CAMEL_IS_MIME_PART(o) (CAMEL_CHECK_TYPE((o), CAMEL_MIME_PART_TYPE))
+#define CAMEL_MIME_PART(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_MIME_PART_TYPE, CamelMimePart))
+#define CAMEL_MIME_PART_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_MIME_PART_TYPE, CamelMimePartClass))
+#define CAMEL_IS_MIME_PART(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_MIME_PART_TYPE))
G_BEGIN_DECLS
@@ -63,7 +63,7 @@
} CamelMimePartClass;
/* Standard Camel function */
-CamelType camel_mime_part_get_type (void);
+GType camel_mime_part_get_type (void);
/* public methods */
CamelMimePart * camel_mime_part_new (void);
Modified: branches/camel-gobject/camel/camel-movemail.c
==============================================================================
--- branches/camel-gobject/camel/camel-movemail.c (original)
+++ branches/camel-gobject/camel/camel-movemail.c Mon Nov 10 00:44:12 2008
@@ -519,8 +519,8 @@
g_free(from);
}
- camel_object_unref((CamelObject *)mp);
- camel_object_unref((CamelObject *)ffrom);
+ g_object_unref((CamelObject *)mp);
+ g_object_unref((CamelObject *)ffrom);
return ret;
@@ -532,8 +532,8 @@
g_strerror (errno));
- camel_object_unref((CamelObject *)mp);
- camel_object_unref((CamelObject *)ffrom);
+ g_object_unref((CamelObject *)mp);
+ g_object_unref((CamelObject *)ffrom);
return -1;
}
Modified: branches/camel-gobject/camel/camel-multipart-encrypted.c
==============================================================================
--- branches/camel-gobject/camel/camel-multipart-encrypted.c (original)
+++ branches/camel-gobject/camel/camel-multipart-encrypted.c Mon Nov 10 00:44:12 2008
@@ -49,12 +49,12 @@
static CamelMultipartClass *parent_class = NULL;
-CamelType
+GType
camel_multipart_encrypted_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_multipart_get_type (),
"CamelMultipartEncrypted",
sizeof (CamelMultipartEncrypted),
@@ -74,7 +74,7 @@
{
CamelDataWrapperClass *camel_data_wrapper_class = CAMEL_DATA_WRAPPER_CLASS (klass);
- parent_class = (CamelMultipartClass *) camel_type_get_global_classfuncs (camel_multipart_get_type ());
+ parent_class = (CamelMultipartClass *) g_type_class_peek (camel_multipart_get_type ());
/* virtual method overload */
camel_data_wrapper_class->set_mime_type_field = set_mime_type_field;
@@ -98,7 +98,7 @@
g_free (mpe->protocol);
if (mpe->decrypted)
- camel_object_unref (mpe->decrypted);
+ g_object_unref (mpe->decrypted);
}
/* we snoop the mime type to get the protocol */
Modified: branches/camel-gobject/camel/camel-multipart-encrypted.h
==============================================================================
--- branches/camel-gobject/camel/camel-multipart-encrypted.h (original)
+++ branches/camel-gobject/camel/camel-multipart-encrypted.h Mon Nov 10 00:44:12 2008
@@ -27,9 +27,9 @@
#include <camel/camel-multipart.h>
#define CAMEL_MULTIPART_ENCRYPTED_TYPE (camel_multipart_encrypted_get_type ())
-#define CAMEL_MULTIPART_ENCRYPTED(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MULTIPART_ENCRYPTED_TYPE, CamelMultipartEncrypted))
-#define CAMEL_MULTIPART_ENCRYPTED_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MULTIPART_ENCRYPTED_TYPE, CamelMultipartEncryptedClass))
-#define CAMEL_IS_MULTIPART_ENCRYPTED(o) (CAMEL_CHECK_TYPE((o), CAMEL_MULTIPART_ENCRYPTED_TYPE))
+#define CAMEL_MULTIPART_ENCRYPTED(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_MULTIPART_ENCRYPTED_TYPE, CamelMultipartEncrypted))
+#define CAMEL_MULTIPART_ENCRYPTED_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_MULTIPART_ENCRYPTED_TYPE, CamelMultipartEncryptedClass))
+#define CAMEL_IS_MULTIPART_ENCRYPTED(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_MULTIPART_ENCRYPTED_TYPE))
G_BEGIN_DECLS
@@ -57,7 +57,7 @@
};
-CamelType camel_multipart_encrypted_get_type (void);
+GType camel_multipart_encrypted_get_type (void);
CamelMultipartEncrypted *camel_multipart_encrypted_new (void);
Modified: branches/camel-gobject/camel/camel-multipart-signed.c
==============================================================================
--- branches/camel-gobject/camel/camel-multipart-signed.c (original)
+++ branches/camel-gobject/camel/camel-multipart-signed.c Mon Nov 10 00:44:12 2008
@@ -78,7 +78,7 @@
CamelDataWrapperClass *camel_data_wrapper_class = CAMEL_DATA_WRAPPER_CLASS(camel_multipart_signed_class);
CamelMultipartClass *mpclass = (CamelMultipartClass *)camel_multipart_signed_class;
- parent_class = (CamelMultipartClass *) camel_type_get_global_classfuncs (camel_multipart_get_type());
+ parent_class = (CamelMultipartClass *) g_type_class_peek (camel_multipart_get_type());
/* virtual method overload */
camel_data_wrapper_class->construct_from_stream = construct_from_stream;
@@ -117,19 +117,19 @@
g_free(mps->protocol);
g_free(mps->micalg);
if (mps->signature)
- camel_object_unref((CamelObject *)mps->signature);
+ g_object_unref((CamelObject *)mps->signature);
if (mps->content)
- camel_object_unref((CamelObject *)mps->content);
+ g_object_unref((CamelObject *)mps->content);
if (mps->contentraw)
- camel_object_unref((CamelObject *)mps->contentraw);
+ g_object_unref((CamelObject *)mps->contentraw);
}
-CamelType
+GType
camel_multipart_signed_get_type (void)
{
- static CamelType camel_multipart_signed_type = CAMEL_INVALID_TYPE;
+ static GType camel_multipart_signed_type = G_TYPE_INVALID;
- if (camel_multipart_signed_type == CAMEL_INVALID_TYPE) {
+ if (camel_multipart_signed_type == G_TYPE_INVALID) {
camel_multipart_signed_type = camel_type_register (camel_multipart_get_type (), "CamelMultipartSigned",
sizeof (CamelMultipartSigned),
sizeof (CamelMultipartSignedClass),
@@ -287,7 +287,7 @@
camel_multipart_set_postface(mp, camel_mime_parser_postface(cmp));
}
- camel_object_unref(cmp);
+ g_object_unref(cmp);
if (mps->end2 == -1 || mps->start2 == -1) {
return -1;
@@ -354,7 +354,7 @@
return mps->content;
if (mps->contentraw) {
stream = mps->contentraw;
- camel_object_ref((CamelObject *)stream);
+ g_object_ref((CamelObject *)stream);
} else if (mps->start1 == -1
&& parse_content(mps) == -1
&& (stream = ((CamelDataWrapper *)mps)->stream) == NULL) {
@@ -364,14 +364,14 @@
return NULL;
} else if (mps->start1 == -1) {
stream = dw->stream;
- camel_object_ref(stream);
+ g_object_ref(stream);
} else {
stream = camel_seekable_substream_new((CamelSeekableStream *)dw->stream, mps->start1, mps->end1);
}
camel_stream_reset(stream);
mps->content = camel_mime_part_new();
camel_data_wrapper_construct_from_stream((CamelDataWrapper *)mps->content, stream);
- camel_object_unref(stream);
+ g_object_unref(stream);
return mps->content;
case CAMEL_MULTIPART_SIGNED_SIGNATURE:
if (mps->signature)
@@ -387,7 +387,7 @@
camel_stream_reset(stream);
mps->signature = camel_mime_part_new();
camel_data_wrapper_construct_from_stream((CamelDataWrapper *)mps->signature, stream);
- camel_object_unref((CamelObject *)stream);
+ g_object_unref((CamelObject *)stream);
return mps->signature;
default:
g_warning("trying to get object out of bounds for multipart");
@@ -423,20 +423,20 @@
CamelDataWrapper *dw = (CamelDataWrapper *)mps;
if (dw->stream)
- camel_object_unref((CamelObject *)dw->stream);
+ g_object_unref((CamelObject *)dw->stream);
dw->stream = (CamelStream *)mem;
mps->start1 = -1;
if (mps->content) {
- camel_object_unref((CamelObject *)mps->content);
+ g_object_unref((CamelObject *)mps->content);
mps->content = NULL;
}
if (mps->contentraw) {
- camel_object_unref((CamelObject *)mps->contentraw);
+ g_object_unref((CamelObject *)mps->contentraw);
mps->contentraw = NULL;
}
if (mps->signature) {
- camel_object_unref((CamelObject *)mps->signature);
+ g_object_unref((CamelObject *)mps->signature);
mps->signature = NULL;
}
}
@@ -584,7 +584,7 @@
if (mps->contentraw) {
constream = mps->contentraw;
- camel_object_ref((CamelObject *)constream);
+ g_object_ref((CamelObject *)constream);
} else {
CamelStream *sub;
CamelMimeFilter *canon_filter;
@@ -597,12 +597,12 @@
/* first, prepare our parts */
sub = camel_seekable_substream_new((CamelSeekableStream *)((CamelDataWrapper *)mps)->stream, mps->start1, mps->end1);
constream = (CamelStream *)camel_stream_filter_new_with_stream(sub);
- camel_object_unref((CamelObject *)sub);
+ g_object_unref((CamelObject *)sub);
/* Note: see rfc2015 or rfc3156, section 5 */
canon_filter = camel_mime_filter_canon_new (CAMEL_MIME_FILTER_CANON_CRLF);
camel_stream_filter_add((CamelStreamFilter *)constream, (CamelMimeFilter *)canon_filter);
- camel_object_unref((CamelObject *)canon_filter);
+ g_object_unref((CamelObject *)canon_filter);
}
return constream;
Modified: branches/camel-gobject/camel/camel-multipart-signed.h
==============================================================================
--- branches/camel-gobject/camel/camel-multipart-signed.h (original)
+++ branches/camel-gobject/camel/camel-multipart-signed.h Mon Nov 10 00:44:12 2008
@@ -30,9 +30,9 @@
#include <camel/camel-multipart.h>
#define CAMEL_MULTIPART_SIGNED_TYPE (camel_multipart_signed_get_type ())
-#define CAMEL_MULTIPART_SIGNED(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MULTIPART_SIGNED_TYPE, CamelMultipartSigned))
-#define CAMEL_MULTIPART_SIGNED_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MULTIPART_SIGNED_TYPE, CamelMultipartSignedClass))
-#define CAMEL_IS_MULTIPART_SIGNED(o) (CAMEL_CHECK_TYPE((o), CAMEL_MULTIPART_SIGNED_TYPE))
+#define CAMEL_MULTIPART_SIGNED(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_MULTIPART_SIGNED_TYPE, CamelMultipartSigned))
+#define CAMEL_MULTIPART_SIGNED_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_MULTIPART_SIGNED_TYPE, CamelMultipartSignedClass))
+#define CAMEL_IS_MULTIPART_SIGNED(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_MULTIPART_SIGNED_TYPE))
G_BEGIN_DECLS
@@ -82,7 +82,7 @@
} CamelMultipartSignedClass;
/* Standard Camel function */
-CamelType camel_multipart_signed_get_type (void);
+GType camel_multipart_signed_get_type (void);
/* public methods */
CamelMultipartSigned *camel_multipart_signed_new (void);
Modified: branches/camel-gobject/camel/camel-multipart.c
==============================================================================
--- branches/camel-gobject/camel/camel-multipart.c (original)
+++ branches/camel-gobject/camel/camel-multipart.c Mon Nov 10 00:44:12 2008
@@ -76,7 +76,7 @@
CamelDataWrapperClass *camel_data_wrapper_class =
CAMEL_DATA_WRAPPER_CLASS (camel_multipart_class);
- parent_class = (CamelDataWrapperClass *) camel_type_get_global_classfuncs (camel_data_wrapper_get_type ());
+ parent_class = (CamelDataWrapperClass *) g_type_class_peek (camel_data_wrapper_get_type ());
/* virtual method definition */
camel_multipart_class->add_part = add_part;
@@ -112,7 +112,7 @@
{
CamelMultipart *multipart = CAMEL_MULTIPART (object);
- g_list_foreach (multipart->parts, (GFunc) camel_object_unref, NULL);
+ g_list_foreach (multipart->parts, (GFunc) g_object_unref, NULL);
if (multipart->parts)
g_list_free (multipart->parts);
@@ -127,12 +127,12 @@
}
-CamelType
+GType
camel_multipart_get_type (void)
{
- static CamelType camel_multipart_type = CAMEL_INVALID_TYPE;
+ static GType camel_multipart_type = G_TYPE_INVALID;
- if (camel_multipart_type == CAMEL_INVALID_TYPE) {
+ if (camel_multipart_type == G_TYPE_INVALID) {
camel_multipart_type = camel_type_register (camel_data_wrapper_get_type (), "CamelMultipart",
sizeof (CamelMultipart),
sizeof (CamelMultipartClass),
@@ -170,7 +170,7 @@
add_part (CamelMultipart *multipart, CamelMimePart *part)
{
multipart->parts = g_list_append (multipart->parts, part);
- camel_object_ref (part);
+ g_object_ref (part);
}
@@ -195,7 +195,7 @@
add_part_at (CamelMultipart *multipart, CamelMimePart *part, guint index)
{
multipart->parts = g_list_insert (multipart->parts, part, index);
- camel_object_ref (part);
+ g_object_ref (part);
}
/**
@@ -225,7 +225,7 @@
if (!multipart->parts)
return;
multipart->parts = g_list_remove (multipart->parts, part);
- camel_object_unref (part);
+ g_object_unref (part);
}
/**
@@ -267,7 +267,7 @@
multipart->parts = g_list_remove_link (parts_list, part_to_remove);
if (part_to_remove->data)
- camel_object_unref (part_to_remove->data);
+ g_object_unref (part_to_remove->data);
g_list_free_1 (part_to_remove);
return removed_part;
@@ -280,7 +280,7 @@
*
* Remove the indicated part from the multipart object.
*
- * Returns: the removed part. Note that it is #camel_object_unref'ed
+ * Returns: the removed part. Note that it is #g_object_unref'ed
* before being returned, which may cause it to be destroyed.
**/
CamelMimePart *
@@ -573,7 +573,7 @@
bodypart = camel_mime_part_new();
camel_mime_part_construct_from_parser(bodypart, mp);
camel_multipart_add_part(multipart, bodypart);
- camel_object_unref((CamelObject *)bodypart);
+ g_object_unref((CamelObject *)bodypart);
}
/* these are only return valid data in the MULTIPART_END state */
Modified: branches/camel-gobject/camel/camel-multipart.h
==============================================================================
--- branches/camel-gobject/camel/camel-multipart.h (original)
+++ branches/camel-gobject/camel/camel-multipart.h Mon Nov 10 00:44:12 2008
@@ -30,9 +30,9 @@
#include <camel/camel-data-wrapper.h>
#define CAMEL_MULTIPART_TYPE (camel_multipart_get_type ())
-#define CAMEL_MULTIPART(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MULTIPART_TYPE, CamelMultipart))
-#define CAMEL_MULTIPART_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MULTIPART_TYPE, CamelMultipartClass))
-#define CAMEL_IS_MULTIPART(o) (CAMEL_CHECK_TYPE((o), CAMEL_MULTIPART_TYPE))
+#define CAMEL_MULTIPART(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_MULTIPART_TYPE, CamelMultipart))
+#define CAMEL_MULTIPART_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_MULTIPART_TYPE, CamelMultipartClass))
+#define CAMEL_IS_MULTIPART(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_MULTIPART_TYPE))
G_BEGIN_DECLS
@@ -66,7 +66,7 @@
} CamelMultipartClass;
/* Standard Camel function */
-CamelType camel_multipart_get_type (void);
+GType camel_multipart_get_type (void);
/* public methods */
Modified: branches/camel-gobject/camel/camel-news-address.c
==============================================================================
--- branches/camel-gobject/camel/camel-news-address.c (original)
+++ branches/camel-gobject/camel/camel-news-address.c Mon Nov 10 00:44:12 2008
@@ -28,16 +28,16 @@
static void
camel_news_address_class_init (CamelNewsAddressClass *klass)
{
- camel_news_address_parent = CAMEL_ADDRESS_CLASS (camel_type_get_global_classfuncs (camel_address_get_type ()));
+ camel_news_address_parent = CAMEL_ADDRESS_CLASS (g_type_class_peek (camel_address_get_type ()));
}
-CamelType
+GType
camel_news_address_get_type (void)
{
- static guint type = CAMEL_INVALID_TYPE;
+ static guint type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_address_get_type (), "CamelNewsAddress",
sizeof (CamelNewsAddress),
sizeof (CamelNewsAddressClass),
Modified: branches/camel-gobject/camel/camel-news-address.h
==============================================================================
--- branches/camel-gobject/camel/camel-news-address.h (original)
+++ branches/camel-gobject/camel/camel-news-address.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-address.h>
-#define CAMEL_NEWS_ADDRESS(obj) CAMEL_CHECK_CAST (obj, camel_news_address_get_type (), CamelNewsAddress)
-#define CAMEL_NEWS_ADDRESS_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_news_address_get_type (), CamelNewsAddressClass)
-#define CAMEL_IS_NEWS_ADDRESS(obj) CAMEL_CHECK_TYPE (obj, camel_news_address_get_type ())
+#define CAMEL_NEWS_ADDRESS(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_news_address_get_type (), CamelNewsAddress)
+#define CAMEL_NEWS_ADDRESS_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_news_address_get_type (), CamelNewsAddressClass)
+#define CAMEL_IS_NEWS_ADDRESS(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_news_address_get_type ())
G_BEGIN_DECLS
@@ -44,7 +44,7 @@
CamelAddressClass parent_class;
};
-CamelType camel_news_address_get_type (void);
+GType camel_news_address_get_type (void);
CamelNewsAddress *camel_news_address_new (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/camel-nntp-address.c
==============================================================================
--- branches/camel-gobject/camel/camel-nntp-address.c (original)
+++ branches/camel-gobject/camel/camel-nntp-address.c Mon Nov 10 00:44:12 2008
@@ -46,7 +46,7 @@
{
CamelAddressClass *address = (CamelAddressClass *) klass;
- camel_nntp_address_parent = CAMEL_ADDRESS_CLASS(camel_type_get_global_classfuncs(camel_address_get_type()));
+ camel_nntp_address_parent = CAMEL_ADDRESS_CLASS(g_type_class_peek(camel_address_get_type()));
address->decode = nntp_decode;
address->encode = nntp_encode;
@@ -61,12 +61,12 @@
{
}
-CamelType
+GType
camel_nntp_address_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_address_get_type(), "CamelNNTPAddress",
sizeof (CamelNNTPAddress),
sizeof (CamelNNTPAddressClass),
Modified: branches/camel-gobject/camel/camel-nntp-address.h
==============================================================================
--- branches/camel-gobject/camel/camel-nntp-address.h (original)
+++ branches/camel-gobject/camel/camel-nntp-address.h Mon Nov 10 00:44:12 2008
@@ -24,9 +24,9 @@
#include <camel/camel-address.h>
-#define CAMEL_NNTP_ADDRESS(obj) CAMEL_CHECK_CAST (obj, camel_nntp_address_get_type (), CamelNNTPAddress)
-#define CAMEL_NNTP_ADDRESS_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_nntp_address_get_type (), CamelNNTPAddressClass)
-#define CAMEL_IS_NNTP_ADDRESS(obj) CAMEL_CHECK_TYPE (obj, camel_nntp_address_get_type ())
+#define CAMEL_NNTP_ADDRESS(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_nntp_address_get_type (), CamelNNTPAddress)
+#define CAMEL_NNTP_ADDRESS_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_nntp_address_get_type (), CamelNNTPAddressClass)
+#define CAMEL_IS_NNTP_ADDRESS(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_nntp_address_get_type ())
G_BEGIN_DECLS
@@ -43,7 +43,7 @@
CamelAddressClass parent_class;
};
-CamelType camel_nntp_address_get_type (void);
+GType camel_nntp_address_get_type (void);
CamelNNTPAddress *camel_nntp_address_new (void);
int camel_nntp_address_add (CamelNNTPAddress *a, const char *name);
Modified: branches/camel-gobject/camel/camel-object.c
==============================================================================
--- branches/camel-gobject/camel/camel-object.c (original)
+++ branches/camel-gobject/camel/camel-object.c Mon Nov 10 00:44:12 2008
@@ -112,8 +112,8 @@
#ifndef CAMEL_DISABLE_DEPRECATED
/* fundamental types are accessed via global */
-CamelType camel_object_type;
-CamelType camel_interface_type;
+GType camel_object_type;
+GType camel_interface_type;
#endif
#define P_LOCK(l) (pthread_mutex_lock(&l))
@@ -635,10 +635,10 @@
return type;
}
-CamelType
-camel_type_register (CamelType parent,
+GType
+camel_type_register (GType parent,
const char * name,
- size_t object_size,
+ size_t object_size,
size_t class_size,
CamelObjectClassInitFunc class_init,
CamelObjectClassFinalizeFunc class_finalize,
@@ -663,8 +663,8 @@
return g_type_register_static (parent, name, &type_info, 0);
}
-CamelType
-camel_interface_register (CamelType parent,
+GType
+camel_interface_register (GType parent,
const char *name,
size_t class_size,
CamelObjectClassInitFunc class_init,
Modified: branches/camel-gobject/camel/camel-object.h
==============================================================================
--- branches/camel-gobject/camel/camel-object.h (original)
+++ branches/camel-gobject/camel/camel-object.h Mon Nov 10 00:44:12 2008
@@ -117,8 +117,8 @@
typedef GType CamelType;
#ifndef CAMEL_DISABLE_DEPRECATED
-extern CamelType camel_object_type;
-extern CamelType camel_interface_type;
+extern GType camel_object_type;
+extern GType camel_interface_type;
#endif /* CAMEL_DISABLE_DEPRECATED */
typedef struct _CamelObjectClass CamelObjectClass;
@@ -248,18 +248,18 @@
#ifndef CAMEL_DISABLE_DEPRECATED
/* The type system .... it's pretty simple..... */
-CamelType camel_type_register(CamelType parent, const char * name, /*unsigned int ver, unsigned int rev,*/
- size_t instance_size,
- size_t classfuncs_size,
- CamelObjectClassInitFunc class_init,
- CamelObjectClassFinalizeFunc class_finalize,
- CamelObjectInitFunc instance_init,
- CamelObjectFinalizeFunc instance_finalize);
-
-CamelType camel_interface_register(CamelType parent, const char *name,
- size_t classfuncs_size,
- CamelObjectClassInitFunc class_init,
- CamelObjectClassFinalizeFunc class_finalize);
+GType camel_type_register(GType parent, const char * name, /*unsigned int ver, unsigned int rev,*/
+ size_t instance_size,
+ size_t classfuncs_size,
+ CamelObjectClassInitFunc class_init,
+ CamelObjectClassFinalizeFunc class_finalize,
+ CamelObjectInitFunc instance_init,
+ CamelObjectFinalizeFunc instance_finalize);
+
+GType camel_interface_register(GType parent, const char *name,
+ size_t classfuncs_size,
+ CamelObjectClassInitFunc class_init,
+ CamelObjectClassFinalizeFunc class_finalize);
#endif /* CAMEL_DISABLE_DEPRECATED */
@@ -297,10 +297,10 @@
#ifndef CAMEL_DISABLE_DEPRECATED
#define CAMEL_MAKE_CLASS(type, tname, parent, pname) \
-static CamelType type##_type; \
+static GType type##_type; \
static pname##Class * type##_parent_class; \
\
-CamelType \
+GType \
type##_get_type(void) \
{ \
if (type##_type == 0) { \
Modified: branches/camel-gobject/camel/camel-offline-folder.c
==============================================================================
--- branches/camel-gobject/camel/camel-offline-folder.c (original)
+++ branches/camel-gobject/camel/camel-offline-folder.c Mon Nov 10 00:44:12 2008
@@ -53,10 +53,10 @@
};
-CamelType
+GType
camel_offline_folder_get_type (void)
{
- static CamelType type = 0;
+ static GType type = 0;
if (!type) {
type = camel_type_register (CAMEL_FOLDER_TYPE,
@@ -78,7 +78,7 @@
{
int i;
- parent_class = (CamelFolderClass *) camel_type_get_global_classfuncs (CAMEL_FOLDER_TYPE);
+ parent_class = (CamelFolderClass *) g_type_class_peek (CAMEL_FOLDER_TYPE);
if (offline_folder_props == NULL) {
for (i = 0; i < G_N_ELEMENTS (offline_prop_list); i++) {
@@ -116,7 +116,7 @@
camel_operation_progress (NULL, pc);
if ((message = camel_folder_get_message (m->folder, m->changes->uid_added->pdata[i], &mm->ex)))
- camel_object_unref (message);
+ g_object_unref (message);
}
} else {
camel_offline_folder_downsync ((CamelOfflineFolder *) m->folder, "(match-all)", &mm->ex);
@@ -133,7 +133,7 @@
if (m->changes)
camel_folder_change_info_free (m->changes);
- camel_object_unref (m->folder);
+ g_object_unref (m->folder);
}
static CamelSessionThreadOps offline_downsync_ops = {
@@ -154,7 +154,7 @@
m = camel_session_thread_msg_new (session, &offline_downsync_ops, sizeof (*m));
m->changes = camel_folder_change_info_new ();
camel_folder_change_info_cat (m->changes, changes);
- camel_object_ref (folder);
+ g_object_ref (folder);
m->folder = folder;
camel_session_thread_queue (session, &m->msg, 0);
@@ -271,7 +271,7 @@
if (message == NULL)
break;
- camel_object_unref (message);
+ g_object_unref (message);
}
if (expression)
Modified: branches/camel-gobject/camel/camel-offline-folder.h
==============================================================================
--- branches/camel-gobject/camel/camel-offline-folder.h (original)
+++ branches/camel-gobject/camel/camel-offline-folder.h Mon Nov 10 00:44:12 2008
@@ -27,9 +27,9 @@
#include <camel/camel-folder.h>
#define CAMEL_OFFLINE_FOLDER_TYPE (camel_offline_folder_get_type ())
-#define CAMEL_OFFLINE_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_OFFLINE_FOLDER_TYPE, CamelOfflineFolder))
-#define CAMEL_OFFLINE_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_OFFLINE_FOLDER_TYPE, CamelOfflineFolderClass))
-#define CAMEL_IS_OFFLINE_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_OFFLINE_FOLDER_TYPE))
+#define CAMEL_OFFLINE_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_OFFLINE_FOLDER_TYPE, CamelOfflineFolder))
+#define CAMEL_OFFLINE_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_OFFLINE_FOLDER_TYPE, CamelOfflineFolderClass))
+#define CAMEL_IS_OFFLINE_FOLDER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_OFFLINE_FOLDER_TYPE))
G_BEGIN_DECLS
@@ -58,7 +58,7 @@
};
-CamelType camel_offline_folder_get_type (void);
+GType camel_offline_folder_get_type (void);
void camel_offline_folder_downsync (CamelOfflineFolder *offline, const char *expression, CamelException *ex);
Modified: branches/camel-gobject/camel/camel-offline-journal.c
==============================================================================
--- branches/camel-gobject/camel/camel-offline-journal.c (original)
+++ branches/camel-gobject/camel/camel-offline-journal.c Mon Nov 10 00:44:12 2008
@@ -55,10 +55,10 @@
static CamelObjectClass *parent_class = NULL;
-CamelType
+GType
camel_offline_journal_get_type (void)
{
- static CamelType type = NULL;
+ static GType type = NULL;
if (!type) {
type = camel_type_register (camel_object_get_type (),
@@ -77,7 +77,7 @@
static void
camel_offline_journal_class_init (CamelOfflineJournalClass *klass)
{
- parent_class = camel_type_get_global_classfuncs (CAMEL_OBJECT_TYPE);
+ parent_class = g_type_class_peek (CAMEL_TYPE_OBJECT);
}
static void
Modified: branches/camel-gobject/camel/camel-offline-journal.h
==============================================================================
--- branches/camel-gobject/camel/camel-offline-journal.h (original)
+++ branches/camel-gobject/camel/camel-offline-journal.h Mon Nov 10 00:44:12 2008
@@ -33,10 +33,10 @@
#include <camel/camel-object.h>
#define CAMEL_TYPE_OFFLINE_JOURNAL (camel_offline_journal_get_type ())
-#define CAMEL_OFFLINE_JOURNAL(obj) (CAMEL_CHECK_CAST ((obj), CAMEL_TYPE_OFFLINE_JOURNAL, CamelOfflineJournal))
-#define CAMEL_OFFLINE_JOURNAL_CLASS(klass) (CAMEL_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_OFFLINE_JOURNAL, CamelOfflineJournalClass))
-#define CAMEL_IS_OFFLINE_JOURNAL(obj) (CAMEL_CHECK_TYPE ((obj), CAMEL_TYPE_OFFLINE_JOURNAL))
-#define CAMEL_IS_OFFLINE_JOURNAL_CLASS(klass) (CAMEL_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_OFFLINE_JOURNAL))
+#define CAMEL_OFFLINE_JOURNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMEL_TYPE_OFFLINE_JOURNAL, CamelOfflineJournal))
+#define CAMEL_OFFLINE_JOURNAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_OFFLINE_JOURNAL, CamelOfflineJournalClass))
+#define CAMEL_IS_OFFLINE_JOURNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMEL_TYPE_OFFLINE_JOURNAL))
+#define CAMEL_IS_OFFLINE_JOURNAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_OFFLINE_JOURNAL))
#define CAMEL_OFFLINE_JOURNAL_GET_CLASS(o) (CAMEL_OFFLINE_JOURNAL_CLASS (CAMEL_OBJECT_GET_CLASS (o)))
G_BEGIN_DECLS
@@ -67,7 +67,7 @@
};
-CamelType camel_offline_journal_get_type (void);
+GType camel_offline_journal_get_type (void);
void camel_offline_journal_construct (CamelOfflineJournal *journal, struct _CamelFolder *folder, const char *filename);
void camel_offline_journal_set_filename (CamelOfflineJournal *journal, const char *filename);
Modified: branches/camel-gobject/camel/camel-offline-store.c
==============================================================================
--- branches/camel-gobject/camel/camel-offline-store.c (original)
+++ branches/camel-gobject/camel/camel-offline-store.c Mon Nov 10 00:44:12 2008
@@ -46,10 +46,10 @@
static CamelStoreClass *parent_class = NULL;
-CamelType
+GType
camel_offline_store_get_type (void)
{
- static CamelType type = NULL;
+ static GType type = NULL;
if (!type) {
type = camel_type_register (CAMEL_STORE_TYPE,
@@ -69,7 +69,7 @@
static void
camel_offline_store_class_init (CamelOfflineStoreClass *klass)
{
- parent_class = (CamelStoreClass *) camel_type_get_global_classfuncs (CAMEL_STORE_TYPE);
+ parent_class = (CamelStoreClass *) g_type_class_peek (CAMEL_STORE_TYPE);
((CamelServiceClass *) klass)->construct = offline_store_construct;
}
@@ -150,13 +150,13 @@
for (i = 0; i < folders->len; i++) {
folder = folders->pdata[i];
- if (CAMEL_CHECK_TYPE (folder, CAMEL_OFFLINE_FOLDER_TYPE)
+ if (G_TYPE_CHECK_INSTANCE_TYPE (folder, CAMEL_OFFLINE_FOLDER_TYPE)
&& (sync || ((CamelOfflineFolder *) folder)->sync_offline)) {
camel_offline_folder_downsync ((CamelOfflineFolder *) folder, NULL, &lex);
camel_exception_clear (&lex);
}
- camel_object_unref (folder);
+ g_object_unref (folder);
}
g_ptr_array_free (folders, TRUE);
@@ -201,12 +201,12 @@
for (i = 0; i < folders->len; i++) {
folder = folders->pdata[i];
- if (CAMEL_CHECK_TYPE (folder, CAMEL_OFFLINE_FOLDER_TYPE)
+ if (G_TYPE_CHECK_INSTANCE_TYPE (folder, CAMEL_OFFLINE_FOLDER_TYPE)
&& (sync || ((CamelOfflineFolder *) folder)->sync_offline)) {
camel_offline_folder_downsync ((CamelOfflineFolder *) folder, NULL, &lex);
camel_exception_clear (&lex);
}
- camel_object_unref (folder);
+ g_object_unref (folder);
}
g_ptr_array_free (folders, TRUE);
}
Modified: branches/camel-gobject/camel/camel-offline-store.h
==============================================================================
--- branches/camel-gobject/camel/camel-offline-store.h (original)
+++ branches/camel-gobject/camel/camel-offline-store.h Mon Nov 10 00:44:12 2008
@@ -27,10 +27,10 @@
#include <camel/camel-store.h>
#define CAMEL_TYPE_OFFLINE_STORE (camel_offline_store_get_type ())
-#define CAMEL_OFFLINE_STORE(obj) (CAMEL_CHECK_CAST ((obj), CAMEL_TYPE_OFFLINE_STORE, CamelOfflineStore))
-#define CAMEL_OFFLINE_STORE_CLASS(klass) (CAMEL_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_OFFLINE_STORE, CamelOfflineStoreClass))
-#define CAMEL_IS_OFFLINE_STORE(obj) (CAMEL_CHECK_TYPE ((obj), CAMEL_TYPE_OFFLINE_STORE))
-#define CAMEL_IS_OFFLINE_STORE_CLASS(klass) (CAMEL_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_OFFLINE_STORE))
+#define CAMEL_OFFLINE_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMEL_TYPE_OFFLINE_STORE, CamelOfflineStore))
+#define CAMEL_OFFLINE_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_OFFLINE_STORE, CamelOfflineStoreClass))
+#define CAMEL_IS_OFFLINE_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMEL_TYPE_OFFLINE_STORE))
+#define CAMEL_IS_OFFLINE_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_OFFLINE_STORE))
#define CAMEL_OFFLINE_STORE_GET_CLASS(obj) (CAMEL_CHECK_GET_CLASS ((obj), CAMEL_TYPE_OFFLINE_STORE, CamelOfflineStoreClass))
G_BEGIN_DECLS
@@ -60,7 +60,7 @@
};
-CamelType camel_offline_store_get_type (void);
+GType camel_offline_store_get_type (void);
void camel_offline_store_set_network_state (CamelOfflineStore *store, int state, CamelException *ex);
Modified: branches/camel-gobject/camel/camel-partition-table.c
==============================================================================
--- branches/camel-gobject/camel/camel-partition-table.c (original)
+++ branches/camel-gobject/camel/camel-partition-table.c Mon Nov 10 00:44:12 2008
@@ -84,7 +84,7 @@
}
camel_block_file_sync(cpi->blocks);
- camel_object_unref((CamelObject *)cpi->blocks);
+ g_object_unref((CamelObject *)cpi->blocks);
}
pthread_mutex_destroy(&p->lock);
@@ -93,12 +93,12 @@
}
-CamelType
+GType
camel_partition_table_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_object_get_type(), "CamelPartitionTable",
sizeof (CamelPartitionTable),
sizeof (CamelPartitionTableClass),
@@ -199,7 +199,7 @@
cpi = (CamelPartitionTable *)camel_object_new(camel_partition_table_get_type());
cpi->rootid = root;
cpi->blocks = bs;
- camel_object_ref((CamelObject *)bs);
+ g_object_ref((CamelObject *)bs);
/* read the partition table into memory */
do {
@@ -239,7 +239,7 @@
return cpi;
fail:
- camel_object_unref((CamelObject *)cpi);
+ g_object_unref((CamelObject *)cpi);
return NULL;
}
@@ -623,7 +623,7 @@
camel_block_file_unref_block(ki->blocks, ki->root_block);
}
camel_block_file_sync(ki->blocks);
- camel_object_unref((CamelObject *)ki->blocks);
+ g_object_unref((CamelObject *)ki->blocks);
}
pthread_mutex_destroy(&p->lock);
@@ -632,12 +632,12 @@
}
-CamelType
+GType
camel_key_table_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_object_get_type(), "CamelKeyTable",
sizeof (CamelKeyTable),
sizeof (CamelKeyTableClass),
@@ -659,12 +659,12 @@
ki = (CamelKeyTable *)camel_object_new(camel_key_table_get_type());
ki->blocks = bs;
- camel_object_ref((CamelObject *)bs);
+ g_object_ref((CamelObject *)bs);
ki->rootid = root;
ki->root_block = camel_block_file_get_block(bs, ki->rootid);
if (ki->root_block == NULL) {
- camel_object_unref((CamelObject *)ki);
+ g_object_unref((CamelObject *)ki);
ki = NULL;
} else {
camel_block_file_detach_block(bs, ki->root_block);
Modified: branches/camel-gobject/camel/camel-partition-table.h
==============================================================================
--- branches/camel-gobject/camel/camel-partition-table.h (original)
+++ branches/camel-gobject/camel/camel-partition-table.h Mon Nov 10 00:44:12 2008
@@ -83,7 +83,7 @@
CamelObjectClass parent;
};
-CamelType camel_partition_table_get_type(void);
+GType camel_partition_table_get_type(void);
CamelPartitionTable *camel_partition_table_new(struct _CamelBlockFile *bs, camel_block_t root);
int camel_partition_table_sync(CamelPartitionTable *cpi);
@@ -141,7 +141,7 @@
CamelObjectClass parent;
};
-CamelType camel_key_table_get_type(void);
+GType camel_key_table_get_type(void);
CamelKeyTable * camel_key_table_new(CamelBlockFile *bs, camel_block_t root);
int camel_key_table_sync(CamelKeyTable *ki);
Modified: branches/camel-gobject/camel/camel-provider.h
==============================================================================
--- branches/camel-gobject/camel/camel-provider.h (original)
+++ branches/camel-gobject/camel/camel-provider.h Mon Nov 10 00:44:12 2008
@@ -179,12 +179,12 @@
/* auto-detection function */
CamelProviderAutoDetectFunc auto_detect;
- /* CamelType(s) of its store and/or transport. If both are
+ /* GType(s) of its store and/or transport. If both are
* set, then they are assumed to be linked together and the
* transport type can only be used in an account that also
* uses the store type (eg, Exchange or NNTP).
*/
- CamelType object_types[CAMEL_NUM_PROVIDER_TYPES];
+ GType object_types[CAMEL_NUM_PROVIDER_TYPES];
/* GList of CamelServiceAuthTypes the provider supports */
GList *authtypes;
Modified: branches/camel-gobject/camel/camel-sasl-anonymous.c
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-anonymous.c (original)
+++ branches/camel-gobject/camel/camel-sasl-anonymous.c Mon Nov 10 00:44:12 2008
@@ -54,7 +54,7 @@
{
CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (camel_sasl_anonymous_class);
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
+ parent_class = CAMEL_SASL_CLASS (g_type_class_peek (camel_sasl_get_type ()));
/* virtual method overload */
camel_sasl_class->challenge = anon_challenge;
@@ -69,12 +69,12 @@
}
-CamelType
+GType
camel_sasl_anonymous_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_sasl_get_type (),
"CamelSaslAnonymous",
sizeof (CamelSaslAnonymous),
@@ -132,10 +132,10 @@
camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
_("Invalid email address trace information:\n%s"),
sasl_anon->trace_info);
- camel_object_unref (cia);
+ g_object_unref (cia);
return NULL;
}
- camel_object_unref (cia);
+ g_object_unref (cia);
ret = g_byte_array_new ();
g_byte_array_append (ret, (guint8 *) sasl_anon->trace_info, strlen (sasl_anon->trace_info));
break;
Modified: branches/camel-gobject/camel/camel-sasl-anonymous.h
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-anonymous.h (original)
+++ branches/camel-gobject/camel/camel-sasl-anonymous.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-sasl.h>
#define CAMEL_SASL_ANONYMOUS_TYPE (camel_sasl_anonymous_get_type ())
-#define CAMEL_SASL_ANONYMOUS(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_ANONYMOUS_TYPE, CamelSaslAnonymous))
-#define CAMEL_SASL_ANONYMOUS_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_ANONYMOUS_TYPE, CamelSaslAnonymousClass))
-#define CAMEL_IS_SASL_ANONYMOUS(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_ANONYMOUS_TYPE))
+#define CAMEL_SASL_ANONYMOUS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SASL_ANONYMOUS_TYPE, CamelSaslAnonymous))
+#define CAMEL_SASL_ANONYMOUS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SASL_ANONYMOUS_TYPE, CamelSaslAnonymousClass))
+#define CAMEL_IS_SASL_ANONYMOUS(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SASL_ANONYMOUS_TYPE))
G_BEGIN_DECLS
@@ -53,7 +53,7 @@
/* Standard Camel function */
-CamelType camel_sasl_anonymous_get_type (void);
+GType camel_sasl_anonymous_get_type (void);
/* public methods */
CamelSasl *camel_sasl_anonymous_new (CamelSaslAnonTraceType type, const char *trace_info);
Modified: branches/camel-gobject/camel/camel-sasl-cram-md5.c
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-cram-md5.c (original)
+++ branches/camel-gobject/camel/camel-sasl-cram-md5.c Mon Nov 10 00:44:12 2008
@@ -56,18 +56,18 @@
{
CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (camel_sasl_cram_md5_class);
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
+ parent_class = CAMEL_SASL_CLASS (g_type_class_peek (camel_sasl_get_type ()));
/* virtual method overload */
camel_sasl_class->challenge = cram_md5_challenge;
}
-CamelType
+GType
camel_sasl_cram_md5_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_sasl_get_type (),
"CamelSaslCramMd5",
sizeof (CamelSaslCramMd5),
Modified: branches/camel-gobject/camel/camel-sasl-cram-md5.h
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-cram-md5.h (original)
+++ branches/camel-gobject/camel/camel-sasl-cram-md5.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-sasl.h>
#define CAMEL_SASL_CRAM_MD5_TYPE (camel_sasl_cram_md5_get_type ())
-#define CAMEL_SASL_CRAM_MD5(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_CRAM_MD5_TYPE, CamelSaslCramMd5))
-#define CAMEL_SASL_CRAM_MD5_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_CRAM_MD5_TYPE, CamelSaslCramMd5Class))
-#define CAMEL_IS_SASL_CRAM_MD5(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_CRAM_MD5_TYPE))
+#define CAMEL_SASL_CRAM_MD5(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SASL_CRAM_MD5_TYPE, CamelSaslCramMd5))
+#define CAMEL_SASL_CRAM_MD5_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SASL_CRAM_MD5_TYPE, CamelSaslCramMd5Class))
+#define CAMEL_IS_SASL_CRAM_MD5(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SASL_CRAM_MD5_TYPE))
G_BEGIN_DECLS
@@ -45,7 +45,7 @@
/* Standard Camel function */
-CamelType camel_sasl_cram_md5_get_type (void);
+GType camel_sasl_cram_md5_get_type (void);
extern CamelServiceAuthType camel_sasl_cram_md5_authtype;
Modified: branches/camel-gobject/camel/camel-sasl-digest-md5.c
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-digest-md5.c (original)
+++ branches/camel-gobject/camel/camel-sasl-digest-md5.c Mon Nov 10 00:44:12 2008
@@ -173,7 +173,7 @@
{
CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (camel_sasl_digest_md5_class);
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
+ parent_class = CAMEL_SASL_CLASS (g_type_class_peek (camel_sasl_get_type ()));
/* virtual method overload */
camel_sasl_class->challenge = digest_md5_challenge;
@@ -235,12 +235,12 @@
}
-CamelType
+GType
camel_sasl_digest_md5_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_sasl_get_type (),
"CamelSaslDigestMd5",
sizeof (CamelSaslDigestMd5),
Modified: branches/camel-gobject/camel/camel-sasl-digest-md5.h
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-digest-md5.h (original)
+++ branches/camel-gobject/camel/camel-sasl-digest-md5.h Mon Nov 10 00:44:12 2008
@@ -27,9 +27,9 @@
#include <camel/camel-sasl.h>
#define CAMEL_SASL_DIGEST_MD5_TYPE (camel_sasl_digest_md5_get_type ())
-#define CAMEL_SASL_DIGEST_MD5(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_DIGEST_MD5_TYPE, CamelSaslDigestMd5))
-#define CAMEL_SASL_DIGEST_MD5_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_DIGEST_MD5_TYPE, CamelSaslDigestMd5Class))
-#define CAMEL_IS_SASL_DIGEST_MD5(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_DIGEST_MD5_TYPE))
+#define CAMEL_SASL_DIGEST_MD5(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SASL_DIGEST_MD5_TYPE, CamelSaslDigestMd5))
+#define CAMEL_SASL_DIGEST_MD5_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SASL_DIGEST_MD5_TYPE, CamelSaslDigestMd5Class))
+#define CAMEL_IS_SASL_DIGEST_MD5(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SASL_DIGEST_MD5_TYPE))
G_BEGIN_DECLS
@@ -47,7 +47,7 @@
/* Standard Camel function */
-CamelType camel_sasl_digest_md5_get_type (void);
+GType camel_sasl_digest_md5_get_type (void);
extern CamelServiceAuthType camel_sasl_digest_md5_authtype;
Modified: branches/camel-gobject/camel/camel-sasl-gssapi.c
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-gssapi.c (original)
+++ branches/camel-gobject/camel/camel-sasl-gssapi.c Mon Nov 10 00:44:12 2008
@@ -101,7 +101,7 @@
{
CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (klass);
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
+ parent_class = CAMEL_SASL_CLASS (g_type_class_peek (camel_sasl_get_type ()));
/* virtual method overload */
camel_sasl_class->challenge = gssapi_challenge;
@@ -134,12 +134,12 @@
}
-CamelType
+GType
camel_sasl_gssapi_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (
camel_sasl_get_type (),
"CamelSaslGssapi",
Modified: branches/camel-gobject/camel/camel-sasl-gssapi.h
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-gssapi.h (original)
+++ branches/camel-gobject/camel/camel-sasl-gssapi.h Mon Nov 10 00:44:12 2008
@@ -28,9 +28,9 @@
#include <camel/camel-sasl.h>
#define CAMEL_SASL_GSSAPI_TYPE (camel_sasl_gssapi_get_type ())
-#define CAMEL_SASL_GSSAPI(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_GSSAPI_TYPE, CamelSaslGssapi))
-#define CAMEL_SASL_GSSAPI_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_GSSAPI_TYPE, CamelSaslGssapiClass))
-#define CAMEL_IS_SASL_GSSAPI(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_GSSAPI_TYPE))
+#define CAMEL_SASL_GSSAPI(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SASL_GSSAPI_TYPE, CamelSaslGssapi))
+#define CAMEL_SASL_GSSAPI_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SASL_GSSAPI_TYPE, CamelSaslGssapiClass))
+#define CAMEL_IS_SASL_GSSAPI(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SASL_GSSAPI_TYPE))
G_BEGIN_DECLS
@@ -50,7 +50,7 @@
};
/* Standard Camel function */
-CamelType camel_sasl_gssapi_get_type (void);
+GType camel_sasl_gssapi_get_type (void);
extern CamelServiceAuthType camel_sasl_gssapi_authtype;
Modified: branches/camel-gobject/camel/camel-sasl-kerberos4.c
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-kerberos4.c (original)
+++ branches/camel-gobject/camel/camel-sasl-kerberos4.c Mon Nov 10 00:44:12 2008
@@ -79,7 +79,7 @@
{
CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (camel_sasl_kerberos4_class);
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
+ parent_class = CAMEL_SASL_CLASS (g_type_class_peek (camel_sasl_get_type ()));
/* virtual method overload */
camel_sasl_class->challenge = krb4_challenge;
@@ -105,12 +105,12 @@
}
-CamelType
+GType
camel_sasl_kerberos4_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_sasl_get_type (),
"CamelSaslKerberos4",
sizeof (CamelSaslKerberos4),
Modified: branches/camel-gobject/camel/camel-sasl-kerberos4.h
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-kerberos4.h (original)
+++ branches/camel-gobject/camel/camel-sasl-kerberos4.h Mon Nov 10 00:44:12 2008
@@ -27,9 +27,9 @@
#include <camel/camel-sasl.h>
#define CAMEL_SASL_KERBEROS4_TYPE (camel_sasl_kerberos4_get_type ())
-#define CAMEL_SASL_KERBEROS4(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_KERBEROS4_TYPE, CamelSaslKerberos4))
-#define CAMEL_SASL_KERBEROS4_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_KERBEROS4_TYPE, CamelSaslKerberos4Class))
-#define CAMEL_IS_SASL_KERBEROS4(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_KERBEROS4_TYPE))
+#define CAMEL_SASL_KERBEROS4(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SASL_KERBEROS4_TYPE, CamelSaslKerberos4))
+#define CAMEL_SASL_KERBEROS4_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SASL_KERBEROS4_TYPE, CamelSaslKerberos4Class))
+#define CAMEL_IS_SASL_KERBEROS4(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SASL_KERBEROS4_TYPE))
G_BEGIN_DECLS
@@ -47,7 +47,7 @@
/* Standard Camel function */
-CamelType camel_sasl_kerberos4_get_type (void);
+GType camel_sasl_kerberos4_get_type (void);
extern CamelServiceAuthType camel_sasl_kerberos4_authtype;
Modified: branches/camel-gobject/camel/camel-sasl-login.c
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-login.c (original)
+++ branches/camel-gobject/camel/camel-sasl-login.c Mon Nov 10 00:44:12 2008
@@ -63,7 +63,7 @@
{
CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (camel_sasl_login_class);
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
+ parent_class = CAMEL_SASL_CLASS (g_type_class_peek (camel_sasl_get_type ()));
/* virtual method overload */
camel_sasl_class->challenge = login_challenge;
@@ -86,12 +86,12 @@
}
-CamelType
+GType
camel_sasl_login_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_sasl_get_type (),
"CamelSaslLogin",
sizeof (CamelSaslLogin),
Modified: branches/camel-gobject/camel/camel-sasl-login.h
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-login.h (original)
+++ branches/camel-gobject/camel/camel-sasl-login.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-sasl.h>
#define CAMEL_SASL_LOGIN_TYPE (camel_sasl_login_get_type ())
-#define CAMEL_SASL_LOGIN(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_LOGIN_TYPE, CamelSaslLogin))
-#define CAMEL_SASL_LOGIN_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_LOGIN_TYPE, CamelSaslLoginClass))
-#define CAMEL_IS_SASL_LOGIN(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_LOGIN_TYPE))
+#define CAMEL_SASL_LOGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SASL_LOGIN_TYPE, CamelSaslLogin))
+#define CAMEL_SASL_LOGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SASL_LOGIN_TYPE, CamelSaslLoginClass))
+#define CAMEL_IS_SASL_LOGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SASL_LOGIN_TYPE))
G_BEGIN_DECLS
@@ -47,7 +47,7 @@
/* Standard Camel function */
-CamelType camel_sasl_login_get_type (void);
+GType camel_sasl_login_get_type (void);
extern CamelServiceAuthType camel_sasl_login_authtype;
Modified: branches/camel-gobject/camel/camel-sasl-ntlm.c
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-ntlm.c (original)
+++ branches/camel-gobject/camel/camel-sasl-ntlm.c Mon Nov 10 00:44:12 2008
@@ -49,18 +49,18 @@
{
CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (camel_sasl_ntlm_class);
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
+ parent_class = CAMEL_SASL_CLASS (g_type_class_peek (camel_sasl_get_type ()));
/* virtual method overload */
camel_sasl_class->challenge = ntlm_challenge;
}
-CamelType
+GType
camel_sasl_ntlm_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (
camel_sasl_get_type (), "CamelSaslNTLM",
sizeof (CamelSaslNTLM),
Modified: branches/camel-gobject/camel/camel-sasl-ntlm.h
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-ntlm.h (original)
+++ branches/camel-gobject/camel/camel-sasl-ntlm.h Mon Nov 10 00:44:12 2008
@@ -24,9 +24,9 @@
#include <camel/camel-sasl.h>
#define CAMEL_SASL_NTLM_TYPE (camel_sasl_ntlm_get_type ())
-#define CAMEL_SASL_NTLM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_NTLM_TYPE, CamelSaslNTLM))
-#define CAMEL_SASL_NTLM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_NTLM_TYPE, CamelSaslNTLMClass))
-#define CAMEL_IS_SASL_NTLM(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_NTLM_TYPE))
+#define CAMEL_SASL_NTLM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SASL_NTLM_TYPE, CamelSaslNTLM))
+#define CAMEL_SASL_NTLM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SASL_NTLM_TYPE, CamelSaslNTLMClass))
+#define CAMEL_IS_SASL_NTLM(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SASL_NTLM_TYPE))
G_BEGIN_DECLS
@@ -43,7 +43,7 @@
/* Standard Camel function */
-CamelType camel_sasl_ntlm_get_type (void);
+GType camel_sasl_ntlm_get_type (void);
extern CamelServiceAuthType camel_sasl_ntlm_authtype;
Modified: branches/camel-gobject/camel/camel-sasl-plain.c
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-plain.c (original)
+++ branches/camel-gobject/camel/camel-sasl-plain.c Mon Nov 10 00:44:12 2008
@@ -54,18 +54,18 @@
{
CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (camel_sasl_plain_class);
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
+ parent_class = CAMEL_SASL_CLASS (g_type_class_peek (camel_sasl_get_type ()));
/* virtual method overload */
camel_sasl_class->challenge = plain_challenge;
}
-CamelType
+GType
camel_sasl_plain_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_sasl_get_type (),
"CamelSaslPlain",
sizeof (CamelSaslPlain),
Modified: branches/camel-gobject/camel/camel-sasl-plain.h
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-plain.h (original)
+++ branches/camel-gobject/camel/camel-sasl-plain.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-sasl.h>
#define CAMEL_SASL_PLAIN_TYPE (camel_sasl_plain_get_type ())
-#define CAMEL_SASL_PLAIN(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_PLAIN_TYPE, CamelSaslPlain))
-#define CAMEL_SASL_PLAIN_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_PLAIN_TYPE, CamelSaslPlainClass))
-#define CAMEL_IS_SASL_PLAIN(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_PLAIN_TYPE))
+#define CAMEL_SASL_PLAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SASL_PLAIN_TYPE, CamelSaslPlain))
+#define CAMEL_SASL_PLAIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SASL_PLAIN_TYPE, CamelSaslPlainClass))
+#define CAMEL_IS_SASL_PLAIN(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SASL_PLAIN_TYPE))
G_BEGIN_DECLS
@@ -45,7 +45,7 @@
/* Standard Camel function */
-CamelType camel_sasl_plain_get_type (void);
+GType camel_sasl_plain_get_type (void);
extern CamelServiceAuthType camel_sasl_plain_authtype;
Modified: branches/camel-gobject/camel/camel-sasl-popb4smtp.c
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-popb4smtp.c (original)
+++ branches/camel-gobject/camel/camel-sasl-popb4smtp.c Mon Nov 10 00:44:12 2008
@@ -66,7 +66,7 @@
{
CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (camel_sasl_popb4smtp_class);
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
+ parent_class = CAMEL_SASL_CLASS (g_type_class_peek (camel_sasl_get_type ()));
/* virtual method overload */
camel_sasl_class->challenge = popb4smtp_challenge;
@@ -74,12 +74,12 @@
poplast = g_hash_table_new(g_str_hash, g_str_equal);
}
-CamelType
+GType
camel_sasl_popb4smtp_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_sasl_get_type (),
"CamelSaslPOPB4SMTP",
sizeof (CamelSaslPOPB4SMTP),
@@ -138,7 +138,7 @@
store = camel_session_get_store(session, popuri, ex);
if (store) {
sasl->authenticated = TRUE;
- camel_object_unref((CamelObject *)store);
+ g_object_unref((CamelObject *)store);
*timep = now;
} else {
sasl->authenticated = FALSE;
Modified: branches/camel-gobject/camel/camel-sasl-popb4smtp.h
==============================================================================
--- branches/camel-gobject/camel/camel-sasl-popb4smtp.h (original)
+++ branches/camel-gobject/camel/camel-sasl-popb4smtp.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-sasl.h>
#define CAMEL_SASL_POPB4SMTP_TYPE (camel_sasl_popb4smtp_get_type ())
-#define CAMEL_SASL_POPB4SMTP(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_POPB4SMTP_TYPE, CamelSaslPOPB4SMTP))
-#define CAMEL_SASL_POPB4SMTP_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_POPB4SMTP_TYPE, CamelSaslPOPB4SMTPClass))
-#define CAMEL_IS_SASL_POPB4SMTP(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_POPB4SMTP_TYPE))
+#define CAMEL_SASL_POPB4SMTP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SASL_POPB4SMTP_TYPE, CamelSaslPOPB4SMTP))
+#define CAMEL_SASL_POPB4SMTP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SASL_POPB4SMTP_TYPE, CamelSaslPOPB4SMTPClass))
+#define CAMEL_IS_SASL_POPB4SMTP(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SASL_POPB4SMTP_TYPE))
G_BEGIN_DECLS
@@ -45,7 +45,7 @@
/* Standard Camel function */
-CamelType camel_sasl_popb4smtp_get_type (void);
+GType camel_sasl_popb4smtp_get_type (void);
extern CamelServiceAuthType camel_sasl_popb4smtp_authtype;
Modified: branches/camel-gobject/camel/camel-sasl.c
==============================================================================
--- branches/camel-gobject/camel/camel-sasl.c (original)
+++ branches/camel-gobject/camel/camel-sasl.c Mon Nov 10 00:44:12 2008
@@ -52,7 +52,7 @@
static void
camel_sasl_class_init (CamelSaslClass *camel_sasl_class)
{
- parent_class = camel_type_get_global_classfuncs (CAMEL_OBJECT_TYPE);
+ parent_class = g_type_class_peek (CAMEL_TYPE_OBJECT);
/* virtual method definition */
camel_sasl_class->challenge = sasl_challenge;
@@ -63,16 +63,16 @@
{
g_free (sasl->service_name);
g_free (sasl->mech);
- camel_object_unref (sasl->service);
+ g_object_unref (sasl->service);
}
-CamelType
+GType
camel_sasl_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (CAMEL_OBJECT_TYPE,
+ if (type == G_TYPE_INVALID) {
+ type = camel_type_register (CAMEL_TYPE_OBJECT,
"CamelSasl",
sizeof (CamelSasl),
sizeof (CamelSaslClass),
@@ -223,7 +223,7 @@
sasl->mech = g_strdup (mechanism);
sasl->service_name = g_strdup (service_name);
sasl->service = service;
- camel_object_ref (service);
+ g_object_ref (service);
return sasl;
}
Modified: branches/camel-gobject/camel/camel-sasl.h
==============================================================================
--- branches/camel-gobject/camel/camel-sasl.h (original)
+++ branches/camel-gobject/camel/camel-sasl.h Mon Nov 10 00:44:12 2008
@@ -29,9 +29,9 @@
#include <camel/camel-service.h>
#define CAMEL_SASL_TYPE (camel_sasl_get_type ())
-#define CAMEL_SASL(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_TYPE, CamelSasl))
-#define CAMEL_SASL_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_TYPE, CamelSaslClass))
-#define CAMEL_IS_SASL(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_TYPE))
+#define CAMEL_SASL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SASL_TYPE, CamelSasl))
+#define CAMEL_SASL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SASL_TYPE, CamelSaslClass))
+#define CAMEL_IS_SASL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SASL_TYPE))
G_BEGIN_DECLS
@@ -54,7 +54,7 @@
/* Standard Camel function */
-CamelType camel_sasl_get_type (void);
+GType camel_sasl_get_type (void);
/* public methods */
GByteArray *camel_sasl_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex);
Modified: branches/camel-gobject/camel/camel-search-private.c
==============================================================================
--- branches/camel-gobject/camel/camel-search-private.c (original)
+++ branches/camel-gobject/camel/camel-search-private.c Mon Nov 10 00:44:12 2008
@@ -476,7 +476,7 @@
for (i=0; !truth && camel_internet_address_get(cia, i, &name, &addr);i++)
truth = (name && header_match(name, match, how)) || (addr && header_match(addr, match, how));
- camel_object_unref (cia);
+ g_object_unref (cia);
break;
}
@@ -516,7 +516,7 @@
camel_data_wrapper_write_to_stream (containee, CAMEL_STREAM (mem));
camel_stream_write (CAMEL_STREAM (mem), "", 1);
truth = regexec (pattern, (char *) mem->buffer->data, 0, NULL, 0) == 0;
- camel_object_unref (mem);
+ g_object_unref (mem);
}
return truth;
Modified: branches/camel-gobject/camel/camel-seekable-stream.c
==============================================================================
--- branches/camel-gobject/camel/camel-seekable-stream.c (original)
+++ branches/camel-gobject/camel/camel-seekable-stream.c Mon Nov 10 00:44:12 2008
@@ -44,7 +44,7 @@
CamelStreamClass *camel_stream_class =
CAMEL_STREAM_CLASS (camel_seekable_stream_class);
- parent_class = CAMEL_STREAM_CLASS( camel_type_get_global_classfuncs( CAMEL_STREAM_TYPE ) );
+ parent_class = CAMEL_STREAM_CLASS( g_type_class_peek( CAMEL_STREAM_TYPE ) );
/* seekable stream methods */
camel_seekable_stream_class->seek = seek;
@@ -64,12 +64,12 @@
stream->bound_end = CAMEL_STREAM_UNBOUND;
}
-CamelType
+GType
camel_seekable_stream_get_type (void)
{
- static CamelType camel_seekable_stream_type = CAMEL_INVALID_TYPE;
+ static GType camel_seekable_stream_type = G_TYPE_INVALID;
- if (camel_seekable_stream_type == CAMEL_INVALID_TYPE) {
+ if (camel_seekable_stream_type == G_TYPE_INVALID) {
camel_seekable_stream_type = camel_type_register( CAMEL_STREAM_TYPE,
"CamelSeekableStream",
sizeof( CamelSeekableStream ),
Modified: branches/camel-gobject/camel/camel-seekable-stream.h
==============================================================================
--- branches/camel-gobject/camel/camel-seekable-stream.h (original)
+++ branches/camel-gobject/camel/camel-seekable-stream.h Mon Nov 10 00:44:12 2008
@@ -31,9 +31,9 @@
#include <camel/camel-stream.h>
#define CAMEL_SEEKABLE_STREAM_TYPE (camel_seekable_stream_get_type ())
-#define CAMEL_SEEKABLE_STREAM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SEEKABLE_STREAM_TYPE, CamelSeekableStream))
-#define CAMEL_SEEKABLE_STREAM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SEEKABLE_STREAM_TYPE, CamelSeekableStreamClass))
-#define CAMEL_IS_SEEKABLE_STREAM(o) (CAMEL_CHECK_TYPE((o), CAMEL_SEEKABLE_STREAM_TYPE))
+#define CAMEL_SEEKABLE_STREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SEEKABLE_STREAM_TYPE, CamelSeekableStream))
+#define CAMEL_SEEKABLE_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SEEKABLE_STREAM_TYPE, CamelSeekableStreamClass))
+#define CAMEL_IS_SEEKABLE_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SEEKABLE_STREAM_TYPE))
G_BEGIN_DECLS
@@ -65,7 +65,7 @@
} CamelSeekableStreamClass;
/* Standard Camel function */
-CamelType camel_seekable_stream_get_type (void);
+GType camel_seekable_stream_get_type (void);
/* public methods */
off_t camel_seekable_stream_seek (CamelSeekableStream *stream, off_t offset,
Modified: branches/camel-gobject/camel/camel-seekable-substream.c
==============================================================================
--- branches/camel-gobject/camel/camel-seekable-substream.c (original)
+++ branches/camel-gobject/camel/camel-seekable-substream.c Mon Nov 10 00:44:12 2008
@@ -48,7 +48,7 @@
CamelStreamClass *camel_stream_class =
CAMEL_STREAM_CLASS (camel_seekable_substream_class);
- parent_class = CAMEL_SEEKABLE_STREAM_CLASS (camel_type_get_global_classfuncs (camel_seekable_stream_get_type ()));
+ parent_class = CAMEL_SEEKABLE_STREAM_CLASS (g_type_class_peek (camel_seekable_stream_get_type ()));
/* virtual method definition */
@@ -70,16 +70,16 @@
CAMEL_SEEKABLE_SUBSTREAM (object);
if (seekable_substream->parent_stream)
- camel_object_unref (seekable_substream->parent_stream);
+ g_object_unref (seekable_substream->parent_stream);
}
-CamelType
+GType
camel_seekable_substream_get_type (void)
{
- static CamelType camel_seekable_substream_type = CAMEL_INVALID_TYPE;
+ static GType camel_seekable_substream_type = G_TYPE_INVALID;
- if (camel_seekable_substream_type == CAMEL_INVALID_TYPE) {
+ if (camel_seekable_substream_type == G_TYPE_INVALID) {
camel_seekable_substream_type = camel_type_register (camel_seekable_stream_get_type (), "CamelSeekableSubstream",
sizeof (CamelSeekableSubstream),
sizeof (CamelSeekableSubstreamClass),
@@ -121,7 +121,7 @@
/* Initialize it. */
seekable_substream->parent_stream = parent_stream;
- camel_object_ref (parent_stream);
+ g_object_ref (parent_stream);
/* Set the bound of the substream. We can ignore any possible error
* here, because if we fail to seek now, it will try again later.
Modified: branches/camel-gobject/camel/camel-seekable-substream.h
==============================================================================
--- branches/camel-gobject/camel/camel-seekable-substream.h (original)
+++ branches/camel-gobject/camel/camel-seekable-substream.h Mon Nov 10 00:44:12 2008
@@ -29,9 +29,9 @@
#include <camel/camel-seekable-stream.h>
#define CAMEL_SEEKABLE_SUBSTREAM_TYPE (camel_seekable_substream_get_type ())
-#define CAMEL_SEEKABLE_SUBSTREAM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SEEKABLE_SUBSTREAM_TYPE, CamelSeekableSubstream))
-#define CAMEL_SEEKABLE_SUBSTREAM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SEEKABLE_SUBSTREAM_TYPE, CamelSeekableSubstreamClass))
-#define CAMEL_IS_SEEKABLE_SUBSTREAM(o) (CAMEL_CHECK_TYPE((o), CAMEL_SEEKABLE_SUBSTREAM_TYPE))
+#define CAMEL_SEEKABLE_SUBSTREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SEEKABLE_SUBSTREAM_TYPE, CamelSeekableSubstream))
+#define CAMEL_SEEKABLE_SUBSTREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SEEKABLE_SUBSTREAM_TYPE, CamelSeekableSubstreamClass))
+#define CAMEL_IS_SEEKABLE_SUBSTREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SEEKABLE_SUBSTREAM_TYPE))
G_BEGIN_DECLS
@@ -48,7 +48,7 @@
} CamelSeekableSubstreamClass;
/* Standard Camel function */
-CamelType camel_seekable_substream_get_type (void);
+GType camel_seekable_substream_get_type (void);
/* public methods */
Modified: branches/camel-gobject/camel/camel-service.c
==============================================================================
--- branches/camel-gobject/camel/camel-service.c (original)
+++ branches/camel-gobject/camel/camel-service.c Mon Nov 10 00:44:12 2008
@@ -71,7 +71,7 @@
{
CamelObjectClass *object_class = CAMEL_OBJECT_CLASS (camel_service_class);
- parent_class = camel_type_get_global_classfuncs (CAMEL_OBJECT_TYPE);
+ parent_class = g_type_class_peek (CAMEL_TYPE_OBJECT);
/* virtual method overloading */
object_class->setv = service_setv;
@@ -117,7 +117,7 @@
if (service->url)
camel_url_free (service->url);
if (service->session)
- camel_object_unref (service->session);
+ g_object_unref (service->session);
g_static_rec_mutex_free (&service->priv->connect_lock);
g_static_mutex_free (&service->priv->connect_op_lock);
@@ -127,14 +127,14 @@
-CamelType
+GType
camel_service_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type =
- camel_type_register (CAMEL_OBJECT_TYPE,
+ camel_type_register (CAMEL_TYPE_OBJECT,
"CamelService",
sizeof (CamelService),
sizeof (CamelServiceClass),
@@ -282,7 +282,7 @@
service->provider = provider;
service->url = camel_url_copy(url);
service->session = session;
- camel_object_ref (session);
+ g_object_ref (session);
service->status = CAMEL_SERVICE_DISCONNECTED;
@@ -491,7 +491,7 @@
get_name (CamelService *service, gboolean brief)
{
w(g_warning ("CamelService::get_name not implemented for '%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (service))));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (service))));
return g_strdup ("???");
}
Modified: branches/camel-gobject/camel/camel-service.h
==============================================================================
--- branches/camel-gobject/camel/camel-service.h (original)
+++ branches/camel-gobject/camel/camel-service.h Mon Nov 10 00:44:12 2008
@@ -31,9 +31,9 @@
#include <camel/camel-operation.h>
#define CAMEL_SERVICE_TYPE (camel_service_get_type ())
-#define CAMEL_SERVICE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SERVICE_TYPE, CamelService))
-#define CAMEL_SERVICE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SERVICE_TYPE, CamelServiceClass))
-#define CAMEL_IS_SERVICE(o) (CAMEL_CHECK_TYPE((o), CAMEL_SERVICE_TYPE))
+#define CAMEL_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SERVICE_TYPE, CamelService))
+#define CAMEL_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SERVICE_TYPE, CamelServiceClass))
+#define CAMEL_IS_SERVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SERVICE_TYPE))
G_BEGIN_DECLS
@@ -126,7 +126,7 @@
CamelException *ex);
/* Standard Camel function */
-CamelType camel_service_get_type (void);
+GType camel_service_get_type (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/camel-session.c
==============================================================================
--- branches/camel-gobject/camel/camel-session.c (original)
+++ branches/camel-gobject/camel/camel-session.c Mon Nov 10 00:44:12 2008
@@ -123,12 +123,12 @@
camel_object_class_add_event((CamelObjectClass *)camel_session_class, "online", NULL);
}
-CamelType
+GType
camel_session_get_type (void)
{
- static CamelType camel_session_type = CAMEL_INVALID_TYPE;
+ static GType camel_session_type = G_TYPE_INVALID;
- if (camel_session_type == CAMEL_INVALID_TYPE) {
+ if (camel_session_type == G_TYPE_INVALID) {
camel_session_type = camel_type_register (
camel_object_get_type (), "CamelSession",
sizeof (CamelSession),
@@ -198,7 +198,7 @@
camel_service_construct (service, session, provider, url, &internal_ex);
if (camel_exception_is_set (&internal_ex)) {
camel_exception_xfer (ex, &internal_ex);
- camel_object_unref (service);
+ g_object_unref (service);
service = NULL;
camel_object_bag_abort(provider->service_cache[type], url);
} else {
@@ -273,7 +273,7 @@
if (svc->status != CAMEL_SERVICE_CONNECTED) {
if (camel_service_connect (svc, ex) == FALSE) {
- camel_object_unref (svc);
+ g_object_unref (svc);
return NULL;
}
}
@@ -546,7 +546,7 @@
m = g_malloc0(size);
m->ops = ops;
m->session = session;
- camel_object_ref(session);
+ g_object_ref(session);
m->op = camel_operation_new(cs_thread_status, m);
camel_exception_init(&m->ex);
CAMEL_SESSION_LOCK(session, thread_lock);
@@ -577,7 +577,7 @@
if (msg->op)
camel_operation_unref(msg->op);
camel_exception_clear(&msg->ex);
- camel_object_unref(msg->session);
+ g_object_unref(msg->session);
g_free(msg);
}
Modified: branches/camel-gobject/camel/camel-session.h
==============================================================================
--- branches/camel-gobject/camel/camel-session.h (original)
+++ branches/camel-gobject/camel/camel-session.h Mon Nov 10 00:44:12 2008
@@ -33,9 +33,9 @@
#include <camel/camel-junk-plugin.h>
#define CAMEL_SESSION_TYPE (camel_session_get_type ())
-#define CAMEL_SESSION(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SESSION_TYPE, CamelSession))
-#define CAMEL_SESSION_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SESSION_TYPE, CamelSessionClass))
-#define CAMEL_IS_SESSION(o) (CAMEL_CHECK_TYPE((o), CAMEL_SESSION_TYPE))
+#define CAMEL_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SESSION_TYPE, CamelSession))
+#define CAMEL_SESSION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SESSION_TYPE, CamelSessionClass))
+#define CAMEL_IS_SESSION(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SESSION_TYPE))
G_BEGIN_DECLS
@@ -124,7 +124,7 @@
/* public methods */
/* Standard Camel function */
-CamelType camel_session_get_type (void);
+GType camel_session_get_type (void);
void camel_session_construct (CamelSession *session,
Modified: branches/camel-gobject/camel/camel-smime-context.c
==============================================================================
--- branches/camel-gobject/camel/camel-smime-context.c (original)
+++ branches/camel-gobject/camel/camel-smime-context.c Mon Nov 10 00:44:12 2008
@@ -106,7 +106,7 @@
cipher =(CamelCipherContext *) ctx;
cipher->session = session;
- camel_object_ref(session);
+ g_object_ref(session);
return cipher;
}
@@ -161,7 +161,7 @@
NULL, NULL); /* decrypt key callback */
NSS_CMSDecoder_Update(dec, (char *) istream->buffer->data, istream->buffer->len);
- camel_object_unref(istream);
+ g_object_unref(istream);
cmsg = NSS_CMSDecoder_Finish(dec);
if (cmsg) {
@@ -449,7 +449,7 @@
mps->signature = sigpart;
mps->contentraw = istream;
camel_stream_reset(istream);
- camel_object_ref(istream);
+ g_object_ref(istream);
camel_medium_set_content_object((CamelMedium *)opart, (CamelDataWrapper *)mps);
} else {
@@ -467,10 +467,10 @@
camel_mime_part_set_encoding(opart, CAMEL_TRANSFER_ENCODING_BASE64);
}
- camel_object_unref(dw);
+ g_object_unref(dw);
fail:
- camel_object_unref(ostream);
- camel_object_unref(istream);
+ g_object_unref(ostream);
+ g_object_unref(istream);
return res;
}
@@ -566,7 +566,7 @@
mem = (CamelStreamMem *)camel_stream_mem_new();
camel_stream_write_to_stream(extstream, (CamelStream *)mem);
NSS_CMSDigestContext_Update(digcx, mem->buffer->data, mem->buffer->len);
- camel_object_unref(mem);
+ g_object_unref(mem);
if (NSS_CMSDigestContext_FinishMultiple(digcx, poolp, &digests) != SECSuccess) {
camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot calculate digests"));
@@ -731,9 +731,9 @@
NSS_CMSMessage_Destroy(cmsg);
fail:
- camel_object_unref(mem);
+ g_object_unref(mem);
if (constream)
- camel_object_unref(constream);
+ g_object_unref(constream);
return valid;
}
@@ -858,11 +858,11 @@
camel_data_wrapper_write_to_stream((CamelDataWrapper *)ipart, (CamelStream *)mem);
if (NSS_CMSEncoder_Update(enc, (char *) mem->buffer->data, mem->buffer->len) != SECSuccess) {
NSS_CMSEncoder_Cancel(enc);
- camel_object_unref(mem);
+ g_object_unref(mem);
camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Failed to add data to encoder"));
goto fail;
}
- camel_object_unref(mem);
+ g_object_unref(mem);
if (NSS_CMSEncoder_Finish(enc) != SECSuccess) {
camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Failed to encode data"));
@@ -877,7 +877,7 @@
dw = camel_data_wrapper_new();
camel_data_wrapper_construct_from_stream(dw, ostream);
- camel_object_unref(ostream);
+ g_object_unref(ostream);
dw->encoding = CAMEL_TRANSFER_ENCODING_BINARY;
ct = camel_content_type_new("application", "x-pkcs7-mime");
@@ -887,7 +887,7 @@
camel_content_type_unref(ct);
camel_medium_set_content_object((CamelMedium *)opart, dw);
- camel_object_unref(dw);
+ g_object_unref(dw);
camel_mime_part_set_disposition(opart, "attachment");
camel_mime_part_set_filename(opart, "smime.p7m");
@@ -898,7 +898,7 @@
fail:
if (ostream)
- camel_object_unref(ostream);
+ g_object_unref(ostream);
if (cmsg)
NSS_CMSMessage_Destroy(cmsg);
if (bulkkey)
@@ -942,7 +942,7 @@
if (NSS_CMSDecoder_Update(dec, (char *) istream->buffer->data, istream->buffer->len) != SECSuccess) {
printf("decoder update failed\n");
}
- camel_object_unref(istream);
+ g_object_unref(istream);
cmsg = NSS_CMSDecoder_Finish(dec);
if (cmsg == NULL) {
@@ -972,7 +972,7 @@
NSS_CMSMessage_Destroy(cmsg);
fail:
- camel_object_unref(ostream);
+ g_object_unref(ostream);
return valid;
}
@@ -1000,7 +1000,7 @@
{
CamelCipherContextClass *cipher_class = CAMEL_CIPHER_CONTEXT_CLASS(klass);
- parent_class = CAMEL_CIPHER_CONTEXT_CLASS(camel_type_get_global_classfuncs(camel_cipher_context_get_type()));
+ parent_class = CAMEL_CIPHER_CONTEXT_CLASS(g_type_class_peek(camel_cipher_context_get_type()));
cipher_class->hash_to_id = sm_hash_to_id;
cipher_class->id_to_hash = sm_id_to_hash;
@@ -1037,12 +1037,12 @@
g_free(context->priv);
}
-CamelType
+GType
camel_smime_context_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_cipher_context_get_type(),
"CamelSMIMEContext",
sizeof(CamelSMIMEContext),
Modified: branches/camel-gobject/camel/camel-smime-context.h
==============================================================================
--- branches/camel-gobject/camel/camel-smime-context.h (original)
+++ branches/camel-gobject/camel/camel-smime-context.h Mon Nov 10 00:44:12 2008
@@ -27,9 +27,9 @@
#include <camel/camel-cipher-context.h>
#define CAMEL_SMIME_CONTEXT_TYPE (camel_smime_context_get_type())
-#define CAMEL_SMIME_CONTEXT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SMIME_CONTEXT_TYPE, CamelSMIMEContext))
-#define CAMEL_SMIME_CONTEXT_CLASS(k)(CAMEL_CHECK_CLASS_CAST((k), CAMEL_SMIME_CONTEXT_TYPE, CamelSMIMEContextClass))
-#define CAMEL_IS_SMIME_CONTEXT(o) (CAMEL_CHECK_TYPE((o), CAMEL_SMIME_CONTEXT_TYPE))
+#define CAMEL_SMIME_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SMIME_CONTEXT_TYPE, CamelSMIMEContext))
+#define CAMEL_SMIME_CONTEXT_CLASS(k)(G_TYPE_CHECK_CLASS_CAST((k), CAMEL_SMIME_CONTEXT_TYPE, CamelSMIMEContextClass))
+#define CAMEL_IS_SMIME_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SMIME_CONTEXT_TYPE))
G_BEGIN_DECLS
@@ -58,7 +58,7 @@
CamelCipherContextClass cipher_class;
};
-CamelType camel_smime_context_get_type(void);
+GType camel_smime_context_get_type(void);
CamelCipherContext *camel_smime_context_new(CamelSession *session);
Modified: branches/camel-gobject/camel/camel-store-summary.c
==============================================================================
--- branches/camel-gobject/camel/camel-store-summary.c (original)
+++ branches/camel-gobject/camel/camel-store-summary.c Mon Nov 10 00:44:12 2008
@@ -74,7 +74,7 @@
static void
camel_store_summary_class_init (CamelStoreSummaryClass *klass)
{
- camel_store_summary_parent = camel_type_get_global_classfuncs (camel_object_get_type ());
+ camel_store_summary_parent = g_type_class_peek (camel_object_get_type ());
klass->summary_header_load = summary_header_load;
klass->summary_header_save = summary_header_save;
@@ -138,12 +138,12 @@
g_free(p);
}
-CamelType
+GType
camel_store_summary_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_object_get_type (), "CamelStoreSummary",
sizeof (CamelStoreSummary),
sizeof (CamelStoreSummaryClass),
Modified: branches/camel-gobject/camel/camel-store-summary.h
==============================================================================
--- branches/camel-gobject/camel/camel-store-summary.h (original)
+++ branches/camel-gobject/camel/camel-store-summary.h Mon Nov 10 00:44:12 2008
@@ -31,9 +31,9 @@
#include <camel/camel-object.h>
#include <camel/camel-url.h>
-#define CAMEL_STORE_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_store_summary_get_type (), CamelStoreSummary)
-#define CAMEL_STORE_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_store_summary_get_type (), CamelStoreSummaryClass)
-#define CAMEL_IS_STORE_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_store_summary_get_type ())
+#define CAMEL_STORE_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_store_summary_get_type (), CamelStoreSummary)
+#define CAMEL_STORE_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_store_summary_get_type (), CamelStoreSummaryClass)
+#define CAMEL_IS_STORE_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_store_summary_get_type ())
G_BEGIN_DECLS
@@ -126,7 +126,7 @@
void (*store_info_set_string)(CamelStoreSummary *, CamelStoreInfo *, int, const char *);
};
-CamelType camel_store_summary_get_type (void);
+GType camel_store_summary_get_type (void);
CamelStoreSummary *camel_store_summary_new (void);
void camel_store_summary_set_filename(CamelStoreSummary *summary, const char *filename);
Modified: branches/camel-gobject/camel/camel-store.c
==============================================================================
--- branches/camel-gobject/camel/camel-store.c (original)
+++ branches/camel-gobject/camel/camel-store.c Mon Nov 10 00:44:12 2008
@@ -93,7 +93,7 @@
CamelObjectClass *camel_object_class = CAMEL_OBJECT_CLASS (camel_store_class);
CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS(camel_store_class);
- parent_class = CAMEL_SERVICE_CLASS (camel_type_get_global_classfuncs (camel_service_get_type ()));
+ parent_class = CAMEL_SERVICE_CLASS (g_type_class_peek (camel_service_get_type ()));
/* virtual method definition */
camel_store_class->hash_folder_name = g_str_hash;
@@ -174,12 +174,12 @@
}
-CamelType
+GType
camel_store_get_type (void)
{
- static CamelType camel_store_type = CAMEL_INVALID_TYPE;
+ static GType camel_store_type = G_TYPE_INVALID;
- if (camel_store_type == CAMEL_INVALID_TYPE) {
+ if (camel_store_type == G_TYPE_INVALID) {
camel_store_type = camel_type_register (CAMEL_SERVICE_TYPE, "CamelStore",
sizeof (CamelStore),
sizeof (CamelStoreClass),
@@ -277,7 +277,7 @@
get_folder (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex)
{
w(g_warning ("CamelStore::get_folder not implemented for '%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (store))));
camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_INVALID,
_("Cannot get folder: Invalid operation on this store"));
@@ -316,7 +316,7 @@
_("Cannot create folder '%s': folder exists"),
folder_name);
camel_object_bag_abort (store->folders, folder_name);
- camel_object_unref (folder);
+ g_object_unref (folder);
return NULL;
}
}
@@ -334,13 +334,13 @@
if ((store->flags & CAMEL_STORE_VTRASH)
&& (vfolder = camel_object_bag_get(store->folders, CAMEL_VTRASH_NAME))) {
camel_vee_folder_add_folder(vfolder, folder);
- camel_object_unref(vfolder);
+ g_object_unref(vfolder);
}
if ((store->flags & CAMEL_STORE_VJUNK)
&& (vfolder = camel_object_bag_get(store->folders, CAMEL_VJUNK_NAME))) {
camel_vee_folder_add_folder(vfolder, folder);
- camel_object_unref(vfolder);
+ g_object_unref(vfolder);
}
}
}
@@ -374,7 +374,7 @@
const char *folder_name, CamelException *ex)
{
w(g_warning ("CamelStore::create_folder not implemented for '%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (store))));
camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_INVALID,
_("Cannot create folder: Invalid operation on this store"));
@@ -429,19 +429,19 @@
if ((store->flags & CAMEL_STORE_VTRASH)
&& (vfolder = camel_object_bag_get(store->folders, CAMEL_VTRASH_NAME))) {
camel_vee_folder_remove_folder(vfolder, folder);
- camel_object_unref(vfolder);
+ g_object_unref(vfolder);
}
if ((store->flags & CAMEL_STORE_VJUNK)
&& (vfolder = camel_object_bag_get(store->folders, CAMEL_VJUNK_NAME))) {
camel_vee_folder_remove_folder(vfolder, folder);
- camel_object_unref(vfolder);
+ g_object_unref(vfolder);
}
camel_folder_delete(folder);
camel_object_bag_remove(store->folders, folder);
- camel_object_unref(folder);
+ g_object_unref(folder);
}
}
@@ -449,7 +449,7 @@
delete_folder (CamelStore *store, const char *folder_name, CamelException *ex)
{
w(g_warning ("CamelStore::delete_folder not implemented for '%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (store))));
}
/**
@@ -498,7 +498,7 @@
rename_folder (CamelStore *store, const char *old_name, const char *new_name, CamelException *ex)
{
w(g_warning ("CamelStore::rename_folder not implemented for '%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (store))));
}
/**
@@ -553,7 +553,7 @@
} else {
g_ptr_array_remove_index_fast(folders, i);
i--;
- camel_object_unref(folder);
+ g_object_unref(folder);
}
}
}
@@ -577,7 +577,7 @@
g_free(new);
CAMEL_FOLDER_REC_UNLOCK(folder, lock);
- camel_object_unref(folder);
+ g_object_unref(folder);
}
/* Emit renamed signal */
@@ -595,7 +595,7 @@
for (i=0;i<folders->len;i++) {
folder = folders->pdata[i];
CAMEL_FOLDER_REC_UNLOCK(folder, lock);
- camel_object_unref(folder);
+ g_object_unref(folder);
}
}
@@ -647,7 +647,7 @@
for (i=0;i<folders->len;i++) {
if (!CAMEL_IS_VTRASH_FOLDER(folders->pdata[i]))
camel_vee_folder_add_folder((CamelVeeFolder *)folder, (CamelFolder *)folders->pdata[i]);
- camel_object_unref(folders->pdata[i]);
+ g_object_unref(folders->pdata[i]);
}
g_ptr_array_free(folders, TRUE);
@@ -732,7 +732,7 @@
ignore_no_such_table_exception (&x);
} else if (CAMEL_IS_VEE_FOLDER(folder))
camel_vee_folder_sync_headers(folder, NULL); /* Literally don't care of vfolder exceptions */
- camel_object_unref(folder);
+ g_object_unref(folder);
}
camel_exception_xfer(ex, &x);
g_ptr_array_free(folders, TRUE);
@@ -760,7 +760,7 @@
get_folder_info (CamelStore *store, const char *top, guint32 flags, CamelException *ex)
{
w(g_warning ("CamelStore::get_folder_info not implemented for '%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (store))));
return NULL;
}
@@ -902,7 +902,7 @@
free_folder_info (CamelStore *store, CamelFolderInfo *fi)
{
w(g_warning ("CamelStore::free_folder_info not implemented for '%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (store))));
}
/**
@@ -1176,7 +1176,7 @@
folder_subscribed(CamelStore *store, const char *folder_name)
{
w(g_warning ("CamelStore::folder_subscribed not implemented for '%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (store))));
return FALSE;
}
@@ -1211,7 +1211,7 @@
subscribe_folder(CamelStore *store, const char *folder_name, CamelException *ex)
{
w(g_warning ("CamelStore::subscribe_folder not implemented for '%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (store))));
}
/**
@@ -1239,7 +1239,7 @@
unsubscribe_folder(CamelStore *store, const char *folder_name, CamelException *ex)
{
w(g_warning ("CamelStore::unsubscribe_folder not implemented for '%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))));
+ G_OBJECT_CLASS_NAME (G_OBJECT_TYPE (store))));
}
@@ -1383,15 +1383,15 @@
static void
cis_interface_init (CamelISubscribe *cis)
{
- camel_object_class_add_event((CamelType)cis, "subscribed", NULL);
- camel_object_class_add_event((CamelType)cis, "unsubscribed", NULL);
+ camel_object_class_add_event((GType)cis, "subscribed", NULL);
+ camel_object_class_add_event((GType)cis, "unsubscribed", NULL);
}
-CamelType camel_isubscribe_get_type (void)
+GType camel_isubscribe_get_type (void)
{
- static CamelType camel_isubscribe_type = CAMEL_INVALID_TYPE;
+ static GType camel_isubscribe_type = G_TYPE_INVALID;
- if (camel_isubscribe_type == CAMEL_INVALID_TYPE) {
+ if (camel_isubscribe_type == G_TYPE_INVALID) {
camel_isubscribe_type = camel_interface_register (CAMEL_INTERFACE_TYPE, "CamelISubscribe",
sizeof (CamelISubscribe),
(CamelObjectClassInitFunc) cis_interface_init,
Modified: branches/camel-gobject/camel/camel-store.h
==============================================================================
--- branches/camel-gobject/camel/camel-store.h (original)
+++ branches/camel-gobject/camel/camel-store.h Mon Nov 10 00:44:12 2008
@@ -105,9 +105,9 @@
} CamelRenameInfo;
#define CAMEL_STORE_TYPE (camel_store_get_type ())
-#define CAMEL_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_STORE_TYPE, CamelStore))
-#define CAMEL_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_STORE_TYPE, CamelStoreClass))
-#define CAMEL_IS_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_STORE_TYPE))
+#define CAMEL_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_STORE_TYPE, CamelStore))
+#define CAMEL_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_STORE_TYPE, CamelStoreClass))
+#define CAMEL_IS_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_STORE_TYPE))
/* Flags for store flags */
#define CAMEL_STORE_SUBSCRIPTIONS (1 << 0)
@@ -202,7 +202,7 @@
} CamelStoreClass;
/* Standard Camel function */
-CamelType camel_store_get_type (void);
+GType camel_store_get_type (void);
/* public methods */
CamelFolder * camel_store_get_folder (CamelStore *store,
@@ -283,7 +283,7 @@
void (*unsubscribe)(CamelStore *store, const char *folder_name, CamelException *ex);
};
-CamelType camel_isubscribe_get_type (void);
+GType camel_isubscribe_get_type (void);
gboolean camel_isubscribe_subscribed(CamelStore *store, const char *name);
void camel_isubscribe_subscribe(CamelStore *store, const char *folder_name, CamelException *ex);
void camel_isubscribe_unsubscribe(CamelStore *store, const char *folder_name, CamelException *ex);
Modified: branches/camel-gobject/camel/camel-stream-buffer.c
==============================================================================
--- branches/camel-gobject/camel/camel-stream-buffer.c (original)
+++ branches/camel-gobject/camel/camel-stream-buffer.c Mon Nov 10 00:44:12 2008
@@ -55,7 +55,7 @@
{
CamelStreamClass *camel_stream_class = CAMEL_STREAM_CLASS (camel_stream_buffer_class);
- parent_class = CAMEL_STREAM_CLASS (camel_type_get_global_classfuncs (camel_stream_get_type ()));
+ parent_class = CAMEL_STREAM_CLASS (g_type_class_peek (camel_stream_get_type ()));
/* virtual method definition */
camel_stream_buffer_class->init = init;
@@ -94,18 +94,18 @@
g_free(sbf->buf);
}
if (sbf->stream)
- camel_object_unref (sbf->stream);
+ g_object_unref (sbf->stream);
g_free(sbf->linebuf);
}
-CamelType
+GType
camel_stream_buffer_get_type (void)
{
- static CamelType camel_stream_buffer_type = CAMEL_INVALID_TYPE;
+ static GType camel_stream_buffer_type = G_TYPE_INVALID;
- if (camel_stream_buffer_type == CAMEL_INVALID_TYPE) {
+ if (camel_stream_buffer_type == G_TYPE_INVALID) {
camel_stream_buffer_type = camel_type_register (camel_stream_get_type (), "CamelStreamBuffer",
sizeof (CamelStreamBuffer),
sizeof (CamelStreamBufferClass),
@@ -144,9 +144,9 @@
{
set_vbuf(sbf, buf, mode, size);
if (sbf->stream)
- camel_object_unref (sbf->stream);
+ g_object_unref (sbf->stream);
sbf->stream = s;
- camel_object_ref (sbf->stream);
+ g_object_ref (sbf->stream);
}
static void
Modified: branches/camel-gobject/camel/camel-stream-buffer.h
==============================================================================
--- branches/camel-gobject/camel/camel-stream-buffer.h (original)
+++ branches/camel-gobject/camel/camel-stream-buffer.h Mon Nov 10 00:44:12 2008
@@ -31,9 +31,9 @@
#include <camel/camel-seekable-stream.h>
#define CAMEL_STREAM_BUFFER_TYPE (camel_stream_buffer_get_type ())
-#define CAMEL_STREAM_BUFFER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_STREAM_BUFFER_TYPE, CamelStreamBuffer))
-#define CAMEL_STREAM_BUFFER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_STREAM_BUFFER_TYPE, CamelStreamBufferClass))
-#define CAMEL_IS_STREAM_BUFFER(o) (CAMEL_CHECK_TYPE((o), CAMEL_STREAM_BUFFER_TYPE))
+#define CAMEL_STREAM_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_STREAM_BUFFER_TYPE, CamelStreamBuffer))
+#define CAMEL_STREAM_BUFFER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_STREAM_BUFFER_TYPE, CamelStreamBufferClass))
+#define CAMEL_IS_STREAM_BUFFER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_STREAM_BUFFER_TYPE))
G_BEGIN_DECLS
@@ -77,7 +77,7 @@
/* Standard Camel function */
-CamelType camel_stream_buffer_get_type (void);
+GType camel_stream_buffer_get_type (void);
/* public methods */
Modified: branches/camel-gobject/camel/camel-stream-filter.c
==============================================================================
--- branches/camel-gobject/camel/camel-stream-filter.c (original)
+++ branches/camel-gobject/camel/camel-stream-filter.c Mon Nov 10 00:44:12 2008
@@ -77,7 +77,7 @@
{
CamelStreamClass *camel_stream_class = (CamelStreamClass *) klass;
- camel_stream_filter_parent = CAMEL_STREAM_CLASS (camel_type_get_global_classfuncs (camel_stream_get_type ()));
+ camel_stream_filter_parent = CAMEL_STREAM_CLASS (g_type_class_peek (camel_stream_get_type ()));
camel_stream_class->read = do_read;
camel_stream_class->write = do_write;
@@ -110,21 +110,21 @@
f = p->filters;
while (f) {
fn = f->next;
- camel_object_unref((CamelObject *)f->filter);
+ g_object_unref((CamelObject *)f->filter);
g_free(f);
f = fn;
}
g_free(p->realbuffer);
g_free(p);
- camel_object_unref((CamelObject *)filter->source);
+ g_object_unref((CamelObject *)filter->source);
}
-CamelType
+GType
camel_stream_filter_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (CAMEL_STREAM_TYPE, "CamelStreamFilter",
sizeof (CamelStreamFilter),
sizeof (CamelStreamFilterClass),
@@ -150,7 +150,7 @@
CamelStreamFilter *new = CAMEL_STREAM_FILTER ( camel_object_new (camel_stream_filter_get_type ()));
new->source = stream;
- camel_object_ref ((CamelObject *)stream);
+ g_object_ref ((CamelObject *)stream);
return new;
}
@@ -177,7 +177,7 @@
fn = g_malloc(sizeof(*fn));
fn->id = p->filterid++;
fn->filter = filter;
- camel_object_ref (filter);
+ g_object_ref (filter);
/* sure, we could use a GList, but we wouldn't save much */
f = (struct _filter *)&p->filters;
@@ -206,7 +206,7 @@
fn = f->next;
if (fn->id == id) {
f->next = fn->next;
- camel_object_unref(fn->filter);
+ g_object_unref(fn->filter);
g_free(fn);
}
f = f->next;
Modified: branches/camel-gobject/camel/camel-stream-filter.h
==============================================================================
--- branches/camel-gobject/camel/camel-stream-filter.h (original)
+++ branches/camel-gobject/camel/camel-stream-filter.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-stream.h>
#include <camel/camel-mime-filter.h>
-#define CAMEL_STREAM_FILTER(obj) CAMEL_CHECK_CAST (obj, camel_stream_filter_get_type (), CamelStreamFilter)
-#define CAMEL_STREAM_FILTER_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_stream_filter_get_type (), CamelStreamFilterClass)
-#define CAMEL_IS_STREAM_FILTER(obj) CAMEL_CHECK_TYPE (obj, camel_stream_filter_get_type ())
+#define CAMEL_STREAM_FILTER(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_stream_filter_get_type (), CamelStreamFilter)
+#define CAMEL_STREAM_FILTER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_stream_filter_get_type (), CamelStreamFilterClass)
+#define CAMEL_IS_STREAM_FILTER(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_stream_filter_get_type ())
G_BEGIN_DECLS
@@ -46,7 +46,7 @@
CamelStreamClass parent_class;
};
-CamelType camel_stream_filter_get_type (void);
+GType camel_stream_filter_get_type (void);
CamelStreamFilter *camel_stream_filter_new_with_stream (CamelStream *stream);
Modified: branches/camel-gobject/camel/camel-stream-fs.c
==============================================================================
--- branches/camel-gobject/camel/camel-stream-fs.c (original)
+++ branches/camel-gobject/camel/camel-stream-fs.c Mon Nov 10 00:44:12 2008
@@ -60,7 +60,7 @@
CamelStreamClass *camel_stream_class =
CAMEL_STREAM_CLASS (camel_stream_fs_class);
- parent_class = CAMEL_SEEKABLE_STREAM_CLASS (camel_type_get_global_classfuncs (camel_seekable_stream_get_type ()));
+ parent_class = CAMEL_SEEKABLE_STREAM_CLASS (g_type_class_peek (camel_seekable_stream_get_type ()));
/* virtual method overload */
camel_stream_class->read = stream_read;
@@ -90,12 +90,12 @@
}
-CamelType
+GType
camel_stream_fs_get_type (void)
{
- static CamelType camel_stream_fs_type = CAMEL_INVALID_TYPE;
+ static GType camel_stream_fs_type = G_TYPE_INVALID;
- if (camel_stream_fs_type == CAMEL_INVALID_TYPE) {
+ if (camel_stream_fs_type == G_TYPE_INVALID) {
camel_stream_fs_type = camel_type_register (camel_seekable_stream_get_type (), "CamelStreamFs",
sizeof (CamelStreamFs),
sizeof (CamelStreamFsClass),
Modified: branches/camel-gobject/camel/camel-stream-fs.h
==============================================================================
--- branches/camel-gobject/camel/camel-stream-fs.h (original)
+++ branches/camel-gobject/camel/camel-stream-fs.h Mon Nov 10 00:44:12 2008
@@ -34,9 +34,9 @@
#include <camel/camel-seekable-stream.h>
#define CAMEL_STREAM_FS_TYPE (camel_stream_fs_get_type ())
-#define CAMEL_STREAM_FS(obj) (CAMEL_CHECK_CAST((obj), CAMEL_STREAM_FS_TYPE, CamelStreamFs))
-#define CAMEL_STREAM_FS_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_STREAM_FS_TYPE, CamelStreamFsClass))
-#define CAMEL_IS_STREAM_FS(o) (CAMEL_CHECK_TYPE((o), CAMEL_STREAM_FS_TYPE))
+#define CAMEL_STREAM_FS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_STREAM_FS_TYPE, CamelStreamFs))
+#define CAMEL_STREAM_FS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_STREAM_FS_TYPE, CamelStreamFsClass))
+#define CAMEL_IS_STREAM_FS(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_STREAM_FS_TYPE))
G_BEGIN_DECLS
@@ -52,7 +52,7 @@
} CamelStreamFsClass;
/* Standard Camel function */
-CamelType camel_stream_fs_get_type (void);
+GType camel_stream_fs_get_type (void);
/* public methods */
CamelStream * camel_stream_fs_new_with_name (const char *name, int flags, mode_t mode);
Modified: branches/camel-gobject/camel/camel-stream-mem.c
==============================================================================
--- branches/camel-gobject/camel/camel-stream-mem.c (original)
+++ branches/camel-gobject/camel/camel-stream-mem.c Mon Nov 10 00:44:12 2008
@@ -55,7 +55,7 @@
CamelStreamClass *camel_stream_class =
CAMEL_STREAM_CLASS (camel_stream_mem_class);
- parent_class = CAMEL_SEEKABLE_STREAM_CLASS( camel_type_get_global_classfuncs( CAMEL_SEEKABLE_STREAM_TYPE ) );
+ parent_class = CAMEL_SEEKABLE_STREAM_CLASS( g_type_class_peek( CAMEL_SEEKABLE_STREAM_TYPE ) );
/* virtual method overload */
camel_stream_class->read = stream_read;
@@ -91,12 +91,12 @@
memset(s, 0xbf, len);
}
-CamelType
+GType
camel_stream_mem_get_type (void)
{
- static CamelType camel_stream_mem_type = CAMEL_INVALID_TYPE;
+ static GType camel_stream_mem_type = G_TYPE_INVALID;
- if (camel_stream_mem_type == CAMEL_INVALID_TYPE) {
+ if (camel_stream_mem_type == G_TYPE_INVALID) {
camel_stream_mem_type = camel_type_register( CAMEL_SEEKABLE_STREAM_TYPE,
"CamelStreamMem",
sizeof( CamelStreamMem ),
Modified: branches/camel-gobject/camel/camel-stream-mem.h
==============================================================================
--- branches/camel-gobject/camel/camel-stream-mem.h (original)
+++ branches/camel-gobject/camel/camel-stream-mem.h Mon Nov 10 00:44:12 2008
@@ -30,9 +30,9 @@
#include <camel/camel-seekable-stream.h>
#define CAMEL_STREAM_MEM_TYPE (camel_stream_mem_get_type ())
-#define CAMEL_STREAM_MEM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_STREAM_MEM_TYPE, CamelStreamMem))
-#define CAMEL_STREAM_MEM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_STREAM_MEM_TYPE, CamelStreamMemClass))
-#define CAMEL_IS_STREAM_MEM(o) (CAMEL_CHECK_TYPE((o), CAMEL_STREAM_MEM_TYPE))
+#define CAMEL_STREAM_MEM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_STREAM_MEM_TYPE, CamelStreamMem))
+#define CAMEL_STREAM_MEM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_STREAM_MEM_TYPE, CamelStreamMemClass))
+#define CAMEL_IS_STREAM_MEM(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_STREAM_MEM_TYPE))
G_BEGIN_DECLS
@@ -53,7 +53,7 @@
};
/* Standard Camel function */
-CamelType camel_stream_mem_get_type (void);
+GType camel_stream_mem_get_type (void);
/* public methods */
CamelStream *camel_stream_mem_new(void);
Modified: branches/camel-gobject/camel/camel-stream-null.c
==============================================================================
--- branches/camel-gobject/camel/camel-stream-null.c (original)
+++ branches/camel-gobject/camel/camel-stream-null.c Mon Nov 10 00:44:12 2008
@@ -46,7 +46,7 @@
{
CamelStreamClass *camel_stream_class = (CamelStreamClass *)camel_stream_null_class;
- parent_class = camel_type_get_global_classfuncs( CAMEL_OBJECT_TYPE );
+ parent_class = g_type_class_peek( CAMEL_TYPE_OBJECT );
/* virtual method definition */
camel_stream_class->read = stream_read;
@@ -57,12 +57,12 @@
camel_stream_class->reset = stream_reset;
}
-CamelType
+GType
camel_stream_null_get_type (void)
{
- static CamelType camel_stream_null_type = CAMEL_INVALID_TYPE;
+ static GType camel_stream_null_type = G_TYPE_INVALID;
- if (camel_stream_null_type == CAMEL_INVALID_TYPE) {
+ if (camel_stream_null_type == G_TYPE_INVALID) {
camel_stream_null_type = camel_type_register( camel_stream_get_type(),
"CamelStreamNull",
sizeof( CamelStreamNull ),
Modified: branches/camel-gobject/camel/camel-stream-null.h
==============================================================================
--- branches/camel-gobject/camel/camel-stream-null.h (original)
+++ branches/camel-gobject/camel/camel-stream-null.h Mon Nov 10 00:44:12 2008
@@ -25,9 +25,9 @@
#include <camel/camel-stream.h>
-#define CAMEL_STREAM_NULL(obj) CAMEL_CHECK_CAST (obj, camel_stream_null_get_type (), CamelStreamNull)
-#define CAMEL_STREAM_NULL_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_stream_null_get_type (), CamelStreamNullClass)
-#define CAMEL_IS_STREAM_NULL(obj) CAMEL_CHECK_TYPE (obj, camel_stream_null_get_type ())
+#define CAMEL_STREAM_NULL(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_stream_null_get_type (), CamelStreamNull)
+#define CAMEL_STREAM_NULL_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_stream_null_get_type (), CamelStreamNullClass)
+#define CAMEL_IS_STREAM_NULL(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_stream_null_get_type ())
G_BEGIN_DECLS
@@ -43,7 +43,7 @@
CamelStreamClass parent_class;
};
-CamelType camel_stream_null_get_type (void);
+GType camel_stream_null_get_type (void);
CamelStream *camel_stream_null_new (void);
Modified: branches/camel-gobject/camel/camel-stream-process.c
==============================================================================
--- branches/camel-gobject/camel/camel-stream-process.c (original)
+++ branches/camel-gobject/camel/camel-stream-process.c Mon Nov 10 00:44:12 2008
@@ -68,7 +68,7 @@
{
CamelStreamClass *camel_stream_class = (CamelStreamClass *) camel_stream_process_class;
- parent_class = camel_type_get_global_classfuncs (CAMEL_OBJECT_TYPE);
+ parent_class = g_type_class_peek (CAMEL_TYPE_OBJECT);
/* virtual method definition */
camel_stream_class->read = stream_read;
@@ -87,12 +87,12 @@
}
-CamelType
+GType
camel_stream_process_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_stream_get_type (),
"CamelStreamProcess",
sizeof (CamelStreamProcess),
Modified: branches/camel-gobject/camel/camel-stream-process.h
==============================================================================
--- branches/camel-gobject/camel/camel-stream-process.h (original)
+++ branches/camel-gobject/camel/camel-stream-process.h Mon Nov 10 00:44:12 2008
@@ -25,9 +25,9 @@
#include <camel/camel-stream.h>
-#define CAMEL_STREAM_PROCESS(obj) CAMEL_CHECK_CAST (obj, camel_stream_process_get_type (), CamelStreamProcess)
-#define CAMEL_STREAM_PROCESS_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_stream_process_get_type (), CamelStreamProcessClass)
-#define CAMEL_IS_STREAM_PROCESS(obj) CAMEL_CHECK_TYPE (obj, camel_stream_process_get_type ())
+#define CAMEL_STREAM_PROCESS(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_stream_process_get_type (), CamelStreamProcess)
+#define CAMEL_STREAM_PROCESS_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_stream_process_get_type (), CamelStreamProcessClass)
+#define CAMEL_IS_STREAM_PROCESS(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_stream_process_get_type ())
G_BEGIN_DECLS
@@ -45,7 +45,7 @@
CamelStreamClass parent_class;
};
-CamelType camel_stream_process_get_type (void);
+GType camel_stream_process_get_type (void);
CamelStream *camel_stream_process_new (void);
int camel_stream_process_connect(CamelStreamProcess *, const char *, const char **);
Modified: branches/camel-gobject/camel/camel-stream-vfs.c
==============================================================================
--- branches/camel-gobject/camel/camel-stream-vfs.c (original)
+++ branches/camel-gobject/camel/camel-stream-vfs.c Mon Nov 10 00:44:12 2008
@@ -52,7 +52,7 @@
CamelStreamClass *camel_stream_class =
CAMEL_STREAM_CLASS (camel_stream_vfs_class);
- parent_class = CAMEL_STREAM_CLASS (camel_type_get_global_classfuncs (camel_stream_get_type ()));
+ parent_class = CAMEL_STREAM_CLASS (g_type_class_peek (camel_stream_get_type ()));
/* virtual method overload */
camel_stream_class->read = stream_read;
@@ -79,12 +79,12 @@
}
-CamelType
+GType
camel_stream_vfs_get_type (void)
{
- static CamelType camel_stream_vfs_type = CAMEL_INVALID_TYPE;
+ static GType camel_stream_vfs_type = G_TYPE_INVALID;
- if (camel_stream_vfs_type == CAMEL_INVALID_TYPE) {
+ if (camel_stream_vfs_type == G_TYPE_INVALID) {
camel_stream_vfs_type = camel_type_register (camel_stream_get_type (), "CamelStreamVFS",
sizeof (CamelStreamVFS),
sizeof (CamelStreamVFSClass),
Modified: branches/camel-gobject/camel/camel-stream-vfs.h
==============================================================================
--- branches/camel-gobject/camel/camel-stream-vfs.h (original)
+++ branches/camel-gobject/camel/camel-stream-vfs.h Mon Nov 10 00:44:12 2008
@@ -32,9 +32,9 @@
#include <camel/camel-stream.h>
#define CAMEL_STREAM_VFS_TYPE (camel_stream_vfs_get_type ())
-#define CAMEL_STREAM_VFS(obj) (CAMEL_CHECK_CAST((obj), CAMEL_STREAM_VFS_TYPE, CamelStreamVFS))
-#define CAMEL_STREAM_VFS_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_STREAM_VFS_TYPE, CamelStreamVFSClass))
-#define CAMEL_IS_STREAM_VFS(o) (CAMEL_CHECK_TYPE((o), CAMEL_STREAM_VFS_TYPE))
+#define CAMEL_STREAM_VFS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_STREAM_VFS_TYPE, CamelStreamVFS))
+#define CAMEL_STREAM_VFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_STREAM_VFS_TYPE, CamelStreamVFSClass))
+#define CAMEL_IS_STREAM_VFS(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_STREAM_VFS_TYPE))
G_BEGIN_DECLS
@@ -52,7 +52,7 @@
} CamelStreamVFSClass;
/* Standard Camel function */
-CamelType camel_stream_vfs_get_type (void);
+GType camel_stream_vfs_get_type (void);
typedef enum {
CAMEL_STREAM_VFS_CREATE, /* writable, creates new file or replaces old file */
Modified: branches/camel-gobject/camel/camel-stream.c
==============================================================================
--- branches/camel-gobject/camel/camel-stream.c (original)
+++ branches/camel-gobject/camel/camel-stream.c Mon Nov 10 00:44:12 2008
@@ -47,7 +47,7 @@
static void
camel_stream_class_init (CamelStreamClass *camel_stream_class)
{
- parent_class = camel_type_get_global_classfuncs( CAMEL_OBJECT_TYPE );
+ parent_class = g_type_class_peek( CAMEL_TYPE_OBJECT );
/* virtual method definition */
camel_stream_class->read = stream_read;
@@ -58,13 +58,13 @@
camel_stream_class->reset = stream_reset;
}
-CamelType
+GType
camel_stream_get_type (void)
{
- static CamelType camel_stream_type = CAMEL_INVALID_TYPE;
+ static GType camel_stream_type = G_TYPE_INVALID;
- if (camel_stream_type == CAMEL_INVALID_TYPE) {
- camel_stream_type = camel_type_register( CAMEL_OBJECT_TYPE,
+ if (camel_stream_type == G_TYPE_INVALID) {
+ camel_stream_type = camel_type_register( CAMEL_TYPE_OBJECT,
"CamelStream",
sizeof( CamelStream ),
sizeof( CamelStreamClass ),
Modified: branches/camel-gobject/camel/camel-stream.h
==============================================================================
--- branches/camel-gobject/camel/camel-stream.h (original)
+++ branches/camel-gobject/camel/camel-stream.h Mon Nov 10 00:44:12 2008
@@ -31,9 +31,9 @@
#include <camel/camel-object.h>
#define CAMEL_STREAM_TYPE (camel_stream_get_type ())
-#define CAMEL_STREAM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_STREAM_TYPE, CamelStream))
-#define CAMEL_STREAM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_STREAM_TYPE, CamelStreamClass))
-#define CAMEL_IS_STREAM(o) (CAMEL_CHECK_TYPE((o), CAMEL_STREAM_TYPE))
+#define CAMEL_STREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_STREAM_TYPE, CamelStream))
+#define CAMEL_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_STREAM_TYPE, CamelStreamClass))
+#define CAMEL_IS_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_STREAM_TYPE))
G_BEGIN_DECLS
@@ -59,7 +59,7 @@
} CamelStreamClass;
/* Standard Camel function */
-CamelType camel_stream_get_type (void);
+GType camel_stream_get_type (void);
/* public methods */
ssize_t camel_stream_read (CamelStream *stream, char *buffer, size_t n);
Modified: branches/camel-gobject/camel/camel-tcp-stream-openssl.c
==============================================================================
--- branches/camel-gobject/camel/camel-tcp-stream-openssl.c (original)
+++ branches/camel-gobject/camel/camel-tcp-stream-openssl.c Mon Nov 10 00:44:12 2008
@@ -86,7 +86,7 @@
CamelStreamClass *camel_stream_class =
CAMEL_STREAM_CLASS (camel_tcp_stream_ssl_class);
- parent_class = CAMEL_TCP_STREAM_CLASS (camel_type_get_global_classfuncs (camel_tcp_stream_get_type ()));
+ parent_class = CAMEL_TCP_STREAM_CLASS (g_type_class_peek (camel_tcp_stream_get_type ()));
/* virtual method overload */
camel_stream_class->read = stream_read;
@@ -138,12 +138,12 @@
}
-CamelType
+GType
camel_tcp_stream_ssl_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_tcp_stream_get_type (),
"CamelTcpStreamSSL",
sizeof (CamelTcpStreamSSL),
@@ -679,7 +679,7 @@
if (ccert->trust != CAMEL_CERT_TRUST_UNKNOWN) {
ok = ccert->trust != CAMEL_CERT_TRUST_NEVER;
camel_certdb_cert_unref (certdb, ccert);
- camel_object_unref (certdb);
+ g_object_unref (certdb);
return ok;
}
@@ -719,7 +719,7 @@
if (certdb) {
camel_certdb_cert_unref (certdb, ccert);
- camel_object_unref (certdb);
+ g_object_unref (certdb);
}
return ok;
Modified: branches/camel-gobject/camel/camel-tcp-stream-raw.c
==============================================================================
--- branches/camel-gobject/camel/camel-tcp-stream-raw.c (original)
+++ branches/camel-gobject/camel/camel-tcp-stream-raw.c Mon Nov 10 00:44:12 2008
@@ -72,7 +72,7 @@
CamelStreamClass *camel_stream_class =
CAMEL_STREAM_CLASS (camel_tcp_stream_raw_class);
- parent_class = CAMEL_TCP_STREAM_CLASS (camel_type_get_global_classfuncs (camel_tcp_stream_get_type ()));
+ parent_class = CAMEL_TCP_STREAM_CLASS (g_type_class_peek (camel_tcp_stream_get_type ()));
/* virtual method overload */
camel_stream_class->read = stream_read;
@@ -105,12 +105,12 @@
}
-CamelType
+GType
camel_tcp_stream_raw_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_tcp_stream_get_type (),
"CamelTcpStreamRaw",
sizeof (CamelTcpStreamRaw),
Modified: branches/camel-gobject/camel/camel-tcp-stream-raw.h
==============================================================================
--- branches/camel-gobject/camel/camel-tcp-stream-raw.h (original)
+++ branches/camel-gobject/camel/camel-tcp-stream-raw.h Mon Nov 10 00:44:12 2008
@@ -27,9 +27,9 @@
#include <camel/camel-tcp-stream.h>
#define CAMEL_TCP_STREAM_RAW_TYPE (camel_tcp_stream_raw_get_type ())
-#define CAMEL_TCP_STREAM_RAW(obj) (CAMEL_CHECK_CAST((obj), CAMEL_TCP_STREAM_RAW_TYPE, CamelTcpStreamRaw))
-#define CAMEL_TCP_STREAM_RAW_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TCP_STREAM_RAW_TYPE, CamelTcpStreamRawClass))
-#define CAMEL_IS_TCP_STREAM_RAW(o) (CAMEL_CHECK_TYPE((o), CAMEL_TCP_STREAM_RAW_TYPE))
+#define CAMEL_TCP_STREAM_RAW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_TCP_STREAM_RAW_TYPE, CamelTcpStreamRaw))
+#define CAMEL_TCP_STREAM_RAW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_TCP_STREAM_RAW_TYPE, CamelTcpStreamRawClass))
+#define CAMEL_IS_TCP_STREAM_RAW(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_TCP_STREAM_RAW_TYPE))
G_BEGIN_DECLS
@@ -51,7 +51,7 @@
} CamelTcpStreamRawClass;
/* Standard Camel function */
-CamelType camel_tcp_stream_raw_get_type (void);
+GType camel_tcp_stream_raw_get_type (void);
/* public methods */
CamelStream *camel_tcp_stream_raw_new (void);
Modified: branches/camel-gobject/camel/camel-tcp-stream-ssl.c
==============================================================================
--- branches/camel-gobject/camel/camel-tcp-stream-ssl.c (original)
+++ branches/camel-gobject/camel/camel-tcp-stream-ssl.c Mon Nov 10 00:44:12 2008
@@ -102,7 +102,7 @@
CamelStreamClass *camel_stream_class =
CAMEL_STREAM_CLASS (camel_tcp_stream_ssl_class);
- parent_class = CAMEL_TCP_STREAM_CLASS (camel_type_get_global_classfuncs (camel_tcp_stream_get_type ()));
+ parent_class = CAMEL_TCP_STREAM_CLASS (g_type_class_peek (camel_tcp_stream_get_type ()));
/* virtual method overload */
camel_stream_class->read = stream_read;
@@ -136,7 +136,7 @@
}
if (stream->priv->session)
- camel_object_unref(stream->priv->session);
+ g_object_unref(stream->priv->session);
g_free (stream->priv->expected_host);
@@ -144,12 +144,12 @@
}
-CamelType
+GType
camel_tcp_stream_ssl_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_tcp_stream_get_type (),
"CamelTcpStreamSSL",
sizeof (CamelTcpStreamSSL),
@@ -189,7 +189,7 @@
stream = CAMEL_TCP_STREAM_SSL (camel_object_new (camel_tcp_stream_ssl_get_type ()));
stream->priv->session = session;
- camel_object_ref(session);
+ g_object_ref(session);
stream->priv->expected_host = g_strdup (expected_host);
stream->priv->ssl_mode = TRUE;
stream->priv->flags = flags;
@@ -223,7 +223,7 @@
stream = CAMEL_TCP_STREAM_SSL (camel_object_new (camel_tcp_stream_ssl_get_type ()));
stream->priv->session = session;
- camel_object_ref(session);
+ g_object_ref(session);
stream->priv->expected_host = g_strdup (expected_host);
stream->priv->ssl_mode = FALSE;
stream->priv->flags = flags;
@@ -811,7 +811,7 @@
g_unlink (path);
}
camel_stream_close (stream);
- camel_object_unref (stream);
+ g_object_unref (stream);
} else {
g_warning ("Could not save cert: %s: %s", path, strerror (errno));
}
@@ -904,7 +904,7 @@
}
camel_certdb_cert_unref(certdb, ccert);
- camel_object_unref(certdb);
+ g_object_unref(certdb);
return accept ? SECSuccess : SECFailure;
Modified: branches/camel-gobject/camel/camel-tcp-stream-ssl.h
==============================================================================
--- branches/camel-gobject/camel/camel-tcp-stream-ssl.h (original)
+++ branches/camel-gobject/camel/camel-tcp-stream-ssl.h Mon Nov 10 00:44:12 2008
@@ -27,9 +27,9 @@
#include <camel/camel-tcp-stream.h>
#define CAMEL_TCP_STREAM_SSL_TYPE (camel_tcp_stream_ssl_get_type ())
-#define CAMEL_TCP_STREAM_SSL(obj) (CAMEL_CHECK_CAST((obj), CAMEL_TCP_STREAM_SSL_TYPE, CamelTcpStreamSSL))
-#define CAMEL_TCP_STREAM_SSL_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TCP_STREAM_SSL_TYPE, CamelTcpStreamSSLClass))
-#define CAMEL_IS_TCP_STREAM_SSL(o) (CAMEL_CHECK_TYPE((o), CAMEL_TCP_STREAM_SSL_TYPE))
+#define CAMEL_TCP_STREAM_SSL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_TCP_STREAM_SSL_TYPE, CamelTcpStreamSSL))
+#define CAMEL_TCP_STREAM_SSL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_TCP_STREAM_SSL_TYPE, CamelTcpStreamSSLClass))
+#define CAMEL_IS_TCP_STREAM_SSL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_TCP_STREAM_SSL_TYPE))
#define CAMEL_TCP_STREAM_SSL_ENABLE_SSL2 (1 << 0)
#define CAMEL_TCP_STREAM_SSL_ENABLE_SSL3 (1 << 1)
@@ -53,7 +53,7 @@
} CamelTcpStreamSSLClass;
/* Standard Camel function */
-CamelType camel_tcp_stream_ssl_get_type (void);
+GType camel_tcp_stream_ssl_get_type (void);
/* public methods */
CamelStream *camel_tcp_stream_ssl_new (struct _CamelSession *session, const char *expected_host, guint32 flags);
Modified: branches/camel-gobject/camel/camel-tcp-stream.c
==============================================================================
--- branches/camel-gobject/camel/camel-tcp-stream.c (original)
+++ branches/camel-gobject/camel/camel-tcp-stream.c Mon Nov 10 00:44:12 2008
@@ -46,7 +46,7 @@
{
/*CamelStreamClass *camel_stream_class = CAMEL_STREAM_CLASS (camel_tcp_stream_class);*/
- parent_class = CAMEL_STREAM_CLASS (camel_type_get_global_classfuncs (CAMEL_STREAM_TYPE));
+ parent_class = CAMEL_STREAM_CLASS (g_type_class_peek (CAMEL_STREAM_TYPE));
/* tcp stream methods */
camel_tcp_stream_class->connect = tcp_connect;
@@ -62,12 +62,12 @@
;
}
-CamelType
+GType
camel_tcp_stream_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (CAMEL_STREAM_TYPE,
"CamelTcpStream",
sizeof (CamelTcpStream),
Modified: branches/camel-gobject/camel/camel-tcp-stream.h
==============================================================================
--- branches/camel-gobject/camel/camel-tcp-stream.h (original)
+++ branches/camel-gobject/camel/camel-tcp-stream.h Mon Nov 10 00:44:12 2008
@@ -41,9 +41,9 @@
#include <camel/camel-stream.h>
#define CAMEL_TCP_STREAM_TYPE (camel_tcp_stream_get_type ())
-#define CAMEL_TCP_STREAM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_TCP_STREAM_TYPE, CamelTcpStream))
-#define CAMEL_TCP_STREAM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TCP_STREAM_TYPE, CamelTcpStreamClass))
-#define CAMEL_IS_TCP_STREAM(o) (CAMEL_CHECK_TYPE((o), CAMEL_TCP_STREAM_TYPE))
+#define CAMEL_TCP_STREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_TCP_STREAM_TYPE, CamelTcpStream))
+#define CAMEL_TCP_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_TCP_STREAM_TYPE, CamelTcpStreamClass))
+#define CAMEL_IS_TCP_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_TCP_STREAM_TYPE))
G_BEGIN_DECLS
@@ -109,7 +109,7 @@
} CamelTcpStreamClass;
/* Standard Camel function */
-CamelType camel_tcp_stream_get_type (void);
+GType camel_tcp_stream_get_type (void);
/* public methods */
int camel_tcp_stream_connect (CamelTcpStream *stream, struct addrinfo *host);
Modified: branches/camel-gobject/camel/camel-text-index.c
==============================================================================
--- branches/camel-gobject/camel/camel-text-index.c (original)
+++ branches/camel-gobject/camel/camel-text-index.c Mon Nov 10 00:44:12 2008
@@ -512,7 +512,7 @@
camel_index_delete((CamelIndex *)newidx);
- camel_object_unref((CamelObject *)newidx);
+ g_object_unref((CamelObject *)newidx);
g_free(name);
g_hash_table_destroy(remap);
@@ -731,7 +731,7 @@
{
CamelIndexClass *iklass = (CamelIndexClass *)klass;
- camel_text_index_parent = CAMEL_OBJECT_CLASS(camel_type_get_global_classfuncs(camel_object_get_type()));
+ camel_text_index_parent = CAMEL_OBJECT_CLASS(g_type_class_peek(camel_object_get_type()));
iklass->sync = text_index_sync;
iklass->compress = text_index_compress;
@@ -780,30 +780,30 @@
g_hash_table_destroy(p->words);
if (p->word_index)
- camel_object_unref((CamelObject *)p->word_index);
+ g_object_unref((CamelObject *)p->word_index);
if (p->word_hash)
- camel_object_unref((CamelObject *)p->word_hash);
+ g_object_unref((CamelObject *)p->word_hash);
if (p->name_index)
- camel_object_unref((CamelObject *)p->name_index);
+ g_object_unref((CamelObject *)p->name_index);
if (p->name_hash)
- camel_object_unref((CamelObject *)p->name_hash);
+ g_object_unref((CamelObject *)p->name_hash);
if (p->blocks)
- camel_object_unref((CamelObject *)p->blocks);
+ g_object_unref((CamelObject *)p->blocks);
if (p->links)
- camel_object_unref((CamelObject *)p->links);
+ g_object_unref((CamelObject *)p->links);
g_static_rec_mutex_free(&p->lock);
g_free(p);
}
-CamelType
+GType
camel_text_index_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_index_get_type(), "CamelTextIndex",
sizeof (CamelTextIndex),
sizeof (CamelTextIndexClass),
@@ -901,14 +901,14 @@
if (p->word_index == NULL || p->word_hash == NULL
|| p->name_index == NULL || p->name_hash == NULL) {
- camel_object_unref((CamelObject *)idx);
+ g_object_unref((CamelObject *)idx);
idx = NULL;
}
return idx;
fail:
- camel_object_unref((CamelObject *)idx);
+ g_object_unref((CamelObject *)idx);
return NULL;
}
@@ -932,12 +932,12 @@
keys = camel_key_file_new(key, O_RDONLY, CAMEL_TEXT_INDEX_KEY_VERSION);
if (keys == NULL) {
io(printf("Check failed: No key file: %s\n", strerror (errno)));
- camel_object_unref((CamelObject *)blocks);
+ g_object_unref((CamelObject *)blocks);
return -1;
}
- camel_object_unref((CamelObject *)keys);
- camel_object_unref((CamelObject *)blocks);
+ g_object_unref((CamelObject *)keys);
+ g_object_unref((CamelObject *)blocks);
return 0;
}
@@ -1234,7 +1234,7 @@
printf(" %s", name);
}
printf("\n");
- camel_object_unref((CamelObject *)idc);
+ g_object_unref((CamelObject *)idc);
g_free(word);
}
#else
@@ -1348,7 +1348,7 @@
g_hash_table_insert(used, g_strdup(name), (void *)1);
}
}
- camel_object_unref((CamelObject *)idc);
+ g_object_unref((CamelObject *)idc);
g_hash_table_foreach(used, (GHFunc)g_free, NULL);
g_hash_table_destroy(used);
@@ -1507,7 +1507,7 @@
{
CamelIndexNameClass *nklass = (CamelIndexNameClass *)klass;
- camel_text_index_name_parent = CAMEL_INDEX_NAME_CLASS(camel_type_get_global_classfuncs(camel_index_name_get_type()));
+ camel_text_index_name_parent = CAMEL_INDEX_NAME_CLASS(g_type_class_peek(camel_index_name_get_type()));
nklass->add_word = text_index_name_add_word;
nklass->add_buffer = text_index_name_add_buffer;
@@ -1538,12 +1538,12 @@
g_free(p);
}
-CamelType
+GType
camel_text_index_name_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_index_name_get_type(), "CamelTextIndexName",
sizeof (CamelTextIndexName),
sizeof (CamelTextIndexNameClass),
@@ -1564,7 +1564,7 @@
CamelTextIndexNamePrivate *p = CIN_PRIVATE(idn);
cin->index = (CamelIndex *)idx;
- camel_object_ref((CamelObject *)idx);
+ g_object_ref((CamelObject *)idx);
cin->name = e_mempool_strdup(p->pool, name);
p->nameid = nameid;
@@ -1632,7 +1632,7 @@
{
CamelIndexCursorClass *cklass = (CamelIndexCursorClass *)klass;
- camel_text_index_cursor_parent = CAMEL_INDEX_CURSOR_CLASS(camel_type_get_global_classfuncs(camel_index_cursor_get_type()));
+ camel_text_index_cursor_parent = CAMEL_INDEX_CURSOR_CLASS(g_type_class_peek(camel_index_cursor_get_type()));
cklass->next = text_index_cursor_next;
cklass->reset = text_index_cursor_reset;
@@ -1654,12 +1654,12 @@
g_free(p);
}
-CamelType
+GType
camel_text_index_cursor_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_index_cursor_get_type(), "CamelTextIndexCursor",
sizeof (CamelTextIndexCursor),
sizeof (CamelTextIndexCursorClass),
@@ -1680,7 +1680,7 @@
struct _CamelTextIndexCursorPrivate *p = CIC_PRIVATE(idc);
cic->index = (CamelIndex *)idx;
- camel_object_ref((CamelObject *)idx);
+ g_object_ref((CamelObject *)idx);
p->first = data;
p->next = data;
p->record_count = 0;
@@ -1737,7 +1737,7 @@
{
CamelIndexCursorClass *cklass = (CamelIndexCursorClass *)klass;
- camel_text_index_key_cursor_parent = CAMEL_INDEX_CURSOR_CLASS(camel_type_get_global_classfuncs(camel_index_cursor_get_type()));
+ camel_text_index_key_cursor_parent = CAMEL_INDEX_CURSOR_CLASS(g_type_class_peek(camel_index_cursor_get_type()));
cklass->next = text_index_key_cursor_next;
cklass->reset = text_index_key_cursor_reset;
@@ -1762,16 +1762,16 @@
g_free(p->current);
if (p->table)
- camel_object_unref((CamelObject *)p->table);
+ g_object_unref((CamelObject *)p->table);
g_free(p);
}
-CamelType
+GType
camel_text_index_key_cursor_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_index_cursor_get_type(), "CamelTextIndexKeyCursor",
sizeof (CamelTextIndexKeyCursor),
sizeof (CamelTextIndexKeyCursorClass),
@@ -1792,9 +1792,9 @@
struct _CamelTextIndexKeyCursorPrivate *p = CIKC_PRIVATE(idc);
cic->index = (CamelIndex *)idx;
- camel_object_ref((CamelObject *)idx);
+ g_object_ref((CamelObject *)idx);
p->table = table;
- camel_object_ref((CamelObject *)table);
+ g_object_ref((CamelObject *)table);
return idc;
}
@@ -1861,7 +1861,7 @@
idn = camel_index_add_name(idx, name);
camel_index_name_add_buffer(idn, wordbuffer, sizeof(wordbuffer)-1);
camel_index_write_name(idx, idn);
- camel_object_unref((CamelObject *)idn);
+ g_object_unref((CamelObject *)idn);
}
printf("Looking up which names contain word 'word'\n");
@@ -1869,7 +1869,7 @@
while ( (word = camel_index_cursor_next(idc)) != NULL ) {
printf(" name is '%s'\n", word);
}
- camel_object_unref((CamelObject *)idc);
+ g_object_unref((CamelObject *)idc);
printf("done.\n");
printf("Looking up which names contain word 'truncate'\n");
@@ -1877,11 +1877,11 @@
while ( (word = camel_index_cursor_next(idc)) != NULL ) {
printf(" name is '%s'\n", word);
}
- camel_object_unref((CamelObject *)idc);
+ g_object_unref((CamelObject *)idc);
printf("done.\n");
camel_index_sync(idx);
- camel_object_unref((CamelObject *)idx);
+ g_object_unref((CamelObject *)idx);
#if 0
bs = camel_block_file_new("blocks", "TESTINDX", CAMEL_BLOCK_SIZE);
Modified: branches/camel-gobject/camel/camel-text-index.h
==============================================================================
--- branches/camel-gobject/camel/camel-text-index.h (original)
+++ branches/camel-gobject/camel/camel-text-index.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-object.h>
#include "camel-index.h"
-#define CAMEL_TEXT_INDEX(obj) CAMEL_CHECK_CAST (obj, camel_text_index_get_type (), CamelTextIndex)
-#define CAMEL_TEXT_INDEX_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_text_index_get_type (), CamelTextIndexClass)
-#define CAMEL_IS_TEXT_INDEX(obj) CAMEL_CHECK_TYPE (obj, camel_text_index_get_type ())
+#define CAMEL_TEXT_INDEX(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_text_index_get_type (), CamelTextIndex)
+#define CAMEL_TEXT_INDEX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_text_index_get_type (), CamelTextIndexClass)
+#define CAMEL_IS_TEXT_INDEX(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_text_index_get_type ())
G_BEGIN_DECLS
@@ -58,7 +58,7 @@
CamelIndexCursorClass parent;
};
-CamelType camel_text_index_cursor_get_type(void);
+GType camel_text_index_cursor_get_type(void);
/* ********************************************************************** */
@@ -72,7 +72,7 @@
CamelIndexCursorClass parent;
};
-CamelType camel_text_index_key_cursor_get_type(void);
+GType camel_text_index_key_cursor_get_type(void);
/* ********************************************************************** */
@@ -86,7 +86,7 @@
CamelIndexNameClass parent;
};
-CamelType camel_text_index_name_get_type(void);
+GType camel_text_index_name_get_type(void);
/* ********************************************************************** */
@@ -100,7 +100,7 @@
CamelIndexClass parent_class;
};
-CamelType camel_text_index_get_type (void);
+GType camel_text_index_get_type (void);
CamelTextIndex *camel_text_index_new(const char *path, int flags);
/* static utility functions */
Modified: branches/camel-gobject/camel/camel-transport.c
==============================================================================
--- branches/camel-gobject/camel/camel-transport.c (original)
+++ branches/camel-gobject/camel/camel-transport.c Mon Nov 10 00:44:12 2008
@@ -46,7 +46,7 @@
{
CamelObjectClass *camel_object_class = CAMEL_OBJECT_CLASS (camel_transport_class);
- parent_class = CAMEL_SERVICE_CLASS (camel_type_get_global_classfuncs (camel_service_get_type ()));
+ parent_class = CAMEL_SERVICE_CLASS (g_type_class_peek (camel_service_get_type ()));
/* virtual method overload */
camel_object_class->setv = transport_setv;
@@ -71,12 +71,12 @@
g_free (xport->priv);
}
-CamelType
+GType
camel_transport_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (CAMEL_SERVICE_TYPE,
"CamelTransport",
sizeof (CamelTransport),
Modified: branches/camel-gobject/camel/camel-transport.h
==============================================================================
--- branches/camel-gobject/camel/camel-transport.h (original)
+++ branches/camel-gobject/camel/camel-transport.h Mon Nov 10 00:44:12 2008
@@ -31,9 +31,9 @@
#include <camel/camel-service.h>
#define CAMEL_TRANSPORT_TYPE (camel_transport_get_type ())
-#define CAMEL_TRANSPORT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_TRANSPORT_TYPE, CamelTransport))
-#define CAMEL_TRANSPORT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TRANSPORT_TYPE, CamelTransportClass))
-#define CAMEL_IS_TRANSPORT(o) (CAMEL_CHECK_TYPE((o), CAMEL_TRANSPORT_TYPE))
+#define CAMEL_TRANSPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_TRANSPORT_TYPE, CamelTransport))
+#define CAMEL_TRANSPORT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_TRANSPORT_TYPE, CamelTransportClass))
+#define CAMEL_IS_TRANSPORT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_TRANSPORT_TYPE))
G_BEGIN_DECLS
@@ -68,7 +68,7 @@
CamelException *ex);
/* Standard Camel function */
-CamelType camel_transport_get_type (void);
+GType camel_transport_get_type (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/camel-vee-folder.c
==============================================================================
--- branches/camel-gobject/camel/camel-vee-folder.c (original)
+++ branches/camel-gobject/camel/camel-vee-folder.c Mon Nov 10 00:44:12 2008
@@ -88,12 +88,12 @@
static CamelFolderClass *camel_vee_folder_parent;
-CamelType
+GType
camel_vee_folder_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_folder_get_type (), "CamelVeeFolder",
sizeof (CamelVeeFolder),
sizeof (CamelVeeFolderClass),
@@ -138,7 +138,7 @@
if (CAMEL_IS_VEE_STORE(parent_store) && strcmp(full, CAMEL_UNMATCHED_NAME) == 0) {
vf = ((CamelVeeStore *)parent_store)->folder_unmatched;
- camel_object_ref(vf);
+ g_object_ref(vf);
} else {
const char *name = strrchr(full, '/');
@@ -192,7 +192,7 @@
/* for normal vfolders we want only unique ones, for unmatched we want them all recorded */
if (g_list_find(p->folders, sub) == NULL) {
- camel_object_ref((CamelObject *)sub);
+ g_object_ref((CamelObject *)sub);
p->folders = g_list_append(p->folders, sub);
CAMEL_FOLDER_LOCK(vf, change_lock);
@@ -205,7 +205,7 @@
}
if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0 && !CAMEL_IS_VEE_FOLDER(sub) && folder_unmatched != NULL) {
struct _CamelVeeFolderPrivate *up = _PRIVATE(folder_unmatched);
- camel_object_ref((CamelObject *)sub);
+ g_object_ref((CamelObject *)sub);
up->folders = g_list_append(up->folders, sub);
CAMEL_FOLDER_LOCK(folder_unmatched, change_lock);
@@ -289,7 +289,7 @@
if (sub->folder_flags & CAMEL_FOLDER_HAS_BEEN_DELETED) {
while (g_list_find(up->folders, sub)) {
up->folders = g_list_remove(up->folders, sub);
- camel_object_unref((CamelObject *)sub);
+ g_object_unref((CamelObject *)sub);
/* undo the freeze state that Unmatched has imposed on this source folder */
CAMEL_FOLDER_LOCK(folder_unmatched, change_lock);
@@ -300,7 +300,7 @@
} else if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0) {
if (g_list_find(up->folders, sub) != NULL) {
up->folders = g_list_remove(up->folders, sub);
- camel_object_unref((CamelObject *)sub);
+ g_object_unref((CamelObject *)sub);
/* undo the freeze state that Unmatched has imposed on this source folder */
CAMEL_FOLDER_LOCK(folder_unmatched, change_lock);
@@ -317,7 +317,7 @@
if (CAMEL_IS_VEE_FOLDER(sub))
return;
- camel_object_unref((CamelObject *)sub);
+ g_object_unref((CamelObject *)sub);
}
/**
@@ -338,7 +338,7 @@
remove_folders(CamelFolder *folder, CamelFolder *foldercopy, CamelVeeFolder *vf)
{
camel_vee_folder_remove_folder(vf, folder);
- camel_object_unref((CamelObject *)folder);
+ g_object_unref((CamelObject *)folder);
}
/**
@@ -361,7 +361,7 @@
l = p->folders;
while (l) {
g_hash_table_insert(remove, l->data, l->data);
- camel_object_ref((CamelObject *)l->data);
+ g_object_ref((CamelObject *)l->data);
l = l->next;
}
CAMEL_VEE_FOLDER_UNLOCK(vf, subfolder_lock);
@@ -371,7 +371,7 @@
while (l) {
if ((folder = g_hash_table_lookup(remove, l->data))) {
g_hash_table_remove(remove, folder);
- camel_object_unref((CamelObject *)folder);
+ g_object_unref((CamelObject *)folder);
} else {
camel_vee_folder_add_folder(vf, l->data);
}
@@ -823,11 +823,11 @@
while (p->folders) {
CamelFolder *f = p->folders->data;
- camel_object_ref(f);
+ g_object_ref(f);
CAMEL_VEE_FOLDER_UNLOCK(folder, subfolder_lock);
camel_vee_folder_remove_folder((CamelVeeFolder *)folder, f);
- camel_object_unref(f);
+ g_object_unref(f);
CAMEL_VEE_FOLDER_LOCK(folder, subfolder_lock);
}
CAMEL_VEE_FOLDER_UNLOCK(folder, subfolder_lock);
@@ -1766,8 +1766,8 @@
struct _folder_changed_msg *m = (struct _folder_changed_msg *)msg;
camel_folder_change_info_free(m->changes);
- camel_object_unref((CamelObject *)m->vf);
- camel_object_unref((CamelObject *)m->sub);
+ g_object_unref((CamelObject *)m->vf);
+ g_object_unref((CamelObject *)m->sub);
}
static CamelSessionThreadOps folder_changed_ops = {
@@ -1789,9 +1789,9 @@
m->changes = camel_folder_change_info_new();
camel_folder_change_info_cat(m->changes, changes);
m->sub = sub;
- camel_object_ref((CamelObject *)sub);
+ g_object_ref((CamelObject *)sub);
m->vf = vf;
- camel_object_ref((CamelObject *)vf);
+ g_object_ref((CamelObject *)vf);
camel_session_thread_queue(session, &m->msg, 0);
}
@@ -1991,8 +1991,8 @@
{
struct _folder_flags_msg *m = (struct _folder_flags_msg *)msg;
- camel_object_unref((CamelObject *)m->vf);
- camel_object_unref((CamelObject *)m->sub);
+ g_object_unref((CamelObject *)m->vf);
+ g_object_unref((CamelObject *)m->sub);
}
static CamelSessionThreadOps folder_flags_ops = {
@@ -2020,9 +2020,9 @@
m = camel_session_thread_msg_new(session, &folder_flags_ops, sizeof(*m));
m->sub = summary->folder;
- camel_object_ref((CamelObject *)summary->folder);
+ g_object_ref((CamelObject *)summary->folder);
m->vf = vf;
- camel_object_ref((CamelObject *)vf);
+ g_object_ref((CamelObject *)vf);
camel_session_thread_queue(session, &m->msg, 0);
}
@@ -2096,7 +2096,7 @@
{
CamelFolderClass *folder_class = (CamelFolderClass *) klass;
- camel_vee_folder_parent = CAMEL_FOLDER_CLASS(camel_type_get_global_classfuncs (camel_folder_get_type ()));
+ camel_vee_folder_parent = CAMEL_FOLDER_CLASS(g_type_class_peek (camel_folder_get_type ()));
folder_class->refresh_info = vee_refresh_info;
folder_class->sync = vee_sync;
@@ -2211,7 +2211,7 @@
if (sub->folder_flags & CAMEL_FOLDER_HAS_BEEN_DELETED) {
while (g_list_find(up->folders, sub)) {
up->folders = g_list_remove(up->folders, sub);
- camel_object_unref((CamelObject *)sub);
+ g_object_unref((CamelObject *)sub);
/* undo the freeze state that Unmatched has imposed on this source folder */
CAMEL_FOLDER_LOCK(folder_unmatched, change_lock);
@@ -2222,7 +2222,7 @@
} else if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0) {
if (g_list_find(up->folders, sub) != NULL) {
up->folders = g_list_remove(up->folders, sub);
- camel_object_unref((CamelObject *)sub);
+ g_object_unref((CamelObject *)sub);
/* undo the freeze state that Unmatched has imposed on this source folder */
CAMEL_FOLDER_LOCK(folder_unmatched, change_lock);
@@ -2237,7 +2237,7 @@
if (CAMEL_IS_VEE_FOLDER(sub))
return;
- camel_object_unref((CamelObject *)sub);
+ g_object_unref((CamelObject *)sub);
}
void
@@ -2277,7 +2277,7 @@
/* This may invoke sub-classes with partially destroyed state, they must deal with this */
if (vf == folder_unmatched) {
for (node = p->folders;node;node = g_list_next(node))
- camel_object_unref(node->data);
+ g_object_unref(node->data);
} else {
/* FIXME[disk-summary] See if it is really reqd */
camel_folder_freeze ((CamelFolder *)vf);
@@ -2294,7 +2294,7 @@
g_list_free(p->folders_changed);
camel_folder_change_info_free(vf->changes);
- camel_object_unref((CamelObject *)vf->search);
+ g_object_unref((CamelObject *)vf->search);
g_mutex_free(p->summary_lock);
g_mutex_free(p->subfolder_lock);
Modified: branches/camel-gobject/camel/camel-vee-folder.h
==============================================================================
--- branches/camel-gobject/camel/camel-vee-folder.h (original)
+++ branches/camel-gobject/camel/camel-vee-folder.h Mon Nov 10 00:44:12 2008
@@ -27,9 +27,9 @@
#include <camel/camel-folder.h>
#include <camel/camel-vee-summary.h>
-#define CAMEL_VEE_FOLDER(obj) CAMEL_CHECK_CAST (obj, camel_vee_folder_get_type (), CamelVeeFolder)
-#define CAMEL_VEE_FOLDER_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_vee_folder_get_type (), CamelVeeFolderClass)
-#define CAMEL_IS_VEE_FOLDER(obj) CAMEL_CHECK_TYPE (obj, camel_vee_folder_get_type ())
+#define CAMEL_VEE_FOLDER(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_vee_folder_get_type (), CamelVeeFolder)
+#define CAMEL_VEE_FOLDER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_vee_folder_get_type (), CamelVeeFolderClass)
+#define CAMEL_IS_VEE_FOLDER(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_vee_folder_get_type ())
G_BEGIN_DECLS
@@ -75,7 +75,7 @@
#define CAMEL_UNMATCHED_NAME "UNMATCHED"
-CamelType camel_vee_folder_get_type (void);
+GType camel_vee_folder_get_type (void);
CamelFolder *camel_vee_folder_new (CamelStore *parent_store, const char *full, guint32 flags);
void camel_vee_folder_construct (CamelVeeFolder *vf, CamelStore *parent_store, const char *full, const char *name, guint32 flags);
Modified: branches/camel-gobject/camel/camel-vee-store.c
==============================================================================
--- branches/camel-gobject/camel/camel-vee-store.c (original)
+++ branches/camel-gobject/camel/camel-vee-store.c Mon Nov 10 00:44:12 2008
@@ -52,12 +52,12 @@
static CamelStoreClass *camel_vee_store_parent;
-CamelType
+GType
camel_vee_store_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_store_get_type (), "CamelVeeStore",
sizeof (CamelVeeStore),
sizeof (CamelVeeStoreClass),
@@ -75,7 +75,7 @@
{
CamelStoreClass *store_class = (CamelStoreClass *) klass;
- camel_vee_store_parent = camel_type_get_global_classfuncs (camel_store_get_type());
+ camel_vee_store_parent = g_type_class_peek (camel_store_get_type());
/* virtual method overload */
store_class->get_folder = vee_get_folder;
@@ -129,7 +129,7 @@
g_hash_table_foreach(vstore->unmatched_uids, cvs_free_unmatched, NULL);
g_hash_table_destroy(vstore->unmatched_uids);
- camel_object_unref(vstore->folder_unmatched);
+ g_object_unref(vstore->folder_unmatched);
}
/**
@@ -209,7 +209,7 @@
change_folder(store, name, CHANGE_ADD|CHANGE_NOSELECT, 0);
/* FIXME: this sort of leaks folder, nobody owns a ref to it but us */
} else {
- camel_object_unref(folder);
+ g_object_unref(folder);
}
*p++='/';
}
@@ -341,7 +341,7 @@
}
g_free(pname);
- camel_object_unref(folder);
+ g_object_unref(folder);
}
g_ptr_array_free(folders, TRUE);
g_hash_table_destroy(infos_hash);
@@ -401,7 +401,7 @@
change_folder(store, folder_name, CHANGE_DELETE, -1);
}
- camel_object_unref(folder);
+ g_object_unref(folder);
} else {
camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
_("Cannot delete folder: %s: No such folder"), folder_name);
@@ -445,10 +445,10 @@
change_folder(store, name, CHANGE_ADD|CHANGE_NOSELECT, 0);
/* FIXME: this sort of leaks folder, nobody owns a ref to it but us */
} else {
- camel_object_unref(folder);
+ g_object_unref(folder);
}
*p++='/';
}
- camel_object_unref(oldfolder);
+ g_object_unref(oldfolder);
}
Modified: branches/camel-gobject/camel/camel-vee-store.h
==============================================================================
--- branches/camel-gobject/camel/camel-vee-store.h (original)
+++ branches/camel-gobject/camel/camel-vee-store.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <glib.h>
#include <camel/camel-store.h>
-#define CAMEL_VEE_STORE(obj) CAMEL_CHECK_CAST (obj, camel_vee_store_get_type (), CamelVeeStore)
-#define CAMEL_VEE_STORE_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_vee_store_get_type (), CamelVeeStoreClass)
-#define CAMEL_IS_VEE_STORE(obj) CAMEL_CHECK_TYPE (obj, camel_vee_store_get_type ())
+#define CAMEL_VEE_STORE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_vee_store_get_type (), CamelVeeStore)
+#define CAMEL_VEE_STORE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_vee_store_get_type (), CamelVeeStoreClass)
+#define CAMEL_IS_VEE_STORE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_vee_store_get_type ())
G_BEGIN_DECLS
@@ -51,7 +51,7 @@
CamelStoreClass parent_class;
};
-CamelType camel_vee_store_get_type (void);
+GType camel_vee_store_get_type (void);
CamelVeeStore *camel_vee_store_new (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/camel-vee-summary.c
==============================================================================
--- branches/camel-gobject/camel/camel-vee-summary.c (original)
+++ branches/camel-gobject/camel/camel-vee-summary.c Mon Nov 10 00:44:12 2008
@@ -50,7 +50,7 @@
CamelVeeMessageInfo *mi = (CamelVeeMessageInfo *)info;
camel_pstring_free(info->uid);
- camel_object_unref (mi->summary);
+ g_object_unref (mi->summary);
}
static CamelMessageInfo *
@@ -62,7 +62,7 @@
to = (CamelVeeMessageInfo *)camel_message_info_new(s);
to->summary = from->summary;
- camel_object_ref (to->summary);
+ g_object_ref (to->summary);
to->info.summary = s;
to->info.uid = camel_pstring_strdup(from->info.uid);
@@ -307,7 +307,7 @@
strncpy(tmphash, uid, 8);
tmphash[8] = 0;
vinfo->summary = g_hash_table_lookup(((CamelVeeFolder *) s->folder)->hashes, tmphash);
- camel_object_ref (vinfo->summary);
+ g_object_ref (vinfo->summary);
camel_folder_summary_insert (s, info, FALSE);
}
return info;
@@ -347,12 +347,12 @@
s->content_info_size = 0;
}
-CamelType
+GType
camel_vee_summary_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
camel_vee_summary_parent = (CamelFolderSummaryClass *)camel_folder_summary_get_type();
type = camel_type_register(
@@ -433,7 +433,7 @@
g_free (vuid);
if (!mi->summary) {
mi->summary = summary;
- camel_object_ref(summary);
+ g_object_ref(summary);
}
return mi;
@@ -442,7 +442,7 @@
mi = (CamelVeeMessageInfo *)camel_message_info_new(&s->summary);
mi->summary = summary;
/* We would do lazy loading of flags, when the folders are loaded to memory through folder_reloaded signal */
- camel_object_ref (summary);
+ g_object_ref (summary);
mi->info.uid = (char *) camel_pstring_strdup (vuid);
g_free (vuid);
camel_message_info_ref (mi);
Modified: branches/camel-gobject/camel/camel-vee-summary.h
==============================================================================
--- branches/camel-gobject/camel/camel-vee-summary.h (original)
+++ branches/camel-gobject/camel/camel-vee-summary.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-folder-summary.h>
#include <camel/camel-exception.h>
-#define CAMEL_VEE_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_vee_summary_get_type (), CamelVeeSummary)
-#define CAMEL_VEE_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_vee_summary_get_type (), CamelVeeSummaryClass)
-#define CAMEL_IS_VEE_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_vee_summary_get_type ())
+#define CAMEL_VEE_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_vee_summary_get_type (), CamelVeeSummary)
+#define CAMEL_VEE_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_vee_summary_get_type (), CamelVeeSummaryClass)
+#define CAMEL_IS_VEE_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_vee_summary_get_type ())
G_BEGIN_DECLS
@@ -57,7 +57,7 @@
};
-CamelType camel_vee_summary_get_type (void);
+GType camel_vee_summary_get_type (void);
CamelFolderSummary *camel_vee_summary_new(struct _CamelFolder *parent);
CamelVeeMessageInfo * camel_vee_summary_add(CamelVeeSummary *s, CamelFolderSummary *summary, const char *uid, const char hash[8]);
Modified: branches/camel-gobject/camel/camel-vtrash-folder.c
==============================================================================
--- branches/camel-gobject/camel/camel-vtrash-folder.c (original)
+++ branches/camel-gobject/camel/camel-vtrash-folder.c Mon Nov 10 00:44:12 2008
@@ -67,12 +67,12 @@
/*CamelFolder *folder = CAMEL_FOLDER (vtrash);*/
}
-CamelType
+GType
camel_vtrash_folder_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_vee_folder_get_type (),
"CamelVTrashFolder",
sizeof (CamelVTrashFolder),
@@ -230,7 +230,7 @@
for (i=0;i<md->uids->len;i++)
g_free(md->uids->pdata[i]);
g_ptr_array_free(md->uids, TRUE);
- camel_object_unref((CamelObject *)md->folder);
+ g_object_unref((CamelObject *)md->folder);
g_free(md);
}
@@ -291,7 +291,7 @@
if (md == NULL) {
md = g_malloc0(sizeof(*md));
md->folder = mi->summary->folder;
- camel_object_ref((CamelObject *)md->folder);
+ g_object_ref((CamelObject *)md->folder);
md->uids = g_ptr_array_new();
md->dest = dest;
g_hash_table_insert(batch, mi->summary->folder, md);
@@ -653,7 +653,7 @@
{
CamelFolderClass *folder_class = (CamelFolderClass *) klass;
- camel_vtrash_folder_parent = camel_type_get_global_classfuncs (camel_vee_folder_get_type());
+ camel_vtrash_folder_parent = g_type_class_peek (camel_vee_folder_get_type());
/* Not required from here on. We don't count */
((CamelObjectClass *)klass)->getv = vtrash_getv;
Modified: branches/camel-gobject/camel/camel-vtrash-folder.h
==============================================================================
--- branches/camel-gobject/camel/camel-vtrash-folder.h (original)
+++ branches/camel-gobject/camel/camel-vtrash-folder.h Mon Nov 10 00:44:12 2008
@@ -27,9 +27,9 @@
#include <camel/camel-folder.h>
#include <camel/camel-vee-folder.h>
-#define CAMEL_VTRASH_FOLDER(obj) CAMEL_CHECK_CAST (obj, camel_vtrash_folder_get_type (), CamelVTrashFolder)
-#define CAMEL_VTRASH_FOLDER_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_vtrash_folder_get_type (), CamelVTrashFolderClass)
-#define CAMEL_IS_VTRASH_FOLDER(obj) CAMEL_CHECK_TYPE (obj, camel_vtrash_folder_get_type ())
+#define CAMEL_VTRASH_FOLDER(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_vtrash_folder_get_type (), CamelVTrashFolder)
+#define CAMEL_VTRASH_FOLDER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_vtrash_folder_get_type (), CamelVTrashFolderClass)
+#define CAMEL_IS_VTRASH_FOLDER(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_vtrash_folder_get_type ())
G_BEGIN_DECLS
@@ -57,7 +57,7 @@
};
-CamelType camel_vtrash_folder_get_type (void);
+GType camel_vtrash_folder_get_type (void);
CamelFolder *camel_vtrash_folder_new (CamelStore *parent_store, camel_vtrash_folder_t type);
Modified: branches/camel-gobject/camel/camel.c
==============================================================================
--- branches/camel-gobject/camel/camel.c (original)
+++ branches/camel-gobject/camel/camel.c Mon Nov 10 00:44:12 2008
@@ -114,7 +114,7 @@
/* set this certdb as the default db */
camel_certdb_set_default (certdb);
- camel_object_unref (certdb);
+ g_object_unref (certdb);
initialised = TRUE;
Modified: branches/camel-gobject/camel/providers/groupwise/camel-groupwise-folder.c
==============================================================================
--- branches/camel-gobject/camel/providers/groupwise/camel-groupwise-folder.c (original)
+++ branches/camel-gobject/camel/providers/groupwise/camel-groupwise-folder.c Mon Nov 10 00:44:12 2008
@@ -129,21 +129,21 @@
if (camel_data_wrapper_construct_from_stream ((CamelDataWrapper *) msg, stream) == -1) {
if (errno == EINTR) {
camel_exception_setv (ex, CAMEL_EXCEPTION_USER_CANCEL, _("User canceled"));
- camel_object_unref (msg);
- camel_object_unref (cache_stream);
- camel_object_unref (stream);
+ g_object_unref (msg);
+ g_object_unref (cache_stream);
+ g_object_unref (stream);
camel_message_info_free (&mi->info);
return NULL;
} else {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot get message %s: %s"),
uid, g_strerror (errno));
- camel_object_unref (msg);
+ g_object_unref (msg);
msg = NULL;
}
}
- camel_object_unref (cache_stream);
+ g_object_unref (cache_stream);
}
- camel_object_unref (stream);
+ g_object_unref (stream);
if (msg != NULL) {
camel_message_info_free (&mi->info);
@@ -198,7 +198,7 @@
if (camel_data_wrapper_write_to_stream ((CamelDataWrapper *) msg, cache_stream) == -1
|| camel_stream_flush (cache_stream) == -1)
camel_data_cache_remove (gw_folder->cache, "cache", uid, NULL);
- camel_object_unref (cache_stream);
+ g_object_unref (cache_stream);
}
CAMEL_GROUPWISE_FOLDER_REC_UNLOCK (folder, cache_lock);
@@ -296,7 +296,7 @@
camel_multipart_set_boundary (multipart, NULL);
camel_multipart_add_part (multipart, part);
- camel_object_unref (part);
+ g_object_unref (part);
}
static void
@@ -836,7 +836,7 @@
folder->summary = camel_groupwise_summary_new(folder, summary_file);
g_free(summary_file);
if (!folder->summary) {
- camel_object_unref (CAMEL_OBJECT (folder));
+ g_object_unref (CAMEL_OBJECT (folder));
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Could not load summary for %s"),
folder_name);
@@ -851,7 +851,7 @@
gw_folder->cache = camel_data_cache_new (folder_dir,0 ,ex);
if (!gw_folder->cache) {
- camel_object_unref (folder);
+ g_object_unref (folder);
return NULL;
}
@@ -859,7 +859,7 @@
gw_folder->journal = camel_groupwise_journal_new (gw_folder, journal_file);
g_free (journal_file);
if (!gw_folder->journal) {
- camel_object_unref (folder);
+ g_object_unref (folder);
return NULL;
}
@@ -870,7 +870,7 @@
gw_folder->search = camel_folder_search_new ();
if (!gw_folder->search) {
- camel_object_unref (folder);
+ g_object_unref (folder);
return NULL;
}
@@ -991,7 +991,7 @@
g_free (m->t_str);
g_free (m->container_id);
- camel_object_unref (m->folder);
+ g_object_unref (m->folder);
camel_folder_thaw (m->folder);
g_slist_foreach (m->slist, (GFunc) g_free, NULL);
g_slist_free (m->slist);
@@ -1226,7 +1226,7 @@
msg->t_str = g_strdup (time_string);
msg->container_id = g_strdup (container_id);
msg->folder = folder;
- camel_object_ref (folder);
+ g_object_ref (folder);
camel_folder_freeze (folder);
camel_session_thread_queue (session, &msg->msg, 0);
/*thread creation and queueing done*/
@@ -1482,7 +1482,7 @@
/* add to cache if its a new message*/
t_cache_stream = camel_data_cache_get (gw_folder->cache, "cache", id, ex);
if (t_cache_stream) {
- camel_object_unref (t_cache_stream);
+ g_object_unref (t_cache_stream);
mail_msg = groupwise_folder_item_to_msg (folder, item, ex);
if (mail_msg)
@@ -1492,10 +1492,10 @@
if ((cache_stream = camel_data_cache_add (gw_folder->cache, "cache", id, NULL))) {
if (camel_data_wrapper_write_to_stream ((CamelDataWrapper *) mail_msg, cache_stream) == -1 || camel_stream_flush (cache_stream) == -1)
camel_data_cache_remove (gw_folder->cache, "cache", id, NULL);
- camel_object_unref (cache_stream);
+ g_object_unref (cache_stream);
}
- camel_object_unref (mail_msg);
+ g_object_unref (mail_msg);
CAMEL_GROUPWISE_FOLDER_REC_UNLOCK (folder, cache_lock);
}
/******************** Caching stuff ends *************************/
@@ -1818,8 +1818,8 @@
if (has_mime_822 && body) {
temp_stream = camel_stream_mem_new_with_buffer (body, body_len);
if (camel_data_wrapper_construct_from_stream ((CamelDataWrapper *) msg, temp_stream) == -1) {
- camel_object_unref (msg);
- camel_object_unref (temp_stream);
+ g_object_unref (msg);
+ g_object_unref (temp_stream);
msg = NULL;
goto end;
}
@@ -1903,8 +1903,8 @@
camel_medium_set_content_object ( CAMEL_MEDIUM (part),CAMEL_DATA_WRAPPER(temp_msg));
camel_multipart_add_part (multipart,part);
- camel_object_unref (temp_msg);
- camel_object_unref (part);
+ g_object_unref (temp_msg);
+ g_object_unref (part);
}
g_object_unref (temp_item);
} else {
@@ -1985,7 +1985,7 @@
camel_multipart_set_boundary(multipart, NULL);
camel_multipart_add_part (multipart, part);
- camel_object_unref (part);
+ g_object_unref (part);
g_free (attachment);
} /* if attachment */
}
@@ -2001,7 +2001,7 @@
camel_medium_add_header ( CAMEL_MEDIUM (msg), "Security", e_gw_item_get_security(item));
camel_medium_set_content_object(CAMEL_MEDIUM (msg), CAMEL_DATA_WRAPPER(multipart));
- camel_object_unref (multipart);
+ g_object_unref (multipart);
end:
if (body)
@@ -2217,7 +2217,7 @@
break;
camel_groupwise_journal_transfer (journal, (CamelGroupwiseFolder *)source, message, info, uids->pdata[i], NULL, ex);
- camel_object_unref (message);
+ g_object_unref (message);
if (camel_exception_is_set (ex))
break;
@@ -2460,7 +2460,7 @@
{
CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS (camel_groupwise_folder_class);
- parent_class = CAMEL_OFFLINE_FOLDER_CLASS (camel_type_get_global_classfuncs (camel_offline_folder_get_type ()));
+ parent_class = CAMEL_OFFLINE_FOLDER_CLASS (g_type_class_peek (camel_offline_folder_get_type ()));
((CamelObjectClass *) camel_groupwise_folder_class)->getv = gw_getv;
@@ -2507,19 +2507,19 @@
if (gw_folder->priv)
g_free(gw_folder->priv);
if (gw_folder->cache)
- camel_object_unref (gw_folder->cache);
+ g_object_unref (gw_folder->cache);
if (gw_folder->search)
- camel_object_unref (gw_folder->search);
+ g_object_unref (gw_folder->search);
}
-CamelType
+GType
camel_groupwise_folder_get_type (void)
{
- static CamelType camel_groupwise_folder_type = CAMEL_INVALID_TYPE;
+ static GType camel_groupwise_folder_type = G_TYPE_INVALID;
- if (camel_groupwise_folder_type == CAMEL_INVALID_TYPE) {
+ if (camel_groupwise_folder_type == G_TYPE_INVALID) {
camel_groupwise_folder_type =
camel_type_register (camel_offline_folder_get_type (),
"CamelGroupwiseFolder",
Modified: branches/camel-gobject/camel/providers/groupwise/camel-groupwise-folder.h
==============================================================================
--- branches/camel-gobject/camel/providers/groupwise/camel-groupwise-folder.h (original)
+++ branches/camel-gobject/camel/providers/groupwise/camel-groupwise-folder.h Mon Nov 10 00:44:12 2008
@@ -41,9 +41,9 @@
#include "camel-groupwise-summary.h"
#define CAMEL_GROUPWISE_FOLDER_TYPE (camel_groupwise_folder_get_type ())
-#define CAMEL_GROUPWISE_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_GROUPWISE_FOLDER_TYPE, CamelGroupwiseFolder))
-#define CAMEL_GROUPWISE_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_GROUPWISE_FOLDER_TYPE, CamelGroupwiseFolderClass))
-#define CAMEL_IS_GROUPWISE_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_GROUPWISE_FOLDER_TYPE))
+#define CAMEL_GROUPWISE_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_GROUPWISE_FOLDER_TYPE, CamelGroupwiseFolder))
+#define CAMEL_GROUPWISE_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_GROUPWISE_FOLDER_TYPE, CamelGroupwiseFolderClass))
+#define CAMEL_IS_GROUPWISE_FOLDER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_GROUPWISE_FOLDER_TYPE))
G_BEGIN_DECLS
@@ -75,7 +75,7 @@
/* Standard Camel function */
-CamelType camel_groupwise_folder_get_type (void);
+GType camel_groupwise_folder_get_type (void);
/* implemented */
CamelFolder * camel_gw_folder_new(CamelStore *store, const char *folder_dir, const char *folder_name, CamelException *ex) ;
Modified: branches/camel-gobject/camel/providers/groupwise/camel-groupwise-journal.c
==============================================================================
--- branches/camel-gobject/camel/providers/groupwise/camel-groupwise-journal.c (original)
+++ branches/camel-gobject/camel/providers/groupwise/camel-groupwise-journal.c Mon Nov 10 00:44:12 2008
@@ -63,10 +63,10 @@
static CamelOfflineJournalClass *parent_class = NULL;
-CamelType
+GType
camel_groupwise_journal_get_type (void)
{
- static CamelType type = NULL;
+ static GType type = NULL;
if (!type) {
type = camel_type_register (camel_offline_journal_get_type (),
@@ -87,7 +87,7 @@
{
CamelOfflineJournalClass *journal_class = (CamelOfflineJournalClass *) klass;
- parent_class = (CamelOfflineJournalClass *) camel_type_get_global_classfuncs (CAMEL_TYPE_OFFLINE_JOURNAL);
+ parent_class = (CamelOfflineJournalClass *) g_type_class_peek (CAMEL_TYPE_OFFLINE_JOURNAL);
journal_class->entry_free = groupwise_entry_free;
journal_class->entry_load = groupwise_entry_load;
@@ -213,12 +213,12 @@
message = camel_mime_message_new ();
if (camel_data_wrapper_construct_from_stream ((CamelDataWrapper *) message, stream) == -1) {
- camel_object_unref (message);
- camel_object_unref (stream);
+ g_object_unref (message);
+ g_object_unref (stream);
goto done;
}
- camel_object_unref (stream);
+ g_object_unref (stream);
if (!(info = camel_folder_summary_uid (folder->summary, entry->uid))) {
/* Note: this should never happen, but rather than crash lets make a new info */
@@ -228,7 +228,7 @@
camel_exception_init (&lex);
camel_folder_append_message (folder, message, info, NULL, &lex);
camel_message_info_free (info);
- camel_object_unref (message);
+ g_object_unref (message);
if (camel_exception_is_set (&lex)) {
camel_exception_xfer (ex, &lex);
@@ -280,7 +280,7 @@
g_ptr_array_free (xuids, TRUE);
g_ptr_array_free (uids, TRUE);
- camel_object_unref (src);
+ g_object_unref (src);
} else if (!name) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot get folder container %s"),
entry->source_container);
@@ -366,12 +366,12 @@
g_strerror (errno));
camel_data_cache_remove (groupwise_folder->cache, "cache", uid, NULL);
folder->summary->nextuid--;
- camel_object_unref (cache);
+ g_object_unref (cache);
g_free (uid);
return FALSE;
}
- camel_object_unref (cache);
+ g_object_unref (cache);
info = camel_folder_summary_info_new_from_message (folder->summary, message);
camel_pstring_free(info->uid);
Modified: branches/camel-gobject/camel/providers/groupwise/camel-groupwise-journal.h
==============================================================================
--- branches/camel-gobject/camel/providers/groupwise/camel-groupwise-journal.h (original)
+++ branches/camel-gobject/camel/providers/groupwise/camel-groupwise-journal.h Mon Nov 10 00:44:12 2008
@@ -32,10 +32,10 @@
#include <camel/camel-mime-message.h>
#define CAMEL_TYPE_GROUPWISE_JOURNAL (camel_groupwise_journal_get_type ())
-#define CAMEL_GROUPWISE_JOURNAL(obj) (CAMEL_CHECK_CAST ((obj), CAMEL_TYPE_GROUPWISE_JOURNAL, CamelGroupwiseJournal))
-#define CAMEL_GROUPWISE_JOURNAL_CLASS(klass) (CAMEL_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_GROUPWISE_JOURNAL, CamelGroupwiseJournalClass))
-#define CAMEL_IS_GROUPWISE_JOURNAL(obj) (CAMEL_CHECK_TYPE ((obj), CAMEL_TYPE_GROUPWISE_JOURNAL))
-#define CAMEL_IS_GROUPWISE_JOURNAL_CLASS(klass) (CAMEL_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_GROUPWISE_JOURNAL))
+#define CAMEL_GROUPWISE_JOURNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMEL_TYPE_GROUPWISE_JOURNAL, CamelGroupwiseJournal))
+#define CAMEL_GROUPWISE_JOURNAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_GROUPWISE_JOURNAL, CamelGroupwiseJournalClass))
+#define CAMEL_IS_GROUPWISE_JOURNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMEL_TYPE_GROUPWISE_JOURNAL))
+#define CAMEL_IS_GROUPWISE_JOURNAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_GROUPWISE_JOURNAL))
#define CAMEL_GROUPWISE_JOURNAL_GET_CLASS(obj) (CAMEL_CHECK_GET_CLASS ((obj), CAMEL_TYPE_GROUPWISE_JOURNAL, CamelGroupwiseJournalClass))
G_BEGIN_DECLS
@@ -72,7 +72,7 @@
};
-CamelType camel_groupwise_journal_get_type (void);
+GType camel_groupwise_journal_get_type (void);
CamelOfflineJournal *camel_groupwise_journal_new (struct _CamelGroupwiseFolder *folder, const char *filename);
Modified: branches/camel-gobject/camel/providers/groupwise/camel-groupwise-store-summary.c
==============================================================================
--- branches/camel-gobject/camel/providers/groupwise/camel-groupwise-store-summary.c (original)
+++ branches/camel-gobject/camel/providers/groupwise/camel-groupwise-store-summary.c Mon Nov 10 00:44:12 2008
@@ -95,14 +95,14 @@
}
-CamelType
+GType
camel_groupwise_store_summary_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
camel_groupwise_store_summary_parent = (CamelStoreSummaryClass *)camel_store_summary_get_type();
- type = camel_type_register((CamelType)camel_groupwise_store_summary_parent, "CamelGroupwiseStoreSummary",
+ type = camel_type_register((GType)camel_groupwise_store_summary_parent, "CamelGroupwiseStoreSummary",
sizeof (CamelGroupwiseStoreSummary),
sizeof (CamelGroupwiseStoreSummaryClass),
(CamelObjectClassInitFunc) camel_groupwise_store_summary_class_init,
Modified: branches/camel-gobject/camel/providers/groupwise/camel-groupwise-store-summary.h
==============================================================================
--- branches/camel-gobject/camel/providers/groupwise/camel-groupwise-store-summary.h (original)
+++ branches/camel-gobject/camel/providers/groupwise/camel-groupwise-store-summary.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-object.h>
#include <camel/camel-store-summary.h>
-#define CAMEL_GW_STORE_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_groupwise_store_summary_get_type (), CamelGroupwiseStoreSummary)
-#define CAMEL_GW_STORE_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_groupwise_store_summary_get_type (), CamelGroupwiseStoreSummaryClass)
-#define CAMEL_IS_GW_STORE_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_groupwise_store_summary_get_type ())
+#define CAMEL_GW_STORE_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_groupwise_store_summary_get_type (), CamelGroupwiseStoreSummary)
+#define CAMEL_GW_STORE_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_groupwise_store_summary_get_type (), CamelGroupwiseStoreSummaryClass)
+#define CAMEL_IS_GW_STORE_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_groupwise_store_summary_get_type ())
G_BEGIN_DECLS
@@ -70,7 +70,7 @@
CamelStoreSummaryClass summary_class;
};
-CamelType camel_groupwise_store_summary_get_type (void);
+GType camel_groupwise_store_summary_get_type (void);
CamelGroupwiseStoreSummary *camel_groupwise_store_summary_new (void);
CamelGroupwiseStoreInfo *camel_groupwise_store_summary_full_name(CamelGroupwiseStoreSummary *s, const char *full_name) ;
CamelGroupwiseStoreInfo *camel_groupwise_store_summary_add_from_full(CamelGroupwiseStoreSummary *s, const char *full, char dir_sep) ;
Modified: branches/camel-gobject/camel/providers/groupwise/camel-groupwise-store.c
==============================================================================
--- branches/camel-gobject/camel/providers/groupwise/camel-groupwise-store.c (original)
+++ branches/camel-gobject/camel/providers/groupwise/camel-groupwise-store.c Mon Nov 10 00:44:12 2008
@@ -333,7 +333,7 @@
g_print ("camel_groupwise_store_finalize\n");
if (groupwise_store->summary) {
camel_store_summary_save ((CamelStoreSummary *)groupwise_store->summary);
- camel_object_unref (groupwise_store->summary);
+ g_object_unref (groupwise_store->summary);
}
if (priv) {
@@ -543,7 +543,7 @@
folder = groupwise_get_folder_from_disk (store, folder_name, flags, ex);
if (folder) {
- camel_object_ref (folder);
+ g_object_ref (folder);
return folder;
}
@@ -557,7 +557,7 @@
}
if (gw_store->current_folder) {
- camel_object_unref (gw_store->current_folder);
+ g_object_unref (gw_store->current_folder);
gw_store->current_folder = NULL;
}
@@ -623,7 +623,7 @@
camel_folder_summary_save_to_db (folder->summary, ex);
camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_INVALID, _("Authentication failed"));
camel_operation_end (NULL);
- camel_object_unref (folder);
+ g_object_unref (folder);
g_free (container_id);
return NULL;*/
}
@@ -668,7 +668,7 @@
camel_folder_summary_save_to_db (folder->summary, ex);
gw_store->current_folder = folder;
- camel_object_ref (folder);
+ g_object_ref (folder);
g_free (container_id);
CAMEL_SERVICE_REC_UNLOCK (gw_store, connect_lock);
@@ -1094,7 +1094,7 @@
{
struct _store_refresh_msg *m = (struct _store_refresh_msg *)msg;
- camel_object_unref (m->store);
+ g_object_unref (m->store);
camel_exception_clear (&m->ex);
}
@@ -1295,7 +1295,7 @@
if (status == E_GW_CONNECTION_STATUS_OK) {
if (groupwise_store->current_folder)
- camel_object_unref (groupwise_store->current_folder);
+ g_object_unref (groupwise_store->current_folder);
groupwise_forget_folder(groupwise_store,folder_name,ex);
@@ -1480,7 +1480,7 @@
CamelStoreClass *camel_store_class =
CAMEL_STORE_CLASS (camel_groupwise_store_class);
- parent_class = CAMEL_OFFLINE_STORE_CLASS (camel_type_get_global_classfuncs (camel_offline_store_get_type ()));
+ parent_class = CAMEL_OFFLINE_STORE_CLASS (g_type_class_peek (camel_offline_store_get_type ()));
camel_service_class->construct = groupwise_store_construct;
camel_service_class->query_auth_types = groupwise_store_query_auth_types;
@@ -1511,7 +1511,7 @@
g_print ("camel_groupwise_store_finalize\n");
if (groupwise_store->summary) {
camel_store_summary_save ((CamelStoreSummary *)groupwise_store->summary);
- camel_object_unref (groupwise_store->summary);
+ g_object_unref (groupwise_store->summary);
}
if (priv) {
@@ -1578,12 +1578,12 @@
}
-CamelType
+GType
camel_groupwise_store_get_type (void)
{
- static CamelType camel_groupwise_store_type = CAMEL_INVALID_TYPE;
+ static GType camel_groupwise_store_type = G_TYPE_INVALID;
- if (camel_groupwise_store_type == CAMEL_INVALID_TYPE) {
+ if (camel_groupwise_store_type == G_TYPE_INVALID) {
camel_groupwise_store_type =
camel_type_register (camel_offline_store_get_type (),
"CamelGroupwiseStore",
Modified: branches/camel-gobject/camel/providers/groupwise/camel-groupwise-store.h
==============================================================================
--- branches/camel-gobject/camel/providers/groupwise/camel-groupwise-store.h (original)
+++ branches/camel-gobject/camel/providers/groupwise/camel-groupwise-store.h Mon Nov 10 00:44:12 2008
@@ -33,9 +33,9 @@
#include <e-gw-container.h>
#define CAMEL_GROUPWISE_STORE_TYPE (camel_groupwise_store_get_type ())
-#define CAMEL_GROUPWISE_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_GROUPWISE_STORE_TYPE, CamelGroupwiseStore))
-#define CAMEL_GROUPWISE_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_GROUPWISE_STORE_TYPE, CamelGroupwiseStoreClass))
-#define CAMEL_IS_GROUPWISE_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_GROUPWISE_STORE_TYPE))
+#define CAMEL_GROUPWISE_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_GROUPWISE_STORE_TYPE, CamelGroupwiseStore))
+#define CAMEL_GROUPWISE_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_GROUPWISE_STORE_TYPE, CamelGroupwiseStoreClass))
+#define CAMEL_IS_GROUPWISE_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_GROUPWISE_STORE_TYPE))
#define GW_PARAM_FILTER_INBOX (1 << 0)
@@ -67,7 +67,7 @@
/* Standard Camel function */
-CamelType camel_groupwise_store_get_type (void);
+GType camel_groupwise_store_get_type (void);
char * groupwise_get_name(CamelService *service, gboolean brief);
/*IMplemented*/
Modified: branches/camel-gobject/camel/providers/groupwise/camel-groupwise-summary.c
==============================================================================
--- branches/camel-gobject/camel/providers/groupwise/camel-groupwise-summary.c (original)
+++ branches/camel-gobject/camel/providers/groupwise/camel-groupwise-summary.c Mon Nov 10 00:44:12 2008
@@ -75,12 +75,12 @@
static CamelFolderSummaryClass *camel_groupwise_summary_parent ;
-CamelType
+GType
camel_groupwise_summary_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(
camel_folder_summary_get_type(), "CamelGroupwiseSummary",
sizeof (CamelGroupwiseSummary),
@@ -114,7 +114,7 @@
{
CamelFolderSummaryClass *cfs_class = (CamelFolderSummaryClass *) klass;
- camel_groupwise_summary_parent = CAMEL_FOLDER_SUMMARY_CLASS (camel_type_get_global_classfuncs (camel_folder_summary_get_type()));
+ camel_groupwise_summary_parent = CAMEL_FOLDER_SUMMARY_CLASS (g_type_class_peek (camel_folder_summary_get_type()));
cfs_class->message_info_clone = gw_message_info_clone ;
cfs_class->summary_header_load = gw_summary_header_load;
Modified: branches/camel-gobject/camel/providers/groupwise/camel-groupwise-summary.h
==============================================================================
--- branches/camel-gobject/camel/providers/groupwise/camel-groupwise-summary.h (original)
+++ branches/camel-gobject/camel/providers/groupwise/camel-groupwise-summary.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-exception.h>
#include <camel/camel-store.h>
-#define CAMEL_GROUPWISE_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_groupwise_summary_get_type (), CamelGroupwiseSummary)
-#define CAMEL_GROUPWISE_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_groupwise_summary_get_type (), CamelGroupwiseSummaryClass)
-#define CAMEL_IS_GROUPWISE_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_groupwise_summary_get_type ())
+#define CAMEL_GROUPWISE_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_groupwise_summary_get_type (), CamelGroupwiseSummary)
+#define CAMEL_GROUPWISE_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_groupwise_summary_get_type (), CamelGroupwiseSummaryClass)
+#define CAMEL_IS_GROUPWISE_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_groupwise_summary_get_type ())
G_BEGIN_DECLS
@@ -69,7 +69,7 @@
} ;
-CamelType camel_groupwise_summary_get_type (void) ;
+GType camel_groupwise_summary_get_type (void) ;
CamelFolderSummary *camel_groupwise_summary_new (struct _CamelFolder *folder, const char *filename) ;
Modified: branches/camel-gobject/camel/providers/groupwise/camel-groupwise-transport.c
==============================================================================
--- branches/camel-gobject/camel/providers/groupwise/camel-groupwise-transport.c (original)
+++ branches/camel-gobject/camel/providers/groupwise/camel-groupwise-transport.c Mon Nov 10 00:44:12 2008
@@ -69,7 +69,7 @@
CamelServiceClass *camel_service_class =
CAMEL_SERVICE_CLASS (camel_groupwise_transport_class);
- parent_class = CAMEL_TRANSPORT_CLASS (camel_type_get_global_classfuncs (camel_transport_get_type ()));
+ parent_class = CAMEL_TRANSPORT_CLASS (g_type_class_peek (camel_transport_get_type ()));
camel_service_class->connect = groupwise_transport_connect;
camel_service_class->get_name = groupwise_transport_get_name;
@@ -95,12 +95,12 @@
return;
}
-CamelType
+GType
camel_groupwise_transport_get_type (void)
{
- static CamelType camel_groupwise_transport_type = CAMEL_INVALID_TYPE;
+ static GType camel_groupwise_transport_type = G_TYPE_INVALID;
- if (camel_groupwise_transport_type == CAMEL_INVALID_TYPE) {
+ if (camel_groupwise_transport_type == G_TYPE_INVALID) {
camel_groupwise_transport_type =
camel_type_register (CAMEL_TRANSPORT_TYPE,
"CamelGroupwiseTransport",
Modified: branches/camel-gobject/camel/providers/groupwise/camel-groupwise-transport.h
==============================================================================
--- branches/camel-gobject/camel/providers/groupwise/camel-groupwise-transport.h (original)
+++ branches/camel-gobject/camel/providers/groupwise/camel-groupwise-transport.h Mon Nov 10 00:44:12 2008
@@ -28,9 +28,9 @@
#include <camel/camel-transport.h>
#define CAMEL_GROUPWISE_TRANSPORT_TYPE (camel_groupwise_transport_get_type ())
-#define CAMEL_GROUPWISE_TRANSPORT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_GROUPWISE_TRANSPORT_TYPE, CamelGroupwiseTransport))
-#define CAMEL_GROUPWISE_TRANSPORT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_GROUPWISE_TRANSPORT_TYPE, CamelGroupwiseTransportClass))
-#define CAMEL_IS_GROUPWISE_TRANSPORT(o) (CAMEL_CHECK_TYPE((o), CAMEL_GROUPWISE_TRANSPORT_TYPE))
+#define CAMEL_GROUPWISE_TRANSPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_GROUPWISE_TRANSPORT_TYPE, CamelGroupwiseTransport))
+#define CAMEL_GROUPWISE_TRANSPORT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_GROUPWISE_TRANSPORT_TYPE, CamelGroupwiseTransportClass))
+#define CAMEL_IS_GROUPWISE_TRANSPORT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_GROUPWISE_TRANSPORT_TYPE))
G_BEGIN_DECLS
@@ -48,7 +48,7 @@
/* Standard Camel function */
-CamelType camel_groupwise_transport_get_type (void);
+GType camel_groupwise_transport_get_type (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/providers/groupwise/camel-groupwise-utils.c
==============================================================================
--- branches/camel-gobject/camel/providers/groupwise/camel-groupwise-utils.c (original)
+++ branches/camel-gobject/camel/providers/groupwise/camel-groupwise-utils.c Mon Nov 10 00:44:12 2008
@@ -445,16 +445,16 @@
filter = (CamelMimeFilter *) camel_mime_filter_charset_new_convert (charset, "UTF-8");
filtered_stream = (CamelStream *) camel_stream_filter_new_with_stream ((CamelStream *) content);
camel_stream_filter_add ((CamelStreamFilter *) filtered_stream, filter);
- camel_object_unref (filter);
+ g_object_unref (filter);
} else {
/* US-ASCII or UTF-8 */
filtered_stream = (CamelStream *) content;
- camel_object_ref (content);
+ g_object_ref (content);
}
camel_data_wrapper_decode_to_stream (dw, filtered_stream);
camel_stream_flush (filtered_stream);
- camel_object_unref (filtered_stream);
+ g_object_unref (filtered_stream);
camel_stream_write ((CamelStream *) content, "", 1);
e_gw_item_set_message (item, (const char *)content->buffer->data);
@@ -463,7 +463,7 @@
send_as_attachment (cnc, item, content, type, dw, NULL, NULL, &attach_list);
}
- camel_object_unref (content);
+ g_object_unref (content);
}
/*Populate EGwItem*/
/*From Address*/
@@ -653,7 +653,7 @@
cid = camel_mime_part_get_content_id (temp_part);
send_as_attachment (cnc, item, temp_content, type, temp_dw, filename, cid, attach_list);
}
- camel_object_unref (temp_content);
+ g_object_unref (temp_content);
continue;
}
@@ -672,16 +672,16 @@
filter = (CamelMimeFilter *) camel_mime_filter_charset_new_convert (charset, "UTF-8");
filtered_stream = (CamelStream *) camel_stream_filter_new_with_stream ((CamelStream *) content);
camel_stream_filter_add ((CamelStreamFilter *) filtered_stream, filter);
- camel_object_unref (filter);
+ g_object_unref (filter);
} else {
/* US-ASCII or UTF-8 */
filtered_stream = (CamelStream *) content;
- camel_object_ref (content);
+ g_object_ref (content);
}
camel_data_wrapper_decode_to_stream (dw, filtered_stream);
camel_stream_flush (filtered_stream);
- camel_object_unref (filtered_stream);
+ g_object_unref (filtered_stream);
camel_stream_write ((CamelStream *) content, "", 1);
e_gw_item_set_message (item, (const char *)content->buffer->data);
@@ -694,6 +694,6 @@
send_as_attachment (cnc, item, content, type, dw, filename, content_id, attach_list);
}
- camel_object_unref (content);
+ g_object_unref (content);
} /*end of for*/
}
Modified: branches/camel-gobject/camel/providers/imap/camel-imap-command.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap/camel-imap-command.c (original)
+++ branches/camel-gobject/camel/providers/imap/camel-imap-command.c Mon Nov 10 00:44:12 2008
@@ -101,9 +101,9 @@
cmd = imap_command_strdup_vprintf (store, fmt, ap);
va_end (ap);
} else {
- camel_object_ref(folder);
+ g_object_ref(folder);
if (store->current_folder)
- camel_object_unref(store->current_folder);
+ g_object_unref(store->current_folder);
store->current_folder = folder;
cmd = imap_command_strdup_printf (store, "SELECT %F", folder->full_name);
}
@@ -391,7 +391,7 @@
response = g_new0 (CamelImapResponse, 1);
/*FIXME if (store->current_folder && camel_disco_store_status (CAMEL_DISCO_STORE (store)) != CAMEL_DISCO_STORE_RESYNCING) {
response->folder = store->current_folder;
- camel_object_ref (CAMEL_OBJECT (response->folder));
+ g_object_ref (CAMEL_OBJECT (response->folder));
} */
response->untagged = g_ptr_array_new ();
@@ -640,7 +640,7 @@
g_array_free (expunged, TRUE);
}
- camel_object_unref (CAMEL_OBJECT (response->folder));
+ g_object_unref (CAMEL_OBJECT (response->folder));
}
g_free (response);
@@ -663,7 +663,7 @@
return;
if (response->folder) {
- camel_object_unref (CAMEL_OBJECT (response->folder));
+ g_object_unref (CAMEL_OBJECT (response->folder));
response->folder = NULL;
}
camel_imap_response_free (store, response);
Modified: branches/camel-gobject/camel/providers/imap/camel-imap-folder.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap/camel-imap-folder.c (original)
+++ branches/camel-gobject/camel/providers/imap/camel-imap-folder.c Mon Nov 10 00:44:12 2008
@@ -148,8 +148,8 @@
{
CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS (camel_imap_folder_class);
- parent_class = camel_type_get_global_classfuncs (camel_offline_folder_get_type());
- offline_folder_class = camel_type_get_global_classfuncs (camel_offline_folder_get_type ());
+ parent_class = g_type_class_peek (camel_offline_folder_get_type());
+ offline_folder_class = g_type_class_peek (camel_offline_folder_get_type ());
/* virtual method overload */
((CamelObjectClass *)camel_imap_folder_class)->getv = imap_getv;
@@ -192,12 +192,12 @@
imap_folder->need_rescan = TRUE;
}
-CamelType
+GType
camel_imap_folder_get_type (void)
{
- static CamelType camel_imap_folder_type = CAMEL_INVALID_TYPE;
+ static GType camel_imap_folder_type = G_TYPE_INVALID;
- if (camel_imap_folder_type == CAMEL_INVALID_TYPE) {
+ if (camel_imap_folder_type == G_TYPE_INVALID) {
int i;
camel_imap_folder_type =
@@ -246,7 +246,7 @@
folder->summary = camel_imap_summary_new (folder, summary_file);
g_free (summary_file);
if (!folder->summary) {
- camel_object_unref (CAMEL_OBJECT (folder));
+ g_object_unref (CAMEL_OBJECT (folder));
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Could not load summary for %s"),
folder_name);
@@ -266,7 +266,7 @@
imap_folder->cache = camel_imap_message_cache_new (folder_dir, folder->summary, ex);
if (!imap_folder->cache) {
- camel_object_unref (CAMEL_OBJECT (folder));
+ g_object_unref (CAMEL_OBJECT (folder));
return NULL;
}
@@ -429,9 +429,9 @@
CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (object);
if (imap_folder->search)
- camel_object_unref (CAMEL_OBJECT (imap_folder->search));
+ g_object_unref (CAMEL_OBJECT (imap_folder->search));
if (imap_folder->cache)
- camel_object_unref (CAMEL_OBJECT (imap_folder->cache));
+ g_object_unref (CAMEL_OBJECT (imap_folder->cache));
#ifdef ENABLE_THREADS
g_static_mutex_free(&imap_folder->priv->search_lock);
@@ -440,7 +440,7 @@
if (imap_folder->journal) {
camel_offline_journal_write (imap_folder->journal, NULL);
- camel_object_unref (imap_folder->journal);
+ g_object_unref (imap_folder->journal);
}
g_free(imap_folder->priv);
@@ -1839,9 +1839,9 @@
camel_stream_filter_add (streamfilter, crlf_filter);
camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message),
CAMEL_STREAM (streamfilter));
- camel_object_unref (CAMEL_OBJECT (streamfilter));
- camel_object_unref (CAMEL_OBJECT (crlf_filter));
- camel_object_unref (CAMEL_OBJECT (memstream));
+ g_object_unref (CAMEL_OBJECT (streamfilter));
+ g_object_unref (CAMEL_OBJECT (crlf_filter));
+ g_object_unref (CAMEL_OBJECT (memstream));
/* Some servers don't let us append with (CamelMessageInfo *)custom flags. If the command fails for
whatever reason, assume this is the case and save the state and try again */
@@ -2036,7 +2036,7 @@
if (message) {
camel_imap_summary_add_offline (dest->summary, destuid, message, mi);
- camel_object_unref (CAMEL_OBJECT (message));
+ g_object_unref (CAMEL_OBJECT (message));
} else
camel_imap_summary_add_offline_uncached (dest->summary, destuid, mi);
@@ -2361,7 +2361,7 @@
imap_append_online (dest, message, info, NULL, ex);
camel_folder_free_message_info (source, info);
- camel_object_unref (CAMEL_OBJECT (message));
+ g_object_unref (CAMEL_OBJECT (message));
if (delete_originals && !camel_exception_is_set (ex))
camel_folder_delete_message (source, uid);
i++;
@@ -2574,9 +2574,9 @@
stream = camel_imap_folder_fetch_data (imap_folder, uid, spec, FALSE, ex);
if (stream) {
ret = camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (body_mp), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
+ g_object_unref (CAMEL_OBJECT (stream));
if (ret == -1) {
- camel_object_unref ((CamelObject *) body_mp);
+ g_object_unref ((CamelObject *) body_mp);
return NULL;
}
}
@@ -2614,10 +2614,10 @@
part = camel_mime_part_new ();
ret = camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (part), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
+ g_object_unref (CAMEL_OBJECT (stream));
if (ret == -1) {
- camel_object_unref (CAMEL_OBJECT (part));
- camel_object_unref (CAMEL_OBJECT (body_mp));
+ g_object_unref (CAMEL_OBJECT (part));
+ g_object_unref (CAMEL_OBJECT (body_mp));
g_free (child_spec);
return NULL;
}
@@ -2626,7 +2626,7 @@
}
if (!stream || !content) {
- camel_object_unref (CAMEL_OBJECT (body_mp));
+ g_object_unref (CAMEL_OBJECT (body_mp));
g_free (child_spec);
return NULL;
}
@@ -2652,10 +2652,10 @@
}
camel_medium_set_content_object (CAMEL_MEDIUM (part), content);
- camel_object_unref(content);
+ g_object_unref(content);
camel_multipart_add_part (body_mp, part);
- camel_object_unref(part);
+ g_object_unref(part);
ci = ci->next;
}
@@ -2710,15 +2710,15 @@
msg = camel_mime_message_new ();
ret = camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
+ g_object_unref (CAMEL_OBJECT (stream));
if (ret == -1) {
- camel_object_unref (CAMEL_OBJECT (msg));
+ g_object_unref (CAMEL_OBJECT (msg));
return NULL;
}
content = get_content (imap_folder, uid, CAMEL_MIME_PART (msg), ci, TRUE, ex);
if (!content) {
- camel_object_unref (CAMEL_OBJECT (msg));
+ g_object_unref (CAMEL_OBJECT (msg));
return NULL;
}
@@ -2733,7 +2733,7 @@
camel_data_wrapper_set_mime_type_field(content, camel_mime_part_get_content_type((CamelMimePart *)msg));
camel_medium_set_content_object (CAMEL_MEDIUM (msg), content);
- camel_object_unref (CAMEL_OBJECT (content));
+ g_object_unref (CAMEL_OBJECT (content));
return msg;
}
@@ -2757,12 +2757,12 @@
msg = camel_mime_message_new ();
ret = camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg),
stream);
- camel_object_unref (CAMEL_OBJECT (stream));
+ g_object_unref (CAMEL_OBJECT (stream));
if (ret == -1) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
_("Unable to retrieve message: %s"),
g_strerror (errno));
- camel_object_unref (CAMEL_OBJECT (msg));
+ g_object_unref (CAMEL_OBJECT (msg));
return NULL;
}
@@ -2918,7 +2918,7 @@
stream = camel_imap_folder_fetch_data (imap_folder, uid, "", FALSE, ex);
if (stream)
- camel_object_unref (CAMEL_OBJECT (stream));
+ g_object_unref (CAMEL_OBJECT (stream));
}
*/
@@ -3050,12 +3050,12 @@
msg = camel_mime_message_new ();
if (camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg), stream) == -1) {
- camel_object_unref (CAMEL_OBJECT (msg));
+ g_object_unref (CAMEL_OBJECT (msg));
return;
}
mi = (CamelImapMessageInfo *)camel_folder_summary_info_new_from_message (folder->summary, msg);
- camel_object_unref (CAMEL_OBJECT (msg));
+ g_object_unref (CAMEL_OBJECT (msg));
if ((idate = g_datalist_get_data (&data, "INTERNALDATE")))
mi->info.date_received = decode_internaldate ((const unsigned char *) idate);
@@ -3634,7 +3634,7 @@
camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
_("Could not find message body in FETCH response."));
} else {
- camel_object_ref (CAMEL_OBJECT (stream));
+ g_object_ref (CAMEL_OBJECT (stream));
g_datalist_clear (&fetch_data);
}
@@ -3785,7 +3785,7 @@
if (stream)
g_datalist_set_data_full (&data, "BODY_PART_STREAM", stream,
- (GDestroyNotify) camel_object_unref);
+ (GDestroyNotify) g_object_unref);
}
return data;
Modified: branches/camel-gobject/camel/providers/imap/camel-imap-folder.h
==============================================================================
--- branches/camel-gobject/camel/providers/imap/camel-imap-folder.h (original)
+++ branches/camel-gobject/camel/providers/imap/camel-imap-folder.h Mon Nov 10 00:44:12 2008
@@ -33,9 +33,9 @@
#include <camel/camel-offline-journal.h>
#define CAMEL_IMAP_FOLDER_TYPE (camel_imap_folder_get_type ())
-#define CAMEL_IMAP_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAP_FOLDER_TYPE, CamelImapFolder))
-#define CAMEL_IMAP_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAP_FOLDER_TYPE, CamelImapFolderClass))
-#define CAMEL_IS_IMAP_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAP_FOLDER_TYPE))
+#define CAMEL_IMAP_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_IMAP_FOLDER_TYPE, CamelImapFolder))
+#define CAMEL_IMAP_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_IMAP_FOLDER_TYPE, CamelImapFolderClass))
+#define CAMEL_IS_IMAP_FOLDER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_IMAP_FOLDER_TYPE))
G_BEGIN_DECLS
@@ -106,7 +106,7 @@
imap_expunge_uids_resyncing (CamelFolder *folder, GPtrArray *uids, CamelException *ex);
/* Standard Camel function */
-CamelType camel_imap_folder_get_type (void);
+GType camel_imap_folder_get_type (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/providers/imap/camel-imap-journal.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap/camel-imap-journal.c (original)
+++ branches/camel-gobject/camel/providers/imap/camel-imap-journal.c Mon Nov 10 00:44:12 2008
@@ -63,10 +63,10 @@
static CamelOfflineJournalClass *parent_class = NULL;
-CamelType
+GType
camel_imap_journal_get_type (void)
{
- static CamelType type = 0;
+ static GType type = 0;
if (!type) {
type = camel_type_register (camel_offline_journal_get_type (),
@@ -87,7 +87,7 @@
{
CamelOfflineJournalClass *journal_class = (CamelOfflineJournalClass *) klass;
- parent_class = (CamelOfflineJournalClass *) camel_type_get_global_classfuncs (CAMEL_TYPE_OFFLINE_JOURNAL);
+ parent_class = (CamelOfflineJournalClass *) g_type_class_peek (CAMEL_TYPE_OFFLINE_JOURNAL);
journal_class->entry_free = imap_entry_free;
journal_class->entry_load = imap_entry_load;
@@ -128,7 +128,7 @@
static void
unref_folder (gpointer key, gpointer value, gpointer data)
{
- camel_object_unref (value);
+ g_object_unref (value);
}
static void
@@ -444,7 +444,7 @@
{
g_free (name);
camel_folder_sync (folder, FALSE, NULL);
- camel_object_unref (folder);
+ g_object_unref (folder);
}
void
Modified: branches/camel-gobject/camel/providers/imap/camel-imap-journal.h
==============================================================================
--- branches/camel-gobject/camel/providers/imap/camel-imap-journal.h (original)
+++ branches/camel-gobject/camel/providers/imap/camel-imap-journal.h Mon Nov 10 00:44:12 2008
@@ -33,10 +33,10 @@
#include <camel/camel-mime-message.h>
#define CAMEL_TYPE_IMAP_JOURNAL (camel_imap_journal_get_type ())
-#define CAMEL_IMAP_JOURNAL(obj) (CAMEL_CHECK_CAST ((obj), CAMEL_TYPE_IMAP_JOURNAL, CamelIMAPJournal))
-#define CAMEL_IMAP_JOURNAL_CLASS(klass) (CAMEL_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_IMAP_JOURNAL, CamelIMAPJournalClass))
-#define CAMEL_IS_IMAP_JOURNAL(obj) (CAMEL_CHECK_TYPE ((obj), CAMEL_TYPE_IMAP_JOURNAL))
-#define CAMEL_IS_IMAP_JOURNAL_CLASS(klass) (CAMEL_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_IMAP_JOURNAL))
+#define CAMEL_IMAP_JOURNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMEL_TYPE_IMAP_JOURNAL, CamelIMAPJournal))
+#define CAMEL_IMAP_JOURNAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_IMAP_JOURNAL, CamelIMAPJournalClass))
+#define CAMEL_IS_IMAP_JOURNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMEL_TYPE_IMAP_JOURNAL))
+#define CAMEL_IS_IMAP_JOURNAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_IMAP_JOURNAL))
#define CAMEL_IMAP_JOURNAL_GET_CLASS(obj) (CAMEL_CHECK_GET_CLASS ((obj), CAMEL_TYPE_IMAP_JOURNAL, CamelIMAPJournalClass))
G_BEGIN_DECLS
@@ -79,7 +79,7 @@
};
-CamelType camel_imap_journal_get_type (void);
+GType camel_imap_journal_get_type (void);
CamelOfflineJournal *camel_imap_journal_new (struct _CamelImapFolder *folder, const char *filename);
void camel_imap_journal_log (CamelOfflineJournal *journal, CamelOfflineAction action, ...);
Modified: branches/camel-gobject/camel/providers/imap/camel-imap-message-cache.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap/camel-imap-message-cache.c (original)
+++ branches/camel-gobject/camel/providers/imap/camel-imap-message-cache.c Mon Nov 10 00:44:12 2008
@@ -46,14 +46,14 @@
static void stream_finalize (CamelObject *stream, gpointer event_data, gpointer user_data);
-CamelType
+GType
camel_imap_message_cache_get_type (void)
{
- static CamelType camel_imap_message_cache_type = CAMEL_INVALID_TYPE;
+ static GType camel_imap_message_cache_type = G_TYPE_INVALID;
- if (camel_imap_message_cache_type == CAMEL_INVALID_TYPE) {
+ if (camel_imap_message_cache_type == G_TYPE_INVALID) {
camel_imap_message_cache_type = camel_type_register (
- CAMEL_OBJECT_TYPE, "CamelImapMessageCache",
+ CAMEL_TYPE_OBJECT, "CamelImapMessageCache",
sizeof (CamelImapMessageCache),
sizeof (CamelImapMessageCacheClass),
NULL,
@@ -72,7 +72,7 @@
if (strchr (key, '.')) {
camel_object_unhook_event (value, "finalize",
stream_finalize, data);
- camel_object_unref (value);
+ g_object_unref (value);
} else
g_ptr_array_free (value, TRUE);
}
@@ -116,7 +116,7 @@
camel_object_unhook_event (ostream, "finalize",
stream_finalize, cache);
g_hash_table_remove (cache->cached, ostream);
- camel_object_unref (ostream);
+ g_object_unref (ostream);
}
hash_key = okey;
} else {
@@ -304,7 +304,7 @@
*key = strrchr (*path, '/') + 1;
stream = g_hash_table_lookup (cache->parts, *key);
if (stream)
- camel_object_unref (CAMEL_OBJECT (stream));
+ g_object_unref (CAMEL_OBJECT (stream));
fd = g_open (*path, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0600);
if (fd == -1) {
@@ -323,7 +323,7 @@
{
g_unlink (path);
g_free (path);
- camel_object_unref (CAMEL_OBJECT (stream));
+ g_object_unref (CAMEL_OBJECT (stream));
return NULL;
}
@@ -402,7 +402,7 @@
insert_abort (path, stream);
} else {
insert_finish (cache, uid, path, key, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
+ g_object_unref (CAMEL_OBJECT (stream));
}
}
@@ -434,7 +434,7 @@
insert_abort (path, stream);
} else {
insert_finish (cache, uid, path, key, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
+ g_object_unref (CAMEL_OBJECT (stream));
}
}
@@ -470,7 +470,7 @@
stream = g_hash_table_lookup (cache->parts, key);
if (stream) {
camel_stream_reset (CAMEL_STREAM (stream));
- camel_object_ref (CAMEL_OBJECT (stream));
+ g_object_ref (CAMEL_OBJECT (stream));
g_free (path);
return stream;
}
@@ -516,7 +516,7 @@
if (stream) {
camel_object_unhook_event (stream, "finalize",
stream_finalize, cache);
- camel_object_unref (stream);
+ g_object_unref (stream);
g_hash_table_remove (cache->cached, stream);
}
g_hash_table_remove (cache->parts, key);
@@ -587,7 +587,7 @@
if ((stream = camel_imap_message_cache_get (source, source_uid, part, ex))) {
camel_imap_message_cache_insert_stream (dest, dest_uid, part, stream, ex);
- camel_object_unref (CAMEL_OBJECT (stream));
+ g_object_unref (CAMEL_OBJECT (stream));
}
}
}
Modified: branches/camel-gobject/camel/providers/imap/camel-imap-message-cache.h
==============================================================================
--- branches/camel-gobject/camel/providers/imap/camel-imap-message-cache.h (original)
+++ branches/camel-gobject/camel/providers/imap/camel-imap-message-cache.h Mon Nov 10 00:44:12 2008
@@ -31,9 +31,9 @@
#include <camel/camel-folder-search.h>
#define CAMEL_IMAP_MESSAGE_CACHE_TYPE (camel_imap_message_cache_get_type ())
-#define CAMEL_IMAP_MESSAGE_CACHE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAP_MESSAGE_CACHE_TYPE, CamelImapFolder))
-#define CAMEL_IMAP_MESSAGE_CACHE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAP_MESSAGE_CACHE_TYPE, CamelImapFolderClass))
-#define CAMEL_IS_IMAP_MESSAGE_CACHE(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAP_MESSAGE_CACHE_TYPE))
+#define CAMEL_IMAP_MESSAGE_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_IMAP_MESSAGE_CACHE_TYPE, CamelImapFolder))
+#define CAMEL_IMAP_MESSAGE_CACHE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_IMAP_MESSAGE_CACHE_TYPE, CamelImapFolderClass))
+#define CAMEL_IS_IMAP_MESSAGE_CACHE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_IMAP_MESSAGE_CACHE_TYPE))
G_BEGIN_DECLS
@@ -100,7 +100,7 @@
CamelException *ex);
/* Standard Camel function */
-CamelType camel_imap_message_cache_get_type (void);
+GType camel_imap_message_cache_get_type (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/providers/imap/camel-imap-search.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap/camel-imap-search.c (original)
+++ branches/camel-gobject/camel/providers/imap/camel-imap-search.c Mon Nov 10 00:44:12 2008
@@ -106,7 +106,7 @@
CamelFolderSearchClass *camel_folder_search_class =
CAMEL_FOLDER_SEARCH_CLASS (camel_imap_search_class);
- imap_search_parent_class = (CamelFolderSearchClass *)camel_type_get_global_classfuncs (camel_folder_search_get_type ());
+ imap_search_parent_class = (CamelFolderSearchClass *)g_type_class_peek (camel_folder_search_get_type ());
/* virtual method overload */
camel_folder_search_class->body_contains = imap_body_contains;
@@ -130,15 +130,15 @@
free_match(is, mr);
g_hash_table_destroy(is->matches_hash);
if (is->cache)
- camel_object_unref((CamelObject *)is->cache);
+ g_object_unref((CamelObject *)is->cache);
}
-CamelType
+GType
camel_imap_search_get_type (void)
{
- static CamelType camel_imap_search_type = CAMEL_INVALID_TYPE;
+ static GType camel_imap_search_type = G_TYPE_INVALID;
- if (camel_imap_search_type == CAMEL_INVALID_TYPE) {
+ if (camel_imap_search_type == G_TYPE_INVALID) {
camel_imap_search_type = camel_type_register (
CAMEL_FOLDER_SEARCH_TYPE, "CamelImapSearch",
sizeof (CamelImapSearch),
@@ -243,7 +243,7 @@
ret = -1;
}
- camel_object_unref((CamelObject *)stream);
+ g_object_unref((CamelObject *)stream);
return ret;
}
@@ -301,7 +301,7 @@
d(printf(" file format invalid/validity changed\n"));
memset(&header, 0, sizeof(header));
}
- camel_object_unref((CamelObject *)stream);
+ g_object_unref((CamelObject *)stream);
} else {
d(printf(" no cache entry found\n"));
}
Modified: branches/camel-gobject/camel/providers/imap/camel-imap-search.h
==============================================================================
--- branches/camel-gobject/camel/providers/imap/camel-imap-search.h (original)
+++ branches/camel-gobject/camel/providers/imap/camel-imap-search.h Mon Nov 10 00:44:12 2008
@@ -31,9 +31,9 @@
#include <camel/camel-data-cache.h>
#define CAMEL_IMAP_SEARCH_TYPE (camel_imap_search_get_type ())
-#define CAMEL_IMAP_SEARCH(obj) CAMEL_CHECK_CAST (obj, camel_imap_search_get_type (), CamelImapSearch)
-#define CAMEL_IMAP_SEARCH_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imap_search_get_type (), CamelImapSearchClass)
-#define CAMEL_IS_IMAP_SEARCH(obj) CAMEL_CHECK_TYPE (obj, camel_imap_search_get_type ())
+#define CAMEL_IMAP_SEARCH(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_imap_search_get_type (), CamelImapSearch)
+#define CAMEL_IMAP_SEARCH_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_imap_search_get_type (), CamelImapSearchClass)
+#define CAMEL_IS_IMAP_SEARCH(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_imap_search_get_type ())
G_BEGIN_DECLS
@@ -58,7 +58,7 @@
};
-CamelType camel_imap_search_get_type (void);
+GType camel_imap_search_get_type (void);
CamelFolderSearch *camel_imap_search_new (const char *cachedir);
G_END_DECLS
Modified: branches/camel-gobject/camel/providers/imap/camel-imap-store-summary.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap/camel-imap-store-summary.c (original)
+++ branches/camel-gobject/camel/providers/imap/camel-imap-store-summary.c Mon Nov 10 00:44:12 2008
@@ -69,7 +69,7 @@
{
CamelStoreSummaryClass *ssklass = (CamelStoreSummaryClass *)klass;
- camel_imap_store_summary_parent = camel_type_get_global_classfuncs (camel_store_summary_get_type());
+ camel_imap_store_summary_parent = g_type_class_peek (camel_store_summary_get_type());
ssklass->summary_header_load = summary_header_load;
ssklass->summary_header_save = summary_header_save;
@@ -104,12 +104,12 @@
g_free(p);*/
}
-CamelType
+GType
camel_imap_store_summary_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_store_summary_get_type (), "CamelImapStoreSummary",
sizeof (CamelImapStoreSummary),
sizeof (CamelImapStoreSummaryClass),
Modified: branches/camel-gobject/camel/providers/imap/camel-imap-store-summary.h
==============================================================================
--- branches/camel-gobject/camel/providers/imap/camel-imap-store-summary.h (original)
+++ branches/camel-gobject/camel/providers/imap/camel-imap-store-summary.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-object.h>
#include <camel/camel-store-summary.h>
-#define CAMEL_IMAP_STORE_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_imap_store_summary_get_type (), CamelImapStoreSummary)
-#define CAMEL_IMAP_STORE_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imap_store_summary_get_type (), CamelImapStoreSummaryClass)
-#define CAMEL_IS_IMAP_STORE_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_imap_store_summary_get_type ())
+#define CAMEL_IMAP_STORE_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_imap_store_summary_get_type (), CamelImapStoreSummary)
+#define CAMEL_IMAP_STORE_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_imap_store_summary_get_type (), CamelImapStoreSummaryClass)
+#define CAMEL_IS_IMAP_STORE_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_imap_store_summary_get_type ())
G_BEGIN_DECLS
@@ -70,7 +70,7 @@
CamelStoreSummaryClass summary_class;
};
-CamelType camel_imap_store_summary_get_type (void);
+GType camel_imap_store_summary_get_type (void);
CamelImapStoreSummary *camel_imap_store_summary_new (void);
/* TODO: this api needs some more work, needs to support lists */
Modified: branches/camel-gobject/camel/providers/imap/camel-imap-store.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap/camel-imap-store.c (original)
+++ branches/camel-gobject/camel/providers/imap/camel-imap-store.c Mon Nov 10 00:44:12 2008
@@ -131,7 +131,7 @@
CamelStoreClass *camel_store_class =
CAMEL_STORE_CLASS (camel_imap_store_class);
- parent_class = CAMEL_OFFLINE_STORE_CLASS (camel_type_get_global_classfuncs (camel_offline_store_get_type ()));
+ parent_class = CAMEL_OFFLINE_STORE_CLASS (g_type_class_peek (camel_offline_store_get_type ()));
/* virtual method overload */
camel_object_class->setv = imap_setv;
@@ -177,7 +177,7 @@
if (imap_store->summary) {
camel_store_summary_save((CamelStoreSummary *)imap_store->summary);
- camel_object_unref(imap_store->summary);
+ g_object_unref(imap_store->summary);
}
if (imap_store->base_url)
@@ -210,12 +210,12 @@
imap_tag_prefix = 'A';
}
-CamelType
+GType
camel_imap_store_get_type (void)
{
- static CamelType camel_imap_store_type = CAMEL_INVALID_TYPE;
+ static GType camel_imap_store_type = G_TYPE_INVALID;
- if (camel_imap_store_type == CAMEL_INVALID_TYPE) {
+ if (camel_imap_store_type == G_TYPE_INVALID) {
camel_imap_store_type =
camel_type_register (camel_offline_store_get_type (),
"CamelImapStore",
@@ -584,7 +584,7 @@
service->url->host,
g_strerror (errno));
- camel_object_unref (tcp_stream);
+ g_object_unref (tcp_stream);
return FALSE;
}
@@ -609,12 +609,12 @@
/* Read the greeting, if any, and deal with PREAUTH */
if (camel_imap_store_readline (store, &buf, ex) < 0) {
if (store->istream) {
- camel_object_unref (store->istream);
+ g_object_unref (store->istream);
store->istream = NULL;
}
if (store->ostream) {
- camel_object_unref (store->ostream);
+ g_object_unref (store->ostream);
store->ostream = NULL;
}
@@ -659,12 +659,12 @@
/* get the imap server capabilities */
if (!imap_get_capability (service, ex)) {
if (store->istream) {
- camel_object_unref (store->istream);
+ g_object_unref (store->istream);
store->istream = NULL;
}
if (store->ostream) {
- camel_object_unref (store->ostream);
+ g_object_unref (store->ostream);
store->ostream = NULL;
}
@@ -696,8 +696,8 @@
response = camel_imap_command (store, NULL, ex, "STARTTLS");
if (!response) {
- camel_object_unref (store->istream);
- camel_object_unref (store->ostream);
+ g_object_unref (store->istream);
+ g_object_unref (store->ostream);
store->istream = store->ostream = NULL;
return FALSE;
}
@@ -722,12 +722,12 @@
command, the client MUST discard prior CAPA responses */
if (!imap_get_capability (service, ex)) {
if (store->istream) {
- camel_object_unref (store->istream);
+ g_object_unref (store->istream);
store->istream = NULL;
}
if (store->ostream) {
- camel_object_unref (store->ostream);
+ g_object_unref (store->ostream);
store->ostream = NULL;
}
@@ -756,12 +756,12 @@
}
if (store->istream) {
- camel_object_unref (store->istream);
+ g_object_unref (store->istream);
store->istream = NULL;
}
if (store->ostream) {
- camel_object_unref (store->ostream);
+ g_object_unref (store->ostream);
store->ostream = NULL;
}
@@ -865,7 +865,7 @@
_("Could not connect with command \"%s\": %s"),
full_cmd, g_strerror (errno));
- camel_object_unref (cmd_stream);
+ g_object_unref (cmd_stream);
g_free (full_cmd);
return FALSE;
}
@@ -881,12 +881,12 @@
/* Read the greeting, if any, and deal with PREAUTH */
if (camel_imap_store_readline (store, &buf, ex) < 0) {
if (store->istream) {
- camel_object_unref (store->istream);
+ g_object_unref (store->istream);
store->istream = NULL;
}
if (store->ostream) {
- camel_object_unref (store->ostream);
+ g_object_unref (store->ostream);
store->ostream = NULL;
}
@@ -901,12 +901,12 @@
/* get the imap server capabilities */
if (!imap_get_capability (service, ex)) {
if (store->istream) {
- camel_object_unref (store->istream);
+ g_object_unref (store->istream);
store->istream = NULL;
}
if (store->ostream) {
- camel_object_unref (store->ostream);
+ g_object_unref (store->ostream);
store->ostream = NULL;
}
@@ -1191,7 +1191,7 @@
/* NB: we can have vtrash folders also in our store ... bit hacky */
if (!CAMEL_IS_IMAP_FOLDER(folder)) {
- camel_object_unref(folder);
+ g_object_unref(folder);
continue;
}
@@ -1207,12 +1207,12 @@
* after being offline */
namedup = g_strdup (folder->full_name);
- camel_object_unref(folder);
+ g_object_unref(folder);
imap_folder_effectively_unsubscribed (store, namedup, ex);
imap_forget_folder (store, namedup, ex);
g_free (namedup);
} else
- camel_object_unref(folder);
+ g_object_unref(folder);
}
g_ptr_array_free (folders, TRUE);
@@ -1257,7 +1257,7 @@
goto lose;
}
- camel_object_unref (sasl);
+ g_object_unref (sasl);
return TRUE;
@@ -1273,7 +1273,7 @@
_("Bad authentication response from server."));
}
- camel_object_unref (sasl);
+ g_object_unref (sasl);
return FALSE;
}
@@ -1555,19 +1555,19 @@
if (store->istream) {
camel_stream_close(store->istream);
- camel_object_unref(store->istream);
+ g_object_unref(store->istream);
store->istream = NULL;
}
if (store->ostream) {
camel_stream_close(store->ostream);
- camel_object_unref(store->ostream);
+ g_object_unref(store->ostream);
store->ostream = NULL;
}
store->connected = FALSE;
if (store->current_folder) {
- camel_object_unref (store->current_folder);
+ g_object_unref (store->current_folder);
store->current_folder = NULL;
}
@@ -1827,7 +1827,7 @@
folder_name = "INBOX";
if (imap_store->current_folder) {
- camel_object_unref (imap_store->current_folder);
+ g_object_unref (imap_store->current_folder);
imap_store->current_folder = NULL;
}
@@ -1994,15 +1994,15 @@
CamelException local_ex;
imap_store->current_folder = new_folder;
- camel_object_ref (new_folder);
+ g_object_ref (new_folder);
camel_exception_init (&local_ex);
camel_imap_folder_selected (new_folder, response, &local_ex);
if (camel_exception_is_set (&local_ex)) {
camel_exception_xfer (ex, &local_ex);
- camel_object_unref (imap_store->current_folder);
+ g_object_unref (imap_store->current_folder);
imap_store->current_folder = NULL;
- camel_object_unref (new_folder);
+ g_object_unref (new_folder);
new_folder = NULL;
}
}
@@ -2068,7 +2068,7 @@
camel_imap_response_free_without_processing (imap_store, response);
if (imap_store->current_folder)
- camel_object_unref (imap_store->current_folder);
+ g_object_unref (imap_store->current_folder);
/* no need to actually create a CamelFolder for INBOX */
imap_store->current_folder = NULL;
@@ -2170,7 +2170,7 @@
camel_imap_response_free_without_processing (imap_store, response);
if (imap_store->current_folder)
- camel_object_unref (imap_store->current_folder);
+ g_object_unref (imap_store->current_folder);
/* no need to actually create a CamelFolder for INBOX */
imap_store->current_folder = NULL;
@@ -2611,8 +2611,8 @@
fi->total = ((CamelFolderSummary *)ims)->saved_count;
if (!folder->summary)
- camel_object_unref (ims);
- camel_object_unref(folder);
+ g_object_unref (ims);
+ g_object_unref(folder);
}
}
@@ -2659,7 +2659,7 @@
{
struct _refresh_msg *m = (struct _refresh_msg *)msg;
- camel_object_unref(m->store);
+ g_object_unref(m->store);
camel_exception_clear(&m->ex);
}
@@ -2706,7 +2706,7 @@
m = camel_session_thread_msg_new(((CamelService *)store)->session, &refresh_ops, sizeof(*m));
m->store = store;
- camel_object_ref(store);
+ g_object_ref(store);
camel_exception_init(&m->ex);
camel_session_thread_queue(((CamelService *)store)->session, &m->msg, 0);
}
Modified: branches/camel-gobject/camel/providers/imap/camel-imap-store.h
==============================================================================
--- branches/camel-gobject/camel/providers/imap/camel-imap-store.h (original)
+++ branches/camel-gobject/camel/providers/imap/camel-imap-store.h Mon Nov 10 00:44:12 2008
@@ -53,9 +53,9 @@
#endif
#define CAMEL_IMAP_STORE_TYPE (camel_imap_store_get_type ())
-#define CAMEL_IMAP_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAP_STORE_TYPE, CamelImapStore))
-#define CAMEL_IMAP_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAP_STORE_TYPE, CamelImapStoreClass))
-#define CAMEL_IS_IMAP_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAP_STORE_TYPE))
+#define CAMEL_IMAP_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_IMAP_STORE_TYPE, CamelImapStore))
+#define CAMEL_IMAP_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_IMAP_STORE_TYPE, CamelImapStoreClass))
+#define CAMEL_IS_IMAP_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_IMAP_STORE_TYPE))
G_BEGIN_DECLS
@@ -156,7 +156,7 @@
/* Standard Camel function */
-CamelType camel_imap_store_get_type (void);
+GType camel_imap_store_get_type (void);
gboolean camel_imap_store_connected (CamelImapStore *store, CamelException *ex);
Modified: branches/camel-gobject/camel/providers/imap/camel-imap-summary.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap/camel-imap-summary.c (original)
+++ branches/camel-gobject/camel/providers/imap/camel-imap-summary.c Mon Nov 10 00:44:12 2008
@@ -69,12 +69,12 @@
static CamelFolderSummaryClass *camel_imap_summary_parent;
-CamelType
+GType
camel_imap_summary_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(
camel_folder_summary_get_type(), "CamelImapSummary",
sizeof (CamelImapSummary),
@@ -108,7 +108,7 @@
{
CamelFolderSummaryClass *cfs_class = (CamelFolderSummaryClass *) klass;
- camel_imap_summary_parent = CAMEL_FOLDER_SUMMARY_CLASS (camel_type_get_global_classfuncs (camel_folder_summary_get_type()));
+ camel_imap_summary_parent = CAMEL_FOLDER_SUMMARY_CLASS (g_type_class_peek (camel_folder_summary_get_type()));
cfs_class->message_info_clone = imap_message_info_clone;
Modified: branches/camel-gobject/camel/providers/imap/camel-imap-summary.h
==============================================================================
--- branches/camel-gobject/camel/providers/imap/camel-imap-summary.h (original)
+++ branches/camel-gobject/camel/providers/imap/camel-imap-summary.h Mon Nov 10 00:44:12 2008
@@ -27,9 +27,9 @@
#include <camel/camel-folder-summary.h>
#include <camel/camel-exception.h>
-#define CAMEL_IMAP_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_imap_summary_get_type (), CamelImapSummary)
-#define CAMEL_IMAP_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imap_summary_get_type (), CamelImapSummaryClass)
-#define CAMEL_IS_IMAP_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_imap_summary_get_type ())
+#define CAMEL_IMAP_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_imap_summary_get_type (), CamelImapSummary)
+#define CAMEL_IMAP_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_imap_summary_get_type (), CamelImapSummaryClass)
+#define CAMEL_IS_IMAP_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_imap_summary_get_type ())
#define CAMEL_IMAP_SERVER_FLAGS (CAMEL_MESSAGE_ANSWERED | \
CAMEL_MESSAGE_DELETED | \
@@ -68,7 +68,7 @@
};
-CamelType camel_imap_summary_get_type (void);
+GType camel_imap_summary_get_type (void);
CamelFolderSummary *camel_imap_summary_new (struct _CamelFolder *folder, const char *filename);
void camel_imap_summary_add_offline (CamelFolderSummary *summary,
Modified: branches/camel-gobject/camel/providers/imap/camel-imap-wrapper.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap/camel-imap-wrapper.c (original)
+++ branches/camel-gobject/camel/providers/imap/camel-imap-wrapper.c Mon Nov 10 00:44:12 2008
@@ -59,7 +59,7 @@
CamelDataWrapperClass *camel_data_wrapper_class =
CAMEL_DATA_WRAPPER_CLASS (camel_imap_wrapper_class);
- parent_class = CAMEL_DATA_WRAPPER_CLASS (camel_type_get_global_classfuncs (camel_data_wrapper_get_type ()));
+ parent_class = CAMEL_DATA_WRAPPER_CLASS (g_type_class_peek (camel_data_wrapper_get_type ()));
/* virtual method override */
camel_data_wrapper_class->write_to_stream = write_to_stream;
@@ -71,7 +71,7 @@
CamelImapWrapper *imap_wrapper = CAMEL_IMAP_WRAPPER (object);
if (imap_wrapper->folder)
- camel_object_unref (CAMEL_OBJECT (imap_wrapper->folder));
+ g_object_unref (CAMEL_OBJECT (imap_wrapper->folder));
if (imap_wrapper->uid)
g_free (imap_wrapper->uid);
if (imap_wrapper->part)
@@ -91,12 +91,12 @@
imap_wrapper->priv->lock = g_mutex_new ();
}
-CamelType
+GType
camel_imap_wrapper_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (
CAMEL_DATA_WRAPPER_TYPE,
"CamelImapWrapper",
@@ -117,11 +117,11 @@
{
CamelDataWrapper *data_wrapper = (CamelDataWrapper *) imap_wrapper;
- camel_object_ref (stream);
+ g_object_ref (stream);
data_wrapper->stream = stream;
data_wrapper->offline = FALSE;
- camel_object_unref (imap_wrapper->folder);
+ g_object_unref (imap_wrapper->folder);
imap_wrapper->folder = NULL;
g_free (imap_wrapper->uid);
imap_wrapper->uid = NULL;
@@ -154,7 +154,7 @@
}
imap_wrapper_hydrate (imap_wrapper, datastream);
- camel_object_unref (datastream);
+ g_object_unref (datastream);
}
CAMEL_IMAP_WRAPPER_UNLOCK (imap_wrapper, lock);
@@ -178,7 +178,7 @@
((CamelDataWrapper *)imap_wrapper)->encoding = encoding;
imap_wrapper->folder = imap_folder;
- camel_object_ref (imap_folder);
+ g_object_ref (imap_folder);
imap_wrapper->uid = g_strdup (uid);
imap_wrapper->part_spec = g_strdup (part_spec);
@@ -190,7 +190,7 @@
TRUE, NULL);
if (stream) {
imap_wrapper_hydrate (imap_wrapper, stream);
- camel_object_unref (stream);
+ g_object_unref (stream);
}
return (CamelDataWrapper *)imap_wrapper;
Modified: branches/camel-gobject/camel/providers/imap/camel-imap-wrapper.h
==============================================================================
--- branches/camel-gobject/camel/providers/imap/camel-imap-wrapper.h (original)
+++ branches/camel-gobject/camel/providers/imap/camel-imap-wrapper.h Mon Nov 10 00:44:12 2008
@@ -27,9 +27,9 @@
#include "camel-imap-types.h"
#define CAMEL_IMAP_WRAPPER_TYPE (camel_imap_wrapper_get_type ())
-#define CAMEL_IMAP_WRAPPER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAP_WRAPPER_TYPE, CamelImapWrapper))
-#define CAMEL_IMAP_WRAPPER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAP_WRAPPER_TYPE, CamelImapWrapperClass))
-#define CAMEL_IS_IMAP_WRAPPER(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAP_WRAPPER_TYPE))
+#define CAMEL_IMAP_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_IMAP_WRAPPER_TYPE, CamelImapWrapper))
+#define CAMEL_IMAP_WRAPPER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_IMAP_WRAPPER_TYPE, CamelImapWrapperClass))
+#define CAMEL_IS_IMAP_WRAPPER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_IMAP_WRAPPER_TYPE))
G_BEGIN_DECLS
@@ -51,7 +51,7 @@
};
/* Standard Camel function */
-CamelType camel_imap_wrapper_get_type (void);
+GType camel_imap_wrapper_get_type (void);
/* Constructor */
CamelDataWrapper *camel_imap_wrapper_new (CamelImapFolder *imap_folder,
Modified: branches/camel-gobject/camel/providers/imap4/camel-imap4-command.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap4/camel-imap4-command.c (original)
+++ branches/camel-gobject/camel/providers/imap4/camel-imap4-command.c Mon Nov 10 00:44:12 2008
@@ -102,7 +102,7 @@
crlf = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_ENCODE, CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
stream = (CamelStream *) camel_stream_filter_new_with_stream (null);
camel_stream_filter_add ((CamelStreamFilter *) stream, crlf);
- camel_object_unref (crlf);
+ g_object_unref (crlf);
switch (literal->type) {
case CAMEL_IMAP4_LITERAL_STREAM:
@@ -119,8 +119,8 @@
len = ((CamelStreamNull *) null)->written;
- camel_object_unref (stream);
- camel_object_unref (null);
+ g_object_unref (stream);
+ g_object_unref (null);
return len;
}
@@ -269,7 +269,7 @@
g_assert_not_reached ();
}
- camel_object_ref (obj);
+ g_object_ref (obj);
/* FIXME: take advantage of LITERAL+? */
len = camel_imap4_literal_length (literal);
@@ -354,7 +354,7 @@
ic->user_data = NULL;
if (imap4_folder) {
- camel_object_ref (imap4_folder);
+ g_object_ref (imap4_folder);
ic->folder = imap4_folder;
} else
ic->folder = NULL;
@@ -399,7 +399,7 @@
ic->ref_count--;
if (ic->ref_count == 0) {
if (ic->folder)
- camel_object_unref (ic->folder);
+ g_object_unref (ic->folder);
g_free (ic->tag);
@@ -425,10 +425,10 @@
g_free (part->literal->literal.string);
break;
case CAMEL_IMAP4_LITERAL_STREAM:
- camel_object_unref (part->literal->literal.stream);
+ g_object_unref (part->literal->literal.stream);
break;
case CAMEL_IMAP4_LITERAL_WRAPPER:
- camel_object_unref (part->literal->literal.wrapper);
+ g_object_unref (part->literal->literal.wrapper);
break;
}
@@ -464,7 +464,7 @@
crlf = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_ENCODE, CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
ostream = (CamelStream *) camel_stream_filter_new_with_stream (stream);
camel_stream_filter_add ((CamelStreamFilter *) ostream, crlf);
- camel_object_unref (crlf);
+ g_object_unref (crlf);
/* write the literal */
switch (literal->type) {
@@ -480,7 +480,7 @@
break;
}
- camel_object_unref (ostream);
+ g_object_unref (ostream);
ostream = NULL;
#if 0
@@ -492,7 +492,7 @@
exception:
- camel_object_unref (ostream);
+ g_object_unref (ostream);
return -1;
}
Modified: branches/camel-gobject/camel/providers/imap4/camel-imap4-engine.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap4/camel-imap4-engine.c (original)
+++ branches/camel-gobject/camel/providers/imap4/camel-imap4-engine.c Mon Nov 10 00:44:12 2008
@@ -54,10 +54,10 @@
static CamelObjectClass *parent_class = NULL;
-CamelType
+GType
camel_imap4_engine_get_type (void)
{
- static CamelType type = 0;
+ static GType type = 0;
if (!type) {
type = camel_type_register (camel_object_get_type (),
@@ -76,7 +76,7 @@
static void
camel_imap4_engine_class_init (CamelIMAP4EngineClass *klass)
{
- parent_class = camel_type_get_global_classfuncs (CAMEL_OBJECT_TYPE);
+ parent_class = g_type_class_peek (CAMEL_TYPE_OBJECT);
klass->tagprefix = 'A';
}
@@ -126,10 +126,10 @@
CamelDListNode *node;
if (engine->istream)
- camel_object_unref (engine->istream);
+ g_object_unref (engine->istream);
if (engine->ostream)
- camel_object_unref (engine->ostream);
+ g_object_unref (engine->ostream);
g_hash_table_foreach (engine->authtypes, (GHFunc) g_free, NULL);
g_hash_table_destroy (engine->authtypes);
@@ -139,7 +139,7 @@
camel_imap4_namespace_clear (&engine->namespaces.shared);
if (engine->folder)
- camel_object_unref (engine->folder);
+ g_object_unref (engine->folder);
while ((node = camel_dlist_remhead (&engine->queue))) {
node->next = NULL;
@@ -197,15 +197,15 @@
g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1);
if (engine->istream)
- camel_object_unref (engine->istream);
+ g_object_unref (engine->istream);
if (engine->ostream)
- camel_object_unref (engine->ostream);
+ g_object_unref (engine->ostream);
engine->istream = (CamelIMAP4Stream *) camel_imap4_stream_new (stream);
engine->ostream = camel_stream_buffer_new (stream, CAMEL_STREAM_BUFFER_WRITE);
engine->state = CAMEL_IMAP4_ENGINE_CONNECTED;
- camel_object_unref (stream);
+ g_object_unref (stream);
if (camel_imap4_engine_next_token (engine, &token, ex) == -1)
goto exception;
@@ -246,12 +246,12 @@
engine->state = CAMEL_IMAP4_ENGINE_DISCONNECTED;
if (engine->istream) {
- camel_object_unref (engine->istream);
+ g_object_unref (engine->istream);
engine->istream = NULL;
}
if (engine->ostream) {
- camel_object_unref (engine->ostream);
+ g_object_unref (engine->ostream);
engine->ostream = NULL;
}
}
@@ -1324,9 +1324,9 @@
if (!strncmp (cmd, "SELECT ", 7) || !strncmp (cmd, "EXAMINE ", 8)) {
if (ic->result == CAMEL_IMAP4_RESULT_OK) {
/* Update the selected folder */
- camel_object_ref (ic->folder);
+ g_object_ref (ic->folder);
if (engine->folder)
- camel_object_unref (engine->folder);
+ g_object_unref (engine->folder);
engine->folder = ic->folder;
engine->state = CAMEL_IMAP4_ENGINE_SELECTED;
Modified: branches/camel-gobject/camel/providers/imap4/camel-imap4-engine.h
==============================================================================
--- branches/camel-gobject/camel/providers/imap4/camel-imap4-engine.h (original)
+++ branches/camel-gobject/camel/providers/imap4/camel-imap4-engine.h Mon Nov 10 00:44:12 2008
@@ -33,10 +33,10 @@
#include <camel/camel-list-utils.h>
#define CAMEL_TYPE_IMAP4_ENGINE (camel_imap4_engine_get_type ())
-#define CAMEL_IMAP4_ENGINE(obj) (CAMEL_CHECK_CAST ((obj), CAMEL_TYPE_IMAP4_ENGINE, CamelIMAP4Engine))
-#define CAMEL_IMAP4_ENGINE_CLASS(klass) (CAMEL_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_IMAP4_ENGINE, CamelIMAP4EngineClass))
-#define CAMEL_IS_IMAP4_ENGINE(obj) (CAMEL_CHECK_TYPE ((obj), CAMEL_TYPE_IMAP4_ENGINE))
-#define CAMEL_IS_IMAP4_ENGINE_CLASS(klass) (CAMEL_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_IMAP4_ENGINE))
+#define CAMEL_IMAP4_ENGINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMEL_TYPE_IMAP4_ENGINE, CamelIMAP4Engine))
+#define CAMEL_IMAP4_ENGINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_IMAP4_ENGINE, CamelIMAP4EngineClass))
+#define CAMEL_IS_IMAP4_ENGINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMEL_TYPE_IMAP4_ENGINE))
+#define CAMEL_IS_IMAP4_ENGINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_IMAP4_ENGINE))
#define CAMEL_IMAP4_ENGINE_GET_CLASS(obj) (CAMEL_CHECK_GET_CLASS ((obj), CAMEL_TYPE_IMAP4_ENGINE, CamelIMAP4EngineClass))
G_BEGIN_DECLS
@@ -192,7 +192,7 @@
};
-CamelType camel_imap4_engine_get_type (void);
+GType camel_imap4_engine_get_type (void);
CamelIMAP4Engine *camel_imap4_engine_new (CamelService *service, CamelIMAP4ReconnectFunc reconnect);
Modified: branches/camel-gobject/camel/providers/imap4/camel-imap4-folder.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap4/camel-imap4-folder.c (original)
+++ branches/camel-gobject/camel/providers/imap4/camel-imap4-folder.c Mon Nov 10 00:44:12 2008
@@ -92,10 +92,10 @@
};
-CamelType
+GType
camel_imap4_folder_get_type (void)
{
- static CamelType type = 0;
+ static GType type = 0;
if (!type) {
type = camel_type_register (camel_offline_folder_get_type (),
@@ -118,7 +118,7 @@
CamelObjectClass *object_class = (CamelObjectClass *) klass;
int i;
- parent_class = (CamelOfflineFolderClass *) camel_type_get_global_classfuncs (CAMEL_OFFLINE_FOLDER_TYPE);
+ parent_class = (CamelOfflineFolderClass *) g_type_class_peek (CAMEL_OFFLINE_FOLDER_TYPE);
if (imap4_folder_props == NULL) {
for (i = 0; i < G_N_ELEMENTS (imap4_prop_list); i++) {
@@ -157,13 +157,13 @@
{
CamelIMAP4Folder *folder = (CamelIMAP4Folder *) object;
- camel_object_unref (folder->search);
+ g_object_unref (folder->search);
- camel_object_unref (folder->cache);
+ g_object_unref (folder->cache);
if (folder->journal) {
camel_offline_journal_write (folder->journal, NULL);
- camel_object_unref (folder->journal);
+ g_object_unref (folder->journal);
}
g_free (folder->utf7_name);
@@ -408,12 +408,12 @@
camel_folder_summary_load (folder->summary);
if (camel_imap4_engine_select_folder (((CamelIMAP4Store *) store)->engine, folder, ex) == -1) {
- camel_object_unref (folder);
+ g_object_unref (folder);
folder = NULL;
}
if (folder && camel_imap4_summary_flush_updates (folder->summary, ex) == -1) {
- camel_object_unref (folder);
+ g_object_unref (folder);
folder = NULL;
}
} else {
@@ -423,7 +423,7 @@
_("Cannot access folder '%s': %s"),
full_name, g_strerror (ENOENT));
- camel_object_unref (folder);
+ g_object_unref (folder);
folder = NULL;
}
}
@@ -739,11 +739,11 @@
fstream = (CamelStream *) camel_stream_filter_new_with_stream (stream);
crlf = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_DECODE, CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
camel_stream_filter_add ((CamelStreamFilter *) fstream, crlf);
- camel_object_unref (crlf);
+ g_object_unref (crlf);
camel_stream_write_to_stream ((CamelStream *) engine->istream, fstream);
camel_stream_flush (fstream);
- camel_object_unref (fstream);
+ g_object_unref (fstream);
} else if (!strcmp (token->v.atom, "UID")) {
if (camel_imap4_engine_next_token (engine, token, ex) == -1)
goto exception;
@@ -810,18 +810,18 @@
if (errno == EINTR) {
CAMEL_SERVICE_REC_UNLOCK (folder->parent_store, connect_lock);
camel_exception_setv (ex, CAMEL_EXCEPTION_USER_CANCEL, _("User canceled"));
- camel_object_unref (message);
- camel_object_unref (stream);
+ g_object_unref (message);
+ g_object_unref (stream);
return NULL;
} else {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot get message %s: %s"),
uid, g_strerror (errno));
- camel_object_unref (message);
+ g_object_unref (message);
message = NULL;
}
}
- camel_object_unref (stream);
+ g_object_unref (stream);
}
if (message != NULL) {
@@ -863,7 +863,7 @@
if (id == -1 || ic->status != CAMEL_IMAP4_COMMAND_COMPLETE) {
camel_exception_xfer (ex, &ic->ex);
camel_imap4_command_unref (ic);
- camel_object_unref (stream);
+ g_object_unref (stream);
goto done;
}
@@ -879,7 +879,7 @@
if (camel_stream_write_to_stream (stream, cache) == -1
|| camel_stream_flush (cache) == -1)
camel_data_cache_remove (imap4_folder->cache, "cache", uid, NULL);
- camel_object_unref (cache);
+ g_object_unref (cache);
}
break;
@@ -898,7 +898,7 @@
camel_imap4_command_unref (ic);
- camel_object_unref (stream);
+ g_object_unref (stream);
done:
@@ -1138,7 +1138,7 @@
break;
camel_imap4_journal_append (journal, message, info, NULL, ex);
- camel_object_unref (message);
+ g_object_unref (message);
if (camel_exception_is_set (ex))
break;
Modified: branches/camel-gobject/camel/providers/imap4/camel-imap4-folder.h
==============================================================================
--- branches/camel-gobject/camel/providers/imap4/camel-imap4-folder.h (original)
+++ branches/camel-gobject/camel/providers/imap4/camel-imap4-folder.h Mon Nov 10 00:44:12 2008
@@ -30,10 +30,10 @@
#include <camel/camel-offline-journal.h>
#define CAMEL_TYPE_IMAP4_FOLDER (camel_imap4_folder_get_type ())
-#define CAMEL_IMAP4_FOLDER(obj) (CAMEL_CHECK_CAST ((obj), CAMEL_TYPE_IMAP4_FOLDER, CamelIMAP4Folder))
-#define CAMEL_IMAP4_FOLDER_CLASS(klass) (CAMEL_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_IMAP4_FOLDER, CamelIMAP4FolderClass))
-#define CAMEL_IS_IMAP4_FOLDER(obj) (CAMEL_CHECK_TYPE ((obj), CAMEL_TYPE_IMAP4_FOLDER))
-#define CAMEL_IS_IMAP4_FOLDER_CLASS(klass) (CAMEL_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_IMAP4_FOLDER))
+#define CAMEL_IMAP4_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMEL_TYPE_IMAP4_FOLDER, CamelIMAP4Folder))
+#define CAMEL_IMAP4_FOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_IMAP4_FOLDER, CamelIMAP4FolderClass))
+#define CAMEL_IS_IMAP4_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMEL_TYPE_IMAP4_FOLDER))
+#define CAMEL_IS_IMAP4_FOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_IMAP4_FOLDER))
#define CAMEL_IMAP4_FOLDER_GET_CLASS(obj) (CAMEL_CHECK_GET_CLASS ((obj), CAMEL_TYPE_IMAP4_FOLDER, CamelIMAP4FolderClass))
G_BEGIN_DECLS
@@ -77,7 +77,7 @@
};
-CamelType camel_imap4_folder_get_type (void);
+GType camel_imap4_folder_get_type (void);
CamelFolder *camel_imap4_folder_new (CamelStore *store, const char *full_name, CamelException *ex);
Modified: branches/camel-gobject/camel/providers/imap4/camel-imap4-journal.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap4/camel-imap4-journal.c (original)
+++ branches/camel-gobject/camel/providers/imap4/camel-imap4-journal.c Mon Nov 10 00:44:12 2008
@@ -59,10 +59,10 @@
static CamelOfflineJournalClass *parent_class = NULL;
-CamelType
+GType
camel_imap4_journal_get_type (void)
{
- static CamelType type = 0;
+ static GType type = 0;
if (!type) {
type = camel_type_register (camel_offline_journal_get_type (),
@@ -83,7 +83,7 @@
{
CamelOfflineJournalClass *journal_class = (CamelOfflineJournalClass *) klass;
- parent_class = (CamelOfflineJournalClass *) camel_type_get_global_classfuncs (CAMEL_TYPE_OFFLINE_JOURNAL);
+ parent_class = (CamelOfflineJournalClass *) g_type_class_peek (CAMEL_TYPE_OFFLINE_JOURNAL);
journal_class->entry_free = imap4_entry_free;
journal_class->entry_load = imap4_entry_load;
@@ -205,12 +205,12 @@
message = camel_mime_message_new ();
if (camel_data_wrapper_construct_from_stream ((CamelDataWrapper *) message, stream) == -1) {
- camel_object_unref (message);
- camel_object_unref (stream);
+ g_object_unref (message);
+ g_object_unref (stream);
goto done;
}
- camel_object_unref (stream);
+ g_object_unref (stream);
if (!(info = camel_folder_summary_uid (folder->summary, entry->v.append_uid))) {
/* info not in the summary, either because the summary
@@ -221,7 +221,7 @@
camel_exception_init (&lex);
camel_folder_append_message (folder, message, info, &uid, &lex);
- camel_object_unref (message);
+ g_object_unref (message);
if (camel_exception_is_set (&lex)) {
/* Remove the message-info from the summary even if we fail or the next
@@ -336,12 +336,12 @@
g_strerror (errno));
camel_data_cache_remove (imap4_folder->cache, "cache", uid, NULL);
folder->summary->nextuid--;
- camel_object_unref (cache);
+ g_object_unref (cache);
g_free (uid);
return;
}
- camel_object_unref (cache);
+ g_object_unref (cache);
entry = g_new (CamelIMAP4JournalEntry, 1);
entry->type = CAMEL_IMAP4_JOURNAL_ENTRY_APPEND;
Modified: branches/camel-gobject/camel/providers/imap4/camel-imap4-journal.h
==============================================================================
--- branches/camel-gobject/camel/providers/imap4/camel-imap4-journal.h (original)
+++ branches/camel-gobject/camel/providers/imap4/camel-imap4-journal.h Mon Nov 10 00:44:12 2008
@@ -31,10 +31,10 @@
#include <camel/camel-mime-message.h>
#define CAMEL_TYPE_IMAP4_JOURNAL (camel_imap4_journal_get_type ())
-#define CAMEL_IMAP4_JOURNAL(obj) (CAMEL_CHECK_CAST ((obj), CAMEL_TYPE_IMAP4_JOURNAL, CamelIMAP4Journal))
-#define CAMEL_IMAP4_JOURNAL_CLASS(klass) (CAMEL_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_IMAP4_JOURNAL, CamelIMAP4JournalClass))
-#define CAMEL_IS_IMAP4_JOURNAL(obj) (CAMEL_CHECK_TYPE ((obj), CAMEL_TYPE_IMAP4_JOURNAL))
-#define CAMEL_IS_IMAP4_JOURNAL_CLASS(klass) (CAMEL_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_IMAP4_JOURNAL))
+#define CAMEL_IMAP4_JOURNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMEL_TYPE_IMAP4_JOURNAL, CamelIMAP4Journal))
+#define CAMEL_IMAP4_JOURNAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_IMAP4_JOURNAL, CamelIMAP4JournalClass))
+#define CAMEL_IS_IMAP4_JOURNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMEL_TYPE_IMAP4_JOURNAL))
+#define CAMEL_IS_IMAP4_JOURNAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_IMAP4_JOURNAL))
#define CAMEL_IMAP4_JOURNAL_GET_CLASS(obj) (CAMEL_CHECK_GET_CLASS ((obj), CAMEL_TYPE_IMAP4_JOURNAL, CamelIMAP4JournalClass))
G_BEGIN_DECLS
@@ -71,7 +71,7 @@
};
-CamelType camel_imap4_journal_get_type (void);
+GType camel_imap4_journal_get_type (void);
CamelOfflineJournal *camel_imap4_journal_new (struct _CamelIMAP4Folder *folder, const char *filename);
Modified: branches/camel-gobject/camel/providers/imap4/camel-imap4-search.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap4/camel-imap4-search.c (original)
+++ branches/camel-gobject/camel/providers/imap4/camel-imap4-search.c Mon Nov 10 00:44:12 2008
@@ -46,10 +46,10 @@
static CamelFolderSearchClass *parent_class = NULL;
-CamelType
+GType
camel_imap4_search_get_type (void)
{
- static CamelType type = 0;
+ static GType type = 0;
if (!type) {
type = camel_type_register (camel_folder_search_get_type (),
@@ -70,7 +70,7 @@
{
CamelFolderSearchClass *search_class = (CamelFolderSearchClass *) klass;
- parent_class = (CamelFolderSearchClass *) camel_type_get_global_classfuncs (CAMEL_FOLDER_SEARCH_TYPE);
+ parent_class = (CamelFolderSearchClass *) g_type_class_peek (CAMEL_FOLDER_SEARCH_TYPE);
search_class->body_contains = imap4_body_contains;
}
Modified: branches/camel-gobject/camel/providers/imap4/camel-imap4-search.h
==============================================================================
--- branches/camel-gobject/camel/providers/imap4/camel-imap4-search.h (original)
+++ branches/camel-gobject/camel/providers/imap4/camel-imap4-search.h Mon Nov 10 00:44:12 2008
@@ -29,9 +29,9 @@
#include <camel/camel-list-utils.h>
#define CAMEL_IMAP4_SEARCH_TYPE (camel_imap4_search_get_type ())
-#define CAMEL_IMAP4_SEARCH(obj) CAMEL_CHECK_CAST (obj, camel_imap4_search_get_type (), CamelIMAP4Search)
-#define CAMEL_IMAP4_SEARCH_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imap4_search_get_type (), CamelIMAP4SearchClass)
-#define CAMEL_IS_IMAP4_SEARCH(obj) CAMEL_CHECK_TYPE (obj, camel_imap4_search_get_type ())
+#define CAMEL_IMAP4_SEARCH(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_imap4_search_get_type (), CamelIMAP4Search)
+#define CAMEL_IMAP4_SEARCH_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_imap4_search_get_type (), CamelIMAP4SearchClass)
+#define CAMEL_IS_IMAP4_SEARCH(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_imap4_search_get_type ())
G_BEGIN_DECLS
@@ -62,7 +62,7 @@
};
-CamelType camel_imap4_search_get_type (void);
+GType camel_imap4_search_get_type (void);
CamelFolderSearch *camel_imap4_search_new (struct _CamelIMAP4Engine *engine, const char *cachedir);
Modified: branches/camel-gobject/camel/providers/imap4/camel-imap4-store-summary.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap4/camel-imap4-store-summary.c (original)
+++ branches/camel-gobject/camel/providers/imap4/camel-imap4-store-summary.c Mon Nov 10 00:44:12 2008
@@ -57,12 +57,12 @@
static CamelStoreSummaryClass *parent_class = NULL;
-CamelType
+GType
camel_imap4_store_summary_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (camel_store_summary_get_type (),
"CamelIMAP4StoreSummary",
sizeof (CamelIMAP4StoreSummary),
@@ -82,7 +82,7 @@
{
CamelStoreSummaryClass *ssklass = (CamelStoreSummaryClass *) klass;
- parent_class = (CamelStoreSummaryClass *) camel_type_get_global_classfuncs (camel_store_summary_get_type ());
+ parent_class = (CamelStoreSummaryClass *) g_type_class_peek (camel_store_summary_get_type ());
ssklass->summary_header_load = summary_header_load;
ssklass->summary_header_save = summary_header_save;
Modified: branches/camel-gobject/camel/providers/imap4/camel-imap4-store-summary.h
==============================================================================
--- branches/camel-gobject/camel/providers/imap4/camel-imap4-store-summary.h (original)
+++ branches/camel-gobject/camel/providers/imap4/camel-imap4-store-summary.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-store-summary.h>
#include "camel-imap4-engine.h"
-#define CAMEL_IMAP4_STORE_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_imap4_store_summary_get_type (), CamelIMAP4StoreSummary)
-#define CAMEL_IMAP4_STORE_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imap4_store_summary_get_type (), CamelIMAP4StoreSummaryClass)
-#define CAMEL_IS_IMAP4_STORE_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_imap4_store_summary_get_type ())
+#define CAMEL_IMAP4_STORE_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_imap4_store_summary_get_type (), CamelIMAP4StoreSummary)
+#define CAMEL_IMAP4_STORE_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_imap4_store_summary_get_type (), CamelIMAP4StoreSummaryClass)
+#define CAMEL_IS_IMAP4_STORE_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_imap4_store_summary_get_type ())
G_BEGIN_DECLS
@@ -67,7 +67,7 @@
};
-CamelType camel_imap4_store_summary_get_type (void);
+GType camel_imap4_store_summary_get_type (void);
CamelIMAP4StoreSummary *camel_imap4_store_summary_new (void);
Modified: branches/camel-gobject/camel/providers/imap4/camel-imap4-store.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap4/camel-imap4-store.c (original)
+++ branches/camel-gobject/camel/providers/imap4/camel-imap4-store.c Mon Nov 10 00:44:12 2008
@@ -82,10 +82,10 @@
static CamelOfflineStoreClass *parent_class = NULL;
-CamelType
+GType
camel_imap4_store_get_type (void)
{
- static CamelType type = 0;
+ static GType type = 0;
if (!type) {
type = camel_type_register (camel_offline_store_get_type (),
@@ -129,7 +129,7 @@
CamelServiceClass *service_class = (CamelServiceClass *) klass;
CamelStoreClass *store_class = (CamelStoreClass *) klass;
- parent_class = (CamelOfflineStoreClass *) camel_type_get_global_classfuncs (CAMEL_TYPE_OFFLINE_STORE);
+ parent_class = (CamelOfflineStoreClass *) g_type_class_peek (CAMEL_TYPE_OFFLINE_STORE);
service_class->construct = imap4_construct;
service_class->get_name = imap4_get_name;
@@ -166,11 +166,11 @@
if (store->summary) {
camel_store_summary_save ((CamelStoreSummary *) store->summary);
- camel_object_unref (store->summary);
+ g_object_unref (store->summary);
}
if (store->engine)
- camel_object_unref (store->engine);
+ g_object_unref (store->engine);
g_free (store->storage_path);
}
@@ -267,7 +267,7 @@
service->url->host,
g_strerror (errno));
- camel_object_unref (tcp_stream);
+ g_object_unref (tcp_stream);
return FALSE;
}
@@ -496,7 +496,7 @@
;
if (sasl != NULL)
- camel_object_unref (sasl);
+ g_object_unref (sasl);
if (id == -1 || ic->status == CAMEL_IMAP4_COMMAND_ERROR) {
/* unrecoverable error */
Modified: branches/camel-gobject/camel/providers/imap4/camel-imap4-store.h
==============================================================================
--- branches/camel-gobject/camel/providers/imap4/camel-imap4-store.h (original)
+++ branches/camel-gobject/camel/providers/imap4/camel-imap4-store.h Mon Nov 10 00:44:12 2008
@@ -26,10 +26,10 @@
#include <camel/camel-offline-store.h>
#define CAMEL_TYPE_IMAP4_STORE (camel_imap4_store_get_type ())
-#define CAMEL_IMAP4_STORE(obj) (CAMEL_CHECK_CAST ((obj), CAMEL_TYPE_IMAP4_STORE, CamelIMAP4Store))
-#define CAMEL_IMAP4_STORE_CLASS(klass) (CAMEL_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_IMAP4_STORE, CamelIMAP4StoreClass))
-#define CAMEL_IS_IMAP4_STORE(obj) (CAMEL_CHECK_TYPE ((obj), CAMEL_TYPE_IMAP4_STORE))
-#define CAMEL_IS_IMAP4_STORE_CLASS(klass) (CAMEL_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_IMAP4_STORE))
+#define CAMEL_IMAP4_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMEL_TYPE_IMAP4_STORE, CamelIMAP4Store))
+#define CAMEL_IMAP4_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_IMAP4_STORE, CamelIMAP4StoreClass))
+#define CAMEL_IS_IMAP4_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMEL_TYPE_IMAP4_STORE))
+#define CAMEL_IS_IMAP4_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_IMAP4_STORE))
#define CAMEL_IMAP4_STORE_GET_CLASS(obj) (CAMEL_CHECK_GET_CLASS ((obj), CAMEL_TYPE_IMAP4_STORE, CamelIMAP4StoreClass))
G_BEGIN_DECLS
@@ -53,7 +53,7 @@
};
-CamelType camel_imap4_store_get_type (void);
+GType camel_imap4_store_get_type (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/providers/imap4/camel-imap4-stream.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap4/camel-imap4-stream.c (original)
+++ branches/camel-gobject/camel/providers/imap4/camel-imap4-stream.c Mon Nov 10 00:44:12 2008
@@ -53,10 +53,10 @@
static CamelStreamClass *parent_class = NULL;
-CamelType
+GType
camel_imap4_stream_get_type (void)
{
- static CamelType type = 0;
+ static GType type = 0;
if (!type) {
type = camel_type_register (CAMEL_STREAM_TYPE,
@@ -77,7 +77,7 @@
{
CamelStreamClass *stream_class = (CamelStreamClass *) klass;
- parent_class = (CamelStreamClass *) camel_type_get_global_classfuncs (CAMEL_STREAM_TYPE);
+ parent_class = (CamelStreamClass *) g_type_class_peek (CAMEL_STREAM_TYPE);
/* virtual method overload */
stream_class->read = stream_read;
@@ -114,7 +114,7 @@
CamelIMAP4Stream *imap4 = (CamelIMAP4Stream *) object;
if (imap4->stream)
- camel_object_unref (imap4->stream);
+ g_object_unref (imap4->stream);
g_free (imap4->tokenbuf);
}
@@ -243,7 +243,7 @@
if (camel_stream_close (imap4->stream) == -1)
return -1;
- camel_object_unref (imap4->stream);
+ g_object_unref (imap4->stream);
imap4->stream = NULL;
imap4->disconnected = TRUE;
@@ -283,7 +283,7 @@
g_return_val_if_fail (CAMEL_IS_STREAM (stream), NULL);
imap4 = (CamelIMAP4Stream *) camel_object_new (CAMEL_TYPE_IMAP4_STREAM);
- camel_object_ref (stream);
+ g_object_ref (stream);
imap4->stream = stream;
return (CamelStream *) imap4;
Modified: branches/camel-gobject/camel/providers/imap4/camel-imap4-stream.h
==============================================================================
--- branches/camel-gobject/camel/providers/imap4/camel-imap4-stream.h (original)
+++ branches/camel-gobject/camel/providers/imap4/camel-imap4-stream.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-stream.h>
#define CAMEL_TYPE_IMAP4_STREAM (camel_imap4_stream_get_type ())
-#define CAMEL_IMAP4_STREAM(obj) (CAMEL_CHECK_CAST ((obj), CAMEL_TYPE_IMAP4_STREAM, CamelIMAP4Stream))
-#define CAMEL_IMAP4_STREAM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TYPE_IMAP4_STREAM, CamelIMAP4StreamClass))
-#define CAMEL_IS_IMAP4_STREAM(o) (CAMEL_CHECK_TYPE((o), CAMEL_TYPE_IMAP4_STREAM))
+#define CAMEL_IMAP4_STREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMEL_TYPE_IMAP4_STREAM, CamelIMAP4Stream))
+#define CAMEL_IMAP4_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_TYPE_IMAP4_STREAM, CamelIMAP4StreamClass))
+#define CAMEL_IS_IMAP4_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_TYPE_IMAP4_STREAM))
#define IMAP4_READ_PRELEN 128
#define IMAP4_READ_BUFLEN 4096
@@ -107,7 +107,7 @@
/* Standard Camel function */
-CamelType camel_imap4_stream_get_type (void);
+GType camel_imap4_stream_get_type (void);
CamelStream *camel_imap4_stream_new (CamelStream *stream);
Modified: branches/camel-gobject/camel/providers/imap4/camel-imap4-summary.c
==============================================================================
--- branches/camel-gobject/camel/providers/imap4/camel-imap4-summary.c (original)
+++ branches/camel-gobject/camel/providers/imap4/camel-imap4-summary.c Mon Nov 10 00:44:12 2008
@@ -75,10 +75,10 @@
static CamelFolderSummaryClass *parent_class = NULL;
-CamelType
+GType
camel_imap4_summary_get_type (void)
{
- static CamelType type = 0;
+ static GType type = 0;
if (!type) {
type = camel_type_register (CAMEL_FOLDER_SUMMARY_TYPE,
@@ -100,7 +100,7 @@
{
CamelFolderSummaryClass *summary_class = (CamelFolderSummaryClass *) klass;
- parent_class = (CamelFolderSummaryClass *) camel_type_get_global_classfuncs (camel_folder_summary_get_type ());
+ parent_class = (CamelFolderSummaryClass *) g_type_class_peek (camel_folder_summary_get_type ());
summary_class->summary_header_load = imap4_header_load;
summary_class->summary_header_save = imap4_header_save;
@@ -1134,7 +1134,7 @@
break;
}
- camel_object_unref (parser);
+ g_object_unref (parser);
} else {
/* wtf? */
d(fprintf (stderr, "huh? %s?...\n", token->v.atom));
Modified: branches/camel-gobject/camel/providers/imap4/camel-imap4-summary.h
==============================================================================
--- branches/camel-gobject/camel/providers/imap4/camel-imap4-summary.h (original)
+++ branches/camel-gobject/camel/providers/imap4/camel-imap4-summary.h Mon Nov 10 00:44:12 2008
@@ -29,10 +29,10 @@
#include <camel/camel-folder-summary.h>
#define CAMEL_TYPE_IMAP4_SUMMARY (camel_imap4_summary_get_type ())
-#define CAMEL_IMAP4_SUMMARY(obj) (CAMEL_CHECK_CAST ((obj), CAMEL_TYPE_IMAP4_SUMMARY, CamelIMAP4Summary))
-#define CAMEL_IMAP4_SUMMARY_CLASS(klass) (CAMEL_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_IMAP4_SUMMARY, CamelIMAP4SummaryClass))
-#define CAMEL_IS_IMAP4_SUMMARY(obj) (CAMEL_CHECK_TYPE ((obj), CAMEL_TYPE_IMAP4_SUMMARY))
-#define CAMEL_IS_IMAP4_SUMMARY_CLASS(klass) (CAMEL_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_IMAP4_SUMMARY))
+#define CAMEL_IMAP4_SUMMARY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMEL_TYPE_IMAP4_SUMMARY, CamelIMAP4Summary))
+#define CAMEL_IMAP4_SUMMARY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_IMAP4_SUMMARY, CamelIMAP4SummaryClass))
+#define CAMEL_IS_IMAP4_SUMMARY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMEL_TYPE_IMAP4_SUMMARY))
+#define CAMEL_IS_IMAP4_SUMMARY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_IMAP4_SUMMARY))
#define CAMEL_IMAP4_SUMMARY_GET_CLASS(obj) (CAMEL_CHECK_GET_CLASS ((obj), CAMEL_TYPE_FOLDER_SUMMARY, CamelIMAP4SummaryClass))
G_BEGIN_DECLS
@@ -81,7 +81,7 @@
};
-CamelType camel_imap4_summary_get_type (void);
+GType camel_imap4_summary_get_type (void);
CamelFolderSummary *camel_imap4_summary_new (CamelFolder *folder);
Modified: branches/camel-gobject/camel/providers/imapp/camel-imapp-driver.c
==============================================================================
--- branches/camel-gobject/camel/providers/imapp/camel-imapp-driver.c (original)
+++ branches/camel-gobject/camel/providers/imapp/camel-imapp-driver.c Mon Nov 10 00:44:12 2008
@@ -50,19 +50,19 @@
object_finalise(CamelIMAPPDriver *ie, CamelIMAPPDriverClass *ieclass)
{
if (ie->folder)
- camel_object_unref((CamelObject *)ie->folder);
+ g_object_unref((CamelObject *)ie->folder);
if (ie->engine)
- camel_object_unref((CamelObject *)ie->engine);
+ g_object_unref((CamelObject *)ie->engine);
if (ie->summary)
g_ptr_array_free(ie->summary, TRUE);
}
-CamelType
+GType
camel_imapp_driver_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (
camel_object_get_type (),
"CamelIMAPPDriver",
@@ -125,7 +125,7 @@
if (id->get_sasl
&& (sasl = id->get_sasl(id, id->get_sasl_data))) {
ic = camel_imapp_engine_command_new(id->engine, "AUTHENTICATE", NULL, "AUTHENTICATE %A", sasl);
- camel_object_unref(sasl);
+ g_object_unref(sasl);
} else {
char *user, *pass;
@@ -166,7 +166,7 @@
camel_object_trigger_event(id->folder, "folder_changed", id->folder->changes);
camel_folder_change_info_clear(id->folder->changes);
}
- camel_object_unref(id->folder);
+ g_object_unref(id->folder);
id->folder = NULL;
}
@@ -179,7 +179,7 @@
camel_imapp_engine_command_free(id->engine, ic);
id->folder = folder;
- camel_object_ref(folder);
+ g_object_ref(folder);
count = camel_folder_summary_count(summary);
if (count > 0 && count <= id->exists) {
@@ -435,8 +435,8 @@
fetch_data_free(CamelIMAPPFetch *fd)
{
if (fd->body)
- camel_object_unref(fd->body);
- camel_object_unref(fd->folder);
+ g_object_unref(fd->body);
+ g_object_unref(fd->folder);
g_free(fd->uid);
g_free(fd->section);
g_free(fd);
@@ -457,7 +457,7 @@
fd = g_malloc0(sizeof(*fd));
fd->folder = folder;
- camel_object_ref(folder);
+ g_object_ref(folder);
fd->uid = g_strdup(uid);
fd->section = g_strdup(fd->section);
fd->done = done;
@@ -851,7 +851,7 @@
switch (type) {
case CAMEL_IMAPP_MSG_FETCH:
m->data.fetch.folder = va_arg(ap, struct _CamelIMAPPFolder *);
- camel_object_ref(m->data.fetch.folder);
+ g_object_ref(m->data.fetch.folder);
m->data.fetch.uid = g_strdup(va_arg(ap, char *));
m->data.fetch.section = g_strdup(va_arg(ap, char *));
break;
@@ -864,17 +864,17 @@
break;
case CAMEL_IMAPP_MSG_SEARCH:
m->data.search.folder = va_arg(ap, struct _CamelIMAPPFolder *);
- camel_object_ref(m->data.search.folder);
+ g_object_ref(m->data.search.folder);
m->data.search.search = g_strdup(va_arg(ap, char *));
break;
case CAMEL_IMAPP_MSG_SYNC:
m->data.sync.folder = va_arg(ap, struct _CamelIMAPPFolder *);
- camel_object_ref(m->data.sync.folder);
+ g_object_ref(m->data.sync.folder);
m->data.sync.flags = va_arg(ap, guint32);
break;
case CAMEL_IMAPP_MSG_UPDATE:
m->data.update.folder = va_arg(ap, struct _CamelIMAPPFolder *);
- camel_object_ref(m->data.update.folder);
+ g_object_ref(m->data.update.folder);
break;
}
va_end(ap);
@@ -887,12 +887,12 @@
{
switch (m->type) {
case CAMEL_IMAPP_MSG_FETCH:
- camel_object_unref(m->data.fetch.folder);
+ g_object_unref(m->data.fetch.folder);
g_free(m->data.fetch.uid);
g_free(m->data.fetch.section);
if (m->data.fetch.body)
- camel_object_unref(m->data.fetch.body);
+ g_object_unref(m->data.fetch.body);
break;
case CAMEL_IMAPP_MSG_LIST:
g_free(m->data.list.name);
@@ -903,17 +903,17 @@
case CAMEL_IMAPP_MSG_QUIT:
break;
case CAMEL_IMAPP_MSG_SEARCH:
- camel_object_unref(m->data.search.folder);
+ g_object_unref(m->data.search.folder);
g_free(m->data.search.search);
if (m->data.search.results)
/* FIXME: free search data */
g_ptr_array_free(m->data.search.results, TRUE);
break;
case CAMEL_IMAPP_MSG_SYNC:
- camel_object_unref(m->data.sync.folder);
+ g_object_unref(m->data.sync.folder);
break;
case CAMEL_IMAPP_MSG_UPDATE:
- camel_object_unref(m->data.update.folder);
+ g_object_unref(m->data.update.folder);
break;
}
Modified: branches/camel-gobject/camel/providers/imapp/camel-imapp-driver.h
==============================================================================
--- branches/camel-gobject/camel/providers/imapp/camel-imapp-driver.h (original)
+++ branches/camel-gobject/camel/providers/imapp/camel-imapp-driver.h Mon Nov 10 00:44:12 2008
@@ -8,9 +8,9 @@
#include "camel-imapp-stream.h"
#define CAMEL_IMAPP_DRIVER_TYPE (camel_imapp_driver_get_type ())
-#define CAMEL_IMAPP_DRIVER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAPP_DRIVER_TYPE, CamelIMAPPDriver))
-#define CAMEL_IMAPP_DRIVER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAPP_DRIVER_TYPE, CamelIMAPPDriverClass))
-#define CAMEL_IS_IMAP_DRIVER(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAPP_DRIVER_TYPE))
+#define CAMEL_IMAPP_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_IMAPP_DRIVER_TYPE, CamelIMAPPDriver))
+#define CAMEL_IMAPP_DRIVER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_IMAPP_DRIVER_TYPE, CamelIMAPPDriverClass))
+#define CAMEL_IS_IMAP_DRIVER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_IMAPP_DRIVER_TYPE))
G_BEGIN_DECLS
@@ -80,7 +80,7 @@
CamelObjectClass parent_class;
};
-CamelType camel_imapp_driver_get_type (void);
+GType camel_imapp_driver_get_type (void);
CamelIMAPPDriver * camel_imapp_driver_new(CamelIMAPPStream *stream);
Modified: branches/camel-gobject/camel/providers/imapp/camel-imapp-engine.c
==============================================================================
--- branches/camel-gobject/camel/providers/imapp/camel-imapp-engine.c (original)
+++ branches/camel-gobject/camel/providers/imapp/camel-imapp-engine.c Mon Nov 10 00:44:12 2008
@@ -72,12 +72,12 @@
g_hash_table_destroy(ie->handlers);
}
-CamelType
+GType
camel_imapp_engine_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (
camel_object_get_type (),
"CamelIMAPPEngine",
@@ -222,7 +222,7 @@
engine = CAMEL_IMAPP_ENGINE (camel_object_new (CAMEL_IMAPP_ENGINE_TYPE));
engine->stream = stream;
- camel_object_ref((CamelObject *)stream);
+ g_object_ref((CamelObject *)stream);
camel_imapp_engine_add_handler(engine, "CAPABILITY", resp_capability, engine);
@@ -272,7 +272,7 @@
camel_imapp_engine_capabilities(engine);
} CAMEL_CATCH(ex) {
printf("connection failed: %s\n", ex->desc);
- camel_object_unref((CamelObject *)engine);
+ g_object_unref((CamelObject *)engine);
engine = NULL;
} CAMEL_DONE;
@@ -663,14 +663,14 @@
/* Note the command must not be in any queue? */
if (ic->mem)
- camel_object_unref((CamelObject *)ic->mem);
+ g_object_unref((CamelObject *)ic->mem);
imap_free_status(ic->status);
g_free(ic->select);
while ( (cp = ((CamelIMAPPCommandPart *)camel_dlist_remhead(&ic->parts))) ) {
g_free(cp->data);
if (cp->ob)
- camel_object_unref(cp->ob);
+ g_object_unref(cp->ob);
g_free(cp);
}
@@ -798,14 +798,14 @@
camel_stream_reset((CamelStream *)ob);
}
type |= CAMEL_IMAPP_COMMAND_CONTINUATION;
- camel_object_ref(ob);
+ g_object_ref(ob);
ob_size = null->written;
- camel_object_unref((CamelObject *)null);
+ g_object_unref((CamelObject *)null);
camel_stream_printf((CamelStream *)ic->mem, "{%u}", ob_size);
break;
case CAMEL_IMAPP_COMMAND_AUTH:
/* we presume we'll need to get additional data only if we're not authenticated yet */
- camel_object_ref(ob);
+ g_object_ref(ob);
camel_stream_printf((CamelStream *)ic->mem, "%s", ((CamelSasl *)ob)->mech);
if (!camel_sasl_authenticated((CamelSasl *)ob))
type |= CAMEL_IMAPP_COMMAND_CONTINUATION;
@@ -854,7 +854,7 @@
c(printf("command has %d parts\n", len(&ic->parts)));
- camel_object_unref((CamelObject *)ic->mem);
+ g_object_unref((CamelObject *)ic->mem);
ic->mem = NULL;
}
Modified: branches/camel-gobject/camel/providers/imapp/camel-imapp-engine.h
==============================================================================
--- branches/camel-gobject/camel/providers/imapp/camel-imapp-engine.h (original)
+++ branches/camel-gobject/camel/providers/imapp/camel-imapp-engine.h Mon Nov 10 00:44:12 2008
@@ -10,9 +10,9 @@
#include "camel-imapp-folder.h"
#define CAMEL_IMAPP_ENGINE_TYPE (camel_imapp_engine_get_type ())
-#define CAMEL_IMAPP_ENGINE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAPP_ENGINE_TYPE, CamelIMAPPEngine))
-#define CAMEL_IMAPP_ENGINE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAPP_ENGINE_TYPE, CamelIMAPPEngineClass))
-#define CAMEL_IS_IMAP_ENGINE(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAPP_ENGINE_TYPE))
+#define CAMEL_IMAPP_ENGINE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_IMAPP_ENGINE_TYPE, CamelIMAPPEngine))
+#define CAMEL_IMAPP_ENGINE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_IMAPP_ENGINE_TYPE, CamelIMAPPEngineClass))
+#define CAMEL_IS_IMAP_ENGINE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_IMAPP_ENGINE_TYPE))
G_BEGIN_DECLS
@@ -135,7 +135,7 @@
*/
};
-CamelType camel_imapp_engine_get_type (void);
+GType camel_imapp_engine_get_type (void);
CamelIMAPPEngine *camel_imapp_engine_new(CamelIMAPPStream *stream);
Modified: branches/camel-gobject/camel/providers/imapp/camel-imapp-fetch-stream.c
==============================================================================
--- branches/camel-gobject/camel/providers/imapp/camel-imapp-fetch-stream.c (original)
+++ branches/camel-gobject/camel/providers/imapp/camel-imapp-fetch-stream.c Mon Nov 10 00:44:12 2008
@@ -117,7 +117,7 @@
{
CamelStreamClass *camel_stream_class = (CamelStreamClass *)camel_imapp_fetch_stream_class;
- parent_class = camel_type_get_global_classfuncs( CAMEL_OBJECT_TYPE );
+ parent_class = g_type_class_peek( CAMEL_TYPE_OBJECT );
/* virtual method definition */
camel_stream_class->read = stream_read;
@@ -138,15 +138,15 @@
camel_imapp_fetch_stream_finalise(CamelIMAPPFetchStream *is)
{
if (is->engine)
- camel_object_unref(is->engine);
+ g_object_unref(is->engine);
}
-CamelType
+GType
camel_imapp_fetch_stream_get_type (void)
{
- static CamelType camel_imapp_fetch_stream_type = CAMEL_INVALID_TYPE;
+ static GType camel_imapp_fetch_stream_type = G_TYPE_INVALID;
- if (camel_imapp_fetch_stream_type == CAMEL_INVALID_TYPE) {
+ if (camel_imapp_fetch_stream_type == G_TYPE_INVALID) {
setup_table();
camel_imapp_fetch_stream_type = camel_type_register( camel_stream_get_type(),
"CamelIMAPPFetchStream",
@@ -173,7 +173,7 @@
is = (CamelIMAPPFetchStream *)camel_object_new(camel_imapp_fetch_stream_get_type ());
is->engine = ie;
- camel_object_ref(ie);
+ g_object_ref(ie);
is->command = camel_imapp_engine_command_new(ie, "FETCH", NULL, "FETCH %t (BODY[%t]<0.4096>", uid, body);
camel_imapp_engine_command_queue(ie, command);
Modified: branches/camel-gobject/camel/providers/imapp/camel-imapp-fetch-stream.h
==============================================================================
--- branches/camel-gobject/camel/providers/imapp/camel-imapp-fetch-stream.h (original)
+++ branches/camel-gobject/camel/providers/imapp/camel-imapp-fetch-stream.h Mon Nov 10 00:44:12 2008
@@ -23,9 +23,9 @@
#include <camel/camel-stream.h>
-#define CAMEL_IMAPP_FETCH_STREAM(obj) CAMEL_CHECK_CAST (obj, camel_imapp_fetch_stream_get_type (), CamelIMAPPFetchStream)
-#define CAMEL_IMAPP_FETCH_STREAM_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imapp_fetch_stream_get_type (), CamelIMAPPFetchStreamClass)
-#define CAMEL_IS_IMAP_FETCH_STREAM(obj) CAMEL_CHECK_TYPE (obj, camel_imapp_fetch_stream_get_type ())
+#define CAMEL_IMAPP_FETCH_STREAM(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_imapp_fetch_stream_get_type (), CamelIMAPPFetchStream)
+#define CAMEL_IMAPP_FETCH_STREAM_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_imapp_fetch_stream_get_type (), CamelIMAPPFetchStreamClass)
+#define CAMEL_IS_IMAP_FETCH_STREAM(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_imapp_fetch_stream_get_type ())
G_BEGIN_DECLS
@@ -42,7 +42,7 @@
CamelStreamClass parent_class;
};
-CamelType camel_imapp_fetch_stream_get_type (void);
+GType camel_imapp_fetch_stream_get_type (void);
CamelStream *camel_imapp_fetch_stream_new (struct _CamelIMAPPEngine *src, const char *uid, const char *spec);
Modified: branches/camel-gobject/camel/providers/imapp/camel-imapp-folder.c
==============================================================================
--- branches/camel-gobject/camel/providers/imapp/camel-imapp-folder.c (original)
+++ branches/camel-gobject/camel/providers/imapp/camel-imapp-folder.c Mon Nov 10 00:44:12 2008
@@ -60,7 +60,7 @@
{
CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS(camel_imapp_folder_class);
- parent_class = CAMEL_FOLDER_CLASS(camel_type_get_global_classfuncs(camel_folder_get_type()));
+ parent_class = CAMEL_FOLDER_CLASS(g_type_class_peek(camel_folder_get_type()));
/* virtual method overload */
camel_folder_class->refresh_info = imap_refresh_info;
@@ -87,10 +87,10 @@
ifolder->changes = camel_folder_change_info_new();
}
-CamelType
+GType
camel_imapp_folder_get_type (void)
{
- static CamelType camel_imapp_folder_type = CAMEL_INVALID_TYPE;
+ static GType camel_imapp_folder_type = G_TYPE_INVALID;
if (!camel_imapp_folder_type) {
camel_imapp_folder_type = camel_type_register (CAMEL_FOLDER_TYPE, "CamelIMAPPFolder",
@@ -200,13 +200,13 @@
}
} CAMEL_CATCH(e) {
if (msg)
- camel_object_unref(msg);
+ g_object_unref(msg);
msg = NULL;
camel_exception_xfer(ex, e);
} CAMEL_DONE;
if (stream)
- camel_object_unref(stream);
+ g_object_unref(stream);
return msg;
}
Modified: branches/camel-gobject/camel/providers/imapp/camel-imapp-folder.h
==============================================================================
--- branches/camel-gobject/camel/providers/imapp/camel-imapp-folder.h (original)
+++ branches/camel-gobject/camel/providers/imapp/camel-imapp-folder.h Mon Nov 10 00:44:12 2008
@@ -27,9 +27,9 @@
#include <camel/camel-folder.h>
#define CAMEL_IMAPP_FOLDER_TYPE (camel_imapp_folder_get_type ())
-#define CAMEL_IMAPP_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAPP_FOLDER_TYPE, CamelIMAPPFolder))
-#define CAMEL_IMAPP_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAPP_FOLDER_TYPE, CamelIMAPPFolderClass))
-#define CAMEL_IS_IMAP_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAPP_FOLDER_TYPE))
+#define CAMEL_IMAPP_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_IMAPP_FOLDER_TYPE, CamelIMAPPFolder))
+#define CAMEL_IMAPP_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_IMAPP_FOLDER_TYPE, CamelIMAPPFolderClass))
+#define CAMEL_IS_IMAP_FOLDER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_IMAPP_FOLDER_TYPE))
G_BEGIN_DECLS
@@ -51,7 +51,7 @@
} CamelIMAPPFolderClass;
/* Standard Camel function */
-CamelType camel_imapp_folder_get_type (void);
+GType camel_imapp_folder_get_type (void);
/* public methods */
CamelFolder *camel_imapp_folder_new(CamelStore *parent, const char *path);
Modified: branches/camel-gobject/camel/providers/imapp/camel-imapp-store-summary.c
==============================================================================
--- branches/camel-gobject/camel/providers/imapp/camel-imapp-store-summary.c (original)
+++ branches/camel-gobject/camel/providers/imapp/camel-imapp-store-summary.c Mon Nov 10 00:44:12 2008
@@ -99,14 +99,14 @@
g_free(p);*/
}
-CamelType
+GType
camel_imapp_store_summary_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
camel_imapp_store_summary_parent = (CamelStoreSummaryClass *)camel_store_summary_get_type();
- type = camel_type_register((CamelType)camel_imapp_store_summary_parent, "CamelIMAPPStoreSummary",
+ type = camel_type_register((GType)camel_imapp_store_summary_parent, "CamelIMAPPStoreSummary",
sizeof (CamelIMAPPStoreSummary),
sizeof (CamelIMAPPStoreSummaryClass),
(CamelObjectClassInitFunc) camel_imapp_store_summary_class_init,
Modified: branches/camel-gobject/camel/providers/imapp/camel-imapp-store-summary.h
==============================================================================
--- branches/camel-gobject/camel/providers/imapp/camel-imapp-store-summary.h (original)
+++ branches/camel-gobject/camel/providers/imapp/camel-imapp-store-summary.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-object.h>
#include <camel/camel-store-summary.h>
-#define CAMEL_IMAPP_STORE_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_imapp_store_summary_get_type (), CamelIMAPPStoreSummary)
-#define CAMEL_IMAPP_STORE_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imapp_store_summary_get_type (), CamelIMAPPStoreSummaryClass)
-#define CAMEL_IS_IMAP_STORE_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_imapp_store_summary_get_type ())
+#define CAMEL_IMAPP_STORE_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_imapp_store_summary_get_type (), CamelIMAPPStoreSummary)
+#define CAMEL_IMAPP_STORE_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_imapp_store_summary_get_type (), CamelIMAPPStoreSummaryClass)
+#define CAMEL_IS_IMAP_STORE_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_imapp_store_summary_get_type ())
G_BEGIN_DECLS
@@ -70,7 +70,7 @@
CamelStoreSummaryClass summary_class;
};
-CamelType camel_imapp_store_summary_get_type (void);
+GType camel_imapp_store_summary_get_type (void);
CamelIMAPPStoreSummary *camel_imapp_store_summary_new (void);
/* TODO: this api needs some more work, needs to support lists */
Modified: branches/camel-gobject/camel/providers/imapp/camel-imapp-store.c
==============================================================================
--- branches/camel-gobject/camel/providers/imapp/camel-imapp-store.c (original)
+++ branches/camel-gobject/camel/providers/imapp/camel-imapp-store.c Mon Nov 10 00:44:12 2008
@@ -92,7 +92,7 @@
CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS(camel_imapp_store_class);
CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS(camel_imapp_store_class);
- parent_class = CAMEL_STORE_CLASS(camel_type_get_global_classfuncs(camel_store_get_type()));
+ parent_class = CAMEL_STORE_CLASS(g_type_class_peek(camel_store_get_type()));
/* virtual method overload */
camel_service_class->construct = imap_construct;
@@ -117,10 +117,10 @@
/*CamelIMAPPStore *istore = object;*/
}
-CamelType
+GType
camel_imapp_store_get_type (void)
{
- static CamelType camel_imapp_store_type = CAMEL_INVALID_TYPE;
+ static GType camel_imapp_store_type = G_TYPE_INVALID;
if (!camel_imapp_store_type) {
camel_imapp_store_type = camel_type_register(CAMEL_STORE_TYPE,
@@ -147,9 +147,9 @@
camel_service_disconnect((CamelService *)imap_store, TRUE, NULL);
if (imap_store->driver)
- camel_object_unref(imap_store->driver);
+ g_object_unref(imap_store->driver);
if (imap_store->cache)
- camel_object_unref(imap_store->cache);
+ g_object_unref(imap_store->cache);
}
static void imap_construct(CamelService *service, CamelSession *session, CamelProvider *provider, CamelURL *url, CamelException *ex)
@@ -256,13 +256,13 @@
imap_stream = (CamelIMAPPStream *)camel_imapp_stream_new(tcp_stream);
store->driver = camel_imapp_driver_new(imap_stream);
- camel_object_unref(imap_stream);
- camel_object_unref(tcp_stream);
+ g_object_unref(imap_stream);
+ g_object_unref(tcp_stream);
} CAMEL_CATCH(e) {
if (tcp_stream)
- camel_object_unref(tcp_stream);
+ g_object_unref(tcp_stream);
if (imap_stream)
- camel_object_unref((CamelObject *)imap_stream);
+ g_object_unref((CamelObject *)imap_stream);
camel_exception_throw_ex(e);
} CAMEL_DONE;
@@ -481,7 +481,7 @@
/* logout/disconnect */
if (store->driver) {
- camel_object_unref(store->driver);
+ g_object_unref(store->driver);
store->driver = NULL;
}
@@ -512,7 +512,7 @@
camel_imapp_driver_select(istore->driver, folder);
} CAMEL_CATCH (e) {
if (folder) {
- camel_object_unref(folder);
+ g_object_unref(folder);
folder = NULL;
}
camel_exception_xfer(ex, e);
@@ -744,7 +744,7 @@
/*if (!cflags & FAST)*/
camel_imapp_driver_update(istore->driver, (CamelIMAPPFolder *)folder);
fi->unread_message_count = camel_folder_get_unread_message_count(folder);
- camel_object_unref(folder);
+ g_object_unref(folder);
}
} else {
camel_exception_setv(ex, 1, "not implemented");
@@ -874,7 +874,7 @@
mp = camel_mime_parser_new();
camel_mime_parser_init_with_stream(mp, finfo->header);
info = camel_folder_summary_info_new_from_parser(((CamelFolder *)istore->selected)->summary, mp);
- camel_object_unref(mp);
+ g_object_unref(mp);
camel_message_info_set_uid(info, g_strdup(finfo->uid));
camel_folder_summary_add(((CamelFolder *)istore->selected)->summary, info);
Modified: branches/camel-gobject/camel/providers/imapp/camel-imapp-store.h
==============================================================================
--- branches/camel-gobject/camel/providers/imapp/camel-imapp-store.h (original)
+++ branches/camel-gobject/camel/providers/imapp/camel-imapp-store.h Mon Nov 10 00:44:12 2008
@@ -30,9 +30,9 @@
#include "camel-imapp-driver.h"
#define CAMEL_IMAPP_STORE_TYPE (camel_imapp_store_get_type ())
-#define CAMEL_IMAPP_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAPP_STORE_TYPE, CamelIMAPPStore))
-#define CAMEL_IMAPP_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAPP_STORE_TYPE, CamelIMAPPStoreClass))
-#define CAMEL_IS_IMAP_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAPP_STORE_TYPE))
+#define CAMEL_IMAPP_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_IMAPP_STORE_TYPE, CamelIMAPPStore))
+#define CAMEL_IMAPP_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_IMAPP_STORE_TYPE, CamelIMAPPStoreClass))
+#define CAMEL_IS_IMAP_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_IMAPP_STORE_TYPE))
G_BEGIN_DECLS
@@ -62,7 +62,7 @@
} CamelIMAPPStoreClass;
/* Standard Camel function */
-CamelType camel_imapp_store_get_type (void);
+GType camel_imapp_store_get_type (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/providers/imapp/camel-imapp-stream.c
==============================================================================
--- branches/camel-gobject/camel/providers/imapp/camel-imapp-stream.c (original)
+++ branches/camel-gobject/camel/providers/imapp/camel-imapp-stream.c Mon Nov 10 00:44:12 2008
@@ -144,7 +144,7 @@
{
CamelStreamClass *camel_stream_class = (CamelStreamClass *)camel_imapp_stream_class;
- parent_class = camel_type_get_global_classfuncs( CAMEL_OBJECT_TYPE );
+ parent_class = g_type_class_peek( CAMEL_TYPE_OBJECT );
/* virtual method definition */
camel_stream_class->read = stream_read;
@@ -169,15 +169,15 @@
{
g_free(is->buf);
if (is->source)
- camel_object_unref((CamelObject *)is->source);
+ g_object_unref((CamelObject *)is->source);
}
-CamelType
+GType
camel_imapp_stream_get_type (void)
{
- static CamelType camel_imapp_stream_type = CAMEL_INVALID_TYPE;
+ static GType camel_imapp_stream_type = G_TYPE_INVALID;
- if (camel_imapp_stream_type == CAMEL_INVALID_TYPE) {
+ if (camel_imapp_stream_type == G_TYPE_INVALID) {
setup_table();
camel_imapp_stream_type = camel_type_register( camel_stream_get_type(),
"CamelIMAPPStream",
@@ -206,7 +206,7 @@
CamelIMAPPStream *is;
is = (CamelIMAPPStream *)camel_object_new(camel_imapp_stream_get_type ());
- camel_object_ref((CamelObject *)source);
+ g_object_ref((CamelObject *)source);
is->source = source;
return (CamelStream *)is;
@@ -452,7 +452,7 @@
}
} CAMEL_CATCH(ex) {
if (mem)
- camel_object_unref((CamelObject *)mem);
+ g_object_unref((CamelObject *)mem);
camel_exception_throw_ex(ex);
} CAMEL_DONE;
Modified: branches/camel-gobject/camel/providers/imapp/camel-imapp-stream.h
==============================================================================
--- branches/camel-gobject/camel/providers/imapp/camel-imapp-stream.h (original)
+++ branches/camel-gobject/camel/providers/imapp/camel-imapp-stream.h Mon Nov 10 00:44:12 2008
@@ -23,9 +23,9 @@
#include <camel/camel-stream.h>
-#define CAMEL_IMAPP_STREAM(obj) CAMEL_CHECK_CAST (obj, camel_imapp_stream_get_type (), CamelIMAPPStream)
-#define CAMEL_IMAPP_STREAM_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imapp_stream_get_type (), CamelIMAPPStreamClass)
-#define CAMEL_IS_IMAP_STREAM(obj) CAMEL_CHECK_TYPE (obj, camel_imapp_stream_get_type ())
+#define CAMEL_IMAPP_STREAM(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_imapp_stream_get_type (), CamelIMAPPStream)
+#define CAMEL_IMAPP_STREAM_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_imapp_stream_get_type (), CamelIMAPPStreamClass)
+#define CAMEL_IS_IMAP_STREAM(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_imapp_stream_get_type ())
G_BEGIN_DECLS
@@ -62,7 +62,7 @@
CamelStreamClass parent_class;
};
-CamelType camel_imapp_stream_get_type (void);
+GType camel_imapp_stream_get_type (void);
CamelStream *camel_imapp_stream_new (CamelStream *source);
Modified: branches/camel-gobject/camel/providers/imapp/camel-imapp-summary.c
==============================================================================
--- branches/camel-gobject/camel/providers/imapp/camel-imapp-summary.c (original)
+++ branches/camel-gobject/camel/providers/imapp/camel-imapp-summary.c Mon Nov 10 00:44:12 2008
@@ -49,12 +49,12 @@
static CamelFolderSummaryClass *camel_imapp_summary_parent;
-CamelType
+GType
camel_imapp_summary_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(
camel_folder_summary_get_type(), "CamelIMAPPSummary",
sizeof(CamelIMAPPSummary),
@@ -73,7 +73,7 @@
{
CamelFolderSummaryClass *cfs_class =(CamelFolderSummaryClass *) klass;
- camel_imapp_summary_parent = CAMEL_FOLDER_SUMMARY_CLASS(camel_type_get_global_classfuncs(camel_folder_summary_get_type()));
+ camel_imapp_summary_parent = CAMEL_FOLDER_SUMMARY_CLASS(g_type_class_peek(camel_folder_summary_get_type()));
cfs_class->summary_header_load = summary_header_load;
cfs_class->summary_header_save = summary_header_save;
Modified: branches/camel-gobject/camel/providers/imapp/camel-imapp-summary.h
==============================================================================
--- branches/camel-gobject/camel/providers/imapp/camel-imapp-summary.h (original)
+++ branches/camel-gobject/camel/providers/imapp/camel-imapp-summary.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-folder-summary.h>
#include <camel/camel-exception.h>
-#define CAMEL_IMAPP_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_imapp_summary_get_type (), CamelIMAPPSummary)
-#define CAMEL_IMAPP_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imapp_summary_get_type (), CamelIMAPPSummaryClass)
-#define CAMEL_IS_IMAPP_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_imapp_summary_get_type ())
+#define CAMEL_IMAPP_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_imapp_summary_get_type (), CamelIMAPPSummary)
+#define CAMEL_IMAPP_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_imapp_summary_get_type (), CamelIMAPPSummaryClass)
+#define CAMEL_IS_IMAPP_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_imapp_summary_get_type ())
#define CAMEL_IMAPP_SERVER_FLAGS (CAMEL_MESSAGE_ANSWERED | \
CAMEL_MESSAGE_DELETED | \
@@ -61,7 +61,7 @@
};
-CamelType camel_imapp_summary_get_type (void);
+GType camel_imapp_summary_get_type (void);
CamelFolderSummary *camel_imapp_summary_new (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/providers/imapp/camel-imapp-utils.c
==============================================================================
--- branches/camel-gobject/camel/providers/imapp/camel-imapp-utils.c (original)
+++ branches/camel-gobject/camel/providers/imapp/camel-imapp-utils.c Mon Nov 10 00:44:12 2008
@@ -902,11 +902,11 @@
return;
if (finfo->body)
- camel_object_unref((CamelObject *)finfo->body);
+ g_object_unref((CamelObject *)finfo->body);
if (finfo->text)
- camel_object_unref((CamelObject *)finfo->text);
+ g_object_unref((CamelObject *)finfo->text);
if (finfo->header)
- camel_object_unref((CamelObject *)finfo->header);
+ g_object_unref((CamelObject *)finfo->header);
if (finfo->minfo)
camel_message_info_free(finfo->minfo);
if (finfo->cinfo)
@@ -969,7 +969,7 @@
camel_stream_printf(sout, "Section: '%s'\n", finfo->section);
if (finfo->date)
camel_stream_printf(sout, "UID: '%s'\n", finfo->uid);
- camel_object_unref((CamelObject *)sout);
+ g_object_unref((CamelObject *)sout);
}
struct _fetch_info *
Modified: branches/camel-gobject/camel/providers/local/camel-local-folder.c
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-local-folder.c (original)
+++ branches/camel-gobject/camel/providers/local/camel-local-folder.c Mon Nov 10 00:44:12 2008
@@ -96,7 +96,7 @@
CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS(camel_local_folder_class);
CamelObjectClass *oklass = (CamelObjectClass *)camel_local_folder_class;
- parent_class = (CamelFolderClass *) camel_type_get_global_classfuncs(camel_folder_get_type());
+ parent_class = (CamelFolderClass *) g_type_class_peek(camel_folder_get_type());
/* virtual method definition */
@@ -149,15 +149,15 @@
if (folder->summary) {
camel_local_summary_sync((CamelLocalSummary *)folder->summary, FALSE, local_folder->changes, NULL);
- camel_object_unref((CamelObject *)folder->summary);
+ g_object_unref((CamelObject *)folder->summary);
folder->summary = NULL;
}
if (local_folder->search)
- camel_object_unref((CamelObject *)local_folder->search);
+ g_object_unref((CamelObject *)local_folder->search);
if (local_folder->index)
- camel_object_unref((CamelObject *)local_folder->index);
+ g_object_unref((CamelObject *)local_folder->index);
while (local_folder->locked> 0)
camel_local_folder_unlock(local_folder);
@@ -178,12 +178,12 @@
{ CAMEL_LOCAL_FOLDER_INDEX_BODY, "index_body", N_("Index message body data") },
};
-CamelType
+GType
camel_local_folder_get_type(void)
{
- static CamelType camel_local_folder_type = CAMEL_INVALID_TYPE;
+ static GType camel_local_folder_type = G_TYPE_INVALID;
- if (camel_local_folder_type == CAMEL_INVALID_TYPE) {
+ if (camel_local_folder_type == G_TYPE_INVALID) {
int i;
camel_local_folder_type = camel_type_register(camel_folder_get_type(), "CamelLocalFolder",
@@ -295,7 +295,7 @@
if (camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, ex) == 0) {
/* we sync here so that any hard work setting up the folder isn't lost */
if (camel_local_summary_sync((CamelLocalSummary *)folder->summary, FALSE, lf->changes, ex) == -1) {
- camel_object_unref (CAMEL_OBJECT (folder));
+ g_object_unref (CAMEL_OBJECT (folder));
g_free(name);
return NULL;
}
@@ -307,7 +307,7 @@
/*if (camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, ex) == -1) {*/
/* we sync here so that any hard work setting up the folder isn't lost */
/*if (camel_local_summary_sync((CamelLocalSummary *)folder->summary, FALSE, lf->changes, ex) == -1) {
- camel_object_unref (CAMEL_OBJECT (folder));
+ g_object_unref (CAMEL_OBJECT (folder));
g_free(name);
return NULL;
}*/
Modified: branches/camel-gobject/camel/providers/local/camel-local-folder.h
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-local-folder.h (original)
+++ branches/camel-gobject/camel/providers/local/camel-local-folder.h Mon Nov 10 00:44:12 2008
@@ -31,9 +31,9 @@
/* #include "camel-store.h" */
#define CAMEL_LOCAL_FOLDER_TYPE (camel_local_folder_get_type ())
-#define CAMEL_LOCAL_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_LOCAL_FOLDER_TYPE, CamelLocalFolder))
-#define CAMEL_LOCAL_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_LOCAL_FOLDER_TYPE, CamelLocalFolderClass))
-#define CAMEL_IS_LOCAL_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_LOCAL_FOLDER_TYPE))
+#define CAMEL_LOCAL_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_LOCAL_FOLDER_TYPE, CamelLocalFolder))
+#define CAMEL_LOCAL_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_LOCAL_FOLDER_TYPE, CamelLocalFolderClass))
+#define CAMEL_IS_LOCAL_FOLDER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_LOCAL_FOLDER_TYPE))
G_BEGIN_DECLS
@@ -92,7 +92,7 @@
const char *full_name, guint32 flags, CamelException *ex);
/* Standard Camel function */
-CamelType camel_local_folder_get_type(void);
+GType camel_local_folder_get_type(void);
/* Lock the folder for internal use. May be called repeatedly */
/* UNIMPLEMENTED */
Modified: branches/camel-gobject/camel/providers/local/camel-local-store.c
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-local-store.c (original)
+++ branches/camel-gobject/camel/providers/local/camel-local-store.c Mon Nov 10 00:44:12 2008
@@ -74,7 +74,7 @@
CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS (camel_local_store_class);
CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS (camel_local_store_class);
- parent_class = CAMEL_STORE_CLASS (camel_type_get_global_classfuncs (camel_store_get_type ()));
+ parent_class = CAMEL_STORE_CLASS (g_type_class_peek (camel_store_get_type ()));
/* virtual method overload */
camel_service_class->construct = construct;
@@ -108,12 +108,12 @@
}
-CamelType
+GType
camel_local_store_get_type (void)
{
- static CamelType camel_local_store_type = CAMEL_INVALID_TYPE;
+ static GType camel_local_store_type = G_TYPE_INVALID;
- if (camel_local_store_type == CAMEL_INVALID_TYPE) {
+ if (camel_local_store_type == G_TYPE_INVALID) {
camel_local_store_type = camel_type_register (CAMEL_STORE_TYPE, "CamelLocalStore",
sizeof (CamelLocalStore),
sizeof (CamelLocalStoreClass),
@@ -299,7 +299,7 @@
folder = ((CamelStoreClass *)((CamelObject *)store)->klass)->get_folder(store, name, CAMEL_STORE_FOLDER_CREATE, ex);
if (folder) {
- camel_object_unref((CamelObject *)folder);
+ g_object_unref((CamelObject *)folder);
info = ((CamelStoreClass *)((CamelObject *)store)->klass)->get_folder_info(store, name, 0, ex);
/* get_folder(CREATE) will emit a folder_created event for us */
@@ -387,7 +387,7 @@
g_free(oldibex);
if (folder)
- camel_object_unref (folder);
+ g_object_unref (folder);
return;
@@ -414,7 +414,7 @@
g_free(oldibex);
if (folder)
- camel_object_unref(folder);
+ g_object_unref(folder);
}
/* default implementation, only delete metadata */
@@ -445,7 +445,7 @@
if ((lf = camel_store_get_folder (store, folder_name, 0, &lex))) {
camel_object_get (lf, NULL, CAMEL_OBJECT_STATE_FILE, &str, NULL);
camel_object_set (lf, NULL, CAMEL_OBJECT_STATE_FILE, NULL, NULL);
- camel_object_unref (lf);
+ g_object_unref (lf);
} else {
camel_exception_clear (&lex);
}
Modified: branches/camel-gobject/camel/providers/local/camel-local-store.h
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-local-store.h (original)
+++ branches/camel-gobject/camel/providers/local/camel-local-store.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include "camel-store.h"
#define CAMEL_LOCAL_STORE_TYPE (camel_local_store_get_type ())
-#define CAMEL_LOCAL_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_LOCAL_STORE_TYPE, CamelLocalStore))
-#define CAMEL_LOCAL_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_LOCAL_STORE_TYPE, CamelLocalStoreClass))
-#define CAMEL_IS_LOCAL_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_LOCAL_STORE_TYPE))
+#define CAMEL_LOCAL_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_LOCAL_STORE_TYPE, CamelLocalStore))
+#define CAMEL_LOCAL_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_LOCAL_STORE_TYPE, CamelLocalStoreClass))
+#define CAMEL_IS_LOCAL_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_LOCAL_STORE_TYPE))
G_BEGIN_DECLS
@@ -46,7 +46,7 @@
} CamelLocalStoreClass;
/* Standard Camel function */
-CamelType camel_local_store_get_type (void);
+GType camel_local_store_get_type (void);
const gchar *camel_local_store_get_toplevel_dir (CamelLocalStore *store);
Modified: branches/camel-gobject/camel/providers/local/camel-local-summary.c
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-local-summary.c (original)
+++ branches/camel-gobject/camel/providers/local/camel-local-summary.c Mon Nov 10 00:44:12 2008
@@ -71,12 +71,12 @@
static void camel_local_summary_finalise (CamelObject *obj);
static CamelFolderSummaryClass *camel_local_summary_parent;
-CamelType
+GType
camel_local_summary_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_folder_summary_get_type(), "CamelLocalSummary",
sizeof (CamelLocalSummary),
sizeof (CamelLocalSummaryClass),
@@ -94,7 +94,7 @@
{
CamelFolderSummaryClass *sklass = (CamelFolderSummaryClass *) klass;
- camel_local_summary_parent = CAMEL_FOLDER_SUMMARY_CLASS(camel_type_get_global_classfuncs(camel_folder_summary_get_type()));
+ camel_local_summary_parent = CAMEL_FOLDER_SUMMARY_CLASS(g_type_class_peek(camel_folder_summary_get_type()));
sklass->summary_header_load = summary_header_load;
sklass->summary_header_save = summary_header_save;
@@ -132,7 +132,7 @@
CamelLocalSummary *mbs = CAMEL_LOCAL_SUMMARY(obj);
if (mbs->index)
- camel_object_unref((CamelObject *)mbs->index);
+ g_object_unref((CamelObject *)mbs->index);
g_free(mbs->folder_path);
}
@@ -144,7 +144,7 @@
new->folder_path = g_strdup(local_name);
new->index = index;
if (index)
- camel_object_ref((CamelObject *)index);
+ g_object_ref((CamelObject *)index);
}
static int
@@ -493,7 +493,7 @@
camel_data_wrapper_write_to_stream((CamelDataWrapper *)msg, (CamelStream *)sn);
mi->info.size = sn->written;
- camel_object_unref((CamelObject *)sn);
+ g_object_unref((CamelObject *)sn);
}
mi->info.flags &= ~(CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_FLAGGED);
Modified: branches/camel-gobject/camel/providers/local/camel-local-summary.h
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-local-summary.h (original)
+++ branches/camel-gobject/camel/providers/local/camel-local-summary.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-exception.h>
#include <camel/camel-index.h>
-#define CAMEL_LOCAL_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_local_summary_get_type (), CamelLocalSummary)
-#define CAMEL_LOCAL_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_local_summary_get_type (), CamelLocalSummaryClass)
-#define CAMEL_IS_LOCAL_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_local_summary_get_type ())
+#define CAMEL_LOCAL_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_local_summary_get_type (), CamelLocalSummary)
+#define CAMEL_LOCAL_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_local_summary_get_type (), CamelLocalSummaryClass)
+#define CAMEL_IS_LOCAL_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_local_summary_get_type ())
G_BEGIN_DECLS
@@ -72,7 +72,7 @@
int (*decode_x_evolution)(CamelLocalSummary *cls, const char *xev, CamelLocalMessageInfo *info);
};
-CamelType camel_local_summary_get_type (void);
+GType camel_local_summary_get_type (void);
void camel_local_summary_construct (CamelLocalSummary *new, const char *filename, const char *local_name, CamelIndex *index);
/* load/check the summary */
Modified: branches/camel-gobject/camel/providers/local/camel-maildir-folder.c
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-maildir-folder.c (original)
+++ branches/camel-gobject/camel/providers/local/camel-maildir-folder.c Mon Nov 10 00:44:12 2008
@@ -93,7 +93,7 @@
CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS(camel_maildir_folder_class);
CamelLocalFolderClass *lclass = (CamelLocalFolderClass *)camel_maildir_folder_class;
- parent_class = CAMEL_LOCAL_FOLDER_CLASS (camel_type_get_global_classfuncs(camel_local_folder_get_type()));
+ parent_class = CAMEL_LOCAL_FOLDER_CLASS (g_type_class_peek(camel_local_folder_get_type()));
/* virtual method definition */
@@ -117,11 +117,11 @@
/*CamelMaildirFolder *maildir_folder = CAMEL_MAILDIR_FOLDER(object);*/
}
-CamelType camel_maildir_folder_get_type(void)
+GType camel_maildir_folder_get_type(void)
{
- static CamelType camel_maildir_folder_type = CAMEL_INVALID_TYPE;
+ static GType camel_maildir_folder_type = G_TYPE_INVALID;
- if (camel_maildir_folder_type == CAMEL_INVALID_TYPE) {
+ if (camel_maildir_folder_type == G_TYPE_INVALID) {
camel_maildir_folder_type = camel_type_register(CAMEL_LOCAL_FOLDER_TYPE, "CamelMaildirFolder",
sizeof(CamelMaildirFolder),
sizeof(CamelMaildirFolderClass),
@@ -205,7 +205,7 @@
*appended_uid = g_strdup(camel_message_info_uid(mi));
if (output_stream)
- camel_object_unref (output_stream);
+ g_object_unref (output_stream);
return;
@@ -224,7 +224,7 @@
name, g_strerror (errno));
if (output_stream) {
- camel_object_unref (CAMEL_OBJECT (output_stream));
+ g_object_unref (CAMEL_OBJECT (output_stream));
unlink (name);
}
@@ -273,12 +273,12 @@
_("Cannot get message: %s from folder %s\n %s"),
uid, lf->folder_path, _("Invalid message contents"));
g_free(name);
- camel_object_unref((CamelObject *)message_stream);
- camel_object_unref((CamelObject *)message);
+ g_object_unref((CamelObject *)message_stream);
+ g_object_unref((CamelObject *)message);
return NULL;
}
- camel_object_unref((CamelObject *)message_stream);
+ g_object_unref((CamelObject *)message_stream);
g_free(name);
return message;
Modified: branches/camel-gobject/camel/providers/local/camel-maildir-folder.h
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-maildir-folder.h (original)
+++ branches/camel-gobject/camel/providers/local/camel-maildir-folder.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include "camel-local-folder.h"
#define CAMEL_MAILDIR_FOLDER_TYPE (camel_maildir_folder_get_type ())
-#define CAMEL_MAILDIR_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MAILDIR_FOLDER_TYPE, CamelMaildirFolder))
-#define CAMEL_MAILDIR_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MAILDIR_FOLDER_TYPE, CamelMaildirFolderClass))
-#define CAMEL_IS_MAILDIR_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_MAILDIR_FOLDER_TYPE))
+#define CAMEL_MAILDIR_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_MAILDIR_FOLDER_TYPE, CamelMaildirFolder))
+#define CAMEL_MAILDIR_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_MAILDIR_FOLDER_TYPE, CamelMaildirFolderClass))
+#define CAMEL_IS_MAILDIR_FOLDER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_MAILDIR_FOLDER_TYPE))
G_BEGIN_DECLS
@@ -48,7 +48,7 @@
CamelFolder *camel_maildir_folder_new(CamelStore *parent_store, const char *full_name, guint32 flags, CamelException *ex);
/* Standard Camel function */
-CamelType camel_maildir_folder_get_type(void);
+GType camel_maildir_folder_get_type(void);
G_END_DECLS
Modified: branches/camel-gobject/camel/providers/local/camel-maildir-store.c
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-maildir-store.c (original)
+++ branches/camel-gobject/camel/providers/local/camel-maildir-store.c Mon Nov 10 00:44:12 2008
@@ -65,7 +65,7 @@
CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS(camel_maildir_store_class);
/*CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS(camel_maildir_store_class);*/
- parent_class = (CamelLocalStoreClass *)camel_type_get_global_classfuncs(camel_local_store_get_type());
+ parent_class = (CamelLocalStoreClass *)g_type_class_peek(camel_local_store_get_type());
/* virtual method overload, use defaults for most */
camel_store_class->hash_folder_name = maildir_hash_folder_name;
@@ -79,11 +79,11 @@
camel_store_class->free_folder_info = camel_store_free_folder_info_full;
}
-CamelType camel_maildir_store_get_type(void)
+GType camel_maildir_store_get_type(void)
{
- static CamelType camel_maildir_store_type = CAMEL_INVALID_TYPE;
+ static GType camel_maildir_store_type = G_TYPE_INVALID;
- if (camel_maildir_store_type == CAMEL_INVALID_TYPE) {
+ if (camel_maildir_store_type == G_TYPE_INVALID) {
camel_maildir_store_type = camel_type_register(CAMEL_LOCAL_STORE_TYPE, "CamelMaildirStore",
sizeof(CamelMaildirStore),
sizeof(CamelMaildirStoreClass),
@@ -311,7 +311,7 @@
camel_folder_refresh_info(folder, NULL);
fi->unread = camel_folder_get_unread_message_count(folder);
fi->total = camel_folder_get_message_count(folder);
- camel_object_unref(folder);
+ g_object_unref(folder);
} else {
char *path, *folderpath;
CamelFolderSummary *s;
@@ -326,7 +326,7 @@
fi->unread = s->unread_count;
fi->total = s->saved_count;
}
- camel_object_unref(s);
+ g_object_unref(s);
g_free(folderpath);
g_free(path);
}
Modified: branches/camel-gobject/camel/providers/local/camel-maildir-store.h
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-maildir-store.h (original)
+++ branches/camel-gobject/camel/providers/local/camel-maildir-store.h Mon Nov 10 00:44:12 2008
@@ -25,9 +25,9 @@
#include "camel-local-store.h"
#define CAMEL_MAILDIR_STORE_TYPE (camel_maildir_store_get_type ())
-#define CAMEL_MAILDIR_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MAILDIR_STORE_TYPE, CamelMaildirStore))
-#define CAMEL_MAILDIR_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MAILDIR_STORE_TYPE, CamelMaildirStoreClass))
-#define CAMEL_IS_MAILDIR_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_MAILDIR_STORE_TYPE))
+#define CAMEL_MAILDIR_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_MAILDIR_STORE_TYPE, CamelMaildirStore))
+#define CAMEL_MAILDIR_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_MAILDIR_STORE_TYPE, CamelMaildirStoreClass))
+#define CAMEL_IS_MAILDIR_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_MAILDIR_STORE_TYPE))
G_BEGIN_DECLS
@@ -44,7 +44,7 @@
/* public methods */
/* Standard Camel function */
-CamelType camel_maildir_store_get_type(void);
+GType camel_maildir_store_get_type(void);
G_END_DECLS
Modified: branches/camel-gobject/camel/providers/local/camel-maildir-summary.c
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-maildir-summary.c (original)
+++ branches/camel-gobject/camel/providers/local/camel-maildir-summary.c Mon Nov 10 00:44:12 2008
@@ -79,12 +79,12 @@
static CamelLocalSummaryClass *parent_class;
-CamelType
+GType
camel_maildir_summary_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_local_summary_get_type (), "CamelMaildirSummary",
sizeof(CamelMaildirSummary),
sizeof(CamelMaildirSummaryClass),
@@ -103,7 +103,7 @@
CamelFolderSummaryClass *sklass = (CamelFolderSummaryClass *) class;
CamelLocalSummaryClass *lklass = (CamelLocalSummaryClass *)class;
- parent_class = (CamelLocalSummaryClass *)camel_type_get_global_classfuncs(camel_local_summary_get_type ());
+ parent_class = (CamelLocalSummaryClass *)g_type_class_peek(camel_local_summary_get_type ());
/* override methods */
sklass->message_info_load = message_info_load;
@@ -501,7 +501,7 @@
}
maildirs->priv->current_file = (char *)name;
camel_folder_summary_add_from_parser((CamelFolderSummary *)maildirs, mp);
- camel_object_unref((CamelObject *)mp);
+ g_object_unref((CamelObject *)mp);
maildirs->priv->current_file = NULL;
camel_folder_summary_set_index((CamelFolderSummary *)maildirs, NULL);
g_free(filename);
Modified: branches/camel-gobject/camel/providers/local/camel-maildir-summary.h
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-maildir-summary.h (original)
+++ branches/camel-gobject/camel/providers/local/camel-maildir-summary.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-exception.h>
#include <camel/camel-index.h>
-#define CAMEL_MAILDIR_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_maildir_summary_get_type (), CamelMaildirSummary)
-#define CAMEL_MAILDIR_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_maildir_summary_get_type (), CamelMaildirSummaryClass)
-#define CAMEL_IS_MAILDIR_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_maildir_summary_get_type ())
+#define CAMEL_MAILDIR_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_maildir_summary_get_type (), CamelMaildirSummary)
+#define CAMEL_MAILDIR_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_maildir_summary_get_type (), CamelMaildirSummaryClass)
+#define CAMEL_IS_MAILDIR_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_maildir_summary_get_type ())
G_BEGIN_DECLS
@@ -63,7 +63,7 @@
/* signals */
};
-CamelType camel_maildir_summary_get_type (void);
+GType camel_maildir_summary_get_type (void);
CamelMaildirSummary *camel_maildir_summary_new (struct _CamelFolder *folder, const char *filename, const char *maildirdir, CamelIndex *index);
/* convert some info->flags to/from the messageinfo */
Modified: branches/camel-gobject/camel/providers/local/camel-mbox-folder.c
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-mbox-folder.c (original)
+++ branches/camel-gobject/camel/providers/local/camel-mbox-folder.c Mon Nov 10 00:44:12 2008
@@ -76,7 +76,7 @@
CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS(camel_mbox_folder_class);
CamelLocalFolderClass *lclass = (CamelLocalFolderClass *)camel_mbox_folder_class;
- parent_class = (CamelLocalFolderClass *)camel_type_get_global_classfuncs(camel_local_folder_get_type());
+ parent_class = (CamelLocalFolderClass *)g_type_class_peek(camel_local_folder_get_type());
/* virtual method definition */
@@ -106,11 +106,11 @@
g_assert(mbox_folder->lockfd == -1);
}
-CamelType camel_mbox_folder_get_type(void)
+GType camel_mbox_folder_get_type(void)
{
- static CamelType camel_mbox_folder_type = CAMEL_INVALID_TYPE;
+ static GType camel_mbox_folder_type = G_TYPE_INVALID;
- if (camel_mbox_folder_type == CAMEL_INVALID_TYPE) {
+ if (camel_mbox_folder_type == G_TYPE_INVALID) {
camel_mbox_folder_type = camel_type_register(CAMEL_LOCAL_FOLDER_TYPE, "CamelMboxFolder",
sizeof(CamelMboxFolder),
sizeof(CamelMboxFolderClass),
@@ -240,7 +240,7 @@
filter_stream = (CamelStream *) camel_stream_filter_new_with_stream(output_stream);
filter_from = (CamelMimeFilter *) camel_mime_filter_from_new();
camel_stream_filter_add((CamelStreamFilter *) filter_stream, filter_from);
- camel_object_unref (filter_from);
+ g_object_unref (filter_from);
if (camel_data_wrapper_write_to_stream ((CamelDataWrapper *) message, filter_stream) == -1 ||
camel_stream_write (filter_stream, "\n", 1) == -1 ||
@@ -248,8 +248,8 @@
goto fail_write;
/* filter stream ref's the output stream itself, so we need to unref it too */
- camel_object_unref (filter_stream);
- camel_object_unref (output_stream);
+ g_object_unref (filter_stream);
+ g_object_unref (output_stream);
g_free(fromline);
/* now we 'fudge' the summary to tell it its uptodate, because its idea of uptodate has just changed */
@@ -287,11 +287,11 @@
retval = ftruncate (((CamelStreamFs *) output_stream)->fd, mbs->folder_size);
} while (retval == -1 && errno == EINTR);
- camel_object_unref (output_stream);
+ g_object_unref (output_stream);
}
if (filter_stream)
- camel_object_unref (filter_stream);
+ g_object_unref (filter_stream);
g_free(fromline);
@@ -384,7 +384,7 @@
(long int)camel_mime_parser_tell_start_from(parser),
camel_mime_parser_state(parser));
- camel_object_unref((CamelObject *)parser);
+ g_object_unref((CamelObject *)parser);
parser = NULL;
if (!retried) {
@@ -406,7 +406,7 @@
camel_exception_setv(ex, errno==EINTR?CAMEL_EXCEPTION_USER_CANCEL:CAMEL_EXCEPTION_SYSTEM,
_("Cannot get message: %s from folder %s\n %s"), uid, lf->folder_path,
_("Message construction failed."));
- camel_object_unref((CamelObject *)message);
+ g_object_unref((CamelObject *)message);
message = NULL;
goto fail;
}
@@ -417,7 +417,7 @@
camel_local_folder_unlock(lf);
if (parser)
- camel_object_unref((CamelObject *)parser);
+ g_object_unref((CamelObject *)parser);
/* use the opportunity to notify of changes (particularly if we had a rebuild) */
if (camel_folder_change_info_changed(lf->changes)) {
Modified: branches/camel-gobject/camel/providers/local/camel-mbox-folder.h
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-mbox-folder.h (original)
+++ branches/camel-gobject/camel/providers/local/camel-mbox-folder.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include "camel-mbox-summary.h"
#define CAMEL_MBOX_FOLDER_TYPE (camel_mbox_folder_get_type ())
-#define CAMEL_MBOX_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MBOX_FOLDER_TYPE, CamelMboxFolder))
-#define CAMEL_MBOX_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MBOX_FOLDER_TYPE, CamelMboxFolderClass))
-#define CAMEL_IS_MBOX_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_MBOX_FOLDER_TYPE))
+#define CAMEL_MBOX_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_MBOX_FOLDER_TYPE, CamelMboxFolder))
+#define CAMEL_MBOX_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_MBOX_FOLDER_TYPE, CamelMboxFolderClass))
+#define CAMEL_IS_MBOX_FOLDER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_MBOX_FOLDER_TYPE))
G_BEGIN_DECLS
@@ -50,7 +50,7 @@
CamelFolder *camel_mbox_folder_new(CamelStore *parent_store, const char *full_name, guint32 flags, CamelException *ex);
/* Standard Camel function */
-CamelType camel_mbox_folder_get_type(void);
+GType camel_mbox_folder_get_type(void);
G_END_DECLS
Modified: branches/camel-gobject/camel/providers/local/camel-mbox-store.c
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-mbox-store.c (original)
+++ branches/camel-gobject/camel/providers/local/camel-mbox-store.c Mon Nov 10 00:44:12 2008
@@ -67,7 +67,7 @@
{
CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS(camel_mbox_store_class);
- parent_class =(CamelLocalStoreClass *)camel_type_get_global_classfuncs(camel_local_store_get_type());
+ parent_class =(CamelLocalStoreClass *)g_type_class_peek(camel_local_store_get_type());
/* virtual method overload */
camel_store_class->get_folder = get_folder;
@@ -82,12 +82,12 @@
((CamelLocalStoreClass *)camel_store_class)->get_meta_path = mbox_get_meta_path;
}
-CamelType
+GType
camel_mbox_store_get_type(void)
{
- static CamelType camel_mbox_store_type = CAMEL_INVALID_TYPE;
+ static GType camel_mbox_store_type = G_TYPE_INVALID;
- if (camel_mbox_store_type == CAMEL_INVALID_TYPE) {
+ if (camel_mbox_store_type == G_TYPE_INVALID) {
camel_mbox_store_type = camel_type_register(CAMEL_LOCAL_STORE_TYPE, "CamelMboxStore",
sizeof(CamelMboxStore),
sizeof(CamelMboxStoreClass),
@@ -311,7 +311,7 @@
if ((lf = camel_store_get_folder(store, folder_name, 0, &lex))) {
camel_object_get(lf, NULL, CAMEL_OBJECT_STATE_FILE, &path, NULL);
camel_object_set(lf, NULL, CAMEL_OBJECT_STATE_FILE, NULL, NULL);
- camel_object_unref(lf);
+ g_object_unref(lf);
} else {
camel_exception_clear(&lex);
}
@@ -403,7 +403,7 @@
folder =((CamelStoreClass *)((CamelObject *) store)->klass)->get_folder(store, name, CAMEL_STORE_FOLDER_CREATE, ex);
if (folder) {
- camel_object_unref(folder);
+ g_object_unref(folder);
info =((CamelStoreClass *)((CamelObject *) store)->klass)->get_folder_info(store, name, 0, ex);
}
@@ -551,7 +551,7 @@
g_free(newibex);
if (folder)
- camel_object_unref(folder);
+ g_object_unref(folder);
return;
@@ -583,7 +583,7 @@
g_free(oldibex);
if (folder)
- camel_object_unref(folder);
+ g_object_unref(folder);
}
/* used to find out where we've visited already */
@@ -628,7 +628,7 @@
camel_folder_refresh_info(folder, NULL);
fi->unread = camel_folder_get_unread_message_count(folder);
fi->total = camel_folder_get_message_count(folder);
- camel_object_unref(folder);
+ g_object_unref(folder);
} else {
char *path, *folderpath;
CamelMboxSummary *mbs;
@@ -644,7 +644,7 @@
fi->total = ((CamelFolderSummary *)mbs)->saved_count;
}
- camel_object_unref(mbs);
+ g_object_unref(mbs);
g_free(folderpath);
g_free(path);
}
Modified: branches/camel-gobject/camel/providers/local/camel-mbox-store.h
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-mbox-store.h (original)
+++ branches/camel-gobject/camel/providers/local/camel-mbox-store.h Mon Nov 10 00:44:12 2008
@@ -25,9 +25,9 @@
#include "camel-local-store.h"
#define CAMEL_MBOX_STORE_TYPE (camel_mbox_store_get_type ())
-#define CAMEL_MBOX_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MBOX_STORE_TYPE, CamelMboxStore))
-#define CAMEL_MBOX_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MBOX_STORE_TYPE, CamelMboxStoreClass))
-#define CAMEL_IS_MBOX_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_MBOX_STORE_TYPE))
+#define CAMEL_MBOX_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_MBOX_STORE_TYPE, CamelMboxStore))
+#define CAMEL_MBOX_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_MBOX_STORE_TYPE, CamelMboxStoreClass))
+#define CAMEL_IS_MBOX_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_MBOX_STORE_TYPE))
G_BEGIN_DECLS
@@ -44,7 +44,7 @@
/* public methods */
/* Standard Camel function */
-CamelType camel_mbox_store_get_type (void);
+GType camel_mbox_store_get_type (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/providers/local/camel-mbox-summary.c
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-mbox-summary.c (original)
+++ branches/camel-gobject/camel/providers/local/camel-mbox-summary.c Mon Nov 10 00:44:12 2008
@@ -97,12 +97,12 @@
static CamelLocalSummaryClass *camel_mbox_summary_parent;
-CamelType
+GType
camel_mbox_summary_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_local_summary_get_type(), "CamelMboxSummary",
sizeof (CamelMboxSummary),
sizeof (CamelMboxSummaryClass),
@@ -159,7 +159,7 @@
CamelFolderSummaryClass *sklass = (CamelFolderSummaryClass *)klass;
CamelLocalSummaryClass *lklass = (CamelLocalSummaryClass *)klass;
- camel_mbox_summary_parent = (CamelLocalSummaryClass *)camel_type_get_global_classfuncs(camel_local_summary_get_type());
+ camel_mbox_summary_parent = (CamelLocalSummaryClass *)g_type_class_peek(camel_local_summary_get_type());
sklass->summary_header_load = summary_header_load;
sklass->summary_header_save = summary_header_save;
@@ -613,7 +613,7 @@
g_assert(camel_mime_parser_step(mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM_END);
}
- camel_object_unref(CAMEL_OBJECT (mp));
+ g_object_unref(CAMEL_OBJECT (mp));
count = camel_folder_summary_count(s);
for (i=0;i<count;i++) {
@@ -972,7 +972,7 @@
g_ptr_array_foreach (summary, (GFunc) camel_pstring_free, NULL);
g_ptr_array_free (summary, TRUE);
- camel_object_unref((CamelObject *)mp);
+ g_object_unref((CamelObject *)mp);
camel_operation_end(NULL);
@@ -983,7 +983,7 @@
if (fd != -1)
close(fd);
if (mp)
- camel_object_unref((CamelObject *)mp);
+ g_object_unref((CamelObject *)mp);
if (info)
camel_message_info_free((CamelMessageInfo *)info);
@@ -1248,7 +1248,7 @@
write(fdout, "\n", 1);
#endif
- camel_object_unref((CamelObject *)mp);
+ g_object_unref((CamelObject *)mp);
/* clear working flags */
for (i=0; i<count; i++) {
@@ -1273,7 +1273,7 @@
g_free(xevnew);
if (mp)
- camel_object_unref((CamelObject *)mp);
+ g_object_unref((CamelObject *)mp);
if (info)
camel_message_info_free((CamelMessageInfo *)info);
Modified: branches/camel-gobject/camel/providers/local/camel-mbox-summary.h
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-mbox-summary.h (original)
+++ branches/camel-gobject/camel/providers/local/camel-mbox-summary.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
/* Enable the use of elm/pine style "Status" & "X-Status" headers */
#define STATUS_PINE
-#define CAMEL_MBOX_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_mbox_summary_get_type (), CamelMboxSummary)
-#define CAMEL_MBOX_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mbox_summary_get_type (), CamelMboxSummaryClass)
-#define CAMEL_IS_MBOX_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_mbox_summary_get_type ())
+#define CAMEL_MBOX_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_mbox_summary_get_type (), CamelMboxSummary)
+#define CAMEL_MBOX_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_mbox_summary_get_type (), CamelMboxSummaryClass)
+#define CAMEL_IS_MBOX_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_mbox_summary_get_type ())
G_BEGIN_DECLS
@@ -65,7 +65,7 @@
int (*sync_full)(CamelMboxSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex);
};
-CamelType camel_mbox_summary_get_type (void);
+GType camel_mbox_summary_get_type (void);
CamelMboxSummary *camel_mbox_summary_new (struct _CamelFolder *, const char *filename, const char *mbox_name, CamelIndex *index);
/* do we honour/use xstatus headers, etc */
Modified: branches/camel-gobject/camel/providers/local/camel-mh-folder.c
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-mh-folder.c (original)
+++ branches/camel-gobject/camel/providers/local/camel-mh-folder.c Mon Nov 10 00:44:12 2008
@@ -63,7 +63,7 @@
CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS(camel_mh_folder_class);
CamelLocalFolderClass *lclass = (CamelLocalFolderClass *)camel_mh_folder_class;
- parent_class = CAMEL_LOCAL_FOLDER_CLASS (camel_type_get_global_classfuncs(camel_local_folder_get_type()));
+ parent_class = CAMEL_LOCAL_FOLDER_CLASS (g_type_class_peek(camel_local_folder_get_type()));
/* virtual method definition */
@@ -85,11 +85,11 @@
/*CamelMhFolder *mh_folder = CAMEL_MH_FOLDER(object);*/
}
-CamelType camel_mh_folder_get_type(void)
+GType camel_mh_folder_get_type(void)
{
- static CamelType camel_mh_folder_type = CAMEL_INVALID_TYPE;
+ static GType camel_mh_folder_type = G_TYPE_INVALID;
- if (camel_mh_folder_type == CAMEL_INVALID_TYPE) {
+ if (camel_mh_folder_type == G_TYPE_INVALID) {
camel_mh_folder_type = camel_type_register(CAMEL_LOCAL_FOLDER_TYPE, "CamelMhFolder",
sizeof(CamelMhFolder),
sizeof(CamelMhFolderClass),
@@ -152,7 +152,7 @@
goto fail_write;
/* close this? */
- camel_object_unref (CAMEL_OBJECT (output_stream));
+ g_object_unref (CAMEL_OBJECT (output_stream));
g_free(name);
@@ -180,7 +180,7 @@
name, g_strerror (errno));
if (output_stream) {
- camel_object_unref (CAMEL_OBJECT (output_stream));
+ g_object_unref (CAMEL_OBJECT (output_stream));
unlink (name);
}
@@ -223,12 +223,12 @@
_("Cannot get message: %s from folder %s\n %s"), name, lf->folder_path,
_("Message construction failed."));
g_free(name);
- camel_object_unref((CamelObject *)message_stream);
- camel_object_unref((CamelObject *)message);
+ g_object_unref((CamelObject *)message_stream);
+ g_object_unref((CamelObject *)message);
return NULL;
}
- camel_object_unref((CamelObject *)message_stream);
+ g_object_unref((CamelObject *)message_stream);
g_free(name);
return message;
Modified: branches/camel-gobject/camel/providers/local/camel-mh-folder.h
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-mh-folder.h (original)
+++ branches/camel-gobject/camel/providers/local/camel-mh-folder.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include "camel-local-folder.h"
#define CAMEL_MH_FOLDER_TYPE (camel_mh_folder_get_type ())
-#define CAMEL_MH_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MH_FOLDER_TYPE, CamelMhFolder))
-#define CAMEL_MH_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MH_FOLDER_TYPE, CamelMhFolderClass))
-#define CAMEL_IS_MH_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_MH_FOLDER_TYPE))
+#define CAMEL_MH_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_MH_FOLDER_TYPE, CamelMhFolder))
+#define CAMEL_MH_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_MH_FOLDER_TYPE, CamelMhFolderClass))
+#define CAMEL_IS_MH_FOLDER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_MH_FOLDER_TYPE))
G_BEGIN_DECLS
@@ -48,7 +48,7 @@
CamelFolder *camel_mh_folder_new(CamelStore *parent_store, const char *full_name, guint32 flags, CamelException *ex);
/* Standard Camel function */
-CamelType camel_mh_folder_get_type(void);
+GType camel_mh_folder_get_type(void);
G_END_DECLS
Modified: branches/camel-gobject/camel/providers/local/camel-mh-store.c
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-mh-store.c (original)
+++ branches/camel-gobject/camel/providers/local/camel-mh-store.c Mon Nov 10 00:44:12 2008
@@ -62,7 +62,7 @@
CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS(camel_mh_store_class);
CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS(camel_mh_store_class);
- parent_class = (CamelLocalStoreClass *)camel_type_get_global_classfuncs(camel_local_store_get_type());
+ parent_class = (CamelLocalStoreClass *)g_type_class_peek(camel_local_store_get_type());
/* virtual method overload, use defaults for most */
camel_service_class->construct = construct;
@@ -74,11 +74,11 @@
camel_store_class->get_folder_info = get_folder_info;
}
-CamelType camel_mh_store_get_type(void)
+GType camel_mh_store_get_type(void)
{
- static CamelType camel_mh_store_type = CAMEL_INVALID_TYPE;
+ static GType camel_mh_store_type = G_TYPE_INVALID;
- if (camel_mh_store_type == CAMEL_INVALID_TYPE) {
+ if (camel_mh_store_type == G_TYPE_INVALID) {
camel_mh_store_type = camel_type_register(CAMEL_LOCAL_STORE_TYPE, "CamelMhStore",
sizeof(CamelMhStore),
sizeof(CamelMhStoreClass),
@@ -131,7 +131,7 @@
stream = camel_stream_fs_new_with_name(tmp, O_RDONLY, 0);
if (stream) {
in = camel_stream_buffer_new(stream, CAMEL_STREAM_BUFFER_READ);
- camel_object_unref(stream);
+ g_object_unref(stream);
}
if (in == NULL || stream == NULL) {
if (mode == UPDATE_ADD && camel_stream_printf(out, "%s\n", folder) == -1)
@@ -195,9 +195,9 @@
unlink(tmpnew); /* remove it if its there */
g_free(line);
if (in)
- camel_object_unref(in);
+ g_object_unref(in);
if (out)
- camel_object_unref(out);
+ g_object_unref(out);
}
static CamelFolder *
@@ -320,7 +320,7 @@
camel_folder_refresh_info(folder, NULL);
fi->unread = camel_folder_get_unread_message_count(folder);
fi->total = camel_folder_get_message_count(folder);
- camel_object_unref(folder);
+ g_object_unref(folder);
} else {
char *path, *folderpath;
CamelFolderSummary *s;
@@ -340,7 +340,7 @@
fi->unread = s->unread_count;
fi->total = s->saved_count;
}
- camel_object_unref(s);
+ g_object_unref(s);
g_free(folderpath);
g_free(path);
}
@@ -466,7 +466,7 @@
return;
in = camel_stream_buffer_new(stream, CAMEL_STREAM_BUFFER_READ);
- camel_object_unref(stream);
+ g_object_unref(stream);
if (in == NULL)
return;
@@ -526,7 +526,7 @@
g_hash_table_foreach(visited, (GHFunc)g_free, NULL);
g_hash_table_destroy(visited);
- camel_object_unref(in);
+ g_object_unref(in);
}
/* FIXME: move to camel-local, this is shared with maildir code */
Modified: branches/camel-gobject/camel/providers/local/camel-mh-store.h
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-mh-store.h (original)
+++ branches/camel-gobject/camel/providers/local/camel-mh-store.h Mon Nov 10 00:44:12 2008
@@ -25,9 +25,9 @@
#include "camel-local-store.h"
#define CAMEL_MH_STORE_TYPE (camel_mh_store_get_type ())
-#define CAMEL_MH_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MH_STORE_TYPE, CamelMhStore))
-#define CAMEL_MH_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MH_STORE_TYPE, CamelMhStoreClass))
-#define CAMEL_IS_MH_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_MH_STORE_TYPE))
+#define CAMEL_MH_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_MH_STORE_TYPE, CamelMhStore))
+#define CAMEL_MH_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_MH_STORE_TYPE, CamelMhStoreClass))
+#define CAMEL_IS_MH_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_MH_STORE_TYPE))
G_BEGIN_DECLS
@@ -49,7 +49,7 @@
/* public methods */
/* Standard Camel function */
-CamelType camel_mh_store_get_type(void);
+GType camel_mh_store_get_type(void);
G_END_DECLS
Modified: branches/camel-gobject/camel/providers/local/camel-mh-summary.c
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-mh-summary.c (original)
+++ branches/camel-gobject/camel/providers/local/camel-mh-summary.c Mon Nov 10 00:44:12 2008
@@ -63,12 +63,12 @@
static CamelLocalSummaryClass *parent_class;
-CamelType
+GType
camel_mh_summary_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_local_summary_get_type (), "CamelMhSummary",
sizeof(CamelMhSummary),
sizeof(CamelMhSummaryClass),
@@ -87,7 +87,7 @@
CamelFolderSummaryClass *sklass = (CamelFolderSummaryClass *) class;
CamelLocalSummaryClass *lklass = (CamelLocalSummaryClass *)class;
- parent_class = (CamelLocalSummaryClass *)camel_type_get_global_classfuncs(camel_local_summary_get_type ());
+ parent_class = (CamelLocalSummaryClass *)g_type_class_peek(camel_local_summary_get_type ());
/* override methods */
sklass->next_uid_string = mh_summary_next_uid_string;
@@ -222,7 +222,7 @@
}
mhs->priv->current_uid = (char *)name;
camel_folder_summary_add_from_parser((CamelFolderSummary *)mhs, mp);
- camel_object_unref((CamelObject *)mp);
+ g_object_unref((CamelObject *)mp);
mhs->priv->current_uid = NULL;
camel_folder_summary_set_index((CamelFolderSummary *)mhs, NULL);
g_free(filename);
Modified: branches/camel-gobject/camel/providers/local/camel-mh-summary.h
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-mh-summary.h (original)
+++ branches/camel-gobject/camel/providers/local/camel-mh-summary.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-exception.h>
#include <camel/camel-index.h>
-#define CAMEL_MH_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_mh_summary_get_type (), CamelMhSummary)
-#define CAMEL_MH_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mh_summary_get_type (), CamelMhSummaryClass)
-#define CAMEL_IS_MH_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_mh_summary_get_type ())
+#define CAMEL_MH_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_mh_summary_get_type (), CamelMhSummary)
+#define CAMEL_MH_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_mh_summary_get_type (), CamelMhSummaryClass)
+#define CAMEL_IS_MH_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_mh_summary_get_type ())
G_BEGIN_DECLS
@@ -48,7 +48,7 @@
/* signals */
};
-CamelType camel_mh_summary_get_type (void);
+GType camel_mh_summary_get_type (void);
CamelMhSummary *camel_mh_summary_new(struct _CamelFolder *, const char *filename, const char *mhdir, CamelIndex *index);
G_END_DECLS
Modified: branches/camel-gobject/camel/providers/local/camel-spool-folder.c
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-spool-folder.c (original)
+++ branches/camel-gobject/camel/providers/local/camel-spool-folder.c Mon Nov 10 00:44:12 2008
@@ -70,7 +70,7 @@
{
CamelLocalFolderClass *lklass = (CamelLocalFolderClass *)klass;
- parent_class = (CamelFolderClass *)camel_type_get_global_classfuncs(camel_mbox_folder_get_type());
+ parent_class = (CamelFolderClass *)g_type_class_peek(camel_mbox_folder_get_type());
lklass->create_summary = spool_create_summary;
lklass->lock = spool_lock;
@@ -91,11 +91,11 @@
/*CamelSpoolFolder *spool_folder = CAMEL_SPOOL_FOLDER(object);*/
}
-CamelType camel_spool_folder_get_type(void)
+GType camel_spool_folder_get_type(void)
{
- static CamelType camel_spool_folder_type = CAMEL_INVALID_TYPE;
+ static GType camel_spool_folder_type = G_TYPE_INVALID;
- if (camel_spool_folder_type == CAMEL_INVALID_TYPE) {
+ if (camel_spool_folder_type == G_TYPE_INVALID) {
camel_spool_folder_type = camel_type_register(camel_mbox_folder_get_type(), "CamelSpoolFolder",
sizeof(CamelSpoolFolder),
sizeof(CamelSpoolFolderClass),
Modified: branches/camel-gobject/camel/providers/local/camel-spool-folder.h
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-spool-folder.h (original)
+++ branches/camel-gobject/camel/providers/local/camel-spool-folder.h Mon Nov 10 00:44:12 2008
@@ -31,9 +31,9 @@
/* #include "camel-store.h" */
#define CAMEL_SPOOL_FOLDER_TYPE (camel_spool_folder_get_type ())
-#define CAMEL_SPOOL_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SPOOL_FOLDER_TYPE, CamelSpoolFolder))
-#define CAMEL_SPOOL_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SPOOL_FOLDER_TYPE, CamelSpoolFolderClass))
-#define CAMEL_IS_SPOOL_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_SPOOL_FOLDER_TYPE))
+#define CAMEL_SPOOL_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SPOOL_FOLDER_TYPE, CamelSpoolFolder))
+#define CAMEL_SPOOL_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SPOOL_FOLDER_TYPE, CamelSpoolFolderClass))
+#define CAMEL_IS_SPOOL_FOLDER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SPOOL_FOLDER_TYPE))
G_BEGIN_DECLS
@@ -50,7 +50,7 @@
} CamelSpoolFolderClass;
/* Standard Camel function */
-CamelType camel_spool_folder_get_type(void);
+GType camel_spool_folder_get_type(void);
CamelFolder *camel_spool_folder_new(CamelStore *parent_store, const char *full_name, guint32 flags, CamelException *ex);
Modified: branches/camel-gobject/camel/providers/local/camel-spool-store.c
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-spool-store.c (original)
+++ branches/camel-gobject/camel/providers/local/camel-spool-store.c Mon Nov 10 00:44:12 2008
@@ -77,7 +77,7 @@
CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS (camel_spool_store_class);
CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS (camel_spool_store_class);
- parent_class = CAMEL_STORE_CLASS(camel_type_get_global_classfuncs (camel_mbox_store_get_type()));
+ parent_class = CAMEL_STORE_CLASS(g_type_class_peek (camel_mbox_store_get_type()));
/* virtual method overload */
camel_service_class->construct = construct;
@@ -94,12 +94,12 @@
((CamelLocalStoreClass *)camel_store_class)->get_meta_path = spool_get_meta_path;
}
-CamelType
+GType
camel_spool_store_get_type (void)
{
- static CamelType camel_spool_store_type = CAMEL_INVALID_TYPE;
+ static GType camel_spool_store_type = G_TYPE_INVALID;
- if (camel_spool_store_type == CAMEL_INVALID_TYPE) {
+ if (camel_spool_store_type == G_TYPE_INVALID) {
camel_spool_store_type = camel_type_register (camel_mbox_store_get_type(), "CamelSpoolStore",
sizeof (CamelSpoolStore),
sizeof (CamelSpoolStoreClass),
@@ -118,7 +118,7 @@
struct stat st;
d(printf("constructing store of type %s '%s:%s'\n",
- camel_type_to_name(((CamelObject *)service)->s.type), url->protocol, url->path));
+ G_OBJECT_CLASS_NAME(((CamelObject *)service)->s.type), url->protocol, url->path));
CAMEL_SERVICE_CLASS (parent_class)->construct (service, session, provider, url, ex);
if (camel_exception_is_set (ex))
@@ -262,7 +262,7 @@
camel_folder_refresh_info(folder, NULL);
fi->unread = camel_folder_get_unread_message_count(folder);
fi->total = camel_folder_get_message_count(folder);
- camel_object_unref(folder);
+ g_object_unref(folder);
}
}
@@ -385,7 +385,7 @@
spool_fill_fi(store, fi, flags);
}
if (folder)
- camel_object_unref(folder);
+ g_object_unref(folder);
} else if (S_ISDIR(st.st_mode)) {
struct _inode in = { st.st_dev, st.st_ino };
Modified: branches/camel-gobject/camel/providers/local/camel-spool-store.h
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-spool-store.h (original)
+++ branches/camel-gobject/camel/providers/local/camel-spool-store.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include "camel-mbox-store.h"
#define CAMEL_SPOOL_STORE_TYPE (camel_spool_store_get_type ())
-#define CAMEL_SPOOL_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SPOOL_STORE_TYPE, CamelSpoolStore))
-#define CAMEL_SPOOL_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SPOOL_STORE_TYPE, CamelSpoolStoreClass))
-#define CAMEL_IS_SPOOL_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_SPOOL_STORE_TYPE))
+#define CAMEL_SPOOL_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SPOOL_STORE_TYPE, CamelSpoolStore))
+#define CAMEL_SPOOL_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SPOOL_STORE_TYPE, CamelSpoolStoreClass))
+#define CAMEL_IS_SPOOL_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SPOOL_STORE_TYPE))
G_BEGIN_DECLS
@@ -54,7 +54,7 @@
/* public methods */
/* Standard Camel function */
-CamelType camel_spool_store_get_type (void);
+GType camel_spool_store_get_type (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/providers/local/camel-spool-summary.c
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-spool-summary.c (original)
+++ branches/camel-gobject/camel/providers/local/camel-spool-summary.c Mon Nov 10 00:44:12 2008
@@ -58,12 +58,12 @@
static CamelFolderSummaryClass *camel_spool_summary_parent;
-CamelType
+GType
camel_spool_summary_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_mbox_summary_get_type(), "CamelSpoolSummary",
sizeof (CamelSpoolSummary),
sizeof (CamelSpoolSummaryClass),
Modified: branches/camel-gobject/camel/providers/local/camel-spool-summary.h
==============================================================================
--- branches/camel-gobject/camel/providers/local/camel-spool-summary.h (original)
+++ branches/camel-gobject/camel/providers/local/camel-spool-summary.h Mon Nov 10 00:44:12 2008
@@ -27,9 +27,9 @@
#include <camel/camel-index.h>
#include "camel-mbox-summary.h"
-#define CAMEL_SPOOL_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_spool_summary_get_type (), CamelSpoolSummary)
-#define CAMEL_SPOOL_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_spool_summary_get_type (), CamelSpoolSummaryClass)
-#define CAMEL_IS_SPOOL_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_spool_summary_get_type ())
+#define CAMEL_SPOOL_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_spool_summary_get_type (), CamelSpoolSummary)
+#define CAMEL_SPOOL_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_spool_summary_get_type (), CamelSpoolSummaryClass)
+#define CAMEL_IS_SPOOL_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_spool_summary_get_type ())
G_BEGIN_DECLS
@@ -45,7 +45,7 @@
CamelMboxSummaryClass parent_class;
};
-CamelType camel_spool_summary_get_type (void);
+GType camel_spool_summary_get_type (void);
void camel_spool_summary_construct (CamelSpoolSummary *new, const char *filename, const char *spool_name, CamelIndex *index);
/* create the summary, in-memory only */
Modified: branches/camel-gobject/camel/providers/nntp/camel-nntp-folder.c
==============================================================================
--- branches/camel-gobject/camel/providers/nntp/camel-nntp-folder.c (original)
+++ branches/camel-gobject/camel/providers/nntp/camel-nntp-folder.c Mon Nov 10 00:44:12 2008
@@ -141,7 +141,7 @@
goto fail;
} else {
stream = (CamelStream *) nntp_store->stream;
- camel_object_ref (stream);
+ g_object_ref (stream);
}
} else if (ret == 423 || ret == 430) {
camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, _("Cannot get message %s: %s"), msgid, line);
@@ -182,7 +182,7 @@
stream = nntp_folder_download_message ((CamelNNTPFolder *) disco_folder, article, msgid, ex);
if (stream)
- camel_object_unref (stream);
+ g_object_unref (stream);
CAMEL_SERVICE_REC_UNLOCK(nntp_store, connect_lock);
}
@@ -232,11 +232,11 @@
camel_exception_setv (ex, CAMEL_EXCEPTION_USER_CANCEL, _("User canceled"));
else
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot get message %s: %s"), uid, g_strerror (errno));
- camel_object_unref(message);
+ g_object_unref(message);
message = NULL;
}
- camel_object_unref (stream);
+ g_object_unref (stream);
fail:
if (camel_folder_change_info_changed (nntp_folder->changes)) {
changes = nntp_folder->changes;
@@ -361,7 +361,7 @@
crlffilter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_ENCODE, CAMEL_MIME_FILTER_CRLF_MODE_CRLF_DOTS);
filtered_stream = camel_stream_filter_new_with_stream (stream);
camel_stream_filter_add (filtered_stream, crlffilter);
- camel_object_unref (crlffilter);
+ g_object_unref (crlffilter);
/* remove mail 'To', 'CC', and 'BCC' headers */
savedhdrs = NULL;
@@ -396,7 +396,7 @@
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Posting failed: %s"), line);
}
- camel_object_unref (filtered_stream);
+ g_object_unref (filtered_stream);
g_free(group);
header->next = savedhdrs;
@@ -459,8 +459,8 @@
CamelDiscoFolderClass *camel_disco_folder_class = CAMEL_DISCO_FOLDER_CLASS (camel_nntp_folder_class);
CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS (camel_nntp_folder_class);
- parent_class = CAMEL_DISCO_FOLDER_CLASS (camel_type_get_global_classfuncs (camel_disco_folder_get_type ()));
- folder_class = CAMEL_FOLDER_CLASS (camel_type_get_global_classfuncs (camel_folder_get_type ()));
+ parent_class = CAMEL_DISCO_FOLDER_CLASS (g_type_class_peek (camel_disco_folder_get_type ()));
+ folder_class = CAMEL_FOLDER_CLASS (g_type_class_peek (camel_folder_get_type ()));
/* virtual method definition */
@@ -485,12 +485,12 @@
camel_folder_class->search_free = nntp_folder_search_free;
}
-CamelType
+GType
camel_nntp_folder_get_type (void)
{
- static CamelType camel_nntp_folder_type = CAMEL_INVALID_TYPE;
+ static GType camel_nntp_folder_type = G_TYPE_INVALID;
- if (camel_nntp_folder_type == CAMEL_INVALID_TYPE) {
+ if (camel_nntp_folder_type == G_TYPE_INVALID) {
camel_nntp_folder_type = camel_type_register (CAMEL_DISCO_FOLDER_TYPE, "CamelNNTPFolder",
sizeof (CamelNNTPFolder),
sizeof (CamelNNTPFolderClass),
@@ -550,7 +550,7 @@
if (subscribed) {
camel_folder_refresh_info(folder, ex);
if (camel_exception_is_set(ex)) {
- camel_object_unref (folder);
+ g_object_unref (folder);
folder = NULL;
}
}
Modified: branches/camel-gobject/camel/providers/nntp/camel-nntp-folder.h
==============================================================================
--- branches/camel-gobject/camel/providers/nntp/camel-nntp-folder.h (original)
+++ branches/camel-gobject/camel/providers/nntp/camel-nntp-folder.h Mon Nov 10 00:44:12 2008
@@ -32,9 +32,9 @@
/* #include "camel-store.h" */
#define CAMEL_NNTP_FOLDER_TYPE (camel_nntp_folder_get_type ())
-#define CAMEL_NNTP_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_NNTP_FOLDER_TYPE, CamelNNTPFolder))
-#define CAMEL_NNTP_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_NNTP_FOLDER_TYPE, CamelNNTPFolderClass))
-#define CAMEL_IS_NNTP_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_NNTP_FOLDER_TYPE))
+#define CAMEL_NNTP_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_NNTP_FOLDER_TYPE, CamelNNTPFolder))
+#define CAMEL_NNTP_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_NNTP_FOLDER_TYPE, CamelNNTPFolderClass))
+#define CAMEL_IS_NNTP_FOLDER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_NNTP_FOLDER_TYPE))
G_BEGIN_DECLS
@@ -59,7 +59,7 @@
/* public methods */
/* Standard Camel function */
-CamelType camel_nntp_folder_get_type (void);
+GType camel_nntp_folder_get_type (void);
CamelFolder *camel_nntp_folder_new (CamelStore *parent, const char *folder_name, CamelException *ex);
Modified: branches/camel-gobject/camel/providers/nntp/camel-nntp-store-summary.c
==============================================================================
--- branches/camel-gobject/camel/providers/nntp/camel-nntp-store-summary.c (original)
+++ branches/camel-gobject/camel/providers/nntp/camel-nntp-store-summary.c Mon Nov 10 00:44:12 2008
@@ -101,14 +101,14 @@
g_free(p);*/
}
-CamelType
+GType
camel_nntp_store_summary_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
camel_nntp_store_summary_parent = (CamelStoreSummaryClass *)camel_store_summary_get_type();
- type = camel_type_register((CamelType)camel_nntp_store_summary_parent, "CamelNNTPStoreSummary",
+ type = camel_type_register((GType)camel_nntp_store_summary_parent, "CamelNNTPStoreSummary",
sizeof (CamelNNTPStoreSummary),
sizeof (CamelNNTPStoreSummaryClass),
(CamelObjectClassInitFunc) camel_nntp_store_summary_class_init,
Modified: branches/camel-gobject/camel/providers/nntp/camel-nntp-store-summary.h
==============================================================================
--- branches/camel-gobject/camel/providers/nntp/camel-nntp-store-summary.h (original)
+++ branches/camel-gobject/camel/providers/nntp/camel-nntp-store-summary.h Mon Nov 10 00:44:12 2008
@@ -28,9 +28,9 @@
#include <camel/camel-object.h>
#include <camel/camel-store-summary.h>
-#define CAMEL_NNTP_STORE_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_nntp_store_summary_get_type (), CamelNNTPStoreSummary)
-#define CAMEL_NNTP_STORE_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_nntp_store_summary_get_type (), CamelNNTPStoreSummaryClass)
-#define CAMEL_IS_NNTP_STORE_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_nntp_store_summary_get_type ())
+#define CAMEL_NNTP_STORE_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_nntp_store_summary_get_type (), CamelNNTPStoreSummary)
+#define CAMEL_NNTP_STORE_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_nntp_store_summary_get_type (), CamelNNTPStoreSummaryClass)
+#define CAMEL_IS_NNTP_STORE_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_nntp_store_summary_get_type ())
G_BEGIN_DECLS
@@ -67,7 +67,7 @@
CamelStoreSummaryClass summary_class;
};
-CamelType camel_nntp_store_summary_get_type (void);
+GType camel_nntp_store_summary_get_type (void);
CamelNNTPStoreSummary *camel_nntp_store_summary_new (void);
/* TODO: this api needs some more work, needs to support lists */
Modified: branches/camel-gobject/camel/providers/nntp/camel-nntp-store.c
==============================================================================
--- branches/camel-gobject/camel/providers/nntp/camel-nntp-store.c (original)
+++ branches/camel-gobject/camel/providers/nntp/camel-nntp-store.c Mon Nov 10 00:44:12 2008
@@ -199,13 +199,13 @@
service->url->host,
g_strerror (errno));
- camel_object_unref (tcp_stream);
+ g_object_unref (tcp_stream);
goto fail;
}
store->stream = (CamelNNTPStream *) camel_nntp_stream_new (tcp_stream);
- camel_object_unref (tcp_stream);
+ g_object_unref (tcp_stream);
/* Read the greeting, if any. */
if (camel_nntp_stream_line (store->stream, &buf, &len) == -1) {
@@ -217,7 +217,7 @@
_("Could not read greeting from %s: %s"),
service->url->host, g_strerror (errno));
- camel_object_unref (store->stream);
+ g_object_unref (store->stream);
store->stream = NULL;
goto fail;
@@ -229,7 +229,7 @@
_("NNTP server %s returned error code %d: %s"),
service->url->host, len, buf);
- camel_object_unref (store->stream);
+ g_object_unref (store->stream);
store->stream = NULL;
goto fail;
@@ -371,7 +371,7 @@
return FALSE;
}
- camel_object_unref (store->stream);
+ g_object_unref (store->stream);
store->stream = NULL;
g_free(store->current_folder);
store->current_folder = NULL;
@@ -390,7 +390,7 @@
return FALSE;
if (disco->diary) {
- camel_object_unref (disco->diary);
+ g_object_unref (disco->diary);
disco->diary = NULL;
}
@@ -621,7 +621,7 @@
camel_object_trigger_event((CamelObject *) folder, "folder_changed", changes);
camel_folder_change_info_free(changes);
}
- camel_object_unref(folder);
+ g_object_unref(folder);
}
camel_exception_clear(ex);
}
@@ -978,13 +978,13 @@
if (nntp_store->summary) {
camel_store_summary_save ((CamelStoreSummary *) nntp_store->summary);
- camel_object_unref (nntp_store->summary);
+ g_object_unref (nntp_store->summary);
}
- camel_object_unref (nntp_store->mem);
+ g_object_unref (nntp_store->mem);
nntp_store->mem = NULL;
if (nntp_store->stream)
- camel_object_unref (nntp_store->stream);
+ g_object_unref (nntp_store->stream);
if (nntp_store->base_url)
g_free (nntp_store->base_url);
@@ -999,7 +999,7 @@
}
if (nntp_store->cache)
- camel_object_unref(nntp_store->cache);
+ g_object_unref(nntp_store->cache);
g_free(p);
}
@@ -1018,8 +1018,8 @@
CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS (camel_nntp_store_class);
CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS (camel_nntp_store_class);
- parent_class = CAMEL_DISCO_STORE_CLASS (camel_type_get_global_classfuncs (camel_disco_store_get_type ()));
- service_class = CAMEL_SERVICE_CLASS (camel_type_get_global_classfuncs (camel_service_get_type ()));
+ parent_class = CAMEL_DISCO_STORE_CLASS (g_type_class_peek (camel_disco_store_get_type ()));
+ service_class = CAMEL_SERVICE_CLASS (g_type_class_peek (camel_service_get_type ()));
/* virtual method overload */
camel_service_class->construct = nntp_construct;
@@ -1121,12 +1121,12 @@
p = nntp_store->priv = g_malloc0(sizeof(*p));
}
-CamelType
+GType
camel_nntp_store_get_type (void)
{
- static CamelType camel_nntp_store_type = CAMEL_INVALID_TYPE;
+ static GType camel_nntp_store_type = G_TYPE_INVALID;
- if (camel_nntp_store_type == CAMEL_INVALID_TYPE) {
+ if (camel_nntp_store_type == G_TYPE_INVALID) {
camel_nntp_store_type =
camel_type_register (CAMEL_DISCO_STORE_TYPE,
"CamelNNTPStore",
Modified: branches/camel-gobject/camel/providers/nntp/camel-nntp-store.h
==============================================================================
--- branches/camel-gobject/camel/providers/nntp/camel-nntp-store.h (original)
+++ branches/camel-gobject/camel/providers/nntp/camel-nntp-store.h Mon Nov 10 00:44:12 2008
@@ -30,9 +30,9 @@
#include "camel-nntp-store-summary.h"
#define CAMEL_NNTP_STORE_TYPE (camel_nntp_store_get_type ())
-#define CAMEL_NNTP_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_NNTP_STORE_TYPE, CamelNNTPStore))
-#define CAMEL_NNTP_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_NNTP_STORE_TYPE, CamelNNTPStoreClass))
-#define CAMEL_IS_NNTP_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_NNTP_STORE_TYPE))
+#define CAMEL_NNTP_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_NNTP_STORE_TYPE, CamelNNTPStore))
+#define CAMEL_NNTP_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_NNTP_STORE_TYPE, CamelNNTPStoreClass))
+#define CAMEL_IS_NNTP_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_NNTP_STORE_TYPE))
#define CAMEL_NNTP_EXT_SEARCH (1<<0)
#define CAMEL_NNTP_EXT_SETGET (1<<1)
@@ -95,7 +95,7 @@
};
/* Standard Camel function */
-CamelType camel_nntp_store_get_type (void);
+GType camel_nntp_store_get_type (void);
int camel_nntp_raw_commandv (CamelNNTPStore *store, struct _CamelException *ex, char **line, const char *fmt, va_list ap);
int camel_nntp_raw_command(CamelNNTPStore *store, struct _CamelException *ex, char **line, const char *fmt, ...);
Modified: branches/camel-gobject/camel/providers/nntp/camel-nntp-stream.c
==============================================================================
--- branches/camel-gobject/camel/providers/nntp/camel-nntp-stream.c (original)
+++ branches/camel-gobject/camel/providers/nntp/camel-nntp-stream.c Mon Nov 10 00:44:12 2008
@@ -188,7 +188,7 @@
{
CamelStreamClass *camel_stream_class = (CamelStreamClass *)camel_nntp_stream_class;
- parent_class = camel_type_get_global_classfuncs( CAMEL_OBJECT_TYPE );
+ parent_class = g_type_class_peek( CAMEL_TYPE_OBJECT );
/* virtual method definition */
camel_stream_class->read = stream_read;
@@ -220,15 +220,15 @@
g_free(is->buf);
g_free(is->linebuf);
if (is->source)
- camel_object_unref((CamelObject *)is->source);
+ g_object_unref((CamelObject *)is->source);
}
-CamelType
+GType
camel_nntp_stream_get_type (void)
{
- static CamelType camel_nntp_stream_type = CAMEL_INVALID_TYPE;
+ static GType camel_nntp_stream_type = G_TYPE_INVALID;
- if (camel_nntp_stream_type == CAMEL_INVALID_TYPE) {
+ if (camel_nntp_stream_type == G_TYPE_INVALID) {
camel_nntp_stream_type = camel_type_register( camel_stream_get_type(),
"CamelNNTPStream",
sizeof( CamelNNTPStream ),
@@ -256,7 +256,7 @@
CamelNNTPStream *is;
is = (CamelNNTPStream *)camel_object_new(camel_nntp_stream_get_type ());
- camel_object_ref((CamelObject *)source);
+ g_object_ref((CamelObject *)source);
is->source = source;
return (CamelStream *)is;
Modified: branches/camel-gobject/camel/providers/nntp/camel-nntp-stream.h
==============================================================================
--- branches/camel-gobject/camel/providers/nntp/camel-nntp-stream.h (original)
+++ branches/camel-gobject/camel/providers/nntp/camel-nntp-stream.h Mon Nov 10 00:44:12 2008
@@ -23,9 +23,9 @@
#include <camel/camel-stream.h>
-#define CAMEL_NNTP_STREAM(obj) CAMEL_CHECK_CAST (obj, camel_nntp_stream_get_type (), CamelNNTPStream)
-#define CAMEL_NNTP_STREAM_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_nntp_stream_get_type (), CamelNNTPStreamClass)
-#define CAMEL_IS_NNTP_STREAM(obj) CAMEL_CHECK_TYPE (obj, camel_nntp_stream_get_type ())
+#define CAMEL_NNTP_STREAM(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_nntp_stream_get_type (), CamelNNTPStream)
+#define CAMEL_NNTP_STREAM_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_nntp_stream_get_type (), CamelNNTPStreamClass)
+#define CAMEL_IS_NNTP_STREAM(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_nntp_stream_get_type ())
G_BEGIN_DECLS
@@ -54,7 +54,7 @@
CamelStreamClass parent_class;
};
-CamelType camel_nntp_stream_get_type (void);
+GType camel_nntp_stream_get_type (void);
CamelStream *camel_nntp_stream_new (CamelStream *source);
Modified: branches/camel-gobject/camel/providers/nntp/camel-nntp-summary.c
==============================================================================
--- branches/camel-gobject/camel/providers/nntp/camel-nntp-summary.c (original)
+++ branches/camel-gobject/camel/providers/nntp/camel-nntp-summary.c Mon Nov 10 00:44:12 2008
@@ -76,12 +76,12 @@
static void camel_nntp_summary_finalise (CamelObject *obj);
static CamelFolderSummaryClass *camel_nntp_summary_parent;
-CamelType
+GType
camel_nntp_summary_get_type(void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register(camel_folder_summary_get_type(), "CamelNNTPSummary",
sizeof (CamelNNTPSummary),
sizeof (CamelNNTPSummaryClass),
@@ -99,7 +99,7 @@
{
CamelFolderSummaryClass *sklass = (CamelFolderSummaryClass *) klass;
- camel_nntp_summary_parent = CAMEL_FOLDER_SUMMARY_CLASS(camel_type_get_global_classfuncs(camel_folder_summary_get_type()));
+ camel_nntp_summary_parent = CAMEL_FOLDER_SUMMARY_CLASS(g_type_class_peek(camel_folder_summary_get_type()));
sklass->message_info_new_from_header = message_info_new_from_header;
sklass->summary_header_load = summary_header_load;
@@ -421,7 +421,7 @@
g_free(cns->priv->uid);
cns->priv->uid = NULL;
}
- camel_object_unref((CamelObject *)mp);
+ g_object_unref((CamelObject *)mp);
camel_operation_end(NULL);
Modified: branches/camel-gobject/camel/providers/nntp/camel-nntp-summary.h
==============================================================================
--- branches/camel-gobject/camel/providers/nntp/camel-nntp-summary.h (original)
+++ branches/camel-gobject/camel/providers/nntp/camel-nntp-summary.h Mon Nov 10 00:44:12 2008
@@ -23,9 +23,9 @@
#include <camel/camel-folder-summary.h>
-#define CAMEL_NNTP_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_nntp_summary_get_type (), CamelNNTPSummary)
-#define CAMEL_NNTP_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_nntp_summary_get_type (), CamelNNTPSummaryClass)
-#define CAMEL_IS_LOCAL_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_nntp_summary_get_type ())
+#define CAMEL_NNTP_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_nntp_summary_get_type (), CamelNNTPSummary)
+#define CAMEL_NNTP_SUMMARY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_nntp_summary_get_type (), CamelNNTPSummaryClass)
+#define CAMEL_IS_LOCAL_SUMMARY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_nntp_summary_get_type ())
G_BEGIN_DECLS
@@ -49,7 +49,7 @@
CamelFolderSummaryClass parent_class;
};
-CamelType camel_nntp_summary_get_type (void);
+GType camel_nntp_summary_get_type (void);
CamelNNTPSummary *camel_nntp_summary_new(struct _CamelFolder *folder, const char *path);
int camel_nntp_summary_check(CamelNNTPSummary *cns, struct _CamelNNTPStore *store, char *line, struct _CamelFolderChangeInfo *changes, struct _CamelException *ex);
Modified: branches/camel-gobject/camel/providers/pop3/camel-pop3-engine.c
==============================================================================
--- branches/camel-gobject/camel/providers/pop3/camel-pop3-engine.c (original)
+++ branches/camel-gobject/camel/providers/pop3/camel-pop3-engine.c Mon Nov 10 00:44:12 2008
@@ -54,7 +54,7 @@
static void
camel_pop3_engine_class_init (CamelPOP3EngineClass *camel_pop3_engine_class)
{
- parent_class = camel_type_get_global_classfuncs( CAMEL_OBJECT_TYPE );
+ parent_class = g_type_class_peek( CAMEL_TYPE_OBJECT );
}
static void
@@ -72,19 +72,19 @@
/* FIXME: Also flush/free any outstanding requests, etc */
if (pe->stream)
- camel_object_unref(pe->stream);
+ g_object_unref(pe->stream);
g_list_free(pe->auth);
if (pe->apop)
g_free(pe->apop);
}
-CamelType
+GType
camel_pop3_engine_get_type (void)
{
- static CamelType camel_pop3_engine_type = CAMEL_INVALID_TYPE;
+ static GType camel_pop3_engine_type = G_TYPE_INVALID;
- if (camel_pop3_engine_type == CAMEL_INVALID_TYPE) {
+ if (camel_pop3_engine_type == G_TYPE_INVALID) {
camel_pop3_engine_type = camel_type_register(camel_object_get_type(),
"CamelPOP3Engine",
sizeof( CamelPOP3Engine ),
@@ -146,7 +146,7 @@
pe->flags = flags;
if (read_greeting (pe) == -1) {
- camel_object_unref (pe);
+ g_object_unref (pe);
return NULL;
}
Modified: branches/camel-gobject/camel/providers/pop3/camel-pop3-engine.h
==============================================================================
--- branches/camel-gobject/camel/providers/pop3/camel-pop3-engine.h (original)
+++ branches/camel-gobject/camel/providers/pop3/camel-pop3-engine.h Mon Nov 10 00:44:12 2008
@@ -25,9 +25,9 @@
#include <camel/camel-list-utils.h>
#include "camel-pop3-stream.h"
-#define CAMEL_POP3_ENGINE(obj) CAMEL_CHECK_CAST (obj, camel_pop3_engine_get_type (), CamelPOP3Engine)
-#define CAMEL_POP3_ENGINE_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_pop3_engine_get_type (), CamelPOP3EngineClass)
-#define CAMEL_IS_POP3_ENGINE(obj) CAMEL_CHECK_TYPE (obj, camel_pop3_engine_get_type ())
+#define CAMEL_POP3_ENGINE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_pop3_engine_get_type (), CamelPOP3Engine)
+#define CAMEL_POP3_ENGINE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_pop3_engine_get_type (), CamelPOP3EngineClass)
+#define CAMEL_IS_POP3_ENGINE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_pop3_engine_get_type ())
G_BEGIN_DECLS
@@ -121,7 +121,7 @@
CamelObjectClass parent_class;
};
-CamelType camel_pop3_engine_get_type (void);
+GType camel_pop3_engine_get_type (void);
CamelPOP3Engine *camel_pop3_engine_new (CamelStream *source, guint32 flags);
Modified: branches/camel-gobject/camel/providers/pop3/camel-pop3-folder.c
==============================================================================
--- branches/camel-gobject/camel/providers/pop3/camel-pop3-folder.c (original)
+++ branches/camel-gobject/camel/providers/pop3/camel-pop3-folder.c Mon Nov 10 00:44:12 2008
@@ -60,7 +60,7 @@
{
CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS(camel_pop3_folder_class);
- parent_class = CAMEL_FOLDER_CLASS(camel_type_get_global_classfuncs(camel_folder_get_type()));
+ parent_class = CAMEL_FOLDER_CLASS(g_type_class_peek(camel_folder_get_type()));
/* virtual method overload */
camel_folder_class->refresh_info = pop3_refresh_info;
@@ -74,10 +74,10 @@
camel_folder_class->set_message_flags = pop3_set_message_flags;
}
-CamelType
+GType
camel_pop3_folder_get_type (void)
{
- static CamelType camel_pop3_folder_type = CAMEL_INVALID_TYPE;
+ static GType camel_pop3_folder_type = G_TYPE_INVALID;
if (!camel_pop3_folder_type) {
camel_pop3_folder_type = camel_type_register (CAMEL_FOLDER_TYPE, "CamelPOP3Folder",
@@ -130,7 +130,7 @@
/* mt-ok, since we dont have the folder-lock for new() */
camel_folder_refresh_info (folder, ex);/* mt-ok */
if (camel_exception_is_set (ex)) {
- camel_object_unref (CAMEL_OBJECT (folder));
+ g_object_unref (CAMEL_OBJECT (folder));
folder = NULL;
}
@@ -174,7 +174,7 @@
default:
break;
}
- camel_object_unref(mp);
+ g_object_unref(mp);
g_checksum_get_digest (checksum, digest, &length);
g_checksum_free (checksum);
@@ -384,7 +384,7 @@
message = camel_mime_message_new ();
if (camel_data_wrapper_construct_from_stream ((CamelDataWrapper *)message, stream) == -1) {
g_warning (_("Cannot get message %s: %s"), uid, g_strerror (errno));
- camel_object_unref ((CamelObject *)message);
+ g_object_unref ((CamelObject *)message);
message = NULL;
}
@@ -392,12 +392,12 @@
res = TRUE;
*message_time = message->date + message->date_offset;
- camel_object_unref ((CamelObject *)message);
+ g_object_unref ((CamelObject *)message);
}
}
if (stream) {
- camel_object_unref (stream);
+ g_object_unref (stream);
}
return res;
}
@@ -511,7 +511,7 @@
fi->err = 0;
}
- camel_object_unref((CamelObject *)fi->stream);
+ g_object_unref((CamelObject *)fi->stream);
fi->stream = NULL;
}
@@ -577,7 +577,7 @@
stream = camel_stream_mem_new();
/* ref it, the cache storage routine unref's when done */
- camel_object_ref((CamelObject *)stream);
+ g_object_ref((CamelObject *)stream);
fi->stream = stream;
fi->err = EIO;
pcr = camel_pop3_engine_command_new(pop3_store->engine, CAMEL_POP3_COMMAND_MULTI, cmd_tocache, fi, "RETR %u\r\n", fi->id);
@@ -640,11 +640,11 @@
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Cannot get message %s: %s"),
uid, g_strerror (errno));
- camel_object_unref((CamelObject *)message);
+ g_object_unref((CamelObject *)message);
message = NULL;
}
done:
- camel_object_unref((CamelObject *)stream);
+ g_object_unref((CamelObject *)stream);
fail:
camel_operation_end(NULL);
Modified: branches/camel-gobject/camel/providers/pop3/camel-pop3-folder.h
==============================================================================
--- branches/camel-gobject/camel/providers/pop3/camel-pop3-folder.h (original)
+++ branches/camel-gobject/camel/providers/pop3/camel-pop3-folder.h Mon Nov 10 00:44:12 2008
@@ -29,9 +29,9 @@
#include "camel-folder.h"
#define CAMEL_POP3_FOLDER_TYPE (camel_pop3_folder_get_type ())
-#define CAMEL_POP3_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_POP3_FOLDER_TYPE, CamelPOP3Folder))
-#define CAMEL_POP3_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_POP3_FOLDER_TYPE, CamelPOP3FolderClass))
-#define CAMEL_IS_POP3_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_POP3_FOLDER_TYPE))
+#define CAMEL_POP3_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_POP3_FOLDER_TYPE, CamelPOP3Folder))
+#define CAMEL_POP3_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_POP3_FOLDER_TYPE, CamelPOP3FolderClass))
+#define CAMEL_IS_POP3_FOLDER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_POP3_FOLDER_TYPE))
G_BEGIN_DECLS
@@ -65,7 +65,7 @@
CamelFolder *camel_pop3_folder_new (CamelStore *parent, CamelException *ex);
/* Standard Camel function */
-CamelType camel_pop3_folder_get_type (void);
+GType camel_pop3_folder_get_type (void);
int camel_pop3_delete_old(CamelFolder *folder, int days_to_delete, CamelException *ex);
Modified: branches/camel-gobject/camel/providers/pop3/camel-pop3-store.c
==============================================================================
--- branches/camel-gobject/camel/providers/pop3/camel-pop3-store.c (original)
+++ branches/camel-gobject/camel/providers/pop3/camel-pop3-store.c Mon Nov 10 00:44:12 2008
@@ -82,7 +82,7 @@
CamelStoreClass *camel_store_class =
CAMEL_STORE_CLASS (camel_pop3_store_class);
- parent_class = CAMEL_STORE_CLASS (camel_type_get_global_classfuncs (camel_store_get_type ()));
+ parent_class = CAMEL_STORE_CLASS (g_type_class_peek (camel_store_get_type ()));
/* virtual method overload */
camel_service_class->query_auth_types = query_auth_types;
@@ -102,10 +102,10 @@
;
}
-CamelType
+GType
camel_pop3_store_get_type (void)
{
- static CamelType camel_pop3_store_type = CAMEL_INVALID_TYPE;
+ static GType camel_pop3_store_type = G_TYPE_INVALID;
if (!camel_pop3_store_type) {
camel_pop3_store_type = camel_type_register (CAMEL_STORE_TYPE,
@@ -132,9 +132,9 @@
camel_service_disconnect((CamelService *)pop3_store, TRUE, NULL);
if (pop3_store->engine)
- camel_object_unref((CamelObject *)pop3_store->engine);
+ g_object_unref((CamelObject *)pop3_store->engine);
if (pop3_store->cache)
- camel_object_unref((CamelObject *)pop3_store->cache);
+ g_object_unref((CamelObject *)pop3_store->cache);
}
enum {
@@ -186,14 +186,14 @@
service->url->host,
g_strerror (errno));
- camel_object_unref (tcp_stream);
+ g_object_unref (tcp_stream);
return FALSE;
}
/* parent class connect initialization */
if (CAMEL_SERVICE_CLASS (parent_class)->connect (service, ex) == FALSE) {
- camel_object_unref (tcp_stream);
+ g_object_unref (tcp_stream);
return FALSE;
}
@@ -207,12 +207,12 @@
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Failed to read a valid greeting from POP server %s"),
service->url->host);
- camel_object_unref (tcp_stream);
+ g_object_unref (tcp_stream);
return FALSE;
}
if (ssl_mode != MODE_TLS) {
- camel_object_unref (tcp_stream);
+ g_object_unref (tcp_stream);
return TRUE;
}
@@ -257,7 +257,7 @@
goto stls_exception;
#endif /* HAVE_SSL */
- camel_object_unref (tcp_stream);
+ g_object_unref (tcp_stream);
/* rfc2595, section 4 states that after a successful STLS
command, the client MUST discard prior CAPA responses */
@@ -274,8 +274,8 @@
camel_pop3_engine_command_free (store->engine, pc);
}
- camel_object_unref (CAMEL_OBJECT (store->engine));
- camel_object_unref (CAMEL_OBJECT (tcp_stream));
+ g_object_unref (CAMEL_OBJECT (store->engine));
+ g_object_unref (CAMEL_OBJECT (tcp_stream));
store->engine = NULL;
return FALSE;
@@ -439,7 +439,7 @@
goto ioerror;
}
- camel_object_unref((CamelObject *)sasl);
+ g_object_unref((CamelObject *)sasl);
return 0;
ioerror:
@@ -451,7 +451,7 @@
CAMEL_SERVICE (store)->url->host, g_strerror (errno));
}
done:
- camel_object_unref((CamelObject *)sasl);
+ g_object_unref((CamelObject *)sasl);
return -1;
}
@@ -654,7 +654,7 @@
if (!CAMEL_SERVICE_CLASS (parent_class)->disconnect (service, clean, ex))
return FALSE;
- camel_object_unref((CamelObject *)store->engine);
+ g_object_unref((CamelObject *)store->engine);
store->engine = NULL;
return TRUE;
Modified: branches/camel-gobject/camel/providers/pop3/camel-pop3-store.h
==============================================================================
--- branches/camel-gobject/camel/providers/pop3/camel-pop3-store.h (original)
+++ branches/camel-gobject/camel/providers/pop3/camel-pop3-store.h Mon Nov 10 00:44:12 2008
@@ -32,9 +32,9 @@
#include "camel-pop3-engine.h"
#define CAMEL_POP3_STORE_TYPE (camel_pop3_store_get_type ())
-#define CAMEL_POP3_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_POP3_STORE_TYPE, CamelPOP3Store))
-#define CAMEL_POP3_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_POP3_STORE_TYPE, CamelPOP3StoreClass))
-#define CAMEL_IS_POP3_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_POP3_STORE_TYPE))
+#define CAMEL_POP3_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_POP3_STORE_TYPE, CamelPOP3Store))
+#define CAMEL_POP3_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_POP3_STORE_TYPE, CamelPOP3StoreClass))
+#define CAMEL_IS_POP3_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_POP3_STORE_TYPE))
G_BEGIN_DECLS
@@ -65,7 +65,7 @@
char *camel_pop3_command_get_additional_data (CamelPOP3Store *store, int total, CamelException *ex);
/* Standard Camel function */
-CamelType camel_pop3_store_get_type (void);
+GType camel_pop3_store_get_type (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/providers/pop3/camel-pop3-stream.c
==============================================================================
--- branches/camel-gobject/camel/providers/pop3/camel-pop3-stream.c (original)
+++ branches/camel-gobject/camel/providers/pop3/camel-pop3-stream.c Mon Nov 10 00:44:12 2008
@@ -190,7 +190,7 @@
{
CamelStreamClass *camel_stream_class = (CamelStreamClass *)camel_pop3_stream_class;
- parent_class = camel_type_get_global_classfuncs( CAMEL_OBJECT_TYPE );
+ parent_class = g_type_class_peek( CAMEL_TYPE_OBJECT );
/* virtual method definition */
camel_stream_class->read = stream_read;
@@ -222,15 +222,15 @@
g_free(is->buf);
g_free(is->linebuf);
if (is->source)
- camel_object_unref((CamelObject *)is->source);
+ g_object_unref((CamelObject *)is->source);
}
-CamelType
+GType
camel_pop3_stream_get_type (void)
{
- static CamelType camel_pop3_stream_type = CAMEL_INVALID_TYPE;
+ static GType camel_pop3_stream_type = G_TYPE_INVALID;
- if (camel_pop3_stream_type == CAMEL_INVALID_TYPE) {
+ if (camel_pop3_stream_type == G_TYPE_INVALID) {
camel_pop3_stream_type = camel_type_register( camel_stream_get_type(),
"CamelPOP3Stream",
sizeof( CamelPOP3Stream ),
@@ -258,7 +258,7 @@
CamelPOP3Stream *is;
is = (CamelPOP3Stream *)camel_object_new(camel_pop3_stream_get_type ());
- camel_object_ref((CamelObject *)source);
+ g_object_ref((CamelObject *)source);
is->source = source;
return (CamelStream *)is;
Modified: branches/camel-gobject/camel/providers/pop3/camel-pop3-stream.h
==============================================================================
--- branches/camel-gobject/camel/providers/pop3/camel-pop3-stream.h (original)
+++ branches/camel-gobject/camel/providers/pop3/camel-pop3-stream.h Mon Nov 10 00:44:12 2008
@@ -26,9 +26,9 @@
#include <camel/camel-stream.h>
-#define CAMEL_POP3_STREAM(obj) CAMEL_CHECK_CAST (obj, camel_pop3_stream_get_type (), CamelPOP3Stream)
-#define CAMEL_POP3_STREAM_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_pop3_stream_get_type (), CamelPOP3StreamClass)
-#define CAMEL_IS_POP3_STREAM(obj) CAMEL_CHECK_TYPE (obj, camel_pop3_stream_get_type ())
+#define CAMEL_POP3_STREAM(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, camel_pop3_stream_get_type (), CamelPOP3Stream)
+#define CAMEL_POP3_STREAM_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, camel_pop3_stream_get_type (), CamelPOP3StreamClass)
+#define CAMEL_IS_POP3_STREAM(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, camel_pop3_stream_get_type ())
G_BEGIN_DECLS
@@ -57,7 +57,7 @@
CamelStreamClass parent_class;
};
-CamelType camel_pop3_stream_get_type (void);
+GType camel_pop3_stream_get_type (void);
CamelStream *camel_pop3_stream_new (CamelStream *source);
Modified: branches/camel-gobject/camel/providers/sendmail/camel-sendmail-transport.c
==============================================================================
--- branches/camel-gobject/camel/providers/sendmail/camel-sendmail-transport.c (original)
+++ branches/camel-gobject/camel/providers/sendmail/camel-sendmail-transport.c Mon Nov 10 00:44:12 2008
@@ -64,12 +64,12 @@
camel_transport_class->send_to = sendmail_send_to;
}
-CamelType
+GType
camel_sendmail_transport_get_type (void)
{
- static CamelType camel_sendmail_transport_type = CAMEL_INVALID_TYPE;
+ static GType camel_sendmail_transport_type = G_TYPE_INVALID;
- if (camel_sendmail_transport_type == CAMEL_INVALID_TYPE) {
+ if (camel_sendmail_transport_type == G_TYPE_INVALID) {
camel_sendmail_transport_type =
camel_type_register (CAMEL_TRANSPORT_TYPE, "CamelSendmailTransport",
sizeof (CamelSendmailTransport),
@@ -198,13 +198,13 @@
filter = camel_stream_filter_new_with_stream (out);
crlf = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_DECODE, CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
camel_stream_filter_add (filter, crlf);
- camel_object_unref (crlf);
- camel_object_unref (out);
+ g_object_unref (crlf);
+ g_object_unref (out);
out = (CamelStream *) filter;
if (camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), out) == -1
|| camel_stream_close (out) == -1) {
- camel_object_unref (CAMEL_OBJECT (out));
+ g_object_unref (CAMEL_OBJECT (out));
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Could not send message: %s"),
g_strerror (errno));
@@ -221,7 +221,7 @@
return FALSE;
}
- camel_object_unref (CAMEL_OBJECT (out));
+ g_object_unref (CAMEL_OBJECT (out));
/* Wait for sendmail to exit. */
while (waitpid (pid, &wstat, 0) == -1 && errno == EINTR)
Modified: branches/camel-gobject/camel/providers/sendmail/camel-sendmail-transport.h
==============================================================================
--- branches/camel-gobject/camel/providers/sendmail/camel-sendmail-transport.h (original)
+++ branches/camel-gobject/camel/providers/sendmail/camel-sendmail-transport.h Mon Nov 10 00:44:12 2008
@@ -30,9 +30,9 @@
#include "camel-transport.h"
#define CAMEL_SENDMAIL_TRANSPORT_TYPE (camel_sendmail_transport_get_type ())
-#define CAMEL_SENDMAIL_TRANSPORT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SENDMAIL_TRANSPORT_TYPE, CamelSendmailTransport))
-#define CAMEL_SENDMAIL_TRANSPORT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SENDMAIL_TRANSPORT_TYPE, CamelSendmailTransportClass))
-#define CAMEL_IS_SENDMAIL_TRANSPORT(o) (CAMEL_CHECK_TYPE((o), CAMEL_SENDMAIL_TRANSPORT_TYPE))
+#define CAMEL_SENDMAIL_TRANSPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SENDMAIL_TRANSPORT_TYPE, CamelSendmailTransport))
+#define CAMEL_SENDMAIL_TRANSPORT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SENDMAIL_TRANSPORT_TYPE, CamelSendmailTransportClass))
+#define CAMEL_IS_SENDMAIL_TRANSPORT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SENDMAIL_TRANSPORT_TYPE))
G_BEGIN_DECLS
@@ -49,7 +49,7 @@
/* Standard Camel function */
-CamelType camel_sendmail_transport_get_type (void);
+GType camel_sendmail_transport_get_type (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/providers/smtp/camel-smtp-transport.c
==============================================================================
--- branches/camel-gobject/camel/providers/smtp/camel-smtp-transport.c (original)
+++ branches/camel-gobject/camel/providers/smtp/camel-smtp-transport.c Mon Nov 10 00:44:12 2008
@@ -105,7 +105,7 @@
CamelServiceClass *camel_service_class =
CAMEL_SERVICE_CLASS (camel_smtp_transport_class);
- parent_class = CAMEL_TRANSPORT_CLASS (camel_type_get_global_classfuncs (camel_transport_get_type ()));
+ parent_class = CAMEL_TRANSPORT_CLASS (g_type_class_peek (camel_transport_get_type ()));
/* virtual method overload */
camel_service_class->construct = smtp_construct;
@@ -126,12 +126,12 @@
smtp->connected = FALSE;
}
-CamelType
+GType
camel_smtp_transport_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (CAMEL_TRANSPORT_TYPE,
"CamelSmtpTransport",
sizeof (CamelSmtpTransport),
@@ -275,7 +275,7 @@
_("Could not connect to %s: %s"),
service->url->host, g_strerror (errno));
- camel_object_unref (tcp_stream);
+ g_object_unref (tcp_stream);
return FALSE;
}
@@ -385,9 +385,9 @@
exception_cleanup:
- camel_object_unref (transport->istream);
+ g_object_unref (transport->istream);
transport->istream = NULL;
- camel_object_unref (transport->ostream);
+ g_object_unref (transport->ostream);
transport->ostream = NULL;
transport->connected = FALSE;
@@ -472,7 +472,7 @@
truth = camel_sasl_authenticated (sasl);
if (chal)
g_byte_array_free (chal, TRUE);
- camel_object_unref (sasl);
+ g_object_unref (sasl);
if (!truth)
return FALSE;
@@ -615,12 +615,12 @@
}
if (transport->istream) {
- camel_object_unref (transport->istream);
+ g_object_unref (transport->istream);
transport->istream = NULL;
}
if (transport->ostream) {
- camel_object_unref (transport->ostream);
+ g_object_unref (transport->ostream);
transport->ostream = NULL;
}
@@ -1186,7 +1186,7 @@
if (strncmp (respbuf, "235", 3) != 0)
goto lose;
- camel_object_unref (sasl);
+ g_object_unref (sasl);
camel_operation_end (NULL);
return TRUE;
@@ -1204,7 +1204,7 @@
_("Bad authentication response from server.\n"));
}
- camel_object_unref (sasl);
+ g_object_unref (sasl);
camel_operation_end (NULL);
g_free (respbuf);
@@ -1381,13 +1381,13 @@
/* setup progress reporting for message sending... */
filter = camel_mime_filter_progress_new (NULL, null->written);
camel_stream_filter_add (filtered_stream, filter);
- camel_object_unref (filter);
- camel_object_unref (null);
+ g_object_unref (filter);
+ g_object_unref (null);
/* setup LF->CRLF conversion */
filter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_ENCODE, CAMEL_MIME_FILTER_CRLF_MODE_CRLF_DOTS);
camel_stream_filter_add (filtered_stream, filter);
- camel_object_unref (filter);
+ g_object_unref (filter);
/* write the message */
ret = camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), CAMEL_STREAM (filtered_stream));
@@ -1400,7 +1400,7 @@
_("DATA command failed: %s: mail not sent"),
g_strerror (errno));
- camel_object_unref (filtered_stream);
+ g_object_unref (filtered_stream);
camel_service_disconnect ((CamelService *) transport, FALSE, NULL);
@@ -1408,7 +1408,7 @@
}
camel_stream_flush (CAMEL_STREAM (filtered_stream));
- camel_object_unref (filtered_stream);
+ g_object_unref (filtered_stream);
/* terminate the message body */
Modified: branches/camel-gobject/camel/providers/smtp/camel-smtp-transport.h
==============================================================================
--- branches/camel-gobject/camel/providers/smtp/camel-smtp-transport.h (original)
+++ branches/camel-gobject/camel/providers/smtp/camel-smtp-transport.h Mon Nov 10 00:44:12 2008
@@ -29,9 +29,9 @@
#include "camel-tcp-stream.h"
#define CAMEL_SMTP_TRANSPORT_TYPE (camel_smtp_transport_get_type ())
-#define CAMEL_SMTP_TRANSPORT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SMTP_TRANSPORT_TYPE, CamelSmtpTransport))
-#define CAMEL_SMTP_TRANSPORT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SMTP_TRANSPORT_TYPE, CamelSmtpTransportClass))
-#define CAMEL_IS_SMTP_TRANSPORT(o) (CAMEL_CHECK_TYPE((o), CAMEL_SMTP_TRANSPORT_TYPE))
+#define CAMEL_SMTP_TRANSPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_SMTP_TRANSPORT_TYPE, CamelSmtpTransport))
+#define CAMEL_SMTP_TRANSPORT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_SMTP_TRANSPORT_TYPE, CamelSmtpTransportClass))
+#define CAMEL_IS_SMTP_TRANSPORT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_SMTP_TRANSPORT_TYPE))
#define CAMEL_SMTP_TRANSPORT_IS_ESMTP (1 << 0)
#define CAMEL_SMTP_TRANSPORT_8BITMIME (1 << 1)
@@ -62,7 +62,7 @@
} CamelSmtpTransportClass;
/* Standard Camel function */
-CamelType camel_smtp_transport_get_type (void);
+GType camel_smtp_transport_get_type (void);
G_END_DECLS
Modified: branches/camel-gobject/camel/tests/folder/test1.c
==============================================================================
--- branches/camel-gobject/camel/tests/folder/test1.c (original)
+++ branches/camel-gobject/camel/tests/folder/test1.c Mon Nov 10 00:44:12 2008
@@ -49,7 +49,7 @@
g_free(path);
}
- camel_object_unref((CamelObject *)session);
+ g_object_unref((CamelObject *)session);
camel_exception_free(ex);
return 0;
Modified: branches/camel-gobject/camel/tests/folder/test10.c
==============================================================================
--- branches/camel-gobject/camel/tests/folder/test10.c (original)
+++ branches/camel-gobject/camel/tests/folder/test10.c Mon Nov 10 00:44:12 2008
@@ -45,11 +45,11 @@
folder = camel_store_get_folder(store, "testbox", CAMEL_STORE_FOLDER_CREATE, ex);
camel_exception_clear(ex);
if (testid == 0) {
- camel_object_unref(folder);
- camel_object_unref(store);
+ g_object_unref(folder);
+ g_object_unref(store);
} else {
- camel_object_unref(store);
- camel_object_unref(folder);
+ g_object_unref(store);
+ g_object_unref(folder);
}
}
@@ -99,7 +99,7 @@
camel_test_end();
}
- camel_object_unref((CamelObject *)session);
+ g_object_unref((CamelObject *)session);
camel_exception_free(ex);
return 0;
Modified: branches/camel-gobject/camel/tests/folder/test4.c
==============================================================================
--- branches/camel-gobject/camel/tests/folder/test4.c (original)
+++ branches/camel-gobject/camel/tests/folder/test4.c Mon Nov 10 00:44:12 2008
@@ -50,7 +50,7 @@
/*camel_test_fatal();*/
}
- camel_object_unref((CamelObject *)session);
+ g_object_unref((CamelObject *)session);
camel_exception_free(ex);
return 0;
Modified: branches/camel-gobject/camel/tests/folder/test5.c
==============================================================================
--- branches/camel-gobject/camel/tests/folder/test5.c (original)
+++ branches/camel-gobject/camel/tests/folder/test5.c Mon Nov 10 00:44:12 2008
@@ -50,7 +50,7 @@
camel_test_fatal();
}
- camel_object_unref((CamelObject *)session);
+ g_object_unref((CamelObject *)session);
camel_exception_free(ex);
return 0;
Modified: branches/camel-gobject/camel/tests/folder/test8.c
==============================================================================
--- branches/camel-gobject/camel/tests/folder/test8.c (original)
+++ branches/camel-gobject/camel/tests/folder/test8.c Mon Nov 10 00:44:12 2008
@@ -202,7 +202,7 @@
}
}
- camel_object_unref((CamelObject *)session);
+ g_object_unref((CamelObject *)session);
camel_exception_free(ex);
return 0;
Modified: branches/camel-gobject/camel/tests/folder/test9.c
==============================================================================
--- branches/camel-gobject/camel/tests/folder/test9.c (original)
+++ branches/camel-gobject/camel/tests/folder/test9.c Mon Nov 10 00:44:12 2008
@@ -83,7 +83,7 @@
for (i=0;i<ARRAY_LEN(mailboxes);i++)
if (!strcmp(mailboxes[i].name, uri)) {
- camel_object_ref((CamelObject *)mailboxes[i].folder);
+ g_object_ref((CamelObject *)mailboxes[i].folder);
return mailboxes[i].folder;
}
return NULL;
Modified: branches/camel-gobject/camel/tests/lib/camel-test.h
==============================================================================
--- branches/camel-gobject/camel/tests/lib/camel-test.h (original)
+++ branches/camel-gobject/camel/tests/lib/camel-test.h Mon Nov 10 00:44:12 2008
@@ -34,7 +34,7 @@
#define check_unref(object, expected) do { \
check_count(object, expected); \
- camel_object_unref(CAMEL_OBJECT(object)); \
+ g_object_unref(CAMEL_OBJECT(object)); \
if (expected == 1) { \
object = NULL; \
} \
Modified: branches/camel-gobject/camel/tests/lib/folders.c
==============================================================================
--- branches/camel-gobject/camel/tests/lib/folders.c (original)
+++ branches/camel-gobject/camel/tests/lib/folders.c Mon Nov 10 00:44:12 2008
@@ -107,7 +107,7 @@
/* cross check with info */
test_message_info(msg, info);
- camel_object_unref((CamelObject *)msg);
+ g_object_unref((CamelObject *)msg);
/* see if it is in the summary (only once) */
s = camel_folder_get_summary(folder);
Modified: branches/camel-gobject/camel/tests/lib/messages.c
==============================================================================
--- branches/camel-gobject/camel/tests/lib/messages.c (original)
+++ branches/camel-gobject/camel/tests/lib/messages.c Mon Nov 10 00:44:12 2008
@@ -101,7 +101,7 @@
ret = camel_stream_close((CamelStream *)file);
check(((CamelObject *)file)->ref_count == 1);
- camel_object_unref((CamelObject *)file);
+ g_object_unref((CamelObject *)file);
return ret;
}
@@ -118,7 +118,7 @@
camel_data_wrapper_construct_from_stream((CamelDataWrapper *)msg2, (CamelStream *)file);
/* file's refcount may be > 1 if the message is real big */
check(CAMEL_OBJECT(file)->ref_count >=1);
- camel_object_unref((CamelObject *)file);
+ g_object_unref((CamelObject *)file);
return msg2;
}
@@ -222,8 +222,8 @@
check_msg (memcmp (mem1->buffer->data, mem2->buffer->data, mem1->buffer->len) == 0, "msg/stream compare");
- camel_object_unref (mem1);
- camel_object_unref (mem2);
+ g_object_unref (mem1);
+ g_object_unref (mem2);
return 0;
}
Modified: branches/camel-gobject/camel/tests/lib/session.c
==============================================================================
--- branches/camel-gobject/camel/tests/lib/session.c (original)
+++ branches/camel-gobject/camel/tests/lib/session.c Mon Nov 10 00:44:12 2008
@@ -11,12 +11,12 @@
CAMEL_SESSION_CLASS (camel_test_session_class);
}
-CamelType
+GType
camel_test_session_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (
camel_session_get_type (),
"CamelTestSession",
Modified: branches/camel-gobject/camel/tests/lib/session.h
==============================================================================
--- branches/camel-gobject/camel/tests/lib/session.h (original)
+++ branches/camel-gobject/camel/tests/lib/session.h Mon Nov 10 00:44:12 2008
@@ -1,9 +1,9 @@
#include <camel/camel-session.h>
#define CAMEL_TEST_SESSION_TYPE (camel_test_session_get_type ())
-#define CAMEL_TEST_SESSION(obj) (CAMEL_CHECK_CAST((obj), CAMEL_TEST_SESSION_TYPE, CamelTestSession))
-#define CAMEL_TEST_SESSION_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TEST_SESSION_TYPE, CamelTestSessionClass))
-#define CAMEL_TEST_IS_SESSION(o) (CAMEL_CHECK_TYPE((o), CAMEL_TEST_SESSION_TYPE))
+#define CAMEL_TEST_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_TEST_SESSION_TYPE, CamelTestSession))
+#define CAMEL_TEST_SESSION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_TEST_SESSION_TYPE, CamelTestSessionClass))
+#define CAMEL_TEST_IS_SESSION(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_TEST_SESSION_TYPE))
typedef struct _CamelTestSession {
CamelSession parent_object;
@@ -15,5 +15,5 @@
} CamelTestSessionClass;
-CamelType camel_test_session_get_type (void);
+GType camel_test_session_get_type (void);
CamelSession *camel_test_session_new (const char *path);
Modified: branches/camel-gobject/camel/tests/message/test4.c
==============================================================================
--- branches/camel-gobject/camel/tests/message/test4.c (original)
+++ branches/camel-gobject/camel/tests/message/test4.c Mon Nov 10 00:44:12 2008
@@ -115,8 +115,8 @@
/*dump_mime_struct ((CamelMimePart *) message, 0);*/
test_message_compare (message);
- camel_object_unref (message);
- camel_object_unref (stream);
+ g_object_unref (message);
+ g_object_unref (stream);
pull ();
}
Modified: branches/camel-gobject/camel/tests/mime-filter/test-charset.c
==============================================================================
--- branches/camel-gobject/camel/tests/mime-filter/test-charset.c (original)
+++ branches/camel-gobject/camel/tests/mime-filter/test-charset.c Mon Nov 10 00:44:12 2008
@@ -85,7 +85,7 @@
g_free (charset);
camel_stream_filter_add (filter, f);
- camel_object_unref (f);
+ g_object_unref (f);
camel_test_push ("Running filter and comparing to correct result");
@@ -131,9 +131,9 @@
/* inefficient */
camel_test_push ("Cleaning up");
- camel_object_unref (CAMEL_OBJECT (filter));
- camel_object_unref (CAMEL_OBJECT (correct));
- camel_object_unref (CAMEL_OBJECT (source));
+ g_object_unref (CAMEL_OBJECT (filter));
+ g_object_unref (CAMEL_OBJECT (correct));
+ g_object_unref (CAMEL_OBJECT (source));
camel_test_pull ();
camel_test_end ();
Modified: branches/camel-gobject/camel/tests/mime-filter/test-crlf.c
==============================================================================
--- branches/camel-gobject/camel/tests/mime-filter/test-crlf.c (original)
+++ branches/camel-gobject/camel/tests/mime-filter/test-crlf.c Mon Nov 10 00:44:12 2008
@@ -144,10 +144,10 @@
/* inefficient */
camel_test_push ("Cleaning up");
- camel_object_unref (CAMEL_OBJECT (filter));
- camel_object_unref (CAMEL_OBJECT (correct));
- camel_object_unref (CAMEL_OBJECT (source));
- camel_object_unref (CAMEL_OBJECT (sh));
+ g_object_unref (CAMEL_OBJECT (filter));
+ g_object_unref (CAMEL_OBJECT (correct));
+ g_object_unref (CAMEL_OBJECT (source));
+ g_object_unref (CAMEL_OBJECT (sh));
camel_test_pull ();
camel_test_pull ();
Modified: branches/camel-gobject/camel/tests/smime/pgp-mime.c
==============================================================================
--- branches/camel-gobject/camel/tests/smime/pgp-mime.c (original)
+++ branches/camel-gobject/camel/tests/smime/pgp-mime.c Mon Nov 10 00:44:12 2008
@@ -44,9 +44,9 @@
#define CAMEL_PGP_SESSION_TYPE (camel_pgp_session_get_type ())
-#define CAMEL_PGP_SESSION(obj) (CAMEL_CHECK_CAST((obj), CAMEL_PGP_SESSION_TYPE, CamelPgpSession))
-#define CAMEL_PGP_SESSION_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_PGP_SESSION_TYPE, CamelPgpSessionClass))
-#define CAMEL_PGP_IS_SESSION(o) (CAMEL_CHECK_TYPE((o), CAMEL_PGP_SESSION_TYPE))
+#define CAMEL_PGP_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_PGP_SESSION_TYPE, CamelPgpSession))
+#define CAMEL_PGP_SESSION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_PGP_SESSION_TYPE, CamelPgpSessionClass))
+#define CAMEL_PGP_IS_SESSION(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_PGP_SESSION_TYPE))
typedef struct _CamelPgpSession {
@@ -81,12 +81,12 @@
camel_session_class->get_password = get_password;
}
-static CamelType
+static GType
camel_pgp_session_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (
camel_test_session_get_type (),
"CamelPgpSession",
@@ -168,7 +168,7 @@
check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
camel_test_pull ();
- camel_object_unref (mime_part);
+ g_object_unref (mime_part);
camel_exception_clear (ex);
camel_test_push ("PGP/MIME verify");
@@ -178,7 +178,7 @@
camel_cipher_validity_free (valid);
camel_test_pull ();
- camel_object_unref (mps);
+ g_object_unref (mps);
camel_exception_clear (ex);
mime_part = camel_mime_part_new ();
@@ -196,17 +196,17 @@
camel_test_pull ();
camel_exception_clear (ex);
- camel_object_unref (mime_part);
+ g_object_unref (mime_part);
camel_test_push ("PGP/MIME decrypt");
mime_part = camel_multipart_encrypted_decrypt (mpe, ctx, ex);
check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
- camel_object_unref (mime_part);
- camel_object_unref (mpe);
+ g_object_unref (mime_part);
+ g_object_unref (mpe);
camel_test_pull ();
- camel_object_unref (CAMEL_OBJECT (ctx));
- camel_object_unref (CAMEL_OBJECT (session));
+ g_object_unref (CAMEL_OBJECT (ctx));
+ g_object_unref (CAMEL_OBJECT (session));
camel_test_end ();
Modified: branches/camel-gobject/camel/tests/smime/pgp.c
==============================================================================
--- branches/camel-gobject/camel/tests/smime/pgp.c (original)
+++ branches/camel-gobject/camel/tests/smime/pgp.c Mon Nov 10 00:44:12 2008
@@ -37,9 +37,9 @@
#include "session.h"
#define CAMEL_PGP_SESSION_TYPE (camel_pgp_session_get_type ())
-#define CAMEL_PGP_SESSION(obj) (CAMEL_CHECK_CAST((obj), CAMEL_PGP_SESSION_TYPE, CamelPgpSession))
-#define CAMEL_PGP_SESSION_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_PGP_SESSION_TYPE, CamelPgpSessionClass))
-#define CAMEL_PGP_IS_SESSION(o) (CAMEL_CHECK_TYPE((o), CAMEL_PGP_SESSION_TYPE))
+#define CAMEL_PGP_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_PGP_SESSION_TYPE, CamelPgpSession))
+#define CAMEL_PGP_SESSION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_PGP_SESSION_TYPE, CamelPgpSessionClass))
+#define CAMEL_PGP_IS_SESSION(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_PGP_SESSION_TYPE))
typedef struct _CamelPgpSession {
@@ -74,12 +74,12 @@
camel_session_class->get_password = get_password;
}
-static CamelType
+static GType
camel_pgp_session_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (
camel_test_session_get_type (),
"CamelPgpSession",
@@ -166,8 +166,8 @@
dw = camel_data_wrapper_new();
camel_data_wrapper_construct_from_stream(dw, stream1);
camel_medium_set_content_object((CamelMedium *)conpart, dw);
- camel_object_unref(stream1);
- camel_object_unref(dw);
+ g_object_unref(stream1);
+ g_object_unref(dw);
sigpart = camel_mime_part_new();
@@ -189,8 +189,8 @@
camel_cipher_validity_free (valid);
camel_test_pull ();
- camel_object_unref(conpart);
- camel_object_unref(sigpart);
+ g_object_unref(conpart);
+ g_object_unref(sigpart);
stream1 = camel_stream_mem_new ();
camel_stream_write (stream1, "Hello, I am a test of encryption/decryption.", 44);
@@ -201,8 +201,8 @@
camel_stream_reset(stream1);
camel_data_wrapper_construct_from_stream(dw, stream1);
camel_medium_set_content_object((CamelMedium *)conpart, dw);
- camel_object_unref(stream1);
- camel_object_unref(dw);
+ g_object_unref(stream1);
+ g_object_unref(dw);
encpart = camel_mime_part_new();
@@ -238,16 +238,16 @@
g_free (before);
g_free (after);
- camel_object_unref(stream1);
- camel_object_unref(stream2);
- camel_object_unref(conpart);
- camel_object_unref(encpart);
- camel_object_unref(outpart);
+ g_object_unref(stream1);
+ g_object_unref(stream2);
+ g_object_unref(conpart);
+ g_object_unref(encpart);
+ g_object_unref(outpart);
camel_test_pull ();
- camel_object_unref (CAMEL_OBJECT (ctx));
- camel_object_unref (CAMEL_OBJECT (session));
+ g_object_unref (CAMEL_OBJECT (ctx));
+ g_object_unref (CAMEL_OBJECT (session));
camel_test_end ();
Modified: branches/camel-gobject/camel/tests/smime/pkcs7.c
==============================================================================
--- branches/camel-gobject/camel/tests/smime/pkcs7.c (original)
+++ branches/camel-gobject/camel/tests/smime/pkcs7.c Mon Nov 10 00:44:12 2008
@@ -10,9 +10,9 @@
#define CAMEL_TEST_SESSION_TYPE (camel_test_session_get_type ())
-#define CAMEL_TEST_SESSION(obj) (CAMEL_CHECK_CAST((obj), CAMEL_TEST_SESSION_TYPE, CamelTestSession))
-#define CAMEL_TEST_SESSION_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TEST_SESSION_TYPE, CamelTestSessionClass))
-#define CAMEL_TEST_IS_SESSION(o) (CAMEL_CHECK_TYPE((o), CAMEL_TEST_SESSION_TYPE))
+#define CAMEL_TEST_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CAMEL_TEST_SESSION_TYPE, CamelTestSession))
+#define CAMEL_TEST_SESSION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CAMEL_TEST_SESSION_TYPE, CamelTestSessionClass))
+#define CAMEL_TEST_IS_SESSION(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), CAMEL_TEST_SESSION_TYPE))
typedef struct _CamelTestSession {
@@ -46,12 +46,12 @@
camel_session_class->get_password = get_password;
}
-static CamelType
+static GType
camel_test_session_get_type (void)
{
- static CamelType type = CAMEL_INVALID_TYPE;
+ static GType type = G_TYPE_INVALID;
- if (type == CAMEL_INVALID_TYPE) {
+ if (type == G_TYPE_INVALID) {
type = camel_type_register (
camel_test_session_get_type (),
"CamelTestSession",
@@ -133,8 +133,8 @@
camel_cipher_validity_free (valid);
camel_test_pull ();
- camel_object_unref (CAMEL_OBJECT (stream1));
- camel_object_unref (CAMEL_OBJECT (stream2));
+ g_object_unref (CAMEL_OBJECT (stream1));
+ g_object_unref (CAMEL_OBJECT (stream2));
stream1 = camel_stream_mem_new ();
stream2 = camel_stream_mem_new ();
@@ -169,8 +169,8 @@
g_free (after);
camel_test_pull ();
- camel_object_unref (CAMEL_OBJECT (ctx));
- camel_object_unref (CAMEL_OBJECT (session));
+ g_object_unref (CAMEL_OBJECT (ctx));
+ g_object_unref (CAMEL_OBJECT (session));
camel_test_end ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]