[evolution-data-server] Coding style and whitespace cleanups.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Coding style and whitespace cleanups.
- Date: Sun, 4 Sep 2011 11:48:28 +0000 (UTC)
commit bc6f55c75b100a79f441b6623d96a967bf6ab319
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Aug 12 08:51:51 2011 -0400
Coding style and whitespace cleanups.
addressbook/backends/file/e-book-backend-file.c | 205 +++--
.../google/e-book-backend-google-factory.c | 5 +-
.../backends/google/e-book-backend-google.c | 263 ++++--
.../backends/ldap/e-book-backend-ldap-factory.c | 3 +-
addressbook/backends/ldap/e-book-backend-ldap.c | 661 ++++++++------
addressbook/backends/ldap/openldap-extract.h | 30 +-
.../backends/vcf/e-book-backend-vcf-factory.c | 5 +-
addressbook/backends/vcf/e-book-backend-vcf.c | 122 ++--
.../backends/webdav/e-book-backend-webdav.c | 103 ++-
addressbook/libebook/e-address-western.c | 42 +-
addressbook/libebook/e-book-client-view.c | 34 +-
addressbook/libebook/e-book-client.c | 336 ++++++--
addressbook/libebook/e-book-query.c | 82 ++-
addressbook/libebook/e-book-query.h | 26 +-
addressbook/libebook/e-book-view.c | 26 +-
addressbook/libebook/e-book.c | 197 +++--
addressbook/libebook/e-book.h | 2 +-
addressbook/libebook/e-contact.c | 197 +++--
addressbook/libebook/e-contact.h | 28 +-
addressbook/libebook/e-destination.c | 99 ++-
addressbook/libebook/e-destination.h | 6 +-
addressbook/libebook/e-name-western.c | 69 +-
addressbook/libebook/e-vcard.c | 175 +++--
addressbook/libebook/e-vcard.h | 24 +-
addressbook/libedata-book/e-book-backend-cache.c | 19 +-
.../libedata-book/e-book-backend-db-cache.c | 25 +-
.../libedata-book/e-book-backend-db-cache.h | 6 +-
addressbook/libedata-book/e-book-backend-factory.c | 2 +-
addressbook/libedata-book/e-book-backend-factory.h | 6 +-
addressbook/libedata-book/e-book-backend-sexp.c | 202 +++--
.../libedata-book/e-book-backend-sqlitedb-test.c | 7 +-
.../libedata-book/e-book-backend-sqlitedb.c | 386 +++++----
addressbook/libedata-book/e-book-backend-summary.c | 108 ++-
addressbook/libedata-book/e-book-backend-summary.h | 6 +-
addressbook/libedata-book/e-book-backend-sync.c | 197 +++--
addressbook/libedata-book/e-book-backend.c | 173 +++--
addressbook/libedata-book/e-data-book-factory.c | 17 +-
addressbook/libedata-book/e-data-book-view.c | 71 +-
addressbook/libedata-book/e-data-book.c | 194 +++-
addressbook/libegdbus/e-gdbus-book-factory.c | 105 ++-
addressbook/libegdbus/e-gdbus-book-view.c | 171 +++-
addressbook/libegdbus/e-gdbus-book.c | 461 +++++++---
.../backends/caldav/e-cal-backend-caldav-factory.c | 7 +-
calendar/backends/caldav/e-cal-backend-caldav.c | 448 +++++++---
.../contacts/e-cal-backend-contacts-factory.c | 3 +-
.../backends/contacts/e-cal-backend-contacts.c | 170 +++-
.../backends/file/e-cal-backend-file-factory.c | 3 +-
calendar/backends/file/e-cal-backend-file.c | 333 +++++--
.../backends/http/e-cal-backend-http-factory.c | 3 +-
calendar/backends/http/e-cal-backend-http.c | 165 +++-
.../weather/e-cal-backend-weather-factory.c | 3 +-
calendar/backends/weather/e-cal-backend-weather.c | 95 ++-
calendar/backends/weather/e-weather-source-ccf.c | 31 +-
calendar/libecal/e-cal-check-timezones.c | 658 +++++++-------
calendar/libecal/e-cal-client-view.c | 44 +-
calendar/libecal/e-cal-client.c | 647 ++++++++++---
calendar/libecal/e-cal-component.c | 452 ++++++----
calendar/libecal/e-cal-recur.c | 978 ++++++++++----------
calendar/libecal/e-cal-recur.h | 2 +-
calendar/libecal/e-cal-system-timezone.c | 41 +-
calendar/libecal/e-cal-time-util.c | 66 +-
calendar/libecal/e-cal-time-util.h | 32 +-
calendar/libecal/e-cal-util.c | 110 ++-
calendar/libecal/e-cal-util.h | 4 +-
calendar/libecal/e-cal-view.c | 34 +-
calendar/libecal/e-cal.c | 411 ++++++---
calendar/libecal/e-cal.h | 8 +-
calendar/libedata-cal/e-cal-backend-cache.c | 38 +-
calendar/libedata-cal/e-cal-backend-factory.c | 7 +-
calendar/libedata-cal/e-cal-backend-factory.h | 4 +-
calendar/libedata-cal/e-cal-backend-file-store.c | 89 ++-
calendar/libedata-cal/e-cal-backend-intervaltree.c | 71 +-
calendar/libedata-cal/e-cal-backend-intervaltree.h | 4 +-
calendar/libedata-cal/e-cal-backend-sexp.c | 155 +++-
calendar/libedata-cal/e-cal-backend-store.c | 51 +-
calendar/libedata-cal/e-cal-backend-sync.c | 276 +++++-
calendar/libedata-cal/e-cal-backend-util.c | 9 +-
calendar/libedata-cal/e-cal-backend.c | 246 ++++--
calendar/libedata-cal/e-data-cal-factory.c | 29 +-
calendar/libedata-cal/e-data-cal-view.c | 81 ++-
calendar/libedata-cal/e-data-cal.c | 268 ++++--
calendar/libegdbus/e-gdbus-cal-factory.c | 116 ++-
calendar/libegdbus/e-gdbus-cal-view.c | 171 +++-
calendar/libegdbus/e-gdbus-cal.c | 654 ++++++++++---
camel/camel-address.c | 15 +-
camel/camel-block-file.c | 96 ++-
camel/camel-certdb.c | 57 +-
camel/camel-charset-map.c | 40 +-
camel/camel-cipher-context.c | 32 +-
camel/camel-cipher-context.h | 6 +-
camel/camel-data-cache.c | 32 +-
camel/camel-data-wrapper.h | 2 +-
camel/camel-db.c | 74 ++-
camel/camel-db.h | 2 +-
camel/camel-debug.c | 18 +-
camel/camel-disco-diary.c | 47 +-
camel/camel-disco-store.c | 2 +-
camel/camel-file-utils.c | 34 +-
camel/camel-filter-driver.c | 187 +++-
camel/camel-filter-search.c | 147 +++-
camel/camel-folder-search.c | 273 ++++--
camel/camel-folder-summary.c | 453 ++++++----
camel/camel-folder-summary.h | 14 +-
camel/camel-folder-thread.c | 184 +++--
camel/camel-folder-thread.h | 2 +-
camel/camel-folder.c | 37 +-
camel/camel-gpg-context.c | 139 ++--
camel/camel-html-parser.c | 38 +-
camel/camel-http-stream.c | 30 +-
camel/camel-iconv.c | 48 +-
camel/camel-index-control.c | 25 +-
camel/camel-index.c | 38 +-
camel/camel-internet-address.c | 61 +-
camel/camel-list-utils.c | 25 +-
camel/camel-lock-client.c | 6 +-
camel/camel-lock-helper.c | 8 +-
camel/camel-lock.c | 19 +-
camel/camel-mempool.c | 10 +-
camel/camel-mime-filter-basic.c | 24 +-
camel/camel-mime-filter-bestenc.c | 22 +-
camel/camel-mime-filter-canon.c | 16 +-
camel/camel-mime-filter-charset.c | 4 +-
camel/camel-mime-filter-enriched.c | 22 +-
camel/camel-mime-filter-from.c | 10 +-
camel/camel-mime-filter-gzip.c | 17 +-
camel/camel-mime-filter-index.c | 4 +-
camel/camel-mime-filter-pgp.c | 2 +-
camel/camel-mime-filter-tohtml.c | 10 +-
camel/camel-mime-filter-yenc.c | 34 +-
camel/camel-mime-filter.c | 30 +-
camel/camel-mime-message.c | 95 ++-
camel/camel-mime-parser.c | 221 +++--
camel/camel-mime-parser.h | 6 +-
camel/camel-mime-part-utils.c | 2 +-
camel/camel-mime-part.c | 6 +-
camel/camel-mime-utils.c | 494 ++++++----
camel/camel-mime-utils.h | 2 +-
camel/camel-movemail.c | 38 +-
camel/camel-msgport.c | 12 +-
camel/camel-multipart-signed.c | 16 +-
camel/camel-multipart-signed.h | 6 +-
camel/camel-net-utils.c | 30 +-
camel/camel-net-utils.h | 18 +-
camel/camel-nntp-address.c | 13 +-
camel/camel-object.c | 29 +-
camel/camel-offline-journal.c | 7 +-
camel/camel-partition-table.c | 176 ++--
camel/camel-partition-table.h | 12 +-
camel/camel-provider.c | 15 +-
camel/camel-provider.h | 2 +-
camel/camel-sasl-anonymous.c | 3 +-
camel/camel-sasl-digest-md5.c | 24 +-
camel/camel-sasl-ntlm.c | 65 +-
camel/camel-search-private.c | 87 +-
camel/camel-search-sql-sexp.c | 184 +++--
camel/camel-search-sql.c | 103 +-
camel/camel-session.c | 13 +-
camel/camel-smime-context.c | 35 +-
camel/camel-store-summary.c | 22 +-
camel/camel-store.c | 23 +-
camel/camel-stream-buffer.c | 18 +-
camel/camel-stream-filter.c | 26 +-
camel/camel-stream-fs.c | 2 +-
camel/camel-stream-mem.c | 5 +-
camel/camel-stream-null.c | 14 +-
camel/camel-stream-process.c | 20 +-
camel/camel-stream-vfs.c | 3 +-
camel/camel-string-utils.c | 16 +-
camel/camel-tcp-stream-raw.c | 27 +-
camel/camel-tcp-stream-ssl.c | 49 +-
camel/camel-text-index.c | 166 ++--
camel/camel-trie.c | 22 +-
camel/camel-uid-cache.c | 18 +-
camel/camel-url-scanner.c | 51 +-
camel/camel-url.c | 43 +-
camel/camel-utf8.c | 25 +-
camel/camel-vee-folder.c | 246 +++---
camel/camel-vee-store.c | 22 +-
camel/camel-vee-summary.c | 66 +-
camel/camel-vtrash-folder.c | 7 +-
camel/camel.c | 11 +-
camel/db-scrap-tools/db.c | 23 +-
camel/providers/imap/camel-imap-command.c | 38 +-
camel/providers/imap/camel-imap-folder.c | 198 +++--
camel/providers/imap/camel-imap-folder.h | 6 +-
camel/providers/imap/camel-imap-journal.c | 38 +-
camel/providers/imap/camel-imap-message-cache.c | 56 +-
camel/providers/imap/camel-imap-private.h | 2 +-
camel/providers/imap/camel-imap-provider.c | 9 +-
camel/providers/imap/camel-imap-search.c | 73 +-
camel/providers/imap/camel-imap-store-summary.c | 110 ++-
camel/providers/imap/camel-imap-store.c | 133 ++--
camel/providers/imap/camel-imap-store.h | 10 +-
camel/providers/imap/camel-imap-summary.c | 72 +-
camel/providers/imap/camel-imap-utils.c | 139 ++-
camel/providers/imapx/camel-imapx-conn-manager.c | 24 +-
camel/providers/imapx/camel-imapx-folder.c | 135 ++--
camel/providers/imapx/camel-imapx-provider.c | 9 +-
camel/providers/imapx/camel-imapx-server.c | 521 ++++++-----
camel/providers/imapx/camel-imapx-server.h | 8 +-
camel/providers/imapx/camel-imapx-store-summary.c | 82 ++-
camel/providers/imapx/camel-imapx-store.c | 86 ++-
camel/providers/imapx/camel-imapx-store.h | 2 +-
camel/providers/imapx/camel-imapx-stream.c | 27 +-
camel/providers/imapx/camel-imapx-summary.c | 90 ++-
camel/providers/imapx/camel-imapx-utils.c | 249 +++---
camel/providers/imapx/camel-imapx-utils.h | 4 +-
camel/providers/imapx/test-imapx.c | 3 +-
camel/providers/local/camel-local-folder.c | 22 +-
camel/providers/local/camel-local-private.c | 26 +-
camel/providers/local/camel-local-private.h | 2 +-
camel/providers/local/camel-local-provider.c | 15 +-
camel/providers/local/camel-local-store.c | 6 +-
camel/providers/local/camel-local-summary.c | 85 ++-
camel/providers/local/camel-maildir-folder.c | 6 +-
camel/providers/local/camel-maildir-store.c | 45 +-
camel/providers/local/camel-maildir-summary.c | 55 +-
camel/providers/local/camel-mbox-folder.c | 10 +-
camel/providers/local/camel-mbox-store.c | 18 +-
camel/providers/local/camel-mbox-summary.c | 94 ++-
camel/providers/local/camel-mh-folder.c | 2 +-
camel/providers/local/camel-mh-store.c | 25 +-
camel/providers/local/camel-mh-summary.c | 20 +-
camel/providers/local/camel-spool-folder.c | 2 +-
camel/providers/local/camel-spool-store.c | 7 +-
camel/providers/local/camel-spool-summary.c | 15 +-
camel/providers/nntp/camel-nntp-folder.c | 56 +-
camel/providers/nntp/camel-nntp-private.h | 2 +-
camel/providers/nntp/camel-nntp-provider.c | 9 +-
camel/providers/nntp/camel-nntp-store-summary.c | 52 +-
camel/providers/nntp/camel-nntp-store.c | 63 +-
camel/providers/nntp/camel-nntp-store.h | 6 +-
camel/providers/nntp/camel-nntp-stream.c | 24 +-
camel/providers/nntp/camel-nntp-summary.c | 43 +-
camel/providers/nntp/test-newsrc.c | 7 +-
camel/providers/pop3/camel-pop3-engine.c | 24 +-
camel/providers/pop3/camel-pop3-folder.c | 42 +-
camel/providers/pop3/camel-pop3-provider.c | 9 +-
camel/providers/pop3/camel-pop3-store.c | 10 +-
camel/providers/pop3/camel-pop3-stream.c | 24 +-
camel/providers/pop3/camel-pop3-stream.h | 2 +-
camel/providers/smtp/camel-smtp-provider.c | 9 +-
camel/providers/smtp/camel-smtp-transport.c | 30 +-
camel/tests/folder/test10.c | 7 +-
camel/tests/folder/test11.c | 15 +-
camel/tests/folder/test3.c | 43 +-
camel/tests/folder/test8.c | 21 +-
camel/tests/folder/test9.c | 4 +-
camel/tests/lib/address-data.h | 4 +-
camel/tests/lib/addresses.c | 5 +-
camel/tests/lib/camel-test-provider.c | 5 +-
camel/tests/lib/camel-test.c | 15 +-
camel/tests/lib/folders.c | 70 +-
camel/tests/lib/messages.c | 36 +-
camel/tests/message/test1.c | 35 +-
camel/tests/message/test2.c | 19 +-
camel/tests/message/test4.c | 3 +-
camel/tests/mime-filter/test-charset.c | 11 +-
camel/tests/mime-filter/test-crlf.c | 7 +-
camel/tests/mime-filter/test-tohtml.c | 17 +-
camel/tests/mime-filter/test1.c | 27 +-
camel/tests/misc/split.c | 7 +-
camel/tests/misc/test1.c | 5 +-
camel/tests/misc/test2.c | 17 +-
camel/tests/misc/url.c | 3 +-
camel/tests/misc/utf7.c | 7 +-
camel/tests/smime/pgp-mime.c | 8 +-
camel/tests/smime/pkcs7.c | 8 +-
libebackend/e-data-server-module.c | 9 +-
libebackend/e-db3-utils.c | 3 +-
libebackend/e-dbhash.c | 6 +-
libebackend/e-file-cache.c | 12 +-
libebackend/e-offline-listener.c | 5 +-
libebackend/e-sqlite3-vfs.c | 23 +-
libedataserver/e-account-list.c | 22 +-
libedataserver/e-account.c | 86 ++-
libedataserver/e-account.h | 2 +-
libedataserver/e-categories.c | 19 +-
libedataserver/e-client.c | 635 +++++++++++--
libedataserver/e-credentials.c | 71 +-
libedataserver/e-data-server-util.c | 31 +-
libedataserver/e-debug-log.c | 43 +-
libedataserver/e-flag.c | 3 +-
libedataserver/e-gdbus-templates.c | 491 ++++++++--
libedataserver/e-gdbus-templates.h | 14 +-
libedataserver/e-iterator.c | 23 +-
libedataserver/e-list-iterator.c | 22 +-
libedataserver/e-list.c | 28 +-
libedataserver/e-memory.c | 29 +-
libedataserver/e-operation-pool.c | 16 +-
libedataserver/e-proxy.c | 79 +-
libedataserver/e-sexp.c | 399 +++++----
libedataserver/e-sexp.h | 4 +-
libedataserver/e-source-group.c | 69 +-
libedataserver/e-source-list.c | 33 +-
libedataserver/e-source.c | 21 +-
libedataserver/e-time-utils.c | 172 ++--
libedataserver/e-url.c | 23 +-
libedataserver/e-xml-hash-utils.c | 17 +-
libedataserverui/e-book-auth-util.c | 31 +-
libedataserverui/e-categories-selector.c | 2 +-
libedataserverui/e-category-completion.c | 4 +-
libedataserverui/e-client-utils.c | 120 ++-
libedataserverui/e-contact-store.c | 134 ++-
libedataserverui/e-destination-store.c | 75 +-
libedataserverui/e-name-selector-dialog.c | 109 ++-
libedataserverui/e-name-selector-entry.c | 255 ++++--
libedataserverui/e-name-selector-list.c | 59 +-
libedataserverui/e-name-selector-model.c | 42 +-
libedataserverui/e-name-selector.c | 17 +-
libedataserverui/e-passwords-win32.c | 29 +-
libedataserverui/e-passwords.c | 13 +-
libedataserverui/e-passwords.h | 16 +-
libedataserverui/e-source-combo-box.c | 3 +-
libedataserverui/e-source-selector-dialog.c | 13 +-
libedataserverui/e-source-selector.c | 49 +-
libedataserverui/e-tree-model-generator.c | 106 ++-
tests/libebook/client/client-test-utils.c | 47 +-
tests/libebook/client/test-client-add-contact.c | 7 +-
tests/libebook/client/test-client-async.c | 19 +-
tests/libebook/client/test-client-examine.c | 22 +-
tests/libebook/client/test-client-get-contact.c | 7 +-
tests/libebook/client/test-client-get-view.c | 16 +-
tests/libebook/client/test-client-modify-contact.c | 11 +-
tests/libebook/client/test-client-nonexistent-id.c | 3 +-
tests/libebook/client/test-client-refresh.c | 7 +-
.../client/test-client-remove-contact-by-uid.c | 7 +-
tests/libebook/client/test-client-remove-contact.c | 7 +-
.../libebook/client/test-client-remove-contacts.c | 13 +-
tests/libebook/client/test-client-remove.c | 7 +-
tests/libebook/client/test-client-revision-view.c | 18 +-
tests/libebook/client/test-client-search.c | 3 +-
tests/libebook/client/test-client-self.c | 3 +-
.../client/test-client-stress-factory--fifo.c | 3 +-
.../client/test-client-stress-factory--serial.c | 3 +-
.../test-client-stress-factory--single-book.c | 3 +-
tests/libebook/client/test-client-stress-views.c | 15 +-
tests/libebook/client/test-client-uid-only-view.c | 18 +-
tests/libebook/client/test-client.c | 3 +-
tests/libebook/ebook-test-utils.c | 178 ++--
tests/libebook/ebook-test-utils.h | 12 +-
tests/libebook/test-categories.c | 3 +-
tests/libebook/test-changes.c | 13 +-
tests/libebook/test-date.c | 3 +-
tests/libebook/test-ebook-add-contact.c | 3 +-
tests/libebook/test-ebook-async.c | 17 +-
tests/libebook/test-ebook-commit-contact.c | 5 +-
tests/libebook/test-ebook-get-book-view.c | 19 +-
tests/libebook/test-ebook-get-contact.c | 3 +-
tests/libebook/test-ebook-get-required-fields.c | 9 +-
.../libebook/test-ebook-get-static-capabilities.c | 3 +-
.../test-ebook-get-supported-auth-methods.c | 9 +-
tests/libebook/test-ebook-get-supported-fields.c | 9 +-
tests/libebook/test-ebook-remove-contact-by-id.c | 3 +-
tests/libebook/test-ebook-remove-contact.c | 3 +-
tests/libebook/test-ebook-remove-contacts.c | 3 +-
tests/libebook/test-ebook-remove.c | 3 +-
tests/libebook/test-ebook-stress-factory--fifo.c | 3 +-
tests/libebook/test-ebook-stress-factory--serial.c | 3 +-
.../test-ebook-stress-factory--single-book.c | 5 +-
tests/libebook/test-ebook.c | 3 +-
tests/libebook/test-photo.c | 3 +-
tests/libebook/test-query.c | 3 +-
tests/libebook/test-search.c | 3 +-
tests/libebook/test-self.c | 3 +-
tests/libebook/test-stress-bookviews.c | 17 +-
tests/libebook/test-string.c | 3 +-
tests/libebook/test-undefinedfield.c | 3 +-
tests/libebook/test-untyped-phones.c | 26 +-
tests/libebook/vcard/dump-vcard.c | 3 +-
tests/libecal/client/client-test-utils.c | 45 +-
tests/libecal/client/test-client-add-timezone.c | 14 +-
tests/libecal/client/test-client-create-object.c | 18 +-
tests/libecal/client/test-client-examine.c | 35 +-
.../client/test-client-get-attachment-uris.c | 10 +-
tests/libecal/client/test-client-get-free-busy.c | 11 +-
tests/libecal/client/test-client-get-object-list.c | 11 +-
tests/libecal/client/test-client-get-view.c | 23 +-
tests/libecal/client/test-client-modify-object.c | 7 +-
tests/libecal/client/test-client-open.c | 11 +-
tests/libecal/client/test-client-receive-objects.c | 7 +-
tests/libecal/client/test-client-refresh.c | 7 +-
tests/libecal/client/test-client-remove-object.c | 7 +-
tests/libecal/client/test-client-send-objects.c | 10 +-
.../client/test-client-stress-factory--fifo.c | 3 +-
.../client/test-client-stress-factory--serial.c | 3 +-
.../test-client-stress-factory--single-cal.c | 3 +-
tests/libecal/client/test-client-stress-views.c | 15 +-
tests/libecal/ecal-test-utils.c | 146 ++--
tests/libecal/ecal-test-utils.h | 18 +-
tests/libecal/test-ecal-add-timezone.c | 3 +-
tests/libecal/test-ecal-create-object--2.c | 3 +-
tests/libecal/test-ecal-create-object.c | 3 +-
tests/libecal/test-ecal-get-alarm-email-address.c | 3 +-
tests/libecal/test-ecal-get-cal-address.c | 3 +-
tests/libecal/test-ecal-get-capabilities.c | 3 +-
tests/libecal/test-ecal-get-default-object.c | 3 +-
tests/libecal/test-ecal-get-free-busy.c | 3 +-
tests/libecal/test-ecal-get-ldap-attribute.c | 3 +-
tests/libecal/test-ecal-get-object-list.c | 3 +-
tests/libecal/test-ecal-get-objects-for-uid.c | 3 +-
tests/libecal/test-ecal-get-query.c | 20 +-
tests/libecal/test-ecal-get-timezone.c | 3 +-
tests/libecal/test-ecal-modify-object.c | 3 +-
tests/libecal/test-ecal-open.c | 5 +-
tests/libecal/test-ecal-receive-objects.c | 3 +-
tests/libecal/test-ecal-remove-object.c | 3 +-
tests/libecal/test-ecal-remove.c | 3 +-
tests/libecal/test-ecal-send-objects.c | 3 +-
tests/libecal/test-ecal-set-default-timezone.c | 3 +-
tests/libecal/test-ecal-set-mode.c | 5 +-
tests/libecal/test-ecal-stress-factory--fifo.c | 3 +-
.../libecal/test-ecal-stress-factory--open-async.c | 5 +-
tests/libecal/test-ecal-stress-factory--serial.c | 3 +-
.../libecal/test-ecal-stress-factory--single-cal.c | 5 +-
tests/libecal/test-ecal.c | 99 ++-
tests/libecal/test-recur.c | 3 +-
tests/libecal/test-search.c | 3 +-
tests/libedata-cal/test-cal-backend-sexp.c | 2 +-
tests/libedata-cal/test-intervaltree.c | 75 +-
tests/libedataserver/test-source-list.c | 14 +-
tests/libedataserverui/test-category-completion.c | 3 +-
tests/libedataserverui/test-client-examine-auth.c | 28 +-
tests/libedataserverui/test-contact-store.c | 6 +-
tests/libedataserverui/test-name-selector.c | 7 +-
tests/libedataserverui/test-source-combo-box.c | 3 +-
tests/libedataserverui/test-source-selector.c | 7 +-
427 files changed, 16277 insertions(+), 8920 deletions(-)
---
diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c
index 17eff14..596a902 100644
--- a/addressbook/backends/file/e-book-backend-file.c
+++ b/addressbook/backends/file/e-book-backend-file.c
@@ -95,7 +95,8 @@ static struct {
} global_env;
static void
-db_error_to_gerror (const gint db_error, GError **perror)
+db_error_to_gerror (const gint db_error,
+ GError **perror)
{
if (db_error && perror && *perror)
g_clear_error (perror);
@@ -116,7 +117,8 @@ db_error_to_gerror (const gint db_error, GError **perror)
}
static void
-string_to_dbt (const gchar *str, DBT *dbt)
+string_to_dbt (const gchar *str,
+ DBT *dbt)
{
memset (dbt, 0, sizeof (*dbt));
dbt->data = (gpointer) str;
@@ -125,7 +127,8 @@ string_to_dbt (const gchar *str, DBT *dbt)
}
static gboolean
-remove_file (const gchar *filename, GError **error)
+remove_file (const gchar *filename,
+ GError **error)
{
if (-1 == g_unlink (filename)) {
if (errno == EACCES || errno == EPERM) {
@@ -144,7 +147,7 @@ remove_file (const gchar *filename, GError **error)
static gboolean
create_directory (const gchar *dirname,
- GError **error)
+ GError **error)
{
gint rv;
@@ -163,8 +166,9 @@ create_directory (const gchar *dirname,
return TRUE;
}
-static EContact*
-create_contact (const gchar *uid, const gchar *vcard)
+static EContact *
+create_contact (const gchar *uid,
+ const gchar *vcard)
{
EContact *contact = e_contact_new_from_vcard (vcard);
if (!e_contact_get_const (contact, E_CONTACT_UID))
@@ -175,8 +179,8 @@ create_contact (const gchar *uid, const gchar *vcard)
static gchar *
load_vcard (EBookBackendFile *bf,
- const gchar *uid,
- GError **error)
+ const gchar *uid,
+ GError **error)
{
DB *db = bf->priv->file_db;
DBT id_dbt, vcard_dbt;
@@ -269,8 +273,8 @@ static gchar *
e_book_backend_file_create_unique_id (void)
{
/* use a 32 counter and the 32 bit timestamp to make an id.
- it's doubtful 2^32 id's will be created in a second, so we
- should be okay. */
+ * it's doubtful 2^32 id's will be created in a second, so we
+ * should be okay. */
static guint c = 0;
return g_strdup_printf (PAS_ID_PREFIX "%08lX%08X", time(NULL), c++);
}
@@ -291,10 +295,10 @@ set_revision (EContact *contact)
}
static gboolean
-do_create (EBookBackendFile *bf,
- const gchar *vcard_req,
- EContact **contact,
- GError **perror)
+do_create (EBookBackendFile *bf,
+ const gchar *vcard_req,
+ EContact **contact,
+ GError **perror)
{
DB *db = bf->priv->file_db;
DBT id_dbt, vcard_dbt;
@@ -349,11 +353,11 @@ do_create (EBookBackendFile *bf,
static void
e_book_backend_file_create_contact (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- const gchar *vcard,
- EContact **contact,
- GError **perror)
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *vcard,
+ EContact **contact,
+ GError **perror)
{
EBookBackendFile *bf = E_BOOK_BACKEND_FILE (backend);
@@ -371,11 +375,11 @@ e_book_backend_file_create_contact (EBookBackendSync *backend,
static void
e_book_backend_file_remove_contacts (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- const GSList *id_list,
- GSList **ids,
- GError **perror)
+ EDataBook *book,
+ GCancellable *cancellable,
+ const GSList *id_list,
+ GSList **ids,
+ GError **perror)
{
EBookBackendFile *bf = E_BOOK_BACKEND_FILE (backend);
DB *db = bf->priv->file_db;
@@ -425,11 +429,11 @@ e_book_backend_file_remove_contacts (EBookBackendSync *backend,
static void
e_book_backend_file_modify_contact (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- const gchar *vcard,
- EContact **contact,
- GError **perror)
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *vcard,
+ EContact **contact,
+ GError **perror)
{
EBookBackendFile *bf = E_BOOK_BACKEND_FILE (backend);
DB *db = bf->priv->file_db;
@@ -456,10 +460,10 @@ e_book_backend_file_modify_contact (EBookBackendSync *backend,
vcard_with_rev = e_vcard_to_string (E_VCARD (*contact), EVC_FORMAT_VCARD_30);
/* This is disgusting, but for a time cards were added with
- ID's that are no longer used (they contained both the uri
- and the id.) If we recognize it as a uri (file:///...) trim
- off everything before the last '/', and use that as the
- id.*/
+ * ID's that are no longer used (they contained both the uri
+ * and the id.) If we recognize it as a uri (file:///...) trim
+ * off everything before the last '/', and use that as the
+ * id.*/
if (!strncmp (id, "file:///", strlen ("file:///"))) {
lookup_id = strrchr (id, '/') + 1;
}
@@ -500,11 +504,11 @@ e_book_backend_file_modify_contact (EBookBackendSync *backend,
static void
e_book_backend_file_get_contact (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- const gchar *id,
- gchar **vcard,
- GError **perror)
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *id,
+ gchar **vcard,
+ GError **perror)
{
EBookBackendFile *bf = E_BOOK_BACKEND_FILE (backend);
@@ -521,11 +525,11 @@ e_book_backend_file_get_contact (EBookBackendSync *backend,
static void
e_book_backend_file_get_contact_list (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- const gchar *query,
- GSList **contacts,
- GError **perror)
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *query,
+ GSList **contacts,
+ GError **perror)
{
EBookBackendFile *bf = E_BOOK_BACKEND_FILE (backend);
DB *db = bf->priv->file_db;
@@ -643,11 +647,11 @@ e_book_backend_file_get_contact_list (EBookBackendSync *backend,
static void
e_book_backend_file_get_contact_list_uids (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- const gchar *query,
- GSList **contacts_uids,
- GError **perror)
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *query,
+ GSList **contacts_uids,
+ GError **perror)
{
EBookBackendFile *bf = E_BOOK_BACKEND_FILE (backend);
DB *db = bf->priv->file_db;
@@ -744,8 +748,9 @@ closure_destroy (FileBackendSearchClosure *closure)
g_free (closure);
}
-static FileBackendSearchClosure*
-init_closure (EDataBookView *book_view, EBookBackendFile *bf)
+static FileBackendSearchClosure *
+init_closure (EDataBookView *book_view,
+ EBookBackendFile *bf)
{
FileBackendSearchClosure *closure = g_new (FileBackendSearchClosure, 1);
@@ -759,7 +764,7 @@ init_closure (EDataBookView *book_view, EBookBackendFile *bf)
return closure;
}
-static FileBackendSearchClosure*
+static FileBackendSearchClosure *
get_closure (EDataBookView *book_view)
{
return g_object_get_data (G_OBJECT (book_view), "EBookBackendFile.BookView::closure");
@@ -767,9 +772,9 @@ get_closure (EDataBookView *book_view)
static void
notify_update_vcard (EDataBookView *book_view,
- gboolean prefiltered,
- const gchar *id,
- gchar *vcard)
+ gboolean prefiltered,
+ const gchar *id,
+ gchar *vcard)
{
if (prefiltered)
e_data_book_view_notify_update_prefiltered_vcard (book_view, id, vcard);
@@ -806,7 +811,7 @@ book_view_thread (gpointer data)
d(printf ("starting initial population of book view\n"));
/* ref the book view because it'll be removed and unrefed
- when/if it's stopped */
+ * when/if it's stopped */
e_data_book_view_ref (book_view);
db = bf->priv->file_db;
@@ -919,8 +924,8 @@ book_view_thread (gpointer data)
}
static void
-e_book_backend_file_start_book_view (EBookBackend *backend,
- EDataBookView *book_view)
+e_book_backend_file_start_book_view (EBookBackend *backend,
+ EDataBookView *book_view)
{
FileBackendSearchClosure *closure = init_closure (book_view, E_BOOK_BACKEND_FILE (backend));
@@ -934,8 +939,8 @@ e_book_backend_file_start_book_view (EBookBackend *backend,
}
static void
-e_book_backend_file_stop_book_view (EBookBackend *backend,
- EDataBookView *book_view)
+e_book_backend_file_stop_book_view (EBookBackend *backend,
+ EDataBookView *book_view)
{
FileBackendSearchClosure *closure = get_closure (book_view);
gboolean need_join;
@@ -997,9 +1002,9 @@ e_book_backend_file_extract_path_from_source (ESource *source)
static void
e_book_backend_file_authenticate_user (EBookBackendSync *backend,
- GCancellable *cancellable,
- ECredentials *credentials,
- GError **perror)
+ GCancellable *cancellable,
+ ECredentials *credentials,
+ GError **perror)
{
/* Success */
}
@@ -1017,7 +1022,8 @@ e_book_backend_file_authenticate_user (EBookBackendSync *backend,
** came about.
*/
static gboolean
-e_book_backend_file_upgrade_db (EBookBackendFile *bf, gchar *old_version)
+e_book_backend_file_upgrade_db (EBookBackendFile *bf,
+ gchar *old_version)
{
DB *db = bf->priv->file_db;
gint db_error;
@@ -1037,7 +1043,7 @@ e_book_backend_file_upgrade_db (EBookBackendFile *bf, gchar *old_version)
if (!strcmp (old_version, "0.1")) {
/* we just loop through all the cards in the db,
- giving them valid ids if they don't have them */
+ * giving them valid ids if they don't have them */
DBT id_dbt, vcard_dbt;
DBC *dbc;
gint card_failed = 0;
@@ -1061,11 +1067,11 @@ e_book_backend_file_upgrade_db (EBookBackendFile *bf, gchar *old_version)
contact = create_contact (id_dbt.data, vcard_dbt.data);
/* the cards we're looking for are
- created with a normal id dbt, but
- with the id field in the vcard set
- to something that doesn't match.
- so, we need to modify the card to
- have the same id as the the dbt. */
+ * created with a normal id dbt, but
+ * with the id field in the vcard set
+ * to something that doesn't match.
+ * so, we need to modify the card to
+ * have the same id as the the dbt. */
if (strcmp (id_dbt.data, e_contact_get_const (contact, E_CONTACT_UID))) {
gchar *vcard;
@@ -1149,20 +1155,23 @@ e_book_backend_file_maybe_upgrade_db (EBookBackendFile *bf)
static void
#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3
-file_errcall (const DB_ENV *env, const gchar *buf1, const gchar *buf2)
+file_errcall (const DB_ENV *env,
+ const gchar *buf1,
+ const gchar *buf2)
#else
-file_errcall (const gchar *buf1, gchar *buf2)
+file_errcall (const gchar *buf1,
+ gchar *buf2)
#endif
{
g_warning ("libdb error: %s", buf2);
}
static void
-e_book_backend_file_open (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- gboolean only_if_exists,
- GError **perror)
+e_book_backend_file_open (EBookBackendSync *backend,
+ EDataBook *book,
+ GCancellable *cancellable,
+ gboolean only_if_exists,
+ GError **perror)
{
EBookBackendFile *bf = E_BOOK_BACKEND_FILE (backend);
gchar *dirname, *filename;
@@ -1293,7 +1302,7 @@ e_book_backend_file_open (EBookBackendSync *backend,
if (db_error != 0 && !only_if_exists) {
/* the database didn't exist, so we create the
- directory then the .db */
+ * directory then the .db */
db->close (db, 0);
if (!create_directory (dirname, perror)) {
@@ -1408,9 +1417,9 @@ select_changes (const gchar *name)
static void
e_book_backend_file_remove (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- GError **perror)
+ EDataBook *book,
+ GCancellable *cancellable,
+ GError **perror)
{
EBookBackendFile *bf = E_BOOK_BACKEND_FILE (backend);
GDir *dir;
@@ -1446,14 +1455,19 @@ e_book_backend_file_remove (EBookBackendSync *backend,
g_warning ("failed to remove directory `%s`: %s", bf->priv->dirname, g_strerror (errno));
/* we may not have actually succeeded in removing the
- backend's files/dirs, but there's nothing we can do about
- it here.. the only time we should return failure is if we
- failed to remove the actual data. a failure should mean
- that the addressbook is still valid */
+ * backend's files/dirs, but there's nothing we can do about
+ * it here.. the only time we should return failure is if we
+ * failed to remove the actual data. a failure should mean
+ * that the addressbook is still valid */
}
static gboolean
-e_book_backend_file_get_backend_property (EBookBackendSync *backend, EDataBook *book, GCancellable *cancellable, const gchar *prop_name, gchar **prop_value, GError **error)
+e_book_backend_file_get_backend_property (EBookBackendSync *backend,
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ gchar **prop_value,
+ GError **error)
{
gboolean processed = TRUE;
@@ -1469,7 +1483,7 @@ e_book_backend_file_get_backend_property (EBookBackendSync *backend, EDataBook *
gint i;
/* XXX we need a way to say "we support everything", since the
- file backend does */
+ * file backend does */
for (i = 1; i < E_CONTACT_FIELD_LAST; i++)
fields = g_slist_append (fields, (gpointer) e_contact_field_name (i));
@@ -1485,7 +1499,8 @@ e_book_backend_file_get_backend_property (EBookBackendSync *backend, EDataBook *
}
static void
-e_book_backend_file_set_online (EBookBackend *backend, gboolean is_online)
+e_book_backend_file_set_online (EBookBackend *backend,
+ gboolean is_online)
{
if (e_book_backend_is_opened (backend))
e_book_backend_notify_online (backend, TRUE);
@@ -1512,7 +1527,8 @@ typedef struct {
} NotifyData;
static gboolean
-view_notify_update (EDataBookView *view, gpointer data)
+view_notify_update (EDataBookView *view,
+ gpointer data)
{
NotifyData *ndata = data;
GHashTable *fields = e_data_book_view_get_fields_of_interest (view);
@@ -1547,7 +1563,8 @@ view_notify_update (EDataBookView *view, gpointer data)
}
static void
-e_book_backend_file_notify_update (EBookBackend *backend, const EContact *contact)
+e_book_backend_file_notify_update (EBookBackend *backend,
+ const EContact *contact)
{
NotifyData data = { (EContact *) contact, E_BOOK_BACKEND_FILE (backend) };
@@ -1612,7 +1629,9 @@ e_book_backend_file_finalize (GObject *object)
*/
static gint
-my_open (const gchar *name, gint oflag, ...)
+my_open (const gchar *name,
+ gint oflag,
+ ...)
{
gint mode = 0;
@@ -1627,13 +1646,15 @@ my_open (const gchar *name, gint oflag, ...)
}
gint
-my_rename (const gchar *oldname, const gchar *newname)
+my_rename (const gchar *oldname,
+ const gchar *newname)
{
return g_rename (oldname, newname);
}
gint
-my_exists (const gchar *name, gint *isdirp)
+my_exists (const gchar *name,
+ gint *isdirp)
{
if (!g_file_test (name, G_FILE_TEST_EXISTS))
return ENOENT;
diff --git a/addressbook/backends/google/e-book-backend-google-factory.c b/addressbook/backends/google/e-book-backend-google-factory.c
index 2185ba6..7093806 100644
--- a/addressbook/backends/google/e-book-backend-google-factory.c
+++ b/addressbook/backends/google/e-book-backend-google-factory.c
@@ -36,12 +36,13 @@ eds_module_initialize (GTypeModule *module)
}
void
-eds_module_shutdown (void)
+eds_module_shutdown (void)
{
}
void
-eds_module_list_types (const GType **types, gint *num_types)
+eds_module_list_types (const GType **types,
+ gint *num_types)
{
*types = &google_type;
*num_types = 1;
diff --git a/addressbook/backends/google/e-book-backend-google.c b/addressbook/backends/google/e-book-backend-google.c
index f7e1f19..b84d1df 100644
--- a/addressbook/backends/google/e-book-backend-google.c
+++ b/addressbook/backends/google/e-book-backend-google.c
@@ -112,7 +112,8 @@ static void _e_contact_remove_gdata_entry_xml (EContact *contact);
static const gchar *_e_contact_get_gdata_entry_xml (EContact *contact, const gchar **edit_uri);
static void
-cache_init (EBookBackend *backend, gboolean on_disk)
+cache_init (EBookBackend *backend,
+ gboolean on_disk)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
const gchar *cache_dir;
@@ -135,7 +136,8 @@ cache_init (EBookBackend *backend, gboolean on_disk)
}
static EContact *
-cache_add_contact (EBookBackend *backend, GDataEntry *entry)
+cache_add_contact (EBookBackend *backend,
+ GDataEntry *entry)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
EContact *contact;
@@ -163,7 +165,8 @@ cache_add_contact (EBookBackend *backend, GDataEntry *entry)
}
static gboolean
-cache_remove_contact (EBookBackend *backend, const gchar *uid)
+cache_remove_contact (EBookBackend *backend,
+ const gchar *uid)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
gboolean success = TRUE;
@@ -183,7 +186,8 @@ cache_remove_contact (EBookBackend *backend, const gchar *uid)
}
static gboolean
-cache_has_contact (EBookBackend *backend, const gchar *uid)
+cache_has_contact (EBookBackend *backend,
+ const gchar *uid)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
@@ -201,7 +205,9 @@ cache_has_contact (EBookBackend *backend, const gchar *uid)
}
static EContact *
-cache_get_contact (EBookBackend *backend, const gchar *uid, GDataEntry **entry)
+cache_get_contact (EBookBackend *backend,
+ const gchar *uid,
+ GDataEntry **entry)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
EContact *contact;
@@ -324,7 +330,8 @@ cache_get_last_update (EBookBackend *backend)
}
static gboolean
-cache_get_last_update_tv (EBookBackend *backend, GTimeVal *tv)
+cache_get_last_update_tv (EBookBackend *backend,
+ GTimeVal *tv)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
gchar *last_update;
@@ -348,7 +355,8 @@ cache_get_last_update_tv (EBookBackend *backend, GTimeVal *tv)
}
static void
-cache_set_last_update (EBookBackend *backend, GTimeVal *tv)
+cache_set_last_update (EBookBackend *backend,
+ GTimeVal *tv)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
gchar *_time;
@@ -370,7 +378,8 @@ cache_set_last_update (EBookBackend *backend, GTimeVal *tv)
}
static gboolean
-cache_needs_update (EBookBackend *backend, guint *remaining_secs)
+cache_needs_update (EBookBackend *backend,
+ guint *remaining_secs)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
GTimeVal last, current;
@@ -436,7 +445,8 @@ backend_is_authorized (EBookBackend *backend)
}
static void
-on_contact_added (EBookBackend *backend, EContact *contact)
+on_contact_added (EBookBackend *backend,
+ EContact *contact)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
GList *iter;
@@ -449,7 +459,8 @@ on_contact_added (EBookBackend *backend, EContact *contact)
}
static void
-on_contact_removed (EBookBackend *backend, const gchar *uid)
+on_contact_removed (EBookBackend *backend,
+ const gchar *uid)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
GList *iter;
@@ -462,7 +473,8 @@ on_contact_removed (EBookBackend *backend, const gchar *uid)
}
static void
-on_contact_changed (EBookBackend *backend, EContact *contact)
+on_contact_changed (EBookBackend *backend,
+ EContact *contact)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
GList *iter;
@@ -475,7 +487,10 @@ on_contact_changed (EBookBackend *backend, EContact *contact)
}
static GCancellable *
-start_operation (EBookBackend *backend, guint32 opid, GCancellable *cancellable, const gchar *message)
+start_operation (EBookBackend *backend,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *message)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
GList *iter;
@@ -495,7 +510,9 @@ start_operation (EBookBackend *backend, guint32 opid, GCancellable *cancellable,
}
static void
-finish_operation (EBookBackend *backend, guint32 opid, const GError *gdata_error)
+finish_operation (EBookBackend *backend,
+ guint32 opid,
+ const GError *gdata_error)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
GError *book_error = NULL;
@@ -517,7 +534,8 @@ finish_operation (EBookBackend *backend, guint32 opid, const GError *gdata_error
}
static void
-process_contact_finish (EBookBackend *backend, GDataEntry *entry)
+process_contact_finish (EBookBackend *backend,
+ GDataEntry *entry)
{
EContact *new_contact;
gboolean was_cached;
@@ -579,7 +597,8 @@ typedef struct {
} PhotoData;
static void
-process_contact_photo_cancelled_cb (GCancellable *parent_cancellable, GCancellable *photo_cancellable)
+process_contact_photo_cancelled_cb (GCancellable *parent_cancellable,
+ GCancellable *photo_cancellable)
{
__debug__ (G_STRFUNC);
@@ -587,7 +606,9 @@ process_contact_photo_cancelled_cb (GCancellable *parent_cancellable, GCancellab
}
static void
-process_contact_photo_cb (GDataContactsContact *gdata_contact, GAsyncResult *async_result, PhotoData *data)
+process_contact_photo_cb (GDataContactsContact *gdata_contact,
+ GAsyncResult *async_result,
+ PhotoData *data)
{
EBookBackend *backend = data->parent_data->backend;
guint8 *photo_data = NULL;
@@ -637,7 +658,10 @@ process_contact_photo_cb (GDataContactsContact *gdata_contact, GAsyncResult *asy
#endif /* HAVE_LIBGDATA_0_9 */
static void
-process_contact_cb (GDataEntry *entry, guint entry_key, guint entry_count, GetContactsData *data)
+process_contact_cb (GDataEntry *entry,
+ guint entry_key,
+ guint entry_count,
+ GetContactsData *data)
{
EBookBackend *backend = data->backend;
gboolean is_deleted, is_cached;
@@ -723,7 +747,9 @@ process_contact_cb (GDataEntry *entry, guint entry_key, guint entry_count, GetCo
}
static void
-get_new_contacts_cb (GDataService *service, GAsyncResult *result, GetContactsData *data)
+get_new_contacts_cb (GDataService *service,
+ GAsyncResult *result,
+ GetContactsData *data)
{
EBookBackend *backend = data->backend;
GDataFeed *feed;
@@ -850,7 +876,10 @@ sanitise_group_name (GDataEntry *group)
}
static void
-process_group (GDataEntry *entry, guint entry_key, guint entry_count, EBookBackend *backend)
+process_group (GDataEntry *entry,
+ guint entry_key,
+ guint entry_count,
+ EBookBackend *backend)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
const gchar *uid;
@@ -877,7 +906,9 @@ process_group (GDataEntry *entry, guint entry_key, guint entry_count, EBookBacke
}
static void
-get_groups_cb (GDataService *service, GAsyncResult *result, EBookBackend *backend)
+get_groups_cb (GDataService *service,
+ GAsyncResult *result,
+ EBookBackend *backend)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
GDataFeed *feed;
@@ -939,7 +970,9 @@ get_groups (EBookBackend *backend)
}
static gchar *
-create_group (EBookBackend *backend, const gchar *category_name, GError **error)
+create_group (EBookBackend *backend,
+ const gchar *category_name,
+ GError **error)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
GDataEntry *group, *new_group;
@@ -1136,7 +1169,9 @@ typedef struct {
} CreateContactData;
static void
-create_contact_finish (CreateContactData *data, GDataContactsContact *new_contact, const GError *gdata_error)
+create_contact_finish (CreateContactData *data,
+ GDataContactsContact *new_contact,
+ const GError *gdata_error)
{
EContact *e_contact;
@@ -1176,7 +1211,9 @@ create_contact_finish (CreateContactData *data, GDataContactsContact *new_contac
#ifdef HAVE_LIBGDATA_0_9
static void
-create_contact_photo_query_cb (GDataService *service, GAsyncResult *async_result, CreateContactData *data)
+create_contact_photo_query_cb (GDataService *service,
+ GAsyncResult *async_result,
+ CreateContactData *data)
{
GDataEntry *queried_contact;
EContactPhoto *photo;
@@ -1216,7 +1253,9 @@ finish:
}
static void
-create_contact_photo_cb (GDataContactsContact *contact, GAsyncResult *async_result, CreateContactData *data)
+create_contact_photo_cb (GDataContactsContact *contact,
+ GAsyncResult *async_result,
+ CreateContactData *data)
{
GError *gdata_error = NULL;
@@ -1248,7 +1287,9 @@ create_contact_photo_cb (GDataContactsContact *contact, GAsyncResult *async_resu
#endif /* HAVE_LIBGDATA_0_9 */
static void
-create_contact_cb (GDataService *service, GAsyncResult *result, CreateContactData *data)
+create_contact_cb (GDataService *service,
+ GAsyncResult *result,
+ CreateContactData *data)
{
GError *gdata_error = NULL;
GDataEntry *new_contact;
@@ -1296,7 +1337,11 @@ finish:
* operation responded to in create_contact_photo_query_cb().
*/
static void
-e_book_backend_google_create_contact (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *vcard_str)
+e_book_backend_google_create_contact (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *vcard_str)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
EContact *contact;
@@ -1353,7 +1398,9 @@ typedef struct {
} RemoveContactData;
static void
-remove_contact_cb (GDataService *service, GAsyncResult *result, RemoveContactData *data)
+remove_contact_cb (GDataService *service,
+ GAsyncResult *result,
+ RemoveContactData *data)
{
GError *gdata_error = NULL;
gboolean success;
@@ -1387,7 +1434,11 @@ finish:
}
static void
-e_book_backend_google_remove_contacts (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const GSList *id_list)
+e_book_backend_google_remove_contacts (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const GSList *id_list)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
const gchar *uid = id_list->data;
@@ -1463,7 +1514,9 @@ typedef struct {
} ModifyContactData;
static void
-modify_contact_finish (ModifyContactData *data, GDataContactsContact *new_contact, const GError *gdata_error)
+modify_contact_finish (ModifyContactData *data,
+ GDataContactsContact *new_contact,
+ const GError *gdata_error)
{
EContact *e_contact;
@@ -1502,7 +1555,9 @@ modify_contact_finish (ModifyContactData *data, GDataContactsContact *new_contac
#ifdef HAVE_LIBGDATA_0_9
static void
-modify_contact_photo_query_cb (GDataService *service, GAsyncResult *async_result, ModifyContactData *data)
+modify_contact_photo_query_cb (GDataService *service,
+ GAsyncResult *async_result,
+ ModifyContactData *data)
{
GDataEntry *queried_contact;
EContactPhoto *photo;
@@ -1542,7 +1597,9 @@ finish:
}
static void
-modify_contact_photo_cb (GDataContactsContact *contact, GAsyncResult *async_result, ModifyContactData *data)
+modify_contact_photo_cb (GDataContactsContact *contact,
+ GAsyncResult *async_result,
+ ModifyContactData *data)
{
GError *gdata_error = NULL;
@@ -1578,7 +1635,9 @@ modify_contact_photo_cb (GDataContactsContact *contact, GAsyncResult *async_resu
#endif /* HAVE_LIBGDATA_0_9 */
static void
-modify_contact_cb (GDataService *service, GAsyncResult *result, ModifyContactData *data)
+modify_contact_cb (GDataService *service,
+ GAsyncResult *result,
+ ModifyContactData *data)
{
GDataEntry *new_contact;
GError *gdata_error = NULL;
@@ -1648,7 +1707,11 @@ finish:
* operation responded to in modify_contact_photo_query_cb().
*/
static void
-e_book_backend_google_modify_contact (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *vcard_str)
+e_book_backend_google_modify_contact (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *vcard_str)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
EContact *contact, *cached_contact;
@@ -1754,7 +1817,11 @@ e_book_backend_google_modify_contact (EBookBackend *backend, EDataBook *book, gu
}
static void
-e_book_backend_google_get_contact (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *uid)
+e_book_backend_google_get_contact (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *uid)
{
EContact *contact;
gchar *vcard_str;
@@ -1778,7 +1845,11 @@ e_book_backend_google_get_contact (EBookBackend *backend, EDataBook *book, guint
}
static void
-e_book_backend_google_get_contact_list (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *query)
+e_book_backend_google_get_contact_list (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *query)
{
EBookBackendSExp *sexp;
GList *all_contacts;
@@ -1811,7 +1882,11 @@ e_book_backend_google_get_contact_list (EBookBackend *backend, EDataBook *book,
}
static void
-e_book_backend_google_get_contact_list_uids (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *query)
+e_book_backend_google_get_contact_list_uids (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *query)
{
EBookBackendSExp *sexp;
GList *all_contacts;
@@ -1854,7 +1929,8 @@ on_refresh_idle (EBookBackend *backend)
}
static void
-set_live_mode (EBookBackend *backend, gboolean live_mode)
+set_live_mode (EBookBackend *backend,
+ gboolean live_mode)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
@@ -1876,7 +1952,8 @@ set_live_mode (EBookBackend *backend, gboolean live_mode)
}
static void
-e_book_backend_google_start_book_view (EBookBackend *backend, EDataBookView *bookview)
+e_book_backend_google_start_book_view (EBookBackend *backend,
+ EDataBookView *bookview)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
GList *cached_contacts;
@@ -1920,7 +1997,8 @@ e_book_backend_google_start_book_view (EBookBackend *backend, EDataBookView *boo
}
static void
-e_book_backend_google_stop_book_view (EBookBackend *backend, EDataBookView *bookview)
+e_book_backend_google_stop_book_view (EBookBackend *backend,
+ EDataBookView *bookview)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
GList *view;
@@ -2006,7 +2084,9 @@ authenticate_client_login_cb (GDataService *service,
#endif
static void
-e_book_backend_google_authenticate_user (EBookBackend *backend, GCancellable *cancellable, ECredentials *credentials)
+e_book_backend_google_authenticate_user (EBookBackend *backend,
+ GCancellable *cancellable,
+ ECredentials *credentials)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
AuthenticateUserData *data;
@@ -2068,14 +2148,21 @@ e_book_backend_google_authenticate_user (EBookBackend *backend, GCancellable *ca
}
static void
-e_book_backend_google_remove (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable)
+e_book_backend_google_remove (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable)
{
__debug__ (G_STRFUNC);
e_data_book_respond_remove (book, opid, NULL);
}
static void
-e_book_backend_google_open (EBookBackend *backend, EDataBook *book, guint opid, GCancellable *cancellable, gboolean only_if_exists)
+e_book_backend_google_open (EBookBackend *backend,
+ EDataBook *book,
+ guint opid,
+ GCancellable *cancellable,
+ gboolean only_if_exists)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
const gchar *refresh_interval_str, *use_ssl_str, *use_cache_str;
@@ -2144,7 +2231,11 @@ e_book_backend_google_open (EBookBackend *backend, EDataBook *book, guint opid,
}
static void
-e_book_backend_google_get_backend_property (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *prop_name)
+e_book_backend_google_get_backend_property (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *prop_name)
{
__debug__ (G_STRFUNC);
@@ -2315,7 +2406,8 @@ google_cancel_all_operations (EBookBackend *backend)
}
static void
-e_book_backend_google_set_online (EBookBackend *backend, gboolean is_online)
+e_book_backend_google_set_online (EBookBackend *backend,
+ gboolean is_online)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
__debug__ (G_STRFUNC);
@@ -2457,7 +2549,8 @@ e_book_backend_google_new (void)
}
static void
-data_book_error_from_gdata_error (GError **dest_err, const GError *error)
+data_book_error_from_gdata_error (GError **dest_err,
+ const GError *error)
{
if (!error || !dest_err)
return;
@@ -2559,7 +2652,8 @@ static GDataGDOrganization *gdata_gd_organization_from_attribute (EVCardAttribut
static gboolean is_known_google_im_protocol (const gchar *protocol);
static GDataEntry *
-_gdata_entry_new_from_e_contact (EBookBackend *backend, EContact *contact)
+_gdata_entry_new_from_e_contact (EBookBackend *backend,
+ EContact *contact)
{
GDataEntry *entry = GDATA_ENTRY (gdata_contacts_contact_new (NULL));
@@ -2621,7 +2715,9 @@ remove_websites (GDataContactsContact *contact)
}
static gboolean
-_gdata_entry_update_from_e_contact (EBookBackend *backend, GDataEntry *entry, EContact *contact)
+_gdata_entry_update_from_e_contact (EBookBackend *backend,
+ GDataEntry *entry,
+ EContact *contact)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
GList *attributes, *iter, *category_names;
@@ -2881,7 +2977,9 @@ _gdata_entry_update_from_e_contact (EBookBackend *backend, GDataEntry *entry, EC
}
static void
-foreach_extended_props_cb (const gchar *name, const gchar *value, EVCard *vcard)
+foreach_extended_props_cb (const gchar *name,
+ const gchar *value,
+ EVCard *vcard)
{
EVCardAttribute *attr;
@@ -2890,7 +2988,8 @@ foreach_extended_props_cb (const gchar *name, const gchar *value, EVCard *vcard)
}
static EContact *
-_e_contact_new_from_gdata_entry (EBookBackend *backend, GDataEntry *entry)
+_e_contact_new_from_gdata_entry (EBookBackend *backend,
+ GDataEntry *entry)
{
EBookBackendGooglePrivate *priv = E_BOOK_BACKEND_GOOGLE (backend)->priv;
EVCard *vcard;
@@ -3138,7 +3237,8 @@ _e_contact_new_from_gdata_entry (EBookBackend *backend, GDataEntry *entry)
}
static void
-_e_contact_add_gdata_entry_xml (EContact *contact, GDataEntry *entry)
+_e_contact_add_gdata_entry_xml (EContact *contact,
+ GDataEntry *entry)
{
EVCardAttribute *attr;
gchar *entry_xml;
@@ -3168,7 +3268,8 @@ _e_contact_remove_gdata_entry_xml (EContact *contact)
}
static const gchar *
-_e_contact_get_gdata_entry_xml (EContact *contact, const gchar **edit_uri)
+_e_contact_get_gdata_entry_xml (EContact *contact,
+ const gchar **edit_uri)
{
EVCardAttribute *attr;
GList *values = NULL;
@@ -3232,7 +3333,10 @@ static const struct RelTypeMap rel_type_map_others[] = {
};
static gboolean
-_add_type_param_from_google_rel (EVCardAttribute *attr, const struct RelTypeMap rel_type_map[], guint map_len, const gchar *rel)
+_add_type_param_from_google_rel (EVCardAttribute *attr,
+ const struct RelTypeMap rel_type_map[],
+ guint map_len,
+ const gchar *rel)
{
const gchar * field;
guint i;
@@ -3259,25 +3363,29 @@ _add_type_param_from_google_rel (EVCardAttribute *attr, const struct RelTypeMap
}
static gboolean
-add_type_param_from_google_rel_phone (EVCardAttribute *attr, const gchar *rel)
+add_type_param_from_google_rel_phone (EVCardAttribute *attr,
+ const gchar *rel)
{
return _add_type_param_from_google_rel (attr, rel_type_map_phone, G_N_ELEMENTS (rel_type_map_phone), rel);
}
static gboolean
-add_type_param_from_google_rel_im (EVCardAttribute *attr, const gchar *rel)
+add_type_param_from_google_rel_im (EVCardAttribute *attr,
+ const gchar *rel)
{
return _add_type_param_from_google_rel (attr, rel_type_map_im, G_N_ELEMENTS (rel_type_map_im), rel);
}
static gboolean
-add_type_param_from_google_rel (EVCardAttribute *attr, const gchar *rel)
+add_type_param_from_google_rel (EVCardAttribute *attr,
+ const gchar *rel)
{
return _add_type_param_from_google_rel (attr, rel_type_map_others, G_N_ELEMENTS (rel_type_map_others), rel);
}
static void
-add_label_param (EVCardAttribute *attr, const gchar *label)
+add_label_param (EVCardAttribute *attr,
+ const gchar *label)
{
if (label && label[0] != '\0') {
EVCardAttributeParam *param;
@@ -3287,7 +3395,9 @@ add_label_param (EVCardAttribute *attr, const gchar *label)
}
static gchar *
-_google_rel_from_types (GList *types, const struct RelTypeMap rel_type_map[], guint map_len)
+_google_rel_from_types (GList *types,
+ const struct RelTypeMap rel_type_map[],
+ guint map_len)
{
const gchar format[] = "http://schemas.google.com/g/2005#%s";
guint i;
@@ -3372,7 +3482,8 @@ google_im_protocol_from_field_name (const gchar *field_name)
}
static void
-add_primary_param (EVCardAttribute *attr, gboolean has_type)
+add_primary_param (EVCardAttribute *attr,
+ gboolean has_type)
{
EVCardAttributeParam *param = e_vcard_attribute_param_new (GOOGLE_PRIMARY_PARAM);
e_vcard_attribute_add_param_with_value (attr, param, "1");
@@ -3384,7 +3495,9 @@ add_primary_param (EVCardAttribute *attr, gboolean has_type)
}
static GList *
-get_google_primary_type_label (EVCardAttribute *attr, gboolean *primary, const gchar **label)
+get_google_primary_type_label (EVCardAttribute *attr,
+ gboolean *primary,
+ const gchar **label)
{
GList *params;
GList *types = NULL;
@@ -3424,7 +3537,8 @@ get_google_primary_type_label (EVCardAttribute *attr, gboolean *primary, const g
}
static void
-add_attribute_from_gdata_gd_email_address (EVCard *vcard, GDataGDEmailAddress *email)
+add_attribute_from_gdata_gd_email_address (EVCard *vcard,
+ GDataGDEmailAddress *email)
{
EVCardAttribute *attr;
gboolean has_type;
@@ -3445,7 +3559,8 @@ add_attribute_from_gdata_gd_email_address (EVCard *vcard, GDataGDEmailAddress *e
}
static void
-add_attribute_from_gdata_gd_im_address (EVCard *vcard, GDataGDIMAddress *im)
+add_attribute_from_gdata_gd_im_address (EVCard *vcard,
+ GDataGDIMAddress *im)
{
EVCardAttribute *attr;
gboolean has_type;
@@ -3471,7 +3586,8 @@ add_attribute_from_gdata_gd_im_address (EVCard *vcard, GDataGDIMAddress *im)
}
static void
-add_attribute_from_gdata_gd_phone_number (EVCard *vcard, GDataGDPhoneNumber *number)
+add_attribute_from_gdata_gd_phone_number (EVCard *vcard,
+ GDataGDPhoneNumber *number)
{
EVCardAttribute *attr;
gboolean has_type;
@@ -3492,7 +3608,8 @@ add_attribute_from_gdata_gd_phone_number (EVCard *vcard, GDataGDPhoneNumber *num
}
static void
-add_attribute_from_gdata_gd_postal_address (EVCard *vcard, GDataGDPostalAddress *address)
+add_attribute_from_gdata_gd_postal_address (EVCard *vcard,
+ GDataGDPostalAddress *address)
{
EVCardAttribute *attr;
gboolean has_type;
@@ -3540,7 +3657,8 @@ add_attribute_from_gdata_gd_postal_address (EVCard *vcard, GDataGDPostalAddress
}
static void
-add_attribute_from_gdata_gd_organization (EVCard *vcard, GDataGDOrganization *org)
+add_attribute_from_gdata_gd_organization (EVCard *vcard,
+ GDataGDOrganization *org)
{
EVCardAttribute *attr;
gboolean has_type;
@@ -3569,7 +3687,8 @@ add_attribute_from_gdata_gd_organization (EVCard *vcard, GDataGDOrganization *or
}
static GDataGDEmailAddress *
-gdata_gd_email_address_from_attribute (EVCardAttribute *attr, gboolean *have_primary)
+gdata_gd_email_address_from_attribute (EVCardAttribute *attr,
+ gboolean *have_primary)
{
GDataGDEmailAddress *email = NULL;
GList *values;
@@ -3602,7 +3721,8 @@ gdata_gd_email_address_from_attribute (EVCardAttribute *attr, gboolean *have_pri
}
static GDataGDIMAddress *
-gdata_gd_im_address_from_attribute (EVCardAttribute *attr, gboolean *have_primary)
+gdata_gd_im_address_from_attribute (EVCardAttribute *attr,
+ gboolean *have_primary)
{
GDataGDIMAddress *im = NULL;
GList *values;
@@ -3641,7 +3761,8 @@ gdata_gd_im_address_from_attribute (EVCardAttribute *attr, gboolean *have_primar
}
static GDataGDPhoneNumber *
-gdata_gd_phone_number_from_attribute (EVCardAttribute *attr, gboolean *have_primary)
+gdata_gd_phone_number_from_attribute (EVCardAttribute *attr,
+ gboolean *have_primary)
{
GDataGDPhoneNumber *number = NULL;
GList *values;
@@ -3674,7 +3795,8 @@ gdata_gd_phone_number_from_attribute (EVCardAttribute *attr, gboolean *have_prim
}
static GDataGDPostalAddress *
-gdata_gd_postal_address_from_attribute (EVCardAttribute *attr, gboolean *have_primary)
+gdata_gd_postal_address_from_attribute (EVCardAttribute *attr,
+ gboolean *have_primary)
{
GDataGDPostalAddress *address = NULL;
GList *values;
@@ -3744,7 +3866,8 @@ gdata_gd_postal_address_from_attribute (EVCardAttribute *attr, gboolean *have_pr
}
static GDataGDOrganization *
-gdata_gd_organization_from_attribute (EVCardAttribute *attr, gboolean *have_primary)
+gdata_gd_organization_from_attribute (EVCardAttribute *attr,
+ gboolean *have_primary)
{
GDataGDOrganization *org = NULL;
GList *values;
@@ -3764,7 +3887,7 @@ gdata_gd_organization_from_attribute (EVCardAttribute *attr, gboolean *have_prim
rel = google_rel_from_types (types);
org = gdata_gd_organization_new (values->data, NULL, rel, label, primary);
- if (values->next != NULL && values->next->data != NULL && *((gchar*) values->next->data) != '\0')
+ if (values->next != NULL && values->next->data != NULL && *((gchar *) values->next->data) != '\0')
gdata_gd_organization_set_department (org, values->next->data);
g_free (rel);
diff --git a/addressbook/backends/ldap/e-book-backend-ldap-factory.c b/addressbook/backends/ldap/e-book-backend-ldap-factory.c
index ae9e014..75d9636 100644
--- a/addressbook/backends/ldap/e-book-backend-ldap-factory.c
+++ b/addressbook/backends/ldap/e-book-backend-ldap-factory.c
@@ -45,7 +45,8 @@ eds_module_shutdown (void)
}
void
-eds_module_list_types (const GType **types, gint *num_types)
+eds_module_list_types (const GType **types,
+ gint *num_types)
{
*types = &ldap_type;
*num_types = 1;
diff --git a/addressbook/backends/ldap/e-book-backend-ldap.c b/addressbook/backends/ldap/e-book-backend-ldap.c
index abef023..808d0a1 100644
--- a/addressbook/backends/ldap/e-book-backend-ldap.c
+++ b/addressbook/backends/ldap/e-book-backend-ldap.c
@@ -81,7 +81,7 @@
# define ldap_compare_ext(ld,dn,a,v,sc,cc,msg) \
ldap_compare_extW (ld,dn,a,0,v,sc,cc,msg)
# define ldap_search_ext(ld,base,scope,f,a,o,sc,cc,(t),s,msg) \
- ldap_search_extW (ld,base,scope,f,a,o,sc,cc,((PLDAP_TIMEVAL) t)?((PLDAP_TIMEVAL) t)->tv_sec:0,s,msg)
+ ldap_search_extW (ld,base,scope,f,a,o,sc,cc,((PLDAP_TIMEVAL) t) ? ((PLDAP_TIMEVAL) t)->tv_sec : 0,s,msg)
# if defined (__MINGW64_VERSION_MAJOR) || defined (_MSC_VER)
# define ldap_start_tls_s(ld,sc,cc) \
ldap_start_tls_sW (ld,0,0,sc,cc)
@@ -90,7 +90,7 @@
# define ldap_compare_ext(ld,dn,a,v,sc,cc,msg) \
ldap_compare_extA (ld,dn,a,0,v,sc,cc,msg)
# define ldap_search_ext(ld,base,scope,f,a,o,sc,cc,t,s,msg) \
- ldap_search_extA (ld,base,scope,f,a,o,sc,cc,((PLDAP_TIMEVAL) t)?((PLDAP_TIMEVAL) t)->tv_sec:0,s,msg)
+ ldap_search_extA (ld,base,scope,f,a,o,sc,cc,((PLDAP_TIMEVAL) t) ? ((PLDAP_TIMEVAL) t)->tv_sec : 0,s,msg)
# if defined (__MINGW64_VERSION_MAJOR) || defined (_MSC_VER)
# define ldap_start_tls_s(ld,sc,cc) \
ldap_start_tls_sA (ld,0,0,sc,cc)
@@ -192,7 +192,7 @@ struct _EBookBackendLDAPPrivate {
gboolean ldap_v3; /* TRUE if the server supports protocol
revision 3 (necessary for TLS) */
- gboolean starttls; /* TRUE if the *library* supports
+ gboolean starttls; /* TRUE if the *library * supports
starttls. will be false if openssl
was not built into openldap. */
EBookBackendLDAPUseTLS use_tls;
@@ -205,7 +205,7 @@ struct _EBookBackendLDAPPrivate {
EBookBackendCache *cache;
/* whether or not there's support for the objectclass we need
- to store all our additional fields */
+ * to store all our additional fields */
gboolean evolutionPersonSupported;
gboolean calEntrySupported;
gboolean evolutionPersonChecked;
@@ -255,31 +255,31 @@ static gboolean poll_ldap (EBookBackendLDAP *bl);
static EContact *build_contact_from_entry (EBookBackendLDAP *bl, LDAPMessage *e, GList **existing_objectclasses, gchar **ldap_uid);
static void email_populate (EContact *contact, gchar **values);
-static struct berval** email_ber (EContact *contact);
+static struct berval ** email_ber (EContact *contact);
static gboolean email_compare (EContact *contact1, EContact *contact2);
static void member_populate (EContact *contact, gchar **values);
-static struct berval** member_ber (EContact *contact);
+static struct berval ** member_ber (EContact *contact);
static gboolean member_compare (EContact *contact1, EContact *contact2);
static void homephone_populate (EContact *contact, gchar **values);
-static struct berval** homephone_ber (EContact *contact);
+static struct berval ** homephone_ber (EContact *contact);
static gboolean homephone_compare (EContact *contact1, EContact *contact2);
static void business_populate (EContact *contact, gchar **values);
-static struct berval** business_ber (EContact *contact);
+static struct berval ** business_ber (EContact *contact);
static gboolean business_compare (EContact *contact1, EContact *contact2);
static void anniversary_populate (EContact *contact, gchar **values);
-static struct berval** anniversary_ber (EContact *contact);
+static struct berval ** anniversary_ber (EContact *contact);
static gboolean anniversary_compare (EContact *contact1, EContact *contact2);
static void birthday_populate (EContact *contact, gchar **values);
-static struct berval** birthday_ber (EContact *contact);
+static struct berval ** birthday_ber (EContact *contact);
static gboolean birthday_compare (EContact *contact1, EContact *contact2);
static void category_populate (EContact *contact, gchar **values);
-static struct berval** category_ber (EContact *contact);
+static struct berval ** category_ber (EContact *contact);
static gboolean category_compare (EContact *contact1, EContact *contact2);
static void home_address_populate (EContact * card, gchar **values);
@@ -327,7 +327,7 @@ static struct prop_info {
/* used when reading from the ldap server populates EContact with the values in **values. */
void (*populate_contact_func)(EContact *contact, gchar **values);
/* used when writing to an ldap server. returns a NULL terminated array of berval*'s */
- struct berval** (*ber_func)(EContact *contact);
+ struct berval ** (*ber_func)(EContact *contact);
/* used to compare list attributes */
gboolean (*compare_func)(EContact *contact1, EContact *contact2);
@@ -405,8 +405,8 @@ static struct prop_info {
BINARY_PROP (E_CONTACT_X509_CERT, "userCertificate", cert_populate, NULL/*XXX*/, NULL/*XXX*/),
#if 0
/* hm, which do we use? the inetOrgPerson schema says that
- userSMIMECertificate should be used in favor of
- userCertificate for S/MIME applications. */
+ * userSMIMECertificate should be used in favor of
+ * userCertificate for S/MIME applications. */
BINARY_PROP (E_CONTACT_X509_CERT, "userSMIMECertificate", cert_populate, NULL/*XXX*/, NULL/*XXX*/),
#endif
@@ -445,7 +445,8 @@ can_browse (EBookBackend *backend)
}
static gboolean
-pick_view_cb (EDataBookView *view, gpointer user_data)
+pick_view_cb (EDataBookView *view,
+ gpointer user_data)
{
EDataBookView **pick = user_data;
@@ -457,7 +458,7 @@ pick_view_cb (EDataBookView *view, gpointer user_data)
return view == NULL;
}
-static EDataBookView*
+static EDataBookView *
find_book_view (EBookBackendLDAP *bl)
{
EDataBookView *pick = NULL;
@@ -474,7 +475,8 @@ struct check_data
};
static gboolean
-check_view_cb (EDataBookView *view, gpointer user_data)
+check_view_cb (EDataBookView *view,
+ gpointer user_data)
{
struct check_data *cd = user_data;
@@ -486,7 +488,8 @@ check_view_cb (EDataBookView *view, gpointer user_data)
}
static gboolean
-book_view_is_valid (EBookBackendLDAP *bl, EDataBookView *book_view)
+book_view_is_valid (EBookBackendLDAP *bl,
+ EDataBookView *book_view)
{
struct check_data cd;
@@ -499,7 +502,9 @@ book_view_is_valid (EBookBackendLDAP *bl, EDataBookView *book_view)
}
static void
-book_view_notify_status (EBookBackendLDAP *bl, EDataBookView *view, const gchar *status)
+book_view_notify_status (EBookBackendLDAP *bl,
+ EDataBookView *view,
+ const gchar *status)
{
if (!book_view_is_valid (bl, view))
return;
@@ -507,7 +512,9 @@ book_view_notify_status (EBookBackendLDAP *bl, EDataBookView *view, const gchar
}
static void
-add_to_supported_fields (EBookBackendLDAP *bl, gchar **attrs, GHashTable *attr_hash)
+add_to_supported_fields (EBookBackendLDAP *bl,
+ gchar **attrs,
+ GHashTable *attr_hash)
{
gint i;
for (i = 0; attrs[i]; i++) {
@@ -538,7 +545,8 @@ add_to_supported_fields (EBookBackendLDAP *bl, gchar **attrs, GHashTable *attr_h
}
static void
-add_oc_attributes_to_supported_fields (EBookBackendLDAP *bl, LDAPObjectClass *oc)
+add_oc_attributes_to_supported_fields (EBookBackendLDAP *bl,
+ LDAPObjectClass *oc)
{
gint i;
GHashTable *attr_hash = g_hash_table_new (g_str_hash, g_str_equal);
@@ -628,12 +636,12 @@ check_schema_support (EBookBackendLDAP *bl)
}
else {
/* the reason for this is so that if the user
- ends up authenticating to the ldap server,
- we will requery for the subschema values.
- This makes it a bit more robust in the face
- of draconian acl's that keep subschema
- reads from working until the user is
- authed. */
+ * ends up authenticating to the ldap server,
+ * we will requery for the subschema values.
+ * This makes it a bit more robust in the face
+ * of draconian acl's that keep subschema
+ * reads from working until the user is
+ * authed. */
if (e_book_backend_is_readonly (E_BOOK_BACKEND (bl))) {
g_warning ("subschema read returned nothing before successful auth");
bl->priv->evolutionPersonChecked = FALSE;
@@ -900,7 +908,7 @@ e_book_backend_ldap_connect (EBookBackendLDAP *bl)
}
#else
#ifdef _WIN32
- typedef ULONG (*PFN_ldap_start_tls_s)(PLDAP,PLDAPControl*,PLDAPControl*);
+ typedef ULONG (*PFN_ldap_start_tls_s)(PLDAP,PLDAPControl *,PLDAPControl *);
PFN_ldap_start_tls_s pldap_start_tls_s =
(PFN_ldap_start_tls_s) GetProcAddress (GetModuleHandle ("wldap32.dll"), "ldap_start_tls_s");
if (!pldap_start_tls_s)
@@ -931,14 +939,14 @@ e_book_backend_ldap_connect (EBookBackendLDAP *bl)
}
/* bind anonymously initially, we'll actually
- authenticate the user properly later (in
- authenticate_user) if they've selected
- authentication */
+ * authenticate the user properly later (in
+ * authenticate_user) if they've selected
+ * authentication */
ldap_error = ldap_simple_bind_s (blpriv->ldap, blpriv->auth_dn, blpriv->auth_passwd);
if (ldap_error == LDAP_PROTOCOL_ERROR) {
g_warning ("failed to bind using v3. trying v2.");
/* server doesn't support v3 binds, so let's
- drop it down to v2 and try again. */
+ * drop it down to v2 and try again. */
bl->priv->ldap_v3 = FALSE;
protocol_version = LDAP_VERSION2;
@@ -968,15 +976,15 @@ e_book_backend_ldap_connect (EBookBackendLDAP *bl)
else
ldap_error = query_ldap_root_dse (bl);
/* query_ldap_root_dse will cause the actual
- connect (), so any tcpip problems will show up
- here */
+ * connect (), so any tcpip problems will show up
+ * here */
/* we can't just check for LDAP_SUCCESS here since in
- older servers (namely openldap1.x servers), there's
- not a root DSE at all, so the query will fail with
- LDAP_NO_SUCH_OBJECT, and GWIA's LDAP server (which
- is v2 based and doesn't have a root dse) seems to
- fail with LDAP_PARTIAL_RESULTS. */
+ * older servers (namely openldap1.x servers), there's
+ * not a root DSE at all, so the query will fail with
+ * LDAP_NO_SUCH_OBJECT, and GWIA's LDAP server (which
+ * is v2 based and doesn't have a root dse) seems to
+ * fail with LDAP_PARTIAL_RESULTS. */
if (ldap_error == LDAP_SUCCESS
|| ldap_error == LDAP_PARTIAL_RESULTS
|| LDAP_NAME_ERROR (ldap_error)) {
@@ -984,18 +992,18 @@ e_book_backend_ldap_connect (EBookBackendLDAP *bl)
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
/* check to see if evolutionPerson is supported, if we can (me
- might not be able to if we can't authenticate. if we
- can't, try again in auth_user.) */
+ * might not be able to if we can't authenticate. if we
+ * can't, try again in auth_user.) */
if (!bl->priv->evolutionPersonChecked)
check_schema_support (bl);
if (enable_debug) {
printf ("e_book_backend_ldap_connect ... success \n");
g_get_current_time (&end);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
+ diff = end.tv_sec * 1000 + end.tv_usec / 1000;
+ diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
printf("e_book_backend_ldap_connect took %ld.%03ld seconds\n",
- diff/1000,diff%1000);
+ diff / 1000,diff % 1000);
}
return EDB_ERROR (SUCCESS);
} else if (ldap_error == LDAP_UNWILLING_TO_PERFORM) {
@@ -1021,7 +1029,9 @@ e_book_backend_ldap_connect (EBookBackendLDAP *bl)
}
static gboolean
-e_book_backend_ldap_reconnect (EBookBackendLDAP *bl, EDataBookView *book_view, gint ldap_status)
+e_book_backend_ldap_reconnect (EBookBackendLDAP *bl,
+ EDataBookView *book_view,
+ gint ldap_status)
{
GTimeVal start, end;
gulong diff;
@@ -1069,10 +1079,10 @@ e_book_backend_ldap_reconnect (EBookBackendLDAP *bl, EDataBookView *book_view, g
if (enable_debug) {
printf ("e_book_backend_ldap_reconnect ... returning %d\n", ldap_error);
g_get_current_time (&end);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
+ diff = end.tv_sec * 1000 + end.tv_usec / 1000;
+ diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
printf("e_book_backend_ldap_reconnect took %ld.%03ld seconds\n",
- diff/1000,diff%1000);
+ diff / 1000,diff % 1000);
}
return (ldap_error == LDAP_SUCCESS);
@@ -1083,11 +1093,14 @@ e_book_backend_ldap_reconnect (EBookBackendLDAP *bl, EDataBookView *book_view, g
}
static void
-ldap_op_add (LDAPOp *op, EBookBackend *backend,
- EDataBook *book, EDataBookView *view,
- gint opid,
- gint msgid,
- LDAPOpHandler handler, LDAPOpDtor dtor)
+ldap_op_add (LDAPOp *op,
+ EBookBackend *backend,
+ EDataBook *book,
+ EDataBookView *view,
+ gint opid,
+ gint msgid,
+ LDAPOpHandler handler,
+ LDAPOpDtor dtor)
{
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
@@ -1149,7 +1162,8 @@ ldap_op_finished (LDAPOp *op)
}
static void
-ldap_op_change_id (LDAPOp *op, gint msg_id)
+ldap_op_change_id (LDAPOp *op,
+ gint msg_id)
{
EBookBackend *backend = op->backend;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
@@ -1193,7 +1207,7 @@ static const gchar *
get_dn_attribute_name (gchar *rootdn)
{
/* Use 'uid' is already used in root DN,
- then use the 'description' field. */
+ * then use the 'description' field. */
if (!strncmp (rootdn, "uid=", 4) ||
strstr (rootdn, ",uid="))
return "description";
@@ -1203,7 +1217,8 @@ get_dn_attribute_name (gchar *rootdn)
}
static gchar *
-create_dn_from_contact (EContact *contact, gchar *rootdn)
+create_dn_from_contact (EContact *contact,
+ gchar *rootdn)
{
gchar *cn, *cn_part = NULL;
gchar *dn;
@@ -1234,7 +1249,8 @@ create_dn_from_contact (EContact *contact, gchar *rootdn)
}
static gchar *
-create_full_dn_from_contact (gchar *dn, const gchar *root_dn)
+create_full_dn_from_contact (gchar *dn,
+ const gchar *root_dn)
{
gchar *full_dn = g_strdup_printf ("%s%s%s", dn,
(root_dn && *root_dn) ? "," : "",
@@ -1271,8 +1287,12 @@ free_mods (GPtrArray *mods)
g_ptr_array_free (mods, TRUE);
}
-static GPtrArray*
-build_mods_from_contacts (EBookBackendLDAP *bl, EContact *current, EContact *new, gboolean *new_dn_needed, gchar *ldap_uid)
+static GPtrArray *
+build_mods_from_contacts (EBookBackendLDAP *bl,
+ EContact *current,
+ EContact *new,
+ gboolean *new_dn_needed,
+ gchar *ldap_uid)
{
gboolean adding = (current == NULL), is_list = FALSE;
GPtrArray *result = g_ptr_array_new ();
@@ -1291,7 +1311,7 @@ build_mods_from_contacts (EBookBackendLDAP *bl, EContact *current, EContact *new
mod->mod_op = LDAP_MOD_ADD;
mod->mod_type = g_strdup ("uid");
mod->mod_values = g_new (gchar *, 2);
- mod->mod_values[0] = g_strdup (ldap_uid_value+1);
+ mod->mod_values[0] = g_strdup (ldap_uid_value + 1);
mod->mod_values[1] = NULL;
g_ptr_array_add (result, mod);
}
@@ -1304,12 +1324,12 @@ build_mods_from_contacts (EBookBackendLDAP *bl, EContact *current, EContact *new
gboolean include;
gboolean new_prop_present = FALSE;
gboolean current_prop_present = FALSE;
- struct berval** new_prop_bers = NULL;
+ struct berval ** new_prop_bers = NULL;
gchar *new_prop = NULL;
gchar *current_prop = NULL;
/* XXX if it's an evolutionPerson prop and the ldap
- server doesn't support that objectclass, skip it. */
+ * server doesn't support that objectclass, skip it. */
if (prop_info[i].prop_type & PROP_EVOLVE ) {
if (!bl->priv->evolutionPersonSupported)
continue;
@@ -1322,9 +1342,9 @@ build_mods_from_contacts (EBookBackendLDAP *bl, EContact *current, EContact *new
}
/* get the value for the new contact, and compare it to
- the value in the current contact to see if we should
- update it -- if adding is TRUE, short circuit the
- check. */
+ * the value in the current contact to see if we should
+ * update it -- if adding is TRUE, short circuit the
+ * check. */
if (prop_info[i].prop_type & PROP_TYPE_STRING) {
new_prop = e_contact_get (new, prop_info[i].field_id);
new_prop_present = (new_prop != NULL);
@@ -1335,10 +1355,10 @@ build_mods_from_contacts (EBookBackendLDAP *bl, EContact *current, EContact *new
}
/* need to set INCLUDE to true if the field needs to
- show up in the ldap modify request */
+ * show up in the ldap modify request */
if (adding) {
/* if we're creating a new contact, include it if the
- field is there at all */
+ * field is there at all */
if (prop_info[i].prop_type & PROP_TYPE_STRING)
include = (new_prop_present && *new_prop); /* empty strings cause problems */
else
@@ -1346,10 +1366,10 @@ build_mods_from_contacts (EBookBackendLDAP *bl, EContact *current, EContact *new
}
else {
/* if we're modifying an existing contact,
- include it if the current field value is
- different than the new one, if it didn't
- exist previously, or if it's been
- removed. */
+ * include it if the current field value is
+ * different than the new one, if it didn't
+ * exist previously, or if it's been
+ * removed. */
if (prop_info[i].prop_type & PROP_TYPE_STRING) {
current_prop = e_contact_get (current, prop_info[i].field_id);
current_prop_present = (current_prop != NULL);
@@ -1382,8 +1402,8 @@ build_mods_from_contacts (EBookBackendLDAP *bl, EContact *current, EContact *new
LDAPMod *mod = g_new (LDAPMod, 1);
/* the included attribute has changed - we
- need to update the dn if it's one of the
- attributes we compute the dn from. */
+ * need to update the dn if it's one of the
+ * attributes we compute the dn from. */
if (new_dn_needed) {
const gchar *current_dn = e_contact_get_const (current, E_CONTACT_UID);
@@ -1391,7 +1411,7 @@ build_mods_from_contacts (EBookBackendLDAP *bl, EContact *current, EContact *new
if (current_dn && current_prop) {
gchar *cid = g_strdup_printf (",%s=", prop_info[i].ldap_attr);
if (cid) {
- if (!strncmp (current_dn, cid + 1, strlen (cid)-1) ||
+ if (!strncmp (current_dn, cid + 1, strlen (cid) - 1) ||
strstr (current_dn, cid)) {
*new_dn_needed = TRUE;
}
@@ -1434,8 +1454,11 @@ build_mods_from_contacts (EBookBackendLDAP *bl, EContact *current, EContact *new
}
static void
-add_objectclass_mod (EBookBackendLDAP *bl, GPtrArray *mod_array, GList *existing_objectclasses,
- gboolean is_list, gboolean is_rename)
+add_objectclass_mod (EBookBackendLDAP *bl,
+ GPtrArray *mod_array,
+ GList *existing_objectclasses,
+ gboolean is_list,
+ gboolean is_rename)
{
#define FIND_INSERT(oc) \
if (!g_list_find_custom (existing_objectclasses, (oc), (GCompareFunc) g_ascii_strcasecmp)) \
@@ -1452,8 +1475,8 @@ add_objectclass_mod (EBookBackendLDAP *bl, GPtrArray *mod_array, GList *existing
objectclass_mod->mod_type = g_strdup ("objectClass");
/* yes, this is a linear search for each of our
- objectclasses, but really, how many objectclasses
- are there going to be in any sane ldap entry? */
+ * objectclasses, but really, how many objectclasses
+ * are there going to be in any sane ldap entry? */
if (!is_rename)
FIND_INSERT (TOP);
if (is_list) {
@@ -1514,9 +1537,10 @@ typedef struct {
} LDAPCreateOp;
static void
-create_contact_handler (LDAPOp *op, LDAPMessage *res)
+create_contact_handler (LDAPOp *op,
+ LDAPMessage *res)
{
- LDAPCreateOp *create_op = (LDAPCreateOp*) op;
+ LDAPCreateOp *create_op = (LDAPCreateOp *) op;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (op->backend);
gchar *ldap_error_msg;
gint ldap_error;
@@ -1568,7 +1592,7 @@ create_contact_handler (LDAPOp *op, LDAPMessage *res)
static void
create_contact_dtor (LDAPOp *op)
{
- LDAPCreateOp *create_op = (LDAPCreateOp*) op;
+ LDAPCreateOp *create_op = (LDAPCreateOp *) op;
g_free (create_op->dn);
g_object_unref (create_op->new_contact);
@@ -1577,10 +1601,10 @@ create_contact_dtor (LDAPOp *op)
static void
e_book_backend_ldap_create_contact (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- const gchar *vcard)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *vcard)
{
LDAPCreateOp *create_op = g_new0 (LDAPCreateOp, 1);
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
@@ -1623,7 +1647,7 @@ e_book_backend_ldap_create_contact (EBookBackend *backend,
#if 0
if (!mod_array) {
/* there's an illegal field in there. report
- UnsupportedAttribute back */
+ * UnsupportedAttribute back */
e_data_book_respond_create (book,
EDB_ERROR (UNSUPPORTED_FIELD),
NULL);
@@ -1682,7 +1706,7 @@ e_book_backend_ldap_create_contact (EBookBackend *backend,
}
#endif
- ldap_mods = (LDAPMod**) mod_array->pdata;
+ ldap_mods = (LDAPMod **) mod_array->pdata;
do {
book_view_notify_status (bl, book_view, _("Adding contact to LDAP server..."));
@@ -1701,11 +1725,11 @@ e_book_backend_ldap_create_contact (EBookBackend *backend,
opid,
ldap_error_to_response (err),
NULL);
- create_contact_dtor ((LDAPOp*) create_op);
+ create_contact_dtor ((LDAPOp *) create_op);
return;
} else {
g_print ("ldap_add_ext returned %d\n", err);
- ldap_op_add ((LDAPOp*) create_op, backend, book,
+ ldap_op_add ((LDAPOp *) create_op, backend, book,
book_view, opid, create_contact_msgid,
create_contact_handler, create_contact_dtor);
}
@@ -1717,9 +1741,10 @@ typedef struct {
} LDAPRemoveOp;
static void
-remove_contact_handler (LDAPOp *op, LDAPMessage *res)
+remove_contact_handler (LDAPOp *op,
+ LDAPMessage *res)
{
- LDAPRemoveOp *remove_op = (LDAPRemoveOp*) op;
+ LDAPRemoveOp *remove_op = (LDAPRemoveOp *) op;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (op->backend);
gchar *ldap_error_msg;
gint ldap_error;
@@ -1771,7 +1796,7 @@ remove_contact_handler (LDAPOp *op, LDAPMessage *res)
static void
remove_contact_dtor (LDAPOp *op)
{
- LDAPRemoveOp *remove_op = (LDAPRemoveOp*) op;
+ LDAPRemoveOp *remove_op = (LDAPRemoveOp *) op;
g_free (remove_op->id);
g_free (remove_op);
@@ -1779,10 +1804,10 @@ remove_contact_dtor (LDAPOp *op)
static void
e_book_backend_ldap_remove_contacts (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- const GSList *ids)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const GSList *ids)
{
LDAPRemoveOp *remove_op = g_new (LDAPRemoveOp, 1);
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
@@ -1829,12 +1854,12 @@ e_book_backend_ldap_remove_contacts (EBookBackend *backend,
opid,
ldap_error_to_response (ldap_error),
NULL);
- ldap_op_finished ((LDAPOp*) remove_op);
- remove_contact_dtor ((LDAPOp*) remove_op);
+ ldap_op_finished ((LDAPOp *) remove_op);
+ remove_contact_dtor ((LDAPOp *) remove_op);
return;
} else {
g_print ("ldap_delete_ext returned %d\n", ldap_error);
- ldap_op_add ((LDAPOp*) remove_op, backend, book,
+ ldap_op_add ((LDAPOp *) remove_op, backend, book,
book_view, opid, remove_msgid,
remove_contact_handler, remove_contact_dtor);
}
@@ -1863,9 +1888,10 @@ typedef struct {
} LDAPModifyOp;
static void
-modify_contact_modify_handler (LDAPOp *op, LDAPMessage *res)
+modify_contact_modify_handler (LDAPOp *op,
+ LDAPMessage *res)
{
- LDAPModifyOp *modify_op = (LDAPModifyOp*) op;
+ LDAPModifyOp *modify_op = (LDAPModifyOp *) op;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (op->backend);
gchar *ldap_error_msg;
gint ldap_error;
@@ -1917,9 +1943,10 @@ modify_contact_modify_handler (LDAPOp *op, LDAPMessage *res)
static void modify_contact_rename_handler (LDAPOp *op, LDAPMessage *res);
static void
-modify_contact_search_handler (LDAPOp *op, LDAPMessage *res)
+modify_contact_search_handler (LDAPOp *op,
+ LDAPMessage *res)
{
- LDAPModifyOp *modify_op = (LDAPModifyOp*) op;
+ LDAPModifyOp *modify_op = (LDAPModifyOp *) op;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (op->backend);
gint msg_type;
@@ -1934,8 +1961,8 @@ modify_contact_search_handler (LDAPOp *op, LDAPMessage *res)
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
/* if it's successful, we should get called with a
- RES_SEARCH_ENTRY and a RES_SEARCH_RESULT. if it's
- unsuccessful, we should only see a RES_SEARCH_RESULT */
+ * RES_SEARCH_ENTRY and a RES_SEARCH_RESULT. if it's
+ * unsuccessful, we should only see a RES_SEARCH_RESULT */
msg_type = ldap_msgtype (res);
if (msg_type == LDAP_RES_SEARCH_ENTRY) {
@@ -1964,7 +1991,7 @@ modify_contact_search_handler (LDAPOp *op, LDAPMessage *res)
gint new_dn_needed;
/* grab the result code, and set up the actual modify (or rename)
- if it was successful */
+ * if it was successful */
g_static_rec_mutex_lock (&eds_ldap_handler_lock);
ldap_parse_result (bl->priv->ldap, res, &ldap_error,
NULL, &ldap_error_msg, NULL, NULL, 0);
@@ -2025,7 +2052,7 @@ modify_contact_search_handler (LDAPOp *op, LDAPMessage *res)
if (ldap_error == LDAP_SUCCESS) {
op->handler = modify_contact_rename_handler;
- ldap_op_change_id ((LDAPOp*) modify_op,
+ ldap_op_change_id ((LDAPOp *) modify_op,
rename_contact_msgid);
/* Remove old entry from cache */
@@ -2055,9 +2082,10 @@ modify_contact_search_handler (LDAPOp *op, LDAPMessage *res)
}
static void
-modify_contact_rename_handler (LDAPOp *op, LDAPMessage *res)
+modify_contact_rename_handler (LDAPOp *op,
+ LDAPMessage *res)
{
- LDAPModifyOp *modify_op = (LDAPModifyOp*) op;
+ LDAPModifyOp *modify_op = (LDAPModifyOp *) op;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (op->backend);
gchar *ldap_error_msg;
gint ldap_error;
@@ -2124,7 +2152,7 @@ modify_contact_rename_handler (LDAPOp *op, LDAPMessage *res)
g_ptr_array_remove (modify_op->mod_array, NULL);
/* add our objectclass(es), making sure
- evolutionPerson is there if it's supported */
+ * evolutionPerson is there if it's supported */
if (e_contact_get (modify_op->current_contact, E_CONTACT_IS_LIST))
add_objectclass_mod (bl, modify_op->mod_array, modify_op->existing_objectclasses, TRUE, TRUE);
else
@@ -2133,7 +2161,7 @@ modify_contact_rename_handler (LDAPOp *op, LDAPMessage *res)
/* then put the NULL back */
g_ptr_array_add (modify_op->mod_array, NULL);
- ldap_mods = (LDAPMod**) modify_op->mod_array->pdata;
+ ldap_mods = (LDAPMod **) modify_op->mod_array->pdata;
#ifdef LDAP_DEBUG_MODIFY
if (enable_debug) {
gint i;
@@ -2174,7 +2202,7 @@ modify_contact_rename_handler (LDAPOp *op, LDAPMessage *res)
if (ldap_error == LDAP_SUCCESS) {
op->handler = modify_contact_modify_handler;
- ldap_op_change_id ((LDAPOp*) modify_op,
+ ldap_op_change_id ((LDAPOp *) modify_op,
modify_contact_msgid);
} else {
g_warning ("ldap_modify_ext returned %d\n", ldap_error);
@@ -2198,7 +2226,7 @@ modify_contact_rename_handler (LDAPOp *op, LDAPMessage *res)
static void
modify_contact_dtor (LDAPOp *op)
{
- LDAPModifyOp *modify_op = (LDAPModifyOp*) op;
+ LDAPModifyOp *modify_op = (LDAPModifyOp *) op;
g_free (modify_op->new_id);
g_free (modify_op->ldap_uid);
@@ -2214,10 +2242,10 @@ modify_contact_dtor (LDAPOp *op)
static void
e_book_backend_ldap_modify_contact (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- const gchar *vcard)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *vcard)
{
LDAPModifyOp *modify_op = g_new0 (LDAPModifyOp, 1);
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
@@ -2261,7 +2289,7 @@ e_book_backend_ldap_modify_contact (EBookBackend *backend,
} while (e_book_backend_ldap_reconnect (bl, book_view, ldap_error));
if (ldap_error == LDAP_SUCCESS) {
- ldap_op_add ((LDAPOp*) modify_op, backend, book,
+ ldap_op_add ((LDAPOp *) modify_op, backend, book,
book_view, opid, modify_contact_msgid,
modify_contact_search_handler, modify_contact_dtor);
} else {
@@ -2269,7 +2297,7 @@ e_book_backend_ldap_modify_contact (EBookBackend *backend,
opid,
ldap_error_to_response (ldap_error),
NULL);
- modify_contact_dtor ((LDAPOp*) modify_op);
+ modify_contact_dtor ((LDAPOp *) modify_op);
}
}
@@ -2278,7 +2306,8 @@ typedef struct {
} LDAPGetContactOp;
static void
-get_contact_handler (LDAPOp *op, LDAPMessage *res)
+get_contact_handler (LDAPOp *op,
+ LDAPMessage *res)
{
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (op->backend);
gint msg_type;
@@ -2302,8 +2331,8 @@ get_contact_handler (LDAPOp *op, LDAPMessage *res)
g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
/* the msg_type will be either SEARCH_ENTRY (if we're
- successful) or SEARCH_RESULT (if we're not), so we finish
- the op after either */
+ * successful) or SEARCH_RESULT (if we're not), so we finish
+ * the op after either */
msg_type = ldap_msgtype (res);
if (msg_type == LDAP_RES_SEARCH_ENTRY) {
LDAPMessage *e;
@@ -2336,10 +2365,10 @@ get_contact_handler (LDAPOp *op, LDAPMessage *res)
if (enable_debug) {
g_get_current_time (&end);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
+ diff = end.tv_sec * 1000 + end.tv_usec / 1000;
+ diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
printf ("get_contact_handler took %ld.%03ld seconds \n",
- diff/1000, diff%1000);
+ diff / 1000, diff % 1000);
}
}
else if (msg_type == LDAP_RES_SEARCH_RESULT) {
@@ -2377,17 +2406,17 @@ get_contact_handler (LDAPOp *op, LDAPMessage *res)
static void
get_contact_dtor (LDAPOp *op)
{
- LDAPGetContactOp *get_contact_op = (LDAPGetContactOp*) op;
+ LDAPGetContactOp *get_contact_op = (LDAPGetContactOp *) op;
g_free (get_contact_op);
}
static void
e_book_backend_ldap_get_contact (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- const gchar *id)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *id)
{
LDAPGetContactOp *get_contact_op;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
@@ -2452,24 +2481,24 @@ e_book_backend_ldap_get_contact (EBookBackend *backend,
} while (e_book_backend_ldap_reconnect (bl, book_view, ldap_error));
if (ldap_error == LDAP_SUCCESS) {
- ldap_op_add ((LDAPOp*) get_contact_op, backend, book,
+ ldap_op_add ((LDAPOp *) get_contact_op, backend, book,
book_view, opid, get_contact_msgid,
get_contact_handler, get_contact_dtor);
if (enable_debug) {
printf("e_book_backend_ldap_get_contact invoked get_contact_handler\n");
g_get_current_time (&end);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
+ diff = end.tv_sec * 1000 + end.tv_usec / 1000;
+ diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
printf("and took %ld.%03ld seconds\n",
- diff/1000, diff%1000);
+ diff / 1000, diff % 1000);
}
} else {
e_data_book_respond_get_contact (book,
opid,
ldap_error_to_response (ldap_error),
"");
- get_contact_dtor ((LDAPOp*) get_contact_op);
+ get_contact_dtor ((LDAPOp *) get_contact_op);
}
}
@@ -2479,9 +2508,10 @@ typedef struct {
} LDAPGetContactListOp;
static void
-contact_list_handler (LDAPOp *op, LDAPMessage *res)
+contact_list_handler (LDAPOp *op,
+ LDAPMessage *res)
{
- LDAPGetContactListOp *contact_list_op = (LDAPGetContactListOp*) op;
+ LDAPGetContactListOp *contact_list_op = (LDAPGetContactListOp *) op;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (op->backend);
LDAPMessage *e;
gint msg_type;
@@ -2572,8 +2602,8 @@ contact_list_handler (LDAPOp *op, LDAPMessage *res)
if (enable_debug) {
printf ("contact_list_handler success ");
g_get_current_time (&end);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
+ diff = end.tv_sec * 1000 + end.tv_usec / 1000;
+ diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
printf("and took %ld.%03ld seconds\n", diff/1000, diff%1000);
}
}
@@ -2591,7 +2621,7 @@ contact_list_handler (LDAPOp *op, LDAPMessage *res)
static void
contact_list_dtor (LDAPOp *op)
{
- LDAPGetContactListOp *contact_list_op = (LDAPGetContactListOp*) op;
+ LDAPGetContactListOp *contact_list_op = (LDAPGetContactListOp *) op;
g_slist_foreach (contact_list_op->contacts, (GFunc) g_free, NULL);
g_slist_free (contact_list_op->contacts);
@@ -2601,10 +2631,10 @@ contact_list_dtor (LDAPOp *op)
static void
e_book_backend_ldap_get_contact_list (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- const gchar *query)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *query)
{
LDAPGetContactListOp *contact_list_op;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
@@ -2679,14 +2709,14 @@ e_book_backend_ldap_get_contact_list (EBookBackend *backend,
g_free (ldap_query);
if (ldap_error == LDAP_SUCCESS) {
- ldap_op_add ((LDAPOp*) contact_list_op, backend, book,
+ ldap_op_add ((LDAPOp *) contact_list_op, backend, book,
book_view, opid, contact_list_msgid,
contact_list_handler, contact_list_dtor);
if (enable_debug) {
g_get_current_time (&end);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
+ diff = end.tv_sec * 1000 + end.tv_usec / 1000;
+ diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
printf ("e_book_backend_ldap_get_contact_list invoked contact_list_handler ");
printf ("and took %ld.%03ld seconds\n", diff/1000, diff%1000);
@@ -2696,7 +2726,7 @@ e_book_backend_ldap_get_contact_list (EBookBackend *backend,
opid,
ldap_error_to_response (ldap_error),
NULL);
- contact_list_dtor ((LDAPOp*) contact_list_op);
+ contact_list_dtor ((LDAPOp *) contact_list_op);
}
}
@@ -2706,7 +2736,8 @@ typedef struct {
} LDAPGetContactListUIDsOp;
static void
-contact_list_uids_handler (LDAPOp *op, LDAPMessage *res)
+contact_list_uids_handler (LDAPOp *op,
+ LDAPMessage *res)
{
LDAPGetContactListUIDsOp *contact_list_uids_op = (LDAPGetContactListUIDsOp *) op;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (op->backend);
@@ -2784,8 +2815,8 @@ contact_list_uids_handler (LDAPOp *op, LDAPMessage *res)
if (enable_debug) {
printf ("contact_list_uids_handler success ");
g_get_current_time (&end);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
+ diff = end.tv_sec * 1000 + end.tv_usec / 1000;
+ diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
printf("and took %ld.%03ld seconds\n", diff/1000, diff%1000);
}
}
@@ -2811,7 +2842,11 @@ contact_list_uids_dtor (LDAPOp *op)
}
static void
-e_book_backend_ldap_get_contact_list_uids (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *query)
+e_book_backend_ldap_get_contact_list_uids (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *query)
{
LDAPGetContactListUIDsOp *contact_list_uids_op;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
@@ -2885,14 +2920,14 @@ e_book_backend_ldap_get_contact_list_uids (EBookBackend *backend, EDataBook *boo
g_free (ldap_query);
if (ldap_error == LDAP_SUCCESS) {
- ldap_op_add ((LDAPOp*) contact_list_uids_op, backend, book,
+ ldap_op_add ((LDAPOp *) contact_list_uids_op, backend, book,
book_view, opid, contact_list_uids_msgid,
contact_list_uids_handler, contact_list_uids_dtor);
if (enable_debug) {
g_get_current_time (&end);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
+ diff = end.tv_sec * 1000 + end.tv_usec / 1000;
+ diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
printf ("e_book_backend_ldap_get_contact_list_uids invoked contact_list_uids_handler ");
printf ("and took %ld.%03ld seconds\n", diff/1000, diff%1000);
@@ -2912,17 +2947,18 @@ static EContactField email_ids[4] = {
/* List property functions */
static void
-email_populate (EContact *contact, gchar **values)
+email_populate (EContact *contact,
+ gchar **values)
{
gint i;
for (i = 0; values[i] && i < 4; i++)
e_contact_set (contact, email_ids[i], values[i]);
}
-static struct berval**
+static struct berval **
email_ber (EContact *contact)
{
- struct berval** result;
+ struct berval ** result;
const gchar *emails[4];
gint i, j, num = 0;
@@ -2938,7 +2974,7 @@ email_ber (EContact *contact)
if (num == 0)
return NULL;
- result = g_new (struct berval*, num + 1);
+ result = g_new (struct berval *, num + 1);
for (i = 0; i < num; i++)
result[i] = g_new (struct berval, 1);
@@ -2957,7 +2993,8 @@ email_ber (EContact *contact)
}
static gboolean
-email_compare (EContact *contact1, EContact *contact2)
+email_compare (EContact *contact1,
+ EContact *contact2)
{
const gchar *email1, *email2;
gint i;
@@ -2984,7 +3021,8 @@ email_compare (EContact *contact1, EContact *contact2)
}
static void
-member_populate (EContact *contact, gchar **values)
+member_populate (EContact *contact,
+ gchar **values)
{
gint i;
gchar **member_info;
@@ -3017,12 +3055,12 @@ member_populate (EContact *contact, gchar **values)
}
}
-static struct berval**
+static struct berval **
member_ber (EContact *contact)
{
- struct berval** result;
+ struct berval ** result;
GList *members, *l, *p;
- gint i=0, num = 0;
+ gint i = 0, num = 0;
gchar *dn;
if (!(e_contact_get (contact, E_CONTACT_IS_LIST)))
@@ -3033,7 +3071,7 @@ member_ber (EContact *contact)
if (num == 0)
return NULL;
- result = g_new (struct berval*, num + 1);
+ result = g_new (struct berval *, num + 1);
for (l = members; l != NULL; l = g_list_next (l)) {
EVCardAttribute *attr = l->data;
@@ -3060,7 +3098,8 @@ member_ber (EContact *contact)
}
static gboolean
-member_compare (EContact *contact_new, EContact *contact_current)
+member_compare (EContact *contact_new,
+ EContact *contact_current)
{
GList *members_new, *members_cur, *l1, *l2, *p_new, *p_cur;
gint len1 = 0, len2 = 0;
@@ -3137,7 +3176,8 @@ member_compare (EContact *contact_new, EContact *contact_current)
}
static void
-homephone_populate (EContact *contact, gchar **values)
+homephone_populate (EContact *contact,
+ gchar **values)
{
if (values[0]) {
e_contact_set (contact, E_CONTACT_PHONE_HOME, values[0]);
@@ -3146,10 +3186,10 @@ homephone_populate (EContact *contact, gchar **values)
}
}
-static struct berval**
+static struct berval **
homephone_ber (EContact *contact)
{
- struct berval** result;
+ struct berval ** result;
const gchar *homephones[3];
gint i, j, num;
@@ -3162,7 +3202,7 @@ homephone_ber (EContact *contact)
if (num == 0)
return NULL;
- result = g_new (struct berval*, num + 1);
+ result = g_new (struct berval *, num + 1);
for (i = 0; i < num; i++)
result[i] = g_new (struct berval, 1);
@@ -3181,7 +3221,8 @@ homephone_ber (EContact *contact)
}
static gboolean
-homephone_compare (EContact *contact1, EContact *contact2)
+homephone_compare (EContact *contact1,
+ EContact *contact2)
{
gint phone_ids[2] = { E_CONTACT_PHONE_HOME, E_CONTACT_PHONE_HOME_2 };
const gchar *phone1, *phone2;
@@ -3205,7 +3246,8 @@ homephone_compare (EContact *contact1, EContact *contact2)
}
static void
-business_populate (EContact *contact, gchar **values)
+business_populate (EContact *contact,
+ gchar **values)
{
if (values[0]) {
e_contact_set (contact, E_CONTACT_PHONE_BUSINESS, values[0]);
@@ -3214,10 +3256,10 @@ business_populate (EContact *contact, gchar **values)
}
}
-static struct berval**
+static struct berval **
business_ber (EContact *contact)
{
- struct berval** result;
+ struct berval ** result;
const gchar *business_phones[3];
gint i, j, num;
@@ -3230,7 +3272,7 @@ business_ber (EContact *contact)
if (num == 0)
return NULL;
- result = g_new (struct berval*, num + 1);
+ result = g_new (struct berval *, num + 1);
for (i = 0; i < num; i++)
result[i] = g_new (struct berval, 1);
@@ -3249,7 +3291,8 @@ business_ber (EContact *contact)
}
static gboolean
-business_compare (EContact *contact1, EContact *contact2)
+business_compare (EContact *contact1,
+ EContact *contact2)
{
gint phone_ids[2] = { E_CONTACT_PHONE_BUSINESS, E_CONTACT_PHONE_BUSINESS_2 };
const gchar *phone1, *phone2;
@@ -3273,7 +3316,8 @@ business_compare (EContact *contact1, EContact *contact2)
}
static void
-anniversary_populate (EContact *contact, gchar **values)
+anniversary_populate (EContact *contact,
+ gchar **values)
{
if (values[0]) {
EContactDate *dt = e_contact_date_from_string (values[0]);
@@ -3282,11 +3326,11 @@ anniversary_populate (EContact *contact, gchar **values)
}
}
-static struct berval**
+static struct berval **
anniversary_ber (EContact *contact)
{
EContactDate *dt;
- struct berval** result = NULL;
+ struct berval ** result = NULL;
dt = e_contact_get (contact, E_CONTACT_ANNIVERSARY);
@@ -3295,7 +3339,7 @@ anniversary_ber (EContact *contact)
anniversary = e_contact_date_to_string (dt);
- result = g_new (struct berval*, 2);
+ result = g_new (struct berval *, 2);
result[0] = g_new (struct berval, 1);
result[0]->bv_val = anniversary;
result[0]->bv_len = strlen (anniversary);
@@ -3309,7 +3353,8 @@ anniversary_ber (EContact *contact)
}
static gboolean
-anniversary_compare (EContact *contact1, EContact *contact2)
+anniversary_compare (EContact *contact1,
+ EContact *contact2)
{
EContactDate *dt1, *dt2;
gboolean equal;
@@ -3326,7 +3371,8 @@ anniversary_compare (EContact *contact1, EContact *contact2)
}
static void
-birthday_populate (EContact *contact, gchar **values)
+birthday_populate (EContact *contact,
+ gchar **values)
{
if (values[0]) {
EContactDate *dt = e_contact_date_from_string (values[0]);
@@ -3335,11 +3381,11 @@ birthday_populate (EContact *contact, gchar **values)
}
}
-static struct berval**
+static struct berval **
birthday_ber (EContact *contact)
{
EContactDate *dt;
- struct berval** result = NULL;
+ struct berval ** result = NULL;
dt = e_contact_get (contact, E_CONTACT_BIRTH_DATE);
if (dt) {
@@ -3347,7 +3393,7 @@ birthday_ber (EContact *contact)
birthday = e_contact_date_to_string (dt);
- result = g_new (struct berval*, 2);
+ result = g_new (struct berval *, 2);
result[0] = g_new (struct berval, 1);
result[0]->bv_val = birthday;
result[0]->bv_len = strlen (birthday);
@@ -3361,7 +3407,8 @@ birthday_ber (EContact *contact)
}
static gboolean
-birthday_compare (EContact *contact1, EContact *contact2)
+birthday_compare (EContact *contact1,
+ EContact *contact2)
{
EContactDate *dt1, *dt2;
gboolean equal;
@@ -3378,7 +3425,8 @@ birthday_compare (EContact *contact1, EContact *contact2)
}
static void
-category_populate (EContact *contact, gchar **values)
+category_populate (EContact *contact,
+ gchar **values)
{
gint i;
GList *categories = NULL;
@@ -3392,10 +3440,10 @@ category_populate (EContact *contact, gchar **values)
g_list_free (categories);
}
-static struct berval**
+static struct berval **
category_ber (EContact *contact)
{
- struct berval** result = NULL;
+ struct berval ** result = NULL;
GList *categories;
const gchar *category_string;
@@ -3408,7 +3456,7 @@ category_ber (EContact *contact)
if (g_list_length (categories) != 0) {
gint i;
GList *iter;
- result = g_new0 (struct berval*, g_list_length (categories) + 1);
+ result = g_new0 (struct berval *, g_list_length (categories) + 1);
for (iter = categories, i = 0; iter; iter = iter->next) {
gchar *category = iter->data;
@@ -3428,7 +3476,8 @@ category_ber (EContact *contact)
}
static gboolean
-category_compare (EContact *contact1, EContact *contact2)
+category_compare (EContact *contact1,
+ EContact *contact2)
{
const gchar *categories1, *categories2;
gboolean equal;
@@ -3453,7 +3502,10 @@ static EContactAddress * getormakeEContactAddress (EContact * card, EContactFiel
}
static void
-address_populate (EContact * card, gchar **values, EContactField field, EContactField other_field)
+address_populate (EContact *card,
+ gchar **values,
+ EContactField field,
+ EContactField other_field)
{
if (values[0]) {
EContactAddress *contact_addr;
@@ -3476,7 +3528,8 @@ address_populate (EContact * card, gchar **values, EContactField field, EContact
}
static void
-work_city_populate (EContact * card, gchar **values)
+work_city_populate (EContact *card,
+ gchar **values)
{
EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_WORK);
contact_addr->locality = g_strdup (values[0]);
@@ -3485,7 +3538,8 @@ work_city_populate (EContact * card, gchar **values)
}
static void
-work_state_populate (EContact * card, gchar **values)
+work_state_populate (EContact *card,
+ gchar **values)
{
EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_WORK);
contact_addr->region = g_strdup (values[0]);
@@ -3494,7 +3548,8 @@ work_state_populate (EContact * card, gchar **values)
}
static void
-work_po_populate (EContact * card, gchar **values)
+work_po_populate (EContact *card,
+ gchar **values)
{
EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_WORK);
contact_addr->po = g_strdup (values[0]);
@@ -3503,7 +3558,8 @@ work_po_populate (EContact * card, gchar **values)
}
static void
-work_zip_populate (EContact * card, gchar **values)
+work_zip_populate (EContact *card,
+ gchar **values)
{
EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_WORK);
contact_addr->code = g_strdup (values[0]);
@@ -3512,7 +3568,8 @@ work_zip_populate (EContact * card, gchar **values)
}
static void
-work_country_populate (EContact * card, gchar **values)
+work_country_populate (EContact *card,
+ gchar **values)
{
EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_WORK);
contact_addr->country = g_strdup (values[0]);
@@ -3521,7 +3578,8 @@ work_country_populate (EContact * card, gchar **values)
}
static void
-home_city_populate (EContact * card, gchar **values)
+home_city_populate (EContact *card,
+ gchar **values)
{
EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_HOME);
contact_addr->locality = g_strdup (values[0]);
@@ -3530,7 +3588,8 @@ home_city_populate (EContact * card, gchar **values)
}
static void
-home_state_populate (EContact * card, gchar **values)
+home_state_populate (EContact *card,
+ gchar **values)
{
EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_HOME);
contact_addr->region = g_strdup (values[0]);
@@ -3539,7 +3598,8 @@ home_state_populate (EContact * card, gchar **values)
}
static void
-home_zip_populate (EContact * card, gchar **values)
+home_zip_populate (EContact *card,
+ gchar **values)
{
EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_HOME);
contact_addr->code = g_strdup (values[0]);
@@ -3548,7 +3608,8 @@ home_zip_populate (EContact * card, gchar **values)
}
static void
-home_country_populate (EContact * card, gchar **values)
+home_country_populate (EContact *card,
+ gchar **values)
{
EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_HOME);
contact_addr->country = g_strdup (values[0]);
@@ -3557,25 +3618,29 @@ home_country_populate (EContact * card, gchar **values)
}
static void
-home_address_populate (EContact * card, gchar **values)
+home_address_populate (EContact *card,
+ gchar **values)
{
address_populate (card, values, E_CONTACT_ADDRESS_LABEL_HOME, E_CONTACT_ADDRESS_HOME);
}
static void
-work_address_populate (EContact * card, gchar **values)
+work_address_populate (EContact *card,
+ gchar **values)
{
address_populate (card, values, E_CONTACT_ADDRESS_LABEL_WORK, E_CONTACT_ADDRESS_WORK);
}
static void
-other_address_populate (EContact * card, gchar **values)
+other_address_populate (EContact *card,
+ gchar **values)
{
address_populate (card, values, E_CONTACT_ADDRESS_LABEL_OTHER, E_CONTACT_ADDRESS_OTHER);
}
static struct berval **
-address_ber (EContact * card, EContactField field)
+address_ber (EContact *card,
+ EContactField field)
{
struct berval **result = NULL;
gchar *address, *i;
@@ -3599,25 +3664,27 @@ address_ber (EContact * card, EContactField field)
}
static struct berval **
-home_address_ber (EContact * card)
+home_address_ber (EContact *card)
{
return address_ber (card, E_CONTACT_ADDRESS_LABEL_HOME);
}
static struct berval **
-work_address_ber (EContact * card)
+work_address_ber (EContact *card)
{
return address_ber (card, E_CONTACT_ADDRESS_LABEL_WORK);
}
static struct berval **
-other_address_ber (EContact * card)
+other_address_ber (EContact *card)
{
return address_ber (card, E_CONTACT_ADDRESS_LABEL_OTHER);
}
static gboolean
-address_compare (EContact * ecard1, EContact * ecard2, EContactField field)
+address_compare (EContact *ecard1,
+ EContact *ecard2,
+ EContactField field)
{
const gchar *address1, *address2;
@@ -3634,25 +3701,29 @@ address_compare (EContact * ecard1, EContact * ecard2, EContactField field)
}
static gboolean
-home_address_compare (EContact * ecard1, EContact * ecard2)
+home_address_compare (EContact *ecard1,
+ EContact *ecard2)
{
return address_compare (ecard1, ecard2, E_CONTACT_ADDRESS_LABEL_HOME);
}
static gboolean
-work_address_compare (EContact * ecard1, EContact * ecard2)
+work_address_compare (EContact *ecard1,
+ EContact *ecard2)
{
return address_compare (ecard1, ecard2, E_CONTACT_ADDRESS_LABEL_WORK);
}
static gboolean
-other_address_compare (EContact * ecard1, EContact * ecard2)
+other_address_compare (EContact *ecard1,
+ EContact *ecard2)
{
return address_compare (ecard1, ecard2, E_CONTACT_ADDRESS_LABEL_OTHER);
}
static void
-photo_populate (EContact *contact, struct berval **ber_values)
+photo_populate (EContact *contact,
+ struct berval **ber_values)
{
if (ber_values && ber_values[0]) {
EContactPhoto photo;
@@ -3688,7 +3759,8 @@ photo_ber (EContact *contact)
}
static gboolean
-photo_compare (EContact * ecard1, EContact * ecard2)
+photo_compare (EContact *ecard1,
+ EContact *ecard2)
{
EContactPhoto *photo1, *photo2;
gboolean equal;
@@ -3721,7 +3793,8 @@ photo_compare (EContact * ecard1, EContact * ecard2)
}
static void
-cert_populate (EContact *contact, struct berval **ber_values)
+cert_populate (EContact *contact,
+ struct berval **ber_values)
{
if (ber_values && ber_values[0]) {
EContactCert cert;
@@ -3808,7 +3881,10 @@ extend_query_value (gchar *str)
}
static ESExpResult *
-func_and (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_and (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
EBookBackendLDAPSExpData *ldap_data = data;
ESExpResult *r;
@@ -3817,7 +3893,7 @@ func_and (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data
if (argc > 0) {
gint i, empty;
- strings = g_new0 (gchar *, argc+3);
+ strings = g_new0 (gchar *, argc + 3);
strings[0] = g_strdup ("(&");
strings[argc+3 - 2] = g_strdup (")");
@@ -3851,7 +3927,10 @@ func_and (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data
}
static ESExpResult *
-func_or (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_or (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
EBookBackendLDAPSExpData *ldap_data = data;
ESExpResult *r;
@@ -3860,7 +3939,7 @@ func_or (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
if (argc > 0) {
gint i, empty;
- strings = g_new0 (gchar *, argc+3);
+ strings = g_new0 (gchar *, argc + 3);
strings[0] = g_strdup ("(|");
strings[argc+3 - 2] = g_strdup (")");
@@ -3894,7 +3973,10 @@ func_or (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
}
static ESExpResult *
-func_not (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_not (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
EBookBackendLDAPSExpData *ldap_data = data;
ESExpResult *r;
@@ -3913,7 +3995,10 @@ func_not (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data
}
static ESExpResult *
-func_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_contains (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
EBookBackendLDAPSExpData *ldap_data = data;
ESExpResult *r;
@@ -3984,7 +4069,10 @@ func_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
}
static ESExpResult *
-func_is (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_is (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
EBookBackendLDAPSExpData *ldap_data = data;
ESExpResult *r;
@@ -4017,7 +4105,10 @@ func_is (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
}
static ESExpResult *
-func_beginswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_beginswith (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
EBookBackendLDAPSExpData *ldap_data = data;
ESExpResult *r;
@@ -4040,8 +4131,8 @@ func_beginswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpoint
}
/* insert hack for fileAs queries, since we need to do
- the right thing if the server supports them or not,
- and for entries that have no fileAs attribute. */
+ * the right thing if the server supports them or not,
+ * and for entries that have no fileAs attribute. */
if (ldap_attr) {
if (!strcmp (propname, "full_name")) {
ldap_data->list = g_list_prepend (ldap_data->list,
@@ -4076,7 +4167,10 @@ func_beginswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpoint
}
static ESExpResult *
-func_endswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_endswith (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
EBookBackendLDAPSExpData *ldap_data = data;
ESExpResult *r;
@@ -4103,7 +4197,10 @@ func_endswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
}
static ESExpResult *
-func_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_exists (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
EBookBackendLDAPSExpData *ldap_data = data;
ESExpResult *r;
@@ -4172,7 +4269,8 @@ static struct {
};
static gchar *
-e_book_backend_ldap_build_query (EBookBackendLDAP *bl, const gchar *query)
+e_book_backend_ldap_build_query (EBookBackendLDAP *bl,
+ const gchar *query)
{
ESExp *sexp;
ESExpResult *r;
@@ -4261,9 +4359,9 @@ typedef struct {
static EContact *
build_contact_from_entry (EBookBackendLDAP *bl,
- LDAPMessage *e,
- GList **existing_objectclasses,
- gchar **ldap_uid)
+ LDAPMessage *e,
+ GList **existing_objectclasses,
+ gchar **ldap_uid)
{
EContact *contact = e_contact_new ();
gchar *dn;
@@ -4359,7 +4457,7 @@ build_contact_from_entry (EBookBackendLDAP *bl,
}
else if (info->prop_type & PROP_TYPE_COMPLEX) {
/* if it's a list call the contact-populate function,
- which calls g_object_set to set the property */
+ * which calls g_object_set to set the property */
info->populate_contact_func (contact,
values);
}
@@ -4381,7 +4479,7 @@ build_contact_from_entry (EBookBackendLDAP *bl,
view_limit = bl->priv->ldap_limit;
count = ldap_count_values (values);
- member_info = g_new0 (gchar *, count+1);
+ member_info = g_new0 (gchar *, count + 1);
for (j = 0; values[j] ; j++) {
/* get the email id for the given dn */
@@ -4516,7 +4614,7 @@ poll_ldap (EBookBackendLDAP *bl)
g_warning ("unknown operation, msgid = %d", msgid);
/* XXX should the call to op->handler be
- protected by the lock? */
+ * protected by the lock? */
g_static_rec_mutex_unlock (&bl->priv->op_hash_mutex);
ldap_msgfree (res);
@@ -4527,9 +4625,10 @@ poll_ldap (EBookBackendLDAP *bl)
}
static void
-ldap_search_handler (LDAPOp *op, LDAPMessage *res)
+ldap_search_handler (LDAPOp *op,
+ LDAPMessage *res)
{
- LDAPSearchOp *search_op = (LDAPSearchOp*) op;
+ LDAPSearchOp *search_op = (LDAPSearchOp *) op;
EDataBookView *view = search_op->view;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (op->backend);
LDAPMessage *e;
@@ -4613,8 +4712,8 @@ ldap_search_handler (LDAPOp *op, LDAPMessage *res)
ldap_op_finished (op);
if (enable_debug) {
g_get_current_time (&end);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
+ diff = end.tv_sec * 1000 + end.tv_usec / 1000;
+ diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
printf ("ldap_search_handler... completed with error code %d ", ldap_error);
printf ("and took %ld.%03ld seconds\n", diff/1000, diff%1000);
}
@@ -4631,7 +4730,7 @@ ldap_search_handler (LDAPOp *op, LDAPMessage *res)
static void
ldap_search_dtor (LDAPOp *op)
{
- LDAPSearchOp *search_op = (LDAPSearchOp*) op;
+ LDAPSearchOp *search_op = (LDAPSearchOp *) op;
d(printf ("ldap_search_dtor (%p)\n", search_op->view));
@@ -4646,8 +4745,8 @@ ldap_search_dtor (LDAPOp *op)
static void
e_book_backend_ldap_search (EBookBackendLDAP *bl,
- EDataBook *book,
- EDataBookView *view)
+ EDataBook *book,
+ EDataBookView *view)
{
gchar *ldap_query;
GList *contacts;
@@ -4737,15 +4836,15 @@ e_book_backend_ldap_search (EBookBackendLDAP *bl,
op->aborted = FALSE;
e_data_book_view_ref (view);
- ldap_op_add ((LDAPOp*) op, E_BOOK_BACKEND (bl), book, view,
+ ldap_op_add ((LDAPOp *) op, E_BOOK_BACKEND (bl), book, view,
0, search_msgid,
ldap_search_handler, ldap_search_dtor);
if (enable_debug) {
printf ("e_book_backend_ldap_search invoked ldap_search_handler ");
g_get_current_time (&end);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
+ diff = end.tv_sec * 1000 + end.tv_usec / 1000;
+ diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
printf("and took %ld.%03ld seconds\n", diff/1000,diff%1000);
}
@@ -4761,8 +4860,8 @@ e_book_backend_ldap_search (EBookBackendLDAP *bl,
}
static void
-e_book_backend_ldap_start_book_view (EBookBackend *backend,
- EDataBookView *view)
+e_book_backend_ldap_start_book_view (EBookBackend *backend,
+ EDataBookView *view)
{
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
@@ -4772,8 +4871,8 @@ e_book_backend_ldap_start_book_view (EBookBackend *backend,
}
static void
-e_book_backend_ldap_stop_book_view (EBookBackend *backend,
- EDataBookView *view)
+e_book_backend_ldap_stop_book_view (EBookBackend *backend,
+ EDataBookView *view)
{
LDAPSearchOp *op;
@@ -4782,7 +4881,7 @@ e_book_backend_ldap_stop_book_view (EBookBackend *backend,
op = g_object_get_data (G_OBJECT (view), "EBookBackendLDAP.BookView::search_op");
if (op) {
op->aborted = TRUE;
- ldap_op_finished ((LDAPOp*) op);
+ ldap_op_finished ((LDAPOp *) op);
g_free (op);
}
}
@@ -4791,7 +4890,8 @@ e_book_backend_ldap_stop_book_view (EBookBackend *backend,
#define SASL_PREFIX "sasl/"
static void
-generate_cache_handler (LDAPOp *op, LDAPMessage *res)
+generate_cache_handler (LDAPOp *op,
+ LDAPMessage *res)
{
LDAPGetContactListOp *contact_list_op = (LDAPGetContactListOp *) op;
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (op->backend);
@@ -4860,10 +4960,10 @@ generate_cache_handler (LDAPOp *op, LDAPMessage *res)
ldap_op_finished (op);
if (enable_debug) {
g_get_current_time (&end);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
+ diff = end.tv_sec * 1000 + end.tv_usec / 1000;
+ diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
printf ("generate_cache_handler ... completed in %ld.%03ld seconds\n",
- diff/1000,diff%1000);
+ diff / 1000,diff % 1000);
}
}
}
@@ -4922,14 +5022,14 @@ generate_cache (EBookBackendLDAP *book_backend_ldap)
} while (e_book_backend_ldap_reconnect (book_backend_ldap, NULL, ldap_error));
if (ldap_error == LDAP_SUCCESS) {
- ldap_op_add ((LDAPOp*) contact_list_op, (EBookBackend *) book_backend_ldap, NULL /* book */,
+ ldap_op_add ((LDAPOp *) contact_list_op, (EBookBackend *) book_backend_ldap, NULL /* book */,
NULL /* book_view */, 0 /* opid */, contact_list_msgid,
generate_cache_handler, generate_cache_dtor);
if (enable_debug) {
printf ("generating offline cache invoked generate_cache_handler ");
g_get_current_time (&end);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
+ diff = end.tv_sec * 1000 + end.tv_usec / 1000;
+ diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
printf("and took %ld.%03ld seconds\n", diff/1000, diff%1000);
}
} else {
@@ -4939,8 +5039,8 @@ generate_cache (EBookBackendLDAP *book_backend_ldap)
static void
e_book_backend_ldap_authenticate_user (EBookBackend *backend,
- GCancellable *cancellable,
- ECredentials *credentials)
+ GCancellable *cancellable,
+ ECredentials *credentials)
{
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
gint ldap_error;
@@ -5099,9 +5199,9 @@ e_book_backend_ldap_authenticate_user (EBookBackend *backend,
e_book_backend_notify_readonly (backend, FALSE);
/* force a requery on the root dse since some ldap
- servers are set up such that they don't report
- anything (including the schema DN) until the user
- is authenticated */
+ * servers are set up such that they don't report
+ * anything (including the schema DN) until the user
+ * is authenticated */
if (!bl->priv->evolutionPersonChecked) {
ldap_error = query_ldap_root_dse (bl);
@@ -5119,7 +5219,9 @@ e_book_backend_ldap_authenticate_user (EBookBackend *backend,
}
static void
-ldap_cancel_op (gpointer key, gpointer value, gpointer data)
+ldap_cancel_op (gpointer key,
+ gpointer value,
+ gpointer data)
{
EBookBackendLDAP *bl = data;
LDAPOp *op = value;
@@ -5142,11 +5244,11 @@ ldap_cancel_all_operations (EBookBackend *backend)
}
static void
-e_book_backend_ldap_open (EBookBackend *backend,
- EDataBook *book,
- guint opid,
- GCancellable *cancellable,
- gboolean only_if_exists)
+e_book_backend_ldap_open (EBookBackend *backend,
+ EDataBook *book,
+ guint opid,
+ GCancellable *cancellable,
+ gboolean only_if_exists)
{
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
ESource *source = e_book_backend_get_source (backend);
@@ -5260,7 +5362,7 @@ e_book_backend_ldap_open (EBookBackend *backend,
auth_required = str && *str && !g_str_equal (str, "none") && !g_str_equal (str, "0");
if (auth_required && !g_str_equal (str, "ldap/simple-email")) {
/* Requires authentication, do not try to bind without it,
- but report success instead, as we are loaded. */
+ * but report success instead, as we are loaded. */
if (enable_debug)
printf ("%s ... skipping anonymous bind, because auth required\n", G_STRFUNC);
@@ -5294,16 +5396,23 @@ e_book_backend_ldap_open (EBookBackend *backend,
}
static void
-e_book_backend_ldap_remove (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable)
+e_book_backend_ldap_remove (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable)
{
/* if we ever add caching, we'll remove it here, but for now,
- just report back Success */
+ * just report back Success */
e_data_book_respond_remove (book, opid, EDB_ERROR (SUCCESS));
}
static void
-e_book_backend_ldap_get_backend_property (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *prop_name)
+e_book_backend_ldap_get_backend_property (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *prop_name)
{
g_return_if_fail (prop_name != NULL);
@@ -5359,7 +5468,8 @@ struct call_data {
};
static gboolean
-call_cb (EDataBookView *view, gpointer user_data)
+call_cb (EDataBookView *view,
+ gpointer user_data)
{
struct call_data *cd = user_data;
@@ -5396,7 +5506,8 @@ start_views (EBookBackend *backend)
#endif
static void
-e_book_backend_ldap_set_online (EBookBackend *backend, gboolean is_online)
+e_book_backend_ldap_set_online (EBookBackend *backend,
+ gboolean is_online)
{
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
@@ -5466,7 +5577,9 @@ e_book_backend_ldap_new (void)
}
static gboolean
-call_dtor (gint msgid, LDAPOp *op, gpointer data)
+call_dtor (gint msgid,
+ LDAPOp *op,
+ gpointer data)
{
EBookBackendLDAP *bl;
diff --git a/addressbook/backends/ldap/openldap-extract.h b/addressbook/backends/ldap/openldap-extract.h
index eb8457f..6a356d0 100644
--- a/addressbook/backends/ldap/openldap-extract.h
+++ b/addressbook/backends/ldap/openldap-extract.h
@@ -193,12 +193,12 @@ get_token (const gchar **sp,
(*sp)++;
if (**sp == '\'') {
q = *sp;
- res = LDAP_MALLOC (q-p+1);
+ res = LDAP_MALLOC (q - p + 1);
if (!res) {
kind = TK_OUTOFMEM;
} else {
- strncpy (res,p,q-p);
- res[q-p] = '\0';
+ strncpy (res,p,q - p);
+ res[q - p] = '\0';
*token_val = res;
}
(*sp)++;
@@ -217,12 +217,12 @@ get_token (const gchar **sp,
**sp != '\0')
(*sp)++;
q = *sp;
- res = LDAP_MALLOC (q-p+1);
+ res = LDAP_MALLOC (q - p + 1);
if (!res) {
kind = TK_OUTOFMEM;
} else {
- strncpy (res,p,q-p);
- res[q-p] = '\0';
+ strncpy (res,p,q - p);
+ res[q - p] = '\0';
*token_val = res;
}
break;
@@ -287,7 +287,7 @@ ldap_int_parse_numericoid (const gchar **sp, gint *code, const gint flags)
if (flags & LDAP_SCHEMA_SKIP) {
res = (gchar *) start;
} else {
- res = LDAP_MALLOC (len+1);
+ res = LDAP_MALLOC (len + 1);
if (!res) {
*code = LDAP_SCHERR_OUTOFMEM;
return (NULL);
@@ -326,9 +326,9 @@ parse_qdescrs (const gchar **sp, gint *code)
if (kind == TK_RIGHTPAREN)
break;
if (kind == TK_QDESCR) {
- if (pos == size-2) {
+ if (pos == size - 2) {
size++;
- res1 = LDAP_REALLOC (res,size*sizeof (gchar *));
+ res1 = LDAP_REALLOC (res,size * sizeof (gchar *));
if (!res1) {
LDAP_VFREE (res);
LDAP_FREE (sval);
@@ -417,9 +417,9 @@ parse_oids (const gchar **sp, gint *code, const gint allow_quoted)
if (kind == TK_BAREWORD ||
(allow_quoted &&
kind == TK_QDSTRING)) {
- if (pos == size-2) {
+ if (pos == size - 2) {
size++;
- res1 = LDAP_REALLOC (res,size*sizeof (gchar *));
+ res1 = LDAP_REALLOC (res,size * sizeof (gchar *));
if (!res1) {
LDAP_FREE (sval);
LDAP_VFREE (res);
@@ -551,8 +551,8 @@ ldap_str2objectclass (LDAP_CONST gchar *s,
} else if (flags &
LDAP_SCHEMA_ALLOW_OID_MACRO) {
/* Non-numerical OID, ignore */
- gint len = ss-savepos;
- oc->oc_oid = LDAP_MALLOC (len+1);
+ gint len = ss - savepos;
+ oc->oc_oid = LDAP_MALLOC (len + 1);
strncpy (oc->oc_oid, savepos, len);
oc->oc_oid[len] = 0;
}
@@ -1124,7 +1124,7 @@ ldap_url_parse_ext (LDAP_CONST gchar *url_in,
}
if (enclosed) {
- p = &url[strlen (url)-1];
+ p = &url[strlen (url) - 1];
if (*p != '>') {
LDAP_FREE (url);
@@ -1391,7 +1391,7 @@ ldap_url_parse_ext (LDAP_CONST gchar *url_in,
return LDAP_URL_ERR_BADEXTS;
}
- for (i=0; ludp->lud_exts[i] != NULL; i++) {
+ for (i = 0; ludp->lud_exts[i] != NULL; i++) {
ldap_pvt_hex_unescape (ludp->lud_exts[i]);
if (*ludp->lud_exts[i] == '!') {
diff --git a/addressbook/backends/vcf/e-book-backend-vcf-factory.c b/addressbook/backends/vcf/e-book-backend-vcf-factory.c
index e7aeffd..ec95587 100644
--- a/addressbook/backends/vcf/e-book-backend-vcf-factory.c
+++ b/addressbook/backends/vcf/e-book-backend-vcf-factory.c
@@ -31,7 +31,7 @@
E_BOOK_BACKEND_FACTORY_SIMPLE (vcf, VCF, e_book_backend_vcf_new)
-static GType vcf_type;
+static GType vcf_type;
void
eds_module_initialize (GTypeModule *type_module)
@@ -45,7 +45,8 @@ eds_module_shutdown (void)
}
void
-eds_module_list_types (const GType **types, gint *num_types)
+eds_module_list_types (const GType **types,
+ gint *num_types)
{
*types = & vcf_type;
*num_types = 1;
diff --git a/addressbook/backends/vcf/e-book-backend-vcf.c b/addressbook/backends/vcf/e-book-backend-vcf.c
index cbf80d9..e4cf253 100644
--- a/addressbook/backends/vcf/e-book-backend-vcf.c
+++ b/addressbook/backends/vcf/e-book-backend-vcf.c
@@ -75,14 +75,15 @@ static gchar *
e_book_backend_vcf_create_unique_id (void)
{
/* use a 32 counter and the 32 bit timestamp to make an id.
- it's doubtful 2^32 id's will be created in a second, so we
- should be okay. */
+ * it's doubtful 2^32 id's will be created in a second, so we
+ * should be okay. */
static guint c = 0;
return g_strdup_printf (PAS_ID_PREFIX "%08lX%08X", time(NULL), c++);
}
static void
-insert_contact (EBookBackendVCF *vcf, gchar *vcard)
+insert_contact (EBookBackendVCF *vcf,
+ gchar *vcard)
{
EContact *contact = e_contact_new_from_vcard (vcard);
gchar *id;
@@ -100,7 +101,8 @@ insert_contact (EBookBackendVCF *vcf, gchar *vcard)
}
static void
-load_file (EBookBackendVCF *vcf, gint fd)
+load_file (EBookBackendVCF *vcf,
+ gint fd)
{
FILE *fp;
GString *str;
@@ -229,9 +231,9 @@ set_revision (EContact *contact)
}
static EContact *
-do_create (EBookBackendVCF *bvcf,
- const gchar *vcard_req,
- gboolean dirty_the_file)
+do_create (EBookBackendVCF *bvcf,
+ const gchar *vcard_req,
+ gboolean dirty_the_file)
{
gchar *id;
EContact *contact;
@@ -239,8 +241,8 @@ do_create (EBookBackendVCF *bvcf,
const gchar *rev;
/* at the very least we need the unique_id generation to be
- protected by the lock, even if the actual vcard parsing
- isn't. */
+ * protected by the lock, even if the actual vcard parsing
+ * isn't. */
g_mutex_lock (bvcf->priv->mutex);
id = e_book_backend_vcf_create_unique_id ();
@@ -271,29 +273,29 @@ do_create (EBookBackendVCF *bvcf,
static void
e_book_backend_vcf_create_contact (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- const gchar *vcard,
- EContact **contact,
- GError **perror)
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *vcard,
+ EContact **contact,
+ GError **perror)
{
EBookBackendVCF *bvcf = E_BOOK_BACKEND_VCF (backend);
*contact = do_create(bvcf, vcard, TRUE);
if (!*contact) {
/* XXX need a different call status for this case, i
- think */
+ * think */
g_propagate_error (perror, EDB_ERROR (CONTACT_NOT_FOUND));
}
}
static void
e_book_backend_vcf_remove_contacts (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- const GSList *id_list,
- GSList **ids,
- GError **perror)
+ EDataBook *book,
+ GCancellable *cancellable,
+ const GSList *id_list,
+ GSList **ids,
+ GError **perror)
{
/* FIXME: make this handle bulk deletes like the file backend does */
EBookBackendVCF *bvcf = E_BOOK_BACKEND_VCF (backend);
@@ -328,11 +330,11 @@ e_book_backend_vcf_remove_contacts (EBookBackendSync *backend,
static void
e_book_backend_vcf_modify_contact (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- const gchar *vcard,
- EContact **contact,
- GError **perror)
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *vcard,
+ EContact **contact,
+ GError **perror)
{
EBookBackendVCF *bvcf = E_BOOK_BACKEND_VCF (backend);
GList *elem;
@@ -361,11 +363,11 @@ e_book_backend_vcf_modify_contact (EBookBackendSync *backend,
static void
e_book_backend_vcf_get_contact (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- const gchar *id,
- gchar **vcard,
- GError **perror)
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *id,
+ gchar **vcard,
+ GError **perror)
{
EBookBackendVCF *bvcf = E_BOOK_BACKEND_VCF (backend);
GList *elem;
@@ -388,7 +390,8 @@ typedef struct {
} GetContactListClosure;
static void
-foreach_get_contact_compare (gchar *vcard_string, GetContactListClosure *closure)
+foreach_get_contact_compare (gchar *vcard_string,
+ GetContactListClosure *closure)
{
if ((!closure->search_needed) || e_book_backend_sexp_match_vcard (closure->card_sexp, vcard_string)) {
closure->list = g_slist_append (closure->list, g_strdup (vcard_string));
@@ -397,11 +400,11 @@ foreach_get_contact_compare (gchar *vcard_string, GetContactListClosure *closure
static void
e_book_backend_vcf_get_contact_list (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- const gchar *query,
- GSList **contacts,
- GError **perror)
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *query,
+ GSList **contacts,
+ GError **perror)
{
EBookBackendVCF *bvcf = E_BOOK_BACKEND_VCF (backend);
const gchar *search = query;
@@ -434,8 +437,9 @@ closure_destroy (VCFBackendSearchClosure *closure)
g_free (closure);
}
-static VCFBackendSearchClosure*
-init_closure (EDataBookView *book_view, EBookBackendVCF *bvcf)
+static VCFBackendSearchClosure *
+init_closure (EDataBookView *book_view,
+ EBookBackendVCF *bvcf)
{
VCFBackendSearchClosure *closure = g_new (VCFBackendSearchClosure, 1);
@@ -450,7 +454,7 @@ init_closure (EDataBookView *book_view, EBookBackendVCF *bvcf)
return closure;
}
-static VCFBackendSearchClosure*
+static VCFBackendSearchClosure *
get_closure (EDataBookView *book_view)
{
return g_object_get_data (G_OBJECT (book_view), "EBookBackendVCF.BookView::closure");
@@ -465,7 +469,7 @@ book_view_thread (gpointer data)
GList *l;
/* ref the book view because it'll be removed and unrefed
- when/if it's stopped */
+ * when/if it's stopped */
e_data_book_view_ref (book_view);
query = e_data_book_view_get_card_query (book_view);
@@ -500,8 +504,8 @@ book_view_thread (gpointer data)
}
static void
-e_book_backend_vcf_start_book_view (EBookBackend *backend,
- EDataBookView *book_view)
+e_book_backend_vcf_start_book_view (EBookBackend *backend,
+ EDataBookView *book_view)
{
VCFBackendSearchClosure *closure = init_closure (book_view, E_BOOK_BACKEND_VCF (backend));
@@ -516,8 +520,8 @@ e_book_backend_vcf_start_book_view (EBookBackend *backend,
}
static void
-e_book_backend_vcf_stop_book_view (EBookBackend *backend,
- EDataBookView *book_view)
+e_book_backend_vcf_stop_book_view (EBookBackend *backend,
+ EDataBookView *book_view)
{
VCFBackendSearchClosure *closure = get_closure (book_view);
gboolean need_join;
@@ -540,9 +544,9 @@ e_book_backend_vcf_extract_path_from_uri (const gchar *uri)
static void
e_book_backend_vcf_authenticate_user (EBookBackendSync *backend,
- GCancellable *cancellable,
- ECredentials *credentials,
- GError **perror)
+ GCancellable *cancellable,
+ ECredentials *credentials,
+ GError **perror)
{
/* Success */
}
@@ -552,11 +556,11 @@ e_book_backend_vcf_authenticate_user (EBookBackendSync *backend,
#endif
static void
-e_book_backend_vcf_open (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- gboolean only_if_exists,
- GError **perror)
+e_book_backend_vcf_open (EBookBackendSync *backend,
+ EDataBook *book,
+ GCancellable *cancellable,
+ gboolean only_if_exists,
+ GError **perror)
{
EBookBackendVCF *bvcf = E_BOOK_BACKEND_VCF (backend);
ESource *source = e_book_backend_get_source (E_BOOK_BACKEND (backend));
@@ -586,7 +590,7 @@ e_book_backend_vcf_open (EBookBackendSync *backend,
gint rv;
/* the database didn't exist, so we create the
- directory then the .vcf file */
+ * directory then the .vcf file */
rv = g_mkdir_with_parents (dirname, 0700);
if (rv == -1 && errno != EEXIST) {
g_warning ("failed to make directory %s: %s", dirname, g_strerror (errno));
@@ -634,7 +638,12 @@ e_book_backend_vcf_open (EBookBackendSync *backend,
}
static gboolean
-e_book_backend_vcf_get_backend_property (EBookBackendSync *backend, EDataBook *book, GCancellable *cancellable, const gchar *prop_name, gchar **prop_value, GError **error)
+e_book_backend_vcf_get_backend_property (EBookBackendSync *backend,
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ gchar **prop_value,
+ GError **error)
{
gboolean processed = TRUE;
@@ -650,7 +659,7 @@ e_book_backend_vcf_get_backend_property (EBookBackendSync *backend, EDataBook *b
gint i;
/* XXX we need a way to say "we support everything", since the
- vcf backend does */
+ * vcf backend does */
for (i = 1; i < E_CONTACT_FIELD_LAST; i++)
fields = g_slist_append (fields, (gpointer) e_contact_field_name (i));
@@ -666,7 +675,8 @@ e_book_backend_vcf_get_backend_property (EBookBackendSync *backend, EDataBook *b
}
static void
-e_book_backend_vcf_set_online (EBookBackend *backend, gboolean is_online)
+e_book_backend_vcf_set_online (EBookBackend *backend,
+ gboolean is_online)
{
if (e_book_backend_is_opened (backend))
e_book_backend_notify_online (backend, TRUE);
diff --git a/addressbook/backends/webdav/e-book-backend-webdav.c b/addressbook/backends/webdav/e-book-backend-webdav.c
index 4cf0d15..3f2e24f 100644
--- a/addressbook/backends/webdav/e-book-backend-webdav.c
+++ b/addressbook/backends/webdav/e-book-backend-webdav.c
@@ -114,8 +114,9 @@ closure_destroy (WebdavBackendSearchClosure *closure)
g_free (closure);
}
-static WebdavBackendSearchClosure*
-init_closure (EDataBookView *book_view, EBookBackendWebdav *webdav)
+static WebdavBackendSearchClosure *
+init_closure (EDataBookView *book_view,
+ EBookBackendWebdav *webdav)
{
WebdavBackendSearchClosure *closure = g_new (WebdavBackendSearchClosure, 1);
@@ -129,14 +130,15 @@ init_closure (EDataBookView *book_view, EBookBackendWebdav *webdav)
return closure;
}
-static WebdavBackendSearchClosure*
+static WebdavBackendSearchClosure *
get_closure (EDataBookView *book_view)
{
return g_object_get_data (G_OBJECT (book_view), WEBDAV_CLOSURE_NAME);
}
-static EContact*
-download_contact (EBookBackendWebdav *webdav, const gchar *uri)
+static EContact *
+download_contact (EBookBackendWebdav *webdav,
+ const gchar *uri)
{
SoupMessage *message;
const gchar *etag;
@@ -186,7 +188,9 @@ download_contact (EBookBackendWebdav *webdav, const gchar *uri)
}
static guint
-upload_contact (EBookBackendWebdav *webdav, EContact *contact, gchar **reason)
+upload_contact (EBookBackendWebdav *webdav,
+ EContact *contact,
+ gchar **reason)
{
ESource *source;
SoupMessage *message;
@@ -299,7 +303,11 @@ webdav_handle_auth_request (EBookBackendWebdav *webdav)
}
static void
-e_book_backend_webdav_create_contact (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *vcard)
+e_book_backend_webdav_create_contact (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *vcard)
{
EBookBackendWebdav *webdav = E_BOOK_BACKEND_WEBDAV (backend);
EBookBackendWebdavPrivate *priv = webdav->priv;
@@ -370,7 +378,8 @@ e_book_backend_webdav_create_contact (EBookBackend *backend, EDataBook *book, gu
}
static guint
-delete_contact (EBookBackendWebdav *webdav, const gchar *uri)
+delete_contact (EBookBackendWebdav *webdav,
+ const gchar *uri)
{
SoupMessage *message;
guint status;
@@ -386,7 +395,11 @@ delete_contact (EBookBackendWebdav *webdav, const gchar *uri)
}
static void
-e_book_backend_webdav_remove_contacts (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const GSList *id_list)
+e_book_backend_webdav_remove_contacts (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const GSList *id_list)
{
EBookBackendWebdav *webdav = E_BOOK_BACKEND_WEBDAV (backend);
EBookBackendWebdavPrivate *priv = webdav->priv;
@@ -424,7 +437,11 @@ e_book_backend_webdav_remove_contacts (EBookBackend *backend, EDataBook *book, g
}
static void
-e_book_backend_webdav_modify_contact (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *vcard)
+e_book_backend_webdav_modify_contact (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *vcard)
{
EBookBackendWebdav *webdav = E_BOOK_BACKEND_WEBDAV (backend);
EBookBackendWebdavPrivate *priv = webdav->priv;
@@ -494,7 +511,11 @@ e_book_backend_webdav_modify_contact (EBookBackend *backend, EDataBook *book, gu
}
static void
-e_book_backend_webdav_get_contact (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *uid)
+e_book_backend_webdav_get_contact (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *uid)
{
EBookBackendWebdav *webdav = E_BOOK_BACKEND_WEBDAV (backend);
EBookBackendWebdavPrivate *priv = webdav->priv;
@@ -540,8 +561,9 @@ struct response_element_t {
response_element_t *next;
};
-static response_element_t*
-parse_response_tag (const parser_strings_t *strings, xmlTextReaderPtr reader)
+static response_element_t *
+parse_response_tag (const parser_strings_t *strings,
+ xmlTextReaderPtr reader)
{
xmlChar *href = NULL;
xmlChar *etag = NULL;
@@ -609,7 +631,7 @@ parse_response_tag (const parser_strings_t *strings, xmlTextReaderPtr reader)
return element;
}
-static response_element_t*
+static response_element_t *
parse_propfind_response (xmlTextReaderPtr reader)
{
parser_strings_t strings;
@@ -660,7 +682,7 @@ parse_propfind_response (xmlTextReaderPtr reader)
return elements;
}
-static SoupMessage*
+static SoupMessage *
send_propfind (EBookBackendWebdav *webdav)
{
SoupMessage *message;
@@ -682,7 +704,9 @@ send_propfind (EBookBackendWebdav *webdav)
}
static xmlXPathObjectPtr
-xpath_eval (xmlXPathContextPtr ctx, const gchar *format, ...)
+xpath_eval (xmlXPathContextPtr ctx,
+ const gchar *format,
+ ...)
{
xmlXPathObjectPtr result;
va_list args;
@@ -749,7 +773,8 @@ xp_object_get_status (xmlXPathObjectPtr result)
}
static gboolean
-check_addressbook_changed (EBookBackendWebdav *webdav, gchar **new_ctag)
+check_addressbook_changed (EBookBackendWebdav *webdav,
+ gchar **new_ctag)
{
gboolean res = TRUE;
const gchar *request = "<?xml version=\"1.0\" encoding=\"utf-8\"?><propfind xmlns=\"DAV:\"><prop><getctag/></prop></propfind>";
@@ -826,7 +851,8 @@ check_addressbook_changed (EBookBackendWebdav *webdav, gchar **new_ctag)
}
static GError *
-download_contacts (EBookBackendWebdav *webdav, EFlag *running,
+download_contacts (EBookBackendWebdav *webdav,
+ EFlag *running,
EDataBookView *book_view)
{
EBookBackendWebdavPrivate *priv = webdav->priv;
@@ -924,7 +950,7 @@ download_contacts (EBookBackendWebdav *webdav, EFlag *running,
/* skip collections */
uri = (const gchar *) element->href;
- if (uri[strlen (uri)-1] == '/')
+ if (uri[strlen (uri) - 1] == '/')
continue;
/* uri might be relative, construct complete one */
@@ -1058,7 +1084,11 @@ e_book_backend_webdav_stop_book_view (EBookBackend *backend,
}
static void
-e_book_backend_webdav_get_contact_list (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *query)
+e_book_backend_webdav_get_contact_list (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *query)
{
EBookBackendWebdav *webdav = E_BOOK_BACKEND_WEBDAV (backend);
EBookBackendWebdavPrivate *priv = webdav->priv;
@@ -1095,7 +1125,11 @@ e_book_backend_webdav_get_contact_list (EBookBackend *backend, EDataBook *book,
}
static void
-e_book_backend_webdav_get_contact_list_uids (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *query)
+e_book_backend_webdav_get_contact_list_uids (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *query)
{
EBookBackendWebdav *webdav = E_BOOK_BACKEND_WEBDAV (backend);
EBookBackendWebdavPrivate *priv = webdav->priv;
@@ -1132,7 +1166,9 @@ e_book_backend_webdav_get_contact_list_uids (EBookBackend *backend, EDataBook *b
}
static void
-e_book_backend_webdav_authenticate_user (EBookBackend *backend, GCancellable *cancellable, ECredentials *credentials)
+e_book_backend_webdav_authenticate_user (EBookBackend *backend,
+ GCancellable *cancellable,
+ ECredentials *credentials)
{
EBookBackendWebdav *webdav = E_BOOK_BACKEND_WEBDAV (backend);
EBookBackendWebdavPrivate *priv = webdav->priv;
@@ -1176,7 +1212,8 @@ static void soup_authenticate (SoupSession *session, SoupMessage *message,
}
static void
-proxy_settings_changed (EProxy *proxy, gpointer user_data)
+proxy_settings_changed (EProxy *proxy,
+ gpointer user_data)
{
SoupURI *proxy_uri = NULL;
EBookBackendWebdavPrivate *priv = (EBookBackendWebdavPrivate *) user_data;
@@ -1193,7 +1230,11 @@ proxy_settings_changed (EProxy *proxy, gpointer user_data)
}
static void
-e_book_backend_webdav_open (EBookBackend *backend, EDataBook *book, guint opid, GCancellable *cancellable, gboolean only_if_exists)
+e_book_backend_webdav_open (EBookBackend *backend,
+ EDataBook *book,
+ guint opid,
+ GCancellable *cancellable,
+ gboolean only_if_exists)
{
EBookBackendWebdav *webdav = E_BOOK_BACKEND_WEBDAV (backend);
EBookBackendWebdavPrivate *priv = webdav->priv;
@@ -1310,13 +1351,17 @@ e_book_backend_webdav_open (EBookBackend *backend, EDataBook *book, guint opid,
}
static void
-e_book_backend_webdav_remove (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable)
+e_book_backend_webdav_remove (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable)
{
e_data_book_respond_remove (book, opid, EDB_ERROR (SUCCESS));
}
static void
-e_book_backend_webdav_set_online (EBookBackend *backend, gboolean is_online)
+e_book_backend_webdav_set_online (EBookBackend *backend,
+ gboolean is_online)
{
EBookBackendWebdav *webdav = E_BOOK_BACKEND_WEBDAV (backend);
@@ -1336,7 +1381,11 @@ e_book_backend_webdav_set_online (EBookBackend *backend, gboolean is_online)
}
static void
-e_book_backend_webdav_get_backend_property (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *prop_name)
+e_book_backend_webdav_get_backend_property (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *prop_name)
{
g_return_if_fail (prop_name != NULL);
diff --git a/addressbook/libebook/e-address-western.c b/addressbook/libebook/e-address-western.c
index ab65b23..b711d80 100644
--- a/addressbook/libebook/e-address-western.c
+++ b/addressbook/libebook/e-address-western.c
@@ -1,13 +1,13 @@
/* --------------------------------------------------
-
- An address parser, yielding fields as per RFC 2426.
-
- Author:
- Jesse Pavel (jpavel ximian com)
-
- Copyright 2000, Ximian, Inc.
- --------------------------------------------------
-*/
+ *
+ * An address parser, yielding fields as per RFC 2426.
+ *
+ * Author:
+ * Jesse Pavel (jpavel ximian com)
+ *
+ * Copyright 2000, Ximian, Inc.
+ * --------------------------------------------------
+ */
#include <ctype.h>
#include <string.h>
@@ -16,7 +16,7 @@
#include "libedataserver/e-data-server-util.h"
/* These are the keywords that will distinguish the start of an extended
- address. */
+ * address. */
static const gchar *extended_keywords[] = {
"apt", "apartment", "suite", NULL
@@ -43,7 +43,9 @@ e_address_western_is_line_blank (gchar *line)
shift the remaining lines, up to line number num_lines, up one position. */
static void
-e_address_western_shift_line (gchar *lines[], gint line_num, gint num_lines)
+e_address_western_shift_line (gchar *lines[],
+ gint line_num,
+ gint num_lines)
{
gint cntr;
@@ -65,7 +67,7 @@ e_address_western_remove_blank_lines (gchar *lines[], gint *linecntr)
for (cntr = 0; cntr < *linecntr; cntr++) {
if (e_address_western_is_line_blank (lines[cntr])) {
/* Delete the blank line, and shift all subsequent lines up
- one spot to fill its old spot. */
+ * one spot to fill its old spot. */
e_address_western_shift_line (lines, cntr, *linecntr);
/* Since we must check the newly shifted line, let's
@@ -130,7 +132,7 @@ e_address_western_is_po_box (gchar *line)
}
/* A line that contains a comma followed eventually by a number is
- deemed to be the line in the form of <town, region postal-code>. */
+ * deemed to be the line in the form of <town, region postal-code>. */
static gboolean
e_address_western_is_postal (gchar *line)
@@ -166,7 +168,7 @@ e_address_western_is_postal (gchar *line)
if (cntr == 0)
retval = FALSE;
else {
- if (isdigit (line[cntr+1]))
+ if (isdigit (line[cntr + 1]))
retval = TRUE;
else
retval = FALSE;
@@ -180,7 +182,7 @@ static gchar *
e_address_western_extract_po_box (gchar *line)
{
/* Return everything from the beginning of the line to
- the end of the first word that contains a number. */
+ * the end of the first word that contains a number. */
gint index;
@@ -240,7 +242,7 @@ e_address_western_extract_region (gchar *line)
return g_strdup ("");
/* Between start and end lie the string. */
- return g_strndup ( (line+start), end-start);
+ return g_strndup ( (line + start), end - start);
}
static gchar *
@@ -260,11 +262,13 @@ e_address_western_extract_postal_code (gchar *line)
start++;
/* Between start and end lie the string. */
- return g_strndup ( (line+start), end-start);
+ return g_strndup ( (line + start), end - start);
}
static void
-e_address_western_extract_street (gchar *line, gchar **street, gchar **extended)
+e_address_western_extract_street (gchar *line,
+ gchar **street,
+ gchar **extended)
{
const gchar *split = NULL;
gint cntr;
@@ -334,7 +338,7 @@ e_address_western_parse (const gchar *in_address)
}
/* ... tally them. */
- lines = (gchar **) g_malloc (sizeof (gchar *) * (linecntr+3));
+ lines = (gchar **) g_malloc (sizeof (gchar *) * (linecntr + 3));
lineindex = 0;
lines[0] = &address[0];
linecntr = 1;
diff --git a/addressbook/libebook/e-book-client-view.c b/addressbook/libebook/e-book-client-view.c
index c72a214..6e1b096 100644
--- a/addressbook/libebook/e-book-client-view.c
+++ b/addressbook/libebook/e-book-client-view.c
@@ -53,7 +53,9 @@ enum {
static guint signals[LAST_SIGNAL];
static void
-objects_added_cb (EGdbusBookView *object, const gchar * const *vcards, EBookClientView *view)
+objects_added_cb (EGdbusBookView *object,
+ const gchar * const *vcards,
+ EBookClientView *view)
{
const gchar * const *p;
GSList *contacts = NULL;
@@ -74,7 +76,9 @@ objects_added_cb (EGdbusBookView *object, const gchar * const *vcards, EBookClie
}
static void
-objects_modified_cb (EGdbusBookView *object, const gchar * const *vcards, EBookClientView *view)
+objects_modified_cb (EGdbusBookView *object,
+ const gchar * const *vcards,
+ EBookClientView *view)
{
const gchar * const *p;
GSList *contacts = NULL;
@@ -94,7 +98,9 @@ objects_modified_cb (EGdbusBookView *object, const gchar * const *vcards, EBookC
}
static void
-objects_removed_cb (EGdbusBookView *object, const gchar * const *ids, EBookClientView *view)
+objects_removed_cb (EGdbusBookView *object,
+ const gchar * const *ids,
+ EBookClientView *view)
{
const gchar * const *p;
GSList *list = NULL;
@@ -114,7 +120,10 @@ objects_removed_cb (EGdbusBookView *object, const gchar * const *ids, EBookClien
}
static void
-progress_cb (EGdbusBookView *object, guint percent, const gchar *message, EBookClientView *view)
+progress_cb (EGdbusBookView *object,
+ guint percent,
+ const gchar *message,
+ EBookClientView *view)
{
if (!view->priv->running)
return;
@@ -123,7 +132,9 @@ progress_cb (EGdbusBookView *object, guint percent, const gchar *message, EBookC
}
static void
-complete_cb (EGdbusBookView *object, const gchar * const *in_error_strv, EBookClientView *view)
+complete_cb (EGdbusBookView *object,
+ const gchar * const *in_error_strv,
+ EBookClientView *view)
{
GError *error = NULL;
@@ -150,7 +161,8 @@ complete_cb (EGdbusBookView *object, const gchar * const *in_error_strv, EBookCl
* Returns: A new #EBookClientView.
**/
EBookClientView *
-_e_book_client_view_new (EBookClient *book_client, EGdbusBookView *gdbus_bookview)
+_e_book_client_view_new (EBookClient *book_client,
+ EGdbusBookView *gdbus_bookview)
{
EBookClientView *view;
EBookClientViewPrivate *priv;
@@ -197,7 +209,8 @@ e_book_client_view_get_client (EBookClientView *view)
* Tells @view to start processing events.
*/
void
-e_book_client_view_start (EBookClientView *view, GError **error)
+e_book_client_view_start (EBookClientView *view,
+ GError **error)
{
EBookClientViewPrivate *priv;
@@ -228,7 +241,8 @@ e_book_client_view_start (EBookClientView *view, GError **error)
* Tells @view to stop processing events.
**/
void
-e_book_client_view_stop (EBookClientView *view, GError **error)
+e_book_client_view_stop (EBookClientView *view,
+ GError **error)
{
EBookClientViewPrivate *priv;
@@ -268,7 +282,9 @@ e_book_client_view_stop (EBookClientView *view, GError **error)
* it will simply return object as is stored in the cache.
**/
void
-e_book_client_view_set_fields_of_interest (EBookClientView *view, const GSList *fields_of_interest, GError **error)
+e_book_client_view_set_fields_of_interest (EBookClientView *view,
+ const GSList *fields_of_interest,
+ GError **error)
{
EBookClientViewPrivate *priv;
diff --git a/addressbook/libebook/e-book-client.c b/addressbook/libebook/e-book-client.c
index db1c9f1..48bf948 100644
--- a/addressbook/libebook/e-book-client.c
+++ b/addressbook/libebook/e-book-client.c
@@ -109,7 +109,8 @@ e_book_client_error_to_string (EBookClientError code)
* Returned pointer should be freed with g_error_free().
**/
GError *
-e_book_client_error_create (EBookClientError code, const gchar *custom_msg)
+e_book_client_error_create (EBookClientError code,
+ const gchar *custom_msg)
{
return g_error_new_literal (E_BOOK_CLIENT_ERROR, code, custom_msg ? custom_msg : e_book_client_error_to_string (code));
}
@@ -120,7 +121,8 @@ e_book_client_error_create (EBookClientError code, const gchar *custom_msg)
* leave it alone.
*/
static gboolean
-unwrap_dbus_error (GError *error, GError **client_error)
+unwrap_dbus_error (GError *error,
+ GError **client_error)
{
#define err(a,b) "org.gnome.evolution.dataserver.AddressBook." a, b
static EClientErrorsList book_errors[] = {
@@ -200,7 +202,10 @@ gdbus_book_factory_proxy_disconnect (GDBusConnection *connection)
}
static void
-gdbus_book_factory_proxy_closed_cb (GDBusConnection *connection, gboolean remote_peer_vanished, GError *error, gpointer user_data)
+gdbus_book_factory_proxy_closed_cb (GDBusConnection *connection,
+ gboolean remote_peer_vanished,
+ GError *error,
+ gpointer user_data)
{
GError *err = NULL;
@@ -222,10 +227,16 @@ gdbus_book_factory_proxy_closed_cb (GDBusConnection *connection, gboolean remote
}
static void
-gdbus_book_factory_connection_gone_cb (GDBusConnection *connection, const gchar *sender_name, const gchar *object_path, const gchar *interface_name, const gchar *signal_name, GVariant *parameters, gpointer user_data)
+gdbus_book_factory_connection_gone_cb (GDBusConnection *connection,
+ const gchar *sender_name,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *signal_name,
+ GVariant *parameters,
+ gpointer user_data)
{
/* signal subscription takes care of correct parameters,
- thus just do what is to be done here */
+ * thus just do what is to be done here */
gdbus_book_factory_proxy_closed_cb (connection, TRUE, NULL, user_data);
}
@@ -277,7 +288,10 @@ static void gdbus_book_client_disconnect (EBookClient *client);
* Called when the addressbook server dies.
*/
static void
-gdbus_book_client_closed_cb (GDBusConnection *connection, gboolean remote_peer_vanished, GError *error, EBookClient *client)
+gdbus_book_client_closed_cb (GDBusConnection *connection,
+ gboolean remote_peer_vanished,
+ GError *error,
+ EBookClient *client)
{
GError *err = NULL;
@@ -299,10 +313,16 @@ gdbus_book_client_closed_cb (GDBusConnection *connection, gboolean remote_peer_v
}
static void
-gdbus_book_client_connection_gone_cb (GDBusConnection *connection, const gchar *sender_name, const gchar *object_path, const gchar *interface_name, const gchar *signal_name, GVariant *parameters, gpointer user_data)
+gdbus_book_client_connection_gone_cb (GDBusConnection *connection,
+ const gchar *sender_name,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *signal_name,
+ GVariant *parameters,
+ gpointer user_data)
{
/* signal subscription takes care of correct parameters,
- thus just do what is to be done here */
+ * thus just do what is to be done here */
gdbus_book_client_closed_cb (connection, TRUE, NULL, user_data);
}
@@ -332,7 +352,9 @@ gdbus_book_client_disconnect (EBookClient *client)
}
static void
-backend_error_cb (EGdbusBook *object, const gchar *message, EBookClient *client)
+backend_error_cb (EGdbusBook *object,
+ const gchar *message,
+ EBookClient *client)
{
g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_BOOK_CLIENT (client));
@@ -342,7 +364,9 @@ backend_error_cb (EGdbusBook *object, const gchar *message, EBookClient *client)
}
static void
-readonly_cb (EGdbusBook *object, gboolean readonly, EBookClient *client)
+readonly_cb (EGdbusBook *object,
+ gboolean readonly,
+ EBookClient *client)
{
g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_BOOK_CLIENT (client));
@@ -351,7 +375,9 @@ readonly_cb (EGdbusBook *object, gboolean readonly, EBookClient *client)
}
static void
-online_cb (EGdbusBook *object, gboolean is_online, EBookClient *client)
+online_cb (EGdbusBook *object,
+ gboolean is_online,
+ EBookClient *client)
{
g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_BOOK_CLIENT (client));
@@ -360,7 +386,9 @@ online_cb (EGdbusBook *object, gboolean is_online, EBookClient *client)
}
static void
-auth_required_cb (EGdbusBook *object, const gchar * const *credentials_strv, EBookClient *client)
+auth_required_cb (EGdbusBook *object,
+ const gchar * const *credentials_strv,
+ EBookClient *client)
{
ECredentials *credentials;
@@ -378,7 +406,9 @@ auth_required_cb (EGdbusBook *object, const gchar * const *credentials_strv, EBo
}
static void
-opened_cb (EGdbusBook *object, const gchar * const *error_strv, EBookClient *client)
+opened_cb (EGdbusBook *object,
+ const gchar * const *error_strv,
+ EBookClient *client)
{
GError *error = NULL;
@@ -394,7 +424,9 @@ opened_cb (EGdbusBook *object, const gchar * const *error_strv, EBookClient *cli
}
static void
-backend_property_changed_cb (EGdbusBook *object, const gchar * const *name_value_strv, EBookClient *client)
+backend_property_changed_cb (EGdbusBook *object,
+ const gchar * const *name_value_strv,
+ EBookClient *client)
{
gchar *prop_name = NULL, *prop_value = NULL;
@@ -426,7 +458,8 @@ backend_property_changed_cb (EGdbusBook *object, const gchar * const *name_value
* Since: 3.2
**/
EBookClient *
-e_book_client_new (ESource *source, GError **error)
+e_book_client_new (ESource *source,
+ GError **error)
{
EBookClient *client;
GError *err = NULL;
@@ -534,7 +567,8 @@ e_book_client_new (ESource *source, GError **error)
* Since: 3.2
**/
EBookClient *
-e_book_client_new_from_uri (const gchar *uri, GError **error)
+e_book_client_new_from_uri (const gchar *uri,
+ GError **error)
{
ESourceList *source_list = NULL;
ESource *source;
@@ -658,7 +692,8 @@ e_book_client_new_default (GError **error)
* Since: 3.2
**/
gboolean
-e_book_client_set_default (EBookClient *client, GError **error)
+e_book_client_set_default (EBookClient *client,
+ GError **error)
{
ESource *source;
@@ -685,7 +720,8 @@ e_book_client_set_default (EBookClient *client, GError **error)
* Since: 3.2
**/
gboolean
-e_book_client_set_default_source (ESource *source, GError **error)
+e_book_client_set_default_source (ESource *source,
+ GError **error)
{
ESourceList *source_list = NULL;
gboolean res = FALSE;
@@ -722,7 +758,8 @@ e_book_client_set_default_source (ESource *source, GError **error)
* Since: 3.2
**/
gboolean
-e_book_client_get_sources (ESourceList **sources, GError **error)
+e_book_client_get_sources (ESourceList **sources,
+ GError **error)
{
GConfClient *gconf;
@@ -788,7 +825,9 @@ make_me_card (void)
* Since: 3.2
**/
gboolean
-e_book_client_get_self (EContact **contact, EBookClient **client, GError **error)
+e_book_client_get_self (EContact **contact,
+ EBookClient **client,
+ GError **error)
{
GError *local_error = NULL;
GConfClient *gconf;
@@ -860,7 +899,9 @@ e_book_client_get_self (EContact **contact, EBookClient **client, GError **error
* Since: 3.2
**/
gboolean
-e_book_client_set_self (EBookClient *client, EContact *contact, GError **error)
+e_book_client_set_self (EBookClient *client,
+ EContact *contact,
+ GError **error)
{
GConfClient *gconf;
@@ -906,7 +947,10 @@ e_book_client_is_self (EContact *contact)
}
static gboolean
-book_client_get_backend_property_from_cache_finish (EClient *client, GAsyncResult *result, gchar **prop_value, GError **error)
+book_client_get_backend_property_from_cache_finish (EClient *client,
+ GAsyncResult *result,
+ gchar **prop_value,
+ GError **error)
{
GSimpleAsyncResult *simple;
GError *local_error = NULL;
@@ -930,7 +974,11 @@ book_client_get_backend_property_from_cache_finish (EClient *client, GAsyncResul
}
static void
-book_client_get_backend_property (EClient *client, const gchar *prop_name, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+book_client_get_backend_property (EClient *client,
+ const gchar *prop_name,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *prop_value;
@@ -945,7 +993,10 @@ book_client_get_backend_property (EClient *client, const gchar *prop_name, GCanc
}
static gboolean
-book_client_get_backend_property_finish (EClient *client, GAsyncResult *result, gchar **prop_value, GError **error)
+book_client_get_backend_property_finish (EClient *client,
+ GAsyncResult *result,
+ gchar **prop_value,
+ GError **error)
{
gchar *str = NULL;
gboolean res;
@@ -970,7 +1021,11 @@ book_client_get_backend_property_finish (EClient *client, GAsyncResult *result,
}
static gboolean
-book_client_get_backend_property_sync (EClient *client, const gchar *prop_name, gchar **prop_value, GCancellable *cancellable, GError **error)
+book_client_get_backend_property_sync (EClient *client,
+ const gchar *prop_name,
+ gchar **prop_value,
+ GCancellable *cancellable,
+ GError **error)
{
EBookClient *book_client;
gchar *prop_val;
@@ -1006,7 +1061,12 @@ book_client_get_backend_property_sync (EClient *client, const gchar *prop_name,
}
static void
-book_client_set_backend_property (EClient *client, const gchar *prop_name, const gchar *prop_value, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+book_client_set_backend_property (EClient *client,
+ const gchar *prop_name,
+ const gchar *prop_value,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar **prop_name_value;
@@ -1020,13 +1080,19 @@ book_client_set_backend_property (EClient *client, const gchar *prop_name, const
}
static gboolean
-book_client_set_backend_property_finish (EClient *client, GAsyncResult *result, GError **error)
+book_client_set_backend_property_finish (EClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (client, result, error, book_client_set_backend_property);
}
static gboolean
-book_client_set_backend_property_sync (EClient *client, const gchar *prop_name, const gchar *prop_value, GCancellable *cancellable, GError **error)
+book_client_set_backend_property_sync (EClient *client,
+ const gchar *prop_name,
+ const gchar *prop_value,
+ GCancellable *cancellable,
+ GError **error)
{
EBookClient *book_client;
gboolean res;
@@ -1052,7 +1118,11 @@ book_client_set_backend_property_sync (EClient *client, const gchar *prop_name,
}
static void
-book_client_open (EClient *client, gboolean only_if_exists, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+book_client_open (EClient *client,
+ gboolean only_if_exists,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_client_proxy_call_boolean (client, only_if_exists, cancellable, callback, user_data, book_client_open,
e_gdbus_book_call_open,
@@ -1060,13 +1130,18 @@ book_client_open (EClient *client, gboolean only_if_exists, GCancellable *cancel
}
static gboolean
-book_client_open_finish (EClient *client, GAsyncResult *result, GError **error)
+book_client_open_finish (EClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (client, result, error, book_client_open);
}
static gboolean
-book_client_open_sync (EClient *client, gboolean only_if_exists, GCancellable *cancellable, GError **error)
+book_client_open_sync (EClient *client,
+ gboolean only_if_exists,
+ GCancellable *cancellable,
+ GError **error)
{
EBookClient *book_client;
@@ -1086,7 +1161,10 @@ book_client_open_sync (EClient *client, gboolean only_if_exists, GCancellable *c
}
static void
-book_client_remove (EClient *client, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+book_client_remove (EClient *client,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_client_proxy_call_void (client, cancellable, callback, user_data, book_client_remove,
e_gdbus_book_call_remove,
@@ -1094,13 +1172,17 @@ book_client_remove (EClient *client, GCancellable *cancellable, GAsyncReadyCallb
}
static gboolean
-book_client_remove_finish (EClient *client, GAsyncResult *result, GError **error)
+book_client_remove_finish (EClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (client, result, error, book_client_remove);
}
static gboolean
-book_client_remove_sync (EClient *client, GCancellable *cancellable, GError **error)
+book_client_remove_sync (EClient *client,
+ GCancellable *cancellable,
+ GError **error)
{
EBookClient *book_client;
@@ -1120,7 +1202,10 @@ book_client_remove_sync (EClient *client, GCancellable *cancellable, GError **er
}
static void
-book_client_refresh (EClient *client, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+book_client_refresh (EClient *client,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_client_proxy_call_void (client, cancellable, callback, user_data, book_client_refresh,
e_gdbus_book_call_refresh,
@@ -1128,13 +1213,17 @@ book_client_refresh (EClient *client, GCancellable *cancellable, GAsyncReadyCall
}
static gboolean
-book_client_refresh_finish (EClient *client, GAsyncResult *result, GError **error)
+book_client_refresh_finish (EClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (client, result, error, book_client_refresh);
}
static gboolean
-book_client_refresh_sync (EClient *client, GCancellable *cancellable, GError **error)
+book_client_refresh_sync (EClient *client,
+ GCancellable *cancellable,
+ GError **error)
{
EBookClient *book_client;
@@ -1168,7 +1257,11 @@ book_client_refresh_sync (EClient *client, GCancellable *cancellable, GError **e
* Since: 3.2
**/
void
-e_book_client_add_contact (EBookClient *client, /* const */ EContact *contact, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_book_client_add_contact (EBookClient *client,
+ /* const */ EContact *contact,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *vcard, *gdbus_vcard = NULL;
@@ -1203,7 +1296,10 @@ e_book_client_add_contact (EBookClient *client, /* const */ EContact *contact, G
* Since: 3.2
**/
gboolean
-e_book_client_add_contact_finish (EBookClient *client, GAsyncResult *result, gchar **added_uid, GError **error)
+e_book_client_add_contact_finish (EBookClient *client,
+ GAsyncResult *result,
+ gchar **added_uid,
+ GError **error)
{
gboolean res;
gchar *out_uid = NULL;
@@ -1241,7 +1337,11 @@ e_book_client_add_contact_finish (EBookClient *client, GAsyncResult *result, gch
* Since: 3.2
**/
gboolean
-e_book_client_add_contact_sync (EBookClient *client, /* const */ EContact *contact, gchar **added_uid, GCancellable *cancellable, GError **error)
+e_book_client_add_contact_sync (EBookClient *client,
+ /* const */ EContact *contact,
+ gchar **added_uid,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar *vcard, *gdbus_vcard = NULL, *out_uid = NULL;
@@ -1288,7 +1388,11 @@ e_book_client_add_contact_sync (EBookClient *client, /* const */ EContact *conta
* Since: 3.2
**/
void
-e_book_client_modify_contact (EBookClient *client, /* const */ EContact *contact, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_book_client_modify_contact (EBookClient *client,
+ /* const */ EContact *contact,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *vcard, *gdbus_vcard = NULL;
@@ -1318,7 +1422,9 @@ e_book_client_modify_contact (EBookClient *client, /* const */ EContact *contact
* Since: 3.2
**/
gboolean
-e_book_client_modify_contact_finish (EBookClient *client, GAsyncResult *result, GError **error)
+e_book_client_modify_contact_finish (EBookClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (E_CLIENT (client), result, error, e_book_client_modify_contact);
}
@@ -1337,7 +1443,10 @@ e_book_client_modify_contact_finish (EBookClient *client, GAsyncResult *result,
* Since: 3.2
**/
gboolean
-e_book_client_modify_contact_sync (EBookClient *client, /* const */ EContact *contact, GCancellable *cancellable, GError **error)
+e_book_client_modify_contact_sync (EBookClient *client,
+ /* const */ EContact *contact,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar *vcard, *gdbus_vcard = NULL;
@@ -1376,7 +1485,11 @@ e_book_client_modify_contact_sync (EBookClient *client, /* const */ EContact *co
* Since: 3.2
**/
void
-e_book_client_remove_contact (EBookClient *client, /* const */ EContact *contact, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_book_client_remove_contact (EBookClient *client,
+ /* const */ EContact *contact,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *uid;
const gchar *lst[2];
@@ -1410,7 +1523,9 @@ e_book_client_remove_contact (EBookClient *client, /* const */ EContact *contact
* Since: 3.2
**/
gboolean
-e_book_client_remove_contact_finish (EBookClient *client, GAsyncResult *result, GError **error)
+e_book_client_remove_contact_finish (EBookClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (E_CLIENT (client), result, error, e_book_client_remove_contact);
}
@@ -1429,7 +1544,10 @@ e_book_client_remove_contact_finish (EBookClient *client, GAsyncResult *result,
* Since: 3.2
**/
gboolean
-e_book_client_remove_contact_sync (EBookClient *client, /* const */ EContact *contact, GCancellable *cancellable, GError **error)
+e_book_client_remove_contact_sync (EBookClient *client,
+ /* const */ EContact *contact,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar *uid;
@@ -1474,7 +1592,11 @@ e_book_client_remove_contact_sync (EBookClient *client, /* const */ EContact *co
* Since: 3.2
**/
void
-e_book_client_remove_contact_by_uid (EBookClient *client, const gchar *uid, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_book_client_remove_contact_by_uid (EBookClient *client,
+ const gchar *uid,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *safe_uid;
const gchar *lst[2];
@@ -1507,7 +1629,9 @@ e_book_client_remove_contact_by_uid (EBookClient *client, const gchar *uid, GCan
* Since: 3.2
**/
gboolean
-e_book_client_remove_contact_by_uid_finish (EBookClient *client, GAsyncResult *result, GError **error)
+e_book_client_remove_contact_by_uid_finish (EBookClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (E_CLIENT (client), result, error, e_book_client_remove_contact_by_uid);
}
@@ -1526,7 +1650,10 @@ e_book_client_remove_contact_by_uid_finish (EBookClient *client, GAsyncResult *r
* Since: 3.2
**/
gboolean
-e_book_client_remove_contact_by_uid_sync (EBookClient *client, const gchar *uid, GCancellable *cancellable, GError **error)
+e_book_client_remove_contact_by_uid_sync (EBookClient *client,
+ const gchar *uid,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar *safe_uid;
@@ -1573,7 +1700,11 @@ e_book_client_remove_contact_by_uid_sync (EBookClient *client, const gchar *uid,
* Since: 3.2
**/
void
-e_book_client_remove_contacts (EBookClient *client, const GSList *uids, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_book_client_remove_contacts (EBookClient *client,
+ const GSList *uids,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar **lst;
@@ -1602,7 +1733,9 @@ e_book_client_remove_contacts (EBookClient *client, const GSList *uids, GCancell
* Since: 3.2
**/
gboolean
-e_book_client_remove_contacts_finish (EBookClient *client, GAsyncResult *result, GError **error)
+e_book_client_remove_contacts_finish (EBookClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (E_CLIENT (client), result, error, e_book_client_remove_contacts);
}
@@ -1624,7 +1757,10 @@ e_book_client_remove_contacts_finish (EBookClient *client, GAsyncResult *result,
* Since: 3.2
**/
gboolean
-e_book_client_remove_contacts_sync (EBookClient *client, const GSList *uids, GCancellable *cancellable, GError **error)
+e_book_client_remove_contacts_sync (EBookClient *client,
+ const GSList *uids,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar **lst;
@@ -1664,7 +1800,11 @@ e_book_client_remove_contacts_sync (EBookClient *client, const GSList *uids, GCa
* Since: 3.2
**/
void
-e_book_client_get_contact (EBookClient *client, const gchar *uid, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_book_client_get_contact (EBookClient *client,
+ const gchar *uid,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *safe_uid;
@@ -1696,7 +1836,10 @@ e_book_client_get_contact (EBookClient *client, const gchar *uid, GCancellable *
* Since: 3.2
**/
gboolean
-e_book_client_get_contact_finish (EBookClient *client, GAsyncResult *result, EContact **contact, GError **error)
+e_book_client_get_contact_finish (EBookClient *client,
+ GAsyncResult *result,
+ EContact **contact,
+ GError **error)
{
gboolean res;
gchar *vcard = NULL;
@@ -1732,7 +1875,11 @@ e_book_client_get_contact_finish (EBookClient *client, GAsyncResult *result, ECo
* Since: 3.2
**/
gboolean
-e_book_client_get_contact_sync (EBookClient *client, const gchar *uid, EContact **contact, GCancellable *cancellable, GError **error)
+e_book_client_get_contact_sync (EBookClient *client,
+ const gchar *uid,
+ EContact **contact,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar *vcard = NULL, *safe_uid;
@@ -1782,7 +1929,11 @@ e_book_client_get_contact_sync (EBookClient *client, const gchar *uid, EContact
* Since: 3.2
**/
void
-e_book_client_get_contacts (EBookClient *client, const gchar *sexp, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_book_client_get_contacts (EBookClient *client,
+ const gchar *sexp,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *gdbus_sexp = NULL;
@@ -1811,7 +1962,10 @@ e_book_client_get_contacts (EBookClient *client, const gchar *sexp, GCancellable
* Since: 3.2
**/
gboolean
-e_book_client_get_contacts_finish (EBookClient *client, GAsyncResult *result, GSList **contacts, GError **error)
+e_book_client_get_contacts_finish (EBookClient *client,
+ GAsyncResult *result,
+ GSList **contacts,
+ GError **error)
{
gboolean res;
gchar **vcards = NULL;
@@ -1858,7 +2012,11 @@ e_book_client_get_contacts_finish (EBookClient *client, GAsyncResult *result, GS
* Since: 3.2
**/
gboolean
-e_book_client_get_contacts_sync (EBookClient *client, const gchar *sexp, GSList **contacts, GCancellable *cancellable, GError **error)
+e_book_client_get_contacts_sync (EBookClient *client,
+ const gchar *sexp,
+ GSList **contacts,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar *gdbus_sexp = NULL;
@@ -1914,7 +2072,11 @@ e_book_client_get_contacts_sync (EBookClient *client, const gchar *sexp, GSList
* Since: 3.2
**/
void
-e_book_client_get_contacts_uids (EBookClient *client, const gchar *sexp, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_book_client_get_contacts_uids (EBookClient *client,
+ const gchar *sexp,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *gdbus_sexp = NULL;
@@ -1943,7 +2105,10 @@ e_book_client_get_contacts_uids (EBookClient *client, const gchar *sexp, GCancel
* Since: 3.2
**/
gboolean
-e_book_client_get_contacts_uids_finish (EBookClient *client, GAsyncResult *result, GSList **contacts_uids, GError **error)
+e_book_client_get_contacts_uids_finish (EBookClient *client,
+ GAsyncResult *result,
+ GSList **contacts_uids,
+ GError **error)
{
gboolean res;
gchar **uids = NULL;
@@ -1990,7 +2155,11 @@ e_book_client_get_contacts_uids_finish (EBookClient *client, GAsyncResult *resul
* Since: 3.2
**/
gboolean
-e_book_client_get_contacts_uids_sync (EBookClient *client, const gchar *sexp, GSList **contacts_uids, GCancellable *cancellable, GError **error)
+e_book_client_get_contacts_uids_sync (EBookClient *client,
+ const gchar *sexp,
+ GSList **contacts_uids,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar *gdbus_sexp = NULL;
@@ -2046,7 +2215,11 @@ e_book_client_get_contacts_uids_sync (EBookClient *client, const gchar *sexp, GS
* Since: 3.2
**/
void
-e_book_client_get_view (EBookClient *client, const gchar *sexp, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_book_client_get_view (EBookClient *client,
+ const gchar *sexp,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *gdbus_sexp = NULL;
@@ -2060,7 +2233,11 @@ e_book_client_get_view (EBookClient *client, const gchar *sexp, GCancellable *ca
}
static gboolean
-complete_get_view (EBookClient *client, gboolean res, gchar *view_path, EBookClientView **view, GError **error)
+complete_get_view (EBookClient *client,
+ gboolean res,
+ gchar *view_path,
+ EBookClientView **view,
+ GError **error)
{
g_return_val_if_fail (view != NULL, FALSE);
@@ -2114,7 +2291,10 @@ complete_get_view (EBookClient *client, gboolean res, gchar *view_path, EBookCli
* Since: 3.2
**/
gboolean
-e_book_client_get_view_finish (EBookClient *client, GAsyncResult *result, EBookClientView **view, GError **error)
+e_book_client_get_view_finish (EBookClient *client,
+ GAsyncResult *result,
+ EBookClientView **view,
+ GError **error)
{
gboolean res;
gchar *view_path = NULL;
@@ -2146,7 +2326,11 @@ e_book_client_get_view_finish (EBookClient *client, GAsyncResult *result, EBookC
* Since: 3.2
**/
gboolean
-e_book_client_get_view_sync (EBookClient *client, const gchar *sexp, EBookClientView **view, GCancellable *cancellable, GError **error)
+e_book_client_get_view_sync (EBookClient *client,
+ const gchar *sexp,
+ EBookClientView **view,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar *gdbus_sexp = NULL;
@@ -2185,13 +2369,16 @@ book_client_get_dbus_proxy (EClient *client)
}
static void
-book_client_unwrap_dbus_error (EClient *client, GError *dbus_error, GError **out_error)
+book_client_unwrap_dbus_error (EClient *client,
+ GError *dbus_error,
+ GError **out_error)
{
unwrap_dbus_error (dbus_error, out_error);
}
static void
-book_client_handle_authentication (EClient *client, const ECredentials *credentials)
+book_client_handle_authentication (EClient *client,
+ const ECredentials *credentials)
{
EBookClient *book_client;
GError *error = NULL;
@@ -2221,7 +2408,10 @@ book_client_handle_authentication (EClient *client, const ECredentials *credenti
}
static void
-book_client_retrieve_capabilities (EClient *client, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+book_client_retrieve_capabilities (EClient *client,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
EBookClient *book_client;
@@ -2235,7 +2425,10 @@ book_client_retrieve_capabilities (EClient *client, GCancellable *cancellable, G
}
static gboolean
-book_client_retrieve_capabilities_finish (EClient *client, GAsyncResult *result, gchar **capabilities, GError **error)
+book_client_retrieve_capabilities_finish (EClient *client,
+ GAsyncResult *result,
+ gchar **capabilities,
+ GError **error)
{
EBookClient *book_client;
@@ -2249,7 +2442,10 @@ book_client_retrieve_capabilities_finish (EClient *client, GAsyncResult *result,
}
static gboolean
-book_client_retrieve_capabilities_sync (EClient *client, gchar **capabilities, GCancellable *cancellable, GError **error)
+book_client_retrieve_capabilities_sync (EClient *client,
+ gchar **capabilities,
+ GCancellable *cancellable,
+ GError **error)
{
EBookClient *book_client;
diff --git a/addressbook/libebook/e-book-query.c b/addressbook/libebook/e-book-query.c
index b84b0bd..a839b87 100644
--- a/addressbook/libebook/e-book-query.c
+++ b/addressbook/libebook/e-book-query.c
@@ -49,7 +49,10 @@ struct EBookQuery {
};
static EBookQuery *
-conjoin (EBookQueryType type, gint nqs, EBookQuery **qs, gboolean unref)
+conjoin (EBookQueryType type,
+ gint nqs,
+ EBookQuery **qs,
+ gboolean unref)
{
EBookQuery *ret = g_new0 (EBookQuery, 1);
gint i;
@@ -77,7 +80,9 @@ conjoin (EBookQueryType type, gint nqs, EBookQuery **qs, gboolean unref)
* Returns: A new #EBookQuery
**/
EBookQuery *
-e_book_query_and (gint nqs, EBookQuery **qs, gboolean unref)
+e_book_query_and (gint nqs,
+ EBookQuery **qs,
+ gboolean unref)
{
return conjoin (E_BOOK_QUERY_TYPE_AND, nqs, qs, unref);
}
@@ -93,13 +98,17 @@ e_book_query_and (gint nqs, EBookQuery **qs, gboolean unref)
* Returns: A new #EBookQuery
**/
EBookQuery *
-e_book_query_or (gint nqs, EBookQuery **qs, gboolean unref)
+e_book_query_or (gint nqs,
+ EBookQuery **qs,
+ gboolean unref)
{
return conjoin (E_BOOK_QUERY_TYPE_OR, nqs, qs, unref);
}
static EBookQuery *
-conjoinv (EBookQueryType type, EBookQuery *q, va_list ap)
+conjoinv (EBookQueryType type,
+ EBookQuery *q,
+ va_list ap)
{
EBookQuery *ret = g_new0 (EBookQuery, 1);
GPtrArray *qs;
@@ -165,7 +174,8 @@ e_book_query_orv (EBookQuery *q, ...)
* Returns: the new #EBookQuery
**/
EBookQuery *
-e_book_query_not (EBookQuery *q, gboolean unref)
+e_book_query_not (EBookQuery *q,
+ gboolean unref)
{
EBookQuery *ret = g_new0 (EBookQuery, 1);
@@ -189,8 +199,8 @@ e_book_query_not (EBookQuery *q, gboolean unref)
**/
EBookQuery *
e_book_query_field_test (EContactField field,
- EBookQueryTest test,
- const gchar *value)
+ EBookQueryTest test,
+ const gchar *value)
{
EBookQuery *ret = g_new0 (EBookQuery, 1);
@@ -215,9 +225,9 @@ e_book_query_field_test (EContactField field,
* Since: 2.22
**/
EBookQuery *
-e_book_query_vcard_field_test (const gchar *field,
- EBookQueryTest test,
- const gchar *value)
+e_book_query_vcard_field_test (const gchar *field,
+ EBookQueryTest test,
+ const gchar *value)
{
EBookQuery *ret = g_new0 (EBookQuery, 1);
@@ -349,7 +359,10 @@ e_book_query_ref (EBookQuery *q)
}
static ESExpResult *
-func_and (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_and (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
GList **list = data;
ESExpResult *r;
@@ -358,7 +371,7 @@ func_and (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data
if (argc > 0) {
gint i;
- qs = g_new0 (EBookQuery*, argc);
+ qs = g_new0 (EBookQuery *, argc);
for (i = 0; i < argc; i++) {
GList *list_head = *list;
@@ -381,7 +394,10 @@ func_and (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data
}
static ESExpResult *
-func_or (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_or (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
GList **list = data;
ESExpResult *r;
@@ -390,7 +406,7 @@ func_or (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
if (argc > 0) {
gint i;
- qs = g_new0 (EBookQuery*, argc);
+ qs = g_new0 (EBookQuery *, argc);
for (i = 0; i < argc; i++) {
GList *list_head = *list;
@@ -413,7 +429,10 @@ func_or (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
}
static ESExpResult *
-func_not (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_not (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
GList **list = data;
ESExpResult *r;
@@ -431,7 +450,10 @@ func_not (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data
}
static ESExpResult *
-func_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_contains (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
GList **list = data;
ESExpResult *r;
@@ -466,7 +488,10 @@ func_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
}
static ESExpResult *
-func_is (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_is (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
GList **list = data;
ESExpResult *r;
@@ -495,7 +520,10 @@ func_is (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
}
static ESExpResult *
-func_beginswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_beginswith (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
GList **list = data;
ESExpResult *r;
@@ -524,7 +552,10 @@ func_beginswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpoint
}
static ESExpResult *
-func_endswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_endswith (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
GList **list = data;
ESExpResult *r;
@@ -553,7 +584,10 @@ func_endswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
}
static ESExpResult *
-func_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_exists (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
GList **list = data;
ESExpResult *r;
@@ -600,8 +634,8 @@ static const struct {
*
* Returns: the new #EBookQuery.
**/
-EBookQuery*
-e_book_query_from_string (const gchar *query_string)
+EBookQuery *
+e_book_query_from_string (const gchar *query_string)
{
ESExp *sexp;
ESExpResult *r;
@@ -658,7 +692,7 @@ e_book_query_from_string (const gchar *query_string)
* finished with.
**/
gchar *
-e_book_query_to_string (EBookQuery *q)
+e_book_query_to_string (EBookQuery *q)
{
GString *str = g_string_new ("(");
GString *encoded = g_string_new ("");
@@ -754,7 +788,7 @@ e_book_query_get_type (void)
*
* Returns: A new #EBookQuery identical to @q.
**/
-EBookQuery*
+EBookQuery *
e_book_query_copy (EBookQuery *q)
{
gchar *str = e_book_query_to_string (q);
diff --git a/addressbook/libebook/e-book-query.h b/addressbook/libebook/e-book-query.h
index 47ca60c..12dfcc1 100644
--- a/addressbook/libebook/e-book-query.h
+++ b/addressbook/libebook/e-book-query.h
@@ -27,33 +27,33 @@ typedef enum {
*/
} EBookQueryTest;
-EBookQuery* e_book_query_from_string (const gchar *query_string);
+EBookQuery * e_book_query_from_string (const gchar *query_string);
gchar * e_book_query_to_string (EBookQuery *q);
-EBookQuery* e_book_query_ref (EBookQuery *q);
+EBookQuery * e_book_query_ref (EBookQuery *q);
void e_book_query_unref (EBookQuery *q);
-EBookQuery* e_book_query_and (gint nqs, EBookQuery **qs, gboolean unref);
-EBookQuery* e_book_query_andv (EBookQuery *q, ...) G_GNUC_NULL_TERMINATED;
-EBookQuery* e_book_query_or (gint nqs, EBookQuery **qs, gboolean unref);
-EBookQuery* e_book_query_orv (EBookQuery *q, ...) G_GNUC_NULL_TERMINATED;
+EBookQuery * e_book_query_and (gint nqs, EBookQuery **qs, gboolean unref);
+EBookQuery * e_book_query_andv (EBookQuery *q, ...) G_GNUC_NULL_TERMINATED;
+EBookQuery * e_book_query_or (gint nqs, EBookQuery **qs, gboolean unref);
+EBookQuery * e_book_query_orv (EBookQuery *q, ...) G_GNUC_NULL_TERMINATED;
-EBookQuery* e_book_query_not (EBookQuery *q, gboolean unref);
+EBookQuery * e_book_query_not (EBookQuery *q, gboolean unref);
-EBookQuery* e_book_query_field_exists (EContactField field);
-EBookQuery* e_book_query_vcard_field_exists (const gchar *field);
-EBookQuery* e_book_query_field_test (EContactField field,
+EBookQuery * e_book_query_field_exists (EContactField field);
+EBookQuery * e_book_query_vcard_field_exists (const gchar *field);
+EBookQuery * e_book_query_field_test (EContactField field,
EBookQueryTest test,
const gchar *value);
-EBookQuery* e_book_query_vcard_field_test (const gchar *field,
+EBookQuery * e_book_query_vcard_field_test (const gchar *field,
EBookQueryTest test,
const gchar *value);
/* a special any field contains query */
-EBookQuery* e_book_query_any_field_contains (const gchar *value);
+EBookQuery * e_book_query_any_field_contains (const gchar *value);
GType e_book_query_get_type (void);
-EBookQuery* e_book_query_copy (EBookQuery *q);
+EBookQuery * e_book_query_copy (EBookQuery *q);
G_END_DECLS
diff --git a/addressbook/libebook/e-book-view.c b/addressbook/libebook/e-book-view.c
index 08c5c67..e6c00d6 100644
--- a/addressbook/libebook/e-book-view.c
+++ b/addressbook/libebook/e-book-view.c
@@ -48,7 +48,9 @@ enum {
static guint signals[LAST_SIGNAL];
static void
-objects_added_cb (EGdbusBookView *object, const gchar * const *vcards, EBookView *book_view)
+objects_added_cb (EGdbusBookView *object,
+ const gchar * const *vcards,
+ EBookView *book_view)
{
const gchar * const *p;
GList *contacts = NULL;
@@ -69,7 +71,9 @@ objects_added_cb (EGdbusBookView *object, const gchar * const *vcards, EBookView
}
static void
-objects_modified_cb (EGdbusBookView *object, const gchar * const *vcards, EBookView *book_view)
+objects_modified_cb (EGdbusBookView *object,
+ const gchar * const *vcards,
+ EBookView *book_view)
{
const gchar * const *p;
GList *contacts = NULL;
@@ -89,7 +93,9 @@ objects_modified_cb (EGdbusBookView *object, const gchar * const *vcards, EBookV
}
static void
-objects_removed_cb (EGdbusBookView *object, const gchar * const *ids, EBookView *book_view)
+objects_removed_cb (EGdbusBookView *object,
+ const gchar * const *ids,
+ EBookView *book_view)
{
const gchar * const *p;
GList *list = NULL;
@@ -98,7 +104,7 @@ objects_removed_cb (EGdbusBookView *object, const gchar * const *ids, EBookView
return;
for (p = ids; *p; p++) {
- list = g_list_prepend (list, (gchar *)*p);
+ list = g_list_prepend (list, (gchar *) * p);
}
list = g_list_reverse (list);
@@ -109,7 +115,10 @@ objects_removed_cb (EGdbusBookView *object, const gchar * const *ids, EBookView
}
static void
-progress_cb (EGdbusBookView *object, guint percent, const gchar *message, EBookView *book_view)
+progress_cb (EGdbusBookView *object,
+ guint percent,
+ const gchar *message,
+ EBookView *book_view)
{
if (!book_view->priv->running)
return;
@@ -118,7 +127,9 @@ progress_cb (EGdbusBookView *object, guint percent, const gchar *message, EBookV
}
static void
-complete_cb (EGdbusBookView *object, const gchar * const *in_error_strv, EBookView *book_view)
+complete_cb (EGdbusBookView *object,
+ const gchar * const *in_error_strv,
+ EBookView *book_view)
{
GError *error = NULL;
EBookViewStatus bv_status = E_BOOK_VIEW_ERROR_OTHER_ERROR;
@@ -156,7 +167,8 @@ complete_cb (EGdbusBookView *object, const gchar * const *in_error_strv, EBookVi
}
EBookView *
-_e_book_view_new (EBook *book, EGdbusBookView *gdbus_bookview)
+_e_book_view_new (EBook *book,
+ EGdbusBookView *gdbus_bookview)
{
EBookView *view;
EBookViewPrivate *priv;
diff --git a/addressbook/libebook/e-book.c b/addressbook/libebook/e-book.c
index b3ba07b..87782f8 100644
--- a/addressbook/libebook/e-book.c
+++ b/addressbook/libebook/e-book.c
@@ -117,7 +117,10 @@ gdbus_book_disconnect (EBook *book);
* Called when the addressbook server dies.
*/
static void
-gdbus_book_closed_cb (GDBusConnection *connection, gboolean remote_peer_vanished, GError *error, EBook *book)
+gdbus_book_closed_cb (GDBusConnection *connection,
+ gboolean remote_peer_vanished,
+ GError *error,
+ EBook *book)
{
GError *err = NULL;
@@ -139,10 +142,16 @@ gdbus_book_closed_cb (GDBusConnection *connection, gboolean remote_peer_vanished
}
static void
-gdbus_book_connection_gone_cb (GDBusConnection *connection, const gchar *sender_name, const gchar *object_path, const gchar *interface_name, const gchar *signal_name, GVariant *parameters, gpointer user_data)
+gdbus_book_connection_gone_cb (GDBusConnection *connection,
+ const gchar *sender_name,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *signal_name,
+ GVariant *parameters,
+ gpointer user_data)
{
/* signal subscription takes care of correct parameters,
- thus just do what is to be done here */
+ * thus just do what is to be done here */
gdbus_book_closed_cb (connection, TRUE, NULL, user_data);
}
@@ -273,7 +282,10 @@ e_book_init (EBook *book)
}
static void
-book_factory_proxy_closed_cb (GDBusConnection *connection, gboolean remote_peer_vanished, GError *error, gpointer user_data)
+book_factory_proxy_closed_cb (GDBusConnection *connection,
+ gboolean remote_peer_vanished,
+ GError *error,
+ gpointer user_data)
{
GError *err = NULL;
@@ -304,10 +316,16 @@ book_factory_proxy_closed_cb (GDBusConnection *connection, gboolean remote_peer_
}
static void
-book_factory_connection_gone_cb (GDBusConnection *connection, const gchar *sender_name, const gchar *object_path, const gchar *interface_name, const gchar *signal_name, GVariant *parameters, gpointer user_data)
+book_factory_connection_gone_cb (GDBusConnection *connection,
+ const gchar *sender_name,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *signal_name,
+ GVariant *parameters,
+ gpointer user_data)
{
/* signal subscription takes care of correct parameters,
- thus just do what is to be done here */
+ * thus just do what is to be done here */
book_factory_proxy_closed_cb (connection, TRUE, NULL, user_data);
}
@@ -354,7 +372,9 @@ e_book_activate (GError **error)
}
static void
-readonly_cb (EGdbusBook *object, gboolean readonly, EBook *book)
+readonly_cb (EGdbusBook *object,
+ gboolean readonly,
+ EBook *book)
{
g_return_if_fail (E_IS_BOOK (book));
@@ -364,7 +384,9 @@ readonly_cb (EGdbusBook *object, gboolean readonly, EBook *book)
}
static void
-online_cb (EGdbusBook *object, gboolean is_online, EBook *book)
+online_cb (EGdbusBook *object,
+ gboolean is_online,
+ EBook *book)
{
g_return_if_fail (E_IS_BOOK (book));
@@ -374,7 +396,9 @@ online_cb (EGdbusBook *object, gboolean is_online, EBook *book)
}
static void
-auth_required_cb (EGdbusBook *object, const ECredentials *credentials, EBook *book)
+auth_required_cb (EGdbusBook *object,
+ const ECredentials *credentials,
+ EBook *book)
{
g_return_if_fail (E_IS_BOOK (book));
@@ -421,7 +445,9 @@ e_book_add_contact (EBook *book,
}
static void
-add_contact_reply (GObject *gdbus_book, GAsyncResult *res, gpointer user_data)
+add_contact_reply (GObject *gdbus_book,
+ GAsyncResult *res,
+ gpointer user_data)
{
GError *err = NULL, *error = NULL;
gchar *uid = NULL;
@@ -434,7 +460,7 @@ add_contact_reply (GObject *gdbus_book, GAsyncResult *res, gpointer user_data)
unwrap_gerror (error, &err);
/* If there is an error returned the GLib bindings currently return garbage
- for the OUT values. This is bad. */
+ * for the OUT values. This is bad. */
if (error)
uid = NULL;
@@ -577,7 +603,9 @@ e_book_commit_contact (EBook *book,
}
static void
-modify_contact_reply (GObject *gdbus_book, GAsyncResult *res, gpointer user_data)
+modify_contact_reply (GObject *gdbus_book,
+ GAsyncResult *res,
+ gpointer user_data)
{
GError *err = NULL, *error = NULL;
AsyncData *data = user_data;
@@ -735,7 +763,9 @@ e_book_get_required_fields (EBook *book,
}
static void
-get_required_fields_reply (GObject *gdbus_book, GAsyncResult *res, gpointer user_data)
+get_required_fields_reply (GObject *gdbus_book,
+ GAsyncResult *res,
+ gpointer user_data)
{
gchar **fields = NULL, *fields_str = NULL;
GError *err = NULL, *error = NULL;
@@ -857,9 +887,9 @@ e_book_get_required_fields_async (EBook *book,
* an #EBookClient object with #BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS instead.
**/
gboolean
-e_book_get_supported_fields (EBook *book,
- GList **fields,
- GError **error)
+e_book_get_supported_fields (EBook *book,
+ GList **fields,
+ GError **error)
{
GError *err = NULL;
gchar **list = NULL, *list_str = NULL;
@@ -883,7 +913,9 @@ e_book_get_supported_fields (EBook *book,
}
static void
-get_supported_fields_reply (GObject *gdbus_book, GAsyncResult *res, gpointer user_data)
+get_supported_fields_reply (GObject *gdbus_book,
+ GAsyncResult *res,
+ gpointer user_data)
{
gchar **fields = NULL, *fields_str = NULL;
GError *err = NULL, *error = NULL;
@@ -1034,7 +1066,9 @@ e_book_get_supported_auth_methods (EBook *book,
}
static void
-get_supported_auth_methods_reply (GObject *gdbus_book, GAsyncResult *res, gpointer user_data)
+get_supported_auth_methods_reply (GObject *gdbus_book,
+ GAsyncResult *res,
+ gpointer user_data)
{
gchar **methods = NULL, *methods_str = NULL;
GError *err = NULL, *error = NULL;
@@ -1188,7 +1222,9 @@ e_book_authenticate_user (EBook *book,
}
static void
-authenticate_user_reply (GObject *gdbus_book, GAsyncResult *res, gpointer user_data)
+authenticate_user_reply (GObject *gdbus_book,
+ GAsyncResult *res,
+ gpointer user_data)
{
GError *err = NULL, *error = NULL;
AsyncData *data = user_data;
@@ -1372,7 +1408,9 @@ e_book_get_contact (EBook *book,
}
static void
-get_contact_reply (GObject *gdbus_book, GAsyncResult *res, gpointer user_data)
+get_contact_reply (GObject *gdbus_book,
+ GAsyncResult *res,
+ gpointer user_data)
{
gchar *vcard = NULL;
GError *err = NULL, *error = NULL;
@@ -1520,7 +1558,9 @@ e_book_remove_contact (EBook *book,
}
static void
-remove_contact_reply (GObject *gdbus_book, GAsyncResult *res, gpointer user_data)
+remove_contact_reply (GObject *gdbus_book,
+ GAsyncResult *res,
+ gpointer user_data)
{
GError *err = NULL, *error = NULL;
AsyncData *data = user_data;
@@ -1670,7 +1710,9 @@ e_book_remove_contact_async (EBook *book,
}
static void
-remove_contact_by_id_reply (GObject *gdbus_book, GAsyncResult *res, gpointer user_data)
+remove_contact_by_id_reply (GObject *gdbus_book,
+ GAsyncResult *res,
+ gpointer user_data)
{
GError *err = NULL, *error = NULL;
AsyncData *data = user_data;
@@ -1782,7 +1824,9 @@ e_book_remove_contact_by_id_async (EBook *book,
}
static void
-remove_contacts_reply (GObject *gdbus_book, GAsyncResult *res, gpointer user_data)
+remove_contacts_reply (GObject *gdbus_book,
+ GAsyncResult *res,
+ gpointer user_data)
{
GError *err = NULL, *error = NULL;
AsyncData *data = user_data;
@@ -1926,12 +1970,12 @@ e_book_remove_contacts_async (EBook *book,
* Deprecated: 3.2: Use e_book_client_get_view_sync() instead.
**/
gboolean
-e_book_get_book_view (EBook *book,
- EBookQuery *query,
- GList *requested_fields,
- gint max_results,
- EBookView **book_view,
- GError **error)
+e_book_get_book_view (EBook *book,
+ EBookQuery *query,
+ GList *requested_fields,
+ gint max_results,
+ EBookView **book_view,
+ GError **error)
{
GError *err = NULL;
EGdbusBookView *gdbus_bookview;
@@ -1977,7 +2021,9 @@ e_book_get_book_view (EBook *book,
}
static void
-get_book_view_reply (GObject *gdbus_book, GAsyncResult *res, gpointer user_data)
+get_book_view_reply (GObject *gdbus_book,
+ GAsyncResult *res,
+ gpointer user_data)
{
gchar *view_path = NULL;
GError *err = NULL, *error = NULL;
@@ -2129,10 +2175,10 @@ e_book_get_book_view_async (EBook *book,
* Deprecated: 3.2: Use e_book_client_get_contacts_sync() instead.
**/
gboolean
-e_book_get_contacts (EBook *book,
- EBookQuery *query,
- GList **contacts,
- GError **error)
+e_book_get_contacts (EBook *book,
+ EBookQuery *query,
+ GList **contacts,
+ GError **error)
{
GError *err = NULL;
gchar **list = NULL;
@@ -2165,7 +2211,9 @@ e_book_get_contacts (EBook *book,
}
static void
-get_contacts_reply (GObject *gdbus_book, GAsyncResult *res, gpointer user_data)
+get_contacts_reply (GObject *gdbus_book,
+ GAsyncResult *res,
+ gpointer user_data)
{
gchar **vcards = NULL;
GError *err = NULL, *error = NULL;
@@ -2337,10 +2385,10 @@ parse_changes_array (GVariant *var_changes)
* Deprecated: 3.2: This function has been dropped completely.
*/
gboolean
-e_book_get_changes (EBook *book,
- const gchar *changeid,
- GList **changes,
- GError **error)
+e_book_get_changes (EBook *book,
+ const gchar *changeid,
+ GList **changes,
+ GError **error)
{
GError *err = NULL;
GVariant *var_changes = NULL;
@@ -2474,8 +2522,8 @@ e_book_free_change_list (GList *change_list)
* Deprecated: 3.2: Use e_client_cancel_all() or e_client_cancel_op() on an #EBookClient object instead.
**/
gboolean
-e_book_cancel (EBook *book,
- GError **error)
+e_book_cancel (EBook *book,
+ GError **error)
{
g_return_val_if_fail (E_IS_BOOK (book), FALSE);
@@ -2496,7 +2544,8 @@ e_book_cancel (EBook *book,
* Deprecated: 3.2: Use e_client_cancel_all() or e_client_cancel_op() on an #EBookClient object instead.
**/
gboolean
-e_book_cancel_async_op (EBook *book, GError **error)
+e_book_cancel_async_op (EBook *book,
+ GError **error)
{
g_return_val_if_fail (E_IS_BOOK (book), FALSE);
@@ -2519,9 +2568,9 @@ e_book_cancel_async_op (EBook *book, GError **error)
* Deprecated: 3.2: Use e_client_open_sync() on an #EBookClient object instead.
*/
gboolean
-e_book_open (EBook *book,
- gboolean only_if_exists,
- GError **error)
+e_book_open (EBook *book,
+ gboolean only_if_exists,
+ GError **error)
{
GError *err = NULL;
@@ -2544,7 +2593,9 @@ e_book_open (EBook *book,
}
static void
-open_reply (GObject *gdbus_book, GAsyncResult *res, gpointer user_data)
+open_reply (GObject *gdbus_book,
+ GAsyncResult *res,
+ gpointer user_data)
{
GError *err = NULL, *error = NULL;
AsyncData *data = user_data;
@@ -2658,8 +2709,8 @@ e_book_open_async (EBook *book,
* Deprecated: 3.2: Use e_client_remove_sync() on an #EBookClient object instead.
*/
gboolean
-e_book_remove (EBook *book,
- GError **error)
+e_book_remove (EBook *book,
+ GError **error)
{
GError *err = NULL;
@@ -2674,7 +2725,9 @@ e_book_remove (EBook *book,
}
static void
-remove_reply (GObject *gdbus_book, GAsyncResult *res, gpointer user_data)
+remove_reply (GObject *gdbus_book,
+ GAsyncResult *res,
+ gpointer user_data)
{
GError *err = NULL, *error = NULL;
AsyncData *data = user_data;
@@ -2749,7 +2802,7 @@ e_book_async_remove (EBook *book,
**/
gboolean
e_book_remove_async (EBook *book,
- EBookAsyncCallback cb,
+ EBookAsyncCallback cb,
gpointer closure)
{
AsyncData *data;
@@ -2976,7 +3029,9 @@ make_me_card (void)
* Deprecated: 3.2: Use e_book_client_get_self() instead.
**/
gboolean
-e_book_get_self (EContact **contact, EBook **book, GError **error)
+e_book_get_self (EContact **contact,
+ EBook **book,
+ GError **error)
{
GError *e = NULL;
GConfClient *gconf;
@@ -3045,7 +3100,9 @@ e_book_get_self (EContact **contact, EBook **book, GError **error)
* Deprecated: 3.2: Use e_book_client_set_self() instead.
**/
gboolean
-e_book_set_self (EBook *book, EContact *contact, GError **error)
+e_book_set_self (EBook *book,
+ EContact *contact,
+ GError **error)
{
GConfClient *gconf;
@@ -3077,7 +3134,7 @@ e_book_is_self (EContact *contact)
gboolean rv;
/* XXX this should probably be e_return_error_if_fail, but we
- need a GError arg for that */
+ * need a GError arg for that */
g_return_val_if_fail (contact && E_IS_CONTACT (contact), FALSE);
gconf = gconf_client_get_default ();
@@ -3104,7 +3161,8 @@ e_book_is_self (EContact *contact)
* Deprecated: 3.2: Use e_book_client_set_default_addressbook() instead.
*/
gboolean
-e_book_set_default_addressbook (EBook *book, GError **error)
+e_book_set_default_addressbook (EBook *book,
+ GError **error)
{
ESource *source;
@@ -3151,7 +3209,7 @@ e_book_set_default_source (ESource *source,
}
/* make sure the source is actually in the ESourceList. if
- it's not we don't bother adding it, just return an error */
+ * it's not we don't bother adding it, just return an error */
source = e_source_list_peek_source_by_uid (sources, uid);
if (!source) {
g_set_error (error, E_BOOK_ERROR, E_BOOK_ERROR_NO_SUCH_SOURCE,
@@ -3161,7 +3219,7 @@ e_book_set_default_source (ESource *source,
}
/* loop over all the sources clearing out any "default"
- properties we find */
+ * properties we find */
for (g = e_source_list_peek_groups (sources); g; g = g->next) {
GSList *s;
for (s = e_source_group_peek_sources (E_SOURCE_GROUP (g->data));
@@ -3200,7 +3258,8 @@ e_book_set_default_source (ESource *source,
* Deprecated: 3.2: Use e_book_client_get_sources() instead.
*/
gboolean
-e_book_get_addressbooks (ESourceList **addressbook_sources, GError **error)
+e_book_get_addressbooks (ESourceList **addressbook_sources,
+ GError **error)
{
GConfClient *gconf;
@@ -3305,10 +3364,14 @@ e_book_new (ESource *source,
}
/* for each known source calls check_func, which should return TRUE if the required
- source have been found. Function returns NULL or the source on which was returned
- TRUE by the check_func. Non-NULL pointer should be unreffed by g_object_unref. */
+ * source have been found. Function returns NULL or the source on which was returned
+ * TRUE by the check_func. Non-NULL pointer should be unreffed by g_object_unref. */
static ESource *
-search_known_sources (gboolean (*check_func)(ESource *source, gpointer user_data), gpointer user_data, ESourceList **sources, GError **error)
+search_known_sources (gboolean (*check_func)(ESource *source,
+ gpointer user_data),
+ gpointer user_data,
+ ESourceList **sources,
+ GError **error)
{
ESource *res = NULL;
GSList *g;
@@ -3343,7 +3406,8 @@ search_known_sources (gboolean (*check_func)(ESource *source, gpointer user_data
}
static gboolean
-check_uri (ESource *source, gpointer uri)
+check_uri (ESource *source,
+ gpointer uri)
{
const gchar *suri;
@@ -3392,7 +3456,8 @@ check_uri (ESource *source, gpointer uri)
* Deprecated: 3.2: Use e_book_client_new_from_uri() instead.
*/
EBook *
-e_book_new_from_uri (const gchar *uri, GError **error)
+e_book_new_from_uri (const gchar *uri,
+ GError **error)
{
ESourceList *sources = NULL;
ESource *source;
@@ -3430,7 +3495,8 @@ struct check_system_data
};
static gboolean
-check_system (ESource *source, gpointer data)
+check_system (ESource *source,
+ gpointer data)
{
struct check_system_data *csd = data;
@@ -3664,7 +3730,7 @@ get_status_from_error (GError *error)
return error->code;
} else {
/* In this case the error was caused by DBus. Dump the message to the
- console as otherwise we have no idea what the problem is. */
+ * console as otherwise we have no idea what the problem is. */
g_warning ("DBus error: %s", error->message);
return E_BOOK_ERROR_DBUS_EXCEPTION;
}
@@ -3676,7 +3742,8 @@ get_status_from_error (GError *error)
* alone.
*/
static gboolean
-unwrap_gerror (GError *error, GError **client_error)
+unwrap_gerror (GError *error,
+ GError **client_error)
{
if (error == NULL)
return TRUE;
diff --git a/addressbook/libebook/e-book.h b/addressbook/libebook/e-book.h
index 6cb3c55..f632d2b 100644
--- a/addressbook/libebook/e-book.h
+++ b/addressbook/libebook/e-book.h
@@ -405,7 +405,7 @@ gboolean e_book_is_self (EContact *contact);
/* Addressbook Discovery */
gboolean e_book_set_default_addressbook (EBook *book, GError **error);
gboolean e_book_set_default_source (ESource *source, GError **error);
-gboolean e_book_get_addressbooks (ESourceList** addressbook_sources, GError **error);
+gboolean e_book_get_addressbooks (ESourceList ** addressbook_sources, GError **error);
GType e_book_get_type (void);
diff --git a/addressbook/libebook/e-contact.c b/addressbook/libebook/e-contact.c
index bfc686e..5032db2 100644
--- a/addressbook/libebook/e-contact.c
+++ b/addressbook/libebook/e-contact.c
@@ -115,15 +115,15 @@ static const EContactFieldInfo field_info[] = {
{0,}, /* Dummy row as EContactField starts from 1 */
STRING_FIELD (E_CONTACT_UID, EVC_UID, "id", N_("Unique ID"), FALSE),
/* FILE_AS is not really a structured field - we use a getter/setter
- so we can generate its value if necessary in the getter */
+ * so we can generate its value if necessary in the getter */
GETSET_FIELD (E_CONTACT_FILE_AS, EVC_X_FILE_AS, "file_as", N_("File Under"), FALSE, fileas_getter, fileas_setter),
/* URI of the book to which the contact belongs to */
STRING_FIELD (E_CONTACT_BOOK_URI, EVC_X_BOOK_URI, "book_uri", N_("Book URI"), FALSE),
/* Name fields */
/* FN isn't really a structured field - we use a getter/setter
- so we can set the N property (since evo 1.4 works fine with
- vcards that don't even have a N attribute. *sigh*) */
+ * so we can set the N property (since evo 1.4 works fine with
+ * vcards that don't even have a N attribute. *sigh*) */
GETSET_FIELD (E_CONTACT_FULL_NAME, EVC_FN, "full_name", N_("Full Name"), FALSE, fn_getter, fn_setter),
LIST_ELEM_STR_FIELD (E_CONTACT_GIVEN_NAME, EVC_N, "given_name", N_("Given Name"), FALSE, 1),
LIST_ELEM_STR_FIELD (E_CONTACT_FAMILY_NAME, EVC_N, "family_name", N_("Family Name"), FALSE, 0),
@@ -387,8 +387,9 @@ e_contact_init (EContact *ec)
ec->priv = g_new0 (EContactPrivate, 1);
}
-static EVCardAttribute*
-e_contact_get_first_attr (EContact *contact, const gchar *attr_name)
+static EVCardAttribute *
+e_contact_get_first_attr (EContact *contact,
+ const gchar *attr_name)
{
GList *attrs, *l;
@@ -410,7 +411,8 @@ e_contact_get_first_attr (EContact *contact, const gchar *attr_name)
static gpointer
-geo_getter (EContact *contact, EVCardAttribute *attr)
+geo_getter (EContact *contact,
+ EVCardAttribute *attr)
{
if (attr) {
GList *p = e_vcard_attribute_get_values (attr);
@@ -426,7 +428,9 @@ geo_getter (EContact *contact, EVCardAttribute *attr)
}
static void
-geo_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
+geo_setter (EContact *contact,
+ EVCardAttribute *attr,
+ gpointer data)
{
EContactGeo *geo = data;
gchar buf[G_ASCII_DTOSTR_BUF_SIZE];
@@ -439,7 +443,8 @@ geo_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
}
static gpointer
-photo_getter (EContact *contact, EVCardAttribute *attr)
+photo_getter (EContact *contact,
+ EVCardAttribute *attr)
{
GList *values;
@@ -483,7 +488,9 @@ photo_getter (EContact *contact, EVCardAttribute *attr)
}
static void
-photo_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
+photo_setter (EContact *contact,
+ EVCardAttribute *attr,
+ gpointer data)
{
EContactPhoto *photo = data;
const gchar *image_type, *p;
@@ -496,7 +503,7 @@ photo_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
e_vcard_attribute_param_new (EVC_ENCODING),
"b");
if (photo->data.inlined.mime_type && (p = strchr (photo->data.inlined.mime_type, '/'))) {
- image_type = p+1;
+ image_type = p + 1;
} else {
image_type = "X-EVOLUTION-UNKNOWN";
}
@@ -520,7 +527,8 @@ photo_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
static gpointer
-fn_getter (EContact *contact, EVCardAttribute *attr)
+fn_getter (EContact *contact,
+ EVCardAttribute *attr)
{
if (attr) {
GList *p = e_vcard_attribute_get_values (attr);
@@ -532,7 +540,9 @@ fn_getter (EContact *contact, EVCardAttribute *attr)
}
static void
-fn_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
+fn_setter (EContact *contact,
+ EVCardAttribute *attr,
+ gpointer data)
{
gchar *name_str = data;
@@ -553,7 +563,8 @@ fn_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
}
static gpointer
-fileas_getter (EContact *contact, EVCardAttribute *attr)
+fileas_getter (EContact *contact,
+ EVCardAttribute *attr)
{
if (!attr) {
/* Generate a FILE_AS field */
@@ -607,7 +618,9 @@ fileas_getter (EContact *contact, EVCardAttribute *attr)
}
static void
-fileas_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
+fileas_setter (EContact *contact,
+ EVCardAttribute *attr,
+ gpointer data)
{
/* Default implementation */
const gchar *file_as = data;
@@ -617,7 +630,8 @@ fileas_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
static gpointer
-n_getter (EContact *contact, EVCardAttribute *attr)
+n_getter (EContact *contact,
+ EVCardAttribute *attr)
{
EContactName *name = g_new0 (EContactName, 1);
EVCardAttribute *new_attr;
@@ -646,7 +660,9 @@ n_getter (EContact *contact, EVCardAttribute *attr)
}
static void
-n_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
+n_setter (EContact *contact,
+ EVCardAttribute *attr,
+ gpointer data)
{
EContactName *name = data;
@@ -681,7 +697,8 @@ n_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
static gpointer
-adr_getter (EContact *contact, EVCardAttribute *attr)
+adr_getter (EContact *contact,
+ EVCardAttribute *attr)
{
if (attr) {
GList *p = e_vcard_attribute_get_values (attr);
@@ -703,7 +720,9 @@ adr_getter (EContact *contact, EVCardAttribute *attr)
}
static void
-adr_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
+adr_setter (EContact *contact,
+ EVCardAttribute *attr,
+ gpointer data)
{
EContactAddress *addr = data;
@@ -719,7 +738,8 @@ adr_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
static gpointer
-date_getter (EContact *contact, EVCardAttribute *attr)
+date_getter (EContact *contact,
+ EVCardAttribute *attr)
{
if (attr) {
GList *p = e_vcard_attribute_get_values (attr);
@@ -737,7 +757,9 @@ date_getter (EContact *contact, EVCardAttribute *attr)
}
static void
-date_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
+date_setter (EContact *contact,
+ EVCardAttribute *attr,
+ gpointer data)
{
EContactDate *date = data;
gchar *str;
@@ -751,11 +773,12 @@ date_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
static gpointer
-cert_getter (EContact *contact, EVCardAttribute *attr)
+cert_getter (EContact *contact,
+ EVCardAttribute *attr)
{
if (attr) {
/* the certificate is stored in this vcard. just
- return the data */
+ * return the data */
GList *values = e_vcard_attribute_get_values_decoded (attr);
if (values && values->data) {
@@ -771,15 +794,17 @@ cert_getter (EContact *contact, EVCardAttribute *attr)
}
/* XXX if we stored a fingerprint in the cert we could look it
- up via NSS, but that would require the additional NSS dep
- here, and we'd have more than one process opening the
- certdb, which is bad. *sigh* */
+ * up via NSS, but that would require the additional NSS dep
+ * here, and we'd have more than one process opening the
+ * certdb, which is bad. *sigh * */
return NULL;
}
static void
-cert_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
+cert_setter (EContact *contact,
+ EVCardAttribute *attr,
+ gpointer data)
{
EContactCert *cert = data;
@@ -795,9 +820,9 @@ cert_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
/* Set_arg handler for the contact */
static void
e_contact_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
EContact *contact = E_CONTACT (object);
const EContactFieldInfo *info = NULL;
@@ -814,8 +839,8 @@ e_contact_set_property (GObject *object,
GList *l;
/* first we remove all attributes of the type we're
- adding, then add new ones based on the values that
- are passed in */
+ * adding, then add new ones based on the values that
+ * are passed in */
e_vcard_remove_attributes (E_VCARD (contact), NULL, info->vcard_field_name);
for (l = new_values; l; l = l->next)
@@ -826,11 +851,11 @@ e_contact_set_property (GObject *object,
else if (info->t & E_CONTACT_FIELD_TYPE_SYNTHETIC) {
if (info->t & E_CONTACT_FIELD_TYPE_MULTI_ELEM) {
/* XXX this is kinda broken - we don't insert
- insert padding elements if, e.g. the user
- sets email 3 when email 1 and 2 don't
- exist. But, if we *did* pad the lists we'd
- end up with empty items in the vcard. I
- dunno which is worse. */
+ * insert padding elements if, e.g. the user
+ * sets email 3 when email 1 and 2 don't
+ * exist. But, if we *did* pad the lists we'd
+ * end up with empty items in the vcard. I
+ * dunno which is worse. */
EVCardAttribute *attr = NULL;
gboolean found = FALSE;
gint num_left = info->list_elem;
@@ -881,11 +906,11 @@ e_contact_set_property (GObject *object,
}
else if (info->t & E_CONTACT_FIELD_TYPE_ATTR_TYPE) {
/* XXX this is kinda broken - we don't insert
- insert padding elements if, e.g. the user
- sets email 3 when email 1 and 2 don't
- exist. But, if we *did* pad the lists we'd
- end up with empty items in the vcard. I
- dunno which is worse. */
+ * insert padding elements if, e.g. the user
+ * sets email 3 when email 1 and 2 don't
+ * exist. But, if we *did* pad the lists we'd
+ * end up with empty items in the vcard. I
+ * dunno which is worse. */
EVCardAttribute *attr = NULL;
gboolean found = FALSE;
gint num_left = info->list_elem;
@@ -932,9 +957,9 @@ e_contact_set_property (GObject *object,
if (!matches) {
/* this is to enforce that we find an attribute
- with *only* the TYPE='s we need. This may seem like
- an odd restriction but it's the only way at present to
- implement the Other Fax and Other Phone attributes. */
+ * with *only* the TYPE='s we need. This may seem like
+ * an odd restriction but it's the only way at present to
+ * implement the Other Fax and Other Phone attributes. */
found_needed1 = FALSE;
break;
}
@@ -1065,7 +1090,7 @@ e_contact_set_property (GObject *object,
|| (data && *(gchar *) data)) {
d(printf ("overwriting existing %s\n", info->vcard_field_name));
/* remove all existing values and parameters.
- the setter will add the correct ones */
+ * the setter will add the correct ones */
e_vcard_attribute_remove_values (attr);
e_vcard_attribute_remove_params (attr);
@@ -1158,7 +1183,11 @@ e_contact_set_property (GObject *object,
}
static EVCardAttribute *
-e_contact_find_attribute_with_types (EContact *contact, const gchar *attr_name, const gchar *type_needed1, const gchar *type_needed2, gint nth)
+e_contact_find_attribute_with_types (EContact *contact,
+ const gchar *attr_name,
+ const gchar *type_needed1,
+ const gchar *type_needed2,
+ gint nth)
{
GList *l, *attrs;
gboolean found_needed1, found_needed2;
@@ -1203,9 +1232,9 @@ e_contact_find_attribute_with_types (EContact *contact, const gchar *attr_name,
if (!matches) {
/* this is to enforce that we find an attribute
- with *only* the TYPE='s we need. This may seem like
- an odd restriction but it's the only way at present to
- implement the Other Fax and Other Phone attributes. */
+ * with *only* the TYPE='s we need. This may seem like
+ * an odd restriction but it's the only way at present to
+ * implement the Other Fax and Other Phone attributes. */
found_needed1 = FALSE;
break;
}
@@ -1226,9 +1255,9 @@ e_contact_find_attribute_with_types (EContact *contact, const gchar *attr_name,
static void
e_contact_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
const EContactFieldInfo *info = NULL;
gpointer data;
@@ -1270,7 +1299,7 @@ e_contact_get_property (GObject *object,
*
* Returns: A new #EContact.
**/
-EContact*
+EContact *
e_contact_new (void)
{
return e_contact_new_from_vcard ("");
@@ -1284,8 +1313,8 @@ e_contact_new (void)
*
* Returns: A new #EContact.
**/
-EContact*
-e_contact_new_from_vcard (const gchar *vcard)
+EContact *
+e_contact_new_from_vcard (const gchar *vcard)
{
EContact *contact;
g_return_val_if_fail (vcard != NULL, NULL);
@@ -1304,7 +1333,7 @@ e_contact_new_from_vcard (const gchar *vcard)
*
* Returns: (transfer full): A new #EContact identical to @contact.
**/
-EContact*
+EContact *
e_contact_duplicate (EContact *contact)
{
gchar *vcard;
@@ -1366,7 +1395,7 @@ e_contact_pretty_name (EContactField field_id)
* Returns: The vcard attribute corresponding to @field_id, or %NULL if it doesn't exist.
**/
const gchar *
-e_contact_vcard_attribute (EContactField field_id)
+e_contact_vcard_attribute (EContactField field_id)
{
g_return_val_if_fail (field_id >= 1 && field_id <= E_CONTACT_FIELD_LAST, "");
@@ -1431,7 +1460,8 @@ e_contact_field_id_from_vcard (const gchar *vcard_field)
* Returns: (transfer full): Depends on the field's type, owned by the caller.
**/
gpointer
-e_contact_get (EContact *contact, EContactField field_id)
+e_contact_get (EContact *contact,
+ EContactField field_id)
{
const EContactFieldInfo *info = NULL;
@@ -1618,7 +1648,8 @@ e_contact_get (EContact *contact, EContactField field_id)
* #EContact.
**/
gconstpointer
-e_contact_get_const (EContact *contact, EContactField field_id)
+e_contact_get_const (EContact *contact,
+ EContactField field_id)
{
gpointer value = NULL;
@@ -1645,7 +1676,9 @@ e_contact_get_const (EContact *contact, EContactField field_id)
* Sets the value of @contact's field specified by @field_id to @value.
**/
void
-e_contact_set (EContact *contact, EContactField field_id, gconstpointer value)
+e_contact_set (EContact *contact,
+ EContactField field_id,
+ gconstpointer value)
{
d(printf ("e_contact_set (%p, %d, %p)\n", contact, field_id, value));
@@ -1653,7 +1686,7 @@ e_contact_set (EContact *contact, EContactField field_id, gconstpointer value)
g_return_if_fail (field_id >= 1 && field_id <= E_CONTACT_FIELD_LAST);
/* set the cached slot to NULL so we'll re-get the new string
- if e_contact_get_const is called again */
+ * if e_contact_get_const is called again */
contact->priv->cached_strings[field_id] = NULL;
g_object_set (contact,
@@ -1671,8 +1704,9 @@ e_contact_set (EContact *contact, EContactField field_id, gconstpointer value)
* Returns: (transfer full) (element-type EVCardAttribute): A #GList of pointers
* to #EVCardAttribute, owned by the caller.
**/
-GList*
-e_contact_get_attributes (EContact *contact, EContactField field_id)
+GList *
+e_contact_get_attributes (EContact *contact,
+ EContactField field_id)
{
GList *l = NULL;
GList *attrs, *a;
@@ -1709,7 +1743,9 @@ e_contact_get_attributes (EContact *contact, EContactField field_id)
* Attributes are added to the contact in the same order as they are in @attributes.
**/
void
-e_contact_set_attributes (EContact *contact, EContactField field_id, GList *attributes)
+e_contact_set_attributes (EContact *contact,
+ EContactField field_id,
+ GList *attributes)
{
const EContactFieldInfo *info = NULL;
GList *l;
@@ -1723,7 +1759,7 @@ e_contact_set_attributes (EContact *contact, EContactField field_id, GList *attr
for (l = attributes; l; l = l->next)
e_vcard_append_attribute (E_VCARD (contact),
- e_vcard_attribute_copy ((EVCardAttribute*) l->data));
+ e_vcard_attribute_copy ((EVCardAttribute *) l->data));
}
/**
@@ -1733,7 +1769,7 @@ e_contact_set_attributes (EContact *contact, EContactField field_id, GList *attr
*
* Returns: A new #EContactName struct.
**/
-EContactName*
+EContactName *
e_contact_name_new (void)
{
return g_new0 (EContactName, 1);
@@ -1776,7 +1812,7 @@ e_contact_name_to_string (const EContactName *name)
*
* Returns: A new #EContactName struct.
**/
-EContactName*
+EContactName *
e_contact_name_from_string (const gchar *name_str)
{
EContactName *name;
@@ -1806,7 +1842,7 @@ e_contact_name_from_string (const gchar *name_str)
*
* Returns: A new #EContactName identical to @n.
**/
-EContactName*
+EContactName *
e_contact_name_copy (EContactName *n)
{
EContactName *name;
@@ -1874,10 +1910,10 @@ E_CONTACT_DEFINE_BOXED_TYPE (e_contact_name, "EContactName")
*
* Returns: A new #EContactDate struct.
**/
-EContactDate*
+EContactDate *
e_contact_date_from_string (const gchar *str)
{
- EContactDate* date;
+ EContactDate * date;
gint length;
gchar *t;
@@ -1934,7 +1970,8 @@ e_contact_date_to_string (EContactDate *dt)
* Returns: %TRUE if @dt1 and @dt2 are equal, %FALSE otherwise.
**/
gboolean
-e_contact_date_equal (EContactDate *dt1, EContactDate *dt2)
+e_contact_date_equal (EContactDate *dt1,
+ EContactDate *dt2)
{
if (dt1 && dt2) {
return (dt1->year == dt2->year &&
@@ -1984,7 +2021,7 @@ E_CONTACT_DEFINE_BOXED_TYPE (e_contact_date, "EContactDate")
*
* Returns: A new #EContactDate struct.
**/
-EContactDate*
+EContactDate *
e_contact_date_new (void)
{
return g_new0 (EContactDate, 1);
@@ -1997,7 +2034,7 @@ e_contact_date_new (void)
*
* Returns: (transfer full): A new #EContactPhoto struct.
**/
-EContactPhoto*
+EContactPhoto *
e_contact_photo_new (void)
{
return g_new0 (EContactPhoto, 1);
@@ -2073,7 +2110,8 @@ e_contact_photo_copy (EContactPhoto *photo)
* #EContactPhoto.
**/
const guchar *
-e_contact_photo_get_inlined (EContactPhoto *photo, gsize *len)
+e_contact_photo_get_inlined (EContactPhoto *photo,
+ gsize *len)
{
g_return_val_if_fail (photo != NULL, NULL);
g_return_val_if_fail (photo->type == E_CONTACT_PHOTO_TYPE_INLINED, NULL);
@@ -2092,7 +2130,8 @@ e_contact_photo_get_inlined (EContactPhoto *photo, gsize *len)
**/
void
e_contact_photo_set_inlined (EContactPhoto *photo,
- const guchar *data, gsize len)
+ const guchar *data,
+ gsize len)
{
g_return_if_fail (photo != NULL);
g_return_if_fail (photo->type == E_CONTACT_PHOTO_TYPE_INLINED);
@@ -2127,7 +2166,8 @@ e_contact_photo_get_mime_type (EContactPhoto *photo)
* Sets the @photo's mime type.
**/
void
-e_contact_photo_set_mime_type (EContactPhoto *photo, const gchar *mime_type)
+e_contact_photo_set_mime_type (EContactPhoto *photo,
+ const gchar *mime_type)
{
g_return_if_fail (photo != NULL);
g_return_if_fail (photo->type == E_CONTACT_PHOTO_TYPE_INLINED);
@@ -2161,7 +2201,8 @@ e_contact_photo_get_uri (EContactPhoto *photo)
* Sets the @photo's URI.
**/
void
-e_contact_photo_set_uri (EContactPhoto *photo, const gchar *uri)
+e_contact_photo_set_uri (EContactPhoto *photo,
+ const gchar *uri)
{
g_return_if_fail (photo != NULL);
g_return_if_fail (photo->type == E_CONTACT_PHOTO_TYPE_URI);
@@ -2205,7 +2246,7 @@ E_CONTACT_DEFINE_BOXED_TYPE (e_contact_geo, "EContactGeo")
*
* Returns: (transfer full): A new #EContactAddress struct.
**/
-EContactAddress*
+EContactAddress *
e_contact_address_new (void)
{
return g_new0 (EContactAddress, 1);
diff --git a/addressbook/libebook/e-contact.h b/addressbook/libebook/e-contact.h
index 1f262b5..bd65ce4 100644
--- a/addressbook/libebook/e-contact.h
+++ b/addressbook/libebook/e-contact.h
@@ -142,9 +142,9 @@ typedef enum {
E_CONTACT_IM_ICQ_WORK_3, /* Synthetic string field */
/* Convenience field for getting a name from the contact.
- Returns the first one of[File-As, Full Name, Org, Email1]
- to be set */
- E_CONTACT_REV, /* string field to hold time of last update to this vcard*/
+ * Returns the first one of[File-As, Full Name, Org, Email1]
+ * to be set */
+ E_CONTACT_REV, /* string field to hold time of last update to this vcard */
E_CONTACT_NAME_OR_ORG,
/* Address fields */
@@ -173,8 +173,8 @@ typedef enum {
E_CONTACT_WANTS_HTML, /* boolean field */
/* fields used for describing contact lists. a contact list
- is just a contact with _IS_LIST set to true. the members
- are listed in the _EMAIL field. */
+ * is just a contact with _IS_LIST set to true. the members
+ * are listed in the _EMAIL field. */
E_CONTACT_IS_LIST, /* boolean field */
E_CONTACT_LIST_SHOW_ADDRESSES, /* boolean field */
@@ -268,8 +268,8 @@ typedef struct {
typedef struct {
gchar *address_format; /* the two letter country code that
- determines the format/meaning of the
- following fields */
+ * determines the format/meaning of the
+ * following fields */
gchar *po;
gchar *ext;
gchar *street;
@@ -309,18 +309,18 @@ struct _EContactClass {
GType e_contact_get_type (void);
-EContact* e_contact_new (void);
-EContact* e_contact_new_from_vcard (const gchar *vcard);
+EContact * e_contact_new (void);
+EContact * e_contact_new_from_vcard (const gchar *vcard);
-EContact* e_contact_duplicate (EContact *contact);
+EContact * e_contact_duplicate (EContact *contact);
gpointer e_contact_get (EContact *contact, EContactField field_id);
gconstpointer e_contact_get_const (EContact *contact, EContactField field_id);
void e_contact_set (EContact *contact, EContactField field_id, gconstpointer value);
/* the following two calls return and take a GList of
- EVCardAttribute*'s. */
-GList* e_contact_get_attributes (EContact *contact, EContactField field_id);
+ * EVCardAttribute*'s. */
+GList * e_contact_get_attributes (EContact *contact, EContactField field_id);
void e_contact_set_attributes (EContact *contact, EContactField field_id, GList *attributes);
/* misc functions for structured values */
@@ -339,7 +339,7 @@ EContactName *e_contact_name_from_string (const gchar *name_str);
EContactName *e_contact_name_copy (EContactName *n);
void e_contact_name_free (EContactName *name);
-EContactPhoto* e_contact_photo_new (void);
+EContactPhoto * e_contact_photo_new (void);
GType e_contact_photo_get_type (void);
void e_contact_photo_free (EContactPhoto *photo);
const guchar * e_contact_photo_get_inlined (EContactPhoto *photo, gsize *len);
@@ -355,7 +355,7 @@ void e_contact_geo_free (EContactGeo *geo);
GType e_contact_cert_get_type (void);
void e_contact_cert_free (EContactCert *cert);
-EContactAddress* e_contact_address_new (void);
+EContactAddress * e_contact_address_new (void);
GType e_contact_address_get_type (void);
void e_contact_address_free (EContactAddress *address);
diff --git a/addressbook/libebook/e-destination.c b/addressbook/libebook/e-destination.c
index c7881cf..2110858 100644
--- a/addressbook/libebook/e-destination.c
+++ b/addressbook/libebook/e-destination.c
@@ -26,12 +26,12 @@
*/
/*
- We should probably make most of the functions in this file a little
- stupider.. all the work extracting useful info from the
- EContact/raw text/etc should happen in e_destination_set_contact
- (and the other setters), not in a bunch of if's in the respective
- _get_*() functions.
-*/
+ * We should probably make most of the functions in this file a little
+ * stupider.. all the work extracting useful info from the
+ * EContact/raw text/etc should happen in e_destination_set_contact
+ * (and the other setters), not in a bunch of if's in the respective
+ * _get_*() functions.
+ */
#include <config.h>
#include "e-destination.h"
@@ -100,7 +100,9 @@ static GObjectClass *parent_class;
/* Copied from eab-book-util.c. The name selector also keeps its own copy... */
static gint
-utf8_casefold_collate_len (const gchar *str1, const gchar *str2, gint len)
+utf8_casefold_collate_len (const gchar *str1,
+ const gchar *str2,
+ gint len)
{
gchar *s1 = g_utf8_casefold (str1, len);
gchar *s2 = g_utf8_casefold (str2, len);
@@ -116,7 +118,8 @@ utf8_casefold_collate_len (const gchar *str1, const gchar *str2, gint len)
/* Copied from eab-book-util.c. The name selector also keeps its own copy... */
static gint
-utf8_casefold_collate (const gchar *str1, const gchar *str2)
+utf8_casefold_collate (const gchar *str1,
+ const gchar *str2)
{
return utf8_casefold_collate_len (str1, str2, -1);
}
@@ -191,7 +194,7 @@ e_destination_new (void)
*
* Returns: (transfer full): A newly created #EDestination, identical to @dest.
*/
-EDestination*
+EDestination *
e_destination_copy (const EDestination *dest)
{
EDestination *new_dest;
@@ -314,7 +317,8 @@ e_destination_empty (const EDestination *dest)
* Returns: %TRUE if the destinations are equal, %FALSE otherwise.
**/
gboolean
-e_destination_equal (const EDestination *a, const EDestination *b)
+e_destination_equal (const EDestination *a,
+ const EDestination *b)
{
const struct _EDestinationPrivate *pa, *pb;
const gchar *na, *nb;
@@ -362,7 +366,9 @@ e_destination_equal (const EDestination *a, const EDestination *b)
* indicated by @email_num.
**/
void
-e_destination_set_contact (EDestination *dest, EContact *contact, gint email_num)
+e_destination_set_contact (EDestination *dest,
+ EContact *contact,
+ gint email_num)
{
g_return_if_fail (dest && E_IS_DESTINATION (dest));
g_return_if_fail (contact && E_IS_CONTACT (contact));
@@ -427,7 +433,7 @@ e_destination_set_contact (EDestination *dest, EContact *contact, gint email_num
/* Is parent of current attribute already in the tree? */
parent_dest = g_hash_table_lookup (hash_table, parent_id);
/* Make sure that when parent with parent_id does not exist the item will be appended to root
- destination. */
+ * destination. */
if (parent_dest == NULL && lists_count == 0 && list_iterations > 0) {
parent_id = "0";
parent_dest = dest;
@@ -550,7 +556,8 @@ e_destination_set_contact (EDestination *dest, EContact *contact, gint email_num
* Deprecated: 3.2: Use e_destination_set_client() instead.
**/
void
-e_destination_set_book (EDestination *dest, EBook *book)
+e_destination_set_book (EDestination *dest,
+ EBook *book)
{
ESource *source;
const gchar *uid;
@@ -579,7 +586,8 @@ e_destination_set_book (EDestination *dest, EBook *book)
* if you need to update the contact later.
**/
void
-e_destination_set_client (EDestination *dest, EBookClient *client)
+e_destination_set_client (EDestination *dest,
+ EBookClient *client)
{
ESource *source;
const gchar *uid;
@@ -609,7 +617,9 @@ e_destination_set_client (EDestination *dest, EBookClient *client)
* addresses indicated by @email_num.
**/
void
-e_destination_set_contact_uid (EDestination *dest, const gchar *uid, gint email_num)
+e_destination_set_contact_uid (EDestination *dest,
+ const gchar *uid,
+ gint email_num)
{
g_return_if_fail (dest && E_IS_DESTINATION (dest));
g_return_if_fail (uid != NULL);
@@ -623,7 +633,7 @@ e_destination_set_contact_uid (EDestination *dest, const gchar *uid, gint email_
dest->priv->email_num = email_num;
/* If we already have a contact, remove it unless it's uid matches the one
- we just set. */
+ * we just set. */
if (dest->priv->contact && strcmp (uid,
e_contact_get_const (dest->priv->contact, E_CONTACT_UID))) {
g_object_unref (dest->priv->contact);
@@ -635,7 +645,8 @@ e_destination_set_contact_uid (EDestination *dest, const gchar *uid, gint email_
}
static void
-e_destination_set_source_uid (EDestination *dest, const gchar *uid)
+e_destination_set_source_uid (EDestination *dest,
+ const gchar *uid)
{
g_return_if_fail (dest && E_IS_DESTINATION (dest));
g_return_if_fail (uid != NULL);
@@ -658,7 +669,8 @@ e_destination_set_source_uid (EDestination *dest, const gchar *uid)
* Sets the full name of @dest's addressee.
**/
void
-e_destination_set_name (EDestination *dest, const gchar *name)
+e_destination_set_name (EDestination *dest,
+ const gchar *name)
{
gboolean changed = FALSE;
@@ -694,7 +706,8 @@ e_destination_set_name (EDestination *dest, const gchar *name)
* Sets the e-mail address of @dest's addressee.
**/
void
-e_destination_set_email (EDestination *dest, const gchar *email)
+e_destination_set_email (EDestination *dest,
+ const gchar *email)
{
gboolean changed = FALSE;
@@ -757,7 +770,8 @@ e_destination_is_auto_recipient (const EDestination *dest)
* to hide it from some UI elements.
**/
void
-e_destination_set_auto_recipient (EDestination *dest, gboolean value)
+e_destination_set_auto_recipient (EDestination *dest,
+ gboolean value)
{
g_return_if_fail (dest && E_IS_DESTINATION (dest));
@@ -909,7 +923,8 @@ e_destination_is_ignored (const EDestination *dest)
* Set the ignore flag on a #EDestination.
*/
void
-e_destination_set_ignored (EDestination *dest, gboolean ignored)
+e_destination_set_ignored (EDestination *dest,
+ gboolean ignored)
{
dest->priv->ignored = ignored;
}
@@ -971,7 +986,7 @@ e_destination_get_email (const EDestination *dest)
* iterating through structured destinations list */
static void
destination_get_address (const EDestination *dest,
- CamelInternetAddress *addr)
+ CamelInternetAddress *addr)
{
const GList *iter;
@@ -1049,7 +1064,8 @@ e_destination_get_address (const EDestination *dest)
* parsing the supplied string. Useful for user input.
**/
void
-e_destination_set_raw (EDestination *dest, const gchar *raw)
+e_destination_set_raw (EDestination *dest,
+ const gchar *raw)
{
g_return_if_fail (E_IS_DESTINATION (dest));
g_return_if_fail (raw != NULL);
@@ -1074,7 +1090,8 @@ e_destination_set_raw (EDestination *dest, const gchar *raw)
* Returns: A textual representation of the destination.
**/
const gchar *
-e_destination_get_textrep (const EDestination *dest, gboolean include_email)
+e_destination_get_textrep (const EDestination *dest,
+ gboolean include_email)
{
const gchar *name, *email;
@@ -1189,7 +1206,7 @@ e_destination_list_get_dests (const EDestination *dest)
GList *iter;
for (iter = dest->priv->list_dests; iter; iter = iter->next) {
if (e_destination_is_evolution_list (iter->data)) {
- GList *l = g_list_copy ((GList*) e_destination_list_get_dests (iter->data));
+ GList *l = g_list_copy ((GList *) e_destination_list_get_dests (iter->data));
dest->priv->list_alldests = g_list_concat (dest->priv->list_alldests, l);
} else {
dest->priv->list_alldests = g_list_append (dest->priv->list_alldests, iter->data);
@@ -1227,7 +1244,8 @@ e_destination_get_html_mail_pref (const EDestination *dest)
* Specifies whether @dest wants to get mail formatted as HTML.
**/
void
-e_destination_set_html_mail_pref (EDestination *dest, gboolean flag)
+e_destination_set_html_mail_pref (EDestination *dest,
+ gboolean flag)
{
g_return_if_fail (dest && E_IS_DESTINATION (dest));
@@ -1262,11 +1280,11 @@ e_destination_get_textrepv (EDestination **destv)
g_return_val_if_fail (destv, NULL);
/* Q: Please tell me this is only for assertion
- reasons. If this is considered to be ok behavior then you
- shouldn't use g_return's. Just a reminder;-)
-
- A: Yes, this is just an assertion. (Though it does find the
- length of the vector in the process...)
+ * reasons. If this is considered to be ok behavior then you
+ * shouldn't use g_return's. Just a reminder;-)
+ *
+ * A: Yes, this is just an assertion. (Though it does find the
+ * length of the vector in the process...)
*/
while (destv[len]) {
g_return_val_if_fail (E_IS_DESTINATION (destv[len]), NULL);
@@ -1323,14 +1341,14 @@ e_destination_xml_encode (const EDestination *dest)
str = e_destination_get_name (list_dest);
if (str) {
- xmlChar *escaped = xmlEncodeEntitiesReentrant (NULL, (xmlChar*) str);
+ xmlChar *escaped = xmlEncodeEntitiesReentrant (NULL, (xmlChar *) str);
xmlNewTextChild (list_node, NULL, (xmlChar*)"name", escaped);
xmlFree (escaped);
}
str = e_destination_get_email (list_dest);
if (str) {
- xmlChar *escaped = xmlEncodeEntitiesReentrant (NULL, (xmlChar*) str);
+ xmlChar *escaped = xmlEncodeEntitiesReentrant (NULL, (xmlChar *) str);
xmlNewTextChild (list_node, NULL, (xmlChar*)"email", escaped);
xmlFree (escaped);
}
@@ -1347,7 +1365,7 @@ e_destination_xml_encode (const EDestination *dest)
str = e_destination_get_source_uid (dest);
if (str) {
- xmlChar *escaped = xmlEncodeEntitiesReentrant (NULL, (xmlChar*) str);
+ xmlChar *escaped = xmlEncodeEntitiesReentrant (NULL, (xmlChar *) str);
xmlNewTextChild (dest_node, NULL, (xmlChar*)"source_uid", escaped);
xmlFree (escaped);
}
@@ -1380,7 +1398,8 @@ e_destination_xml_encode (const EDestination *dest)
* Returns: %TRUE if the XML tree was well-formed, %FALSE otherwise.
**/
static gboolean
-e_destination_xml_decode (EDestination *dest, xmlNodePtr node)
+e_destination_xml_decode (EDestination *dest,
+ xmlNodePtr node)
{
gchar *name = NULL, *email = NULL, *source_uid = NULL, *card_uid = NULL;
gboolean is_list = FALSE, show_addr = FALSE, auto_recip = FALSE;
@@ -1515,7 +1534,8 @@ e_destination_xml_decode (EDestination *dest, xmlNodePtr node)
}
static gchar *
-null_terminate_and_remove_extra_whitespace (xmlChar *xml_in, gint size)
+null_terminate_and_remove_extra_whitespace (xmlChar *xml_in,
+ gint size)
{
gboolean skip_white = FALSE;
gchar *xml, *r, *w;
@@ -1571,7 +1591,7 @@ e_destination_export (const EDestination *dest)
if (dest_node == NULL)
return NULL;
- dest_doc = xmlNewDoc ((xmlChar*) XML_DEFAULT_VERSION);
+ dest_doc = xmlNewDoc ((xmlChar *) XML_DEFAULT_VERSION);
xmlDocSetRootElement (dest_doc, dest_node);
xmlDocDumpMemory (dest_doc, &buffer, &size);
@@ -1634,7 +1654,7 @@ e_destination_exportv (EDestination **destv)
if (destv == NULL || *destv == NULL)
return NULL;
- destv_doc = xmlNewDoc ((xmlChar*) XML_DEFAULT_VERSION);
+ destv_doc = xmlNewDoc ((xmlChar *) XML_DEFAULT_VERSION);
destv_node = xmlNewNode (NULL, (xmlChar*)"destinations");
xmlDocSetRootElement (destv_doc, destv_node);
@@ -1743,7 +1763,8 @@ e_destination_freev (EDestination **destv)
* and values in @attr, suitable for an address book.
**/
void
-e_destination_export_to_vcard_attribute (EDestination *dest, EVCardAttribute *attr)
+e_destination_export_to_vcard_attribute (EDestination *dest,
+ EVCardAttribute *attr)
{
e_vcard_attribute_remove_values (attr);
e_vcard_attribute_remove_params (attr);
diff --git a/addressbook/libebook/e-destination.h b/addressbook/libebook/e-destination.h
index 6d6553b..fb812b0 100644
--- a/addressbook/libebook/e-destination.h
+++ b/addressbook/libebook/e-destination.h
@@ -103,9 +103,9 @@ void e_destination_set_html_mail_pref (EDestination *dest, gboolean fl
gboolean e_destination_get_html_mail_pref (const EDestination *dest);
/* used by the evolution composer to manage automatic recipients
-
- XXX should probably be implemented using a more neutral/extensible
- approach instead of a hardcoded evolution-only flag. */
+ *
+ * XXX should probably be implemented using a more neutral/extensible
+ * approach instead of a hardcoded evolution-only flag. */
gboolean e_destination_is_auto_recipient (const EDestination *dest);
void e_destination_set_auto_recipient (EDestination *dest, gboolean value);
diff --git a/addressbook/libebook/e-name-western.c b/addressbook/libebook/e-name-western.c
index 8a1fdd6..f417f90 100644
--- a/addressbook/libebook/e-name-western.c
+++ b/addressbook/libebook/e-name-western.c
@@ -66,7 +66,7 @@ e_name_western_cleanup_string (gchar **str)
while (g_unichar_isspace (g_utf8_get_char (p)) || *p == ',')
p = g_utf8_prev_char (p);
/* advance p to after the character that caused us to exit the
- previous loop, and end the string. */
+ * previous loop, and end the string. */
if ((!g_unichar_isspace (g_utf8_get_char (p))) && *p != ',')
p = g_utf8_next_char (p);
*p = '\0';
@@ -77,7 +77,9 @@ e_name_western_cleanup_string (gchar **str)
}
static gchar *
-e_name_western_get_words_at_idx (gchar *str, gint idx, gint num_words)
+e_name_western_get_words_at_idx (gchar *str,
+ gint idx,
+ gint num_words)
{
GString *words;
gchar *p;
@@ -105,7 +107,8 @@ e_name_western_get_words_at_idx (gchar *str, gint idx, gint num_words)
}
static gint
-e_name_western_max (const gint a, const gint b)
+e_name_western_max (const gint a,
+ const gint b)
{
if (a > b)
return a;
@@ -218,7 +221,8 @@ e_name_western_get_prefix_at_str (gchar *str)
}
static void
-e_name_western_extract_prefix (ENameWestern *name, ENameWesternIdxs *idxs)
+e_name_western_extract_prefix (ENameWestern *name,
+ ENameWesternIdxs *idxs)
{
gchar *pfx;
@@ -249,7 +253,8 @@ e_name_western_is_complex_last_beginning (gchar *word)
}
static void
-e_name_western_extract_first (ENameWestern *name, ENameWesternIdxs *idxs)
+e_name_western_extract_first (ENameWestern *name,
+ ENameWesternIdxs *idxs)
{
/*
* If there's a prefix, then the first name is right after it.
@@ -296,7 +301,8 @@ e_name_western_extract_first (ENameWestern *name, ENameWesternIdxs *idxs)
}
static void
-e_name_western_extract_middle (ENameWestern *name, ENameWesternIdxs *idxs)
+e_name_western_extract_middle (ENameWestern *name,
+ ENameWesternIdxs *idxs)
{
gchar *word;
gchar *middle;
@@ -374,7 +380,8 @@ e_name_western_extract_middle (ENameWestern *name, ENameWesternIdxs *idxs)
}
static void
-e_name_western_extract_nickname (ENameWestern *name, ENameWesternIdxs *idxs)
+e_name_western_extract_nickname (ENameWestern *name,
+ ENameWesternIdxs *idxs)
{
gchar *nick;
gint start_idx;
@@ -419,7 +426,8 @@ e_name_western_extract_nickname (ENameWestern *name, ENameWesternIdxs *idxs)
}
static gint
-e_name_western_last_get_max_idx (ENameWestern *name, ENameWesternIdxs *idxs)
+e_name_western_last_get_max_idx (ENameWestern *name,
+ ENameWesternIdxs *idxs)
{
gint max_idx = -1;
@@ -443,7 +451,8 @@ e_name_western_last_get_max_idx (ENameWestern *name, ENameWesternIdxs *idxs)
}
static void
-e_name_western_extract_last (ENameWestern *name, ENameWesternIdxs *idxs)
+e_name_western_extract_last (ENameWestern *name,
+ ENameWesternIdxs *idxs)
{
gchar *word;
gint idx = -1;
@@ -505,7 +514,8 @@ e_name_western_extract_last (ENameWestern *name, ENameWesternIdxs *idxs)
}
static gchar *
-e_name_western_get_preceding_word (gchar *str, gint idx)
+e_name_western_get_preceding_word (gchar *str,
+ gint idx)
{
gint word_len;
gchar *word;
@@ -579,7 +589,8 @@ e_name_western_get_suffix_at_str_end (gchar *str)
}
static void
-e_name_western_extract_suffix (ENameWestern *name, ENameWesternIdxs *idxs)
+e_name_western_extract_suffix (ENameWestern *name,
+ ENameWesternIdxs *idxs)
{
name->suffix = e_name_western_get_suffix_at_str_end (name->full);
@@ -590,7 +601,8 @@ e_name_western_extract_suffix (ENameWestern *name, ENameWesternIdxs *idxs)
}
static gboolean
-e_name_western_detect_backwards (ENameWestern *name, ENameWesternIdxs *idxs)
+e_name_western_detect_backwards (ENameWestern *name,
+ ENameWesternIdxs *idxs)
{
gchar *comma;
gchar *word;
@@ -618,7 +630,8 @@ e_name_western_detect_backwards (ENameWestern *name, ENameWesternIdxs *idxs)
}
static void
-e_name_western_reorder_asshole (ENameWestern *name, ENameWesternIdxs *idxs)
+e_name_western_reorder_asshole (ENameWestern *name,
+ ENameWesternIdxs *idxs)
{
gchar *prefix;
gchar *last;
@@ -660,17 +673,17 @@ e_name_western_reorder_asshole (ENameWestern *name, ENameWesternIdxs *idxs)
p = g_utf8_next_char (p);
/*
- Consider this case, "Br.Gate,Br. Gate,W". I know this is a damn
- random name, but, I got this from the bug report of 317411.
-
- comma = ",Br.Gate,W"
- prefix = "Br.Gate,Br."
- p = " Gate,W"
- comma - p < 0 and hence the crash.
-
- Actually, we don't have to put lot of intelligence in reordering such
- screwedup names, just return.
- */
+ * Consider this case, "Br.Gate,Br. Gate,W". I know this is a damn
+ * random name, but, I got this from the bug report of 317411.
+ *
+ * comma = ",Br.Gate,W"
+ * prefix = "Br.Gate,Br."
+ * p = " Gate,W"
+ * comma - p < 0 and hence the crash.
+ *
+ * Actually, we don't have to put lot of intelligence in reordering such
+ * screwedup names, just return.
+ */
if (comma - p + 1 < 1) {
g_free (prefix);
return;
@@ -735,7 +748,8 @@ e_name_western_reorder_asshole (ENameWestern *name, ENameWesternIdxs *idxs)
}
static void
-e_name_western_zap_nil (gchar **str, gint *idx)
+e_name_western_zap_nil (gchar **str,
+ gint *idx)
{
if (*str == NULL)
return;
@@ -804,7 +818,8 @@ e_name_western_zap_nil (gchar **str, gint *idx)
}
static void
-e_name_western_fixup (ENameWestern *name, ENameWesternIdxs *idxs)
+e_name_western_fixup (ENameWestern *name,
+ ENameWesternIdxs *idxs)
{
/*
* The middle and last names cannot be the same.
@@ -939,7 +954,7 @@ e_name_western_parse (const gchar *full_name)
ENameWestern *wname;
gchar *end;
- if (!g_utf8_validate (full_name, -1, (const gchar **)&end)) {
+ if (!g_utf8_validate (full_name, -1, (const gchar **) &end)) {
g_warning ("e_name_western_parse passed invalid UTF-8 sequence");
*end = '\0';
}
diff --git a/addressbook/libebook/e-vcard.c b/addressbook/libebook/e-vcard.c
index d98521d..0209ac8 100644
--- a/addressbook/libebook/e-vcard.c
+++ b/addressbook/libebook/e-vcard.c
@@ -61,7 +61,7 @@ struct _EVCardAttribute {
struct _EVCardAttributeParam {
gchar *name;
- GList *values; /* GList of gchar *'s*/
+ GList *values; /* GList of gchar *'s */
};
static GObjectClass *parent_class;
@@ -110,7 +110,8 @@ e_vcard_init (EVCard *evc)
* and other strange things.
*/
static gchar *
-skip_newline (gchar *str, gboolean quoted_printable)
+skip_newline (gchar *str,
+ gboolean quoted_printable)
{
gchar *p;
gchar *next;
@@ -119,7 +120,7 @@ skip_newline (gchar *str, gboolean quoted_printable)
/* -- swallow equal signs at end of line for quoted printable */
/* note: a quoted_printable linefolding is an equal sign followed by
- one or more newline characters and optional a whitespace */
+ * one or more newline characters and optional a whitespace */
if (quoted_printable && *p == '=' ) {
next = g_utf8_next_char (p);
if (*next == '\r' || *next == '\n') {
@@ -173,9 +174,10 @@ skip_to_next_line (gchar **p)
}
/* skip forward until we hit a character in @s, CRLF, or \0. leave *p
- pointing at the character that causes us to stop */
+ * pointing at the character that causes us to stop */
static void
-skip_until (gchar **p, const gchar *s)
+skip_until (gchar **p,
+ const gchar *s)
{
gchar *lp;
@@ -200,7 +202,10 @@ skip_until (gchar **p, const gchar *s)
}
static void
-read_attribute_value (EVCardAttribute *attr, gchar **p, gboolean quoted_printable, const gchar *charset)
+read_attribute_value (EVCardAttribute *attr,
+ gchar **p,
+ gboolean quoted_printable,
+ const gchar *charset)
{
gchar *lp = *p;
GString *str;
@@ -221,8 +226,8 @@ read_attribute_value (EVCardAttribute *attr, gchar **p, gboolean quoted_printabl
a = tolower (a);
b = tolower (b);
- c = (((a>='a'?a-'a'+10:a-'0')&0x0f) << 4)
- | ((b>='a'?b-'a'+10:b-'0')&0x0f);
+ c = (((a >= 'a' ? a - 'a' + 10 : a - '0') &0x0f) << 4)
+ | ((b >= 'a' ? b - 'a' + 10 : b - '0') &0x0f);
g_string_append_c (str, c); /* add decoded byte (this is not a unicode yet) */
}
@@ -236,7 +241,7 @@ read_attribute_value (EVCardAttribute *attr, gchar **p, gboolean quoted_printabl
} else if (*lp == '\\') {
/* convert back to the non-escaped version of
- the characters */
+ * the characters */
lp = g_utf8_next_char (lp);
if (*lp == '\0') {
g_string_append_c (str, '\\');
@@ -306,7 +311,10 @@ read_attribute_value (EVCardAttribute *attr, gchar **p, gboolean quoted_printabl
}
static void
-read_attribute_params (EVCardAttribute *attr, gchar **p, gboolean *quoted_printable, gchar **charset)
+read_attribute_params (EVCardAttribute *attr,
+ gchar **p,
+ gboolean *quoted_printable,
+ gchar **charset)
{
gchar *lp;
GString *str;
@@ -404,7 +412,7 @@ read_attribute_params (EVCardAttribute *attr, gchar **p, gboolean *quoted_printa
*quoted_printable = TRUE;
}
/* apple's broken addressbook app outputs naked BASE64
- parameters, which aren't even vcard 3.0 compliant. */
+ * parameters, which aren't even vcard 3.0 compliant. */
else if (!g_ascii_strcasecmp (str->str,
"base64")) {
param_name = "ENCODING";
@@ -424,17 +432,17 @@ read_attribute_params (EVCardAttribute *attr, gchar **p, gboolean *quoted_printa
}
else {
/* we've got an attribute with a truly empty
- attribute parameter. So it's of the form:
-
- ATTR;[PARAM=value;]*;[PARAM=value;]*:
-
- (note the extra ';')
-
- the only thing to do here is, well.. nothing.
- we skip over the character if it's not a colon,
- and the rest is handled for us: We'll either
- continue through the loop again if we hit a ';',
- or we'll break out correct below if it was a ':' */
+ * attribute parameter. So it's of the form:
+ *
+ * ATTR;[PARAM=value;]*;[PARAM=value;]*:
+ *
+ * (note the extra ';')
+ *
+ * the only thing to do here is, well.. nothing.
+ * we skip over the character if it's not a colon,
+ * and the rest is handled for us: We'll either
+ * continue through the loop again if we hit a ';',
+ * or we'll break out correct below if it was a ':' */
if (!colon)
lp = g_utf8_next_char (lp);
}
@@ -462,8 +470,8 @@ read_attribute_params (EVCardAttribute *attr, gchar **p, gboolean *quoted_printa
}
/* reads an entire attribute from the input buffer, leaving p pointing
- at the start of the next line (past the \r\n) */
-static EVCardAttribute*
+ * at the start of the next line (past the \r\n) */
+static EVCardAttribute *
read_attribute (gchar **p)
{
gchar *attr_group = NULL;
@@ -605,7 +613,8 @@ make_valid_utf8 (const gchar *name)
* try to return *something*.
*/
static void
-parse (EVCard *evc, const gchar *str)
+parse (EVCard *evc,
+ const gchar *str)
{
gchar *buf;
gchar *p;
@@ -655,7 +664,7 @@ parse (EVCard *evc, const gchar *str)
evc->priv->attributes = g_list_reverse (evc->priv->attributes);
}
-static GList*
+static GList *
e_vcard_ensure_attributes (EVCard *evc)
{
if (evc->priv->vcard) {
@@ -695,7 +704,7 @@ e_vcard_escape_string (const gchar *s)
g_string_append (str, "\\n");
break;
case '\r':
- if (*(p+1) == '\n')
+ if (*(p + 1) == '\n')
p++;
g_string_append (str, "\\n");
break;
@@ -762,7 +771,8 @@ e_vcard_unescape_string (const gchar *s)
}
void
-e_vcard_construct (EVCard *evc, const gchar *str)
+e_vcard_construct (EVCard *evc,
+ const gchar *str)
{
g_return_if_fail (E_IS_VCARD (evc));
g_return_if_fail (str != NULL);
@@ -811,7 +821,7 @@ e_vcard_new_from_string (const gchar *str)
}
static gchar *
-e_vcard_to_string_vcard_21 (EVCard *evc)
+e_vcard_to_string_vcard_21 (EVCard *evc)
{
g_warning ("need to implement e_vcard_to_string_vcard_21");
return g_strdup ("");
@@ -828,8 +838,8 @@ e_vcard_to_string_vcard_30 (EVCard *evc)
g_string_append (str, "BEGIN:VCARD" CRLF);
/* we hardcode the version (since we're outputting to a
- specific version) and ignore any version attributes the
- vcard might contain */
+ * specific version) and ignore any version attributes the
+ * vcard might contain */
g_string_append (str, "VERSION:3.0" CRLF);
for (l = e_vcard_ensure_attributes (evc); l; l = l->next) {
@@ -910,8 +920,8 @@ e_vcard_to_string_vcard_30 (EVCard *evc)
g_string_append (attr_str, escaped_value);
if (v->next) {
/* XXX toshok - i hate you, rfc 2426.
- why doesn't CATEGORIES use a; like
- a normal list attribute? */
+ * why doesn't CATEGORIES use a; like
+ * a normal list attribute? */
if (!g_ascii_strcasecmp (attr->name, "CATEGORIES"))
g_string_append_c (attr_str, ',');
else
@@ -927,7 +937,7 @@ e_vcard_to_string_vcard_30 (EVCard *evc)
*/
len = g_utf8_strlen (attr_str->str, -1);
if (len > 75) {
- GString *fold_str = g_string_sized_new (attr_str->len + len/74*3);
+ GString *fold_str = g_string_sized_new (attr_str->len + len / 74 * 3);
gchar *pos1 = attr_str->str;
gchar *pos2 = pos1;
pos2 = g_utf8_offset_to_pointer (pos2, 75);
@@ -968,7 +978,8 @@ e_vcard_to_string_vcard_30 (EVCard *evc)
* Returns: A newly allocated string representing the vcard.
**/
gchar *
-e_vcard_to_string (EVCard *evc, EVCardFormat format)
+e_vcard_to_string (EVCard *evc,
+ EVCardFormat format)
{
g_return_val_if_fail (E_IS_VCARD (evc), NULL);
@@ -1045,8 +1056,9 @@ e_vcard_dump_structure (EVCard *evc)
*
* Returns: A new #EVCardAttribute.
**/
-EVCardAttribute*
-e_vcard_attribute_new (const gchar *attr_group, const gchar *attr_name)
+EVCardAttribute *
+e_vcard_attribute_new (const gchar *attr_group,
+ const gchar *attr_name)
{
EVCardAttribute *attr;
@@ -1087,7 +1099,7 @@ e_vcard_attribute_free (EVCardAttribute *attr)
*
* Returns: A new #EVCardAttribute identical to @attr.
**/
-EVCardAttribute*
+EVCardAttribute *
e_vcard_attribute_copy (EVCardAttribute *attr)
{
EVCardAttribute *a;
@@ -1136,7 +1148,9 @@ e_vcard_attribute_get_type (void)
* their group names.
**/
void
-e_vcard_remove_attributes (EVCard *evc, const gchar *attr_group, const gchar *attr_name)
+e_vcard_remove_attributes (EVCard *evc,
+ const gchar *attr_group,
+ const gchar *attr_name)
{
GList *attr;
@@ -1172,7 +1186,8 @@ e_vcard_remove_attributes (EVCard *evc, const gchar *attr_group, const gchar *at
* Removes @attr from @evc and frees it.
**/
void
-e_vcard_remove_attribute (EVCard *evc, EVCardAttribute *attr)
+e_vcard_remove_attribute (EVCard *evc,
+ EVCardAttribute *attr)
{
g_return_if_fail (E_IS_VCARD (evc));
g_return_if_fail (attr != NULL);
@@ -1194,7 +1209,8 @@ e_vcard_remove_attribute (EVCard *evc, EVCardAttribute *attr)
* Since: 2.32
**/
void
-e_vcard_append_attribute (EVCard *evc, EVCardAttribute *attr)
+e_vcard_append_attribute (EVCard *evc,
+ EVCardAttribute *attr)
{
g_return_if_fail (E_IS_VCARD (evc));
g_return_if_fail (attr != NULL);
@@ -1215,7 +1231,8 @@ e_vcard_append_attribute (EVCard *evc, EVCardAttribute *attr)
**/
void
e_vcard_append_attribute_with_value (EVCard *evcard,
- EVCardAttribute *attr, const gchar *value)
+ EVCardAttribute *attr,
+ const gchar *value)
{
g_return_if_fail (E_IS_VCARD (evcard));
g_return_if_fail (attr != NULL);
@@ -1237,7 +1254,9 @@ e_vcard_append_attribute_with_value (EVCard *evcard,
* Since: 2.32
**/
void
-e_vcard_append_attribute_with_values (EVCard *evcard, EVCardAttribute *attr, ...)
+e_vcard_append_attribute_with_values (EVCard *evcard,
+ EVCardAttribute *attr,
+ ...)
{
va_list ap;
gchar *v;
@@ -1264,7 +1283,8 @@ e_vcard_append_attribute_with_values (EVCard *evcard, EVCardAttribute *attr, ...
* Adds @attr to @evc. It's added to the beginning of a list of attributes.
**/
void
-e_vcard_add_attribute (EVCard *evc, EVCardAttribute *attr)
+e_vcard_add_attribute (EVCard *evc,
+ EVCardAttribute *attr)
{
g_return_if_fail (E_IS_VCARD (evc));
g_return_if_fail (attr != NULL);
@@ -1283,7 +1303,8 @@ e_vcard_add_attribute (EVCard *evc, EVCardAttribute *attr)
**/
void
e_vcard_add_attribute_with_value (EVCard *evcard,
- EVCardAttribute *attr, const gchar *value)
+ EVCardAttribute *attr,
+ const gchar *value)
{
g_return_if_fail (E_IS_VCARD (evcard));
g_return_if_fail (attr != NULL);
@@ -1303,7 +1324,9 @@ e_vcard_add_attribute_with_value (EVCard *evcard,
* For attribute addition is used e_vcard_add_attribute().
**/
void
-e_vcard_add_attribute_with_values (EVCard *evcard, EVCardAttribute *attr, ...)
+e_vcard_add_attribute_with_values (EVCard *evcard,
+ EVCardAttribute *attr,
+ ...)
{
va_list ap;
gchar *v;
@@ -1330,7 +1353,8 @@ e_vcard_add_attribute_with_values (EVCard *evcard, EVCardAttribute *attr, ...)
* Adds @value to @attr's list of values.
**/
void
-e_vcard_attribute_add_value (EVCardAttribute *attr, const gchar *value)
+e_vcard_attribute_add_value (EVCardAttribute *attr,
+ const gchar *value)
{
g_return_if_fail (attr != NULL);
@@ -1347,7 +1371,9 @@ e_vcard_attribute_add_value (EVCardAttribute *attr, const gchar *value)
* adds it to @attr's list of values.
**/
void
-e_vcard_attribute_add_value_decoded (EVCardAttribute *attr, const gchar *value, gint len)
+e_vcard_attribute_add_value_decoded (EVCardAttribute *attr,
+ const gchar *value,
+ gint len)
{
g_return_if_fail (attr != NULL);
@@ -1384,7 +1410,7 @@ e_vcard_attribute_add_value_decoded (EVCardAttribute *attr, const gchar *value,
**/
void
e_vcard_attribute_add_values (EVCardAttribute *attr,
- ...)
+ ...)
{
va_list ap;
gchar *v;
@@ -1434,7 +1460,8 @@ e_vcard_attribute_remove_values (EVCardAttribute *attr)
* Removes from the value list in @attr the value @s.
**/
void
-e_vcard_attribute_remove_value (EVCardAttribute *attr, const gchar *s)
+e_vcard_attribute_remove_value (EVCardAttribute *attr,
+ const gchar *s)
{
GList *l;
@@ -1459,7 +1486,8 @@ e_vcard_attribute_remove_value (EVCardAttribute *attr, const gchar *s)
* Since: 1.12
*/
void
-e_vcard_attribute_remove_param (EVCardAttribute *attr, const gchar *param_name)
+e_vcard_attribute_remove_param (EVCardAttribute *attr,
+ const gchar *param_name)
{
GList *l;
EVCardAttributeParam *param;
@@ -1527,7 +1555,7 @@ e_vcard_attribute_param_get_type (void)
*
* Returns: A new #EVCardAttributeParam.
**/
-EVCardAttributeParam*
+EVCardAttributeParam *
e_vcard_attribute_param_new (const gchar *name)
{
EVCardAttributeParam *param = g_slice_new (EVCardAttributeParam);
@@ -1563,7 +1591,7 @@ e_vcard_attribute_param_free (EVCardAttributeParam *param)
*
* Returns: a new #EVCardAttributeParam identical to @param.
**/
-EVCardAttributeParam*
+EVCardAttributeParam *
e_vcard_attribute_param_copy (EVCardAttributeParam *param)
{
EVCardAttributeParam *p;
@@ -1593,7 +1621,7 @@ e_vcard_attribute_param_copy (EVCardAttributeParam *param)
**/
void
e_vcard_attribute_add_param (EVCardAttribute *attr,
- EVCardAttributeParam *param)
+ EVCardAttributeParam *param)
{
gboolean contains;
GList *params, *p;
@@ -1610,8 +1638,8 @@ e_vcard_attribute_add_param (EVCardAttribute *attr,
EVCardAttributeParam *param2 = p->data;
if (g_ascii_strcasecmp (param2->name, par_name) == 0) {
/* param2 has same name as our new param;
- better merge them than have more parameters
- with same name within one attribute.
+ * better merge them than have more parameters
+ * with same name within one attribute.
*/
GList *vals,*v;
@@ -1688,7 +1716,7 @@ e_vcard_attribute_add_param (EVCardAttribute *attr,
**/
void
e_vcard_attribute_param_add_value (EVCardAttributeParam *param,
- const gchar *value)
+ const gchar *value)
{
g_return_if_fail (param != NULL);
@@ -1704,7 +1732,7 @@ e_vcard_attribute_param_add_value (EVCardAttributeParam *param,
**/
void
e_vcard_attribute_param_add_values (EVCardAttributeParam *param,
- ...)
+ ...)
{
va_list ap;
gchar *v;
@@ -1730,7 +1758,8 @@ e_vcard_attribute_param_add_values (EVCardAttributeParam *param,
**/
void
e_vcard_attribute_add_param_with_value (EVCardAttribute *attr,
- EVCardAttributeParam *param, const gchar *value)
+ EVCardAttributeParam *param,
+ const gchar *value)
{
g_return_if_fail (attr != NULL);
g_return_if_fail (param != NULL);
@@ -1751,7 +1780,7 @@ e_vcard_attribute_add_param_with_value (EVCardAttribute *attr,
**/
void
e_vcard_attribute_add_param_with_values (EVCardAttribute *attr,
- EVCardAttributeParam *param, ...)
+ EVCardAttributeParam *param, ...)
{
va_list ap;
gchar *v;
@@ -1795,7 +1824,9 @@ e_vcard_attribute_param_remove_values (EVCardAttributeParam *param)
* Removes the value @s from the parameter @param_name on the attribute @attr.
**/
void
-e_vcard_attribute_remove_param_value (EVCardAttribute *attr, const gchar *param_name, const gchar *s)
+e_vcard_attribute_remove_param_value (EVCardAttribute *attr,
+ const gchar *param_name,
+ const gchar *s)
{
GList *l, *params;
EVCardAttributeParam *param;
@@ -1835,7 +1866,7 @@ e_vcard_attribute_remove_param_value (EVCardAttribute *attr, const gchar *param_
* Returns: (transfer none) (element-type EVCardAttribute): A list of attributes
* of type #EVCardAttribute.
**/
-GList*
+GList *
e_vcard_get_attributes (EVCard *evcard)
{
g_return_val_if_fail (E_IS_VCARD (evcard), NULL);
@@ -1855,8 +1886,8 @@ e_vcard_get_attributes (EVCard *evcard)
* Returns: (transfer none): An #EVCardAttribute if found, or #NULL.
**/
EVCardAttribute *
-e_vcard_get_attribute (EVCard *evc,
- const gchar *name)
+e_vcard_get_attribute (EVCard *evc,
+ const gchar *name)
{
GList *attrs, *l;
@@ -1915,7 +1946,7 @@ e_vcard_attribute_get_name (EVCardAttribute *attr)
*
* Returns: (transfer none) (element-type utf8): A list of string values.
**/
-GList*
+GList *
e_vcard_attribute_get_values (EVCardAttribute *attr)
{
g_return_val_if_fail (attr != NULL, NULL);
@@ -1933,7 +1964,7 @@ e_vcard_attribute_get_values (EVCardAttribute *attr)
*
* Returns: (transfer none) (element-type GString): A list of values of type #GString.
**/
-GList*
+GList *
e_vcard_attribute_get_values_decoded (EVCardAttribute *attr)
{
g_return_val_if_fail (attr != NULL, NULL);
@@ -2020,7 +2051,7 @@ e_vcard_attribute_get_value (EVCardAttribute *attr)
*
* Returns: A newly allocated #GString representing the value.
**/
-GString*
+GString *
e_vcard_attribute_get_value_decoded (EVCardAttribute *attr)
{
GList *values;
@@ -2049,7 +2080,8 @@ e_vcard_attribute_get_value_decoded (EVCardAttribute *attr)
* Returns: %TRUE if such a parameter exists, %FALSE otherwise.
**/
gboolean
-e_vcard_attribute_has_type (EVCardAttribute *attr, const gchar *typestr)
+e_vcard_attribute_has_type (EVCardAttribute *attr,
+ const gchar *typestr)
{
GList *params;
GList *p;
@@ -2086,7 +2118,7 @@ e_vcard_attribute_has_type (EVCardAttribute *attr, const gchar *typestr)
* Returns: (transfer none) (element-type EVCardAttributeParam): A list of
* elements of type #EVCardAttributeParam.
**/
-GList*
+GList *
e_vcard_attribute_get_params (EVCardAttribute *attr)
{
g_return_val_if_fail (attr != NULL, NULL);
@@ -2106,7 +2138,8 @@ e_vcard_attribute_get_params (EVCardAttribute *attr)
* representing the parameter's values.
**/
GList *
-e_vcard_attribute_get_param (EVCardAttribute *attr, const gchar *name)
+e_vcard_attribute_get_param (EVCardAttribute *attr,
+ const gchar *name)
{
GList *params, *p;
@@ -2167,7 +2200,7 @@ e_vcard_attribute_param_get_name (EVCardAttributeParam *param)
* Returns: (transfer none) (element-type utf8): A list of string elements
* representing the parameter's values.
**/
-GList*
+GList *
e_vcard_attribute_param_get_values (EVCardAttributeParam *param)
{
g_return_val_if_fail (param != NULL, NULL);
diff --git a/addressbook/libebook/e-vcard.h b/addressbook/libebook/e-vcard.h
index e365f1d..31d6000 100644
--- a/addressbook/libebook/e-vcard.h
+++ b/addressbook/libebook/e-vcard.h
@@ -170,8 +170,8 @@ struct _EVCardClass {
GType e_vcard_get_type (void);
void e_vcard_construct (EVCard *evc, const gchar *str);
-EVCard* e_vcard_new (void);
-EVCard* e_vcard_new_from_string (const gchar *str);
+EVCard * e_vcard_new (void);
+EVCard * e_vcard_new_from_string (const gchar *str);
gboolean e_vcard_is_parsed (EVCard *evc);
@@ -204,9 +204,9 @@ void e_vcard_attribute_remove_param_value (EVCardAttribute *attr, co
/* attribute parameters */
GType e_vcard_attribute_param_get_type (void);
-EVCardAttributeParam* e_vcard_attribute_param_new (const gchar *name);
+EVCardAttributeParam * e_vcard_attribute_param_new (const gchar *name);
void e_vcard_attribute_param_free (EVCardAttributeParam *param);
-EVCardAttributeParam* e_vcard_attribute_param_copy (EVCardAttributeParam *param);
+EVCardAttributeParam * e_vcard_attribute_param_copy (EVCardAttributeParam *param);
void e_vcard_attribute_add_param (EVCardAttribute *attr, EVCardAttributeParam *param);
void e_vcard_attribute_add_param_with_value (EVCardAttribute *attr,
EVCardAttributeParam *param, const gchar *value);
@@ -220,23 +220,23 @@ void e_vcard_attribute_param_add_values (EVCardAttributePa
void e_vcard_attribute_param_remove_values (EVCardAttributeParam *param);
/* EVCard* accessors. nothing returned from these functions should be
- freed by the caller. */
+ * freed by the caller. */
EVCardAttribute *e_vcard_get_attribute (EVCard *evc, const gchar *name);
-GList* e_vcard_get_attributes (EVCard *evcard);
+GList * e_vcard_get_attributes (EVCard *evcard);
const gchar * e_vcard_attribute_get_group (EVCardAttribute *attr);
const gchar * e_vcard_attribute_get_name (EVCardAttribute *attr);
-GList* e_vcard_attribute_get_values (EVCardAttribute *attr); /* GList elements are of type gchar * */
-GList* e_vcard_attribute_get_values_decoded (EVCardAttribute *attr); /* GList elements are of type GString* */
+GList * e_vcard_attribute_get_values (EVCardAttribute *attr); /* GList elements are of type gchar * */
+GList * e_vcard_attribute_get_values_decoded (EVCardAttribute *attr); /* GList elements are of type GString * */
/* special accessors for single valued attributes */
gboolean e_vcard_attribute_is_single_valued (EVCardAttribute *attr);
gchar * e_vcard_attribute_get_value (EVCardAttribute *attr);
-GString* e_vcard_attribute_get_value_decoded (EVCardAttribute *attr);
+GString * e_vcard_attribute_get_value_decoded (EVCardAttribute *attr);
-GList* e_vcard_attribute_get_params (EVCardAttribute *attr);
-GList* e_vcard_attribute_get_param (EVCardAttribute *attr, const gchar *name);
+GList * e_vcard_attribute_get_params (EVCardAttribute *attr);
+GList * e_vcard_attribute_get_param (EVCardAttribute *attr, const gchar *name);
const gchar * e_vcard_attribute_param_get_name (EVCardAttributeParam *param);
-GList* e_vcard_attribute_param_get_values (EVCardAttributeParam *param);
+GList * e_vcard_attribute_param_get_values (EVCardAttributeParam *param);
/* special TYPE= parameter predicate (checks for TYPE= typestr */
gboolean e_vcard_attribute_has_type (EVCardAttribute *attr, const gchar *typestr);
diff --git a/addressbook/libedata-book/e-book-backend-cache.c b/addressbook/libedata-book/e-book-backend-cache.c
index a35814c..070a8a8 100644
--- a/addressbook/libedata-book/e-book-backend-cache.c
+++ b/addressbook/libedata-book/e-book-backend-cache.c
@@ -78,7 +78,8 @@ e_book_backend_cache_new (const gchar *filename)
* Returns: A cached #EContact, or %NULL if @uid is not cached.
**/
EContact *
-e_book_backend_cache_get_contact (EBookBackendCache *cache, const gchar *uid)
+e_book_backend_cache_get_contact (EBookBackendCache *cache,
+ const gchar *uid)
{
const gchar *vcard_str;
EContact *contact = NULL;
@@ -106,7 +107,7 @@ e_book_backend_cache_get_contact (EBookBackendCache *cache, const gchar *uid)
**/
gboolean
e_book_backend_cache_add_contact (EBookBackendCache *cache,
- EContact *contact)
+ EContact *contact)
{
gchar *vcard_str;
const gchar *uid;
@@ -138,7 +139,7 @@ e_book_backend_cache_add_contact (EBookBackendCache *cache,
**/
gboolean
e_book_backend_cache_remove_contact (EBookBackendCache *cache,
- const gchar *uid)
+ const gchar *uid)
{
g_return_val_if_fail (E_IS_BOOK_BACKEND_CACHE (cache), FALSE);
@@ -160,7 +161,8 @@ e_book_backend_cache_remove_contact (EBookBackendCache *cache,
* Returns: %TRUE if the cache contains the contact, %FALSE otherwise.
**/
gboolean
-e_book_backend_cache_check_contact (EBookBackendCache *cache, const gchar *uid)
+e_book_backend_cache_check_contact (EBookBackendCache *cache,
+ const gchar *uid)
{
gboolean retval;
@@ -186,7 +188,8 @@ e_book_backend_cache_check_contact (EBookBackendCache *cache, const gchar *uid)
* Returns: A #GList of pointers to #EContact.
**/
GList *
-e_book_backend_cache_get_contacts (EBookBackendCache *cache, const gchar *query)
+e_book_backend_cache_get_contacts (EBookBackendCache *cache,
+ const gchar *query)
{
gchar *vcard_str;
GSList *l, *lcache;
@@ -236,7 +239,8 @@ e_book_backend_cache_get_contacts (EBookBackendCache *cache, const gchar *query)
* Returns: A #GPtrArray of pointers to contact ID strings.
**/
GPtrArray *
-e_book_backend_cache_search (EBookBackendCache *cache, const gchar *query)
+e_book_backend_cache_search (EBookBackendCache *cache,
+ const gchar *query)
{
GList *matching_contacts, *temp;
GPtrArray *ptr_array;
@@ -286,7 +290,8 @@ e_book_backend_cache_is_populated (EBookBackendCache *cache)
}
void
-e_book_backend_cache_set_time (EBookBackendCache *cache, const gchar *t)
+e_book_backend_cache_set_time (EBookBackendCache *cache,
+ const gchar *t)
{
g_return_if_fail (E_IS_BOOK_BACKEND_CACHE (cache));
if (!e_file_cache_add_object (E_FILE_CACHE (cache), "last_update_time", t))
diff --git a/addressbook/libedata-book/e-book-backend-db-cache.c b/addressbook/libedata-book/e-book-backend-db-cache.c
index d060a4e..e51cd84 100644
--- a/addressbook/libedata-book/e-book-backend-db-cache.c
+++ b/addressbook/libedata-book/e-book-backend-db-cache.c
@@ -29,7 +29,8 @@
#include "e-book-backend-sexp.h"
void
-string_to_dbt (const gchar *str, DBT *dbt)
+string_to_dbt (const gchar *str,
+ DBT *dbt)
{
memset (dbt, 0, sizeof (dbt));
dbt->data = (gpointer) str;
@@ -66,7 +67,8 @@ get_filename_from_uri (const gchar *uri)
**/
void
-e_book_backend_db_cache_set_filename (DB *db, const gchar *filename)
+e_book_backend_db_cache_set_filename (DB *db,
+ const gchar *filename)
{
DBT uid_dbt, vcard_dbt;
gint db_error;
@@ -123,7 +125,8 @@ e_book_backend_db_cache_get_filename (DB *db)
* Returns: A cached #EContact, or %NULL if @uid is not cached.
**/
EContact *
-e_book_backend_db_cache_get_contact (DB *db, const gchar *uid)
+e_book_backend_db_cache_get_contact (DB *db,
+ const gchar *uid)
{
DBT uid_dbt, vcard_dbt;
gint db_error;
@@ -157,7 +160,7 @@ e_book_backend_db_cache_get_contact (DB *db, const gchar *uid)
**/
gboolean
e_book_backend_db_cache_add_contact (DB *db,
- EContact *contact)
+ EContact *contact)
{
DBT uid_dbt, vcard_dbt;
gint db_error;
@@ -201,7 +204,7 @@ e_book_backend_db_cache_add_contact (DB *db,
**/
gboolean
e_book_backend_db_cache_remove_contact (DB *db,
- const gchar *uid)
+ const gchar *uid)
{
DBT uid_dbt;
@@ -231,7 +234,8 @@ e_book_backend_db_cache_remove_contact (DB *db,
* Returns: %TRUE if the cache contains the contact, %FALSE otherwise.
**/
gboolean
-e_book_backend_db_cache_check_contact (DB *db, const gchar *uid)
+e_book_backend_db_cache_check_contact (DB *db,
+ const gchar *uid)
{
DBT uid_dbt, vcard_dbt;
gint db_error;
@@ -263,7 +267,8 @@ e_book_backend_db_cache_check_contact (DB *db, const gchar *uid)
* Returns: A #GList of pointers to #EContact.
**/
GList *
-e_book_backend_db_cache_get_contacts (DB *db, const gchar *query)
+e_book_backend_db_cache_get_contacts (DB *db,
+ const gchar *query)
{
DBC *dbc;
DBT uid_dbt, vcard_dbt;
@@ -324,7 +329,8 @@ e_book_backend_db_cache_get_contacts (DB *db, const gchar *query)
* Returns: A #GPtrArray of pointers to contact ID strings.
**/
GPtrArray *
-e_book_backend_db_cache_search (DB *db, const gchar *query)
+e_book_backend_db_cache_search (DB *db,
+ const gchar *query)
{
GList *matching_contacts, *temp;
GPtrArray *ptr_array;
@@ -421,7 +427,8 @@ e_book_backend_db_cache_is_populated (DB *db)
* Since: 2.26
**/
void
-e_book_backend_db_cache_set_time (DB *db, const gchar *t)
+e_book_backend_db_cache_set_time (DB *db,
+ const gchar *t)
{
DBT uid_dbt, vcard_dbt;
gint db_error;
diff --git a/addressbook/libedata-book/e-book-backend-db-cache.h b/addressbook/libedata-book/e-book-backend-db-cache.h
index 634c4d2..eedb48c 100644
--- a/addressbook/libedata-book/e-book-backend-db-cache.h
+++ b/addressbook/libedata-book/e-book-backend-db-cache.h
@@ -27,7 +27,7 @@
G_BEGIN_DECLS
-EContact* e_book_backend_db_cache_get_contact (DB *db, const gchar *uid);
+EContact * e_book_backend_db_cache_get_contact (DB *db, const gchar *uid);
void string_to_dbt (const gchar *str, DBT *dbt);
gchar *e_book_backend_db_cache_get_filename (DB *db);
void e_book_backend_db_cache_set_filename (DB *db, const gchar *filename);
@@ -36,11 +36,11 @@ gboolean e_book_backend_db_cache_add_contact (DB *db,
gboolean e_book_backend_db_cache_remove_contact (DB *db,
const gchar *uid);
gboolean e_book_backend_db_cache_check_contact (DB *db, const gchar *uid);
-GList* e_book_backend_db_cache_get_contacts (DB *db, const gchar *query);
+GList * e_book_backend_db_cache_get_contacts (DB *db, const gchar *query);
gboolean e_book_backend_db_cache_exists (const gchar *uri);
void e_book_backend_db_cache_set_populated (DB *db);
gboolean e_book_backend_db_cache_is_populated (DB *db);
-GPtrArray* e_book_backend_db_cache_search (DB *db, const gchar *query);
+GPtrArray * e_book_backend_db_cache_search (DB *db, const gchar *query);
void e_book_backend_db_cache_set_time (DB *db, const gchar *t);
gchar * e_book_backend_db_cache_get_time (DB *db);
diff --git a/addressbook/libedata-book/e-book-backend-factory.c b/addressbook/libedata-book/e-book-backend-factory.c
index 2a1337d..5747948 100644
--- a/addressbook/libedata-book/e-book-backend-factory.c
+++ b/addressbook/libedata-book/e-book-backend-factory.c
@@ -51,7 +51,7 @@ e_book_backend_factory_get_protocol (EBookBackendFactory *factory)
*
* Returns: A new #EBookBackend.
**/
-EBookBackend*
+EBookBackend *
e_book_backend_factory_new_backend (EBookBackendFactory *factory)
{
g_return_val_if_fail (E_IS_BOOK_BACKEND_FACTORY (factory), NULL);
diff --git a/addressbook/libedata-book/e-book-backend-factory.h b/addressbook/libedata-book/e-book-backend-factory.h
index a87d68d..736b4c5 100644
--- a/addressbook/libedata-book/e-book-backend-factory.h
+++ b/addressbook/libedata-book/e-book-backend-factory.h
@@ -44,13 +44,13 @@ typedef struct {
GObjectClass parent_class;
const gchar * (*get_protocol) (EBookBackendFactory *factory);
- EBookBackend* (*new_backend) (EBookBackendFactory *factory);
+ EBookBackend * (*new_backend) (EBookBackendFactory *factory);
} EBookBackendFactoryClass;
GType e_book_backend_factory_get_type (void);
const gchar * e_book_backend_factory_get_protocol (EBookBackendFactory *factory);
-EBookBackend* e_book_backend_factory_new_backend (EBookBackendFactory *factory);
+EBookBackend * e_book_backend_factory_new_backend (EBookBackendFactory *factory);
/* use this macro for simple, 1 factory modules */
#define E_BOOK_BACKEND_FACTORY_SIMPLE(p,t,f) \
@@ -73,7 +73,7 @@ _ ## p ##_get_protocol (EBookBackendFactory *factory) \
return #p; \
} \
\
-static EBookBackend* \
+static EBookBackend * \
_ ## p ##_new_backend (EBookBackendFactory *factory) \
{ \
return (f) (); \
diff --git a/addressbook/libedata-book/e-book-backend-sexp.c b/addressbook/libedata-book/e-book-backend-sexp.c
index ea454dd..b53f079 100644
--- a/addressbook/libedata-book/e-book-backend-sexp.c
+++ b/addressbook/libedata-book/e-book-backend-sexp.c
@@ -39,9 +39,11 @@ struct _SearchContext {
};
static gboolean
-compare_im (EContact *contact, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *),
- EContactField im_field)
+compare_im (EContact *contact,
+ const gchar *str,
+ gchar * (*compare) (const gchar *,
+ const gchar *),
+ EContactField im_field)
{
GList *aims, *l;
gboolean found_it = FALSE;
@@ -64,71 +66,91 @@ compare_im (EContact *contact, const gchar *str,
}
static gboolean
-compare_im_aim (EContact *contact, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *))
+compare_im_aim (EContact *contact,
+ const gchar *str,
+ gchar * (*compare) (const gchar *,
+ const gchar *))
{
return compare_im (contact, str, compare, E_CONTACT_IM_AIM);
}
static gboolean
-compare_im_msn (EContact *contact, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *))
+compare_im_msn (EContact *contact,
+ const gchar *str,
+ gchar * (*compare) (const gchar *,
+ const gchar *))
{
return compare_im (contact, str, compare, E_CONTACT_IM_MSN);
}
static gboolean
-compare_im_skype (EContact *contact, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *))
+compare_im_skype (EContact *contact,
+ const gchar *str,
+ gchar * (*compare) (const gchar *,
+ const gchar *))
{
return compare_im (contact, str, compare, E_CONTACT_IM_SKYPE);
}
static gboolean
-compare_im_google_talk (EContact *contact, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *))
+compare_im_google_talk (EContact *contact,
+ const gchar *str,
+ gchar * (*compare) (const gchar *,
+ const gchar *))
{
return compare_im (contact, str, compare, E_CONTACT_IM_GOOGLE_TALK);
}
static gboolean
-compare_im_icq (EContact *contact, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *))
+compare_im_icq (EContact *contact,
+ const gchar *str,
+ gchar * (*compare) (const gchar *,
+ const gchar *))
{
return compare_im (contact, str, compare, E_CONTACT_IM_ICQ);
}
static gboolean
-compare_im_yahoo (EContact *contact, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *))
+compare_im_yahoo (EContact *contact,
+ const gchar *str,
+ gchar *(*compare) (const gchar *,
+ const gchar *))
{
return compare_im (contact, str, compare, E_CONTACT_IM_YAHOO);
}
static gboolean
-compare_im_gadugadu (EContact *contact, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *))
+compare_im_gadugadu (EContact *contact,
+ const gchar *str,
+ gchar * (*compare) (const gchar *,
+ const gchar *))
{
return compare_im (contact, str, compare, E_CONTACT_IM_GADUGADU);
}
static gboolean
-compare_im_jabber (EContact *contact, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *))
+compare_im_jabber (EContact *contact,
+ const gchar *str,
+ gchar * (*compare) (const gchar *,
+ const gchar *))
{
return compare_im (contact, str, compare, E_CONTACT_IM_JABBER);
}
static gboolean
-compare_im_groupwise (EContact *contact, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *))
+compare_im_groupwise (EContact *contact,
+ const gchar *str,
+ gchar * (*compare) (const gchar *,
+ const gchar *))
{
return compare_im (contact, str, compare, E_CONTACT_IM_GROUPWISE);
}
static gboolean
-compare_email (EContact *contact, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *))
+compare_email (EContact *contact,
+ const gchar *str,
+ gchar * (*compare) (const gchar *,
+ const gchar *))
{
gint i;
@@ -143,8 +165,10 @@ compare_email (EContact *contact, const gchar *str,
}
static gboolean
-compare_phone (EContact *contact, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *))
+compare_phone (EContact *contact,
+ const gchar *str,
+ gchar * (*compare) (const gchar *,
+ const gchar *))
{
gint i;
gboolean rv = FALSE;
@@ -163,8 +187,10 @@ compare_phone (EContact *contact, const gchar *str,
}
static gboolean
-compare_name (EContact *contact, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *))
+compare_name (EContact *contact,
+ const gchar *str,
+ gchar * (*compare) (const gchar *,
+ const gchar *))
{
const gchar *name;
@@ -188,8 +214,10 @@ compare_name (EContact *contact, const gchar *str,
}
static gboolean
-compare_photo_uri (EContact *contact, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *))
+compare_photo_uri (EContact *contact,
+ const gchar *str,
+ gchar * (*compare) (const gchar *,
+ const gchar *))
{
EContactPhoto *photo;
gboolean ret_val = FALSE;
@@ -208,8 +236,10 @@ compare_photo_uri (EContact *contact, const gchar *str,
}
static gboolean
-compare_address (EContact *contact, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *))
+compare_address (EContact *contact,
+ const gchar *str,
+ gchar * (*compare) (const gchar *,
+ const gchar *))
{
gint i;
@@ -238,8 +268,10 @@ compare_address (EContact *contact, const gchar *str,
}
static gboolean
-compare_category (EContact *contact, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *))
+compare_category (EContact *contact,
+ const gchar *str,
+ gchar * (*compare) (const gchar *,
+ const gchar *))
{
GList *categories;
GList *iterator;
@@ -263,8 +295,10 @@ compare_category (EContact *contact, const gchar *str,
}
static gboolean
-compare_date (EContactDate *date, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *))
+compare_date (EContactDate *date,
+ const gchar *str,
+ gchar * (*compare) (const gchar *,
+ const gchar *))
{
gchar *date_str = e_contact_date_to_string (date);
gboolean ret_val = FALSE;
@@ -288,8 +322,10 @@ static struct prop_info {
EContactField field_id;
const gchar *query_prop;
enum prop_type prop_type;
- gboolean (*list_compare)(EContact *contact, const gchar *str,
- gchar *(*compare)(const gchar *, const gchar *));
+ gboolean (*list_compare) (EContact *contact,
+ const gchar *str,
+ gchar * (*compare) (const gchar *,
+ const gchar *));
} prop_info_table[] = {
#define NORMAL_PROP(f,q) {f, q, PROP_TYPE_NORMAL, NULL}
@@ -339,9 +375,12 @@ static struct prop_info {
};
static ESExpResult *
-entry_compare (SearchContext *ctx, struct _ESExp *f,
- gint argc, struct _ESExpResult **argv,
- gchar *(*compare)(const gchar *, const gchar *))
+entry_compare (SearchContext *ctx,
+ struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gchar * (*compare) (const gchar *,
+ const gchar *))
{
ESExpResult *r;
gint truth = FALSE;
@@ -401,8 +440,8 @@ entry_compare (SearchContext *ctx, struct _ESExp *f,
}
/* if we're looking at all fields and find a match,
- or if we're just looking at this one field,
- break. */
+ * or if we're just looking at this one field,
+ * break. */
if ((any_field && truth)
|| !any_field)
break;
@@ -411,8 +450,8 @@ entry_compare (SearchContext *ctx, struct _ESExp *f,
if (!saw_any) {
/* propname didn't match to any of our known "special" properties,
- so try to find if it isn't a real field and if so, then compare
- against value in this field only */
+ * so try to find if it isn't a real field and if so, then compare
+ * against value in this field only */
EContactField fid = e_contact_field_id (propname);
if (fid >= E_CONTACT_FIELD_FIRST && fid < E_CONTACT_FIELD_LAST) {
@@ -427,7 +466,7 @@ entry_compare (SearchContext *ctx, struct _ESExp *f,
}
} else {
/* it is not direct EContact known field, so try to find
- it in EVCard attributes */
+ * it in EVCard attributes */
GList *a, *attrs = e_vcard_get_attributes (E_VCARD (ctx->contact));
for (a = attrs; a && !truth; a = a->next) {
EVCardAttribute *attr = (EVCardAttribute *) a->data;
@@ -455,7 +494,8 @@ entry_compare (SearchContext *ctx, struct _ESExp *f,
}
static void
-contains_helper_free_word (gpointer data, gpointer user_data)
+contains_helper_free_word (gpointer data,
+ gpointer user_data)
{
if (data) {
g_string_free ((GString *) data, TRUE);
@@ -463,7 +503,8 @@ contains_helper_free_word (gpointer data, gpointer user_data)
}
static gchar *
-try_contains_word (const gchar *s1, GSList *word)
+try_contains_word (const gchar *s1,
+ GSList *word)
{
const gchar *o, *p;
gunichar unival, first_w_char;
@@ -510,8 +551,8 @@ try_contains_word (const gchar *s1, GSList *word)
}
/* converts str into utf8 GString in lowercase;
- returns NULL if str is invalid utf8 string otherwise
- returns newly allocated GString
+ * returns NULL if str is invalid utf8 string otherwise
+ * returns newly allocated GString
*/
static GString *
chars_to_unistring_lowercase (const gchar *pstr)
@@ -545,10 +586,11 @@ chars_to_unistring_lowercase (const gchar *pstr)
}
/* first space between words is treated as wildcard character;
- we are looking for s2 in s1, so s2 will be breaked into words
+ * we are looking for s2 in s1, so s2 will be breaked into words
*/
static gchar *
-contains_helper (const gchar *s1, const gchar *s2)
+contains_helper (const gchar *s1,
+ const gchar *s2)
{
GString *s1uni;
GString *s2uni;
@@ -601,7 +643,7 @@ contains_helper (const gchar *s1, const gchar *s2)
if (unich == ' ') {
if (have_nonspace && !have_space) {
/* treat only first space after nonspace character as wildcard,
- so we will start new word here
+ * so we will start new word here
*/
have_space = TRUE;
words = g_slist_append (words, w);
@@ -619,7 +661,7 @@ contains_helper (const gchar *s1, const gchar *s2)
if (have_space) {
/* there was one or more spaces at the end of string,
- concat actual word with that last one
+ * concat actual word with that last one
*/
g_string_append_len (last_word, w->str, w->len);
g_string_free (w, TRUE);
@@ -639,7 +681,10 @@ contains_helper (const gchar *s1, const gchar *s2)
}
static ESExpResult *
-func_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_contains (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
@@ -647,7 +692,8 @@ func_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
}
static gchar *
-is_helper (const gchar *ps1, const gchar *ps2)
+is_helper (const gchar *ps1,
+ const gchar *ps2)
{
gchar *s1, *s2, *res;
@@ -666,7 +712,10 @@ is_helper (const gchar *ps1, const gchar *ps2)
}
static ESExpResult *
-func_is (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_is (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
@@ -674,7 +723,8 @@ func_is (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
}
static gchar *
-endswith_helper (const gchar *ps1, const gchar *ps2)
+endswith_helper (const gchar *ps1,
+ const gchar *ps2)
{
gchar *s1 = e_util_utf8_remove_accents (ps1);
gchar *s2 = e_util_utf8_remove_accents (ps2);
@@ -694,7 +744,10 @@ endswith_helper (const gchar *ps1, const gchar *ps2)
}
static ESExpResult *
-func_endswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_endswith (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
@@ -702,7 +755,8 @@ func_endswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
}
static gchar *
-beginswith_helper (const gchar *ps1, const gchar *ps2)
+beginswith_helper (const gchar *ps1,
+ const gchar *ps2)
{
gchar *p, *res;
gchar *s1 = e_util_utf8_remove_accents (ps1);
@@ -721,7 +775,10 @@ beginswith_helper (const gchar *ps1, const gchar *ps2)
}
static ESExpResult *
-func_beginswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_beginswith (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
@@ -729,7 +786,8 @@ func_beginswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpoint
}
static gchar *
-exists_helper (const gchar *ps1, const gchar *ps2)
+exists_helper (const gchar *ps1,
+ const gchar *ps2)
{
gchar *res;
gchar *s1 = e_util_utf8_remove_accents (ps1);
@@ -744,7 +802,10 @@ exists_helper (const gchar *ps1, const gchar *ps2)
}
static ESExpResult *
-func_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_exists (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
ESExpResult *r;
@@ -767,7 +828,7 @@ func_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer d
if (info->prop_type == PROP_TYPE_NORMAL) {
const gchar *prop = NULL;
/* searches where the query's property
- maps directly to an ecard property */
+ * maps directly to an ecard property */
prop = e_contact_get_const (ctx->contact, info->field_id);
@@ -785,8 +846,8 @@ func_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer d
if (!saw_any) {
/* propname didn't match to any of our known "special" properties,
- so try to find if it isn't a real field and if so, then check
- against value in this field only */
+ * so try to find if it isn't a real field and if so, then check
+ * against value in this field only */
EContactField fid = e_contact_field_id (propname);
if (fid >= E_CONTACT_FIELD_FIRST && fid < E_CONTACT_FIELD_LAST) {
@@ -815,7 +876,10 @@ func_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer d
}
static ESExpResult *
-func_exists_vcard (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_exists_vcard (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
ESExpResult *r;
@@ -871,7 +935,8 @@ static struct {
* Returns: %TRUE if the contact matches, %FALSE otherwise.
**/
gboolean
-e_book_backend_sexp_match_contact (EBookBackendSExp *sexp, EContact *contact)
+e_book_backend_sexp_match_contact (EBookBackendSExp *sexp,
+ EContact *contact)
{
ESExpResult *r;
gboolean retval;
@@ -904,7 +969,8 @@ e_book_backend_sexp_match_contact (EBookBackendSExp *sexp, EContact *contact)
* Returns: %TRUE if the VCard matches, %FALSE otherwise.
**/
gboolean
-e_book_backend_sexp_match_vcard (EBookBackendSExp *sexp, const gchar *vcard)
+e_book_backend_sexp_match_vcard (EBookBackendSExp *sexp,
+ const gchar *vcard)
{
EContact *contact;
gboolean retval;
diff --git a/addressbook/libedata-book/e-book-backend-sqlitedb-test.c b/addressbook/libedata-book/e-book-backend-sqlitedb-test.c
index 16f8248..df39af2 100644
--- a/addressbook/libedata-book/e-book-backend-sqlitedb-test.c
+++ b/addressbook/libedata-book/e-book-backend-sqlitedb-test.c
@@ -89,7 +89,9 @@ add_contacts (EBookBackendSqliteDB *ebsdb)
}
static void
-search_db (EBookBackendSqliteDB *ebsdb, const gchar *type, const gchar *sexp)
+search_db (EBookBackendSqliteDB *ebsdb,
+ const gchar *type,
+ const gchar *sexp)
{
GSList *vcards;
EbSdbSearchData *s_data;
@@ -191,7 +193,8 @@ exit:
}
gint
-main (gint argc, gchar *argv[])
+main (gint argc,
+ gchar *argv[])
{
g_type_init ();
g_thread_init (NULL);
diff --git a/addressbook/libedata-book/e-book-backend-sqlitedb.c b/addressbook/libedata-book/e-book-backend-sqlitedb.c
index faccce8..26e6284 100644
--- a/addressbook/libedata-book/e-book-backend-sqlitedb.c
+++ b/addressbook/libedata-book/e-book-backend-sqlitedb.c
@@ -169,7 +169,9 @@ e_book_backend_sqlitedb_init (EBookBackendSqliteDB *ebsdb)
}
static void
-e_book_sqlitedb_match_func (sqlite3_context *ctx, gint nArgs, sqlite3_value **values)
+e_book_sqlitedb_match_func (sqlite3_context *ctx,
+ gint nArgs,
+ sqlite3_value **values)
{
gboolean matches = FALSE;
const gchar *what, *where;
@@ -218,11 +220,11 @@ e_book_sqlitedb_match_func (sqlite3_context *ctx, gint nArgs, sqlite3_value **va
* Returns:
**/
static gint
-book_backend_sql_exec (sqlite3 *db,
- const gchar *stmt,
- gint (*callback)(gpointer ,gint,gchar **,gchar **),
- gpointer data,
- GError **error)
+book_backend_sql_exec (sqlite3 *db,
+ const gchar *stmt,
+ gint (*callback)(gpointer ,gint,gchar **,gchar **),
+ gpointer data,
+ GError **error)
{
gchar *errmsg = NULL;
gint ret = -1;
@@ -255,13 +257,15 @@ book_backend_sql_exec (sqlite3 *db,
}
static void
-book_backend_sqlitedb_start_transaction (EBookBackendSqliteDB *ebsdb, GError **error)
+book_backend_sqlitedb_start_transaction (EBookBackendSqliteDB *ebsdb,
+ GError **error)
{
book_backend_sql_exec (ebsdb->priv->db, "BEGIN", NULL, NULL, error);
}
static void
-book_backend_sqlitedb_end_transaction (EBookBackendSqliteDB *ebsdb, GError **error)
+book_backend_sqlitedb_end_transaction (EBookBackendSqliteDB *ebsdb,
+ GError **error)
{
if (!error || !*error)
book_backend_sql_exec (ebsdb->priv->db, "COMMIT", NULL, NULL, error);
@@ -270,18 +274,18 @@ book_backend_sqlitedb_end_transaction (EBookBackendSqliteDB *ebsdb, GError **err
}
static void
-create_folders_table (EBookBackendSqliteDB *ebsdb,
- GError **error)
+create_folders_table (EBookBackendSqliteDB *ebsdb,
+ GError **error)
{
GError *err = NULL;
/* sync_data points to syncronization data, it could be last_modified time
- or a sequence number or some text depending on the backend.
-
- partial_content says whether the contents are partially downloaded for
- auto-completion or if it has the complete content.
-
- Have not included a bdata here since the keys table should suffice any
- additional need that arises.
+ * or a sequence number or some text depending on the backend.
+ *
+ * partial_content says whether the contents are partially downloaded for
+ * auto-completion or if it has the complete content.
+ *
+ * Have not included a bdata here since the keys table should suffice any
+ * additional need that arises.
*/
const gchar *stmt = "CREATE TABLE IF NOT EXISTS folders"
"( folder_id TEXT PRIMARY KEY,"
@@ -320,7 +324,10 @@ create_folders_table (EBookBackendSqliteDB *ebsdb,
}
static gint
-folder_found_cb (gpointer ref, gint col, gchar **cols, gchar **name)
+folder_found_cb (gpointer ref,
+ gint col,
+ gchar **cols,
+ gchar **name)
{
gboolean *found = ref;
@@ -330,9 +337,9 @@ folder_found_cb (gpointer ref, gint col, gchar **cols, gchar **name)
}
static gboolean
-folder_exists (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- GError **error)
+folder_exists (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ GError **error)
{
gchar *stmt;
gboolean found = FALSE;
@@ -349,10 +356,10 @@ folder_exists (EBookBackendSqliteDB *ebsdb,
}
static void
-add_folder_into_db (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- const gchar *folder_name,
- GError **error)
+add_folder_into_db (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ const gchar *folder_name,
+ GError **error)
{
gchar *stmt;
GError *err = NULL;
@@ -383,9 +390,9 @@ add_folder_into_db (EBookBackendSqliteDB *ebsdb,
/* The column names match the fields used in book-backend-sexp */
static gint
-create_contacts_table (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- GError **error)
+create_contacts_table (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ GError **error)
{
gint ret, i;
gchar *stmt, *tmp;
@@ -416,8 +423,8 @@ create_contacts_table (EBookBackendSqliteDB *ebsdb,
sqlite3_free (stmt);
/* Create indexes on full_name and email_1 as autocompletion queries would mainly
- rely on this. Assuming that the frequency of matching on these would be higher than
- on the other fields like email_2, surname etc. email_1 should be the primary email */
+ * rely on this. Assuming that the frequency of matching on these would be higher than
+ * on the other fields like email_2, surname etc. email_1 should be the primary email */
if (!err) {
tmp = g_strdup_printf("FNINDEX-%s", folderid);
stmt = sqlite3_mprintf ("CREATE INDEX IF NOT EXISTS %Q ON %Q (full_name)", tmp, folderid);
@@ -443,9 +450,9 @@ create_contacts_table (EBookBackendSqliteDB *ebsdb,
}
static gboolean
-book_backend_sqlitedb_load (EBookBackendSqliteDB *ebsdb,
- const gchar *filename,
- GError **error)
+book_backend_sqlitedb_load (EBookBackendSqliteDB *ebsdb,
+ const gchar *filename,
+ GError **error)
{
EBookBackendSqliteDBPrivate *priv;
gint ret;
@@ -502,12 +509,12 @@ book_backend_sqlitedb_load (EBookBackendSqliteDB *ebsdb,
* Returns:
**/
EBookBackendSqliteDB *
-e_book_backend_sqlitedb_new (const gchar *path,
- const gchar *emailid,
- const gchar *folderid,
- const gchar *folder_name,
- gboolean store_vcard,
- GError **error)
+e_book_backend_sqlitedb_new (const gchar *path,
+ const gchar *emailid,
+ const gchar *folderid,
+ const gchar *folder_name,
+ gboolean store_vcard,
+ GError **error)
{
EBookBackendSqliteDB *ebsdb;
gchar *hash_key, *filename;
@@ -561,10 +568,10 @@ exit:
/* Add Contact (free the result with g_free() ) */
static gchar *
-insert_stmt_from_contact (EContact *contact,
- gboolean partial_content,
- const gchar *folderid,
- gboolean store_vcard)
+insert_stmt_from_contact (EContact *contact,
+ gboolean partial_content,
+ const gchar *folderid,
+ gboolean store_vcard)
{
GString *string;
gchar *str, *vcard_str;
@@ -625,11 +632,11 @@ insert_stmt_from_contact (EContact *contact,
* Returns: TRUE on success.
**/
gboolean
-e_book_backend_sqlitedb_add_contact (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- EContact *contact,
- gboolean partial_content,
- GError **error)
+e_book_backend_sqlitedb_add_contact (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ EContact *contact,
+ gboolean partial_content,
+ GError **error)
{
GSList l;
l.data = contact;
@@ -651,11 +658,11 @@ e_book_backend_sqlitedb_add_contact (EBookBackendSqliteDB *ebsdb,
* Returns: TRUE on success.
**/
gboolean
-e_book_backend_sqlitedb_add_contacts (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- GSList *contacts,
- gboolean partial_content,
- GError **error)
+e_book_backend_sqlitedb_add_contacts (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ GSList *contacts,
+ gboolean partial_content,
+ GError **error)
{
GSList *l;
GError *err = NULL;
@@ -689,10 +696,10 @@ e_book_backend_sqlitedb_add_contacts (EBookBackendSqliteDB *ebsdb,
}
gboolean
-e_book_backend_sqlitedb_remove_contact (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- const gchar *uid,
- GError **error)
+e_book_backend_sqlitedb_remove_contact (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ const gchar *uid,
+ GError **error)
{
GSList l;
l.data = (gchar *) uid; /* Won't modify it, I promise :) */
@@ -702,10 +709,10 @@ e_book_backend_sqlitedb_remove_contact (EBookBackendSqliteDB *ebsdb,
}
gboolean
-e_book_backend_sqlitedb_remove_contacts (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- GSList *uids,
- GError **error)
+e_book_backend_sqlitedb_remove_contacts (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ GSList *uids,
+ GError **error)
{
GSList *l;
GError *err = NULL;
@@ -757,7 +764,10 @@ struct _contact_info {
};
static gint
-contact_found_cb (gpointer ref, gint col, gchar **cols, gchar **name)
+contact_found_cb (gpointer ref,
+ gint col,
+ gchar **cols,
+ gchar **name)
{
struct _contact_info *cinfo = ref;
@@ -768,11 +778,11 @@ contact_found_cb (gpointer ref, gint col, gchar **cols, gchar **name)
}
gboolean
-e_book_backend_sqlitedb_has_contact (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- const gchar *uid,
- gboolean *partial_content,
- GError **error)
+e_book_backend_sqlitedb_has_contact (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ const gchar *uid,
+ gboolean *partial_content,
+ GError **error)
{
GError *err = NULL;
gchar *stmt;
@@ -798,7 +808,10 @@ e_book_backend_sqlitedb_has_contact (EBookBackendSqliteDB *ebsdb,
}
static gint
-get_vcard_cb (gpointer ref, gint col, gchar **cols, gchar **name)
+get_vcard_cb (gpointer ref,
+ gint col,
+ gchar **cols,
+ gchar **name)
{
gchar **vcard_str = ref;
@@ -809,12 +822,12 @@ get_vcard_cb (gpointer ref, gint col, gchar **cols, gchar **name)
}
EContact *
-e_book_backend_sqlitedb_get_contact (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- const gchar *uid,
- GHashTable *fields_of_interest,
- gboolean *with_all_required_fields,
- GError **error)
+e_book_backend_sqlitedb_get_contact (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ const gchar *uid,
+ GHashTable *fields_of_interest,
+ gboolean *with_all_required_fields,
+ GError **error)
{
GError *err = NULL;
EContact *contact = NULL;
@@ -831,8 +844,8 @@ e_book_backend_sqlitedb_get_contact (EBookBackendSqliteDB *ebsdb,
static void
accumulate_fields_select_stmt (const gchar *field_name,
- gpointer is_present,
- GString *string)
+ gpointer is_present,
+ GString *string)
{
EContactField field = e_contact_field_id (field_name);
const gchar *dbname = NULL;
@@ -854,8 +867,8 @@ accumulate_fields_select_stmt (const gchar *field_name,
static void
check_field_foreach (const gchar *field_name,
- gpointer is_present,
- gboolean *is_summary_query)
+ gpointer is_present,
+ gboolean *is_summary_query)
{
EContactField field = e_contact_field_id (field_name);
@@ -880,8 +893,8 @@ e_book_backend_sqlitedb_is_summary_fields (GHashTable *fields_of_interest)
/* free return value with g_free */
static gchar *
summary_select_stmt (const gchar *folderid,
- GHashTable *fields_of_interest,
- gboolean *with_all_required_fields)
+ GHashTable *fields_of_interest,
+ gboolean *with_all_required_fields)
{
GString *string;
gchar *str;
@@ -933,11 +946,11 @@ summary_select_stmt (const gchar *folderid,
*/
gchar *
e_book_backend_sqlitedb_get_vcard_string (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- const gchar *uid,
- GHashTable *fields_of_interest,
- gboolean *with_all_required_fields,
- GError **error)
+ const gchar *folderid,
+ const gchar *uid,
+ GHashTable *fields_of_interest,
+ gboolean *with_all_required_fields,
+ GError **error)
{
gchar *stmt, *select_stmt;
gchar *vcard_str = NULL;
@@ -984,7 +997,10 @@ e_book_backend_sqlitedb_get_vcard_string (EBookBackendSqliteDB *ebsdb,
}
static ESExpResult *
-func_check (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_check (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
ESExpResult *r;
gint truth = FALSE;
@@ -1071,7 +1087,10 @@ e_book_backend_sqlitedb_is_summary_query (const gchar *query)
}
static ESExpResult *
-func_or (ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+func_or (ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ gpointer data)
{
ESExpResult *r, *r1;
GString *string;
@@ -1104,20 +1123,24 @@ typedef enum {
} match_type;
static ESExpResult *
-convert_match_exp (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data, match_type match)
+convert_match_exp (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data,
+ match_type match)
{
ESExpResult *r;
- gchar *str=NULL;
+ gchar *str = NULL;
/* are we inside a match-all? */
- if (argc>1 && argv[0]->type == ESEXP_RES_STRING) {
+ if (argc > 1 && argv[0]->type == ESEXP_RES_STRING) {
const gchar *field;
/* only a subset of headers are supported .. */
field = argv[0]->value.string;
if (argv[1]->type == ESEXP_RES_STRING && argv[1]->value.string[0] != 0) {
- gchar *value=NULL;
+ gchar *value = NULL;
if (match == MATCH_CONTAINS) {
value = g_strdup_printf ("'%%%s%%'", argv[1]->value.string);
@@ -1168,25 +1191,37 @@ convert_match_exp (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpoi
}
static ESExpResult *
-func_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_contains (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
return convert_match_exp (f, argc, argv, data, MATCH_CONTAINS);
}
static ESExpResult *
-func_is (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_is (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
return convert_match_exp (f, argc, argv, data, MATCH_IS);
}
static ESExpResult *
-func_beginswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_beginswith (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
return convert_match_exp (f, argc, argv, data, MATCH_BEGINS_WITH);
}
static ESExpResult *
-func_endswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_endswith (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
return convert_match_exp (f, argc, argv, data, MATCH_ENDS_WITH);
}
@@ -1241,7 +1276,10 @@ sexp_to_sql_query (const gchar *query)
}
static gint
-addto_vcard_list_cb (gpointer ref, gint col, gchar **cols, gchar **name)
+addto_vcard_list_cb (gpointer ref,
+ gint col,
+ gchar **cols,
+ gchar **name)
{
GSList **vcard_data = ref;
EbSdbSearchData *s_data = g_new0 (EbSdbSearchData, 1);
@@ -1261,7 +1299,10 @@ addto_vcard_list_cb (gpointer ref, gint col, gchar **cols, gchar **name)
}
static gint
-addto_slist_cb (gpointer ref, gint col, gchar **cols, gchar **name)
+addto_slist_cb (gpointer ref,
+ gint col,
+ gchar **cols,
+ gchar **name)
{
GSList **uids = ref;
@@ -1272,7 +1313,10 @@ addto_slist_cb (gpointer ref, gint col, gchar **cols, gchar **name)
}
static gint
-store_data_to_vcard (gpointer ref, gint ncol, gchar **cols, gchar **name)
+store_data_to_vcard (gpointer ref,
+ gint ncol,
+ gchar **cols,
+ gchar **name)
{
GSList **vcard_data = ref;
EbSdbSearchData *search_data = g_new0 (EbSdbSearchData, 1);
@@ -1324,12 +1368,12 @@ store_data_to_vcard (gpointer ref, gint ncol, gchar **cols, gchar **name)
}
static GSList *
-book_backend_sqlitedb_search_query (EBookBackendSqliteDB *ebsdb,
- const gchar *sql,
- const gchar *folderid,
+book_backend_sqlitedb_search_query (EBookBackendSqliteDB *ebsdb,
+ const gchar *sql,
+ const gchar *folderid,
/* const */ GHashTable *fields_of_interest,
- gboolean *with_all_required_fields,
- GError **error)
+ gboolean *with_all_required_fields,
+ GError **error)
{
GError *err = NULL;
GSList *vcard_data = NULL;
@@ -1381,7 +1425,11 @@ book_backend_sqlitedb_search_query (EBookBackendSqliteDB *ebsdb,
}
static GSList *
-book_backend_sqlitedb_search_full (EBookBackendSqliteDB *ebsdb, const gchar *sexp, const gchar *folderid, gboolean return_uids, GError **error)
+book_backend_sqlitedb_search_full (EBookBackendSqliteDB *ebsdb,
+ const gchar *sexp,
+ const gchar *folderid,
+ gboolean return_uids,
+ GError **error)
{
GError *err = NULL;
GSList *r_list = NULL, *all = NULL, *l;
@@ -1448,13 +1496,13 @@ book_backend_sqlitedb_search_full (EBookBackendSqliteDB *ebsdb, const gchar *sex
* Returns: List of EbSdbSearchData.
**/
GSList *
-e_book_backend_sqlitedb_search (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- const gchar *sexp,
- /* const */ GHashTable *fields_of_interest,
- gboolean *searched,
- gboolean *with_all_required_fields,
- GError **error)
+e_book_backend_sqlitedb_search (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ const gchar *sexp,
+ /* const */ GHashTable *fields_of_interest,
+ gboolean *searched,
+ gboolean *with_all_required_fields,
+ GError **error)
{
GSList *search_contacts = NULL;
gboolean local_searched = FALSE;
@@ -1492,11 +1540,11 @@ e_book_backend_sqlitedb_search (EBookBackendSqliteDB *ebsdb,
}
GSList *
-e_book_backend_sqlitedb_search_uids (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- const gchar *sexp,
- gboolean *searched,
- GError **error)
+e_book_backend_sqlitedb_search_uids (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ const gchar *sexp,
+ gboolean *searched,
+ GError **error)
{
GSList *uids = NULL;
gboolean local_searched = FALSE;
@@ -1535,7 +1583,10 @@ e_book_backend_sqlitedb_search_uids (EBookBackendSqliteDB *ebsdb,
}
static gint
-get_bool_cb (gpointer ref, gint col, gchar **cols, gchar **name)
+get_bool_cb (gpointer ref,
+ gint col,
+ gchar **cols,
+ gchar **name)
{
gboolean *ret = ref;
@@ -1545,9 +1596,9 @@ get_bool_cb (gpointer ref, gint col, gchar **cols, gchar **name)
}
gboolean
-e_book_backend_sqlitedb_get_is_populated (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- GError **error)
+e_book_backend_sqlitedb_get_is_populated (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ GError **error)
{
gchar *stmt;
gboolean ret = FALSE;
@@ -1565,10 +1616,10 @@ e_book_backend_sqlitedb_get_is_populated (EBookBackendSqliteDB *ebsdb,
}
gboolean
-e_book_backend_sqlitedb_set_is_populated (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- gboolean populated,
- GError **error)
+e_book_backend_sqlitedb_set_is_populated (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ gboolean populated,
+ GError **error)
{
gchar *stmt = NULL;
GError *err = NULL;
@@ -1603,9 +1654,9 @@ e_book_backend_sqlitedb_set_is_populated (EBookBackendSqliteDB *ebsdb,
* the stored vcards does not contain the full data.
**/
gboolean
-e_book_backend_sqlitedb_get_has_partial_content (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- GError **error)
+e_book_backend_sqlitedb_get_has_partial_content (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ GError **error)
{
gchar *stmt;
gboolean ret = FALSE;
@@ -1622,10 +1673,10 @@ e_book_backend_sqlitedb_get_has_partial_content (EBookBackendSqliteDB *ebsdb,
}
gboolean
-e_book_backend_sqlitedb_set_has_partial_content (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- gboolean partial_content,
- GError **error)
+e_book_backend_sqlitedb_set_has_partial_content (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ gboolean partial_content,
+ GError **error)
{
gchar *stmt = NULL;
GError *err = NULL;
@@ -1650,7 +1701,10 @@ e_book_backend_sqlitedb_set_has_partial_content (EBookBackendSqliteDB *ebsdb,
}
static gint
-get_string_cb (gpointer ref, gint col, gchar **cols, gchar **name)
+get_string_cb (gpointer ref,
+ gint col,
+ gchar **cols,
+ gchar **name)
{
gchar **ret = ref;
@@ -1660,10 +1714,10 @@ get_string_cb (gpointer ref, gint col, gchar **cols, gchar **name)
}
gchar *
-e_book_backend_sqlitedb_get_contact_bdata (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- const gchar *uid,
- GError **error)
+e_book_backend_sqlitedb_get_contact_bdata (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ const gchar *uid,
+ GError **error)
{
gchar *stmt, *ret = NULL;
@@ -1679,11 +1733,11 @@ e_book_backend_sqlitedb_get_contact_bdata (EBookBackendSqliteDB *ebsdb,
}
gboolean
-e_book_backend_sqlitedb_set_contact_bdata (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- const gchar *uid,
- const gchar *value,
- GError **error)
+e_book_backend_sqlitedb_set_contact_bdata (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ const gchar *uid,
+ const gchar *value,
+ GError **error)
{
gchar *stmt = NULL;
GError *err = NULL;
@@ -1708,9 +1762,9 @@ e_book_backend_sqlitedb_set_contact_bdata (EBookBackendSqliteDB *ebsdb,
}
gchar *
-e_book_backend_sqlitedb_get_sync_data (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- GError **error)
+e_book_backend_sqlitedb_get_sync_data (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ GError **error)
{
gchar *stmt, *ret = NULL;
@@ -1726,10 +1780,10 @@ e_book_backend_sqlitedb_get_sync_data (EBookBackendSqliteDB *ebsdb,
}
gboolean
-e_book_backend_sqlitedb_set_sync_data (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- const gchar *sync_data,
- GError **error)
+e_book_backend_sqlitedb_set_sync_data (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ const gchar *sync_data,
+ GError **error)
{
gchar *stmt = NULL;
GError *err = NULL;
@@ -1754,10 +1808,10 @@ e_book_backend_sqlitedb_set_sync_data (EBookBackendSqliteDB *ebsdb,
}
gchar *
-e_book_backend_sqlitedb_get_key_value (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- const gchar *key,
- GError **error)
+e_book_backend_sqlitedb_get_key_value (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ const gchar *key,
+ GError **error)
{
gchar *stmt, *ret = NULL;
@@ -1774,11 +1828,11 @@ e_book_backend_sqlitedb_get_key_value (EBookBackendSqliteDB *ebsdb,
}
gboolean
-e_book_backend_sqlitedb_set_key_value (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- const gchar *key,
- const gchar *value,
- GError **error)
+e_book_backend_sqlitedb_set_key_value (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ const gchar *key,
+ const gchar *value,
+ GError **error)
{
gchar *stmt = NULL;
GError *err = NULL;
@@ -1803,9 +1857,9 @@ e_book_backend_sqlitedb_set_key_value (EBookBackendSqliteDB *ebsdb,
}
GSList *
-e_book_backend_sqlitedb_get_partially_cached_ids (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- GError **error)
+e_book_backend_sqlitedb_get_partially_cached_ids (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ GError **error)
{
gchar *stmt;
GSList *uids = NULL;
@@ -1823,9 +1877,9 @@ e_book_backend_sqlitedb_get_partially_cached_ids (EBookBackendSqliteDB *ebsdb,
}
gboolean
-e_book_backend_sqlitedb_delete_addressbook (EBookBackendSqliteDB *ebsdb,
- const gchar *folderid,
- GError **error)
+e_book_backend_sqlitedb_delete_addressbook (EBookBackendSqliteDB *ebsdb,
+ const gchar *folderid,
+ GError **error)
{
gchar *stmt;
GError *err = NULL;
@@ -1864,7 +1918,7 @@ e_book_backend_sqlitedb_delete_addressbook (EBookBackendSqliteDB *ebsdb,
}
void
-e_book_backend_sqlitedb_search_data_free (EbSdbSearchData *s_data)
+e_book_backend_sqlitedb_search_data_free (EbSdbSearchData *s_data)
{
if (s_data) {
g_free (s_data->uid);
@@ -1875,8 +1929,8 @@ e_book_backend_sqlitedb_search_data_free (EbSdbSearchData *s_data)
}
gboolean
-e_book_backend_sqlitedb_remove (EBookBackendSqliteDB *ebsdb,
- GError **error)
+e_book_backend_sqlitedb_remove (EBookBackendSqliteDB *ebsdb,
+ GError **error)
{
EBookBackendSqliteDBPrivate *priv;
gchar *filename;
diff --git a/addressbook/libedata-book/e-book-backend-summary.c b/addressbook/libedata-book/e-book-backend-summary.c
index 60c8d87..bf49ace 100644
--- a/addressbook/libedata-book/e-book-backend-summary.c
+++ b/addressbook/libedata-book/e-book-backend-summary.c
@@ -81,7 +81,7 @@ typedef struct {
typedef struct {
/* these lengths do *not* including the terminating \0, as
- it's not stored on disk. */
+ * it's not stored on disk. */
guint16 id_len;
guint16 nickname_len;
guint16 full_name_len; /* version 3.0 field */
@@ -157,8 +157,9 @@ clear_items (EBookBackendSummary *summary)
*
* Returns: A new #EBookBackendSummary.
**/
-EBookBackendSummary*
-e_book_backend_summary_new (const gchar *summary_path, gint flush_timeout_millis)
+EBookBackendSummary *
+e_book_backend_summary_new (const gchar *summary_path,
+ gint flush_timeout_millis)
{
EBookBackendSummary *summary = g_object_new (E_TYPE_BACKEND_SUMMARY, NULL);
@@ -237,7 +238,8 @@ e_book_backend_summary_init (EBookBackendSummary *summary)
static gboolean
-e_book_backend_summary_check_magic (EBookBackendSummary *summary, FILE *fp)
+e_book_backend_summary_check_magic (EBookBackendSummary *summary,
+ FILE *fp)
{
gchar buf[PAS_SUMMARY_MAGIC_LEN + 1];
gint rv;
@@ -254,8 +256,9 @@ e_book_backend_summary_check_magic (EBookBackendSummary *summary, FILE *fp)
}
static gboolean
-e_book_backend_summary_load_header (EBookBackendSummary *summary, FILE *fp,
- EBookBackendSummaryHeader *header)
+e_book_backend_summary_load_header (EBookBackendSummary *summary,
+ FILE *fp,
+ EBookBackendSummaryHeader *header)
{
gint rv;
@@ -284,7 +287,8 @@ e_book_backend_summary_load_header (EBookBackendSummary *summary, FILE *fp,
}
static gchar *
-read_string (FILE *fp, gint len)
+read_string (FILE *fp,
+ gint len)
{
gchar *buf;
gint rv;
@@ -302,7 +306,7 @@ read_string (FILE *fp, gint len)
static gboolean
e_book_backend_summary_load_item (EBookBackendSummary *summary,
- EBookBackendSummaryItem **new_item)
+ EBookBackendSummaryItem **new_item)
{
EBookBackendSummaryItem *item;
gchar *buf;
@@ -450,8 +454,8 @@ e_book_backend_summary_open (EBookBackendSummary *summary)
if (g_stat (summary->priv->summary_path, &sb) == -1) {
/* if there's no summary present, look for the .new
- file and rename it if it's there, and attempt to
- load that */
+ * file and rename it if it's there, and attempt to
+ * load that */
gchar *new_filename = g_strconcat (summary->priv->summary_path, ".new", NULL);
if (g_stat (new_filename, &sb) == -1) {
g_free (new_filename);
@@ -546,7 +550,8 @@ e_book_backend_summary_save_magic (FILE *fp)
}
static gboolean
-e_book_backend_summary_save_header (EBookBackendSummary *summary, FILE *fp)
+e_book_backend_summary_save_header (EBookBackendSummary *summary,
+ FILE *fp)
{
EBookBackendSummaryHeader header;
gint rv;
@@ -563,7 +568,8 @@ e_book_backend_summary_save_header (EBookBackendSummary *summary, FILE *fp)
}
static gboolean
-save_string (const gchar *str, FILE *fp)
+save_string (const gchar *str,
+ FILE *fp)
{
gint rv;
@@ -575,7 +581,9 @@ save_string (const gchar *str, FILE *fp)
}
static gboolean
-e_book_backend_summary_save_item (EBookBackendSummary *summary, FILE *fp, EBookBackendSummaryItem *item)
+e_book_backend_summary_save_item (EBookBackendSummary *summary,
+ FILE *fp,
+ EBookBackendSummaryItem *item)
{
EBookBackendSummaryDiskItem disk_item;
gint len;
@@ -734,7 +742,8 @@ e_book_backend_summary_save (EBookBackendSummary *summary)
* the contact already has a summary.
**/
void
-e_book_backend_summary_add_contact (EBookBackendSummary *summary, EContact *contact)
+e_book_backend_summary_add_contact (EBookBackendSummary *summary,
+ EContact *contact)
{
EBookBackendSummaryItem *new_item;
gchar *id = NULL;
@@ -798,7 +807,8 @@ e_book_backend_summary_add_contact (EBookBackendSummary *summary, EContact *cont
* Removes the summary of the contact identified by @id from @summary.
**/
void
-e_book_backend_summary_remove_contact (EBookBackendSummary *summary, const gchar *id)
+e_book_backend_summary_remove_contact (EBookBackendSummary *summary,
+ const gchar *id)
{
EBookBackendSummaryItem *item;
@@ -828,7 +838,8 @@ e_book_backend_summary_remove_contact (EBookBackendSummary *summary, const gchar
* Returns: %TRUE if the summary exists, %FALSE otherwise.
**/
gboolean
-e_book_backend_summary_check_contact (EBookBackendSummary *summary, const gchar *id)
+e_book_backend_summary_check_contact (EBookBackendSummary *summary,
+ const gchar *id)
{
g_return_val_if_fail (summary != NULL, FALSE);
@@ -847,8 +858,8 @@ summary_flush_func (gpointer data)
if (!e_book_backend_summary_save (summary)) {
/* this isn't fatal, as we can just either 1) flush
- out with the next change, or 2) regen the summary
- when we next load the uri */
+ * out with the next change, or 2) regen the summary
+ * when we next load the uri */
g_warning ("failed to flush summary file to disk");
return TRUE; /* try again after the next timeout */
}
@@ -856,7 +867,7 @@ summary_flush_func (gpointer data)
g_message ("Flushed summary to disk");
/* we only want this to execute once, so return FALSE and set
- summary->flush_timeout to 0 */
+ * summary->flush_timeout to 0 */
summary->priv->flush_timeout = 0;
return FALSE;
}
@@ -889,7 +900,8 @@ e_book_backend_summary_touch (EBookBackendSummary *summary)
* Returns: %TRUE if the summary is up to date, %FALSE otherwise.
**/
gboolean
-e_book_backend_summary_is_up_to_date (EBookBackendSummary *summary, time_t t)
+e_book_backend_summary_is_up_to_date (EBookBackendSummary *summary,
+ time_t t)
{
g_return_val_if_fail (summary != NULL, FALSE);
@@ -903,7 +915,10 @@ e_book_backend_summary_is_up_to_date (EBookBackendSummary *summary, time_t t)
/* we only want to do summary queries if the query is over the set fields in the summary */
static ESExpResult *
-func_check (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_check (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
ESExpResult *r;
gint truth = FALSE;
@@ -952,7 +967,8 @@ static const struct {
* Returns: %TRUE if the query can be satisfied, %FALSE otherwise.
**/
gboolean
-e_book_backend_summary_is_summary_query (EBookBackendSummary *summary, const gchar *query)
+e_book_backend_summary_is_summary_query (EBookBackendSummary *summary,
+ const gchar *query)
{
ESExp *sexp;
ESExpResult *r;
@@ -996,9 +1012,11 @@ e_book_backend_summary_is_summary_query (EBookBackendSummary *summary, const gch
/* the actual query mechanics */
static ESExpResult *
-do_compare (EBookBackendSummary *summary, struct _ESExp *f, gint argc,
- struct _ESExpResult **argv,
- gchar *(*compare)(const gchar *, const gchar *))
+do_compare (EBookBackendSummary *summary,
+ struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gchar *(*compare)(const gchar *, const gchar *))
{
GPtrArray *result = g_ptr_array_new ();
ESExpResult *r;
@@ -1051,7 +1069,8 @@ do_compare (EBookBackendSummary *summary, struct _ESExp *f, gint argc,
}
static gchar *
-contains_helper (const gchar *ps1, const gchar *ps2)
+contains_helper (const gchar *ps1,
+ const gchar *ps2)
{
gchar *s1 = e_util_utf8_remove_accents (ps1);
gchar *s2 = e_util_utf8_remove_accents (ps2);
@@ -1066,7 +1085,10 @@ contains_helper (const gchar *ps1, const gchar *ps2)
}
static ESExpResult *
-func_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_contains (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
EBookBackendSummary *summary = data;
@@ -1074,7 +1096,8 @@ func_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
}
static gchar *
-is_helper (const gchar *ps1, const gchar *ps2)
+is_helper (const gchar *ps1,
+ const gchar *ps2)
{
gchar *s1 = e_util_utf8_remove_accents (ps1);
gchar *s2 = e_util_utf8_remove_accents (ps2);
@@ -1092,7 +1115,10 @@ is_helper (const gchar *ps1, const gchar *ps2)
}
static ESExpResult *
-func_is (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_is (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
EBookBackendSummary *summary = data;
@@ -1100,7 +1126,8 @@ func_is (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
}
static gchar *
-endswith_helper (const gchar *ps1, const gchar *ps2)
+endswith_helper (const gchar *ps1,
+ const gchar *ps2)
{
gchar *s1 = e_util_utf8_remove_accents (ps1);
gchar *s2 = e_util_utf8_remove_accents (ps2);
@@ -1120,7 +1147,10 @@ endswith_helper (const gchar *ps1, const gchar *ps2)
}
static ESExpResult *
-func_endswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_endswith (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
EBookBackendSummary *summary = data;
@@ -1128,7 +1158,8 @@ func_endswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
}
static gchar *
-beginswith_helper (const gchar *ps1, const gchar *ps2)
+beginswith_helper (const gchar *ps1,
+ const gchar *ps2)
{
gchar *p, *res;
gchar *s1 = e_util_utf8_remove_accents (ps1);
@@ -1147,7 +1178,10 @@ beginswith_helper (const gchar *ps1, const gchar *ps2)
}
static ESExpResult *
-func_beginswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_beginswith (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
EBookBackendSummary *summary = data;
@@ -1176,8 +1210,9 @@ static const struct {
*
* Returns: A #GPtrArray of pointers to contact ID strings.
**/
-GPtrArray*
-e_book_backend_summary_search (EBookBackendSummary *summary, const gchar *query)
+GPtrArray *
+e_book_backend_summary_search (EBookBackendSummary *summary,
+ const gchar *query)
{
ESExp *sexp;
ESExpResult *r;
@@ -1235,7 +1270,8 @@ e_book_backend_summary_search (EBookBackendSummary *summary, const gchar *query)
* Returns: A new VCard, or %NULL if the contact summary didn't exist.
**/
gchar *
-e_book_backend_summary_get_summary_vcard (EBookBackendSummary *summary, const gchar *id)
+e_book_backend_summary_get_summary_vcard (EBookBackendSummary *summary,
+ const gchar *id)
{
EBookBackendSummaryItem *item;
diff --git a/addressbook/libedata-book/e-book-backend-summary.h b/addressbook/libedata-book/e-book-backend-summary.h
index 0b9fa3c..3e2836f 100644
--- a/addressbook/libedata-book/e-book-backend-summary.h
+++ b/addressbook/libedata-book/e-book-backend-summary.h
@@ -47,12 +47,12 @@ struct _EBookBackendSummaryClass{
GObjectClass parent_class;
};
-EBookBackendSummary* e_book_backend_summary_new (const gchar *summary_path,
+EBookBackendSummary * e_book_backend_summary_new (const gchar *summary_path,
gint flush_timeout_millis);
GType e_book_backend_summary_get_type (void);
/* returns FALSE if the load fails for any reason (including that the
- summary is out of date), TRUE if it succeeds */
+ * summary is out of date), TRUE if it succeeds */
gboolean e_book_backend_summary_load (EBookBackendSummary *summary);
/* returns FALSE if the save fails, TRUE if it succeeds (or isn't required due to no changes) */
gboolean e_book_backend_summary_save (EBookBackendSummary *summary);
@@ -67,7 +67,7 @@ void e_book_backend_summary_touch (EBookBackendSummary
gboolean e_book_backend_summary_is_up_to_date (EBookBackendSummary *summary, time_t t);
gboolean e_book_backend_summary_is_summary_query (EBookBackendSummary *summary, const gchar *query);
-GPtrArray* e_book_backend_summary_search (EBookBackendSummary *summary, const gchar *query);
+GPtrArray * e_book_backend_summary_search (EBookBackendSummary *summary, const gchar *query);
gchar * e_book_backend_summary_get_summary_vcard (EBookBackendSummary *summary, const gchar *id);
G_END_DECLS
diff --git a/addressbook/libedata-book/e-book-backend-sync.c b/addressbook/libedata-book/e-book-backend-sync.c
index fcbd414..c4c42e2 100644
--- a/addressbook/libedata-book/e-book-backend-sync.c
+++ b/addressbook/libedata-book/e-book-backend-sync.c
@@ -46,10 +46,10 @@ e_book_backend_sync_construct (EBookBackendSync *backend)
**/
void
e_book_backend_sync_open (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- gboolean only_if_exists,
- GError **error)
+ EDataBook *book,
+ GCancellable *cancellable,
+ gboolean only_if_exists,
+ GError **error)
{
e_return_data_book_error_if_fail (E_IS_BOOK_BACKEND_SYNC (backend), E_DATA_BOOK_STATUS_INVALID_ARG);
e_return_data_book_error_if_fail (E_IS_DATA_BOOK (book), E_DATA_BOOK_STATUS_INVALID_ARG);
@@ -71,11 +71,11 @@ e_book_backend_sync_open (EBookBackendSync *backend,
**/
void
e_book_backend_sync_create_contact (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- const gchar *vcard,
- EContact **contact,
- GError **error)
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *vcard,
+ EContact **contact,
+ GError **error)
{
e_return_data_book_error_if_fail (E_IS_BOOK_BACKEND_SYNC (backend), E_DATA_BOOK_STATUS_INVALID_ARG);
e_return_data_book_error_if_fail (E_IS_DATA_BOOK (book), E_DATA_BOOK_STATUS_INVALID_ARG);
@@ -98,9 +98,9 @@ e_book_backend_sync_create_contact (EBookBackendSync *backend,
**/
void
e_book_backend_sync_remove (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- GError **error)
+ EDataBook *book,
+ GCancellable *cancellable,
+ GError **error)
{
e_return_data_book_error_if_fail (E_IS_BOOK_BACKEND_SYNC (backend), E_DATA_BOOK_STATUS_INVALID_ARG);
e_return_data_book_error_if_fail (E_IS_DATA_BOOK (book), E_DATA_BOOK_STATUS_INVALID_ARG);
@@ -121,7 +121,10 @@ e_book_backend_sync_remove (EBookBackendSync *backend,
* Since: 3.2
*/
void
-e_book_backend_sync_refresh (EBookBackendSync *backend, EDataBook *book, GCancellable *cancellable, GError **error)
+e_book_backend_sync_refresh (EBookBackendSync *backend,
+ EDataBook *book,
+ GCancellable *cancellable,
+ GError **error)
{
e_return_data_book_error_if_fail (E_IS_BOOK_BACKEND_SYNC (backend), E_DATA_BOOK_STATUS_INVALID_ARG);
e_return_data_book_error_if_fail (E_IS_DATA_BOOK (book), E_DATA_BOOK_STATUS_INVALID_ARG);
@@ -148,7 +151,12 @@ e_book_backend_sync_refresh (EBookBackendSync *backend, EDataBook *book, GCance
* Since: 3.2
**/
gboolean
-e_book_backend_sync_get_backend_property (EBookBackendSync *backend, EDataBook *book, GCancellable *cancellable, const gchar *prop_name, gchar **prop_value, GError **error)
+e_book_backend_sync_get_backend_property (EBookBackendSync *backend,
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ gchar **prop_value,
+ GError **error)
{
e_return_data_book_error_val_if_fail (E_IS_BOOK_BACKEND_SYNC (backend), E_DATA_BOOK_STATUS_INVALID_ARG);
e_return_data_book_error_val_if_fail (E_IS_DATA_BOOK (book), E_DATA_BOOK_STATUS_INVALID_ARG);
@@ -177,7 +185,12 @@ e_book_backend_sync_get_backend_property (EBookBackendSync *backend, EDataBook *
* Since: 3.2
**/
gboolean
-e_book_backend_sync_set_backend_property (EBookBackendSync *backend, EDataBook *book, GCancellable *cancellable, const gchar *prop_name, const gchar *prop_value, GError **error)
+e_book_backend_sync_set_backend_property (EBookBackendSync *backend,
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ const gchar *prop_value,
+ GError **error)
{
e_return_data_book_error_val_if_fail (E_IS_BOOK_BACKEND_SYNC (backend), E_DATA_BOOK_STATUS_INVALID_ARG);
e_return_data_book_error_val_if_fail (E_IS_DATA_BOOK (book), E_DATA_BOOK_STATUS_INVALID_ARG);
@@ -203,11 +216,11 @@ e_book_backend_sync_set_backend_property (EBookBackendSync *backend, EDataBook *
**/
void
e_book_backend_sync_remove_contacts (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- const GSList *id_list,
- GSList **removed_ids,
- GError **error)
+ EDataBook *book,
+ GCancellable *cancellable,
+ const GSList *id_list,
+ GSList **removed_ids,
+ GError **error)
{
e_return_data_book_error_if_fail (E_IS_BOOK_BACKEND_SYNC (backend), E_DATA_BOOK_STATUS_INVALID_ARG);
e_return_data_book_error_if_fail (E_IS_DATA_BOOK (book), E_DATA_BOOK_STATUS_INVALID_ARG);
@@ -232,11 +245,11 @@ e_book_backend_sync_remove_contacts (EBookBackendSync *backend,
**/
void
e_book_backend_sync_modify_contact (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- const gchar *vcard,
- EContact **contact,
- GError **error)
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *vcard,
+ EContact **contact,
+ GError **error)
{
e_return_data_book_error_if_fail (E_IS_BOOK_BACKEND_SYNC (backend), E_DATA_BOOK_STATUS_INVALID_ARG);
e_return_data_book_error_if_fail (E_IS_DATA_BOOK (book), E_DATA_BOOK_STATUS_INVALID_ARG);
@@ -259,11 +272,11 @@ e_book_backend_sync_modify_contact (EBookBackendSync *backend,
**/
void
e_book_backend_sync_get_contact (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- const gchar *id,
- gchar **vcard,
- GError **error)
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *id,
+ gchar **vcard,
+ GError **error)
{
e_return_data_book_error_if_fail (E_IS_BOOK_BACKEND_SYNC (backend), E_DATA_BOOK_STATUS_INVALID_ARG);
e_return_data_book_error_if_fail (E_IS_DATA_BOOK (book), E_DATA_BOOK_STATUS_INVALID_ARG);
@@ -288,11 +301,11 @@ e_book_backend_sync_get_contact (EBookBackendSync *backend,
**/
void
e_book_backend_sync_get_contact_list (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- const gchar *query,
- GSList **contacts,
- GError **error)
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *query,
+ GSList **contacts,
+ GError **error)
{
e_return_data_book_error_if_fail (E_IS_BOOK_BACKEND_SYNC (backend), E_DATA_BOOK_STATUS_INVALID_ARG);
e_return_data_book_error_if_fail (E_IS_DATA_BOOK (book), E_DATA_BOOK_STATUS_INVALID_ARG);
@@ -319,11 +332,11 @@ e_book_backend_sync_get_contact_list (EBookBackendSync *backend,
**/
void
e_book_backend_sync_get_contact_list_uids (EBookBackendSync *backend,
- EDataBook *book,
- GCancellable *cancellable,
- const gchar *query,
- GSList **contacts_uids,
- GError **error)
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *query,
+ GSList **contacts_uids,
+ GError **error)
{
e_return_data_book_error_if_fail (E_IS_BOOK_BACKEND_SYNC (backend), E_DATA_BOOK_STATUS_INVALID_ARG);
e_return_data_book_error_if_fail (E_IS_DATA_BOOK (book), E_DATA_BOOK_STATUS_INVALID_ARG);
@@ -380,9 +393,9 @@ e_book_backend_sync_get_contact_list_uids (EBookBackendSync *backend,
**/
void
e_book_backend_sync_authenticate_user (EBookBackendSync *backend,
- GCancellable *cancellable,
- ECredentials *credentials,
- GError **error)
+ GCancellable *cancellable,
+ ECredentials *credentials,
+ GError **error)
{
e_return_data_book_error_if_fail (E_IS_BOOK_BACKEND_SYNC (backend), E_DATA_BOOK_STATUS_INVALID_ARG);
e_return_data_book_error_if_fail (credentials, E_DATA_BOOK_STATUS_INVALID_ARG);
@@ -393,10 +406,10 @@ e_book_backend_sync_authenticate_user (EBookBackendSync *backend,
static void
book_backend_open (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- gboolean only_if_exists)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ gboolean only_if_exists)
{
GError *error = NULL;
@@ -407,9 +420,9 @@ book_backend_open (EBookBackend *backend,
static void
book_backend_remove (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable)
{
GError *error = NULL;
@@ -419,7 +432,10 @@ book_backend_remove (EBookBackend *backend,
}
static void
-book_backend_refresh (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable)
+book_backend_refresh (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable)
{
GError *error = NULL;
@@ -429,7 +445,11 @@ book_backend_refresh (EBookBackend *backend, EDataBook *book, guint32 opid, GCan
}
static void
-book_backend_get_backend_property (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *prop_name)
+book_backend_get_backend_property (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *prop_name)
{
GError *error = NULL;
gchar *prop_value = NULL;
@@ -443,7 +463,12 @@ book_backend_get_backend_property (EBookBackend *backend, EDataBook *book, guint
}
static void
-book_backend_set_backend_property (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *prop_name, const gchar *prop_value)
+book_backend_set_backend_property (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ const gchar *prop_value)
{
GError *error = NULL;
@@ -455,10 +480,10 @@ book_backend_set_backend_property (EBookBackend *backend, EDataBook *book, guint
static void
book_backend_create_contact (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- const gchar *vcard)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *vcard)
{
GError *error = NULL;
EContact *contact = NULL;
@@ -473,10 +498,10 @@ book_backend_create_contact (EBookBackend *backend,
static void
book_backend_remove_contacts (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- const GSList *id_list)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const GSList *id_list)
{
GError *error = NULL;
GSList *ids = NULL;
@@ -493,10 +518,10 @@ book_backend_remove_contacts (EBookBackend *backend,
static void
book_backend_modify_contact (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- const gchar *vcard)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *vcard)
{
GError *error = NULL;
EContact *contact = NULL;
@@ -511,10 +536,10 @@ book_backend_modify_contact (EBookBackend *backend,
static void
book_backend_get_contact (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- const gchar *id)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *id)
{
GError *error = NULL;
gchar *vcard = NULL;
@@ -529,10 +554,10 @@ book_backend_get_contact (EBookBackend *backend,
static void
book_backend_get_contact_list (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- const gchar *query)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *query)
{
GError *error = NULL;
GSList *cards = NULL;
@@ -547,10 +572,10 @@ book_backend_get_contact_list (EBookBackend *backend,
static void
book_backend_get_contact_list_uids (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- const gchar *query)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *query)
{
GError *error = NULL;
GSList *uids = NULL;
@@ -565,8 +590,8 @@ book_backend_get_contact_list_uids (EBookBackend *backend,
static void
book_backend_authenticate_user (EBookBackend *backend,
- GCancellable *cancellable,
- ECredentials *credentials)
+ GCancellable *cancellable,
+ ECredentials *credentials)
{
GError *error = NULL;
@@ -576,14 +601,24 @@ book_backend_authenticate_user (EBookBackend *backend,
}
static gboolean
-book_backend_sync_get_backend_property (EBookBackendSync *backend, EDataBook *book, GCancellable *cancellable, const gchar *prop_name, gchar **prop_value, GError **error)
+book_backend_sync_get_backend_property (EBookBackendSync *backend,
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ gchar **prop_value,
+ GError **error)
{
/* to indicate to pass to the EBookBackend parent class */
return FALSE;
}
static gboolean
-book_backend_sync_set_backend_property (EBookBackendSync *backend, EDataBook *book, GCancellable *cancellable, const gchar *prop_name, const gchar *prop_value, GError **error)
+book_backend_sync_set_backend_property (EBookBackendSync *backend,
+ EDataBook *book,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ const gchar *prop_value,
+ GError **error)
{
/* to indicate to pass to the EBookBackend parent class */
return FALSE;
diff --git a/addressbook/libedata-book/e-book-backend.c b/addressbook/libedata-book/e-book-backend.c
index 5913751..ef8f78a 100644
--- a/addressbook/libedata-book/e-book-backend.c
+++ b/addressbook/libedata-book/e-book-backend.c
@@ -71,7 +71,11 @@ book_backend_set_default_cache_dir (EBookBackend *backend)
}
static void
-book_backend_get_backend_property (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *prop_name)
+book_backend_get_backend_property (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *prop_name)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
@@ -94,7 +98,12 @@ book_backend_get_backend_property (EBookBackend *backend, EDataBook *book, guint
}
static void
-book_backend_set_backend_property (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *prop_name, const gchar *prop_value)
+book_backend_set_backend_property (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ const gchar *prop_value)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
@@ -178,7 +187,8 @@ book_backend_finalize (GObject *object)
}
static gboolean
-view_notify_update (EDataBookView *view, gpointer contact)
+view_notify_update (EDataBookView *view,
+ gpointer contact)
{
e_data_book_view_notify_update (view, contact);
@@ -186,7 +196,8 @@ view_notify_update (EDataBookView *view, gpointer contact)
}
static void
-book_backend_notify_update (EBookBackend *backend, const EContact *contact)
+book_backend_notify_update (EBookBackend *backend,
+ const EContact *contact)
{
e_book_backend_foreach_view (backend, view_notify_update, (gpointer) contact);
}
@@ -358,10 +369,10 @@ e_book_backend_get_source (EBookBackend *backend)
**/
void
e_book_backend_open (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- gboolean only_if_exists)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ gboolean only_if_exists)
{
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
g_return_if_fail (E_IS_DATA_BOOK (book));
@@ -412,9 +423,9 @@ e_book_backend_open (EBookBackend *backend,
**/
void
e_book_backend_remove (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable)
{
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
g_return_if_fail (E_IS_DATA_BOOK (book));
@@ -443,7 +454,10 @@ e_book_backend_remove (EBookBackend *backend,
* Since: 3.2
**/
void
-e_book_backend_refresh (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable)
+e_book_backend_refresh (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
@@ -472,10 +486,10 @@ e_book_backend_refresh (EBookBackend *backend, EDataBook *book, guint32 opid, GC
**/
void
e_book_backend_create_contact (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- const gchar *vcard)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *vcard)
{
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
g_return_if_fail (E_IS_DATA_BOOK (book));
@@ -504,10 +518,10 @@ e_book_backend_create_contact (EBookBackend *backend,
**/
void
e_book_backend_remove_contacts (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- const GSList *id_list)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const GSList *id_list)
{
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
g_return_if_fail (E_IS_DATA_BOOK (book));
@@ -536,10 +550,10 @@ e_book_backend_remove_contacts (EBookBackend *backend,
**/
void
e_book_backend_modify_contact (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- const gchar *vcard)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *vcard)
{
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
g_return_if_fail (E_IS_DATA_BOOK (book));
@@ -568,10 +582,10 @@ e_book_backend_modify_contact (EBookBackend *backend,
**/
void
e_book_backend_get_contact (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- const gchar *id)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *id)
{
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
g_return_if_fail (E_IS_DATA_BOOK (book));
@@ -600,10 +614,10 @@ e_book_backend_get_contact (EBookBackend *backend,
**/
void
e_book_backend_get_contact_list (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- const gchar *query)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *query)
{
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
g_return_if_fail (E_IS_DATA_BOOK (book));
@@ -634,10 +648,10 @@ e_book_backend_get_contact_list (EBookBackend *backend,
**/
void
e_book_backend_get_contact_list_uids (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable,
- const gchar *query)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *query)
{
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
g_return_if_fail (E_IS_DATA_BOOK (book));
@@ -661,8 +675,8 @@ e_book_backend_get_contact_list_uids (EBookBackend *backend,
* signals for matching contacts.
**/
void
-e_book_backend_start_book_view (EBookBackend *backend,
- EDataBookView *book_view)
+e_book_backend_start_book_view (EBookBackend *backend,
+ EDataBookView *book_view)
{
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
g_return_if_fail (E_IS_DATA_BOOK_VIEW (book_view));
@@ -680,8 +694,8 @@ e_book_backend_start_book_view (EBookBackend *backend,
* no more signals.
**/
void
-e_book_backend_stop_book_view (EBookBackend *backend,
- EDataBookView *book_view)
+e_book_backend_stop_book_view (EBookBackend *backend,
+ EDataBookView *book_view)
{
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
g_return_if_fail (E_IS_DATA_BOOK_VIEW (book_view));
@@ -708,8 +722,8 @@ e_book_backend_stop_book_view (EBookBackend *backend,
**/
void
e_book_backend_authenticate_user (EBookBackend *backend,
- GCancellable *cancellable,
- ECredentials *credentials)
+ GCancellable *cancellable,
+ ECredentials *credentials)
{
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
g_return_if_fail (credentials != NULL);
@@ -736,7 +750,7 @@ last_client_gone (EBookBackend *backend)
**/
void
e_book_backend_add_book_view (EBookBackend *backend,
- EDataBookView *view)
+ EDataBookView *view)
{
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
@@ -756,7 +770,7 @@ e_book_backend_add_book_view (EBookBackend *backend,
**/
void
e_book_backend_remove_book_view (EBookBackend *backend,
- EDataBookView *view)
+ EDataBookView *view)
{
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
@@ -777,8 +791,8 @@ e_book_backend_remove_book_view (EBookBackend *backend,
* Returns: TRUE on success, FALSE on failure to add the client.
*/
gboolean
-e_book_backend_add_client (EBookBackend *backend,
- EDataBook *book)
+e_book_backend_add_client (EBookBackend *backend,
+ EDataBook *book)
{
g_return_val_if_fail (E_IS_BOOK_BACKEND (backend), FALSE);
g_return_val_if_fail (E_IS_DATA_BOOK (book), FALSE);
@@ -799,14 +813,14 @@ e_book_backend_add_client (EBookBackend *backend,
**/
void
e_book_backend_remove_client (EBookBackend *backend,
- EDataBook *book)
+ EDataBook *book)
{
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
g_return_if_fail (E_IS_DATA_BOOK (book));
/* up our backend's refcount here so that last_client_gone
- doesn't end up unreffing us (while we're holding the
- lock) */
+ * doesn't end up unreffing us (while we're holding the
+ * lock) */
g_object_ref (backend);
/* Disconnect */
@@ -836,7 +850,10 @@ e_book_backend_remove_client (EBookBackend *backend,
* @callback returns %FALSE to stop further processing.
**/
void
-e_book_backend_foreach_view (EBookBackend *backend, gboolean (* callback) (EDataBookView *view, gpointer user_data), gpointer user_data)
+e_book_backend_foreach_view (EBookBackend *backend,
+ gboolean (*callback) (EDataBookView *view,
+ gpointer user_data),
+ gpointer user_data)
{
const GSList *views;
EDataBookView *view;
@@ -876,7 +893,11 @@ e_book_backend_foreach_view (EBookBackend *backend, gboolean (* callback) (EData
* Since: 3.2
**/
void
-e_book_backend_get_backend_property (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *prop_name)
+e_book_backend_get_backend_property (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *prop_name)
{
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
g_return_if_fail (E_BOOK_BACKEND_GET_CLASS (backend)->get_backend_property);
@@ -902,7 +923,12 @@ e_book_backend_get_backend_property (EBookBackend *backend, EDataBook *book, gui
* Since: 3.2
**/
void
-e_book_backend_set_backend_property (EBookBackend *backend, EDataBook *book, guint32 opid, GCancellable *cancellable, const gchar *prop_name, const gchar *prop_value)
+e_book_backend_set_backend_property (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ const gchar *prop_value)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
@@ -1010,7 +1036,8 @@ e_book_backend_is_removed (EBookBackend *backend)
* Meant to be used by backend implementations.
**/
void
-e_book_backend_set_is_removed (EBookBackend *backend, gboolean is_removed)
+e_book_backend_set_is_removed (EBookBackend *backend,
+ gboolean is_removed)
{
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
@@ -1025,7 +1052,8 @@ e_book_backend_set_is_removed (EBookBackend *backend, gboolean is_removed)
* Sets @backend's online/offline mode to @is_online.
**/
void
-e_book_backend_set_online (EBookBackend *backend, gboolean is_online)
+e_book_backend_set_online (EBookBackend *backend,
+ gboolean is_online)
{
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
g_return_if_fail (E_BOOK_BACKEND_GET_CLASS (backend)->set_online);
@@ -1069,13 +1097,15 @@ e_book_backend_sync (EBookBackend *backend)
* contacts are created or modified by another (non-PAS-using) client.
**/
void
-e_book_backend_notify_update (EBookBackend *backend, const EContact *contact)
+e_book_backend_notify_update (EBookBackend *backend,
+ const EContact *contact)
{
E_BOOK_BACKEND_GET_CLASS (backend)->notify_update (backend, contact);
}
static gboolean
-view_notify_remove (EDataBookView *view, gpointer id)
+view_notify_remove (EDataBookView *view,
+ gpointer id)
{
e_data_book_view_notify_remove (view, id);
@@ -1095,13 +1125,15 @@ view_notify_remove (EDataBookView *view, gpointer id)
* another (non-PAS-using) client.
**/
void
-e_book_backend_notify_remove (EBookBackend *backend, const gchar *id)
+e_book_backend_notify_remove (EBookBackend *backend,
+ const gchar *id)
{
e_book_backend_foreach_view (backend, view_notify_remove, (gpointer) id);
}
static gboolean
-view_notify_complete (EDataBookView *view, gpointer unused)
+view_notify_complete (EDataBookView *view,
+ gpointer unused)
{
e_data_book_view_notify_complete (view, NULL /* SUCCESS */);
@@ -1133,7 +1165,8 @@ e_book_backend_notify_complete (EBookBackend *backend)
* an issue.
**/
void
-e_book_backend_notify_error (EBookBackend *backend, const gchar *message)
+e_book_backend_notify_error (EBookBackend *backend,
+ const gchar *message)
{
EBookBackendPrivate *priv;
GSList *clients;
@@ -1156,7 +1189,8 @@ e_book_backend_notify_error (EBookBackend *backend, const gchar *message)
* Notifies all backend's clients about the current readonly state.
**/
void
-e_book_backend_notify_readonly (EBookBackend *backend, gboolean is_readonly)
+e_book_backend_notify_readonly (EBookBackend *backend,
+ gboolean is_readonly)
{
EBookBackendPrivate *priv;
GSList *clients;
@@ -1181,7 +1215,8 @@ e_book_backend_notify_readonly (EBookBackend *backend, gboolean is_readonly)
* Meant to be used by backend implementations.
**/
void
-e_book_backend_notify_online (EBookBackend *backend, gboolean is_online)
+e_book_backend_notify_online (EBookBackend *backend,
+ gboolean is_online)
{
EBookBackendPrivate *priv;
GSList *clients;
@@ -1219,7 +1254,9 @@ e_book_backend_notify_online (EBookBackend *backend, gboolean is_online)
* Meant to be used by backend implementations.
**/
void
-e_book_backend_notify_auth_required (EBookBackend *backend, gboolean is_self, const ECredentials *credentials)
+e_book_backend_notify_auth_required (EBookBackend *backend,
+ gboolean is_self,
+ const ECredentials *credentials)
{
EBookBackendPrivate *priv;
GSList *clients;
@@ -1256,7 +1293,8 @@ e_book_backend_notify_auth_required (EBookBackend *backend, gboolean is_self, co
* Meant to be used by backend implementations.
**/
void
-e_book_backend_notify_opened (EBookBackend *backend, GError *error)
+e_book_backend_notify_opened (EBookBackend *backend,
+ GError *error)
{
EBookBackendPrivate *priv;
GSList *clients;
@@ -1285,7 +1323,9 @@ e_book_backend_notify_opened (EBookBackend *backend, GError *error)
* Notifies clients about property value change.
**/
void
-e_book_backend_notify_property_changed (EBookBackend *backend, const gchar *prop_name, const gchar *prop_value)
+e_book_backend_notify_property_changed (EBookBackend *backend,
+ const gchar *prop_name,
+ const gchar *prop_value)
{
EBookBackendPrivate *priv;
GSList *clients;
@@ -1321,7 +1361,10 @@ e_book_backend_notify_property_changed (EBookBackend *backend, const gchar *prop
* See e_book_backend_open() for more details how the opening phase works.
**/
void
-e_book_backend_respond_opened (EBookBackend *backend, EDataBook *book, guint32 opid, GError *error)
+e_book_backend_respond_opened (EBookBackend *backend,
+ EDataBook *book,
+ guint32 opid,
+ GError *error)
{
GError *copy = NULL;
diff --git a/addressbook/libedata-book/e-data-book-factory.c b/addressbook/libedata-book/e-data-book-factory.c
index f53ddf8..be904c5 100644
--- a/addressbook/libedata-book/e-data-book-factory.c
+++ b/addressbook/libedata-book/e-data-book-factory.c
@@ -230,7 +230,7 @@ e_data_book_factory_extract_proto_from_uri (const gchar *uri)
return proto;
}
-static EBookBackendFactory*
+static EBookBackendFactory *
e_data_book_factory_lookup_backend_factory (EDataBookFactory *factory,
const gchar *uri)
{
@@ -266,7 +266,9 @@ construct_book_factory_path (void)
}
static gboolean
-remove_dead_pointer_cb (gpointer path, gpointer live, gpointer dead)
+remove_dead_pointer_cb (gpointer path,
+ gpointer live,
+ gpointer dead)
{
return live == dead;
}
@@ -498,7 +500,8 @@ impl_BookFactory_get_book (EGdbusBookFactory *object,
}
static void
-remove_data_book_cb (gpointer data_bk, gpointer user_data)
+remove_data_book_cb (gpointer data_bk,
+ gpointer user_data)
{
EDataBook *data_book;
EBookBackend *backend;
@@ -668,7 +671,8 @@ e_data_book_factory_register_gdbus_object (EDataBookFactory *factory,
/* Convenience function to print an error and exit */
G_GNUC_NORETURN static void
-die (const gchar *prefix, GError *error)
+die (const gchar *prefix,
+ GError *error)
{
g_error ("%s: %s", prefix, error->message);
g_error_free (error);
@@ -771,7 +775,8 @@ static GOptionEntry entries[] = {
};
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EOfflineListener *eol;
GOptionContext *context;
@@ -796,7 +801,7 @@ main (gint argc, gchar **argv)
p_SetProcessDEPPolicy = GetProcAddress (GetModuleHandle ("kernel32.dll"), "SetProcessDEPPolicy");
if (p_SetProcessDEPPolicy)
- (*p_SetProcessDEPPolicy) (PROCESS_DEP_ENABLE|PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION);
+ (*p_SetProcessDEPPolicy) (PROCESS_DEP_ENABLE | PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION);
}
#endif
#endif
diff --git a/addressbook/libedata-book/e-data-book-view.c b/addressbook/libedata-book/e-data-book-view.c
index 3d50d06..1aa51f8 100644
--- a/addressbook/libedata-book/e-data-book-view.c
+++ b/addressbook/libedata-book/e-data-book-view.c
@@ -96,7 +96,8 @@ str_ic_hash (gconstpointer key)
}
static gboolean
-str_ic_equal (gconstpointer a, gconstpointer b)
+str_ic_equal (gconstpointer a,
+ gconstpointer b)
{
const gchar *stra = a, *strb = b;
gint ii;
@@ -121,7 +122,10 @@ str_ic_equal (gconstpointer a, gconstpointer b)
* Since: 2.32
**/
guint
-e_data_book_view_register_gdbus_object (EDataBookView *query, GDBusConnection *connection, const gchar *object_path, GError **error)
+e_data_book_view_register_gdbus_object (EDataBookView *query,
+ GDBusConnection *connection,
+ const gchar *object_path,
+ GError **error)
{
g_return_val_if_fail (query != NULL, 0);
g_return_val_if_fail (E_IS_DATA_BOOK_VIEW (query), 0);
@@ -132,13 +136,14 @@ e_data_book_view_register_gdbus_object (EDataBookView *query, GDBusConnection *c
}
static void
-book_destroyed_cb (gpointer data, GObject *dead)
+book_destroyed_cb (gpointer data,
+ GObject *dead)
{
EDataBookView *view = E_DATA_BOOK_VIEW (data);
EDataBookViewPrivate *priv = view->priv;
/* The book has just died, so unset the pointer so we don't try and remove a
- dead weak reference. */
+ * dead weak reference. */
view->priv->book = NULL;
/* If the view is running stop it here. */
@@ -218,7 +223,8 @@ ensure_pending_flush_timeout (EDataBookView *view)
* Queue @vcard to be sent as a change notification.
*/
static void
-notify_change (EDataBookView *view, const gchar *vcard)
+notify_change (EDataBookView *view,
+ const gchar *vcard)
{
EDataBookViewPrivate *priv = view->priv;
gchar *utf8_vcard;
@@ -240,7 +246,8 @@ notify_change (EDataBookView *view, const gchar *vcard)
* Queue @id to be sent as a change notification.
*/
static void
-notify_remove (EDataBookView *view, const gchar *id)
+notify_remove (EDataBookView *view,
+ const gchar *id)
{
EDataBookViewPrivate *priv = view->priv;
gchar *valid_id;
@@ -263,7 +270,9 @@ notify_remove (EDataBookView *view, const gchar *id)
* Queue @id and @vcard to be sent as a change notification.
*/
static void
-notify_add (EDataBookView *view, const gchar *id, const gchar *vcard)
+notify_add (EDataBookView *view,
+ const gchar *id,
+ const gchar *vcard)
{
EDataBookViewPrivate *priv = view->priv;
gchar *utf8_vcard;
@@ -284,7 +293,10 @@ notify_add (EDataBookView *view, const gchar *id, const gchar *vcard)
}
static gboolean
-impl_DataBookView_set_fields_of_interest (EGdbusBookView *object, GDBusMethodInvocation *invocation, const gchar * const *in_fields_of_interest, EDataBookView *view)
+impl_DataBookView_set_fields_of_interest (EGdbusBookView *object,
+ GDBusMethodInvocation *invocation,
+ const gchar * const *in_fields_of_interest,
+ EDataBookView *view)
{
EDataBookViewPrivate *priv;
gint ii;
@@ -331,7 +343,8 @@ reset_array (GArray *array)
}
static gboolean
-id_is_in_view (EDataBookView *book_view, const gchar *id)
+id_is_in_view (EDataBookView *book_view,
+ const gchar *id)
{
gchar *valid_id;
gboolean res;
@@ -358,7 +371,8 @@ id_is_in_view (EDataBookView *book_view, const gchar *id)
* by @book_view.
**/
void
-e_data_book_view_notify_update (EDataBookView *book_view, const EContact *contact)
+e_data_book_view_notify_update (EDataBookView *book_view,
+ const EContact *contact)
{
EDataBookViewPrivate *priv = book_view->priv;
gboolean currently_in_view, want_in_view;
@@ -409,7 +423,8 @@ e_data_book_view_notify_update (EDataBookView *book_view, const EContact *contac
* representation of a contact is a vCard.
**/
void
-e_data_book_view_notify_update_vcard (EDataBookView *book_view, gchar *vcard)
+e_data_book_view_notify_update_vcard (EDataBookView *book_view,
+ gchar *vcard)
{
EDataBookViewPrivate *priv = book_view->priv;
gboolean currently_in_view, want_in_view;
@@ -467,7 +482,9 @@ e_data_book_view_notify_update_vcard (EDataBookView *book_view, gchar *vcard)
* known to exist in the view.
**/
void
-e_data_book_view_notify_update_prefiltered_vcard (EDataBookView *book_view, const gchar *id, gchar *vcard)
+e_data_book_view_notify_update_prefiltered_vcard (EDataBookView *book_view,
+ const gchar *id,
+ gchar *vcard)
{
EDataBookViewPrivate *priv = book_view->priv;
gboolean currently_in_view;
@@ -500,7 +517,8 @@ e_data_book_view_notify_update_prefiltered_vcard (EDataBookView *book_view, cons
* was removed from @book_view.
**/
void
-e_data_book_view_notify_remove (EDataBookView *book_view, const gchar *id)
+e_data_book_view_notify_remove (EDataBookView *book_view,
+ const gchar *id)
{
EDataBookViewPrivate *priv = book_view->priv;
@@ -525,7 +543,8 @@ e_data_book_view_notify_remove (EDataBookView *book_view, const gchar *id)
* in sync with the backend's.
**/
void
-e_data_book_view_notify_complete (EDataBookView *book_view, const GError *error)
+e_data_book_view_notify_complete (EDataBookView *book_view,
+ const GError *error)
{
EDataBookViewPrivate *priv = book_view->priv;
gchar **strv_error;
@@ -557,7 +576,9 @@ e_data_book_view_notify_complete (EDataBookView *book_view, const GError *error)
* reporting.
**/
void
-e_data_book_view_notify_progress (EDataBookView *book_view, guint percent, const gchar *message)
+e_data_book_view_notify_progress (EDataBookView *book_view,
+ guint percent,
+ const gchar *message)
{
EDataBookViewPrivate *priv = book_view->priv;
gchar *gdbus_message = NULL;
@@ -580,7 +601,9 @@ e_data_book_view_notify_progress (EDataBookView *book_view, guint percent, const
* and place it on DBus at the object path #path.
*/
EDataBookView *
-e_data_book_view_new (EDataBook *book, const gchar *card_query, EBookBackendSExp *card_sexp)
+e_data_book_view_new (EDataBook *book,
+ const gchar *card_query,
+ EBookBackendSExp *card_sexp)
{
EDataBookView *view;
EDataBookViewPrivate *priv;
@@ -612,7 +635,9 @@ bookview_idle_start (gpointer data)
}
static gboolean
-impl_DataBookView_start (EGdbusBookView *object, GDBusMethodInvocation *invocation, EDataBookView *book_view)
+impl_DataBookView_start (EGdbusBookView *object,
+ GDBusMethodInvocation *invocation,
+ EDataBookView *book_view)
{
book_view->priv->idle_id = g_idle_add (bookview_idle_start, book_view);
@@ -635,7 +660,9 @@ bookview_idle_stop (gpointer data)
}
static gboolean
-impl_DataBookView_stop (EGdbusBookView *object, GDBusMethodInvocation *invocation, EDataBookView *book_view)
+impl_DataBookView_stop (EGdbusBookView *object,
+ GDBusMethodInvocation *invocation,
+ EDataBookView *book_view)
{
if (book_view->priv->idle_id)
g_source_remove (book_view->priv->idle_id);
@@ -648,7 +675,9 @@ impl_DataBookView_stop (EGdbusBookView *object, GDBusMethodInvocation *invocatio
}
static gboolean
-impl_DataBookView_dispose (EGdbusBookView *object, GDBusMethodInvocation *invocation, EDataBookView *book_view)
+impl_DataBookView_dispose (EGdbusBookView *object,
+ GDBusMethodInvocation *invocation,
+ EDataBookView *book_view)
{
e_gdbus_book_view_complete_dispose (object, invocation, NULL);
@@ -777,7 +806,7 @@ e_data_book_view_get_card_query (EDataBookView *book_view)
*
* Returns: The #EBookBackendSExp used.
**/
-EBookBackendSExp*
+EBookBackendSExp *
e_data_book_view_get_card_sexp (EDataBookView *book_view)
{
g_return_val_if_fail (E_IS_DATA_BOOK_VIEW (book_view), NULL);
@@ -793,7 +822,7 @@ e_data_book_view_get_card_sexp (EDataBookView *book_view)
*
* Returns: The associated #EBookBackend.
**/
-EBookBackend*
+EBookBackend *
e_data_book_view_get_backend (EDataBookView *book_view)
{
g_return_val_if_fail (E_IS_DATA_BOOK_VIEW (book_view), NULL);
diff --git a/addressbook/libedata-book/e-data-book.c b/addressbook/libedata-book/e-data-book.c
index 5c44a06..dc8b1bf 100644
--- a/addressbook/libedata-book/e-data-book.c
+++ b/addressbook/libedata-book/e-data-book.c
@@ -123,7 +123,9 @@ construct_bookview_path (void)
}
static void
-cancel_ops_cb (gpointer opid, gpointer cancellable, gpointer user_data)
+cancel_ops_cb (gpointer opid,
+ gpointer cancellable,
+ gpointer user_data)
{
g_return_if_fail (cancellable != NULL);
@@ -131,7 +133,8 @@ cancel_ops_cb (gpointer opid, gpointer cancellable, gpointer user_data)
}
static void
-operation_thread (gpointer data, gpointer user_data)
+operation_thread (gpointer data,
+ gpointer user_data)
{
OperationData *op = data;
EBookBackend *backend;
@@ -254,7 +257,8 @@ operation_thread (gpointer data, gpointer user_data)
}
static OperationData *
-op_new (OperationID op, EDataBook *book)
+op_new (OperationID op,
+ EDataBook *book)
{
OperationData *data;
@@ -272,7 +276,8 @@ op_new (OperationID op, EDataBook *book)
}
static void
-op_complete (EDataBook *book, guint32 opid)
+op_complete (EDataBook *book,
+ guint32 opid)
{
g_return_if_fail (book != NULL);
@@ -381,7 +386,8 @@ e_data_book_error_quark (void)
* Since: 2.32
**/
GError *
-e_data_book_create_error (EDataBookStatus status, const gchar *custom_msg)
+e_data_book_create_error (EDataBookStatus status,
+ const gchar *custom_msg)
{
if (status == E_DATA_BOOK_STATUS_SUCCESS)
return NULL;
@@ -395,7 +401,9 @@ e_data_book_create_error (EDataBookStatus status, const gchar *custom_msg)
* Since: 2.32
**/
GError *
-e_data_book_create_error_fmt (EDataBookStatus status, const gchar *custom_msg_fmt, ...)
+e_data_book_create_error_fmt (EDataBookStatus status,
+ const gchar *custom_msg_fmt,
+ ...)
{
GError *error;
gchar *custom_msg;
@@ -415,7 +423,7 @@ e_data_book_create_error_fmt (EDataBookStatus status, const gchar *custom_msg_fm
return error;
}
-ESource*
+ESource *
e_data_book_get_source (EDataBook *book)
{
g_return_val_if_fail (book != NULL, NULL);
@@ -424,7 +432,7 @@ e_data_book_get_source (EDataBook *book)
return book->priv->source;
}
-EBookBackend*
+EBookBackend *
e_data_book_get_backend (EDataBook *book)
{
g_return_val_if_fail (book != NULL, NULL);
@@ -434,7 +442,9 @@ e_data_book_get_backend (EDataBook *book)
}
static void
-data_book_return_error (GDBusMethodInvocation *invocation, const GError *perror, const gchar *error_prefix)
+data_book_return_error (GDBusMethodInvocation *invocation,
+ const GError *perror,
+ const gchar *error_prefix)
{
GError *error;
@@ -451,7 +461,7 @@ data_book_return_error (GDBusMethodInvocation *invocation, const GError *perror,
}
/* takes a list of strings and converts it to a comma-separated string of values;
- free returned pointer with g_free () */
+ * free returned pointer with g_free () */
gchar *
e_data_book_string_slist_to_comma_string (const GSList *strings)
{
@@ -484,7 +494,10 @@ e_data_book_string_slist_to_comma_string (const GSList *strings)
}
static gboolean
-impl_Book_open (EGdbusBook *object, GDBusMethodInvocation *invocation, gboolean only_if_exists, EDataBook *book)
+impl_Book_open (EGdbusBook *object,
+ GDBusMethodInvocation *invocation,
+ gboolean only_if_exists,
+ EDataBook *book)
{
OperationData *op;
@@ -498,7 +511,9 @@ impl_Book_open (EGdbusBook *object, GDBusMethodInvocation *invocation, gboolean
}
static gboolean
-impl_Book_remove (EGdbusBook *object, GDBusMethodInvocation *invocation, EDataBook *book)
+impl_Book_remove (EGdbusBook *object,
+ GDBusMethodInvocation *invocation,
+ EDataBook *book)
{
OperationData *op;
@@ -511,7 +526,9 @@ impl_Book_remove (EGdbusBook *object, GDBusMethodInvocation *invocation, EDataBo
}
static gboolean
-impl_Book_refresh (EGdbusBook *object, GDBusMethodInvocation *invocation, EDataBook *book)
+impl_Book_refresh (EGdbusBook *object,
+ GDBusMethodInvocation *invocation,
+ EDataBook *book)
{
OperationData *op;
@@ -524,7 +541,10 @@ impl_Book_refresh (EGdbusBook *object, GDBusMethodInvocation *invocation, EDataB
}
static gboolean
-impl_Book_get_contact (EGdbusBook *object, GDBusMethodInvocation *invocation, const gchar *in_uid, EDataBook *book)
+impl_Book_get_contact (EGdbusBook *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *in_uid,
+ EDataBook *book)
{
OperationData *op;
@@ -548,7 +568,10 @@ impl_Book_get_contact (EGdbusBook *object, GDBusMethodInvocation *invocation, co
}
static gboolean
-impl_Book_get_contact_list (EGdbusBook *object, GDBusMethodInvocation *invocation, const gchar *in_query, EDataBook *book)
+impl_Book_get_contact_list (EGdbusBook *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *in_query,
+ EDataBook *book)
{
OperationData *op;
@@ -570,7 +593,10 @@ impl_Book_get_contact_list (EGdbusBook *object, GDBusMethodInvocation *invocatio
}
static gboolean
-impl_Book_get_contact_list_uids (EGdbusBook *object, GDBusMethodInvocation *invocation, const gchar *in_query, EDataBook *book)
+impl_Book_get_contact_list_uids (EGdbusBook *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *in_query,
+ EDataBook *book)
{
OperationData *op;
@@ -592,7 +618,10 @@ impl_Book_get_contact_list_uids (EGdbusBook *object, GDBusMethodInvocation *invo
}
static gboolean
-impl_Book_add_contact (EGdbusBook *object, GDBusMethodInvocation *invocation, const gchar *in_vcard, EDataBook *book)
+impl_Book_add_contact (EGdbusBook *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *in_vcard,
+ EDataBook *book)
{
OperationData *op;
@@ -614,7 +643,10 @@ impl_Book_add_contact (EGdbusBook *object, GDBusMethodInvocation *invocation, co
}
static gboolean
-impl_Book_modify_contact (EGdbusBook *object, GDBusMethodInvocation *invocation, const gchar *in_vcard, EDataBook *book)
+impl_Book_modify_contact (EGdbusBook *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *in_vcard,
+ EDataBook *book)
{
OperationData *op;
@@ -636,7 +668,10 @@ impl_Book_modify_contact (EGdbusBook *object, GDBusMethodInvocation *invocation,
}
static gboolean
-impl_Book_remove_contacts (EGdbusBook *object, GDBusMethodInvocation *invocation, const gchar * const *in_uids, EDataBook *book)
+impl_Book_remove_contacts (EGdbusBook *object,
+ GDBusMethodInvocation *invocation,
+ const gchar * const *in_uids,
+ EDataBook *book)
{
OperationData *op;
@@ -654,7 +689,10 @@ impl_Book_remove_contacts (EGdbusBook *object, GDBusMethodInvocation *invocation
}
static gboolean
-impl_Book_get_backend_property (EGdbusBook *object, GDBusMethodInvocation *invocation, const gchar *in_prop_name, EDataBook *book)
+impl_Book_get_backend_property (EGdbusBook *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *in_prop_name,
+ EDataBook *book)
{
OperationData *op;
@@ -668,7 +706,10 @@ impl_Book_get_backend_property (EGdbusBook *object, GDBusMethodInvocation *invoc
}
static gboolean
-impl_Book_set_backend_property (EGdbusBook *object, GDBusMethodInvocation *invocation, const gchar * const *in_prop_name_value, EDataBook *book)
+impl_Book_set_backend_property (EGdbusBook *object,
+ GDBusMethodInvocation *invocation,
+ const gchar * const *in_prop_name_value,
+ EDataBook *book)
{
OperationData *op;
@@ -682,7 +723,10 @@ impl_Book_set_backend_property (EGdbusBook *object, GDBusMethodInvocation *invoc
}
static gboolean
-impl_Book_get_view (EGdbusBook *object, GDBusMethodInvocation *invocation, const gchar *in_query, EDataBook *book)
+impl_Book_get_view (EGdbusBook *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *in_query,
+ EDataBook *book)
{
OperationData *op;
@@ -707,7 +751,10 @@ impl_Book_get_view (EGdbusBook *object, GDBusMethodInvocation *invocation, const
}
static gboolean
-impl_Book_authenticate_user (EGdbusBook *object, GDBusMethodInvocation *invocation, const gchar * const *in_credentials, EDataBook *book)
+impl_Book_authenticate_user (EGdbusBook *object,
+ GDBusMethodInvocation *invocation,
+ const gchar * const *in_credentials,
+ EDataBook *book)
{
OperationData *op;
@@ -729,7 +776,10 @@ impl_Book_authenticate_user (EGdbusBook *object, GDBusMethodInvocation *invocati
}
static gboolean
-impl_Book_cancel_operation (EGdbusBook *object, GDBusMethodInvocation *invocation, guint in_opid, EDataBook *book)
+impl_Book_cancel_operation (EGdbusBook *object,
+ GDBusMethodInvocation *invocation,
+ guint in_opid,
+ EDataBook *book)
{
OperationData *op;
@@ -743,7 +793,9 @@ impl_Book_cancel_operation (EGdbusBook *object, GDBusMethodInvocation *invocatio
}
static gboolean
-impl_Book_cancel_all (EGdbusBook *object, GDBusMethodInvocation *invocation, EDataBook *book)
+impl_Book_cancel_all (EGdbusBook *object,
+ GDBusMethodInvocation *invocation,
+ EDataBook *book)
{
OperationData *op;
@@ -756,7 +808,9 @@ impl_Book_cancel_all (EGdbusBook *object, GDBusMethodInvocation *invocation, EDa
}
static gboolean
-impl_Book_close (EGdbusBook *object, GDBusMethodInvocation *invocation, EDataBook *book)
+impl_Book_close (EGdbusBook *object,
+ GDBusMethodInvocation *invocation,
+ EDataBook *book)
{
OperationData *op;
@@ -771,7 +825,9 @@ impl_Book_close (EGdbusBook *object, GDBusMethodInvocation *invocation, EDataBoo
}
void
-e_data_book_respond_open (EDataBook *book, guint opid, GError *error)
+e_data_book_respond_open (EDataBook *book,
+ guint opid,
+ GError *error)
{
op_complete (book, opid);
@@ -785,7 +841,9 @@ e_data_book_respond_open (EDataBook *book, guint opid, GError *error)
}
void
-e_data_book_respond_remove (EDataBook *book, guint opid, GError *error)
+e_data_book_respond_remove (EDataBook *book,
+ guint opid,
+ GError *error)
{
op_complete (book, opid);
@@ -810,7 +868,9 @@ e_data_book_respond_remove (EDataBook *book, guint opid, GError *error)
* Since: 3.2
*/
void
-e_data_book_respond_refresh (EDataBook *book, guint32 opid, GError *error)
+e_data_book_respond_refresh (EDataBook *book,
+ guint32 opid,
+ GError *error)
{
op_complete (book, opid);
@@ -824,7 +884,10 @@ e_data_book_respond_refresh (EDataBook *book, guint32 opid, GError *error)
}
void
-e_data_book_respond_get_backend_property (EDataBook *book, guint32 opid, GError *error, const gchar *prop_value)
+e_data_book_respond_get_backend_property (EDataBook *book,
+ guint32 opid,
+ GError *error,
+ const gchar *prop_value)
{
gchar *gdbus_prop_value = NULL;
@@ -842,7 +905,9 @@ e_data_book_respond_get_backend_property (EDataBook *book, guint32 opid, GError
}
void
-e_data_book_respond_set_backend_property (EDataBook *book, guint32 opid, GError *error)
+e_data_book_respond_set_backend_property (EDataBook *book,
+ guint32 opid,
+ GError *error)
{
op_complete (book, opid);
@@ -856,7 +921,10 @@ e_data_book_respond_set_backend_property (EDataBook *book, guint32 opid, GError
}
void
-e_data_book_respond_get_contact (EDataBook *book, guint32 opid, GError *error, const gchar *vcard)
+e_data_book_respond_get_contact (EDataBook *book,
+ guint32 opid,
+ GError *error,
+ const gchar *vcard)
{
gchar *gdbus_vcard = NULL;
@@ -874,7 +942,10 @@ e_data_book_respond_get_contact (EDataBook *book, guint32 opid, GError *error, c
}
void
-e_data_book_respond_get_contact_list (EDataBook *book, guint32 opid, GError *error, const GSList *cards)
+e_data_book_respond_get_contact_list (EDataBook *book,
+ guint32 opid,
+ GError *error,
+ const GSList *cards)
{
if (error) {
/* Translators: This is prefix to a detailed error message */
@@ -898,7 +969,10 @@ e_data_book_respond_get_contact_list (EDataBook *book, guint32 opid, GError *err
}
void
-e_data_book_respond_get_contact_list_uids (EDataBook *book, guint32 opid, GError *error, const GSList *uids)
+e_data_book_respond_get_contact_list_uids (EDataBook *book,
+ guint32 opid,
+ GError *error,
+ const GSList *uids)
{
if (error) {
/* Translators: This is prefix to a detailed error message */
@@ -922,7 +996,10 @@ e_data_book_respond_get_contact_list_uids (EDataBook *book, guint32 opid, GError
}
void
-e_data_book_respond_create (EDataBook *book, guint32 opid, GError *error, const EContact *contact)
+e_data_book_respond_create (EDataBook *book,
+ guint32 opid,
+ GError *error,
+ const EContact *contact)
{
gchar *gdbus_uid = NULL;
@@ -943,7 +1020,10 @@ e_data_book_respond_create (EDataBook *book, guint32 opid, GError *error, const
}
void
-e_data_book_respond_modify (EDataBook *book, guint32 opid, GError *error, const EContact *contact)
+e_data_book_respond_modify (EDataBook *book,
+ guint32 opid,
+ GError *error,
+ const EContact *contact)
{
op_complete (book, opid);
@@ -961,7 +1041,10 @@ e_data_book_respond_modify (EDataBook *book, guint32 opid, GError *error, const
}
void
-e_data_book_respond_remove_contacts (EDataBook *book, guint32 opid, GError *error, const GSList *ids)
+e_data_book_respond_remove_contacts (EDataBook *book,
+ guint32 opid,
+ GError *error,
+ const GSList *ids)
{
op_complete (book, opid);
@@ -984,7 +1067,8 @@ e_data_book_respond_remove_contacts (EDataBook *book, guint32 opid, GError *erro
}
void
-e_data_book_report_error (EDataBook *book, const gchar *message)
+e_data_book_report_error (EDataBook *book,
+ const gchar *message)
{
g_return_if_fail (book != NULL);
g_return_if_fail (message != NULL);
@@ -993,7 +1077,8 @@ e_data_book_report_error (EDataBook *book, const gchar *message)
}
void
-e_data_book_report_readonly (EDataBook *book, gboolean readonly)
+e_data_book_report_readonly (EDataBook *book,
+ gboolean readonly)
{
g_return_if_fail (book != NULL);
@@ -1001,7 +1086,8 @@ e_data_book_report_readonly (EDataBook *book, gboolean readonly)
}
void
-e_data_book_report_online (EDataBook *book, gboolean is_online)
+e_data_book_report_online (EDataBook *book,
+ gboolean is_online)
{
g_return_if_fail (book != NULL);
@@ -1009,10 +1095,11 @@ e_data_book_report_online (EDataBook *book, gboolean is_online)
}
/* credentilas contains extra information for a source for which authentication is requested.
- This parameter can be NULL to indicate "for this book".
+ * This parameter can be NULL to indicate "for this book".
*/
void
-e_data_book_report_auth_required (EDataBook *book, const ECredentials *credentials)
+e_data_book_report_auth_required (EDataBook *book,
+ const ECredentials *credentials)
{
gchar *empty_strv[2];
gchar **strv = NULL;
@@ -1031,12 +1118,13 @@ e_data_book_report_auth_required (EDataBook *book, const ECredentials *credentia
}
/* Reports to associated client that opening phase of the book is finished.
- error being NULL means successfully, otherwise reports an error which happened
- during opening phase. By opening phase is meant a process including successfull
- authentication to the server/storage.
-*/
+ * error being NULL means successfully, otherwise reports an error which happened
+ * during opening phase. By opening phase is meant a process including successfull
+ * authentication to the server/storage.
+ */
void
-e_data_book_report_opened (EDataBook *book, const GError *error)
+e_data_book_report_opened (EDataBook *book,
+ const GError *error)
{
gchar **strv_error;
@@ -1049,7 +1137,9 @@ e_data_book_report_opened (EDataBook *book, const GError *error)
/* Notifies client about certain property value change */
void
-e_data_book_report_backend_property_changed (EDataBook *book, const gchar *prop_name, const gchar *prop_value)
+e_data_book_report_backend_property_changed (EDataBook *book,
+ const gchar *prop_name,
+ const gchar *prop_value)
{
gchar **strv;
@@ -1074,7 +1164,10 @@ e_data_book_report_backend_property_changed (EDataBook *book, const gchar *prop_
* Since: 2.32
**/
guint
-e_data_book_register_gdbus_object (EDataBook *book, GDBusConnection *connection, const gchar *object_path, GError **error)
+e_data_book_register_gdbus_object (EDataBook *book,
+ GDBusConnection *connection,
+ const gchar *object_path,
+ GError **error)
{
g_return_val_if_fail (book != NULL, 0);
g_return_val_if_fail (E_IS_DATA_BOOK (book), 0);
@@ -1169,7 +1262,8 @@ e_data_book_class_init (EDataBookClass *klass)
}
EDataBook *
-e_data_book_new (EBookBackend *backend, ESource *source)
+e_data_book_new (EBookBackend *backend,
+ ESource *source)
{
EDataBook *book;
diff --git a/addressbook/libegdbus/e-gdbus-book-factory.c b/addressbook/libegdbus/e-gdbus-book-factory.c
index 52907aa..c421c19 100644
--- a/addressbook/libegdbus/e-gdbus-book-factory.c
+++ b/addressbook/libegdbus/e-gdbus-book-factory.c
@@ -73,25 +73,39 @@ e_gdbus_book_factory_default_init (EGdbusBookFactoryIface *iface)
}
void
-e_gdbus_book_factory_call_get_book (GDBusProxy *proxy, const gchar *in_source, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_factory_call_get_book (GDBusProxy *proxy,
+ const gchar *in_source,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_method_call_string ("get_book", proxy, in_source, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_factory_call_get_book_finish (GDBusProxy *proxy, GAsyncResult *result, gchar **out_path, GError **error)
+e_gdbus_book_factory_call_get_book_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar **out_path,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_string (proxy, result, out_path, error);
}
gboolean
-e_gdbus_book_factory_call_get_book_sync (GDBusProxy *proxy, const gchar *in_source, gchar **out_path, GCancellable *cancellable, GError **error)
+e_gdbus_book_factory_call_get_book_sync (GDBusProxy *proxy,
+ const gchar *in_source,
+ gchar **out_path,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_method_call_sync_string__string ("get_book", proxy, in_source, out_path, cancellable, error);
}
void
-e_gdbus_book_factory_complete_get_book (EGdbusBookFactory *object, GDBusMethodInvocation *invocation, const gchar *out_path, const GError *error)
+e_gdbus_book_factory_complete_get_book (EGdbusBookFactory *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *out_path,
+ const GError *error)
{
e_gdbus_complete_sync_method_string (object, invocation, out_path, error);
}
@@ -114,14 +128,14 @@ static const GDBusInterfaceInfo _e_gdbus_book_factory_interface_info =
};
static void
-handle_method_call (GDBusConnection *connection,
- const gchar *sender,
- const gchar *object_path,
- const gchar *interface_name,
- const gchar *method_name,
- GVariant *parameters,
+handle_method_call (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *method_name,
+ GVariant *parameters,
GDBusMethodInvocation *invocation,
- gpointer user_data)
+ gpointer user_data)
{
guint method_id, method_type;
@@ -135,14 +149,27 @@ handle_method_call (GDBusConnection *connection,
}
static GVariant *
-get_property (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *property_name, GError **error, gpointer user_data)
+get_property (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *property_name,
+ GError **error,
+ gpointer user_data)
{
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "This implementation does not support property `%s'", property_name);
return NULL;
}
static gboolean
-set_property (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *property_name, GVariant *value, GError **error, gpointer user_data)
+set_property (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *property_name,
+ GVariant *value,
+ GError **error,
+ gpointer user_data)
{
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "This implementation does not support property `%s'", property_name);
return FALSE;
@@ -257,7 +284,10 @@ on_object_unregistered (GObject *object)
* Returns: 0 if @error is set, otherwise a registration id (never 0) that can be used with g_dbus_connection_unregister_object().
*/
guint
-e_gdbus_book_factory_register_object (EGdbusBookFactory *object, GDBusConnection *connection, const gchar *object_path, GError **error)
+e_gdbus_book_factory_register_object (EGdbusBookFactory *object,
+ GDBusConnection *connection,
+ const gchar *object_path,
+ GError **error)
{
GHashTable *pvc;
@@ -303,17 +333,20 @@ e_gdbus_book_factory_proxy_init (EGdbusBookFactoryProxy *proxy)
}
static void
-g_signal (GDBusProxy *proxy, const gchar *sender_name, const gchar *signal_name, GVariant *parameters)
+g_signal (GDBusProxy *proxy,
+ const gchar *sender_name,
+ const gchar *signal_name,
+ GVariant *parameters)
{
/*
guint signal_id, signal_type;
-
+ *
signal_id = lookup_signal_id_from_signal_name (signal_name);
signal_type = lookup_signal_type_from_signal_name (signal_name);
-
+ *
g_return_if_fail (signal_id != 0);
g_return_if_fail (signal_type != 0);
-
+ *
e_gdbus_proxy_emit_signal (proxy, parameters, signals[signal_id], signal_type);
*/
}
@@ -347,7 +380,13 @@ proxy_iface_init (EGdbusBookFactoryIface *iface)
* This is a failable asynchronous constructor - when the proxy is ready, callback will be invoked and you can use e_gdbus_book_factory_proxy_new_finish() to get the result.
*/
void
-e_gdbus_book_factory_proxy_new (GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_factory_proxy_new (GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
g_async_initable_new_async (E_TYPE_GDBUS_BOOK_FACTORY_PROXY,
G_PRIORITY_DEFAULT,
@@ -372,7 +411,8 @@ e_gdbus_book_factory_proxy_new (GDBusConnection *connection, GDBusProxyFlags fla
* Returns: A #EGdbusBookFactoryProxy or %NULL if @error is set. Free with g_object_unref().
*/
EGdbusBookFactory *
-e_gdbus_book_factory_proxy_new_finish (GAsyncResult *result, GError **error)
+e_gdbus_book_factory_proxy_new_finish (GAsyncResult *result,
+ GError **error)
{
GObject *object;
GObject *source_object;
@@ -402,7 +442,12 @@ e_gdbus_book_factory_proxy_new_finish (GAsyncResult *result, GError **error)
* Returns: A #EGdbusBookFactoryProxy or %NULL if error is set. Free with g_object_unref().
*/
EGdbusBookFactory *
-e_gdbus_book_factory_proxy_new_sync (GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GError **error)
+e_gdbus_book_factory_proxy_new_sync (GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
{
GInitable *initable;
initable = g_initable_new (E_TYPE_GDBUS_BOOK_FACTORY_PROXY,
@@ -435,7 +480,13 @@ e_gdbus_book_factory_proxy_new_sync (GDBusConnection *connection, GDBusProxyFlag
* This is a failable asynchronous constructor - when the proxy is ready, callback will be invoked and you can use e_gdbus_book_factory_proxy_new_for_bus_finish() to get the result.
*/
void
-e_gdbus_book_factory_proxy_new_for_bus (GBusType bus_type, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_factory_proxy_new_for_bus (GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
g_async_initable_new_async (E_TYPE_GDBUS_BOOK_FACTORY_PROXY,
G_PRIORITY_DEFAULT,
@@ -460,7 +511,8 @@ e_gdbus_book_factory_proxy_new_for_bus (GBusType bus_type, GDBusProxyFlags flags
* Returns: A #EGdbusBookFactoryProxy or %NULL if @error is set. Free with g_object_unref().
*/
EGdbusBookFactory *
-e_gdbus_book_factory_proxy_new_for_bus_finish (GAsyncResult *result, GError **error)
+e_gdbus_book_factory_proxy_new_for_bus_finish (GAsyncResult *result,
+ GError **error)
{
GObject *object;
GObject *source_object;
@@ -490,7 +542,12 @@ e_gdbus_book_factory_proxy_new_for_bus_finish (GAsyncResult *result, GError **er
* Returns: A #EGdbusBookFactoryProxy or %NULL if error is set. Free with g_object_unref().
*/
EGdbusBookFactory *
-e_gdbus_book_factory_proxy_new_for_bus_sync (GBusType bus_type, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GError **error)
+e_gdbus_book_factory_proxy_new_for_bus_sync (GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
{
GInitable *initable;
initable = g_initable_new (E_TYPE_GDBUS_BOOK_FACTORY_PROXY,
diff --git a/addressbook/libegdbus/e-gdbus-book-view.c b/addressbook/libegdbus/e-gdbus-book-view.c
index c2b3609..46824e2 100644
--- a/addressbook/libegdbus/e-gdbus-book-view.c
+++ b/addressbook/libegdbus/e-gdbus-book-view.c
@@ -84,11 +84,16 @@ lookup_signal_type_from_signal_name (const gchar *signal_name)
/* ------------------------------------------------------------------------- */
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_BOOK_VIEW_INTERFACE_NAME, objects_added)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_BOOK_VIEW_INTERFACE_NAME, objects_modified)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_BOOK_VIEW_INTERFACE_NAME, objects_removed)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_UINT_STRING (GDBUS_BOOK_VIEW_INTERFACE_NAME, progress)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_BOOK_VIEW_INTERFACE_NAME, complete)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_BOOK_VIEW_INTERFACE_NAME,
+ objects_added)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_BOOK_VIEW_INTERFACE_NAME,
+ objects_modified)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_BOOK_VIEW_INTERFACE_NAME,
+ objects_removed)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_UINT_STRING (GDBUS_BOOK_VIEW_INTERFACE_NAME,
+ progress)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_BOOK_VIEW_INTERFACE_NAME,
+ complete)
static void
e_gdbus_book_view_default_init (EGdbusBookViewIface *iface)
@@ -114,103 +119,139 @@ e_gdbus_book_view_default_init (EGdbusBookViewIface *iface)
}
void
-e_gdbus_book_view_call_start (GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_view_call_start (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_method_call_void ("start", proxy, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_view_call_start_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_book_view_call_start_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
}
gboolean
-e_gdbus_book_view_call_start_sync (GDBusProxy *proxy, GCancellable *cancellable, GError **error)
+e_gdbus_book_view_call_start_sync (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_method_call_sync_void__void ("start", proxy, cancellable, error);
}
void
-e_gdbus_book_view_call_stop (GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_view_call_stop (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_method_call_void ("stop", proxy, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_view_call_stop_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_book_view_call_stop_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
}
gboolean
-e_gdbus_book_view_call_stop_sync (GDBusProxy *proxy, GCancellable *cancellable, GError **error)
+e_gdbus_book_view_call_stop_sync (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_method_call_sync_void__void ("stop", proxy, cancellable, error);
}
void
-e_gdbus_book_view_call_dispose (GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_view_call_dispose (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_method_call_void ("dispose", proxy, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_view_call_dispose_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_book_view_call_dispose_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
}
gboolean
-e_gdbus_book_view_call_dispose_sync (GDBusProxy *proxy, GCancellable *cancellable, GError **error)
+e_gdbus_book_view_call_dispose_sync (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_method_call_sync_void__void ("dispose", proxy, cancellable, error);
}
void
-e_gdbus_book_view_call_set_fields_of_interest (GDBusProxy *proxy, const gchar * const *in_only_fields, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_view_call_set_fields_of_interest (GDBusProxy *proxy,
+ const gchar * const *in_only_fields,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_method_call_strv ("set_fields_of_interest", proxy, in_only_fields, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_view_call_set_fields_of_interest_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_book_view_call_set_fields_of_interest_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
}
gboolean
-e_gdbus_book_view_call_set_fields_of_interest_sync (GDBusProxy *proxy, const gchar * const *in_only_fields, GCancellable *cancellable, GError **error)
+e_gdbus_book_view_call_set_fields_of_interest_sync (GDBusProxy *proxy,
+ const gchar * const *in_only_fields,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_method_call_sync_strv__void ("set_fields_of_interest", proxy, in_only_fields, cancellable, error);
}
void
-e_gdbus_book_view_emit_objects_added (EGdbusBookView *object, const gchar * const *arg_objects)
+e_gdbus_book_view_emit_objects_added (EGdbusBookView *object,
+ const gchar * const *arg_objects)
{
g_signal_emit (object, signals[__OBJECTS_ADDED_SIGNAL], 0, arg_objects);
}
void
-e_gdbus_book_view_emit_objects_modified (EGdbusBookView *object, const gchar * const *arg_objects)
+e_gdbus_book_view_emit_objects_modified (EGdbusBookView *object,
+ const gchar * const *arg_objects)
{
g_signal_emit (object, signals[__OBJECTS_MODIFIED_SIGNAL], 0, arg_objects);
}
void
-e_gdbus_book_view_emit_objects_removed (EGdbusBookView *object, const gchar * const *arg_uids)
+e_gdbus_book_view_emit_objects_removed (EGdbusBookView *object,
+ const gchar * const *arg_uids)
{
g_signal_emit (object, signals[__OBJECTS_REMOVED_SIGNAL], 0, arg_uids);
}
void
-e_gdbus_book_view_emit_progress (EGdbusBookView *object, guint arg_percent, const gchar *arg_message)
+e_gdbus_book_view_emit_progress (EGdbusBookView *object,
+ guint arg_percent,
+ const gchar *arg_message)
{
g_signal_emit (object, signals[__PROGRESS_SIGNAL], 0, arg_percent, arg_message);
}
void
-e_gdbus_book_view_emit_complete (EGdbusBookView *object, const gchar * const *arg_error)
+e_gdbus_book_view_emit_complete (EGdbusBookView *object,
+ const gchar * const *arg_error)
{
g_signal_emit (object, signals[__COMPLETE_SIGNAL], 0, arg_error);
}
@@ -221,9 +262,12 @@ E_DECLARE_GDBUS_NOTIFY_SIGNAL_1 (book_view, objects_removed, uids, "as")
E_DECLARE_GDBUS_NOTIFY_SIGNAL_2 (book_view, progress, percent, "u", message, "s")
E_DECLARE_GDBUS_NOTIFY_SIGNAL_1 (book_view, complete, error, "as")
-E_DECLARE_GDBUS_SYNC_METHOD_0 (book_view, start)
-E_DECLARE_GDBUS_SYNC_METHOD_0 (book_view, stop)
-E_DECLARE_GDBUS_SYNC_METHOD_0 (book_view, dispose)
+E_DECLARE_GDBUS_SYNC_METHOD_0 (book_view,
+ start)
+E_DECLARE_GDBUS_SYNC_METHOD_0 (book_view,
+ stop)
+E_DECLARE_GDBUS_SYNC_METHOD_0 (book_view,
+ dispose)
E_DECLARE_GDBUS_SYNC_METHOD_1 (book_view, set_fields_of_interest, fields_of_interest, "as")
static const GDBusMethodInfo * const e_gdbus_book_view_method_info_pointers[] =
@@ -255,14 +299,14 @@ static const GDBusInterfaceInfo _e_gdbus_book_view_interface_info =
};
static void
-handle_method_call (GDBusConnection *connection,
- const gchar *sender,
- const gchar *object_path,
- const gchar *interface_name,
- const gchar *method_name,
- GVariant *parameters,
+handle_method_call (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *method_name,
+ GVariant *parameters,
GDBusMethodInvocation *invocation,
- gpointer user_data)
+ gpointer user_data)
{
guint method_id, method_type;
@@ -276,14 +320,27 @@ handle_method_call (GDBusConnection *connection,
}
static GVariant *
-get_property (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *property_name, GError **error, gpointer user_data)
+get_property (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *property_name,
+ GError **error,
+ gpointer user_data)
{
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "This implementation does not support property `%s'", property_name);
return NULL;
}
static gboolean
-set_property (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *property_name, GVariant *value, GError **error, gpointer user_data)
+set_property (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *property_name,
+ GVariant *value,
+ GError **error,
+ gpointer user_data)
{
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "This implementation does not support property `%s'", property_name);
return FALSE;
@@ -398,7 +455,10 @@ on_object_unregistered (GObject *object)
* Returns: 0 if @error is set, otherwise a registration id (never 0) that can be used with g_dbus_connection_unregister_object().
*/
guint
-e_gdbus_book_view_register_object (EGdbusBookView *object, GDBusConnection *connection, const gchar *object_path, GError **error)
+e_gdbus_book_view_register_object (EGdbusBookView *object,
+ GDBusConnection *connection,
+ const gchar *object_path,
+ GError **error)
{
GHashTable *pvc;
@@ -443,7 +503,10 @@ e_gdbus_book_view_proxy_init (EGdbusBookViewProxy *proxy)
}
static void
-g_signal (GDBusProxy *proxy, const gchar *sender_name, const gchar *signal_name, GVariant *parameters)
+g_signal (GDBusProxy *proxy,
+ const gchar *sender_name,
+ const gchar *signal_name,
+ GVariant *parameters)
{
guint signal_id, signal_type;
@@ -485,7 +548,13 @@ proxy_iface_init (EGdbusBookViewIface *iface)
* This is a failable asynchronous constructor - when the proxy is ready, callback will be invoked and you can use e_gdbus_book_view_proxy_new_finish() to get the result.
*/
void
-e_gdbus_book_view_proxy_new (GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_view_proxy_new (GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
g_async_initable_new_async (E_TYPE_GDBUS_BOOK_VIEW_PROXY,
G_PRIORITY_DEFAULT,
@@ -510,7 +579,8 @@ e_gdbus_book_view_proxy_new (GDBusConnection *connection, GDBusProxyFlags flags,
* Returns: A #EGdbusBookViewProxy or %NULL if @error is set. Free with g_object_unref().
*/
EGdbusBookView *
-e_gdbus_book_view_proxy_new_finish (GAsyncResult *result, GError **error)
+e_gdbus_book_view_proxy_new_finish (GAsyncResult *result,
+ GError **error)
{
GObject *object;
GObject *source_object;
@@ -540,7 +610,12 @@ e_gdbus_book_view_proxy_new_finish (GAsyncResult *result, GError **error)
* Returns: A #EGdbusBookViewProxy or %NULL if error is set. Free with g_object_unref().
*/
EGdbusBookView *
-e_gdbus_book_view_proxy_new_sync (GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GError **error)
+e_gdbus_book_view_proxy_new_sync (GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
{
GInitable *initable;
initable = g_initable_new (E_TYPE_GDBUS_BOOK_VIEW_PROXY,
@@ -573,7 +648,13 @@ e_gdbus_book_view_proxy_new_sync (GDBusConnection *connection, GDBusProxyFlags f
* This is a failable asynchronous constructor - when the proxy is ready, callback will be invoked and you can use e_gdbus_book_view_proxy_new_for_bus_finish() to get the result.
*/
void
-e_gdbus_book_view_proxy_new_for_bus (GBusType bus_type, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_view_proxy_new_for_bus (GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
g_async_initable_new_async (E_TYPE_GDBUS_BOOK_VIEW_PROXY,
G_PRIORITY_DEFAULT,
@@ -598,7 +679,8 @@ e_gdbus_book_view_proxy_new_for_bus (GBusType bus_type, GDBusProxyFlags flags, c
* Returns: A #EGdbusBookViewProxy or %NULL if @error is set. Free with g_object_unref().
*/
EGdbusBookView *
-e_gdbus_book_view_proxy_new_for_bus_finish (GAsyncResult *result, GError **error)
+e_gdbus_book_view_proxy_new_for_bus_finish (GAsyncResult *result,
+ GError **error)
{
GObject *object;
GObject *source_object;
@@ -628,7 +710,12 @@ e_gdbus_book_view_proxy_new_for_bus_finish (GAsyncResult *result, GError **error
* Returns: A #EGdbusBookViewProxy or %NULL if error is set. Free with g_object_unref().
*/
EGdbusBookView *
-e_gdbus_book_view_proxy_new_for_bus_sync (GBusType bus_type, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GError **error)
+e_gdbus_book_view_proxy_new_for_bus_sync (GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
{
GInitable *initable;
initable = g_initable_new (E_TYPE_GDBUS_BOOK_VIEW_PROXY,
diff --git a/addressbook/libegdbus/e-gdbus-book.c b/addressbook/libegdbus/e-gdbus-book.c
index 1096692..04bf496 100644
--- a/addressbook/libegdbus/e-gdbus-book.c
+++ b/addressbook/libegdbus/e-gdbus-book.c
@@ -114,25 +114,43 @@ lookup_signal_type_from_signal_name (const gchar *signal_name)
/* ------------------------------------------------------------------------- */
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRING (GDBUS_BOOK_INTERFACE_NAME, backend_error)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_BOOLEAN (GDBUS_BOOK_INTERFACE_NAME, readonly)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_BOOLEAN (GDBUS_BOOK_INTERFACE_NAME, online)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_BOOK_INTERFACE_NAME, auth_required)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_BOOK_INTERFACE_NAME, opened)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_BOOK_INTERFACE_NAME, backend_property_changed)
-
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_BOOK_INTERFACE_NAME, open)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_BOOK_INTERFACE_NAME, remove)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_BOOK_INTERFACE_NAME, refresh)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_BOOK_INTERFACE_NAME, get_contact)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRV (GDBUS_BOOK_INTERFACE_NAME, get_contact_list)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRV (GDBUS_BOOK_INTERFACE_NAME, get_contact_list_uids)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_BOOK_INTERFACE_NAME, add_contact)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_BOOK_INTERFACE_NAME, remove_contacts)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_BOOK_INTERFACE_NAME, modify_contact)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_BOOK_INTERFACE_NAME, get_backend_property)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_BOOK_INTERFACE_NAME, set_backend_property)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_BOOK_INTERFACE_NAME, get_view)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRING (GDBUS_BOOK_INTERFACE_NAME,
+ backend_error)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_BOOLEAN (GDBUS_BOOK_INTERFACE_NAME,
+ readonly)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_BOOLEAN (GDBUS_BOOK_INTERFACE_NAME,
+ online)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_BOOK_INTERFACE_NAME,
+ auth_required)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_BOOK_INTERFACE_NAME,
+ opened)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_BOOK_INTERFACE_NAME,
+ backend_property_changed)
+
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_BOOK_INTERFACE_NAME,
+ open)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_BOOK_INTERFACE_NAME,
+ remove)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_BOOK_INTERFACE_NAME,
+ refresh)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_BOOK_INTERFACE_NAME,
+ get_contact)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRV (GDBUS_BOOK_INTERFACE_NAME,
+ get_contact_list)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRV (GDBUS_BOOK_INTERFACE_NAME,
+ get_contact_list_uids)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_BOOK_INTERFACE_NAME,
+ add_contact)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_BOOK_INTERFACE_NAME,
+ remove_contacts)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_BOOK_INTERFACE_NAME,
+ modify_contact)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_BOOK_INTERFACE_NAME,
+ get_backend_property)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_BOOK_INTERFACE_NAME,
+ set_backend_property)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_BOOK_INTERFACE_NAME,
+ get_view)
static void
e_gdbus_book_default_init (EGdbusBookIface *iface)
@@ -171,19 +189,28 @@ e_gdbus_book_default_init (EGdbusBookIface *iface)
}
void
-e_gdbus_book_call_open (GDBusProxy *proxy, gboolean in_only_if_exists, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_call_open (GDBusProxy *proxy,
+ gboolean in_only_if_exists,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_boolean ("open", e_gdbus_book_call_open, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_only_if_exists, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_call_open_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_book_call_open_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_finish_call_void (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, error, e_gdbus_book_call_open);
}
gboolean
-e_gdbus_book_call_open_sync (GDBusProxy *proxy, gboolean in_only_if_exists, GCancellable *cancellable, GError **error)
+e_gdbus_book_call_open_sync (GDBusProxy *proxy,
+ gboolean in_only_if_exists,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_boolean__void (proxy, in_only_if_exists, cancellable, error,
e_gdbus_book_call_open,
@@ -191,19 +218,26 @@ e_gdbus_book_call_open_sync (GDBusProxy *proxy, gboolean in_only_if_exists, GCan
}
void
-e_gdbus_book_call_remove (GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_call_remove (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_void ("remove", e_gdbus_book_call_remove, E_GDBUS_ASYNC_OP_KEEPER (proxy), cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_call_remove_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_book_call_remove_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_finish_call_void (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, error, e_gdbus_book_call_remove);
}
gboolean
-e_gdbus_book_call_remove_sync (GDBusProxy *proxy, GCancellable *cancellable, GError **error)
+e_gdbus_book_call_remove_sync (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_void__void (proxy, cancellable, error,
e_gdbus_book_call_remove,
@@ -211,19 +245,26 @@ e_gdbus_book_call_remove_sync (GDBusProxy *proxy, GCancellable *cancellable, GEr
}
void
-e_gdbus_book_call_refresh (GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_call_refresh (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_void ("refresh", e_gdbus_book_call_refresh, E_GDBUS_ASYNC_OP_KEEPER (proxy), cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_call_refresh_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_book_call_refresh_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_finish_call_void (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, error, e_gdbus_book_call_refresh);
}
gboolean
-e_gdbus_book_call_refresh_sync (GDBusProxy *proxy, GCancellable *cancellable, GError **error)
+e_gdbus_book_call_refresh_sync (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_void__void (proxy, cancellable, error,
e_gdbus_book_call_refresh,
@@ -231,19 +272,30 @@ e_gdbus_book_call_refresh_sync (GDBusProxy *proxy, GCancellable *cancellable, GE
}
void
-e_gdbus_book_call_get_contact (GDBusProxy *proxy, const gchar *in_uid, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_call_get_contact (GDBusProxy *proxy,
+ const gchar *in_uid,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_string ("get_contact", e_gdbus_book_call_get_contact, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_uid, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_call_get_contact_finish (GDBusProxy *proxy, GAsyncResult *result, gchar **out_vcard, GError **error)
+e_gdbus_book_call_get_contact_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar **out_vcard,
+ GError **error)
{
return e_gdbus_proxy_finish_call_string (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, out_vcard, error, e_gdbus_book_call_get_contact);
}
gboolean
-e_gdbus_book_call_get_contact_sync (GDBusProxy *proxy, const gchar *in_uid, gchar **out_vcard, GCancellable *cancellable, GError **error)
+e_gdbus_book_call_get_contact_sync (GDBusProxy *proxy,
+ const gchar *in_uid,
+ gchar **out_vcard,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_string__string (proxy, in_uid, out_vcard, cancellable, error,
e_gdbus_book_call_get_contact,
@@ -251,19 +303,30 @@ e_gdbus_book_call_get_contact_sync (GDBusProxy *proxy, const gchar *in_uid, gcha
}
void
-e_gdbus_book_call_get_contact_list (GDBusProxy *proxy, const gchar *in_query, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_call_get_contact_list (GDBusProxy *proxy,
+ const gchar *in_query,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_string ("get_contact_list", e_gdbus_book_call_get_contact_list, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_query, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_call_get_contact_list_finish (GDBusProxy *proxy, GAsyncResult *result, gchar ***out_vcards, GError **error)
+e_gdbus_book_call_get_contact_list_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar ***out_vcards,
+ GError **error)
{
return e_gdbus_proxy_finish_call_strv (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, out_vcards, error, e_gdbus_book_call_get_contact_list);
}
gboolean
-e_gdbus_book_call_get_contact_list_sync (GDBusProxy *proxy, const gchar *in_query, gchar ***out_vcards, GCancellable *cancellable, GError **error)
+e_gdbus_book_call_get_contact_list_sync (GDBusProxy *proxy,
+ const gchar *in_query,
+ gchar ***out_vcards,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_string__strv (proxy, in_query, out_vcards, cancellable, error,
e_gdbus_book_call_get_contact_list,
@@ -271,19 +334,30 @@ e_gdbus_book_call_get_contact_list_sync (GDBusProxy *proxy, const gchar *in_quer
}
void
-e_gdbus_book_call_get_contact_list_uids (GDBusProxy *proxy, const gchar *in_query, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_call_get_contact_list_uids (GDBusProxy *proxy,
+ const gchar *in_query,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_string ("get_contact_list_uids", e_gdbus_book_call_get_contact_list_uids, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_query, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_call_get_contact_list_uids_finish (GDBusProxy *proxy, GAsyncResult *result, gchar ***out_uids, GError **error)
+e_gdbus_book_call_get_contact_list_uids_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar ***out_uids,
+ GError **error)
{
return e_gdbus_proxy_finish_call_strv (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, out_uids, error, e_gdbus_book_call_get_contact_list_uids);
}
gboolean
-e_gdbus_book_call_get_contact_list_uids_sync (GDBusProxy *proxy, const gchar *in_query, gchar ***out_uids, GCancellable *cancellable, GError **error)
+e_gdbus_book_call_get_contact_list_uids_sync (GDBusProxy *proxy,
+ const gchar *in_query,
+ gchar ***out_uids,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_string__strv (proxy, in_query, out_uids, cancellable, error,
e_gdbus_book_call_get_contact_list_uids,
@@ -291,19 +365,30 @@ e_gdbus_book_call_get_contact_list_uids_sync (GDBusProxy *proxy, const gchar *in
}
void
-e_gdbus_book_call_add_contact (GDBusProxy *proxy, const gchar *in_vcard, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_call_add_contact (GDBusProxy *proxy,
+ const gchar *in_vcard,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_string ("add_contact", e_gdbus_book_call_add_contact, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_vcard, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_call_add_contact_finish (GDBusProxy *proxy, GAsyncResult *result, gchar **out_uid, GError **error)
+e_gdbus_book_call_add_contact_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar **out_uid,
+ GError **error)
{
return e_gdbus_proxy_finish_call_string (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, out_uid, error, e_gdbus_book_call_add_contact);
}
gboolean
-e_gdbus_book_call_add_contact_sync (GDBusProxy *proxy, const gchar *in_vcard, gchar **out_uid, GCancellable *cancellable, GError **error)
+e_gdbus_book_call_add_contact_sync (GDBusProxy *proxy,
+ const gchar *in_vcard,
+ gchar **out_uid,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_string__string (proxy, in_vcard, out_uid, cancellable, error,
e_gdbus_book_call_add_contact,
@@ -311,19 +396,28 @@ e_gdbus_book_call_add_contact_sync (GDBusProxy *proxy, const gchar *in_vcard, gc
}
void
-e_gdbus_book_call_remove_contacts (GDBusProxy *proxy, const gchar * const *in_list, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_call_remove_contacts (GDBusProxy *proxy,
+ const gchar * const *in_list,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_strv ("remove_contacts", e_gdbus_book_call_remove_contacts, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_list, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_call_remove_contacts_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_book_call_remove_contacts_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_finish_call_void (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, error, e_gdbus_book_call_remove_contacts);
}
gboolean
-e_gdbus_book_call_remove_contacts_sync (GDBusProxy *proxy, const gchar * const *in_list, GCancellable *cancellable, GError **error)
+e_gdbus_book_call_remove_contacts_sync (GDBusProxy *proxy,
+ const gchar * const *in_list,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_strv__void (proxy, in_list, cancellable, error,
e_gdbus_book_call_remove_contacts,
@@ -331,19 +425,28 @@ e_gdbus_book_call_remove_contacts_sync (GDBusProxy *proxy, const gchar * const *
}
void
-e_gdbus_book_call_modify_contact (GDBusProxy *proxy, const gchar *in_vcard, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_call_modify_contact (GDBusProxy *proxy,
+ const gchar *in_vcard,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_string ("modify_contact", e_gdbus_book_call_modify_contact, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_vcard, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_call_modify_contact_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_book_call_modify_contact_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_finish_call_void (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, error, e_gdbus_book_call_modify_contact);
}
gboolean
-e_gdbus_book_call_modify_contact_sync (GDBusProxy *proxy, const gchar *in_vcard, GCancellable *cancellable, GError **error)
+e_gdbus_book_call_modify_contact_sync (GDBusProxy *proxy,
+ const gchar *in_vcard,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_string__void (proxy, in_vcard, cancellable, error,
e_gdbus_book_call_modify_contact,
@@ -351,19 +454,30 @@ e_gdbus_book_call_modify_contact_sync (GDBusProxy *proxy, const gchar *in_vcard,
}
void
-e_gdbus_book_call_get_backend_property (GDBusProxy *proxy, const gchar *in_prop_name, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_call_get_backend_property (GDBusProxy *proxy,
+ const gchar *in_prop_name,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_string ("get_backend_property", e_gdbus_book_call_get_backend_property, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_prop_name, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_call_get_backend_property_finish (GDBusProxy *proxy, GAsyncResult *result, gchar **out_prop_value, GError **error)
+e_gdbus_book_call_get_backend_property_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar **out_prop_value,
+ GError **error)
{
return e_gdbus_proxy_finish_call_string (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, out_prop_value, error, e_gdbus_book_call_get_backend_property);
}
gboolean
-e_gdbus_book_call_get_backend_property_sync (GDBusProxy *proxy, const gchar *in_prop_name, gchar **out_prop_value, GCancellable *cancellable, GError **error)
+e_gdbus_book_call_get_backend_property_sync (GDBusProxy *proxy,
+ const gchar *in_prop_name,
+ gchar **out_prop_value,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_string__string (proxy, in_prop_name, out_prop_value, cancellable, error,
e_gdbus_book_call_get_backend_property,
@@ -372,32 +486,44 @@ e_gdbus_book_call_get_backend_property_sync (GDBusProxy *proxy, const gchar *in_
/* free returned pointer with g_strfreev() */
gchar **
-e_gdbus_book_encode_set_backend_property (const gchar *in_prop_name, const gchar *in_prop_value)
+e_gdbus_book_encode_set_backend_property (const gchar *in_prop_name,
+ const gchar *in_prop_value)
{
return e_gdbus_templates_encode_two_strings (in_prop_name, in_prop_value);
}
/* free out_prop_name and out_prop_value with g_free() */
gboolean
-e_gdbus_book_decode_set_backend_property (const gchar * const *in_strv, gchar **out_prop_name, gchar **out_prop_value)
+e_gdbus_book_decode_set_backend_property (const gchar * const *in_strv,
+ gchar **out_prop_name,
+ gchar **out_prop_value)
{
return e_gdbus_templates_decode_two_strings (in_strv, out_prop_name, out_prop_value);
}
void
-e_gdbus_book_call_set_backend_property (GDBusProxy *proxy, const gchar * const *in_prop_name_value, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_call_set_backend_property (GDBusProxy *proxy,
+ const gchar * const *in_prop_name_value,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_strv ("set_backend_property", e_gdbus_book_call_set_backend_property, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_prop_name_value, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_call_set_backend_property_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_book_call_set_backend_property_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_finish_call_void (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, error, e_gdbus_book_call_set_backend_property);
}
gboolean
-e_gdbus_book_call_set_backend_property_sync (GDBusProxy *proxy, const gchar * const *in_prop_name_value, GCancellable *cancellable, GError **error)
+e_gdbus_book_call_set_backend_property_sync (GDBusProxy *proxy,
+ const gchar * const *in_prop_name_value,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_strv__void (proxy, in_prop_name_value, cancellable, error,
e_gdbus_book_call_set_backend_property,
@@ -405,19 +531,30 @@ e_gdbus_book_call_set_backend_property_sync (GDBusProxy *proxy, const gchar * co
}
void
-e_gdbus_book_call_get_view (GDBusProxy *proxy, const gchar *in_query, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_call_get_view (GDBusProxy *proxy,
+ const gchar *in_query,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_string ("get_view", e_gdbus_book_call_get_view, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_query, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_call_get_view_finish (GDBusProxy *proxy, GAsyncResult *result, gchar **out_view_path, GError **error)
+e_gdbus_book_call_get_view_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar **out_view_path,
+ GError **error)
{
return e_gdbus_proxy_finish_call_string (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, out_view_path, error, e_gdbus_book_call_get_view);
}
gboolean
-e_gdbus_book_call_get_view_sync (GDBusProxy *proxy, const gchar *in_query, gchar **out_view_path, GCancellable *cancellable, GError **error)
+e_gdbus_book_call_get_view_sync (GDBusProxy *proxy,
+ const gchar *in_query,
+ gchar **out_view_path,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_string__string (proxy, in_query, out_view_path, cancellable, error,
e_gdbus_book_call_get_view,
@@ -425,73 +562,105 @@ e_gdbus_book_call_get_view_sync (GDBusProxy *proxy, const gchar *in_query, gchar
}
void
-e_gdbus_book_call_authenticate_user (GDBusProxy *proxy, const gchar * const *in_credentials, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_call_authenticate_user (GDBusProxy *proxy,
+ const gchar * const *in_credentials,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_method_call_strv ("authenticate_user", proxy, in_credentials, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_call_authenticate_user_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_book_call_authenticate_user_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
}
gboolean
-e_gdbus_book_call_authenticate_user_sync (GDBusProxy *proxy, const gchar * const *in_credentials, GCancellable *cancellable, GError **error)
+e_gdbus_book_call_authenticate_user_sync (GDBusProxy *proxy,
+ const gchar * const *in_credentials,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_method_call_sync_strv__void ("authenticate_user", proxy, in_credentials, cancellable, error);
}
void
-e_gdbus_book_call_cancel_operation (GDBusProxy *proxy, guint in_opid, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_call_cancel_operation (GDBusProxy *proxy,
+ guint in_opid,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_method_call_uint ("cancel_operation", proxy, in_opid, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_call_cancel_operation_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_book_call_cancel_operation_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
}
gboolean
-e_gdbus_book_call_cancel_operation_sync (GDBusProxy *proxy, guint in_opid, GCancellable *cancellable, GError **error)
+e_gdbus_book_call_cancel_operation_sync (GDBusProxy *proxy,
+ guint in_opid,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_method_call_sync_uint__void ("cancel_operation", proxy, in_opid, cancellable, error);
}
void
-e_gdbus_book_call_cancel_all (GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_call_cancel_all (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_method_call_void ("cancel_all", proxy, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_call_cancel_all_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_book_call_cancel_all_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
}
gboolean
-e_gdbus_book_call_cancel_all_sync (GDBusProxy *proxy, GCancellable *cancellable, GError **error)
+e_gdbus_book_call_cancel_all_sync (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_method_call_sync_void__void ("cancel_all", proxy, cancellable, error);
}
void
-e_gdbus_book_call_close (GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_call_close (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_method_call_void ("close", proxy, cancellable, callback, user_data);
}
gboolean
-e_gdbus_book_call_close_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_book_call_close_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
}
gboolean
-e_gdbus_book_call_close_sync (GDBusProxy *proxy, GCancellable *cancellable, GError **error)
+e_gdbus_book_call_close_sync (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_method_call_sync_void__void ("close", proxy, cancellable, error);
}
@@ -510,21 +679,40 @@ e_gdbus_book_emit_ ## _mname ## _done (EGdbusBook *object, guint arg_opid, const
g_signal_emit (object, signals[_sig_id], 0, arg_opid, arg_error, out_par); \
}
-DECLARE_EMIT_DONE_SIGNAL_0 (open, __OPEN_DONE_SIGNAL)
-DECLARE_EMIT_DONE_SIGNAL_0 (remove, __REMOVE_DONE_SIGNAL)
-DECLARE_EMIT_DONE_SIGNAL_0 (refresh, __REFRESH_DONE_SIGNAL)
-DECLARE_EMIT_DONE_SIGNAL_1 (get_contact, __GET_CONTACT_DONE_SIGNAL, const gchar *)
-DECLARE_EMIT_DONE_SIGNAL_1 (get_contact_list, __GET_CONTACT_LIST_DONE_SIGNAL, const gchar * const *)
-DECLARE_EMIT_DONE_SIGNAL_1 (get_contact_list_uids, __GET_CONTACT_LIST_UIDS_DONE_SIGNAL, const gchar * const *)
-DECLARE_EMIT_DONE_SIGNAL_1 (add_contact, __ADD_CONTACT_DONE_SIGNAL, const gchar *)
-DECLARE_EMIT_DONE_SIGNAL_0 (remove_contacts, __REMOVE_CONTACTS_DONE_SIGNAL)
-DECLARE_EMIT_DONE_SIGNAL_0 (modify_contact, __MODIFY_CONTACT_DONE_SIGNAL)
-DECLARE_EMIT_DONE_SIGNAL_1 (get_backend_property, __GET_BACKEND_PROPERTY_DONE_SIGNAL, const gchar *)
-DECLARE_EMIT_DONE_SIGNAL_0 (set_backend_property, __SET_BACKEND_PROPERTY_DONE_SIGNAL)
-DECLARE_EMIT_DONE_SIGNAL_1 (get_view, __GET_VIEW_DONE_SIGNAL, const gchar *)
+DECLARE_EMIT_DONE_SIGNAL_0 (open,
+ __OPEN_DONE_SIGNAL)
+DECLARE_EMIT_DONE_SIGNAL_0 (remove,
+ __REMOVE_DONE_SIGNAL)
+DECLARE_EMIT_DONE_SIGNAL_0 (refresh,
+ __REFRESH_DONE_SIGNAL)
+DECLARE_EMIT_DONE_SIGNAL_1 (get_contact,
+ __GET_CONTACT_DONE_SIGNAL,
+ const gchar *)
+DECLARE_EMIT_DONE_SIGNAL_1 (get_contact_list,
+ __GET_CONTACT_LIST_DONE_SIGNAL,
+ const gchar * const *)
+DECLARE_EMIT_DONE_SIGNAL_1 (get_contact_list_uids,
+ __GET_CONTACT_LIST_UIDS_DONE_SIGNAL,
+ const gchar * const *)
+DECLARE_EMIT_DONE_SIGNAL_1 (add_contact,
+ __ADD_CONTACT_DONE_SIGNAL,
+ const gchar *)
+DECLARE_EMIT_DONE_SIGNAL_0 (remove_contacts,
+ __REMOVE_CONTACTS_DONE_SIGNAL)
+DECLARE_EMIT_DONE_SIGNAL_0 (modify_contact,
+ __MODIFY_CONTACT_DONE_SIGNAL)
+DECLARE_EMIT_DONE_SIGNAL_1 (get_backend_property,
+ __GET_BACKEND_PROPERTY_DONE_SIGNAL,
+ const gchar *)
+DECLARE_EMIT_DONE_SIGNAL_0 (set_backend_property,
+ __SET_BACKEND_PROPERTY_DONE_SIGNAL)
+DECLARE_EMIT_DONE_SIGNAL_1 (get_view,
+ __GET_VIEW_DONE_SIGNAL,
+ const gchar *)
void
-e_gdbus_book_emit_backend_error (EGdbusBook *object, const gchar *arg_message)
+e_gdbus_book_emit_backend_error (EGdbusBook *object,
+ const gchar *arg_message)
{
g_return_if_fail (object != NULL);
g_return_if_fail (arg_message != NULL);
@@ -533,31 +721,36 @@ e_gdbus_book_emit_backend_error (EGdbusBook *object, const gchar *arg_message)
}
void
-e_gdbus_book_emit_readonly (EGdbusBook *object, gboolean arg_is_readonly)
+e_gdbus_book_emit_readonly (EGdbusBook *object,
+ gboolean arg_is_readonly)
{
g_signal_emit (object, signals[__READONLY_SIGNAL], 0, arg_is_readonly);
}
void
-e_gdbus_book_emit_online (EGdbusBook *object, gboolean arg_is_online)
+e_gdbus_book_emit_online (EGdbusBook *object,
+ gboolean arg_is_online)
{
g_signal_emit (object, signals[__ONLINE_SIGNAL], 0, arg_is_online);
}
void
-e_gdbus_book_emit_auth_required (EGdbusBook *object, const gchar * const *arg_credentials)
+e_gdbus_book_emit_auth_required (EGdbusBook *object,
+ const gchar * const *arg_credentials)
{
g_signal_emit (object, signals[__AUTH_REQUIRED_SIGNAL], 0, arg_credentials);
}
void
-e_gdbus_book_emit_opened (EGdbusBook *object, const gchar * const *arg_error)
+e_gdbus_book_emit_opened (EGdbusBook *object,
+ const gchar * const *arg_error)
{
g_signal_emit (object, signals[__OPENED_SIGNAL], 0, arg_error);
}
void
-e_gdbus_book_emit_backend_property_changed (EGdbusBook *object, const gchar * const *arg_name_value)
+e_gdbus_book_emit_backend_property_changed (EGdbusBook *object,
+ const gchar * const *arg_name_value)
{
g_signal_emit (object, signals[__BACKEND_PROPERTY_CHANGED_SIGNAL], 0, arg_name_value);
}
@@ -570,8 +763,10 @@ E_DECLARE_GDBUS_NOTIFY_SIGNAL_1 (book, opened, error, "as")
E_DECLARE_GDBUS_NOTIFY_SIGNAL_1 (book, backend_property_changed, name_value, "as")
E_DECLARE_GDBUS_ASYNC_METHOD_1 (book, open, only_if_exists, "b")
-E_DECLARE_GDBUS_ASYNC_METHOD_0 (book, remove)
-E_DECLARE_GDBUS_ASYNC_METHOD_0 (book, refresh)
+E_DECLARE_GDBUS_ASYNC_METHOD_0 (book,
+ remove)
+E_DECLARE_GDBUS_ASYNC_METHOD_0 (book,
+ refresh)
E_DECLARE_GDBUS_ASYNC_METHOD_1_WITH_RETURN (book, get_contact, uid, "s", vcard, "s")
E_DECLARE_GDBUS_ASYNC_METHOD_1_WITH_RETURN (book, get_contact_list, query, "s", vcards, "as")
E_DECLARE_GDBUS_ASYNC_METHOD_1_WITH_RETURN (book, get_contact_list_uids, query, "s", uids, "as")
@@ -584,8 +779,10 @@ E_DECLARE_GDBUS_ASYNC_METHOD_1_WITH_RETURN (book, get_view, query, "s", view, "s
E_DECLARE_GDBUS_SYNC_METHOD_1 (book, authenticate_user, credentials, "as")
E_DECLARE_GDBUS_SYNC_METHOD_1 (book, cancel_operation, opid, "u")
-E_DECLARE_GDBUS_SYNC_METHOD_0 (book, cancel_all)
-E_DECLARE_GDBUS_SYNC_METHOD_0 (book, close)
+E_DECLARE_GDBUS_SYNC_METHOD_0 (book,
+ cancel_all)
+E_DECLARE_GDBUS_SYNC_METHOD_0 (book,
+ close)
static const GDBusMethodInfo * const e_gdbus_book_method_info_pointers[] =
{
@@ -642,14 +839,14 @@ static const GDBusInterfaceInfo _e_gdbus_book_interface_info =
};
static void
-handle_method_call (GDBusConnection *connection,
- const gchar *sender,
- const gchar *object_path,
- const gchar *interface_name,
- const gchar *method_name,
- GVariant *parameters,
+handle_method_call (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *method_name,
+ GVariant *parameters,
GDBusMethodInvocation *invocation,
- gpointer user_data)
+ gpointer user_data)
{
guint method_id, method_type;
@@ -663,14 +860,27 @@ handle_method_call (GDBusConnection *connection,
}
static GVariant *
-get_property (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *property_name, GError **error, gpointer user_data)
+get_property (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *property_name,
+ GError **error,
+ gpointer user_data)
{
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "This implementation does not support property `%s'", property_name);
return NULL;
}
static gboolean
-set_property (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *property_name, GVariant *value, GError **error, gpointer user_data)
+set_property (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *property_name,
+ GVariant *value,
+ GError **error,
+ gpointer user_data)
{
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "This implementation does not support property `%s'", property_name);
return FALSE;
@@ -779,7 +989,10 @@ on_object_unregistered (GObject *object)
* Returns: 0 if @error is set, otherwise a registration id (never 0) that can be used with g_dbus_connection_unregister_object().
*/
guint
-e_gdbus_book_register_object (EGdbusBook *object, GDBusConnection *connection, const gchar *object_path, GError **error)
+e_gdbus_book_register_object (EGdbusBook *object,
+ GDBusConnection *connection,
+ const gchar *object_path,
+ GError **error)
{
GHashTable *pvc;
@@ -838,7 +1051,10 @@ e_gdbus_book_proxy_init (EGdbusBookProxy *proxy)
}
static void
-g_signal (GDBusProxy *proxy, const gchar *sender_name, const gchar *signal_name, GVariant *parameters)
+g_signal (GDBusProxy *proxy,
+ const gchar *sender_name,
+ const gchar *signal_name,
+ GVariant *parameters)
{
guint signal_id, signal_type;
@@ -903,7 +1119,10 @@ gdbus_book_get_pending_ops (EGdbusAsyncOpKeeper *object)
}
static gboolean
-gdbus_book_call_cancel_operation_sync (EGdbusAsyncOpKeeper *object, guint in_opid, GCancellable *cancellable, GError **error)
+gdbus_book_call_cancel_operation_sync (EGdbusAsyncOpKeeper *object,
+ guint in_opid,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_book_call_cancel_operation_sync (G_DBUS_PROXY (object), in_opid, cancellable, error);
}
@@ -932,7 +1151,13 @@ async_op_keeper_iface_init (EGdbusAsyncOpKeeperInterface *iface)
* This is a failable asynchronous constructor - when the proxy is ready, callback will be invoked and you can use e_gdbus_book_proxy_new_finish() to get the result.
*/
void
-e_gdbus_book_proxy_new (GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_proxy_new (GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
g_async_initable_new_async (E_TYPE_GDBUS_BOOK_PROXY,
G_PRIORITY_DEFAULT,
@@ -957,7 +1182,8 @@ e_gdbus_book_proxy_new (GDBusConnection *connection, GDBusProxyFlags flags, cons
* Returns: A #EGdbusBookProxy or %NULL if @error is set. Free with g_object_unref().
*/
EGdbusBook *
-e_gdbus_book_proxy_new_finish (GAsyncResult *result, GError **error)
+e_gdbus_book_proxy_new_finish (GAsyncResult *result,
+ GError **error)
{
GObject *object;
GObject *source_object;
@@ -988,7 +1214,12 @@ e_gdbus_book_proxy_new_finish (GAsyncResult *result, GError **error)
* Returns: A #EGdbusBookProxy or %NULL if error is set. Free with g_object_unref().
*/
EGdbusBook *
-e_gdbus_book_proxy_new_sync (GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GError **error)
+e_gdbus_book_proxy_new_sync (GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
{
GInitable *initable;
initable = g_initable_new (E_TYPE_GDBUS_BOOK_PROXY,
@@ -1021,7 +1252,13 @@ e_gdbus_book_proxy_new_sync (GDBusConnection *connection, GDBusProxyFlags flags,
* This is a failable asynchronous constructor - when the proxy is ready, callback will be invoked and you can use e_gdbus_book_proxy_new_for_bus_finish() to get the result.
*/
void
-e_gdbus_book_proxy_new_for_bus (GBusType bus_type, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_book_proxy_new_for_bus (GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
g_async_initable_new_async (E_TYPE_GDBUS_BOOK_PROXY,
G_PRIORITY_DEFAULT,
@@ -1046,7 +1283,8 @@ e_gdbus_book_proxy_new_for_bus (GBusType bus_type, GDBusProxyFlags flags, const
* Returns: A #EGdbusBookProxy or %NULL if @error is set. Free with g_object_unref().
*/
EGdbusBook *
-e_gdbus_book_proxy_new_for_bus_finish (GAsyncResult *result, GError **error)
+e_gdbus_book_proxy_new_for_bus_finish (GAsyncResult *result,
+ GError **error)
{
GObject *object;
GObject *source_object;
@@ -1077,7 +1315,12 @@ e_gdbus_book_proxy_new_for_bus_finish (GAsyncResult *result, GError **error)
* Returns: A #EGdbusBookProxy or %NULL if error is set. Free with g_object_unref().
*/
EGdbusBook *
-e_gdbus_book_proxy_new_for_bus_sync (GBusType bus_type, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GError **error)
+e_gdbus_book_proxy_new_for_bus_sync (GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
{
GInitable *initable;
diff --git a/calendar/backends/caldav/e-cal-backend-caldav-factory.c b/calendar/backends/caldav/e-cal-backend-caldav-factory.c
index 8b21601..5e775f4 100644
--- a/calendar/backends/caldav/e-cal-backend-caldav-factory.c
+++ b/calendar/backends/caldav/e-cal-backend-caldav-factory.c
@@ -52,7 +52,7 @@ _get_protocol (ECalBackendFactory *factory)
#define declare_functions(_type,_name) \
\
-static ECalBackend* \
+static ECalBackend * \
_new_backend_ ## _type (ECalBackendFactory *factory, ESource *source) \
{ \
return g_object_new (E_TYPE_CAL_BACKEND_CALDAV, \
@@ -121,12 +121,13 @@ eds_module_initialize (GTypeModule *module)
}
void
-eds_module_shutdown (void)
+eds_module_shutdown (void)
{
}
void
-eds_module_list_types (const GType **types, gint *num_types)
+eds_module_list_types (const GType **types,
+ gint *num_types)
{
*types = caldav_types;
*num_types = 3;
diff --git a/calendar/backends/caldav/e-cal-backend-caldav.c b/calendar/backends/caldav/e-cal-backend-caldav.c
index 12d9c06..694a410 100644
--- a/calendar/backends/caldav/e-cal-backend-caldav.c
+++ b/calendar/backends/caldav/e-cal-backend-caldav.c
@@ -126,13 +126,13 @@ struct _ECalBackendCalDAVPrivate {
/* TRUE when 'calendar-schedule' supported on the server */
gboolean calendar_schedule;
/* with 'calendar-schedule' supported, here's an outbox url
- for queries of free/busy information */
+ * for queries of free/busy information */
gchar *schedule_outbox_url;
/* "Temporary hack" to indicate it's talking to a google calendar.
- The proper solution should be to subclass whole backend and change only
- necessary parts in it, but this will give us more freedom, as also direct
- caldav calendars can profit from this. */
+ * The proper solution should be to subclass whole backend and change only
+ * necessary parts in it, but this will give us more freedom, as also direct
+ * caldav calendars can profit from this. */
gboolean is_google;
};
@@ -153,7 +153,8 @@ static gboolean caldav_debug_all = FALSE;
static GHashTable *caldav_debug_table = NULL;
static void
-add_debug_key (const gchar *start, const gchar *end)
+add_debug_key (const gchar *start,
+ const gchar *end)
{
gchar *debug_key;
gchar *debug_value;
@@ -268,7 +269,8 @@ caldav_debug_setup (SoupSession *session)
/* TODO Do not replicate this in every backend */
static icaltimezone *
-resolve_tzid (const gchar *tzid, gpointer user_data)
+resolve_tzid (const gchar *tzid,
+ gpointer user_data)
{
icaltimezone *zone;
@@ -284,7 +286,7 @@ resolve_tzid (const gchar *tzid, gpointer user_data)
static gboolean
put_component_to_store (ECalBackendCalDAV *cbdav,
- ECalComponent *comp)
+ ECalComponent *comp)
{
time_t time_start, time_end;
ECalBackendCalDAVPrivate *priv;
@@ -312,7 +314,9 @@ static gboolean put_comp_to_cache (ECalBackendCalDAV *cbdav, icalcomponent *ical
#define X_E_CALDAV_ATTACHMENT_NAME X_E_CALDAV "ATTACHMENT-NAME"
static void
-icomp_x_prop_set (icalcomponent *comp, const gchar *key, const gchar *value)
+icomp_x_prop_set (icalcomponent *comp,
+ const gchar *key,
+ const gchar *value)
{
icalproperty *xprop;
@@ -343,7 +347,8 @@ icomp_x_prop_set (icalcomponent *comp, const gchar *key, const gchar *value)
}
static gchar *
-icomp_x_prop_get (icalcomponent *comp, const gchar *key)
+icomp_x_prop_get (icalcomponent *comp,
+ const gchar *key)
{
icalproperty *xprop;
@@ -369,7 +374,8 @@ icomp_x_prop_get (icalcomponent *comp, const gchar *key)
/* passing NULL as 'href' removes the property */
static void
-ecalcomp_set_href (ECalComponent *comp, const gchar *href)
+ecalcomp_set_href (ECalComponent *comp,
+ const gchar *href)
{
icalcomponent *icomp;
@@ -396,7 +402,8 @@ ecalcomp_get_href (ECalComponent *comp)
/* passing NULL as 'etag' removes the property */
static void
-ecalcomp_set_etag (ECalComponent *comp, const gchar *etag)
+ecalcomp_set_etag (ECalComponent *comp,
+ const gchar *etag)
{
icalcomponent *icomp;
@@ -422,31 +429,32 @@ ecalcomp_get_etag (ECalComponent *comp)
}
/*typedef enum {
-
+ *
/ * object is in synch,
* now isnt that ironic? :) * /
ECALCOMP_IN_SYNCH = 0,
-
+ *
/ * local changes * /
ECALCOMP_LOCALLY_CREATED,
ECALCOMP_LOCALLY_DELETED,
ECALCOMP_LOCALLY_MODIFIED
-
+ *
} ECalCompSyncState;
-
+ *
/ * oos = out of synch * /
static void
-ecalcomp_set_synch_state (ECalComponent *comp, ECalCompSyncState state)
+ecalcomp_set_synch_state (ECalComponent *comp,
+ * ECalCompSyncState state)
{
icalcomponent *icomp;
gchar *state_string;
-
+ *
icomp = e_cal_component_get_icalcomponent (comp);
-
+ *
state_string = g_strdup_printf ("%d", state);
-
+ *
icomp_x_prop_set (icomp, X_E_CALDAV "ETAG", state_string);
-
+ *
g_free (state_string);
}*/
@@ -501,7 +509,9 @@ quote_etag (const gchar *etag)
/* ************************************************************************* */
static gboolean
-status_code_to_result (SoupMessage *message, ECalBackendCalDAVPrivate *priv, GError **perror)
+status_code_to_result (SoupMessage *message,
+ ECalBackendCalDAVPrivate *priv,
+ GError **perror)
{
g_return_val_if_fail (message != NULL, FALSE);
@@ -555,7 +565,9 @@ status_code_to_result (SoupMessage *message, ECalBackendCalDAVPrivate *priv, GE
/* !TS, call with lock held */
static gboolean
-check_state (ECalBackendCalDAV *cbdav, gboolean *online, GError **perror)
+check_state (ECalBackendCalDAV *cbdav,
+ gboolean *online,
+ GError **perror)
{
ECalBackendCalDAVPrivate *priv;
@@ -586,7 +598,9 @@ check_state (ECalBackendCalDAV *cbdav, gboolean *online, GError **perror)
/* XML Parsing code */
static xmlXPathObjectPtr
-xpath_eval (xmlXPathContextPtr ctx, const gchar *format, ...)
+xpath_eval (xmlXPathContextPtr ctx,
+ const gchar *format,
+ ...)
{
xmlXPathObjectPtr result;
va_list args;
@@ -618,7 +632,8 @@ xpath_eval (xmlXPathContextPtr ctx, const gchar *format, ...)
#if 0
static gboolean
-parse_status_node (xmlNodePtr node, guint *status_code)
+parse_status_node (xmlNodePtr node,
+ guint *status_code)
{
xmlChar *content;
gboolean res;
@@ -739,7 +754,8 @@ struct _CalDAVObject {
};
static void
-caldav_object_free (CalDAVObject *object, gboolean free_object_itself)
+caldav_object_free (CalDAVObject *object,
+ gboolean free_object_itself)
{
g_free (object->href);
g_free (object->etag);
@@ -751,7 +767,9 @@ caldav_object_free (CalDAVObject *object, gboolean free_object_itself)
}
static gboolean
-parse_report_response (SoupMessage *soup_message, CalDAVObject **objs, gint *len)
+parse_report_response (SoupMessage *soup_message,
+ CalDAVObject **objs,
+ gint *len)
{
xmlXPathContextPtr xpctx;
xmlXPathObjectPtr result;
@@ -836,7 +854,10 @@ out:
/* returns whether was able to read the xpath_value from the server's response; *value contains the result */
static gboolean
-parse_propfind_response (SoupMessage *message, const gchar *xpath_status, const gchar *xpath_value, gchar **value)
+parse_propfind_response (SoupMessage *message,
+ const gchar *xpath_status,
+ const gchar *xpath_value,
+ gchar **value)
{
xmlXPathContextPtr xpctx;
xmlDocPtr doc;
@@ -890,11 +911,11 @@ parse_propfind_response (SoupMessage *message, const gchar *xpath_status, const
/* Authentication helpers for libsoup */
static void
-soup_authenticate (SoupSession *session,
- SoupMessage *msg,
- SoupAuth *auth,
- gboolean retrying,
- gpointer data)
+soup_authenticate (SoupSession *session,
+ SoupMessage *msg,
+ SoupAuth *auth,
+ gboolean retrying,
+ gpointer data)
{
ECalBackendCalDAVPrivate *priv;
ECalBackendCalDAV *cbdav;
@@ -913,7 +934,8 @@ soup_authenticate (SoupSession *session,
/* direct CalDAV server access functions */
static void
-redirect_handler (SoupMessage *msg, gpointer user_data)
+redirect_handler (SoupMessage *msg,
+ gpointer user_data)
{
if (SOUP_STATUS_IS_REDIRECTION (msg->status_code)) {
SoupSession *soup_session = user_data;
@@ -934,7 +956,7 @@ redirect_handler (SoupMessage *msg, gpointer user_data)
if (new_uri->host && g_str_has_suffix (new_uri->host, "yahoo.com")) {
/* yahoo! returns port 7070, which is unreachable;
- it also requires https being used (below call resets port as well) */
+ * it also requires https being used (below call resets port as well) */
soup_uri_set_scheme (new_uri, SOUP_URI_SCHEME_HTTPS);
}
@@ -946,7 +968,9 @@ redirect_handler (SoupMessage *msg, gpointer user_data)
}
static void
-send_and_handle_redirection (SoupSession *soup_session, SoupMessage *msg, gchar **new_location)
+send_and_handle_redirection (SoupSession *soup_session,
+ SoupMessage *msg,
+ gchar **new_location)
{
gchar *old_uri = NULL;
@@ -973,7 +997,8 @@ send_and_handle_redirection (SoupSession *soup_session, SoupMessage *msg, gchar
}
static gchar *
-caldav_generate_uri (ECalBackendCalDAV *cbdav, const gchar *target)
+caldav_generate_uri (ECalBackendCalDAV *cbdav,
+ const gchar *target)
{
ECalBackendCalDAVPrivate *priv;
gchar *uri;
@@ -992,7 +1017,9 @@ caldav_generate_uri (ECalBackendCalDAV *cbdav, const gchar *target)
}
static gboolean
-caldav_server_open_calendar (ECalBackendCalDAV *cbdav, gboolean *server_unreachable, GError **perror)
+caldav_server_open_calendar (ECalBackendCalDAV *cbdav,
+ gboolean *server_unreachable,
+ GError **perror)
{
ECalBackendCalDAVPrivate *priv;
SoupMessage *message;
@@ -1064,7 +1091,7 @@ caldav_server_open_calendar (ECalBackendCalDAV *cbdav, gboolean *server_unreacha
}
/* Returns whether calendar changed on the server. This works only when server
- supports 'getctag' extension. */
+ * supports 'getctag' extension. */
static gboolean
check_calendar_changed_on_server (ECalBackendCalDAV *cbdav)
{
@@ -1155,11 +1182,16 @@ check_calendar_changed_on_server (ECalBackendCalDAV *cbdav)
}
/* only_hrefs is a list of requested objects to fetch; it has precedence from
- start_time/end_time, which are used only when both positive.
- Times are supposed to be in UTC, if set.
-*/
+ * start_time/end_time, which are used only when both positive.
+ * Times are supposed to be in UTC, if set.
+ */
static gboolean
-caldav_server_list_objects (ECalBackendCalDAV *cbdav, CalDAVObject **objs, gint *len, GSList *only_hrefs, time_t start_time, time_t end_time)
+caldav_server_list_objects (ECalBackendCalDAV *cbdav,
+ CalDAVObject **objs,
+ gint *len,
+ GSList *only_hrefs,
+ time_t start_time,
+ time_t end_time)
{
ECalBackendCalDAVPrivate *priv;
xmlOutputBufferPtr buf;
@@ -1289,7 +1321,11 @@ caldav_server_list_objects (ECalBackendCalDAV *cbdav, CalDAVObject **objs, gint
}
static gboolean
-caldav_server_download_attachment (ECalBackendCalDAV *cbdav, const gchar *attachment_uri, gchar **content, gsize *len, GError **error)
+caldav_server_download_attachment (ECalBackendCalDAV *cbdav,
+ const gchar *attachment_uri,
+ gchar **content,
+ gsize *len,
+ GError **error)
{
SoupMessage *message;
@@ -1324,7 +1360,9 @@ caldav_server_download_attachment (ECalBackendCalDAV *cbdav, const gchar *attach
}
static gboolean
-caldav_server_get_object (ECalBackendCalDAV *cbdav, CalDAVObject *object, GError **perror)
+caldav_server_get_object (ECalBackendCalDAV *cbdav,
+ CalDAVObject *object,
+ GError **perror)
{
ECalBackendCalDAVPrivate *priv;
SoupMessage *message;
@@ -1386,7 +1424,10 @@ caldav_server_get_object (ECalBackendCalDAV *cbdav, CalDAVObject *object, GError
}
static void
-caldav_post_freebusy (ECalBackendCalDAV *cbdav, const gchar *url, gchar **post_fb, GError **error)
+caldav_post_freebusy (ECalBackendCalDAV *cbdav,
+ const gchar *url,
+ gchar **post_fb,
+ GError **error)
{
ECalBackendCalDAVPrivate *priv;
SoupMessage *message;
@@ -1427,7 +1468,10 @@ caldav_post_freebusy (ECalBackendCalDAV *cbdav, const gchar *url, gchar **post_f
}
static gboolean
-caldav_server_put_object (ECalBackendCalDAV *cbdav, CalDAVObject *object, icalcomponent *icalcomp, GError **perror)
+caldav_server_put_object (ECalBackendCalDAV *cbdav,
+ CalDAVObject *object,
+ icalcomponent *icalcomp,
+ GError **perror)
{
ECalBackendCalDAVPrivate *priv;
SoupMessage *message;
@@ -1541,7 +1585,9 @@ caldav_server_put_object (ECalBackendCalDAV *cbdav, CalDAVObject *object, icalco
}
static void
-caldav_server_delete_object (ECalBackendCalDAV *cbdav, CalDAVObject *object, GError **perror)
+caldav_server_delete_object (ECalBackendCalDAV *cbdav,
+ CalDAVObject *object,
+ GError **perror)
{
ECalBackendCalDAVPrivate *priv;
SoupMessage *message;
@@ -1632,7 +1678,7 @@ caldav_receive_schedule_outbox_url (ECalBackendCalDAV *cbdav)
g_object_unref (message);
/* owner is a full path to the user's URL, thus change it in
- calendar's uri when asking for schedule-outbox-URL */
+ * calendar's uri when asking for schedule-outbox-URL */
suri = soup_uri_new (priv->uri);
soup_uri_set_path (suri, owner);
g_free (owner);
@@ -1708,7 +1754,9 @@ struct cache_comp_list
};
static gboolean
-remove_complist_from_cache_and_notify_cb (gpointer key, gpointer value, gpointer data)
+remove_complist_from_cache_and_notify_cb (gpointer key,
+ gpointer value,
+ gpointer data)
{
GSList *l;
struct cache_comp_list *ccl = value;
@@ -1756,11 +1804,13 @@ free_comp_list (gpointer cclist)
_tag2 != NULL ? _tag2 : ""))
/* start_time/end_time is an interval for checking changes. If both greater than zero,
- only the interval is checked and the removed items are not notified, as they can
- be still there.
+ * only the interval is checked and the removed items are not notified, as they can
+ * be still there.
*/
static void
-synchronize_cache (ECalBackendCalDAV *cbdav, time_t start_time, time_t end_time)
+synchronize_cache (ECalBackendCalDAV *cbdav,
+ time_t start_time,
+ time_t end_time)
{
ECalBackendCalDAVPrivate *priv;
ECalBackend *bkend;
@@ -1832,8 +1882,8 @@ synchronize_cache (ECalBackendCalDAV *cbdav, time_t start_time, time_t end_time)
if (g_hash_table_lookup (c_href2uid, href) == NULL) {
/* uid is from a component or c_uid2complist key, thus will not be
- freed before a removal from c_uid2complist, thus do not duplicate it,
- rather save memory */
+ * freed before a removal from c_uid2complist, thus do not duplicate it,
+ * rather save memory */
g_hash_table_insert (c_href2uid, href, (gpointer) uid);
} else {
g_free (href);
@@ -1932,7 +1982,7 @@ synchronize_cache (ECalBackendCalDAV *cbdav, time_t start_time, time_t end_time)
/* we are going to update cache */
/* they are downloaded, so process them */
- for (i = 0, object = up_sobjs; i < count /*&& priv->slave_cmd == SLAVE_SHOULD_WORK*/; i++, object++) {
+ for (i = 0, object = up_sobjs; i < count /*&& priv->slave_cmd == SLAVE_SHOULD_WORK */; i++, object++) {
if (object->status == 200 && object->href && object->etag && object->cdata && *object->cdata) {
icalcomponent *icomp = icalparser_parse_string (object->cdata);
@@ -2149,7 +2199,7 @@ caldav_synch_slave_loop (gpointer data)
if (priv->opened) {
time (&now);
/* check for events in the month before/after today first,
- to show user actual data as soon as possible */
+ * to show user actual data as soon as possible */
synchronize_cache (cbdav, time_add_week_with_zone (now, -5, utc), time_add_week_with_zone (now, +5, utc));
if (priv->slave_cmd != SLAVE_SHOULD_SLEEP) {
@@ -2191,7 +2241,8 @@ caldav_synch_slave_loop (gpointer data)
}
static gchar *
-maybe_append_email_domain (const gchar *username, const gchar *may_append)
+maybe_append_email_domain (const gchar *username,
+ const gchar *may_append)
{
if (!username || !*username)
return NULL;
@@ -2236,7 +2287,12 @@ get_usermail (ECalBackend *backend)
/* ********** ECalBackendSync virtual function implementation ************* */
static gboolean
-caldav_get_backend_property (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *prop_name, gchar **prop_value, GError **perror)
+caldav_get_backend_property (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ gchar **prop_value,
+ GError **perror)
{
gboolean processed = TRUE;
@@ -2301,7 +2357,8 @@ caldav_get_backend_property (ECalBackendSync *backend, EDataCal *cal, GCancellab
}
static gboolean
-initialize_backend (ECalBackendCalDAV *cbdav, GError **perror)
+initialize_backend (ECalBackendCalDAV *cbdav,
+ GError **perror)
{
ECalBackendCalDAVPrivate *priv;
ECalBackend *backend;
@@ -2358,9 +2415,9 @@ initialize_backend (ECalBackendCalDAV *cbdav, GError **perror)
if (suri->path && strchr (suri->path, '%')) {
/* If path contains anything already encoded, then decode it first,
- thus it'll be managed properly. For example, the '#' in a path
- is in URI shown as %23 and not doing this decode makes it being
- like %2523, which is not what is wanted here. */
+ * thus it'll be managed properly. For example, the '#' in a path
+ * is in URI shown as %23 and not doing this decode makes it being
+ * like %2523, which is not what is wanted here. */
tmp = soup_uri_decode (suri->path);
soup_uri_set_path (suri, tmp);
g_free (tmp);
@@ -2439,7 +2496,8 @@ initialize_backend (ECalBackendCalDAV *cbdav, GError **perror)
}
static void
-proxy_settings_changed (EProxy *proxy, gpointer user_data)
+proxy_settings_changed (EProxy *proxy,
+ gpointer user_data)
{
SoupURI *proxy_uri = NULL;
ECalBackendCalDAVPrivate *priv = (ECalBackendCalDAVPrivate *) user_data;
@@ -2456,7 +2514,8 @@ proxy_settings_changed (EProxy *proxy, gpointer user_data)
}
static void
-open_calendar (ECalBackendCalDAV *cbdav, GError **error)
+open_calendar (ECalBackendCalDAV *cbdav,
+ GError **error)
{
gboolean server_unreachable = FALSE;
ECalBackendCalDAVPrivate *priv;
@@ -2489,7 +2548,11 @@ open_calendar (ECalBackendCalDAV *cbdav, GError **error)
}
static void
-caldav_do_open (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, gboolean only_if_exists, GError **perror)
+caldav_do_open (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ gboolean only_if_exists,
+ GError **perror)
{
ECalBackendCalDAV *cbdav;
ECalBackendCalDAVPrivate *priv;
@@ -2543,7 +2606,10 @@ caldav_do_open (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellab
}
static void
-caldav_authenticate_user (ECalBackendSync *backend, GCancellable *cancellable, ECredentials *credentials, GError **error)
+caldav_authenticate_user (ECalBackendSync *backend,
+ GCancellable *cancellable,
+ ECredentials *credentials,
+ GError **error)
{
ECalBackendCalDAV *cbdav;
ECalBackendCalDAVPrivate *priv;
@@ -2570,7 +2636,10 @@ caldav_authenticate_user (ECalBackendSync *backend, GCancellable *cancellable, E
}
static void
-caldav_refresh (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, GError **perror)
+caldav_refresh (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ GError **perror)
{
ECalBackendCalDAV *cbdav;
ECalBackendCalDAVPrivate *priv;
@@ -2597,7 +2666,10 @@ caldav_refresh (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellab
}
static void
-caldav_remove (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, GError **perror)
+caldav_remove (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ GError **perror)
{
ECalBackendCalDAV *cbdav;
ECalBackendCalDAVPrivate *priv;
@@ -2637,7 +2709,8 @@ caldav_remove (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellabl
}
static void
-remove_comp_from_cache_cb (gpointer value, gpointer user_data)
+remove_comp_from_cache_cb (gpointer value,
+ gpointer user_data)
{
ECalComponent *comp = value;
ECalBackendStore *store = user_data;
@@ -2654,7 +2727,9 @@ remove_comp_from_cache_cb (gpointer value, gpointer user_data)
}
static gboolean
-remove_comp_from_cache (ECalBackendCalDAV *cbdav, const gchar *uid, const gchar *rid)
+remove_comp_from_cache (ECalBackendCalDAV *cbdav,
+ const gchar *uid,
+ const gchar *rid)
{
ECalBackendCalDAVPrivate *priv;
gboolean res = FALSE;
@@ -2680,7 +2755,8 @@ remove_comp_from_cache (ECalBackendCalDAV *cbdav, const gchar *uid, const gchar
}
static void
-add_detached_recur_to_vcalendar_cb (gpointer value, gpointer user_data)
+add_detached_recur_to_vcalendar_cb (gpointer value,
+ gpointer user_data)
{
icalcomponent *recurrence = e_cal_component_get_icalcomponent (value);
icalcomponent *vcalendar = user_data;
@@ -2691,7 +2767,8 @@ add_detached_recur_to_vcalendar_cb (gpointer value, gpointer user_data)
}
static gint
-sort_master_first (gconstpointer a, gconstpointer b)
+sort_master_first (gconstpointer a,
+ gconstpointer b)
{
icalcomponent *ca, *cb;
@@ -2711,10 +2788,14 @@ sort_master_first (gconstpointer a, gconstpointer b)
}
/* Returns new icalcomponent, with all detached instances stored in a cache.
- The cache lock should be locked when called this function.
+ * The cache lock should be locked when called this function.
*/
static icalcomponent *
-get_comp_from_cache (ECalBackendCalDAV *cbdav, const gchar *uid, const gchar *rid, gchar **href, gchar **etag)
+get_comp_from_cache (ECalBackendCalDAV *cbdav,
+ const gchar *uid,
+ const gchar *rid,
+ gchar **href,
+ gchar **etag)
{
ECalBackendCalDAVPrivate *priv;
icalcomponent *icalcomp = NULL;
@@ -2771,7 +2852,10 @@ get_comp_from_cache (ECalBackendCalDAV *cbdav, const gchar *uid, const gchar *ri
}
static gboolean
-put_comp_to_cache (ECalBackendCalDAV *cbdav, icalcomponent *icalcomp, const gchar *href, const gchar *etag)
+put_comp_to_cache (ECalBackendCalDAV *cbdav,
+ icalcomponent *icalcomp,
+ const gchar *href,
+ const gchar *etag)
{
icalcomponent_kind my_kind;
ECalComponent *comp;
@@ -2830,7 +2914,8 @@ put_comp_to_cache (ECalBackendCalDAV *cbdav, icalcomponent *icalcomp, const gcha
}
static void
-remove_property (gpointer prop, gpointer icomp)
+remove_property (gpointer prop,
+ gpointer icomp)
{
icalcomponent_remove_property (icomp, prop);
icalproperty_free (prop);
@@ -2864,7 +2949,8 @@ strip_unneeded_x_props (icalcomponent *icomp)
}
static gboolean
-is_stored_on_server (ECalBackendCalDAV *cbdav, const gchar *uri)
+is_stored_on_server (ECalBackendCalDAV *cbdav,
+ const gchar *uri)
{
SoupURI *my_uri, *test_uri;
gboolean res;
@@ -2892,7 +2978,8 @@ is_stored_on_server (ECalBackendCalDAV *cbdav, const gchar *uri)
}
static void
-convert_to_inline_attachment (ECalBackendCalDAV *cbdav, icalcomponent *icalcomp)
+convert_to_inline_attachment (ECalBackendCalDAV *cbdav,
+ icalcomponent *icalcomp)
{
icalcomponent *cclone;
icalproperty *p;
@@ -2981,7 +3068,8 @@ convert_to_inline_attachment (ECalBackendCalDAV *cbdav, icalcomponent *icalcomp)
}
static void
-convert_to_url_attachment (ECalBackendCalDAV *cbdav, icalcomponent *icalcomp)
+convert_to_url_attachment (ECalBackendCalDAV *cbdav,
+ icalcomponent *icalcomp)
{
ECalBackend *backend;
GSList *to_remove = NULL, *to_remove_after_download = NULL;
@@ -3111,7 +3199,8 @@ remove_dir (const gchar *dir)
}
static void
-remove_cached_attachment (ECalBackendCalDAV *cbdav, const gchar *uid)
+remove_cached_attachment (ECalBackendCalDAV *cbdav,
+ const gchar *uid)
{
ECalBackendCalDAVPrivate *priv;
ECalBackend *backend;
@@ -3146,7 +3235,8 @@ typedef struct {
} ForeachTzidData;
static void
-add_timezone_cb (icalparameter *param, gpointer data)
+add_timezone_cb (icalparameter *param,
+ gpointer data)
{
icaltimezone *tz;
const gchar *tzid;
@@ -3179,7 +3269,9 @@ add_timezone_cb (icalparameter *param, gpointer data)
}
static void
-add_timezones_from_component (ECalBackendCalDAV *cbdav, icalcomponent *vcal_comp, icalcomponent *icalcomp)
+add_timezones_from_component (ECalBackendCalDAV *cbdav,
+ icalcomponent *vcal_comp,
+ icalcomponent *icalcomp)
{
ForeachTzidData f_data;
ECalBackendCalDAVPrivate *priv;
@@ -3199,7 +3291,8 @@ add_timezones_from_component (ECalBackendCalDAV *cbdav, icalcomponent *vcal_comp
/* also removes X-EVOLUTION-CALDAV from all the components */
static gchar *
-pack_cobj (ECalBackendCalDAV *cbdav, icalcomponent *icomp)
+pack_cobj (ECalBackendCalDAV *cbdav,
+ icalcomponent *icomp)
{
icalcomponent *calcomp;
gchar *objstr;
@@ -3238,7 +3331,8 @@ pack_cobj (ECalBackendCalDAV *cbdav, icalcomponent *icomp)
}
static void
-sanitize_component (ECalBackend *cb, ECalComponent *comp)
+sanitize_component (ECalBackend *cb,
+ ECalComponent *comp)
{
ECalComponentDateTime dt;
icaltimezone *zone;
@@ -3282,7 +3376,9 @@ sanitize_component (ECalBackend *cb, ECalComponent *comp)
}
static gboolean
-cache_contains (ECalBackendCalDAV *cbdav, const gchar *uid, const gchar *rid)
+cache_contains (ECalBackendCalDAV *cbdav,
+ const gchar *uid,
+ const gchar *rid)
{
ECalBackendCalDAVPrivate *priv;
gboolean res;
@@ -3304,10 +3400,11 @@ cache_contains (ECalBackendCalDAV *cbdav, const gchar *uid, const gchar *rid)
}
/* Returns subcomponent of icalcomp, which is a master object, or icalcomp itself, if it's not a VCALENDAR;
- Do not free returned pointer, it'll be freed together with the icalcomp.
+ * Do not free returned pointer, it'll be freed together with the icalcomp.
*/
static icalcomponent *
-get_master_comp (ECalBackendCalDAV *cbdav, icalcomponent *icalcomp)
+get_master_comp (ECalBackendCalDAV *cbdav,
+ icalcomponent *icalcomp)
{
icalcomponent *master = icalcomp;
@@ -3336,7 +3433,11 @@ get_master_comp (ECalBackendCalDAV *cbdav, icalcomponent *icalcomp)
}
static gboolean
-remove_instance (ECalBackendCalDAV *cbdav, icalcomponent *icalcomp, struct icaltimetype rid, CalObjModType mod, gboolean also_exdate)
+remove_instance (ECalBackendCalDAV *cbdav,
+ icalcomponent *icalcomp,
+ struct icaltimetype rid,
+ CalObjModType mod,
+ gboolean also_exdate)
{
icalcomponent *master = icalcomp;
gboolean res = FALSE;
@@ -3393,7 +3494,9 @@ remove_instance (ECalBackendCalDAV *cbdav, icalcomponent *icalcomp, struct icalt
}
static icalcomponent *
-replace_master (ECalBackendCalDAV *cbdav, icalcomponent *old_comp, icalcomponent *new_master)
+replace_master (ECalBackendCalDAV *cbdav,
+ icalcomponent *old_comp,
+ icalcomponent *new_master)
{
icalcomponent *old_master;
if (icalcomponent_isa (old_comp) != ICAL_VCALENDAR_COMPONENT) {
@@ -3417,7 +3520,11 @@ replace_master (ECalBackendCalDAV *cbdav, icalcomponent *old_comp, icalcomponent
/* a busy_lock is supposed to be locked already, when calling this function */
static void
-do_create_object (ECalBackendCalDAV *cbdav, const gchar *in_calobj, gchar **uid, gchar **new_calobj, GError **perror)
+do_create_object (ECalBackendCalDAV *cbdav,
+ const gchar *in_calobj,
+ gchar **uid,
+ gchar **new_calobj,
+ GError **perror)
{
ECalComponent *comp;
gboolean online, did_put = FALSE;
@@ -3514,7 +3621,12 @@ do_create_object (ECalBackendCalDAV *cbdav, const gchar *in_calobj, gchar **uid,
/* a busy_lock is supposed to be locked already, when calling this function */
static void
-do_modify_object (ECalBackendCalDAV *cbdav, const gchar *calobj, CalObjModType mod, gchar **old_object, gchar **new_object, GError **error)
+do_modify_object (ECalBackendCalDAV *cbdav,
+ const gchar *calobj,
+ CalObjModType mod,
+ gchar **old_object,
+ gchar **new_object,
+ GError **error)
{
ECalBackendCalDAVPrivate *priv;
ECalComponent *comp;
@@ -3684,7 +3796,13 @@ do_modify_object (ECalBackendCalDAV *cbdav, const gchar *calobj, CalObjModType m
/* a busy_lock is supposed to be locked already, when calling this function */
static void
-do_remove_object (ECalBackendCalDAV *cbdav, const gchar *uid, const gchar *rid, CalObjModType mod, gchar **old_object, gchar **object, GError **perror)
+do_remove_object (ECalBackendCalDAV *cbdav,
+ const gchar *uid,
+ const gchar *rid,
+ CalObjModType mod,
+ gchar **old_object,
+ gchar **object,
+ GError **perror)
{
ECalBackendCalDAVPrivate *priv;
icalcomponent *cache_comp;
@@ -3782,10 +3900,10 @@ do_remove_object (ECalBackendCalDAV *cbdav, const gchar *uid, const gchar *rid,
}
static void
-extract_objects (icalcomponent *icomp,
- icalcomponent_kind ekind,
- GSList **objects,
- GError **error)
+extract_objects (icalcomponent *icomp,
+ icalcomponent_kind ekind,
+ GSList **objects,
+ GError **error)
{
icalcomponent *scomp;
icalcomponent_kind kind;
@@ -3819,7 +3937,8 @@ extract_objects (icalcomponent *icomp,
}
static gboolean
-extract_timezones (ECalBackendCalDAV *cbdav, icalcomponent *icomp)
+extract_timezones (ECalBackendCalDAV *cbdav,
+ icalcomponent *icomp)
{
ECalBackendCalDAVPrivate *priv;
GSList *timezones = NULL, *iter;
@@ -3853,11 +3972,11 @@ extract_timezones (ECalBackendCalDAV *cbdav, icalcomponent *icomp)
}
static void
-process_object (ECalBackendCalDAV *cbdav,
- ECalComponent *ecomp,
- gboolean online,
- icalproperty_method method,
- GError **error)
+process_object (ECalBackendCalDAV *cbdav,
+ ECalComponent *ecomp,
+ gboolean online,
+ icalproperty_method method,
+ GError **error)
{
ECalBackend *backend;
struct icaltimetype now;
@@ -3961,7 +4080,11 @@ process_object (ECalBackendCalDAV *cbdav,
}
static void
-do_receive_objects (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *calobj, GError **perror)
+do_receive_objects (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ GError **perror)
{
ECalBackendCalDAV *cbdav;
icalcomponent *icomp;
@@ -4060,30 +4183,94 @@ _func_name _params \
}
caldav_busy_stub (
- caldav_create_object, (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *in_calobj, gchar **uid, gchar **new_calobj, GError **perror),
- do_create_object, (cbdav, in_calobj, uid, new_calobj, perror))
+ caldav_create_object,
+ (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *in_calobj,
+ gchar **uid,
+ gchar **new_calobj,
+ GError **perror),
+ do_create_object,
+ (cbdav,
+ in_calobj,
+ uid,
+ new_calobj,
+ perror))
caldav_busy_stub (
- caldav_modify_object, (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *calobj, CalObjModType mod, gchar **old_object, gchar **new_object, GError **perror),
- do_modify_object, (cbdav, calobj, mod, old_object, new_object, perror))
+ caldav_modify_object,
+ (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ CalObjModType mod,
+ gchar **old_object,
+ gchar **new_object,
+ GError **perror),
+ do_modify_object,
+ (cbdav,
+ calobj,
+ mod,
+ old_object,
+ new_object,
+ perror))
caldav_busy_stub (
- caldav_remove_object, (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *uid, const gchar *rid, CalObjModType mod, gchar **old_object, gchar **object, GError **perror),
- do_remove_object, (cbdav, uid, rid, mod, old_object, object, perror))
+ caldav_remove_object,
+ (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid,
+ CalObjModType mod,
+ gchar **old_object,
+ gchar **object,
+ GError **perror),
+ do_remove_object,
+ (cbdav,
+ uid,
+ rid,
+ mod,
+ old_object,
+ object,
+ perror))
caldav_busy_stub (
- caldav_receive_objects, (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *calobj, GError **perror),
- do_receive_objects, (backend, cal, cancellable, calobj, perror))
+ caldav_receive_objects,
+ (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ GError **perror),
+ do_receive_objects,
+ (backend,
+ cal,
+ cancellable,
+ calobj,
+ perror))
static void
-caldav_send_objects (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *calobj, GSList **users, gchar **modified_calobj, GError **perror)
+caldav_send_objects (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ GSList **users,
+ gchar **modified_calobj,
+ GError **perror)
{
*users = NULL;
*modified_calobj = g_strdup (calobj);
}
static void
-caldav_get_object (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *uid, const gchar *rid, gchar **object, GError **perror)
+caldav_get_object (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid,
+ gchar **object,
+ GError **perror)
{
ECalBackendCalDAV *cbdav;
icalcomponent *icalcomp;
@@ -4103,7 +4290,11 @@ caldav_get_object (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancel
}
static void
-caldav_add_timezone (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *tzobj, GError **error)
+caldav_add_timezone (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *tzobj,
+ GError **error)
{
icalcomponent *tz_comp;
ECalBackendCalDAV *cbdav;
@@ -4137,7 +4328,12 @@ caldav_add_timezone (ECalBackendSync *backend, EDataCal *cal, GCancellable *canc
}
static void
-caldav_get_object_list (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *sexp_string, GSList **objects, GError **perror)
+caldav_get_object_list (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *sexp_string,
+ GSList **objects,
+ GError **perror)
{
ECalBackendCalDAV *cbdav;
ECalBackendCalDAVPrivate *priv;
@@ -4192,7 +4388,8 @@ caldav_get_object_list (ECalBackendSync *backend, EDataCal *cal, GCancellable *c
}
static void
-caldav_start_view (ECalBackend *backend, EDataCalView *query)
+caldav_start_view (ECalBackend *backend,
+ EDataCalView *query)
{
ECalBackendCalDAV *cbdav;
ECalBackendCalDAVPrivate *priv;
@@ -4246,7 +4443,14 @@ caldav_start_view (ECalBackend *backend, EDataCalView *query)
}
static void
-caldav_get_free_busy (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const GSList *users, time_t start, time_t end, GSList **freebusy, GError **error)
+caldav_get_free_busy (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const GSList *users,
+ time_t start,
+ time_t end,
+ GSList **freebusy,
+ GError **error)
{
ECalBackendCalDAV *cbdav;
ECalBackendCalDAVPrivate *priv;
@@ -4430,7 +4634,8 @@ caldav_get_free_busy (ECalBackendSync *backend, EDataCal *cal, GCancellable *can
}
static void
-caldav_set_online (ECalBackend *backend, gboolean is_online)
+caldav_set_online (ECalBackend *backend,
+ gboolean is_online)
{
ECalBackendCalDAV *cbdav;
ECalBackendCalDAVPrivate *priv;
@@ -4465,7 +4670,7 @@ caldav_set_online (ECalBackend *backend, gboolean is_online)
static icaltimezone *
caldav_internal_get_timezone (ECalBackend *backend,
- const gchar *tzid)
+ const gchar *tzid)
{
icaltimezone *zone;
ECalBackendCalDAV *cbdav;
@@ -4485,7 +4690,8 @@ caldav_internal_get_timezone (ECalBackend *backend,
}
static void
-caldav_source_changed_cb (ESource *source, ECalBackendCalDAV *cbdav)
+caldav_source_changed_cb (ESource *source,
+ ECalBackendCalDAV *cbdav)
{
ECalBackendCalDAVPrivate *priv;
SlaveCommand old_slave_cmd;
@@ -4531,7 +4737,7 @@ e_cal_backend_caldav_dispose (GObject *object)
priv = cbdav->priv;
/* tell the slave to stop before acquiring a lock,
- as it can work at the moment, and lock can be locked */
+ * as it can work at the moment, and lock can be locked */
priv->slave_cmd = SLAVE_SHOULD_DIE;
g_mutex_lock (priv->busy_lock);
diff --git a/calendar/backends/contacts/e-cal-backend-contacts-factory.c b/calendar/backends/contacts/e-cal-backend-contacts-factory.c
index 7929c74..36e1920 100644
--- a/calendar/backends/contacts/e-cal-backend-contacts-factory.c
+++ b/calendar/backends/contacts/e-cal-backend-contacts-factory.c
@@ -79,7 +79,8 @@ eds_module_shutdown (void)
}
void
-eds_module_list_types (const GType **types, gint *num_types)
+eds_module_list_types (const GType **types,
+ gint *num_types)
{
static GType contacts_types[1];
diff --git a/calendar/backends/contacts/e-cal-backend-contacts.c b/calendar/backends/contacts/e-cal-backend-contacts.c
index afa5b7d..230c48c 100644
--- a/calendar/backends/contacts/e-cal-backend-contacts.c
+++ b/calendar/backends/contacts/e-cal-backend-contacts.c
@@ -110,7 +110,8 @@ static void setup_alarm (ECalBackendContacts *cbc, ECalComponent *comp);
/* BookRecord methods */
static BookRecord *
-book_record_new (ECalBackendContacts *cbc, ESource *source)
+book_record_new (ECalBackendContacts *cbc,
+ ESource *source)
{
EBookClient *book_client;
EBookQuery *query;
@@ -168,7 +169,9 @@ book_record_new (ECalBackendContacts *cbc, ESource *source)
}
static gboolean
-remove_by_book (gpointer key, gpointer value, gpointer user_data)
+remove_by_book (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
ContactRecord *cr = value;
EBookClient *book_client = user_data;
@@ -191,7 +194,9 @@ book_record_free (BookRecord *br)
/* ContactRecord methods */
static ContactRecord *
-contact_record_new (ECalBackendContacts *cbc, EBookClient *book_client, EContact *contact)
+contact_record_new (ECalBackendContacts *cbc,
+ EBookClient *book_client,
+ EContact *contact)
{
ContactRecord *cr = g_new0 (ContactRecord, 1);
gchar *comp_str;
@@ -261,7 +266,8 @@ typedef struct _ContactRecordCB {
} ContactRecordCB;
static ContactRecordCB *
-contact_record_cb_new (ECalBackendContacts *cbc, ECalBackendSExp *sexp)
+contact_record_cb_new (ECalBackendContacts *cbc,
+ ECalBackendSExp *sexp)
{
ContactRecordCB *cb_data = g_new (ContactRecordCB, 1);
@@ -282,7 +288,9 @@ contact_record_cb_free (ContactRecordCB *cb_data)
}
static void
-contact_record_cb (gpointer key, gpointer value, gpointer user_data)
+contact_record_cb (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
ContactRecordCB *cb_data = user_data;
ContactRecord *record = value;
@@ -299,7 +307,8 @@ contact_record_cb (gpointer key, gpointer value, gpointer user_data)
}
static gboolean
-is_source_usable (ESource *source, ESourceGroup *group)
+is_source_usable (ESource *source,
+ ESourceGroup *group)
{
const gchar *base_uri;
const gchar *prop;
@@ -316,7 +325,8 @@ is_source_usable (ESource *source, ESourceGroup *group)
/* SourceList callbacks */
static void
-add_source (ECalBackendContacts *cbc, ESource *source)
+add_source (ECalBackendContacts *cbc,
+ ESource *source)
{
BookRecord *br = book_record_new (cbc, source);
const gchar *uid = e_source_peek_uid (source);
@@ -328,7 +338,9 @@ add_source (ECalBackendContacts *cbc, ESource *source)
}
static void
-source_added_cb (ESourceGroup *group, ESource *source, gpointer user_data)
+source_added_cb (ESourceGroup *group,
+ ESource *source,
+ gpointer user_data)
{
ECalBackendContacts *cbc = E_CAL_BACKEND_CONTACTS (user_data);
@@ -339,7 +351,9 @@ source_added_cb (ESourceGroup *group, ESource *source, gpointer user_data)
}
static void
-source_removed_cb (ESourceGroup *group, ESource *source, gpointer user_data)
+source_removed_cb (ESourceGroup *group,
+ ESource *source,
+ gpointer user_data)
{
ECalBackendContacts *cbc = E_CAL_BACKEND_CONTACTS (user_data);
const gchar *uid = e_source_peek_uid (source);
@@ -350,7 +364,8 @@ source_removed_cb (ESourceGroup *group, ESource *source, gpointer user_data)
}
static void
-source_list_changed_cb (ESourceList *source_list, gpointer user_data)
+source_list_changed_cb (ESourceList *source_list,
+ gpointer user_data)
{
ECalBackendContacts *cbc = E_CAL_BACKEND_CONTACTS (user_data);
GSList *g, *s;
@@ -385,7 +400,9 @@ source_list_changed_cb (ESourceList *source_list, gpointer user_data)
}
static void
-source_group_added_cb (ESourceList *source_list, ESourceGroup *group, gpointer user_data)
+source_group_added_cb (ESourceList *source_list,
+ ESourceGroup *group,
+ gpointer user_data)
{
ECalBackendContacts *cbc = E_CAL_BACKEND_CONTACTS (user_data);
GSList *i;
@@ -403,7 +420,9 @@ source_group_added_cb (ESourceList *source_list, ESourceGroup *group, gpointer u
}
static void
-source_group_removed_cb (ESourceList *source_list, ESourceGroup *group, gpointer user_data)
+source_group_removed_cb (ESourceList *source_list,
+ ESourceGroup *group,
+ gpointer user_data)
{
ECalBackendContacts *cbc = E_CAL_BACKEND_CONTACTS (user_data);
GSList *i = NULL;
@@ -422,7 +441,9 @@ source_group_removed_cb (ESourceList *source_list, ESourceGroup *group, gpointer
/************************************************************************************/
static void
-contacts_modified_cb (EBookClientView *book_view, const GSList *contacts, gpointer user_data)
+contacts_modified_cb (EBookClientView *book_view,
+ const GSList *contacts,
+ gpointer user_data)
{
ECalBackendContacts *cbc = E_CAL_BACKEND_CONTACTS (user_data);
EBookClient *book_client = e_book_client_view_get_client (book_view);
@@ -434,7 +455,7 @@ contacts_modified_cb (EBookClientView *book_view, const GSList *contacts, gpoint
EContactDate *birthday, *anniversary;
/* Because this is a change of contact, then always remove old tracked data
- and if possible, add with (possibly) new values.
+ * and if possible, add with (possibly) new values.
*/
g_hash_table_remove (cbc->priv->tracked_contacts, (gchar *) uid);
@@ -452,7 +473,9 @@ contacts_modified_cb (EBookClientView *book_view, const GSList *contacts, gpoint
}
static void
-contacts_added_cb (EBookClientView *book_view, const GSList *contacts, gpointer user_data)
+contacts_added_cb (EBookClientView *book_view,
+ const GSList *contacts,
+ gpointer user_data)
{
ECalBackendContacts *cbc = E_CAL_BACKEND_CONTACTS (user_data);
EBookClient *book_client = e_book_client_view_get_client (book_view);
@@ -479,7 +502,9 @@ contacts_added_cb (EBookClientView *book_view, const GSList *contacts, gpointer
}
static void
-contacts_removed_cb (EBookClientView *book_view, const GSList *contact_ids, gpointer user_data)
+contacts_removed_cb (EBookClientView *book_view,
+ const GSList *contact_ids,
+ gpointer user_data)
{
ECalBackendContacts *cbc = E_CAL_BACKEND_CONTACTS (user_data);
const GSList *ii;
@@ -509,7 +534,8 @@ cdate_to_icaltime (EContactDate *cdate)
}
static void
-manage_comp_alarm_update (ECalBackendContacts *cbc, ECalComponent *comp)
+manage_comp_alarm_update (ECalBackendContacts *cbc,
+ ECalComponent *comp)
{
gchar *old_comp, *new_comp;
@@ -529,7 +555,9 @@ manage_comp_alarm_update (ECalBackendContacts *cbc, ECalComponent *comp)
}
static void
-update_alarm_cb (gpointer key, gpointer value, gpointer user_data)
+update_alarm_cb (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
ECalBackendContacts *cbc = user_data;
ContactRecord *record = value;
@@ -558,7 +586,10 @@ update_tracked_alarms_cb (gpointer user_data)
}
static void
-alarm_config_changed_cb (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data)
+alarm_config_changed_cb (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
{
ECalBackendContacts *cbc = user_data;
@@ -572,7 +603,8 @@ alarm_config_changed_cb (GConfClient *client, guint cnxn_id, GConfEntry *entry,
/* When called with NULL, then just refresh local static variables on setup change from the user. */
static void
-setup_alarm (ECalBackendContacts *cbc, ECalComponent *comp)
+setup_alarm (ECalBackendContacts *cbc,
+ ECalComponent *comp)
{
ECalComponentAlarm *alarm;
ECalComponentAlarmTrigger trigger;
@@ -665,7 +697,10 @@ setup_alarm (ECalBackendContacts *cbc, ECalComponent *comp)
/* Contact -> Event creator */
static ECalComponent *
-create_component (ECalBackendContacts *cbc, const gchar *uid, EContactDate *cdate, const gchar *summary)
+create_component (ECalBackendContacts *cbc,
+ const gchar *uid,
+ EContactDate *cdate,
+ const gchar *summary)
{
ECalComponent *cal_comp;
ECalComponentText comp_summary;
@@ -737,7 +772,8 @@ create_component (ECalBackendContacts *cbc, const gchar *uid, EContactDate *cdat
}
static ECalComponent *
-create_birthday (ECalBackendContacts *cbc, EContact *contact)
+create_birthday (ECalBackendContacts *cbc,
+ EContact *contact)
{
EContactDate *cdate;
ECalComponent *cal_comp;
@@ -761,7 +797,8 @@ create_birthday (ECalBackendContacts *cbc, EContact *contact)
}
static ECalComponent *
-create_anniversary (ECalBackendContacts *cbc, EContact *contact)
+create_anniversary (ECalBackendContacts *cbc,
+ EContact *contact)
{
EContactDate *cdate;
ECalComponent *cal_comp;
@@ -790,7 +827,12 @@ create_anniversary (ECalBackendContacts *cbc, EContact *contact)
/* First the empty stubs */
static gboolean
-e_cal_backend_contacts_get_backend_property (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *prop_name, gchar **prop_value, GError **perror)
+e_cal_backend_contacts_get_backend_property (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ gchar **prop_value,
+ GError **perror)
{
gboolean processed = TRUE;
@@ -815,16 +857,23 @@ e_cal_backend_contacts_get_backend_property (ECalBackendSync *backend, EDataCal
}
static void
-e_cal_backend_contacts_remove (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, GError **perror)
+e_cal_backend_contacts_remove (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ GError **perror)
{
/* WRITE ME */
g_propagate_error (perror, EDC_ERROR (PermissionDenied));
}
static void
-e_cal_backend_contacts_get_object (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable,
- const gchar *uid, const gchar *rid,
- gchar **object, GError **perror)
+e_cal_backend_contacts_get_object (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid,
+ gchar **object,
+ GError **perror)
{
ECalBackendContacts *cbc = E_CAL_BACKEND_CONTACTS (backend);
ECalBackendContactsPrivate *priv = cbc->priv;
@@ -871,9 +920,14 @@ e_cal_backend_contacts_get_object (ECalBackendSync *backend, EDataCal *cal, GCan
}
static void
-e_cal_backend_contacts_get_free_busy (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable,
- const GSList *users, time_t start, time_t end,
- GSList **freebusy, GError **perror)
+e_cal_backend_contacts_get_free_busy (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const GSList *users,
+ time_t start,
+ time_t end,
+ GSList **freebusy,
+ GError **perror)
{
/* Birthdays/anniversaries don't count as busy time */
@@ -906,15 +960,23 @@ e_cal_backend_contacts_get_free_busy (ECalBackendSync *backend, EDataCal *cal, G
}
static void
-e_cal_backend_contacts_receive_objects (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable,
- const gchar *calobj, GError **perror)
+e_cal_backend_contacts_receive_objects (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ GError **perror)
{
g_propagate_error (perror, EDC_ERROR (PermissionDenied));
}
static void
-e_cal_backend_contacts_send_objects (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable,
- const gchar *calobj, GSList **users, gchar **modified_calobj, GError **perror)
+e_cal_backend_contacts_send_objects (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ GSList **users,
+ gchar **modified_calobj,
+ GError **perror)
{
*users = NULL;
*modified_calobj = NULL;
@@ -925,7 +987,8 @@ e_cal_backend_contacts_send_objects (ECalBackendSync *backend, EDataCal *cal, GC
/* Then the real implementations */
static void
-e_cal_backend_contacts_set_online (ECalBackend *backend, gboolean is_online)
+e_cal_backend_contacts_set_online (ECalBackend *backend,
+ gboolean is_online)
{
e_cal_backend_notify_online (backend, is_online);
e_cal_backend_notify_readonly (backend, TRUE);
@@ -959,8 +1022,11 @@ init_sources_cb (ECalBackendContacts *cbc)
}
static void
-e_cal_backend_contacts_open (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable,
- gboolean only_if_exists, GError **perror)
+e_cal_backend_contacts_open (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ gboolean only_if_exists,
+ GError **perror)
{
ECalBackendContacts *cbc = E_CAL_BACKEND_CONTACTS (backend);
ECalBackendContactsPrivate *priv = cbc->priv;
@@ -989,7 +1055,11 @@ e_cal_backend_contacts_open (ECalBackendSync *backend, EDataCal *cal, GCancellab
/* Add_timezone handler for the file backend */
static void
-e_cal_backend_contacts_add_timezone (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *tzobj, GError **error)
+e_cal_backend_contacts_add_timezone (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *tzobj,
+ GError **error)
{
ECalBackendContacts *cbcontacts;
ECalBackendContactsPrivate *priv;
@@ -1027,8 +1097,12 @@ e_cal_backend_contacts_add_timezone (ECalBackendSync *backend, EDataCal *cal, GC
}
static void
-e_cal_backend_contacts_get_object_list (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable,
- const gchar *sexp_string, GSList **objects, GError **perror)
+e_cal_backend_contacts_get_object_list (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *sexp_string,
+ GSList **objects,
+ GError **perror)
{
ECalBackendContacts *cbc = E_CAL_BACKEND_CONTACTS (backend);
ECalBackendContactsPrivate *priv = cbc->priv;
@@ -1050,7 +1124,8 @@ e_cal_backend_contacts_get_object_list (ECalBackendSync *backend, EDataCal *cal,
}
static void
-e_cal_backend_contacts_start_view (ECalBackend *backend, EDataCalView *query)
+e_cal_backend_contacts_start_view (ECalBackend *backend,
+ EDataCalView *query)
{
ECalBackendContacts *cbc = E_CAL_BACKEND_CONTACTS (backend);
ECalBackendContactsPrivate *priv = cbc->priv;
@@ -1076,7 +1151,8 @@ e_cal_backend_contacts_start_view (ECalBackend *backend, EDataCalView *query)
}
static icaltimezone *
-e_cal_backend_contacts_internal_get_timezone (ECalBackend *backend, const gchar *tzid)
+e_cal_backend_contacts_internal_get_timezone (ECalBackend *backend,
+ const gchar *tzid)
{
ECalBackendContacts *cbc = E_CAL_BACKEND_CONTACTS (backend);
@@ -1168,7 +1244,13 @@ e_cal_backend_contacts_init (ECalBackendContacts *cbc)
}
static void
-e_cal_backend_contacts_create_object (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *calobj, gchar **uid, gchar **new_calobj, GError **perror)
+e_cal_backend_contacts_create_object (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ gchar **uid,
+ gchar **new_calobj,
+ GError **perror)
{
g_propagate_error (perror, EDC_ERROR (PermissionDenied));
}
diff --git a/calendar/backends/file/e-cal-backend-file-factory.c b/calendar/backends/file/e-cal-backend-file-factory.c
index fb8578e..ee93e15 100644
--- a/calendar/backends/file/e-cal-backend-file-factory.c
+++ b/calendar/backends/file/e-cal-backend-file-factory.c
@@ -169,7 +169,8 @@ eds_module_shutdown (void)
}
void
-eds_module_list_types (const GType **types, gint *num_types)
+eds_module_list_types (const GType **types,
+ gint *num_types)
{
static GType file_types[3];
diff --git a/calendar/backends/file/e-cal-backend-file.c b/calendar/backends/file/e-cal-backend-file.c
index 0f86097..2dc9a90 100644
--- a/calendar/backends/file/e-cal-backend-file.c
+++ b/calendar/backends/file/e-cal-backend-file.c
@@ -273,7 +273,8 @@ save (ECalBackendFile *cbfile)
}
static void
-free_calendar_components (GHashTable *comp_uid_hash, icalcomponent *top_icomp)
+free_calendar_components (GHashTable *comp_uid_hash,
+ icalcomponent *top_icomp)
{
if (comp_uid_hash)
g_hash_table_destroy (comp_uid_hash);
@@ -375,10 +376,11 @@ e_cal_backend_file_finalize (GObject *object)
/* Looks up an component by its UID on the backend's component hash table
- and returns TRUE if any event (regardless whether it is the master or a child)
- with that UID exists */
+ * and returns TRUE if any event (regardless whether it is the master or a child)
+ * with that UID exists */
static gboolean
-uid_in_use (ECalBackendFile *cbfile, const gchar *uid)
+uid_in_use (ECalBackendFile *cbfile,
+ const gchar *uid)
{
ECalBackendFilePrivate *priv;
ECalBackendFileObject *obj_data;
@@ -395,7 +397,12 @@ uid_in_use (ECalBackendFile *cbfile, const gchar *uid)
/* Get_email_address handler for the file backend */
static gboolean
-e_cal_backend_file_get_backend_property (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *prop_name, gchar **prop_value, GError **perror)
+e_cal_backend_file_get_backend_property (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ gchar **prop_value,
+ GError **perror)
{
gboolean processed = TRUE;
@@ -446,10 +453,11 @@ e_cal_backend_file_get_backend_property (ECalBackendSync *backend, EDataCal *cal
/* function to resolve timezones */
static icaltimezone *
-resolve_tzid (const gchar *tzid, gpointer user_data)
+resolve_tzid (const gchar *tzid,
+ gpointer user_data)
{
icalcomponent *vcalendar_comp = user_data;
- icaltimezone* zone;
+ icaltimezone * zone;
if (!tzid || !tzid[0])
return NULL;
@@ -466,7 +474,8 @@ resolve_tzid (const gchar *tzid, gpointer user_data)
/* Checks if the specified component has a duplicated UID and if so changes it */
static void
-check_dup_uid (ECalBackendFile *cbfile, ECalComponent *comp)
+check_dup_uid (ECalBackendFile *cbfile,
+ ECalComponent *comp)
{
ECalBackendFilePrivate *priv;
ECalBackendFileObject *obj_data;
@@ -517,7 +526,8 @@ get_rid_icaltime (ECalComponent *comp)
/* Adds component to the interval tree
*/
static gboolean
-add_component_to_intervaltree (ECalBackendFile *cbfile, ECalComponent *comp)
+add_component_to_intervaltree (ECalBackendFile *cbfile,
+ ECalComponent *comp)
{
time_t time_start = -1, time_end = -1;
ECalBackendFilePrivate *priv;
@@ -540,7 +550,8 @@ add_component_to_intervaltree (ECalBackendFile *cbfile, ECalComponent *comp)
}
static gboolean
-remove_component_from_intervaltree (ECalBackendFile *cbfile, ECalComponent *comp)
+remove_component_from_intervaltree (ECalBackendFile *cbfile,
+ ECalComponent *comp)
{
const gchar *uid = NULL;
gchar *rid;
@@ -568,7 +579,9 @@ remove_component_from_intervaltree (ECalBackendFile *cbfile, ECalComponent *comp
* the UID is not in use already.
*/
static void
-add_component (ECalBackendFile *cbfile, ECalComponent *comp, gboolean add_to_toplevel)
+add_component (ECalBackendFile *cbfile,
+ ECalComponent *comp,
+ gboolean add_to_toplevel)
{
ECalBackendFilePrivate *priv;
ECalBackendFileObject *obj_data;
@@ -638,7 +651,9 @@ add_component (ECalBackendFile *cbfile, ECalComponent *comp, gboolean add_to_top
/* g_hash_table_foreach_remove() callback to remove recurrences from the calendar */
static gboolean
-remove_recurrence_cb (gpointer key, gpointer value, gpointer data)
+remove_recurrence_cb (gpointer key,
+ gpointer value,
+ gpointer data)
{
GList *l;
icalcomponent *icalcomp;
@@ -669,7 +684,9 @@ remove_recurrence_cb (gpointer key, gpointer value, gpointer data)
* icalcomponent.
*/
static void
-remove_component (ECalBackendFile *cbfile, const gchar *uid, ECalBackendFileObject *obj_data)
+remove_component (ECalBackendFile *cbfile,
+ const gchar *uid,
+ ECalBackendFileObject *obj_data)
{
ECalBackendFilePrivate *priv;
icalcomponent *icalcomp;
@@ -854,7 +871,11 @@ check_refresh_calendar_timeout (ECalBackendFilePrivate *priv)
}
static void
-custom_file_changed (GFileMonitor *monitor, GFile *file, GFile *other_file, GFileMonitorEvent event_type, ECalBackendFilePrivate *priv)
+custom_file_changed (GFileMonitor *monitor,
+ GFile *file,
+ GFile *other_file,
+ GFileMonitorEvent event_type,
+ ECalBackendFilePrivate *priv)
{
if (priv->refresh_cond)
g_cond_signal (priv->refresh_cond);
@@ -950,7 +971,9 @@ free_refresh_data (ECalBackendFile *cbfile)
/* Parses an open iCalendar file and loads it into the backend */
static void
-open_cal (ECalBackendFile *cbfile, const gchar *uristr, GError **perror)
+open_cal (ECalBackendFile *cbfile,
+ const gchar *uristr,
+ GError **perror)
{
ECalBackendFilePrivate *priv;
icalcomponent *icalcomp;
@@ -997,7 +1020,9 @@ typedef struct
BackendDeltaContext;
static void
-notify_removals_cb (gpointer key, gpointer value, gpointer data)
+notify_removals_cb (gpointer key,
+ gpointer value,
+ gpointer data)
{
BackendDeltaContext *context = data;
const gchar *uid = key;
@@ -1031,7 +1056,9 @@ notify_removals_cb (gpointer key, gpointer value, gpointer data)
}
static void
-notify_adds_modifies_cb (gpointer key, gpointer value, gpointer data)
+notify_adds_modifies_cb (gpointer key,
+ gpointer value,
+ gpointer data)
{
BackendDeltaContext *context = data;
const gchar *uid = key;
@@ -1077,7 +1104,9 @@ notify_adds_modifies_cb (gpointer key, gpointer value, gpointer data)
}
static void
-notify_changes (ECalBackendFile *cbfile, GHashTable *old_uid_hash, GHashTable *new_uid_hash)
+notify_changes (ECalBackendFile *cbfile,
+ GHashTable *old_uid_hash,
+ GHashTable *new_uid_hash)
{
BackendDeltaContext context;
@@ -1090,7 +1119,9 @@ notify_changes (ECalBackendFile *cbfile, GHashTable *old_uid_hash, GHashTable *n
}
static void
-reload_cal (ECalBackendFile *cbfile, const gchar *uristr, GError **perror)
+reload_cal (ECalBackendFile *cbfile,
+ const gchar *uristr,
+ GError **perror)
{
ECalBackendFilePrivate *priv;
icalcomponent *icalcomp, *icalcomp_old;
@@ -1145,7 +1176,9 @@ reload_cal (ECalBackendFile *cbfile, const gchar *uristr, GError **perror)
}
static void
-create_cal (ECalBackendFile *cbfile, const gchar *uristr, GError **perror)
+create_cal (ECalBackendFile *cbfile,
+ const gchar *uristr,
+ GError **perror)
{
gchar *dirname;
ECalBackendFilePrivate *priv;
@@ -1193,7 +1226,8 @@ get_uri_string (ECalBackend *backend)
}
static void
-source_changed_cb (ESource *source, ECalBackend *backend)
+source_changed_cb (ESource *source,
+ ECalBackend *backend)
{
const gchar *value;
@@ -1231,7 +1265,11 @@ source_changed_cb (ESource *source, ECalBackend *backend)
/* Open handler for the file backend */
static void
-e_cal_backend_file_open (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, gboolean only_if_exists, GError **perror)
+e_cal_backend_file_open (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ gboolean only_if_exists,
+ GError **perror)
{
ECalBackendFile *cbfile;
ECalBackendFilePrivate *priv;
@@ -1295,7 +1333,10 @@ e_cal_backend_file_open (ECalBackendSync *backend, EDataCal *cal, GCancellable *
}
static void
-e_cal_backend_file_remove (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, GError **perror)
+e_cal_backend_file_remove (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ GError **perror)
{
ECalBackendFile *cbfile;
ECalBackendFilePrivate *priv;
@@ -1375,13 +1416,16 @@ e_cal_backend_file_remove (ECalBackendSync *backend, EDataCal *cal, GCancellable
/* Set_mode handler for the file backend */
static void
-e_cal_backend_file_set_online (ECalBackend *backend, gboolean is_online)
+e_cal_backend_file_set_online (ECalBackend *backend,
+ gboolean is_online)
{
e_cal_backend_notify_online (backend, TRUE);
}
static void
-add_detached_recur_to_vcalendar (gpointer key, gpointer value, gpointer user_data)
+add_detached_recur_to_vcalendar (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
ECalComponent *recurrence = value;
icalcomponent *vcalendar = user_data;
@@ -1393,7 +1437,13 @@ add_detached_recur_to_vcalendar (gpointer key, gpointer value, gpointer user_dat
/* Get_object_component handler for the file backend */
static void
-e_cal_backend_file_get_object (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *uid, const gchar *rid, gchar **object, GError **error)
+e_cal_backend_file_get_object (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid,
+ gchar **object,
+ GError **error)
{
ECalBackendFile *cbfile;
ECalBackendFilePrivate *priv;
@@ -1473,7 +1523,11 @@ e_cal_backend_file_get_object (ECalBackendSync *backend, EDataCal *cal, GCancell
/* Add_timezone handler for the file backend */
static void
-e_cal_backend_file_add_timezone (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *tzobj, GError **error)
+e_cal_backend_file_add_timezone (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *tzobj,
+ GError **error)
{
icalcomponent *tz_comp;
ECalBackendFile *cbfile;
@@ -1519,9 +1573,10 @@ typedef struct {
} MatchObjectData;
static void
-match_object_sexp_to_component (gpointer value, gpointer data)
+match_object_sexp_to_component (gpointer value,
+ gpointer data)
{
- ECalComponent* comp = value;
+ ECalComponent * comp = value;
MatchObjectData *match_data = data;
const gchar *uid;
ECalBackendFile *cbfile;
@@ -1545,7 +1600,9 @@ match_object_sexp_to_component (gpointer value, gpointer data)
}
static void
-match_recurrence_sexp (gpointer key, gpointer value, gpointer data)
+match_recurrence_sexp (gpointer key,
+ gpointer value,
+ gpointer data)
{
ECalComponent *comp = value;
MatchObjectData *match_data = data;
@@ -1557,7 +1614,9 @@ match_recurrence_sexp (gpointer key, gpointer value, gpointer data)
}
static void
-match_object_sexp (gpointer key, gpointer value, gpointer data)
+match_object_sexp (gpointer key,
+ gpointer value,
+ gpointer data)
{
ECalBackendFileObject *obj_data = value;
MatchObjectData *match_data = data;
@@ -1577,14 +1636,19 @@ match_object_sexp (gpointer key, gpointer value, gpointer data)
/* Get_objects_in_range handler for the file backend */
static void
-e_cal_backend_file_get_object_list (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *sexp, GSList **objects, GError **perror)
+e_cal_backend_file_get_object_list (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *sexp,
+ GSList **objects,
+ GError **perror)
{
ECalBackendFile *cbfile;
ECalBackendFilePrivate *priv;
MatchObjectData match_data;
time_t occur_start = -1, occur_end = -1;
gboolean prunning_by_time;
- GList* objs_occuring_in_tw;
+ GList * objs_occuring_in_tw;
cbfile = E_CAL_BACKEND_FILE (backend);
priv = cbfile->priv;
@@ -1636,7 +1700,8 @@ e_cal_backend_file_get_object_list (ECalBackendSync *backend, EDataCal *cal, GCa
}
static void
-add_attach_uris (GSList **attachment_uris, icalcomponent *icalcomp)
+add_attach_uris (GSList **attachment_uris,
+ icalcomponent *icalcomp)
{
icalproperty *prop;
@@ -1670,7 +1735,9 @@ add_attach_uris (GSList **attachment_uris, icalcomponent *icalcomp)
}
static void
-add_detached_recur_attach_uris (gpointer key, gpointer value, gpointer user_data)
+add_detached_recur_attach_uris (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
ECalComponent *recurrence = value;
GSList **attachment_uris = user_data;
@@ -1680,7 +1747,13 @@ add_detached_recur_attach_uris (gpointer key, gpointer value, gpointer user_data
/* Gets the list of attachments */
static void
-e_cal_backend_file_get_attachment_uris (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *uid, const gchar *rid, GSList **attachment_uris, GError **error)
+e_cal_backend_file_get_attachment_uris (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid,
+ GSList **attachment_uris,
+ GError **error)
{
ECalBackendFile *cbfile;
ECalBackendFilePrivate *priv;
@@ -1752,14 +1825,15 @@ e_cal_backend_file_get_attachment_uris (ECalBackendSync *backend, EDataCal *cal,
/* get_query handler for the file backend */
static void
-e_cal_backend_file_start_view (ECalBackend *backend, EDataCalView *query)
+e_cal_backend_file_start_view (ECalBackend *backend,
+ EDataCalView *query)
{
ECalBackendFile *cbfile;
ECalBackendFilePrivate *priv;
MatchObjectData match_data;
time_t occur_start = -1, occur_end = -1;
gboolean prunning_by_time;
- GList* objs_occuring_in_tw;
+ GList * objs_occuring_in_tw;
cbfile = E_CAL_BACKEND_FILE (backend);
priv = cbfile->priv;
@@ -1831,9 +1905,9 @@ e_cal_backend_file_start_view (ECalBackend *backend, EDataCalView *query)
static gboolean
free_busy_instance (ECalComponent *comp,
- time_t instance_start,
- time_t instance_end,
- gpointer data)
+ time_t instance_start,
+ time_t instance_end,
+ gpointer data)
{
icalcomponent *vfb = data;
icalproperty *prop;
@@ -1860,8 +1934,11 @@ free_busy_instance (ECalComponent *comp,
}
static icalcomponent *
-create_user_free_busy (ECalBackendFile *cbfile, const gchar *address, const gchar *cn,
- time_t start, time_t end)
+create_user_free_busy (ECalBackendFile *cbfile,
+ const gchar *address,
+ const gchar *cn,
+ time_t start,
+ time_t end)
{
ECalBackendFilePrivate *priv;
GList *l;
@@ -1940,8 +2017,14 @@ create_user_free_busy (ECalBackendFile *cbfile, const gchar *address, const gcha
/* Get_free_busy handler for the file backend */
static void
-e_cal_backend_file_get_free_busy (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const GSList *users,
- time_t start, time_t end, GSList **freebusy, GError **error)
+e_cal_backend_file_get_free_busy (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const GSList *users,
+ time_t start,
+ time_t end,
+ GSList **freebusy,
+ GError **error)
{
ECalBackendFile *cbfile;
ECalBackendFilePrivate *priv;
@@ -1987,7 +2070,8 @@ e_cal_backend_file_get_free_busy (ECalBackendSync *backend, EDataCal *cal, GCanc
}
static icaltimezone *
-e_cal_backend_file_internal_get_timezone (ECalBackend *backend, const gchar *tzid)
+e_cal_backend_file_internal_get_timezone (ECalBackend *backend,
+ const gchar *tzid)
{
ECalBackendFile *cbfile;
ECalBackendFilePrivate *priv;
@@ -2014,7 +2098,8 @@ e_cal_backend_file_internal_get_timezone (ECalBackend *backend, const gchar *tzi
}
static void
-sanitize_component (ECalBackendFile *cbfile, ECalComponent *comp)
+sanitize_component (ECalBackendFile *cbfile,
+ ECalComponent *comp)
{
ECalComponentDateTime dt;
icaltimezone *zone;
@@ -2059,7 +2144,13 @@ sanitize_component (ECalBackendFile *cbfile, ECalComponent *comp)
}
static void
-e_cal_backend_file_create_object (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *in_calobj, gchar **uid, gchar **new_object, GError **error)
+e_cal_backend_file_create_object (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *in_calobj,
+ gchar **uid,
+ gchar **new_object,
+ GError **error)
{
ECalBackendFile *cbfile;
ECalBackendFilePrivate *priv;
@@ -2152,7 +2243,9 @@ typedef struct {
} RemoveRecurrenceData;
static gboolean
-remove_object_instance_cb (gpointer key, gpointer value, gpointer user_data)
+remove_object_instance_cb (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
time_t fromtt, instancett;
ECalComponent *instance = value;
@@ -2179,8 +2272,14 @@ remove_object_instance_cb (gpointer key, gpointer value, gpointer user_data)
}
static void
-e_cal_backend_file_modify_object (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *calobj,
- CalObjModType mod, gchar **old_object, gchar **new_object, GError **error)
+e_cal_backend_file_modify_object (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ CalObjModType mod,
+ gchar **old_object,
+ gchar **new_object,
+ GError **error)
{
RemoveRecurrenceData rrdata;
ECalBackendFile *cbfile;
@@ -2282,7 +2381,7 @@ e_cal_backend_file_modify_object (ECalBackendSync *backend, EDataCal *cal, GCanc
return;
}
- if (g_hash_table_lookup_extended (obj_data->recurrences, rid, (gpointer *)&real_rid, (gpointer *)&recurrence)) {
+ if (g_hash_table_lookup_extended (obj_data->recurrences, rid, (gpointer *) &real_rid, (gpointer *) &recurrence)) {
if (old_object)
*old_object = e_cal_component_get_as_string (recurrence);
@@ -2297,7 +2396,6 @@ e_cal_backend_file_modify_object (ECalBackendSync *backend, EDataCal *cal, GCanc
e_cal_util_remove_instances (e_cal_component_get_icalcomponent (obj_data->full_object), icaltime_from_string (rid), CALOBJ_MOD_THIS);
}
-
/* add the detached instance */
g_hash_table_insert (obj_data->recurrences,
rid,
@@ -2332,7 +2430,7 @@ e_cal_backend_file_modify_object (ECalBackendSync *backend, EDataCal *cal, GCanc
/* now deal with the detached recurrence */
if (g_hash_table_lookup_extended (obj_data->recurrences, rid,
- (gpointer *)&real_rid, (gpointer *)&recurrence)) {
+ (gpointer *) &real_rid, (gpointer *) &recurrence)) {
if (old_object)
*old_object = e_cal_component_get_as_string (recurrence);
@@ -2354,8 +2452,8 @@ e_cal_backend_file_modify_object (ECalBackendSync *backend, EDataCal *cal, GCanc
g_hash_table_foreach_remove (obj_data->recurrences, (GHRFunc) remove_object_instance_cb, &rrdata);
/* add the modified object to the beginning of the list,
- so that it's always before any detached instance we
- might have */
+ * so that it's always before any detached instance we
+ * might have */
if (obj_data->full_object) {
icalcomponent_add_component (priv->icalcomp,
e_cal_component_get_icalcomponent (obj_data->full_object));
@@ -2440,11 +2538,14 @@ e_cal_backend_file_modify_object (ECalBackendSync *backend, EDataCal *cal, GCanc
* @return modified object or NULL if it got removed
*/
static ECalBackendFileObject *
-remove_instance (ECalBackendFile *cbfile, ECalBackendFileObject *obj_data,
- const gchar *uid, const gchar *rid,
- CalObjModType mod,
- gchar **old_object, gchar **object,
- GError **error)
+remove_instance (ECalBackendFile *cbfile,
+ ECalBackendFileObject *obj_data,
+ const gchar *uid,
+ const gchar *rid,
+ CalObjModType mod,
+ gchar **old_object,
+ gchar **object,
+ GError **error)
{
gchar *hash_rid;
ECalComponent *comp;
@@ -2457,20 +2558,20 @@ remove_instance (ECalBackendFile *cbfile, ECalBackendFileObject *obj_data,
if (rid) {
/* remove recurrence */
if (g_hash_table_lookup_extended (obj_data->recurrences, rid,
- (gpointer *)&hash_rid, (gpointer *)&comp)) {
+ (gpointer *) &hash_rid, (gpointer *) &comp)) {
/* Removing without parent or not modifying parent?
- Report removal to caller. */
+ * Report removal to caller. */
if (old_object &&
(!obj_data->full_object || mod == CALOBJ_MOD_ONLY_THIS))
*old_object = e_cal_component_get_as_string (comp);
/* Reporting parent modification to caller?
- Report directly instead of going via caller. */
+ * Report directly instead of going via caller. */
if (obj_data->full_object &&
mod != CALOBJ_MOD_ONLY_THIS) {
/* old object string not provided,
- instead rely on the view detecting
- whether it contains the id */
+ * instead rely on the view detecting
+ * whether it contains the id */
ECalComponentId id;
id.uid = (gchar *) uid;
id.rid = (gchar *) rid;
@@ -2517,7 +2618,7 @@ remove_instance (ECalBackendFile *cbfile, ECalBackendFileObject *obj_data,
icaltime_from_string (rid), CALOBJ_MOD_THIS);
/* Since we are only removing one instance of recurrence
- event, update the last modified time on the component */
+ * event, update the last modified time on the component */
current = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
e_cal_component_set_last_modified (obj_data->full_object, ¤t);
@@ -2526,16 +2627,16 @@ remove_instance (ECalBackendFile *cbfile, ECalBackendFileObject *obj_data,
*object = e_cal_component_get_as_string (obj_data->full_object);
/* add the modified object to the beginning of the list,
- so that it's always before any detached instance we
- might have */
+ * so that it's always before any detached instance we
+ * might have */
icalcomponent_add_component (cbfile->priv->icalcomp,
e_cal_component_get_icalcomponent (obj_data->full_object));
cbfile->priv->comp = g_list_prepend (cbfile->priv->comp, obj_data->full_object);
} else {
if (!obj_data->full_object) {
/* Nothing to do, parent doesn't exist. Tell
- caller about this? Not an error with
- CALOBJ_MOD_THIS. */
+ * caller about this? Not an error with
+ * CALOBJ_MOD_THIS. */
if (mod == CALOBJ_MOD_ONLY_THIS && error)
g_propagate_error (error, EDC_ERROR (ObjectNotFound));
return obj_data;
@@ -2569,7 +2670,8 @@ remove_instance (ECalBackendFile *cbfile, ECalBackendFileObject *obj_data,
}
static gchar *
-get_object_string_from_fileobject (ECalBackendFileObject *obj_data, const gchar *rid)
+get_object_string_from_fileobject (ECalBackendFileObject *obj_data,
+ const gchar *rid)
{
ECalComponent *comp = obj_data->full_object;
gchar *real_rid;
@@ -2580,11 +2682,11 @@ get_object_string_from_fileobject (ECalBackendFileObject *obj_data, const gchar
if (!rid) {
return e_cal_component_get_as_string (comp);
} else {
- if (g_hash_table_lookup_extended (obj_data->recurrences, rid, (gpointer *)&real_rid, (gpointer *)&comp))
+ if (g_hash_table_lookup_extended (obj_data->recurrences, rid, (gpointer *) &real_rid, (gpointer *) &comp))
return e_cal_component_get_as_string (comp);
else {
/* FIXME remove this once we delete an instance from master object through
- modify request by setting exception */
+ * modify request by setting exception */
return e_cal_component_get_as_string (comp);
}
}
@@ -2593,7 +2695,8 @@ get_object_string_from_fileobject (ECalBackendFileObject *obj_data, const gchar
}
static void
-notify_comp_removed_cb (gpointer pecalcomp, gpointer pbackend)
+notify_comp_removed_cb (gpointer pecalcomp,
+ gpointer pbackend)
{
ECalComponent *comp = pecalcomp;
ECalBackend *backend = pbackend;
@@ -2616,10 +2719,15 @@ notify_comp_removed_cb (gpointer pecalcomp, gpointer pbackend)
/* Remove_object handler for the file backend */
static void
-e_cal_backend_file_remove_object (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable,
- const gchar *uid, const gchar *rid,
- CalObjModType mod, gchar **old_object,
- gchar **object, GError **error)
+e_cal_backend_file_remove_object (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid,
+ CalObjModType mod,
+ gchar **old_object,
+ gchar **object,
+ GError **error)
{
ECalBackendFile *cbfile;
ECalBackendFilePrivate *priv;
@@ -2702,8 +2810,8 @@ e_cal_backend_file_remove_object (ECalBackendSync *backend, EDataCal *cal, GCanc
g_hash_table_foreach_remove (obj_data->recurrences, (GHRFunc) remove_object_instance_cb, &rrdata);
/* add the modified object to the beginning of the list,
- so that it's always before any detached instance we
- might have */
+ * so that it's always before any detached instance we
+ * might have */
if (comp)
priv->comp = g_list_prepend (priv->comp, comp);
@@ -2718,7 +2826,10 @@ e_cal_backend_file_remove_object (ECalBackendSync *backend, EDataCal *cal, GCanc
}
static gboolean
-cancel_received_object (ECalBackendFile *cbfile, icalcomponent *icalcomp, gchar **old_object, gchar **new_object)
+cancel_received_object (ECalBackendFile *cbfile,
+ icalcomponent *icalcomp,
+ gchar **old_object,
+ gchar **new_object)
{
ECalBackendFileObject *obj_data;
ECalBackendFilePrivate *priv;
@@ -2767,7 +2878,8 @@ typedef struct {
} ECalBackendFileTzidData;
static void
-check_tzids (icalparameter *param, gpointer data)
+check_tzids (icalparameter *param,
+ gpointer data)
{
ECalBackendFileTzidData *tzdata = data;
const gchar *tzid;
@@ -2781,7 +2893,8 @@ check_tzids (icalparameter *param, gpointer data)
* ../groupwise/e-cal-backend-groupwise.c
*/
static void
-fetch_attachments (ECalBackendSync *backend, ECalComponent *comp)
+fetch_attachments (ECalBackendSync *backend,
+ ECalComponent *comp)
{
GSList *attach_list = NULL, *new_attach_list = NULL;
GSList *l;
@@ -2821,7 +2934,7 @@ fetch_attachments (ECalBackendSync *backend, ECalComponent *comp)
g_free (filename);
dest_file = g_build_filename (attach_store, new_filename, NULL);
g_free (new_filename);
- fd = g_open (dest_file, O_RDWR|O_CREAT|O_TRUNC|O_BINARY, 0600);
+ fd = g_open (dest_file, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0600);
if (fd == -1) {
/* TODO handle error conditions */
g_message ("DEBUG: could not open %s for writing\n",
@@ -2850,7 +2963,11 @@ fetch_attachments (ECalBackendSync *backend, ECalComponent *comp)
/* Update_objects handler for the file backend. */
static void
-e_cal_backend_file_receive_objects (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *calobj, GError **error)
+e_cal_backend_file_receive_objects (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ GError **error)
{
ECalBackendFile *cbfile;
ECalBackendFilePrivate *priv;
@@ -3103,7 +3220,7 @@ e_cal_backend_file_receive_objects (ECalBackendSync *backend, EDataCal *cal, GCa
}
/* Merge the iCalendar components with our existing VCALENDAR,
- resolving any conflicting TZIDs. */
+ * resolving any conflicting TZIDs. */
icalcomponent_merge_component (priv->icalcomp, toplevel_comp);
save (cbfile);
@@ -3117,8 +3234,13 @@ e_cal_backend_file_receive_objects (ECalBackendSync *backend, EDataCal *cal, GCa
}
static void
-e_cal_backend_file_send_objects (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *calobj, GSList **users,
- gchar **modified_calobj, GError **perror)
+e_cal_backend_file_send_objects (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ GSList **users,
+ gchar **modified_calobj,
+ GError **perror)
{
*users = NULL;
*modified_calobj = g_strdup (calobj);
@@ -3246,7 +3368,8 @@ e_cal_backend_file_class_init (ECalBackendFileClass *class)
}
void
-e_cal_backend_file_set_file_name (ECalBackendFile *cbfile, const gchar *file_name)
+e_cal_backend_file_set_file_name (ECalBackendFile *cbfile,
+ const gchar *file_name)
{
ECalBackendFilePrivate *priv;
@@ -3279,7 +3402,8 @@ e_cal_backend_file_get_file_name (ECalBackendFile *cbfile)
}
void
-e_cal_backend_file_reload (ECalBackendFile *cbfile, GError **perror)
+e_cal_backend_file_reload (ECalBackendFile *cbfile,
+ GError **perror)
{
ECalBackendFilePrivate *priv;
gchar *str_uri;
@@ -3323,7 +3447,9 @@ e_cal_backend_file_reload (ECalBackendFile *cbfile, GError **perror)
#ifdef TEST_QUERY_RESULT
static void
-test_query_by_scanning_all_objects (ECalBackendFile* cbfile, const gchar *sexp, GSList **objects)
+test_query_by_scanning_all_objects (ECalBackendFile *cbfile,
+ const gchar *sexp,
+ GSList **objects)
{
MatchObjectData match_data;
ECalBackendFilePrivate *priv;
@@ -3361,7 +3487,7 @@ test_query_by_scanning_all_objects (ECalBackendFile* cbfile, const gchar *sexp,
}
static void
-write_list (GSList* list)
+write_list (GSList *list)
{
GSList *l;
@@ -3376,7 +3502,9 @@ write_list (GSList* list)
}
static void
-get_difference_of_lists (ECalBackendFile* cbfile, GSList* smaller, GSList* bigger)
+get_difference_of_lists (ECalBackendFile *cbfile,
+ GSList *smaller,
+ GSList *bigger)
{
GSList *l, *lsmaller;
@@ -3418,7 +3546,8 @@ get_difference_of_lists (ECalBackendFile* cbfile, GSList* smaller, GSList* bigge
}
static void
-test_query (ECalBackendFile* cbfile, const gchar * query)
+test_query (ECalBackendFile *cbfile,
+ const gchar *query)
{
GSList *objects = NULL, *all_objects = NULL;
@@ -3455,7 +3584,8 @@ test_query (ECalBackendFile* cbfile, const gchar * query)
}
static void
-execute_query (ECalBackendFile* cbfile, const gchar * query)
+execute_query (ECalBackendFile *cbfile,
+ const gchar *query)
{
GSList *objects = NULL;
@@ -3489,7 +3619,9 @@ static GOptionEntry entries[] =
#define MIN_CHUNK 64
static gint
-private_getline (gchar **lineptr, gsize *n, FILE *stream)
+private_getline (gchar **lineptr,
+ gsize *n,
+ FILE *stream)
{
gint nchars_avail;
gchar *read_pos;
@@ -3544,15 +3676,16 @@ private_getline (gchar **lineptr, gsize *n, FILE *stream)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gchar * line = NULL;
gsize len = 0;
- ECalBackendFile* cbfile;
+ ECalBackendFile * cbfile;
gint num = 0;
GError *error = NULL;
GOptionContext *context;
- FILE* fin = NULL;
+ FILE * fin = NULL;
g_type_init ();
g_thread_init (NULL);
diff --git a/calendar/backends/http/e-cal-backend-http-factory.c b/calendar/backends/http/e-cal-backend-http-factory.c
index 33a4f35..006af78 100644
--- a/calendar/backends/http/e-cal-backend-http-factory.c
+++ b/calendar/backends/http/e-cal-backend-http-factory.c
@@ -167,7 +167,8 @@ eds_module_shutdown (void)
}
void
-eds_module_list_types (const GType **types, gint *num_types)
+eds_module_list_types (const GType **types,
+ gint *num_types)
{
static GType http_types[3];
diff --git a/calendar/backends/http/e-cal-backend-http.c b/calendar/backends/http/e-cal-backend-http.c
index 97a8fc6..d40bdd3 100644
--- a/calendar/backends/http/e-cal-backend-http.c
+++ b/calendar/backends/http/e-cal-backend-http.c
@@ -156,7 +156,12 @@ e_cal_backend_http_finalize (GObject *object)
/* Calendar backend methods */
static gboolean
-e_cal_backend_http_get_backend_property (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *prop_name, gchar **prop_value, GError **perror)
+e_cal_backend_http_get_backend_property (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ gchar **prop_value,
+ GError **perror)
{
gboolean processed = TRUE;
@@ -188,7 +193,8 @@ e_cal_backend_http_get_backend_property (ECalBackendSync *backend, EDataCal *cal
}
static gchar *
-webcal_to_http_method (const gchar *webcal_str, gboolean secure)
+webcal_to_http_method (const gchar *webcal_str,
+ gboolean secure)
{
if (secure && (strncmp ("http://", webcal_str, sizeof ("http://") - 1) == 0))
return g_strconcat ("https://", webcal_str + sizeof ("http://") - 1, NULL);
@@ -203,7 +209,9 @@ webcal_to_http_method (const gchar *webcal_str, gboolean secure)
}
static gboolean
-notify_and_remove_from_cache (gpointer key, gpointer value, gpointer user_data)
+notify_and_remove_from_cache (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
const gchar *calobj = value;
ECalBackendHttp *cbhttp = E_CAL_BACKEND_HTTP (user_data);
@@ -254,7 +262,8 @@ empty_cache (ECalBackendHttp *cbhttp)
/* TODO Do not replicate this in every backend */
static icaltimezone *
-resolve_tzid (const gchar *tzid, gpointer user_data)
+resolve_tzid (const gchar *tzid,
+ gpointer user_data)
{
icaltimezone *zone;
@@ -270,7 +279,7 @@ resolve_tzid (const gchar *tzid, gpointer user_data)
static gboolean
put_component_to_store (ECalBackendHttp *cb,
- ECalComponent *comp)
+ ECalComponent *comp)
{
time_t time_start, time_end;
ECalBackendHttpPrivate *priv;
@@ -347,7 +356,9 @@ put_component_to_store (ECalBackendHttp *cb,
}
static void
-retrieval_done (SoupSession *session, SoupMessage *msg, ECalBackendHttp *cbhttp)
+retrieval_done (SoupSession *session,
+ SoupMessage *msg,
+ ECalBackendHttp *cbhttp)
{
ECalBackendHttpPrivate *priv;
icalcomponent *icalcomp, *subcomp;
@@ -539,11 +550,11 @@ retrieval_done (SoupSession *session, SoupMessage *msg, ECalBackendHttp *cbhttp)
/* Authentication helpers for libsoup */
static void
-soup_authenticate (SoupSession *session,
- SoupMessage *msg,
- SoupAuth *auth,
- gboolean retrying,
- gpointer data)
+soup_authenticate (SoupSession *session,
+ SoupMessage *msg,
+ SoupAuth *auth,
+ gboolean retrying,
+ gpointer data)
{
ECalBackendHttpPrivate *priv;
ECalBackendHttp *cbhttp;
@@ -687,7 +698,8 @@ maybe_start_reload_timeout (ECalBackendHttp *cbhttp)
}
static void
-source_changed_cb (ESource *source, ECalBackendHttp *cbhttp)
+source_changed_cb (ESource *source,
+ ECalBackendHttp *cbhttp)
{
ECalBackendHttpPrivate *priv;
@@ -723,7 +735,11 @@ source_changed_cb (ESource *source, ECalBackendHttp *cbhttp)
/* Open handler for the file backend */
static void
-e_cal_backend_http_open (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, gboolean only_if_exists, GError **perror)
+e_cal_backend_http_open (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ gboolean only_if_exists,
+ GError **perror)
{
ECalBackendHttp *cbhttp;
ECalBackendHttpPrivate *priv;
@@ -786,7 +802,10 @@ e_cal_backend_http_open (ECalBackendSync *backend, EDataCal *cal, GCancellable *
}
static void
-e_cal_backend_http_authenticate_user (ECalBackendSync *backend, GCancellable *cancellable, ECredentials *credentials, GError **error)
+e_cal_backend_http_authenticate_user (ECalBackendSync *backend,
+ GCancellable *cancellable,
+ ECredentials *credentials,
+ GError **error)
{
ECalBackendHttp *cbhttp;
ECalBackendHttpPrivate *priv;
@@ -813,7 +832,10 @@ e_cal_backend_http_authenticate_user (ECalBackendSync *backend, GCancellable *ca
}
static void
-e_cal_backend_http_refresh (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, GError **perror)
+e_cal_backend_http_refresh (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ GError **perror)
{
ECalBackendHttp *cbhttp;
ECalBackendHttpPrivate *priv;
@@ -834,7 +856,10 @@ e_cal_backend_http_refresh (ECalBackendSync *backend, EDataCal *cal, GCancellabl
}
static void
-e_cal_backend_http_remove (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, GError **perror)
+e_cal_backend_http_remove (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ GError **perror)
{
ECalBackendHttp *cbhttp;
ECalBackendHttpPrivate *priv;
@@ -850,7 +875,8 @@ e_cal_backend_http_remove (ECalBackendSync *backend, EDataCal *cal, GCancellable
/* Set_mode handler for the http backend */
static void
-e_cal_backend_http_set_online (ECalBackend *backend, gboolean is_online)
+e_cal_backend_http_set_online (ECalBackend *backend,
+ gboolean is_online)
{
ECalBackendHttp *cbhttp;
ECalBackendHttpPrivate *priv;
@@ -880,7 +906,13 @@ e_cal_backend_http_set_online (ECalBackend *backend, gboolean is_online)
/* Get_object_component handler for the http backend */
static void
-e_cal_backend_http_get_object (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *uid, const gchar *rid, gchar **object, GError **error)
+e_cal_backend_http_get_object (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid,
+ gchar **object,
+ GError **error)
{
ECalBackendHttp *cbhttp;
ECalBackendHttpPrivate *priv;
@@ -908,7 +940,11 @@ e_cal_backend_http_get_object (ECalBackendSync *backend, EDataCal *cal, GCancell
/* Add_timezone handler for the file backend */
static void
-e_cal_backend_http_add_timezone (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *tzobj, GError **error)
+e_cal_backend_http_add_timezone (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *tzobj,
+ GError **error)
{
ECalBackendHttp *cbhttp;
ECalBackendHttpPrivate *priv;
@@ -941,7 +977,12 @@ e_cal_backend_http_add_timezone (ECalBackendSync *backend, EDataCal *cal, GCance
/* Get_objects_in_range handler for the file backend */
static void
-e_cal_backend_http_get_object_list (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *sexp, GSList **objects, GError **perror)
+e_cal_backend_http_get_object_list (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *sexp,
+ GSList **objects,
+ GError **perror)
{
ECalBackendHttp *cbhttp;
ECalBackendHttpPrivate *priv;
@@ -982,7 +1023,8 @@ e_cal_backend_http_get_object_list (ECalBackendSync *backend, EDataCal *cal, GCa
}
static void
-e_cal_backend_http_start_view (ECalBackend *backend, EDataCalView *query)
+e_cal_backend_http_start_view (ECalBackend *backend,
+ EDataCalView *query)
{
ECalBackendHttp *cbhttp;
ECalBackendHttpPrivate *priv;
@@ -1034,23 +1076,24 @@ e_cal_backend_http_start_view (ECalBackend *backend, EDataCalView *query)
}
/***** static icaltimezone *
-resolve_tzid (const gchar *tzid, gpointer user_data)
+resolve_tzid (const gchar *tzid,
+ * gpointer user_data)
{
icalcomponent *vcalendar_comp = user_data;
-
+ *
if (!tzid || !tzid[0])
return NULL;
- else if (!strcmp (tzid, "UTC"))
+ * else if (!strcmp (tzid, "UTC"))
return icaltimezone_get_utc_timezone ();
-
+ *
return icalcomponent_get_timezone (vcalendar_comp, tzid);
} *****/
static gboolean
free_busy_instance (ECalComponent *comp,
- time_t instance_start,
- time_t instance_end,
- gpointer data)
+ time_t instance_start,
+ time_t instance_end,
+ gpointer data)
{
icalcomponent *vfb = data;
icalproperty *prop;
@@ -1077,8 +1120,11 @@ free_busy_instance (ECalComponent *comp,
}
static icalcomponent *
-create_user_free_busy (ECalBackendHttp *cbhttp, const gchar *address, const gchar *cn,
- time_t start, time_t end)
+create_user_free_busy (ECalBackendHttp *cbhttp,
+ const gchar *address,
+ const gchar *cn,
+ time_t start,
+ time_t end)
{
GSList *slist = NULL, *l;
icalcomponent *vfb;
@@ -1165,8 +1211,14 @@ create_user_free_busy (ECalBackendHttp *cbhttp, const gchar *address, const gcha
/* Get_free_busy handler for the file backend */
static void
-e_cal_backend_http_get_free_busy (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const GSList *users,
- time_t start, time_t end, GSList **freebusy, GError **error)
+e_cal_backend_http_get_free_busy (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const GSList *users,
+ time_t start,
+ time_t end,
+ GSList **freebusy,
+ GError **error)
{
ECalBackendHttp *cbhttp;
ECalBackendHttpPrivate *priv;
@@ -1210,24 +1262,41 @@ e_cal_backend_http_get_free_busy (ECalBackendSync *backend, EDataCal *cal, GCanc
}
static void
-e_cal_backend_http_create_object (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *calobj, gchar **uid, gchar **new_calobj, GError **perror)
+e_cal_backend_http_create_object (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ gchar **uid,
+ gchar **new_calobj,
+ GError **perror)
{
g_propagate_error (perror, EDC_ERROR (PermissionDenied));
}
static void
-e_cal_backend_http_modify_object (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *calobj,
- CalObjModType mod, gchar **old_object, gchar **new_object, GError **perror)
+e_cal_backend_http_modify_object (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ CalObjModType mod,
+ gchar **old_object,
+ gchar **new_object,
+ GError **perror)
{
g_propagate_error (perror, EDC_ERROR (PermissionDenied));
}
/* Remove_object handler for the file backend */
static void
-e_cal_backend_http_remove_object (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable,
- const gchar *uid, const gchar *rid,
- CalObjModType mod, gchar **old_object,
- gchar **object, GError **perror)
+e_cal_backend_http_remove_object (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid,
+ CalObjModType mod,
+ gchar **old_object,
+ gchar **object,
+ GError **perror)
{
*old_object = *object = NULL;
@@ -1236,14 +1305,23 @@ e_cal_backend_http_remove_object (ECalBackendSync *backend, EDataCal *cal, GCanc
/* Update_objects handler for the file backend. */
static void
-e_cal_backend_http_receive_objects (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *calobj, GError **perror)
+e_cal_backend_http_receive_objects (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ GError **perror)
{
g_propagate_error (perror, EDC_ERROR (PermissionDenied));
}
static void
-e_cal_backend_http_send_objects (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *calobj, GSList **users,
- gchar **modified_calobj, GError **perror)
+e_cal_backend_http_send_objects (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ GSList **users,
+ gchar **modified_calobj,
+ GError **perror)
{
*users = NULL;
*modified_calobj = NULL;
@@ -1252,7 +1330,8 @@ e_cal_backend_http_send_objects (ECalBackendSync *backend, EDataCal *cal, GCance
}
static icaltimezone *
-e_cal_backend_http_internal_get_timezone (ECalBackend *backend, const gchar *tzid)
+e_cal_backend_http_internal_get_timezone (ECalBackend *backend,
+ const gchar *tzid)
{
ECalBackendHttp *cbhttp;
ECalBackendHttpPrivate *priv;
diff --git a/calendar/backends/weather/e-cal-backend-weather-factory.c b/calendar/backends/weather/e-cal-backend-weather-factory.c
index 8b0cda8..94d6cd9 100644
--- a/calendar/backends/weather/e-cal-backend-weather-factory.c
+++ b/calendar/backends/weather/e-cal-backend-weather-factory.c
@@ -90,7 +90,8 @@ eds_module_shutdown (void)
}
void
-eds_module_list_types (const GType **types, gint *num_types)
+eds_module_list_types (const GType **types,
+ gint *num_types)
{
static GType weather_types[1];
diff --git a/calendar/backends/weather/e-cal-backend-weather.c b/calendar/backends/weather/e-cal-backend-weather.c
index 5bf4ee8..e784677 100644
--- a/calendar/backends/weather/e-cal-backend-weather.c
+++ b/calendar/backends/weather/e-cal-backend-weather.c
@@ -41,7 +41,7 @@ G_DEFINE_TYPE (ECalBackendWeather, e_cal_backend_weather, E_TYPE_CAL_BACKEND_SYN
static gboolean reload_cb (ECalBackendWeather *cbw);
static gboolean begin_retrieval_cb (ECalBackendWeather *cbw);
-static ECalComponent* create_weather (ECalBackendWeather *cbw, WeatherInfo *report, gboolean is_forecast);
+static ECalComponent * create_weather (ECalBackendWeather *cbw, WeatherInfo *report, gboolean is_forecast);
static void e_cal_backend_weather_add_timezone (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *tzobj, GError **perror);
/* Private part of the ECalBackendWeather structure */
@@ -93,7 +93,8 @@ reload_cb (ECalBackendWeather *cbw)
}
static void
-source_changed (ESource *source, ECalBackendWeather *cbw)
+source_changed (ESource *source,
+ ECalBackendWeather *cbw)
{
/* FIXME
* We should force a reload of the data when this gets called. Unfortunately,
@@ -138,7 +139,8 @@ maybe_start_reload_timeout (ECalBackendWeather *cbw)
/* TODO Do not replicate this in every backend */
static icaltimezone *
-resolve_tzid (const gchar *tzid, gpointer user_data)
+resolve_tzid (const gchar *tzid,
+ gpointer user_data)
{
icaltimezone *zone;
@@ -154,7 +156,7 @@ resolve_tzid (const gchar *tzid, gpointer user_data)
static void
put_component_to_store (ECalBackendWeather *cb,
- ECalComponent *comp)
+ ECalComponent *comp)
{
time_t time_start, time_end;
ECalBackendWeatherPrivate *priv;
@@ -169,7 +171,8 @@ put_component_to_store (ECalBackendWeather *cb,
}
static void
-finished_retrieval_cb (WeatherInfo *info, ECalBackendWeather *cbw)
+finished_retrieval_cb (WeatherInfo *info,
+ ECalBackendWeather *cbw)
{
ECalBackendWeatherPrivate *priv;
ECalComponent *comp;
@@ -309,8 +312,10 @@ getCategory (WeatherInfo *report)
return NULL;
}
-static ECalComponent*
-create_weather (ECalBackendWeather *cbw, WeatherInfo *report, gboolean is_forecast)
+static ECalComponent *
+create_weather (ECalBackendWeather *cbw,
+ WeatherInfo *report,
+ gboolean is_forecast)
{
ECalBackendWeatherPrivate *priv;
ECalComponent *cal_comp;
@@ -371,7 +376,7 @@ create_weather (ECalBackendWeather *cbw, WeatherInfo *report, gboolean is_foreca
update_zone = icaltimezone_get_utc_timezone ();
/* Set all-day event's date from forecast data - cannot set is_date,
- because in that case no timezone conversion is done */
+ * because in that case no timezone conversion is done */
itt = icaltime_from_timet_with_zone (update_time, 0, update_zone);
itt.hour = 0;
itt.minute = 0;
@@ -397,7 +402,7 @@ create_weather (ECalBackendWeather *cbw, WeatherInfo *report, gboolean is_foreca
weather_info_get_value_temp_max (report, TEMP_UNIT_DEFAULT, &tmax) &&
tmin != tmax) {
/* because weather_info_get_temp* uses one internal buffer, thus finally
- the last value is shown for both, which is obviously wrong */
+ * the last value is shown for both, which is obviously wrong */
GString *str = g_string_new (priv->city);
g_string_append (str, " : ");
@@ -412,7 +417,7 @@ create_weather (ECalBackendWeather *cbw, WeatherInfo *report, gboolean is_foreca
} else {
gdouble tmin = 0.0, tmax = 0.0;
/* because weather_info_get_temp* uses one internal buffer, thus finally
- the last value is shown for both, which is obviously wrong */
+ * the last value is shown for both, which is obviously wrong */
GString *str = g_string_new (priv->city);
g_string_append (str, " : ");
@@ -455,7 +460,12 @@ create_weather (ECalBackendWeather *cbw, WeatherInfo *report, gboolean is_foreca
}
static gboolean
-e_cal_backend_weather_get_backend_property (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *prop_name, gchar **prop_value, GError **perror)
+e_cal_backend_weather_get_backend_property (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ gchar **prop_value,
+ GError **perror)
{
gboolean processed = TRUE;
@@ -485,7 +495,11 @@ e_cal_backend_weather_get_backend_property (ECalBackendSync *backend, EDataCal *
}
static void
-e_cal_backend_weather_open (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, gboolean only_if_exists, GError **perror)
+e_cal_backend_weather_open (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ gboolean only_if_exists,
+ GError **perror)
{
ECalBackendWeather *cbw;
ECalBackendWeatherPrivate *priv;
@@ -529,7 +543,10 @@ e_cal_backend_weather_open (ECalBackendSync *backend, EDataCal *cal, GCancellabl
}
static void
-e_cal_backend_weather_refresh (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, GError **perror)
+e_cal_backend_weather_refresh (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ GError **perror)
{
ECalBackendWeather *cbw;
ECalBackendWeatherPrivate *priv;
@@ -550,7 +567,10 @@ e_cal_backend_weather_refresh (ECalBackendSync *backend, EDataCal *cal, GCancell
}
static void
-e_cal_backend_weather_remove (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, GError **perror)
+e_cal_backend_weather_remove (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ GError **perror)
{
ECalBackendWeather *cbw;
ECalBackendWeatherPrivate *priv;
@@ -568,13 +588,23 @@ e_cal_backend_weather_remove (ECalBackendSync *backend, EDataCal *cal, GCancella
}
static void
-e_cal_backend_weather_receive_objects (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *calobj, GError **perror)
+e_cal_backend_weather_receive_objects (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ GError **perror)
{
g_propagate_error (perror, EDC_ERROR (PermissionDenied));
}
static void
-e_cal_backend_weather_get_object (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *uid, const gchar *rid, gchar **object, GError **error)
+e_cal_backend_weather_get_object (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid,
+ gchar **object,
+ GError **error)
{
ECalBackendWeather *cbw = E_CAL_BACKEND_WEATHER (backend);
ECalBackendWeatherPrivate *priv = cbw->priv;
@@ -594,7 +624,12 @@ e_cal_backend_weather_get_object (ECalBackendSync *backend, EDataCal *cal, GCanc
}
static void
-e_cal_backend_weather_get_object_list (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *sexp_string, GSList **objects, GError **perror)
+e_cal_backend_weather_get_object_list (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *sexp_string,
+ GSList **objects,
+ GError **perror)
{
ECalBackendWeather *cbw = E_CAL_BACKEND_WEATHER (backend);
ECalBackendWeatherPrivate *priv = cbw->priv;
@@ -629,7 +664,11 @@ e_cal_backend_weather_get_object_list (ECalBackendSync *backend, EDataCal *cal,
}
static void
-e_cal_backend_weather_add_timezone (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *tzobj, GError **error)
+e_cal_backend_weather_add_timezone (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *tzobj,
+ GError **error)
{
ECalBackendWeather *cbw;
ECalBackendWeatherPrivate *priv;
@@ -637,7 +676,7 @@ e_cal_backend_weather_add_timezone (ECalBackendSync *backend, EDataCal *cal, GCa
icaltimezone *zone;
const gchar *tzid;
- cbw = (ECalBackendWeather*) backend;
+ cbw = (ECalBackendWeather *) backend;
e_return_data_cal_error_if_fail (E_IS_CAL_BACKEND_WEATHER (cbw), InvalidArg);
e_return_data_cal_error_if_fail (tzobj != NULL, InvalidArg);
@@ -664,7 +703,14 @@ e_cal_backend_weather_add_timezone (ECalBackendSync *backend, EDataCal *cal, GCa
}
static void
-e_cal_backend_weather_get_free_busy (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const GSList *users, time_t start, time_t end, GSList **freebusy, GError **perror)
+e_cal_backend_weather_get_free_busy (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const GSList *users,
+ time_t start,
+ time_t end,
+ GSList **freebusy,
+ GError **perror)
{
/* Weather doesn't count as busy time */
icalcomponent *vfb = icalcomponent_new_vfreebusy ();
@@ -680,7 +726,8 @@ e_cal_backend_weather_get_free_busy (ECalBackendSync *backend, EDataCal *cal, GC
}
static void
-e_cal_backend_weather_start_view (ECalBackend *backend, EDataCalView *query)
+e_cal_backend_weather_start_view (ECalBackend *backend,
+ EDataCalView *query)
{
ECalBackendWeather *cbw;
ECalBackendWeatherPrivate *priv;
@@ -732,7 +779,8 @@ e_cal_backend_weather_start_view (ECalBackend *backend, EDataCalView *query)
}
static void
-e_cal_backend_weather_set_online (ECalBackend *backend, gboolean is_online)
+e_cal_backend_weather_set_online (ECalBackend *backend,
+ gboolean is_online)
{
ECalBackendWeather *cbw;
ECalBackendWeatherPrivate *priv;
@@ -758,7 +806,8 @@ e_cal_backend_weather_set_online (ECalBackend *backend, gboolean is_online)
}
static icaltimezone *
-e_cal_backend_weather_internal_get_timezone (ECalBackend *backend, const gchar *tzid)
+e_cal_backend_weather_internal_get_timezone (ECalBackend *backend,
+ const gchar *tzid)
{
icaltimezone *zone;
diff --git a/calendar/backends/weather/e-weather-source-ccf.c b/calendar/backends/weather/e-weather-source-ccf.c
index e1924a5..3055e4c 100644
--- a/calendar/backends/weather/e-weather-source-ccf.c
+++ b/calendar/backends/weather/e-weather-source-ccf.c
@@ -64,7 +64,10 @@ struct search_struct
};
static gboolean
-find_location_func (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *node, gpointer data)
+find_location_func (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *node,
+ gpointer data)
{
WeatherLocation *wl = NULL;
struct search_struct *search = (struct search_struct *) data;
@@ -83,7 +86,8 @@ find_location_func (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *node, g
}
static WeatherLocation *
-find_location (const gchar *code_name, gboolean is_old)
+find_location (const gchar *code_name,
+ gboolean is_old)
{
GtkTreeModel *model;
gchar **ids;
@@ -114,7 +118,7 @@ done:
return search.location;
}
-EWeatherSource*
+EWeatherSource *
e_weather_source_ccf_new (const gchar *uri)
{
/* Old URI is formatted as weather://ccf/AAA[/BBB] - AAA is the 3-letter station
@@ -147,7 +151,7 @@ e_weather_source_ccf_new (const gchar *uri)
}
#if 0
-static GSList*
+static GSList *
tokenize (gchar *buffer)
{
gchar *token;
@@ -162,7 +166,8 @@ tokenize (gchar *buffer)
}
static void
-date2tm (gchar *date, struct tm *times)
+date2tm (gchar *date,
+ struct tm *times)
{
gchar tmp[3];
time_t curtime = time (NULL);
@@ -235,7 +240,9 @@ decodePOP (gchar data)
}
static void
-decodeSnowfall (gchar *data, gfloat *low, gfloat *high)
+decodeSnowfall (gchar *data,
+ gfloat *low,
+ gfloat *high)
{
gchar num[3];
num[2] = '\0';
@@ -252,11 +259,12 @@ ftoc (gchar *data)
gint fahrenheit = atoi (data);
if (fahrenheit >= 900)
fahrenheit = (fahrenheit - 900) * -1;
- return ((gfloat)(fahrenheit-32)) * 5.0f / 9.0f;
+ return ((gfloat)(fahrenheit - 32)) * 5.0f / 9.0f;
}
static void
-e_weather_source_ccf_do_parse (EWeatherSourceCCF *source, gchar *buffer)
+e_weather_source_ccf_do_parse (EWeatherSourceCCF *source,
+ gchar *buffer)
{
/* CCF gives us either 2 or 7 days of forecast data. IFPS WFO's
* will produce 7 day forecasts, whereas pre-IFPS WFO's are only
@@ -333,7 +341,7 @@ e_weather_source_ccf_do_parse (EWeatherSourceCCF *source, gchar *buffer)
if (tms.tm_hour >= 12)
base += 43200;
for (i = 0; i < 7; i++)
- forecasts[i].date = base + 86400*i;
+ forecasts[i].date = base + 86400 * i;
if (current == NULL || strlen (current->data) == 3) {
/* We've got a pre-IFPS station. Realloc and return */
@@ -400,7 +408,8 @@ e_weather_source_ccf_do_parse (EWeatherSourceCCF *source, gchar *buffer)
#endif
static void
-parse_done (WeatherInfo *info, gpointer data)
+parse_done (WeatherInfo *info,
+ gpointer data)
{
EWeatherSourceCCF *ccfsource = (EWeatherSourceCCF *) data;
@@ -420,7 +429,7 @@ e_weather_source_ccf_parse (EWeatherSource *source,
EWeatherSourceFinished done,
gpointer data)
{
- EWeatherSourceCCF *ccfsource = (EWeatherSourceCCF*) source;
+ EWeatherSourceCCF *ccfsource = (EWeatherSourceCCF *) source;
WeatherPrefs prefs;
ccfsource->finished_data = data;
diff --git a/calendar/libecal/e-cal-check-timezones.c b/calendar/libecal/e-cal-check-timezones.c
index 4486553..2c63601 100644
--- a/calendar/libecal/e-cal-check-timezones.c
+++ b/calendar/libecal/e-cal-check-timezones.c
@@ -36,34 +36,35 @@
* Currently simply strips a suffix introduced by a hyphen,
* as in "America/Denver-(Standard)".
*/
-static const gchar *e_cal_match_location (const gchar *location)
+static const gchar *
+e_cal_match_location (const gchar *location)
{
- icaltimezone *icomp;
- const gchar *tail;
- gsize len;
- gchar *buffer;
-
- icomp = icaltimezone_get_builtin_timezone (location);
- if (icomp) {
- return icaltimezone_get_tzid (icomp);
- }
-
- /* try a bit harder by stripping trailing suffix */
- tail = strrchr (location, '-');
- len = tail ? (tail - location) : strlen (location);
- buffer = g_malloc (len + 1);
-
- if (buffer) {
- memcpy (buffer, location, len);
- buffer[len] = 0;
- icomp = icaltimezone_get_builtin_timezone (buffer);
- g_free (buffer);
+ icaltimezone *icomp;
+ const gchar *tail;
+ gsize len;
+ gchar *buffer;
+
+ icomp = icaltimezone_get_builtin_timezone (location);
if (icomp) {
- return icaltimezone_get_tzid (icomp);
+ return icaltimezone_get_tzid (icomp);
}
- }
- return NULL;
+ /* try a bit harder by stripping trailing suffix */
+ tail = strrchr (location, '-');
+ len = tail ? (tail - location) : strlen (location);
+ buffer = g_malloc (len + 1);
+
+ if (buffer) {
+ memcpy (buffer, location, len);
+ buffer[len] = 0;
+ icomp = icaltimezone_get_builtin_timezone (buffer);
+ g_free (buffer);
+ if (icomp) {
+ return icaltimezone_get_tzid (icomp);
+ }
+ }
+
+ return NULL;
}
/**
@@ -78,127 +79,129 @@ static const gchar *e_cal_match_location (const gchar *location)
const gchar *
e_cal_match_tzid (const gchar *tzid)
{
- const gchar *location;
- const gchar *systzid = NULL;
- gsize len = strlen (tzid);
- gssize eostr;
-
- /*
- * Try without any trailing spaces/digits: they might have been added
- * by e_cal_check_timezones() in order to distinguish between
- * different incompatible definitions. At that time mapping
- * to system time zones must have failed, but perhaps now
- * we have better code and it succeeds...
- */
- eostr = len - 1;
- while (eostr >= 0 &&
- isdigit (tzid[eostr])) {
- eostr--;
- }
- while (eostr >= 0 &&
- isspace (tzid[eostr])) {
- eostr--;
- }
- if (eostr + 1 < len) {
- gchar *strippedtzid = g_strndup (tzid, eostr + 1);
- if (strippedtzid) {
- systzid = e_cal_match_tzid (strippedtzid);
- g_free (strippedtzid);
- if (systzid) {
- goto done;
- }
+ const gchar *location;
+ const gchar *systzid = NULL;
+ gsize len = strlen (tzid);
+ gssize eostr;
+
+ /*
+ * Try without any trailing spaces/digits: they might have been added
+ * by e_cal_check_timezones() in order to distinguish between
+ * different incompatible definitions. At that time mapping
+ * to system time zones must have failed, but perhaps now
+ * we have better code and it succeeds...
+ */
+ eostr = len - 1;
+ while (eostr >= 0 && isdigit (tzid[eostr])) {
+ eostr--;
+ }
+ while (eostr >= 0 && isspace (tzid[eostr])) {
+ eostr--;
}
- }
-
- /*
- * old-style Evolution: /softwarestudio.org/Olson_20011030_5/America/Denver
- *
- * jump from one slash to the next and check whether the remainder
- * is a known location; start with the whole string (just in case)
- */
- for (location = tzid;
- location && location[0];
- location = strchr (location + 1, '/')) {
- systzid = e_cal_match_location (location[0] == '/' ?
- location + 1 :
- location);
- if (systzid) {
- goto done;
+ if (eostr + 1 < len) {
+ gchar *strippedtzid = g_strndup (tzid, eostr + 1);
+ if (strippedtzid) {
+ systzid = e_cal_match_tzid (strippedtzid);
+ g_free (strippedtzid);
+ if (systzid) {
+ goto done;
+ }
+ }
}
- }
- /* TODO: lookup table for Exchange TZIDs */
+ /*
+ * old-style Evolution: /softwarestudio.org/Olson_20011030_5/America/Denver
+ *
+ * jump from one slash to the next and check whether the remainder
+ * is a known location; start with the whole string (just in case)
+ */
+ for (location = tzid;
+ location && location[0];
+ location = strchr (location + 1, '/')) {
+ systzid = e_cal_match_location (
+ location[0] == '/' ?
+ location + 1 : location);
+ if (systzid) {
+ goto done;
+ }
+ }
+
+ /* TODO: lookup table for Exchange TZIDs */
done:
- if (systzid && !strcmp(systzid, "UTC")) {
- /**
- * UTC is special: it doesn't have a real VTIMEZONE in
- * EDS. Matching some pseudo VTTIMEZONE with UTC in the TZID
- * to our internal UTC "timezone" breaks
- * e_cal_check_timezones() (it patches the event to use
- * TZID=UTC, which cannot be exported correctly later on) and
- * e_cal_get_timezone() (triggers an assert).
- *
- * So better avoid matching against it...
- */
- return NULL;
- } else {
- return systzid;
- }
+ if (systzid && !strcmp(systzid, "UTC")) {
+ /**
+ * UTC is special: it doesn't have a real VTIMEZONE in
+ * EDS. Matching some pseudo VTTIMEZONE with UTC in the TZID
+ * to our internal UTC "timezone" breaks
+ * e_cal_check_timezones() (it patches the event to use
+ * TZID=UTC, which cannot be exported correctly later on) and
+ * e_cal_get_timezone() (triggers an assert).
+ *
+ * So better avoid matching against it...
+ */
+ return NULL;
+ } else {
+ return systzid;
+ }
}
-static void patch_tzids (icalcomponent *subcomp,
- GHashTable *mapping)
+static void
+patch_tzids (icalcomponent *subcomp,
+ GHashTable *mapping)
{
- gchar *tzid = NULL;
-
- if (icalcomponent_isa (subcomp) != ICAL_VTIMEZONE_COMPONENT) {
- icalproperty *prop = icalcomponent_get_first_property (subcomp,
- ICAL_ANY_PROPERTY);
- while (prop) {
- icalparameter *param = icalproperty_get_first_parameter (prop,
- ICAL_TZID_PARAMETER);
- while (param) {
- const gchar *oldtzid;
- const gchar *newtzid;
-
- g_free (tzid);
- tzid = g_strdup (icalparameter_get_tzid (param));
-
- if (!g_hash_table_lookup_extended (mapping,
- tzid,
- (gpointer *)&oldtzid,
- (gpointer *)&newtzid)) {
- /* Corresponding VTIMEZONE not seen before! */
- newtzid = e_cal_match_tzid (tzid);
- }
- if (newtzid) {
- icalparameter_set_tzid (param, newtzid);
+ gchar *tzid = NULL;
+
+ if (icalcomponent_isa (subcomp) != ICAL_VTIMEZONE_COMPONENT) {
+ icalproperty *prop = icalcomponent_get_first_property (
+ subcomp, ICAL_ANY_PROPERTY);
+ while (prop) {
+ icalparameter *param = icalproperty_get_first_parameter (
+ prop, ICAL_TZID_PARAMETER);
+ while (param) {
+ const gchar *oldtzid;
+ const gchar *newtzid;
+
+ g_free (tzid);
+ tzid = g_strdup (icalparameter_get_tzid (param));
+
+ if (!g_hash_table_lookup_extended (
+ mapping, tzid,
+ (gpointer *) &oldtzid,
+ (gpointer *) &newtzid)) {
+ /* Corresponding VTIMEZONE not seen before! */
+ newtzid = e_cal_match_tzid (tzid);
+ }
+ if (newtzid) {
+ icalparameter_set_tzid (param, newtzid);
+ }
+ param = icalproperty_get_next_parameter (
+ prop, ICAL_TZID_PARAMETER);
+ }
+ prop = icalcomponent_get_next_property (
+ subcomp, ICAL_ANY_PROPERTY);
}
- param = icalproperty_get_next_parameter (prop,
- ICAL_TZID_PARAMETER);
- }
- prop = icalcomponent_get_next_property (subcomp,
- ICAL_ANY_PROPERTY);
}
- }
- g_free (tzid);
+ g_free (tzid);
}
-static void addsystemtz (gpointer key,
- gpointer value,
- gpointer user_data)
+static void
+addsystemtz (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
- const gchar *tzid = key;
- icalcomponent *comp = user_data;
- icaltimezone *zone;
-
- zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
- if (zone) {
- icalcomponent_add_component (comp,
- icalcomponent_new_clone (icaltimezone_get_component (zone)));
- }
+ const gchar *tzid = key;
+ icalcomponent *comp = user_data;
+ icaltimezone *zone;
+
+ zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
+ if (zone) {
+ icalcomponent_add_component (
+ comp,
+ icalcomponent_new_clone (
+ icaltimezone_get_component (zone)));
+ }
}
/**
@@ -266,196 +269,196 @@ e_cal_check_timezones (icalcomponent *comp,
gconstpointer custom,
GError **error)
{
- gboolean success = TRUE;
- icalcomponent *subcomp = NULL;
- icaltimezone *zone = icaltimezone_new ();
- gchar *key = NULL, *value = NULL;
- gchar *buffer = NULL;
- gchar *zonestr = NULL;
- gchar *tzid = NULL;
- GList *l;
-
- /** a hash from old to new tzid; strings dynamically allocated */
- GHashTable *mapping = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
-
- /** a hash of all system time zone IDs which have to be added; strings are shared with mapping hash */
- GHashTable *systemtzids = g_hash_table_new (g_str_hash, g_str_equal);
-
- *error = NULL;
-
- if (!mapping || !zone) {
- goto nomem;
- }
-
- /* iterate over all VTIMEZONE definitions */
- subcomp = icalcomponent_get_first_component (comp,
- ICAL_VTIMEZONE_COMPONENT);
- while (subcomp) {
- if (icaltimezone_set_component (zone, subcomp)) {
- g_free (tzid);
- tzid = g_strdup (icaltimezone_get_tzid (zone));
- if (tzid) {
- const gchar *newtzid = e_cal_match_tzid (tzid);
- if (newtzid) {
- /* matched against system time zone */
- g_free (key);
- key = g_strdup (tzid);
- if (!key) {
- goto nomem;
- }
-
- g_free (value);
- value = g_strdup (newtzid);
- if (!value) {
- goto nomem;
- }
-
- g_hash_table_insert (mapping, key, value);
- g_hash_table_insert (systemtzids, value, NULL);
- key =
- value = NULL;
- } else {
- gint counter;
-
- zonestr = icalcomponent_as_ical_string_r (subcomp);
-
- /* check for collisions with existing timezones */
- for (counter = 0;
- counter < 100 /* sanity limit */;
- counter++) {
- icaltimezone *existing_zone;
-
- if (counter) {
- g_free (value);
- value = g_strdup_printf("%s %d", tzid, counter);
- }
- existing_zone = tzlookup (counter ? value : tzid,
- custom,
- error);
- if (!existing_zone) {
- if (*error) {
- goto failed;
- } else {
- break;
- }
- }
- g_free (buffer);
- buffer = icalcomponent_as_ical_string_r (icaltimezone_get_component (existing_zone));
-
- if (counter) {
- gchar *fulltzid = g_strdup_printf("TZID:%s", value);
- gsize baselen = strlen("TZID:") + strlen(tzid);
- gsize fulllen = strlen (fulltzid);
- gchar *tzidprop;
- /*
- * Map TZID with counter suffix back to basename.
- */
- tzidprop = strstr (buffer, fulltzid);
- if (tzidprop) {
- memmove (tzidprop + baselen,
- tzidprop + fulllen,
- strlen (tzidprop + fulllen) + 1);
- }
- g_free (fulltzid);
- }
+ gboolean success = TRUE;
+ icalcomponent *subcomp = NULL;
+ icaltimezone *zone = icaltimezone_new ();
+ gchar *key = NULL, *value = NULL;
+ gchar *buffer = NULL;
+ gchar *zonestr = NULL;
+ gchar *tzid = NULL;
+ GList *l;
- /*
- * If the strings are identical, then the
- * VTIMEZONE definitions are identical. If
- * they are not identical, then VTIMEZONE
- * definitions might still be semantically
- * correct and we waste some space by
- * needlesly duplicating the VTIMEZONE. This
- * is expected to occur rarely (if at all) in
- * practice.
- */
- if (!strcmp (zonestr, buffer)) {
- break;
- }
- }
-
- if (!counter) {
- /* does not exist, nothing to do */
- } else {
- /* timezone renamed */
- icalproperty *prop = icalcomponent_get_first_property (subcomp,
- ICAL_TZID_PROPERTY);
- while (prop) {
- icalproperty_set_value_from_string(prop, value, "NO");
- prop = icalcomponent_get_next_property (subcomp,
- ICAL_ANY_PROPERTY);
+ /** a hash from old to new tzid; strings dynamically allocated */
+ GHashTable *mapping = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+
+ /** a hash of all system time zone IDs which have to be added; strings are shared with mapping hash */
+ GHashTable *systemtzids = g_hash_table_new (g_str_hash, g_str_equal);
+
+ *error = NULL;
+
+ if (!mapping || !zone) {
+ goto nomem;
+ }
+
+ /* iterate over all VTIMEZONE definitions */
+ subcomp = icalcomponent_get_first_component (
+ comp, ICAL_VTIMEZONE_COMPONENT);
+ while (subcomp) {
+ if (icaltimezone_set_component (zone, subcomp)) {
+ g_free (tzid);
+ tzid = g_strdup (icaltimezone_get_tzid (zone));
+ if (tzid) {
+ const gchar *newtzid = e_cal_match_tzid (tzid);
+ if (newtzid) {
+ /* matched against system time zone */
+ g_free (key);
+ key = g_strdup (tzid);
+ if (!key) {
+ goto nomem;
+ }
+
+ g_free (value);
+ value = g_strdup (newtzid);
+ if (!value) {
+ goto nomem;
+ }
+
+ g_hash_table_insert (mapping, key, value);
+ g_hash_table_insert (systemtzids, value, NULL);
+ key =
+ value = NULL;
+ } else {
+ gint counter;
+
+ zonestr = icalcomponent_as_ical_string_r (subcomp);
+
+ /* check for collisions with existing timezones */
+ for (counter = 0;
+ counter < 100 /* sanity limit */;
+ counter++) {
+ icaltimezone *existing_zone;
+
+ if (counter) {
+ g_free (value);
+ value = g_strdup_printf("%s %d", tzid, counter);
+ }
+ existing_zone = tzlookup (
+ counter ? value : tzid,
+ custom, error);
+ if (!existing_zone) {
+ if (*error) {
+ goto failed;
+ } else {
+ break;
+ }
+ }
+ g_free (buffer);
+ buffer = icalcomponent_as_ical_string_r (icaltimezone_get_component (existing_zone));
+
+ if (counter) {
+ gchar *fulltzid = g_strdup_printf("TZID:%s", value);
+ gsize baselen = strlen("TZID:") + strlen(tzid);
+ gsize fulllen = strlen (fulltzid);
+ gchar *tzidprop;
+ /*
+ * Map TZID with counter suffix back to basename.
+ */
+ tzidprop = strstr (buffer, fulltzid);
+ if (tzidprop) {
+ memmove (
+ tzidprop + baselen,
+ tzidprop + fulllen,
+ strlen (tzidprop + fulllen) + 1);
+ }
+ g_free (fulltzid);
+ }
+
+ /*
+ * If the strings are identical, then the
+ * VTIMEZONE definitions are identical. If
+ * they are not identical, then VTIMEZONE
+ * definitions might still be semantically
+ * correct and we waste some space by
+ * needlesly duplicating the VTIMEZONE. This
+ * is expected to occur rarely (if at all) in
+ * practice.
+ */
+ if (!strcmp (zonestr, buffer)) {
+ break;
+ }
+ }
+
+ if (!counter) {
+ /* does not exist, nothing to do */
+ } else {
+ /* timezone renamed */
+ icalproperty *prop = icalcomponent_get_first_property (
+ subcomp, ICAL_TZID_PROPERTY);
+ while (prop) {
+ icalproperty_set_value_from_string(prop, value, "NO");
+ prop = icalcomponent_get_next_property (
+ subcomp, ICAL_ANY_PROPERTY);
+ }
+ g_free (key);
+ key = g_strdup (tzid);
+ g_hash_table_insert (mapping, key, value);
+ key = value = NULL;
+ }
+ }
}
- g_free (key);
- key = g_strdup (tzid);
- g_hash_table_insert (mapping, key, value);
- key =
- value = NULL;
- }
}
- }
+
+ subcomp = icalcomponent_get_next_component (
+ comp, ICAL_VTIMEZONE_COMPONENT);
}
- subcomp = icalcomponent_get_next_component (comp,
- ICAL_VTIMEZONE_COMPONENT);
- }
-
- /*
- * now replace all TZID parameters in place
- */
- subcomp = icalcomponent_get_first_component (comp,
- ICAL_ANY_COMPONENT);
- while (subcomp) {
- /*
- * Leave VTIMEZONE unchanged, iterate over properties of
- * everything else.
- *
- * Note that no attempt is made to remove unused VTIMEZONE
- * definitions. That would just make the code more complex for
- * little additional gain. However, newly used time zones are
- * added below.
- */
- patch_tzids (subcomp, mapping);
- subcomp = icalcomponent_get_next_component (comp,
- ICAL_ANY_COMPONENT);
- }
-
- for (l = comps; l; l = l->next) {
- patch_tzids (l->data, mapping);
- }
-
- /*
- * add system time zones that we mapped to: adding them ensures
- * that the VCALENDAR remains consistent
- */
- g_hash_table_foreach (systemtzids, addsystemtz, comp);
-
- goto done;
+ /*
+ * now replace all TZID parameters in place
+ */
+ subcomp = icalcomponent_get_first_component (
+ comp, ICAL_ANY_COMPONENT);
+ while (subcomp) {
+ /*
+ * Leave VTIMEZONE unchanged, iterate over properties of
+ * everything else.
+ *
+ * Note that no attempt is made to remove unused VTIMEZONE
+ * definitions. That would just make the code more complex for
+ * little additional gain. However, newly used time zones are
+ * added below.
+ */
+ patch_tzids (subcomp, mapping);
+ subcomp = icalcomponent_get_next_component (
+ comp, ICAL_ANY_COMPONENT);
+ }
+
+ for (l = comps; l; l = l->next) {
+ patch_tzids (l->data, mapping);
+ }
+
+ /*
+ * add system time zones that we mapped to: adding them ensures
+ * that the VCALENDAR remains consistent
+ */
+ g_hash_table_foreach (systemtzids, addsystemtz, comp);
+
+ goto done;
nomem:
- /* set gerror for "out of memory" if possible, otherwise abort via g_error() */
- *error = g_error_new(E_CALENDAR_ERROR, E_CALENDAR_STATUS_OTHER_ERROR, "out of memory");
- if (!*error) {
- g_error("e_cal_check_timezones(): out of memory, cannot proceed - sorry!");
- }
+ /* set gerror for "out of memory" if possible, otherwise abort via g_error() */
+ *error = g_error_new(E_CALENDAR_ERROR, E_CALENDAR_STATUS_OTHER_ERROR, "out of memory");
+ if (!*error) {
+ g_error("e_cal_check_timezones(): out of memory, cannot proceed - sorry!");
+ }
failed:
- /* gerror should have been set already */
- success = FALSE;
+ /* gerror should have been set already */
+ success = FALSE;
done:
- if (mapping) {
- g_hash_table_destroy (mapping);
- }
- if (systemtzids) {
- g_hash_table_destroy (systemtzids);
- }
- if (zone) {
- icaltimezone_free (zone, 1);
- }
- g_free (tzid);
- g_free (zonestr);
- g_free (buffer);
- g_free (key);
- g_free (value);
-
- return success;
+ if (mapping) {
+ g_hash_table_destroy (mapping);
+ }
+ if (systemtzids) {
+ g_hash_table_destroy (systemtzids);
+ }
+ if (zone) {
+ icaltimezone_free (zone, 1);
+ }
+ g_free (tzid);
+ g_free (zonestr);
+ g_free (buffer);
+ g_free (key);
+ g_free (value);
+
+ return success;
}
/**
@@ -578,16 +581,15 @@ e_cal_tzlookup_icomp (const gchar *tzid,
* Since: 3.2
**/
gboolean
-e_cal_client_check_timezones (
- icalcomponent *comp,
- GList *comps,
- icaltimezone *(*tzlookup) (const gchar *tzid,
- gconstpointer ecalclient,
- GCancellable *cancellable,
- GError **error),
- gconstpointer ecalclient,
- GCancellable *cancellable,
- GError **error)
+e_cal_client_check_timezones (icalcomponent *comp,
+ GList *comps,
+ icaltimezone *(*tzlookup) (const gchar *tzid,
+ gconstpointer ecalclient,
+ GCancellable *cancellable,
+ GError **error),
+ gconstpointer ecalclient,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean success = TRUE;
icalcomponent *subcomp = NULL;
@@ -782,8 +784,8 @@ e_cal_client_check_timezones (
*/
icaltimezone *
e_cal_client_tzlookup (const gchar *tzid,
- gconstpointer ecalclient,
- GCancellable *cancellable,
+ gconstpointer ecalclient,
+ GCancellable *cancellable,
GError **error)
{
ECalClient *cal_client = (ECalClient *) ecalclient;
@@ -824,9 +826,9 @@ e_cal_client_tzlookup (const gchar *tzid,
*/
icaltimezone *
e_cal_client_tzlookup_icomp (const gchar *tzid,
- gconstpointer custom,
- GCancellable *cancellable,
- GError **error)
+ gconstpointer custom,
+ GCancellable *cancellable,
+ GError **error)
{
icalcomponent *icomp = (icalcomponent *) custom;
diff --git a/calendar/libecal/e-cal-client-view.c b/calendar/libecal/e-cal-client-view.c
index c20d661..0de0edf 100644
--- a/calendar/libecal/e-cal-client-view.c
+++ b/calendar/libecal/e-cal-client-view.c
@@ -113,7 +113,9 @@ build_id_list (const gchar * const *seq)
}
static void
-objects_added_cb (EGdbusCalView *gdbus_calview, const gchar * const *objects, ECalClientView *view)
+objects_added_cb (EGdbusCalView *gdbus_calview,
+ const gchar * const *objects,
+ ECalClientView *view)
{
GSList *list;
@@ -135,7 +137,9 @@ objects_added_cb (EGdbusCalView *gdbus_calview, const gchar * const *objects, EC
}
static void
-objects_modified_cb (EGdbusCalView *gdbus_calview, const gchar * const *objects, ECalClientView *view)
+objects_modified_cb (EGdbusCalView *gdbus_calview,
+ const gchar * const *objects,
+ ECalClientView *view)
{
GSList *list;
@@ -157,7 +161,9 @@ objects_modified_cb (EGdbusCalView *gdbus_calview, const gchar * const *objects,
}
static void
-objects_removed_cb (EGdbusCalView *gdbus_calview, const gchar * const *uids, ECalClientView *view)
+objects_removed_cb (EGdbusCalView *gdbus_calview,
+ const gchar * const *uids,
+ ECalClientView *view)
{
GSList *list;
@@ -179,7 +185,10 @@ objects_removed_cb (EGdbusCalView *gdbus_calview, const gchar * const *uids, ECa
}
static void
-progress_cb (EGdbusCalView *gdbus_calview, guint percent, const gchar *message, ECalClientView *view)
+progress_cb (EGdbusCalView *gdbus_calview,
+ guint percent,
+ const gchar *message,
+ ECalClientView *view)
{
g_return_if_fail (E_IS_CAL_CLIENT_VIEW (view));
@@ -190,7 +199,9 @@ progress_cb (EGdbusCalView *gdbus_calview, guint percent, const gchar *message,
}
static void
-complete_cb (EGdbusCalView *gdbus_calview, const gchar * const *arg_error, ECalClientView *view)
+complete_cb (EGdbusCalView *gdbus_calview,
+ const gchar * const *arg_error,
+ ECalClientView *view)
{
GError *error = NULL;
@@ -216,7 +227,10 @@ e_cal_client_view_init (ECalClientView *view)
}
static void
-cal_client_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+cal_client_view_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ECalClientView *view;
ECalClientViewPrivate *priv;
@@ -246,7 +260,10 @@ cal_client_view_set_property (GObject *object, guint property_id, const GValue *
}
static void
-cal_client_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+cal_client_view_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ECalClientView *view;
ECalClientViewPrivate *priv;
@@ -394,7 +411,8 @@ e_cal_client_view_class_init (ECalClientViewClass *klass)
* Returns: A newly-created view object, or NULL if the request failed.
**/
ECalClientView *
-_e_cal_client_view_new (ECalClient *client, EGdbusCalView *gdbus_calview)
+_e_cal_client_view_new (ECalClient *client,
+ EGdbusCalView *gdbus_calview)
{
ECalClientView *view;
@@ -445,7 +463,8 @@ e_cal_client_view_is_running (ECalClientView *view)
* Starts a live query to the calendar/tasks backend.
**/
void
-e_cal_client_view_start (ECalClientView *view, GError **error)
+e_cal_client_view_start (ECalClientView *view,
+ GError **error)
{
ECalClientViewPrivate *priv;
@@ -476,7 +495,8 @@ e_cal_client_view_start (ECalClientView *view, GError **error)
* Stops a live query to the calendar/tasks backend.
*/
void
-e_cal_client_view_stop (ECalClientView *view, GError **error)
+e_cal_client_view_stop (ECalClientView *view,
+ GError **error)
{
ECalClientViewPrivate *priv;
@@ -516,7 +536,9 @@ e_cal_client_view_stop (ECalClientView *view, GError **error)
* it will simply return object as is stored in the cache.
**/
void
-e_cal_client_view_set_fields_of_interest (ECalClientView *view, const GSList *fields_of_interest, GError **error)
+e_cal_client_view_set_fields_of_interest (ECalClientView *view,
+ const GSList *fields_of_interest,
+ GError **error)
{
ECalClientViewPrivate *priv;
diff --git a/calendar/libecal/e-cal-client.c b/calendar/libecal/e-cal-client.c
index ba0e15d..9f5aa91 100644
--- a/calendar/libecal/e-cal-client.c
+++ b/calendar/libecal/e-cal-client.c
@@ -153,7 +153,8 @@ e_cal_client_error_to_string (ECalClientError code)
* Returned pointer should be freed with g_error_free().
**/
GError *
-e_cal_client_error_create (ECalClientError code, const gchar *custom_msg)
+e_cal_client_error_create (ECalClientError code,
+ const gchar *custom_msg)
{
return g_error_new_literal (E_CAL_CLIENT_ERROR, code, custom_msg ? custom_msg : e_cal_client_error_to_string (code));
}
@@ -164,7 +165,8 @@ e_cal_client_error_create (ECalClientError code, const gchar *custom_msg)
* leave it alone.
*/
static gboolean
-unwrap_dbus_error (GError *error, GError **client_error)
+unwrap_dbus_error (GError *error,
+ GError **client_error)
{
#define err(a,b) "org.gnome.evolution.dataserver.Calendar." a, b
static EClientErrorsList cal_errors[] = {
@@ -246,7 +248,10 @@ gdbus_cal_factory_proxy_disconnect (GDBusConnection *connection)
}
static void
-gdbus_cal_factory_proxy_closed_cb (GDBusConnection *connection, gboolean remote_peer_vanished, GError *error, gpointer user_data)
+gdbus_cal_factory_proxy_closed_cb (GDBusConnection *connection,
+ gboolean remote_peer_vanished,
+ GError *error,
+ gpointer user_data)
{
GError *err = NULL;
@@ -268,10 +273,16 @@ gdbus_cal_factory_proxy_closed_cb (GDBusConnection *connection, gboolean remote_
}
static void
-gdbus_cal_factory_connection_gone_cb (GDBusConnection *connection, const gchar *sender_name, const gchar *object_path, const gchar *interface_name, const gchar *signal_name, GVariant *parameters, gpointer user_data)
+gdbus_cal_factory_connection_gone_cb (GDBusConnection *connection,
+ const gchar *sender_name,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *signal_name,
+ GVariant *parameters,
+ gpointer user_data)
{
/* signal subscription takes care of correct parameters,
- thus just do what is to be done here */
+ * thus just do what is to be done here */
gdbus_cal_factory_proxy_closed_cb (connection, TRUE, NULL, user_data);
}
@@ -323,7 +334,10 @@ static void gdbus_cal_client_disconnect (ECalClient *client);
* Called when the calendar server dies.
*/
static void
-gdbus_cal_client_closed_cb (GDBusConnection *connection, gboolean remote_peer_vanished, GError *error, ECalClient *client)
+gdbus_cal_client_closed_cb (GDBusConnection *connection,
+ gboolean remote_peer_vanished,
+ GError *error,
+ ECalClient *client)
{
GError *err = NULL;
@@ -345,10 +359,16 @@ gdbus_cal_client_closed_cb (GDBusConnection *connection, gboolean remote_peer_va
}
static void
-gdbus_cal_client_connection_gone_cb (GDBusConnection *connection, const gchar *sender_name, const gchar *object_path, const gchar *interface_name, const gchar *signal_name, GVariant *parameters, gpointer user_data)
+gdbus_cal_client_connection_gone_cb (GDBusConnection *connection,
+ const gchar *sender_name,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *signal_name,
+ GVariant *parameters,
+ gpointer user_data)
{
/* signal subscription takes care of correct parameters,
- thus just do what is to be done here */
+ * thus just do what is to be done here */
gdbus_cal_client_closed_cb (connection, TRUE, NULL, user_data);
}
@@ -378,7 +398,9 @@ gdbus_cal_client_disconnect (ECalClient *client)
}
static void
-backend_error_cb (EGdbusCal *object, const gchar *message, ECalClient *client)
+backend_error_cb (EGdbusCal *object,
+ const gchar *message,
+ ECalClient *client)
{
g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
@@ -388,7 +410,9 @@ backend_error_cb (EGdbusCal *object, const gchar *message, ECalClient *client)
}
static void
-readonly_cb (EGdbusCal *object, gboolean readonly, ECalClient *client)
+readonly_cb (EGdbusCal *object,
+ gboolean readonly,
+ ECalClient *client)
{
g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
@@ -397,7 +421,9 @@ readonly_cb (EGdbusCal *object, gboolean readonly, ECalClient *client)
}
static void
-online_cb (EGdbusCal *object, gboolean is_online, ECalClient *client)
+online_cb (EGdbusCal *object,
+ gboolean is_online,
+ ECalClient *client)
{
g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
@@ -406,7 +432,9 @@ online_cb (EGdbusCal *object, gboolean is_online, ECalClient *client)
}
static void
-auth_required_cb (EGdbusCal *object, const gchar * const *credentials_strv, ECalClient *client)
+auth_required_cb (EGdbusCal *object,
+ const gchar * const *credentials_strv,
+ ECalClient *client)
{
ECredentials *credentials;
@@ -424,7 +452,9 @@ auth_required_cb (EGdbusCal *object, const gchar * const *credentials_strv, ECal
}
static void
-opened_cb (EGdbusCal *object, const gchar * const *error_strv, ECalClient *client)
+opened_cb (EGdbusCal *object,
+ const gchar * const *error_strv,
+ ECalClient *client)
{
GError *error = NULL;
@@ -440,7 +470,9 @@ opened_cb (EGdbusCal *object, const gchar * const *error_strv, ECalClient *clien
}
static void
-free_busy_data_cb (EGdbusCal *object, const gchar * const *free_busy_strv, ECalClient *client)
+free_busy_data_cb (EGdbusCal *object,
+ const gchar * const *free_busy_strv,
+ ECalClient *client)
{
GSList *ecalcomps = NULL;
gint ii;
@@ -481,7 +513,9 @@ free_busy_data_cb (EGdbusCal *object, const gchar * const *free_busy_strv, ECalC
}
static void
-backend_property_changed_cb (EGdbusCal *object, const gchar * const *name_value_strv, ECalClient *client)
+backend_property_changed_cb (EGdbusCal *object,
+ const gchar * const *name_value_strv,
+ ECalClient *client)
{
gchar *prop_name = NULL, *prop_value = NULL;
@@ -531,7 +565,9 @@ convert_type (ECalClientSourceType type)
* Since: 3.2
**/
ECalClient *
-e_cal_client_new (ESource *source, ECalClientSourceType source_type, GError **error)
+e_cal_client_new (ESource *source,
+ ECalClientSourceType source_type,
+ GError **error)
{
ECalClient *client;
GError *err = NULL;
@@ -652,7 +688,9 @@ e_cal_client_new (ESource *source, ECalClientSourceType source_type, GError **er
* Since: 3.2
**/
ECalClient *
-e_cal_client_new_from_uri (const gchar *uri, ECalClientSourceType source_type, GError **error)
+e_cal_client_new_from_uri (const gchar *uri,
+ ECalClientSourceType source_type,
+ GError **error)
{
ESourceList *source_list = NULL;
ESource *source;
@@ -702,7 +740,8 @@ e_cal_client_new_from_uri (const gchar *uri, ECalClientSourceType source_type, G
* Since: 3.2
**/
ECalClient *
-e_cal_client_new_system (ECalClientSourceType source_type, GError **error)
+e_cal_client_new_system (ECalClientSourceType source_type,
+ GError **error)
{
ESourceList *source_list = NULL;
ESource *source;
@@ -741,7 +780,8 @@ e_cal_client_new_system (ECalClientSourceType source_type, GError **error)
* Since: 3.2
**/
ECalClient *
-e_cal_client_new_default (ECalClientSourceType source_type, GError **error)
+e_cal_client_new_default (ECalClientSourceType source_type,
+ GError **error)
{
ESourceList *source_list = NULL;
ESource *source;
@@ -778,7 +818,8 @@ e_cal_client_new_default (ECalClientSourceType source_type, GError **error)
* Since: 3.2
**/
gboolean
-e_cal_client_set_default (ECalClient *client, GError **error)
+e_cal_client_set_default (ECalClient *client,
+ GError **error)
{
ESource *source;
@@ -806,7 +847,9 @@ e_cal_client_set_default (ECalClient *client, GError **error)
* Since: 3.2
**/
gboolean
-e_cal_client_set_default_source (ESource *source, ECalClientSourceType source_type, GError **error)
+e_cal_client_set_default_source (ESource *source,
+ ECalClientSourceType source_type,
+ GError **error)
{
ESourceList *source_list = NULL;
gboolean res = FALSE;
@@ -844,7 +887,9 @@ e_cal_client_set_default_source (ESource *source, ECalClientSourceType source_ty
* Since: 3.2
**/
gboolean
-e_cal_client_get_sources (ESourceList **sources, ECalClientSourceType source_type, GError **error)
+e_cal_client_get_sources (ESourceList **sources,
+ ECalClientSourceType source_type,
+ GError **error)
{
GConfClient *gconf;
const gchar *key = NULL;
@@ -940,7 +985,7 @@ e_cal_client_get_local_attachment_store (ECalClient *client)
}
/* icaltimezone_copy does a shallow copy while icaltimezone_free tries to free the entire
- the contents inside the structure with libical 0.43. Use this, till eds allows older libical.
+ * the contents inside the structure with libical 0.43. Use this, till eds allows older libical.
*/
static icaltimezone *
copy_timezone (icaltimezone *ozone)
@@ -1155,7 +1200,8 @@ e_cal_client_free_ecalcomp_slist (GSList *ecalcomps)
* it could not be found.
*/
icaltimezone *
-e_cal_client_resolve_tzid_cb (const gchar *tzid, gpointer data)
+e_cal_client_resolve_tzid_cb (const gchar *tzid,
+ gpointer data)
{
ECalClient *client = data;
icaltimezone *zone = NULL;
@@ -1187,7 +1233,10 @@ struct instances_info {
/* Called from cal_recur_generate_instances(); adds an instance to the list */
static gboolean
-add_instance (ECalComponent *comp, time_t start, time_t end, gpointer data)
+add_instance (ECalComponent *comp,
+ time_t start,
+ time_t end,
+ gpointer data)
{
GSList **list;
struct comp_instance *ci;
@@ -1250,7 +1299,8 @@ add_instance (ECalComponent *comp, time_t start, time_t end, gpointer data)
/* Used from g_slist_sort(); compares two struct comp_instance structures */
static gint
-compare_comp_instance (gconstpointer a, gconstpointer b)
+compare_comp_instance (gconstpointer a,
+ gconstpointer b)
{
const struct comp_instance *cia, *cib;
time_t diff;
@@ -1263,7 +1313,8 @@ compare_comp_instance (gconstpointer a, gconstpointer b)
}
static GSList *
-process_detached_instances (GSList *instances, GSList *detached_instances)
+process_detached_instances (GSList *instances,
+ GSList *detached_instances)
{
struct comp_instance *ci, *cid;
GSList *dl, *unprocessed_instances = NULL;
@@ -1368,8 +1419,13 @@ process_detached_instances (GSList *instances, GSList *detached_instances)
}
static void
-generate_instances (ECalClient *client, time_t start, time_t end, GSList *objects, GCancellable *cancellable,
- ECalRecurInstanceFn cb, gpointer cb_data)
+generate_instances (ECalClient *client,
+ time_t start,
+ time_t end,
+ GSList *objects,
+ GCancellable *cancellable,
+ ECalRecurInstanceFn cb,
+ gpointer cb_data)
{
GSList *instances, *detached_instances = NULL;
GSList *l;
@@ -1402,10 +1458,10 @@ generate_instances (ECalClient *client, time_t start, time_t end, GSList *object
e_cal_component_get_dtend (comp, &dtend);
/* For DATE-TIME values with a TZID, we use
- e_cal_resolve_tzid_cb to resolve the TZID.
- For DATE values and DATE-TIME values without a
- TZID (i.e. floating times) we use the default
- timezone. */
+ * e_cal_resolve_tzid_cb to resolve the TZID.
+ * For DATE values and DATE-TIME values without a
+ * TZID (i.e. floating times) we use the default
+ * timezone. */
if (dtstart.tzid && !dtstart.value->is_date) {
start_zone = e_cal_client_resolve_tzid_cb (dtstart.tzid, client);
if (!start_zone)
@@ -1512,7 +1568,10 @@ generate_instances (ECalClient *client, time_t start, time_t end, GSList *object
}
static GSList *
-get_objects_sync (ECalClient *client, time_t start, time_t end, const gchar *uid)
+get_objects_sync (ECalClient *client,
+ time_t start,
+ time_t end,
+ const gchar *uid)
{
GSList *objects = NULL;
@@ -1603,7 +1662,9 @@ free_get_objects_async_data (struct get_objects_async_data *goad)
static gboolean repeat_get_objects_for_uid_timeout_cb (gpointer user_data);
static void
-got_objects_for_uid_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+got_objects_for_uid_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
struct get_objects_async_data *goad = user_data;
GSList *objects = NULL;
@@ -1654,7 +1715,9 @@ repeat_get_objects_for_uid_timeout_cb (gpointer user_data)
static gboolean repeat_get_object_list_as_comps_timeout_cb (gpointer user_data);
static void
-got_object_list_as_comps_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+got_object_list_as_comps_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
struct get_objects_async_data *goad = user_data;
GSList *objects = NULL;
@@ -1704,7 +1767,9 @@ repeat_get_object_list_as_comps_timeout_cb (gpointer user_data)
/* ready_cb may take care of both arguments, goad and objects; objects can be also NULL */
static void
-get_objects_async (void (* ready_cb)(struct get_objects_async_data *goad, GSList *objects), struct get_objects_async_data *goad)
+get_objects_async (void (*ready_cb) (struct get_objects_async_data *goad,
+ GSList *objects),
+ struct get_objects_async_data *goad)
{
g_return_if_fail (ready_cb != NULL);
g_return_if_fail (goad != NULL);
@@ -1739,7 +1804,8 @@ get_objects_async (void (* ready_cb)(struct get_objects_async_data *goad, GSList
}
static void
-generate_instances_got_objects_cb (struct get_objects_async_data *goad, GSList *objects)
+generate_instances_got_objects_cb (struct get_objects_async_data *goad,
+ GSList *objects)
{
g_return_if_fail (goad != NULL);
@@ -1771,7 +1837,13 @@ generate_instances_got_objects_cb (struct get_objects_async_data *goad, GSList *
* Since: 3.2
**/
void
-e_cal_client_generate_instances (ECalClient *client, time_t start, time_t end, GCancellable *cancellable, ECalRecurInstanceFn cb, gpointer cb_data, GDestroyNotify destroy_cb_data)
+e_cal_client_generate_instances (ECalClient *client,
+ time_t start,
+ time_t end,
+ GCancellable *cancellable,
+ ECalRecurInstanceFn cb,
+ gpointer cb_data,
+ GDestroyNotify destroy_cb_data)
{
struct get_objects_async_data *goad;
GCancellable *use_cancellable;
@@ -1821,7 +1893,11 @@ e_cal_client_generate_instances (ECalClient *client, time_t start, time_t end, G
* Since: 3.2
**/
void
-e_cal_client_generate_instances_sync (ECalClient *client, time_t start, time_t end, ECalRecurInstanceFn cb, gpointer cb_data)
+e_cal_client_generate_instances_sync (ECalClient *client,
+ time_t start,
+ time_t end,
+ ECalRecurInstanceFn cb,
+ gpointer cb_data)
{
GSList *objects = NULL;
@@ -1843,7 +1919,10 @@ e_cal_client_generate_instances_sync (ECalClient *client, time_t start, time_t e
/* also frees 'instances' GSList */
static void
-process_instances (ECalComponent *comp, GSList *instances, ECalRecurInstanceFn cb, gpointer cb_data)
+process_instances (ECalComponent *comp,
+ GSList *instances,
+ ECalRecurInstanceFn cb,
+ gpointer cb_data)
{
gchar *rid;
gboolean result;
@@ -1883,7 +1962,8 @@ process_instances (ECalComponent *comp, GSList *instances, ECalRecurInstanceFn c
}
static void
-generate_instances_for_object_got_objects_cb (struct get_objects_async_data *goad, GSList *objects)
+generate_instances_for_object_got_objects_cb (struct get_objects_async_data *goad,
+ GSList *objects)
{
struct instances_info *instances_hold;
GSList *instances = NULL;
@@ -1928,7 +2008,14 @@ generate_instances_for_object_got_objects_cb (struct get_objects_async_data *goa
* Since: 3.2
**/
void
-e_cal_client_generate_instances_for_object (ECalClient *client, icalcomponent *icalcomp, time_t start, time_t end, GCancellable *cancellable, ECalRecurInstanceFn cb, gpointer cb_data, GDestroyNotify destroy_cb_data)
+e_cal_client_generate_instances_for_object (ECalClient *client,
+ icalcomponent *icalcomp,
+ time_t start,
+ time_t end,
+ GCancellable *cancellable,
+ ECalRecurInstanceFn cb,
+ gpointer cb_data,
+ GDestroyNotify destroy_cb_data)
{
ECalComponent *comp;
const gchar *uid;
@@ -2017,7 +2104,12 @@ e_cal_client_generate_instances_for_object (ECalClient *client, icalcomponent *i
* Since: 3.2
**/
void
-e_cal_client_generate_instances_for_object_sync (ECalClient *client, icalcomponent *icalcomp, time_t start, time_t end, ECalRecurInstanceFn cb, gpointer cb_data)
+e_cal_client_generate_instances_for_object_sync (ECalClient *client,
+ icalcomponent *icalcomp,
+ time_t start,
+ time_t end,
+ ECalRecurInstanceFn cb,
+ gpointer cb_data)
{
ECalComponent *comp;
const gchar *uid;
@@ -2084,9 +2176,10 @@ struct _ForeachTZIDCallbackData {
};
/* This adds the VTIMEZONE given by the TZID parameter to the GHashTable in
- data. */
+ * data. */
static void
-foreach_tzid_callback (icalparameter *param, gpointer cbdata)
+foreach_tzid_callback (icalparameter *param,
+ gpointer cbdata)
{
ForeachTZIDCallbackData *data = cbdata;
const gchar *tzid;
@@ -2120,7 +2213,9 @@ foreach_tzid_callback (icalparameter *param, gpointer cbdata)
/* This appends the value string to the GString given in data. */
static void
-append_timezone_string (gpointer key, gpointer value, gpointer data)
+append_timezone_string (gpointer key,
+ gpointer value,
+ gpointer data)
{
GString *vcal_string = data;
@@ -2130,7 +2225,9 @@ append_timezone_string (gpointer key, gpointer value, gpointer data)
/* This simply frees the hash values. */
static void
-free_timezone_string (gpointer key, gpointer value, gpointer data)
+free_timezone_string (gpointer key,
+ gpointer value,
+ gpointer data)
{
g_free (value);
}
@@ -2149,7 +2246,8 @@ free_timezone_string (gpointer key, gpointer value, gpointer data)
* Since: 3.2
**/
gchar *
-e_cal_client_get_component_as_string (ECalClient *client, icalcomponent *icalcomp)
+e_cal_client_get_component_as_string (ECalClient *client,
+ icalcomponent *icalcomp)
{
GHashTable *timezone_hash;
GString *vcal_string;
@@ -2164,7 +2262,7 @@ e_cal_client_get_component_as_string (ECalClient *client, icalcomponent *icalcom
timezone_hash = g_hash_table_new (g_str_hash, g_str_equal);
/* Add any timezones needed to the hash. We use a hash since we only
- want to add each timezone once at most. */
+ * want to add each timezone once at most. */
cbdata.client = client;
cbdata.timezone_hash = timezone_hash;
cbdata.success = TRUE;
@@ -2175,7 +2273,7 @@ e_cal_client_get_component_as_string (ECalClient *client, icalcomponent *icalcom
}
/* Create the start of a VCALENDAR, to add the VTIMEZONES to,
- and remember its length so we know if any VTIMEZONEs get added. */
+ * and remember its length so we know if any VTIMEZONEs get added. */
vcal_string = g_string_new (NULL);
g_string_append (vcal_string,
"BEGIN:VCALENDAR\n"
@@ -2184,14 +2282,14 @@ e_cal_client_get_component_as_string (ECalClient *client, icalcomponent *icalcom
"METHOD:PUBLISH\n");
/* Now concatenate all the timezone strings. This also frees the
- timezone strings as it goes. */
+ * timezone strings as it goes. */
g_hash_table_foreach (timezone_hash, append_timezone_string, vcal_string);
/* Get the string for the VEVENT/VTODO. */
obj_string = icalcomponent_as_ical_string_r (icalcomp);
/* If there were any timezones to send, create a complete VCALENDAR,
- else just send the VEVENT/VTODO string. */
+ * else just send the VEVENT/VTODO string. */
g_string_append (vcal_string, obj_string);
g_string_append (vcal_string, "END:VCALENDAR\n");
g_free (obj_string);
@@ -2204,7 +2302,10 @@ e_cal_client_get_component_as_string (ECalClient *client, icalcomponent *icalcom
}
static gboolean
-cal_client_get_backend_property_from_cache_finish (EClient *client, GAsyncResult *result, gchar **prop_value, GError **error)
+cal_client_get_backend_property_from_cache_finish (EClient *client,
+ GAsyncResult *result,
+ gchar **prop_value,
+ GError **error)
{
GSimpleAsyncResult *simple;
GError *local_error = NULL;
@@ -2228,7 +2329,11 @@ cal_client_get_backend_property_from_cache_finish (EClient *client, GAsyncResult
}
static void
-cal_client_get_backend_property (EClient *client, const gchar *prop_name, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+cal_client_get_backend_property (EClient *client,
+ const gchar *prop_name,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *prop_value;
@@ -2243,7 +2348,10 @@ cal_client_get_backend_property (EClient *client, const gchar *prop_name, GCance
}
static gboolean
-cal_client_get_backend_property_finish (EClient *client, GAsyncResult *result, gchar **prop_value, GError **error)
+cal_client_get_backend_property_finish (EClient *client,
+ GAsyncResult *result,
+ gchar **prop_value,
+ GError **error)
{
gchar *str = NULL;
gboolean res;
@@ -2268,7 +2376,11 @@ cal_client_get_backend_property_finish (EClient *client, GAsyncResult *result, g
}
static gboolean
-cal_client_get_backend_property_sync (EClient *client, const gchar *prop_name, gchar **prop_value, GCancellable *cancellable, GError **error)
+cal_client_get_backend_property_sync (EClient *client,
+ const gchar *prop_name,
+ gchar **prop_value,
+ GCancellable *cancellable,
+ GError **error)
{
ECalClient *cal_client;
gchar *prop_val;
@@ -2304,7 +2416,12 @@ cal_client_get_backend_property_sync (EClient *client, const gchar *prop_name, g
}
static void
-cal_client_set_backend_property (EClient *client, const gchar *prop_name, const gchar *prop_value, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+cal_client_set_backend_property (EClient *client,
+ const gchar *prop_name,
+ const gchar *prop_value,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar **prop_name_value;
@@ -2318,13 +2435,19 @@ cal_client_set_backend_property (EClient *client, const gchar *prop_name, const
}
static gboolean
-cal_client_set_backend_property_finish (EClient *client, GAsyncResult *result, GError **error)
+cal_client_set_backend_property_finish (EClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (client, result, error, cal_client_set_backend_property);
}
static gboolean
-cal_client_set_backend_property_sync (EClient *client, const gchar *prop_name, const gchar *prop_value, GCancellable *cancellable, GError **error)
+cal_client_set_backend_property_sync (EClient *client,
+ const gchar *prop_name,
+ const gchar *prop_value,
+ GCancellable *cancellable,
+ GError **error)
{
ECalClient *cal_client;
gboolean res;
@@ -2350,7 +2473,11 @@ cal_client_set_backend_property_sync (EClient *client, const gchar *prop_name, c
}
static void
-cal_client_open (EClient *client, gboolean only_if_exists, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+cal_client_open (EClient *client,
+ gboolean only_if_exists,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_client_proxy_call_boolean (client, only_if_exists, cancellable, callback, user_data, cal_client_open,
e_gdbus_cal_call_open,
@@ -2358,13 +2485,18 @@ cal_client_open (EClient *client, gboolean only_if_exists, GCancellable *cancell
}
static gboolean
-cal_client_open_finish (EClient *client, GAsyncResult *result, GError **error)
+cal_client_open_finish (EClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (client, result, error, cal_client_open);
}
static gboolean
-cal_client_open_sync (EClient *client, gboolean only_if_exists, GCancellable *cancellable, GError **error)
+cal_client_open_sync (EClient *client,
+ gboolean only_if_exists,
+ GCancellable *cancellable,
+ GError **error)
{
ECalClient *cal_client;
@@ -2384,7 +2516,10 @@ cal_client_open_sync (EClient *client, gboolean only_if_exists, GCancellable *ca
}
static void
-cal_client_remove (EClient *client, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+cal_client_remove (EClient *client,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_client_proxy_call_void (client, cancellable, callback, user_data, cal_client_remove,
e_gdbus_cal_call_remove,
@@ -2392,13 +2527,17 @@ cal_client_remove (EClient *client, GCancellable *cancellable, GAsyncReadyCallba
}
static gboolean
-cal_client_remove_finish (EClient *client, GAsyncResult *result, GError **error)
+cal_client_remove_finish (EClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (client, result, error, cal_client_remove);
}
static gboolean
-cal_client_remove_sync (EClient *client, GCancellable *cancellable, GError **error)
+cal_client_remove_sync (EClient *client,
+ GCancellable *cancellable,
+ GError **error)
{
ECalClient *cal_client;
@@ -2418,7 +2557,10 @@ cal_client_remove_sync (EClient *client, GCancellable *cancellable, GError **err
}
static void
-cal_client_refresh (EClient *client, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+cal_client_refresh (EClient *client,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_client_proxy_call_void (client, cancellable, callback, user_data, cal_client_refresh,
e_gdbus_cal_call_refresh,
@@ -2426,13 +2568,17 @@ cal_client_refresh (EClient *client, GCancellable *cancellable, GAsyncReadyCallb
}
static gboolean
-cal_client_refresh_finish (EClient *client, GAsyncResult *result, GError **error)
+cal_client_refresh_finish (EClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (client, result, error, cal_client_refresh);
}
static gboolean
-cal_client_refresh_sync (EClient *client, GCancellable *cancellable, GError **error)
+cal_client_refresh_sync (EClient *client,
+ GCancellable *cancellable,
+ GError **error)
{
ECalClient *cal_client;
@@ -2452,7 +2598,10 @@ cal_client_refresh_sync (EClient *client, GCancellable *cancellable, GError **er
}
static gboolean
-complete_string_exchange (gboolean res, gchar *out_string, gchar **result, GError **error)
+complete_string_exchange (gboolean res,
+ gchar *out_string,
+ gchar **result,
+ GError **error)
{
g_return_val_if_fail (result != NULL, FALSE);
@@ -2477,7 +2626,10 @@ complete_string_exchange (gboolean res, gchar *out_string, gchar **result, GErro
}
static gboolean
-cal_client_get_default_object_from_cache_finish (EClient *client, GAsyncResult *result, gchar **prop_value, GError **error)
+cal_client_get_default_object_from_cache_finish (EClient *client,
+ GAsyncResult *result,
+ gchar **prop_value,
+ GError **error)
{
GSimpleAsyncResult *simple;
GError *local_error = NULL;
@@ -2514,7 +2666,10 @@ cal_client_get_default_object_from_cache_finish (EClient *client, GAsyncResult *
* Since: 3.2
**/
void
-e_cal_client_get_default_object (ECalClient *client, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_cal_client_get_default_object (ECalClient *client,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *prop_value;
EClient *base_client = E_CLIENT (client);
@@ -2530,7 +2685,10 @@ e_cal_client_get_default_object (ECalClient *client, GCancellable *cancellable,
}
static gboolean
-complete_get_object (gboolean res, gchar *out_string, icalcomponent **icalcomp, GError **error)
+complete_get_object (gboolean res,
+ gchar *out_string,
+ icalcomponent **icalcomp,
+ GError **error)
{
g_return_val_if_fail (icalcomp != NULL, FALSE);
@@ -2567,7 +2725,10 @@ complete_get_object (gboolean res, gchar *out_string, icalcomponent **icalcomp,
* Since: 3.2
**/
gboolean
-e_cal_client_get_default_object_finish (ECalClient *client, GAsyncResult *result, icalcomponent **icalcomp, GError **error)
+e_cal_client_get_default_object_finish (ECalClient *client,
+ GAsyncResult *result,
+ icalcomponent **icalcomp,
+ GError **error)
{
gboolean res;
gchar *out_string = NULL;
@@ -2599,7 +2760,10 @@ e_cal_client_get_default_object_finish (ECalClient *client, GAsyncResult *result
* Since: 3.2
**/
gboolean
-e_cal_client_get_default_object_sync (ECalClient *client, icalcomponent **icalcomp, GCancellable *cancellable, GError **error)
+e_cal_client_get_default_object_sync (ECalClient *client,
+ icalcomponent **icalcomp,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar *out_string = NULL;
@@ -2624,7 +2788,11 @@ e_cal_client_get_default_object_sync (ECalClient *client, icalcomponent **icalco
}
static gboolean
-complete_get_object_master (ECalClientSourceType source_type, gboolean res, gchar *out_string, icalcomponent **icalcomp, GError **error)
+complete_get_object_master (ECalClientSourceType source_type,
+ gboolean res,
+ gchar *out_string,
+ icalcomponent **icalcomp,
+ GError **error)
{
g_return_val_if_fail (icalcomp != NULL, FALSE);
@@ -2710,7 +2878,12 @@ complete_get_object_master (ECalClientSourceType source_type, gboolean res, gcha
* Since: 3.2
**/
void
-e_cal_client_get_object (ECalClient *client, const gchar *uid, const gchar *rid, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_cal_client_get_object (ECalClient *client,
+ const gchar *uid,
+ const gchar *rid,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar **strv;
@@ -2746,7 +2919,10 @@ e_cal_client_get_object (ECalClient *client, const gchar *uid, const gchar *rid,
* Since: 3.2
**/
gboolean
-e_cal_client_get_object_finish (ECalClient *client, GAsyncResult *result, icalcomponent **icalcomp, GError **error)
+e_cal_client_get_object_finish (ECalClient *client,
+ GAsyncResult *result,
+ icalcomponent **icalcomp,
+ GError **error)
{
gboolean res;
gchar *out_string = NULL;
@@ -2781,7 +2957,12 @@ e_cal_client_get_object_finish (ECalClient *client, GAsyncResult *result, icalco
* Since: 3.2
**/
gboolean
-e_cal_client_get_object_sync (ECalClient *client, const gchar *uid, const gchar *rid, icalcomponent **icalcomp, GCancellable *cancellable, GError **error)
+e_cal_client_get_object_sync (ECalClient *client,
+ const gchar *uid,
+ const gchar *rid,
+ icalcomponent **icalcomp,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar *out_string = NULL, **strv;
@@ -2821,7 +3002,11 @@ e_cal_client_get_object_sync (ECalClient *client, const gchar *uid, const gchar
* Since: 3.2
**/
void
-e_cal_client_get_objects_for_uid (ECalClient *client, const gchar *uid, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_cal_client_get_objects_for_uid (ECalClient *client,
+ const gchar *uid,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar **strv;
@@ -2837,7 +3022,11 @@ e_cal_client_get_objects_for_uid (ECalClient *client, const gchar *uid, GCancell
}
static gboolean
-complete_get_objects_for_uid (ECalClientSourceType source_type, gboolean res, gchar *out_string, GSList **ecalcomps, GError **error)
+complete_get_objects_for_uid (ECalClientSourceType source_type,
+ gboolean res,
+ gchar *out_string,
+ GSList **ecalcomps,
+ GError **error)
{
icalcomponent *icalcomp = NULL;
icalcomponent_kind kind;
@@ -2905,7 +3094,10 @@ complete_get_objects_for_uid (ECalClientSourceType source_type, gboolean res, gc
* Since: 3.2
**/
gboolean
-e_cal_client_get_objects_for_uid_finish (ECalClient *client, GAsyncResult *result, GSList **ecalcomps, GError **error)
+e_cal_client_get_objects_for_uid_finish (ECalClient *client,
+ GAsyncResult *result,
+ GSList **ecalcomps,
+ GError **error)
{
gboolean res;
gchar *out_string = NULL;
@@ -2935,7 +3127,11 @@ e_cal_client_get_objects_for_uid_finish (ECalClient *client, GAsyncResult *resul
* Since: 3.2
**/
gboolean
-e_cal_client_get_objects_for_uid_sync (ECalClient *client, const gchar *uid, GSList **ecalcomps, GCancellable *cancellable, GError **error)
+e_cal_client_get_objects_for_uid_sync (ECalClient *client,
+ const gchar *uid,
+ GSList **ecalcomps,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar *out_string = NULL, **strv = NULL;
@@ -2974,7 +3170,11 @@ e_cal_client_get_objects_for_uid_sync (ECalClient *client, const gchar *uid, GSL
* Since: 3.2
**/
void
-e_cal_client_get_object_list (ECalClient *client, const gchar *sexp, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_cal_client_get_object_list (ECalClient *client,
+ const gchar *sexp,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *gdbus_sexp = NULL;
@@ -2988,7 +3188,10 @@ e_cal_client_get_object_list (ECalClient *client, const gchar *sexp, GCancellabl
}
static gboolean
-complete_get_object_list (gboolean res, gchar **out_strv, GSList **icalcomps, GError **error)
+complete_get_object_list (gboolean res,
+ gchar **out_strv,
+ GSList **icalcomps,
+ GError **error)
{
g_return_val_if_fail (icalcomps != NULL, FALSE);
@@ -3033,7 +3236,10 @@ complete_get_object_list (gboolean res, gchar **out_strv, GSList **icalcomps, GE
* Since: 3.2
**/
gboolean
-e_cal_client_get_object_list_finish (ECalClient *client, GAsyncResult *result, GSList **icalcomps, GError **error)
+e_cal_client_get_object_list_finish (ECalClient *client,
+ GAsyncResult *result,
+ GSList **icalcomps,
+ GError **error)
{
gboolean res;
gchar **out_strv = NULL;
@@ -3063,7 +3269,11 @@ e_cal_client_get_object_list_finish (ECalClient *client, GAsyncResult *result, G
* Since: 3.2
**/
gboolean
-e_cal_client_get_object_list_sync (ECalClient *client, const gchar *sexp, GSList **icalcomps, GCancellable *cancellable, GError **error)
+e_cal_client_get_object_list_sync (ECalClient *client,
+ const gchar *sexp,
+ GSList **icalcomps,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar **out_strv = NULL, *gdbus_sexp = NULL;
@@ -3101,7 +3311,11 @@ e_cal_client_get_object_list_sync (ECalClient *client, const gchar *sexp, GSList
* Since: 3.2
**/
void
-e_cal_client_get_object_list_as_comps (ECalClient *client, const gchar *sexp, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_cal_client_get_object_list_as_comps (ECalClient *client,
+ const gchar *sexp,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *gdbus_sexp = NULL;
@@ -3115,7 +3329,10 @@ e_cal_client_get_object_list_as_comps (ECalClient *client, const gchar *sexp, GC
}
static gboolean
-complete_get_object_list_as_comps (gboolean res, gchar **out_strv, GSList **ecalcomps, GError **error)
+complete_get_object_list_as_comps (gboolean res,
+ gchar **out_strv,
+ GSList **ecalcomps,
+ GError **error)
{
GSList *icalcomps = NULL;
@@ -3165,7 +3382,10 @@ complete_get_object_list_as_comps (gboolean res, gchar **out_strv, GSList **ecal
* Since: 3.2
**/
gboolean
-e_cal_client_get_object_list_as_comps_finish (ECalClient *client, GAsyncResult *result, GSList **ecalcomps, GError **error)
+e_cal_client_get_object_list_as_comps_finish (ECalClient *client,
+ GAsyncResult *result,
+ GSList **ecalcomps,
+ GError **error)
{
gboolean res;
gchar **out_strv = NULL;
@@ -3195,7 +3415,11 @@ e_cal_client_get_object_list_as_comps_finish (ECalClient *client, GAsyncResult *
* Since: 3.2
**/
gboolean
-e_cal_client_get_object_list_as_comps_sync (ECalClient *client, const gchar *sexp, GSList **ecalcomps, GCancellable *cancellable, GError **error)
+e_cal_client_get_object_list_as_comps_sync (ECalClient *client,
+ const gchar *sexp,
+ GSList **ecalcomps,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar **out_strv = NULL, *gdbus_sexp = NULL;
@@ -3236,7 +3460,13 @@ e_cal_client_get_object_list_as_comps_sync (ECalClient *client, const gchar *sex
* Since: 3.2
**/
void
-e_cal_client_get_free_busy (ECalClient *client, time_t start, time_t end, const GSList *users, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_cal_client_get_free_busy (ECalClient *client,
+ time_t start,
+ time_t end,
+ const GSList *users,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar **strv;
@@ -3267,7 +3497,9 @@ e_cal_client_get_free_busy (ECalClient *client, time_t start, time_t end, const
* Since: 3.2
**/
gboolean
-e_cal_client_get_free_busy_finish (ECalClient *client, GAsyncResult *result, GError **error)
+e_cal_client_get_free_busy_finish (ECalClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (E_CLIENT (client), result, error, e_cal_client_get_free_busy);
}
@@ -3289,7 +3521,12 @@ e_cal_client_get_free_busy_finish (ECalClient *client, GAsyncResult *result, GEr
* Since: 3.2
**/
gboolean
-e_cal_client_get_free_busy_sync (ECalClient *client, time_t start, time_t end, const GSList *users, GCancellable *cancellable, GError **error)
+e_cal_client_get_free_busy_sync (ECalClient *client,
+ time_t start,
+ time_t end,
+ const GSList *users,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar **strv;
@@ -3328,7 +3565,11 @@ e_cal_client_get_free_busy_sync (ECalClient *client, time_t start, time_t end, c
* Since: 3.2
**/
void
-e_cal_client_create_object (ECalClient *client, /* const */ icalcomponent *icalcomp, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_cal_client_create_object (ECalClient *client,
+ /* const */ icalcomponent *icalcomp,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *comp_str, *gdbus_comp = NULL;
@@ -3360,7 +3601,10 @@ e_cal_client_create_object (ECalClient *client, /* const */ icalcomponent *icalc
* Since: 3.2
**/
gboolean
-e_cal_client_create_object_finish (ECalClient *client, GAsyncResult *result, gchar **uid, GError **error)
+e_cal_client_create_object_finish (ECalClient *client,
+ GAsyncResult *result,
+ gchar **uid,
+ GError **error)
{
gboolean res;
gchar *out_string = NULL;
@@ -3391,7 +3635,11 @@ e_cal_client_create_object_finish (ECalClient *client, GAsyncResult *result, gch
* Since: 3.2
**/
gboolean
-e_cal_client_create_object_sync (ECalClient *client, /* const */ icalcomponent *icalcomp, gchar **uid, GCancellable *cancellable, GError **error)
+e_cal_client_create_object_sync (ECalClient *client,
+ /* const */ icalcomponent *icalcomp,
+ gchar **uid,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar *comp_str, *gdbus_comp = NULL;
@@ -3441,7 +3689,12 @@ e_cal_client_create_object_sync (ECalClient *client, /* const */ icalcomponent *
* Since: 3.2
**/
void
-e_cal_client_modify_object (ECalClient *client, /* const */ icalcomponent *icalcomp, CalObjModType mod, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_cal_client_modify_object (ECalClient *client,
+ /* const */ icalcomponent *icalcomp,
+ CalObjModType mod,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *comp_str, **strv;
@@ -3471,7 +3724,9 @@ e_cal_client_modify_object (ECalClient *client, /* const */ icalcomponent *icalc
* Since: 3.2
**/
gboolean
-e_cal_client_modify_object_finish (ECalClient *client, GAsyncResult *result, GError **error)
+e_cal_client_modify_object_finish (ECalClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (E_CLIENT (client), result, error, e_cal_client_modify_object);
}
@@ -3497,7 +3752,11 @@ e_cal_client_modify_object_finish (ECalClient *client, GAsyncResult *result, GEr
* Since: 3.2
**/
gboolean
-e_cal_client_modify_object_sync (ECalClient *client, /* const */ icalcomponent *icalcomp, CalObjModType mod, GCancellable *cancellable, GError **error)
+e_cal_client_modify_object_sync (ECalClient *client,
+ /* const */ icalcomponent *icalcomp,
+ CalObjModType mod,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar *comp_str, **strv;
@@ -3545,7 +3804,13 @@ e_cal_client_modify_object_sync (ECalClient *client, /* const */ icalcomponent *
* Since: 3.2
**/
void
-e_cal_client_remove_object (ECalClient *client, const gchar *uid, const gchar *rid, CalObjModType mod, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_cal_client_remove_object (ECalClient *client,
+ const gchar *uid,
+ const gchar *rid,
+ CalObjModType mod,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar **strv;
@@ -3573,7 +3838,9 @@ e_cal_client_remove_object (ECalClient *client, const gchar *uid, const gchar *r
* Since: 3.2
**/
gboolean
-e_cal_client_remove_object_finish (ECalClient *client, GAsyncResult *result, GError **error)
+e_cal_client_remove_object_finish (ECalClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (E_CLIENT (client), result, error, e_cal_client_remove_object);
}
@@ -3598,7 +3865,12 @@ e_cal_client_remove_object_finish (ECalClient *client, GAsyncResult *result, GEr
* Since: 3.2
**/
gboolean
-e_cal_client_remove_object_sync (ECalClient *client, const gchar *uid, const gchar *rid, CalObjModType mod, GCancellable *cancellable, GError **error)
+e_cal_client_remove_object_sync (ECalClient *client,
+ const gchar *uid,
+ const gchar *rid,
+ CalObjModType mod,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar **strv;
@@ -3640,7 +3912,11 @@ e_cal_client_remove_object_sync (ECalClient *client, const gchar *uid, const gch
* Since: 3.2
**/
void
-e_cal_client_receive_objects (ECalClient *client, /* const */ icalcomponent *icalcomp, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_cal_client_receive_objects (ECalClient *client,
+ /* const */ icalcomponent *icalcomp,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *comp_str, *gdbus_comp = NULL;
@@ -3669,7 +3945,9 @@ e_cal_client_receive_objects (ECalClient *client, /* const */ icalcomponent *ica
* Since: 3.2
**/
gboolean
-e_cal_client_receive_objects_finish (ECalClient *client, GAsyncResult *result, GError **error)
+e_cal_client_receive_objects_finish (ECalClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (E_CLIENT (client), result, error, e_cal_client_receive_objects);
}
@@ -3690,7 +3968,10 @@ e_cal_client_receive_objects_finish (ECalClient *client, GAsyncResult *result, G
* Since: 3.2
**/
gboolean
-e_cal_client_receive_objects_sync (ECalClient *client, /* const */ icalcomponent *icalcomp, GCancellable *cancellable, GError **error)
+e_cal_client_receive_objects_sync (ECalClient *client,
+ /* const */ icalcomponent *icalcomp,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar *comp_str, *gdbus_comp = NULL;
@@ -3730,7 +4011,11 @@ e_cal_client_receive_objects_sync (ECalClient *client, /* const */ icalcomponent
* Since: 3.2
**/
void
-e_cal_client_send_objects (ECalClient *client, /* const */ icalcomponent *icalcomp, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_cal_client_send_objects (ECalClient *client,
+ /* const */ icalcomponent *icalcomp,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *comp_str, *gdbus_comp = NULL;
@@ -3747,7 +4032,11 @@ e_cal_client_send_objects (ECalClient *client, /* const */ icalcomponent *icalco
}
static gboolean
-complete_send_objects (gboolean res, gchar **out_strv, GSList **users, icalcomponent **modified_icalcomp, GError **error)
+complete_send_objects (gboolean res,
+ gchar **out_strv,
+ GSList **users,
+ icalcomponent **modified_icalcomp,
+ GError **error)
{
g_return_val_if_fail (users != NULL, FALSE);
g_return_val_if_fail (modified_icalcomp != NULL, FALSE);
@@ -3801,7 +4090,11 @@ complete_send_objects (gboolean res, gchar **out_strv, GSList **users, icalcompo
* Since: 3.2
**/
gboolean
-e_cal_client_send_objects_finish (ECalClient *client, GAsyncResult *result, GSList **users, icalcomponent **modified_icalcomp, GError **error)
+e_cal_client_send_objects_finish (ECalClient *client,
+ GAsyncResult *result,
+ GSList **users,
+ icalcomponent **modified_icalcomp,
+ GError **error)
{
gboolean res;
gchar **out_strv = NULL;
@@ -3833,7 +4126,12 @@ e_cal_client_send_objects_finish (ECalClient *client, GAsyncResult *result, GSLi
* Since: 3.2
**/
gboolean
-e_cal_client_send_objects_sync (ECalClient *client, /* const */ icalcomponent *icalcomp, GSList **users, icalcomponent **modified_icalcomp, GCancellable *cancellable, GError **error)
+e_cal_client_send_objects_sync (ECalClient *client,
+ /* const */ icalcomponent *icalcomp,
+ GSList **users,
+ icalcomponent **modified_icalcomp,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar **out_strv = NULL, *comp_str, *gdbus_comp = NULL;
@@ -3876,7 +4174,12 @@ e_cal_client_send_objects_sync (ECalClient *client, /* const */ icalcomponent *i
* Since: 3.2
**/
void
-e_cal_client_get_attachment_uris (ECalClient *client, const gchar *uid, const gchar *rid, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_cal_client_get_attachment_uris (ECalClient *client,
+ const gchar *uid,
+ const gchar *rid,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar **strv;
@@ -3907,7 +4210,10 @@ e_cal_client_get_attachment_uris (ECalClient *client, const gchar *uid, const gc
* Since: 3.2
**/
gboolean
-e_cal_client_get_attachment_uris_finish (ECalClient *client, GAsyncResult *result, GSList **attachment_uris, GError **error)
+e_cal_client_get_attachment_uris_finish (ECalClient *client,
+ GAsyncResult *result,
+ GSList **attachment_uris,
+ GError **error)
{
gboolean res;
gchar **out_strv = NULL;
@@ -3944,7 +4250,12 @@ e_cal_client_get_attachment_uris_finish (ECalClient *client, GAsyncResult *resul
* Since: 3.2
**/
gboolean
-e_cal_client_get_attachment_uris_sync (ECalClient *client, const gchar *uid, const gchar *rid, GSList **attachment_uris, GCancellable *cancellable, GError **error)
+e_cal_client_get_attachment_uris_sync (ECalClient *client,
+ const gchar *uid,
+ const gchar *rid,
+ GSList **attachment_uris,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar **strv, **out_strv = NULL;
@@ -3994,7 +4305,13 @@ e_cal_client_get_attachment_uris_sync (ECalClient *client, const gchar *uid, con
* Since: 3.2
**/
void
-e_cal_client_discard_alarm (ECalClient *client, const gchar *uid, const gchar *rid, const gchar *auid, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_cal_client_discard_alarm (ECalClient *client,
+ const gchar *uid,
+ const gchar *rid,
+ const gchar *auid,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar **strv;
@@ -4023,7 +4340,9 @@ e_cal_client_discard_alarm (ECalClient *client, const gchar *uid, const gchar *r
* Since: 3.2
**/
gboolean
-e_cal_client_discard_alarm_finish (ECalClient *client, GAsyncResult *result, GError **error)
+e_cal_client_discard_alarm_finish (ECalClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (E_CLIENT (client), result, error, e_cal_client_discard_alarm);
}
@@ -4044,7 +4363,12 @@ e_cal_client_discard_alarm_finish (ECalClient *client, GAsyncResult *result, GEr
* Since: 3.2
**/
gboolean
-e_cal_client_discard_alarm_sync (ECalClient *client, const gchar *uid, const gchar *rid, const gchar *auid, GCancellable *cancellable, GError **error)
+e_cal_client_discard_alarm_sync (ECalClient *client,
+ const gchar *uid,
+ const gchar *rid,
+ const gchar *auid,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar **strv;
@@ -4084,7 +4408,11 @@ e_cal_client_discard_alarm_sync (ECalClient *client, const gchar *uid, const gch
* Since: 3.2
**/
void
-e_cal_client_get_view (ECalClient *client, const gchar *sexp, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_cal_client_get_view (ECalClient *client,
+ const gchar *sexp,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *gdbus_sexp = NULL;
@@ -4098,7 +4426,11 @@ e_cal_client_get_view (ECalClient *client, const gchar *sexp, GCancellable *canc
}
static gboolean
-complete_get_view (ECalClient *client, gboolean res, gchar *view_path, ECalClientView **view, GError **error)
+complete_get_view (ECalClient *client,
+ gboolean res,
+ gchar *view_path,
+ ECalClientView **view,
+ GError **error)
{
g_return_val_if_fail (view != NULL, FALSE);
@@ -4152,7 +4484,10 @@ complete_get_view (ECalClient *client, gboolean res, gchar *view_path, ECalClien
* Since: 3.2
**/
gboolean
-e_cal_client_get_view_finish (ECalClient *client, GAsyncResult *result, ECalClientView **view, GError **error)
+e_cal_client_get_view_finish (ECalClient *client,
+ GAsyncResult *result,
+ ECalClientView **view,
+ GError **error)
{
gboolean res;
gchar *view_path = NULL;
@@ -4181,7 +4516,11 @@ e_cal_client_get_view_finish (ECalClient *client, GAsyncResult *result, ECalClie
* Since: 3.2
**/
gboolean
-e_cal_client_get_view_sync (ECalClient *client, const gchar *sexp, ECalClientView **view, GCancellable *cancellable, GError **error)
+e_cal_client_get_view_sync (ECalClient *client,
+ const gchar *sexp,
+ ECalClientView **view,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar *gdbus_sexp = NULL;
@@ -4206,7 +4545,8 @@ e_cal_client_get_view_sync (ECalClient *client, const gchar *sexp, ECalClientVie
}
static icaltimezone *
-cal_client_get_timezone_from_cache (ECalClient *client, const gchar *tzid)
+cal_client_get_timezone_from_cache (ECalClient *client,
+ const gchar *tzid)
{
icaltimezone *zone = NULL;
@@ -4283,7 +4623,10 @@ cal_client_get_timezone_from_cache (ECalClient *client, const gchar *tzid)
}
static gboolean
-cal_client_get_timezone_from_cache_finish (ECalClient *client, GAsyncResult *result, icaltimezone **zone, GError **error)
+cal_client_get_timezone_from_cache_finish (ECalClient *client,
+ GAsyncResult *result,
+ icaltimezone **zone,
+ GError **error)
{
GSimpleAsyncResult *simple;
GError *local_error = NULL;
@@ -4321,7 +4664,11 @@ cal_client_get_timezone_from_cache_finish (ECalClient *client, GAsyncResult *res
* Since: 3.2
**/
void
-e_cal_client_get_timezone (ECalClient *client, const gchar *tzid, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_cal_client_get_timezone (ECalClient *client,
+ const gchar *tzid,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gchar *gdbus_tzid = NULL;
icaltimezone *zone;
@@ -4341,7 +4688,11 @@ e_cal_client_get_timezone (ECalClient *client, const gchar *tzid, GCancellable *
}
static gboolean
-complete_get_timezone (ECalClient *client, gboolean res, gchar *out_string, icaltimezone **zone, GError **error)
+complete_get_timezone (ECalClient *client,
+ gboolean res,
+ gchar *out_string,
+ icaltimezone **zone,
+ GError **error)
{
g_return_val_if_fail (zone != NULL, FALSE);
@@ -4392,7 +4743,10 @@ complete_get_timezone (ECalClient *client, gboolean res, gchar *out_string, ical
* Since: 3.2
**/
gboolean
-e_cal_client_get_timezone_finish (ECalClient *client, GAsyncResult *result, icaltimezone **zone, GError **error)
+e_cal_client_get_timezone_finish (ECalClient *client,
+ GAsyncResult *result,
+ icaltimezone **zone,
+ GError **error)
{
gboolean res;
gchar *out_string = NULL;
@@ -4425,7 +4779,11 @@ e_cal_client_get_timezone_finish (ECalClient *client, GAsyncResult *result, ical
* Since: 3.2
**/
gboolean
-e_cal_client_get_timezone_sync (ECalClient *client, const gchar *tzid, icaltimezone **zone, GCancellable *cancellable, GError **error)
+e_cal_client_get_timezone_sync (ECalClient *client,
+ const gchar *tzid,
+ icaltimezone **zone,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
gchar *gdbus_tzid = NULL, *out_string = NULL;
@@ -4467,7 +4825,11 @@ e_cal_client_get_timezone_sync (ECalClient *client, const gchar *tzid, icaltimez
* Since: 3.2
**/
void
-e_cal_client_add_timezone (ECalClient *client, /* const */ icaltimezone *zone, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_cal_client_add_timezone (ECalClient *client,
+ /* const */ icaltimezone *zone,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
icalcomponent *icalcomp;
gchar *zone_str, *gdbus_zone = NULL;
@@ -4503,7 +4865,9 @@ e_cal_client_add_timezone (ECalClient *client, /* const */ icaltimezone *zone, G
* Since: 3.2
**/
gboolean
-e_cal_client_add_timezone_finish (ECalClient *client, GAsyncResult *result, GError **error)
+e_cal_client_add_timezone_finish (ECalClient *client,
+ GAsyncResult *result,
+ GError **error)
{
return e_client_proxy_call_finish_void (E_CLIENT (client), result, error, e_cal_client_add_timezone);
}
@@ -4522,7 +4886,10 @@ e_cal_client_add_timezone_finish (ECalClient *client, GAsyncResult *result, GErr
* Since: 3.2
**/
gboolean
-e_cal_client_add_timezone_sync (ECalClient *client, /* const */ icaltimezone *zone, GCancellable *cancellable, GError **error)
+e_cal_client_add_timezone_sync (ECalClient *client,
+ /* const */ icaltimezone *zone,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean res;
icalcomponent *icalcomp;
@@ -4572,13 +4939,16 @@ cal_client_get_dbus_proxy (EClient *client)
}
static void
-cal_client_unwrap_dbus_error (EClient *client, GError *dbus_error, GError **out_error)
+cal_client_unwrap_dbus_error (EClient *client,
+ GError *dbus_error,
+ GError **out_error)
{
unwrap_dbus_error (dbus_error, out_error);
}
static void
-cal_client_handle_authentication (EClient *client, const ECredentials *credentials)
+cal_client_handle_authentication (EClient *client,
+ const ECredentials *credentials)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -4608,7 +4978,10 @@ cal_client_handle_authentication (EClient *client, const ECredentials *credentia
}
static void
-cal_client_retrieve_capabilities (EClient *client, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+cal_client_retrieve_capabilities (EClient *client,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
ECalClient *cal_client;
@@ -4622,7 +4995,10 @@ cal_client_retrieve_capabilities (EClient *client, GCancellable *cancellable, GA
}
static gboolean
-cal_client_retrieve_capabilities_finish (EClient *client, GAsyncResult *result, gchar **capabilities, GError **error)
+cal_client_retrieve_capabilities_finish (EClient *client,
+ GAsyncResult *result,
+ gchar **capabilities,
+ GError **error)
{
ECalClient *cal_client;
@@ -4636,7 +5012,10 @@ cal_client_retrieve_capabilities_finish (EClient *client, GAsyncResult *result,
}
static gboolean
-cal_client_retrieve_capabilities_sync (EClient *client, gchar **capabilities, GCancellable *cancellable, GError **error)
+cal_client_retrieve_capabilities_sync (EClient *client,
+ gchar **capabilities,
+ GCancellable *cancellable,
+ GError **error)
{
ECalClient *cal_client;
diff --git a/calendar/libecal/e-cal-component.c b/calendar/libecal/e-cal-component.c
index 0d27fea..63fc1dc 100644
--- a/calendar/libecal/e-cal-component.c
+++ b/calendar/libecal/e-cal-component.c
@@ -59,7 +59,7 @@ struct attachment {
icalattach *attach;
/* for inline attachments, where the file is stored;
- it unlinks it on attachment free. */
+ * it unlinks it on attachment free. */
gchar *temporary_filename;
};
@@ -123,10 +123,10 @@ struct _ECalComponentPrivate {
icalproperty *dtstamp;
/* The DURATION property can be used instead of the VEVENT DTEND or
- the VTODO DUE dates. We do not use it directly ourselves, but we
- must be able to handle it from incoming data. If a DTEND or DUE
- is requested, we convert the DURATION if necessary. If DTEND or
- DUE is set, we remove any DURATION. */
+ * the VTODO DUE dates. We do not use it directly ourselves, but we
+ * must be able to handle it from incoming data. If a DTEND or DUE
+ * is requested, we convert the DURATION if necessary. If DTEND or
+ * DUE is set, we remove any DURATION. */
icalproperty *duration;
struct datetime due;
@@ -248,7 +248,9 @@ free_slist (GSList *slist)
* the UID pointers inside the icalproperties themselves.
*/
static gboolean
-free_alarm_cb (gpointer key, gpointer value, gpointer data)
+free_alarm_cb (gpointer key,
+ gpointer value,
+ gpointer data)
{
return TRUE;
}
@@ -281,7 +283,8 @@ free_attachment (struct attachment *attachment)
* does, it means we don't own it and we shouldn't free it.
*/
static void
-free_icalcomponent (ECalComponent *comp, gboolean free)
+free_icalcomponent (ECalComponent *comp,
+ gboolean free)
{
ECalComponentPrivate *priv;
@@ -518,7 +521,8 @@ e_cal_component_clone (ECalComponent *comp)
/* Scans an attachment property */
static void
-scan_attachment (GSList **attachment_list, icalproperty *prop)
+scan_attachment (GSList **attachment_list,
+ icalproperty *prop)
{
struct attachment *attachment;
@@ -533,7 +537,8 @@ scan_attachment (GSList **attachment_list, icalproperty *prop)
/* Scans an attendee property */
static void
-scan_attendee (GSList **attendee_list, icalproperty *prop)
+scan_attendee (GSList **attendee_list,
+ icalproperty *prop)
{
struct attendee *attendee;
@@ -556,7 +561,9 @@ scan_attendee (GSList **attendee_list, icalproperty *prop)
/* Scans a date/time and timezone pair property */
static void
-scan_datetime (ECalComponent *comp, struct datetime *datetime, icalproperty *prop)
+scan_datetime (ECalComponent *comp,
+ struct datetime *datetime,
+ icalproperty *prop)
{
datetime->prop = prop;
datetime->tzid_param = icalproperty_get_first_parameter (prop, ICAL_TZID_PARAMETER);
@@ -564,7 +571,8 @@ scan_datetime (ECalComponent *comp, struct datetime *datetime, icalproperty *pro
/* Scans an exception date property */
static void
-scan_exdate (ECalComponent *comp, icalproperty *prop)
+scan_exdate (ECalComponent *comp,
+ icalproperty *prop)
{
ECalComponentPrivate *priv;
struct datetime *dt;
@@ -580,7 +588,9 @@ scan_exdate (ECalComponent *comp, icalproperty *prop)
/* Scans and attendee property */
static void
-scan_organizer (ECalComponent *comp, struct organizer *organizer, icalproperty *prop)
+scan_organizer (ECalComponent *comp,
+ struct organizer *organizer,
+ icalproperty *prop)
{
organizer->prop = prop;
@@ -591,7 +601,9 @@ scan_organizer (ECalComponent *comp, struct organizer *organizer, icalproperty *
/* Scans an icalperiodtype property */
static void
-scan_period (ECalComponent *comp, GSList **list, icalproperty *prop)
+scan_period (ECalComponent *comp,
+ GSList **list,
+ icalproperty *prop)
{
struct period *period;
@@ -604,7 +616,9 @@ scan_period (ECalComponent *comp, GSList **list, icalproperty *prop)
/* Scans an icalrecurtype property */
static void
-scan_recur_id (ECalComponent *comp, struct recur_id *recur_id, icalproperty *prop)
+scan_recur_id (ECalComponent *comp,
+ struct recur_id *recur_id,
+ icalproperty *prop)
{
scan_datetime (comp, &recur_id->recur_time, prop);
@@ -613,14 +627,17 @@ scan_recur_id (ECalComponent *comp, struct recur_id *recur_id, icalproperty *pro
/* Scans an icalrecurtype property */
static void
-scan_recur (ECalComponent *comp, GSList **list, icalproperty *prop)
+scan_recur (ECalComponent *comp,
+ GSList **list,
+ icalproperty *prop)
{
*list = g_slist_append (*list, prop);
}
/* Scans the summary property */
static void
-scan_summary (ECalComponent *comp, icalproperty *prop)
+scan_summary (ECalComponent *comp,
+ icalproperty *prop)
{
ECalComponentPrivate *priv;
@@ -632,7 +649,9 @@ scan_summary (ECalComponent *comp, icalproperty *prop)
/* Scans a text (i.e. text + altrep) property */
static void
-scan_text (ECalComponent *comp, GSList **text_list, icalproperty *prop)
+scan_text (ECalComponent *comp,
+ GSList **text_list,
+ icalproperty *prop)
{
struct text *text;
@@ -645,7 +664,8 @@ scan_text (ECalComponent *comp, GSList **text_list, icalproperty *prop)
/* Scans an icalproperty and adds its mapping to the component */
static void
-scan_property (ECalComponent *comp, icalproperty *prop)
+scan_property (ECalComponent *comp,
+ icalproperty *prop)
{
ECalComponentPrivate *priv;
icalproperty_kind kind;
@@ -802,7 +822,8 @@ alarm_uid_from_prop (icalproperty *prop)
* pointer to the UID string inside the property itself.
*/
static const gchar *
-set_alarm_uid (icalcomponent *alarm, const gchar *auid)
+set_alarm_uid (icalcomponent *alarm,
+ const gchar *auid)
{
icalproperty *prop;
const gchar *inprop_auid;
@@ -854,7 +875,9 @@ remove_alarm_uid (icalcomponent *alarm)
* with the specified UID. Returns the actual UID used.
*/
static const gchar *
-add_alarm (ECalComponent *comp, icalcomponent *alarm, const gchar *auid)
+add_alarm (ECalComponent *comp,
+ icalcomponent *alarm,
+ const gchar *auid)
{
ECalComponentPrivate *priv;
icalcomponent *old_alarm;
@@ -886,7 +909,8 @@ add_alarm (ECalComponent *comp, icalcomponent *alarm, const gchar *auid)
/* Scans an alarm subcomponent, adds an UID extension property to it (so that we
* can reference alarms by unique IDs), and adds its mapping to the component. */
static void
-scan_alarm (ECalComponent *comp, icalcomponent *alarm)
+scan_alarm (ECalComponent *comp,
+ icalcomponent *alarm)
{
icalproperty *prop;
const gchar *auid;
@@ -991,7 +1015,8 @@ ensure_mandatory_properties (ECalComponent *comp)
* that will be set in the new component will be its unique identifier.
**/
void
-e_cal_component_set_new_vtype (ECalComponent *comp, ECalComponentVType type)
+e_cal_component_set_new_vtype (ECalComponent *comp,
+ ECalComponentVType type)
{
ECalComponentPrivate *priv;
icalcomponent *icalcomp;
@@ -1067,7 +1092,8 @@ e_cal_component_set_new_vtype (ECalComponent *comp, ECalComponentVType type)
* type.
**/
gboolean
-e_cal_component_set_icalcomponent (ECalComponent *comp, icalcomponent *icalcomp)
+e_cal_component_set_icalcomponent (ECalComponent *comp,
+ icalcomponent *icalcomp)
{
ECalComponentPrivate *priv;
icalcomponent_kind kind;
@@ -1248,7 +1274,9 @@ e_cal_component_get_as_string (ECalComponent *comp)
* has the mandatory properties it needs.
*/
static void
-ensure_alarm_properties_cb (gpointer key, gpointer value, gpointer data)
+ensure_alarm_properties_cb (gpointer key,
+ gpointer value,
+ gpointer data)
{
ECalComponent *comp;
ECalComponentPrivate *priv;
@@ -1429,7 +1457,8 @@ e_cal_component_get_id (ECalComponent *comp)
* Queries the unique identifier of a calendar component object.
**/
void
-e_cal_component_get_uid (ECalComponent *comp, const gchar **uid)
+e_cal_component_get_uid (ECalComponent *comp,
+ const gchar **uid)
{
ECalComponentPrivate *priv;
@@ -1454,7 +1483,8 @@ e_cal_component_get_uid (ECalComponent *comp, const gchar **uid)
* Sets the unique identifier string of a calendar component object.
**/
void
-e_cal_component_set_uid (ECalComponent *comp, const gchar *uid)
+e_cal_component_set_uid (ECalComponent *comp,
+ const gchar *uid)
{
ECalComponentPrivate *priv;
@@ -1472,7 +1502,8 @@ e_cal_component_set_uid (ECalComponent *comp, const gchar *uid)
}
static gboolean
-case_contains (const gchar *where, const gchar *what)
+case_contains (const gchar *where,
+ const gchar *what)
{
gchar *lwhere, *lwhat;
gboolean res = FALSE;
@@ -1494,7 +1525,9 @@ case_contains (const gchar *where, const gchar *what)
/* Gets a text list value */
static void
-get_attachment_list (ECalComponent *comp, GSList *attachment_list, GSList **al)
+get_attachment_list (ECalComponent *comp,
+ GSList *attachment_list,
+ GSList **al)
{
GSList *l;
gint index;
@@ -1521,7 +1554,7 @@ get_attachment_list (ECalComponent *comp, GSList *attachment_list, GSList **al)
icalattach_ref (attachment->attach);
data = icalattach_get_url (attachment->attach);
buf_size = strlen (data);
- buf = g_malloc0 (buf_size+1);
+ buf = g_malloc0 (buf_size + 1);
icalvalue_decode_ical_string (data, buf, buf_size);
} else if (attachment->prop) {
if (!attachment->temporary_filename) {
@@ -1599,8 +1632,8 @@ get_attachment_list (ECalComponent *comp, GSList *attachment_list, GSList **al)
static void
set_attachment_list (icalcomponent *icalcomp,
- GSList **attachment_list,
- GSList *al)
+ GSList **attachment_list,
+ GSList *al)
{
GSList *l;
@@ -1651,7 +1684,8 @@ set_attachment_list (icalcomponent *icalcomp,
* the @attachment_list should be freed by calling #g_slist_free.
**/
void
-e_cal_component_get_attachment_list (ECalComponent *comp, GSList **attachment_list)
+e_cal_component_get_attachment_list (ECalComponent *comp,
+ GSList **attachment_list)
{
ECalComponentPrivate *priv;
@@ -1676,7 +1710,8 @@ e_cal_component_get_attachment_list (ECalComponent *comp, GSList **attachment_li
* Sets the attachments of a calendar component object
**/
void
-e_cal_component_set_attachment_list (ECalComponent *comp, GSList *attachment_list)
+e_cal_component_set_attachment_list (ECalComponent *comp,
+ GSList *attachment_list)
{
ECalComponentPrivate *priv;
@@ -1745,7 +1780,8 @@ e_cal_component_get_num_attachments (ECalComponent *comp)
* a comma-separated list of all categories set in the component.
**/
void
-e_cal_component_get_categories (ECalComponent *comp, const gchar **categories)
+e_cal_component_get_categories (ECalComponent *comp,
+ const gchar **categories)
{
ECalComponentPrivate *priv;
@@ -1770,7 +1806,8 @@ e_cal_component_get_categories (ECalComponent *comp, const gchar **categories)
* Sets the list of categories for a calendar component.
**/
void
-e_cal_component_set_categories (ECalComponent *comp, const gchar *categories)
+e_cal_component_set_categories (ECalComponent *comp,
+ const gchar *categories)
{
ECalComponentPrivate *priv;
@@ -1808,7 +1845,8 @@ e_cal_component_set_categories (ECalComponent *comp, const gchar *categories)
* in the returned categ_list is a string with the corresponding category.
**/
void
-e_cal_component_get_categories_list (ECalComponent *comp, GSList **categ_list)
+e_cal_component_get_categories_list (ECalComponent *comp,
+ GSList **categ_list)
{
ECalComponentPrivate *priv;
const gchar *categories;
@@ -1879,7 +1917,8 @@ stringify_categories (GSList *categ_list)
* Sets the list of categories of a calendar component object.
**/
void
-e_cal_component_set_categories_list (ECalComponent *comp, GSList *categ_list)
+e_cal_component_set_categories_list (ECalComponent *comp,
+ GSList *categ_list)
{
ECalComponentPrivate *priv;
gchar *categories_str;
@@ -1919,7 +1958,8 @@ e_cal_component_set_categories_list (ECalComponent *comp, GSList *categ_list)
* #E_CAL_COMPONENT_CLASS_NONE.
**/
void
-e_cal_component_get_classification (ECalComponent *comp, ECalComponentClassification *classif)
+e_cal_component_get_classification (ECalComponent *comp,
+ ECalComponentClassification *classif)
{
ECalComponentPrivate *priv;
icalproperty_class class;
@@ -1964,7 +2004,8 @@ e_cal_component_get_classification (ECalComponent *comp, ECalComponentClassifica
* the property, specify E_CAL_COMPONENT_CLASS_NONE for @classif.
**/
void
-e_cal_component_set_classification (ECalComponent *comp, ECalComponentClassification classif)
+e_cal_component_set_classification (ECalComponent *comp,
+ ECalComponentClassification classif)
{
ECalComponentPrivate *priv;
icalproperty_class class;
@@ -2015,8 +2056,8 @@ e_cal_component_set_classification (ECalComponent *comp, ECalComponentClassifica
/* Gets a text list value */
static void
get_text_list (GSList *text_list,
- const gchar *(* get_prop_func) (const icalproperty *prop),
- GSList **tl)
+ const gchar *(* get_prop_func) (const icalproperty *prop),
+ GSList **tl)
{
GSList *l;
@@ -2049,9 +2090,9 @@ get_text_list (GSList *text_list,
/* Sets a text list value */
static void
set_text_list (ECalComponent *comp,
- icalproperty *(* new_prop_func) (const gchar *value),
- GSList **text_list,
- GSList *tl)
+ icalproperty *(* new_prop_func) (const gchar *value),
+ GSList **text_list,
+ GSList *tl)
{
ECalComponentPrivate *priv;
GSList *l;
@@ -2112,7 +2153,8 @@ set_text_list (ECalComponent *comp,
* #ECalComponentText is returned.
**/
void
-e_cal_component_get_comment_list (ECalComponent *comp, GSList **text_list)
+e_cal_component_get_comment_list (ECalComponent *comp,
+ GSList **text_list)
{
ECalComponentPrivate *priv;
@@ -2136,7 +2178,8 @@ e_cal_component_get_comment_list (ECalComponent *comp, GSList **text_list)
* #ECalComponentText structures is used.
**/
void
-e_cal_component_set_comment_list (ECalComponent *comp, GSList *text_list)
+e_cal_component_set_comment_list (ECalComponent *comp,
+ GSList *text_list)
{
ECalComponentPrivate *priv;
@@ -2161,7 +2204,8 @@ e_cal_component_set_comment_list (ECalComponent *comp, GSList *text_list)
* #ECalComponentText is returned.
**/
void
-e_cal_component_get_contact_list (ECalComponent *comp, GSList **text_list)
+e_cal_component_get_contact_list (ECalComponent *comp,
+ GSList **text_list)
{
ECalComponentPrivate *priv;
@@ -2185,7 +2229,8 @@ e_cal_component_get_contact_list (ECalComponent *comp, GSList **text_list)
* #ECalComponentText structures is used.
**/
void
-e_cal_component_set_contact_list (ECalComponent *comp, GSList *text_list)
+e_cal_component_set_contact_list (ECalComponent *comp,
+ GSList *text_list)
{
ECalComponentPrivate *priv;
@@ -2201,8 +2246,8 @@ e_cal_component_set_contact_list (ECalComponent *comp, GSList *text_list)
/* Gets a struct icaltimetype value */
static void
get_icaltimetype (icalproperty *prop,
- struct icaltimetype (* get_prop_func) (const icalproperty *prop),
- struct icaltimetype **t)
+ struct icaltimetype (*get_prop_func) (const icalproperty *prop),
+ struct icaltimetype **t)
{
if (!prop) {
*t = NULL;
@@ -2215,10 +2260,12 @@ get_icaltimetype (icalproperty *prop,
/* Sets a struct icaltimetype value */
static void
-set_icaltimetype (ECalComponent *comp, icalproperty **prop,
- icalproperty *(* prop_new_func) (struct icaltimetype v),
- void (* prop_set_func) (icalproperty *prop, struct icaltimetype v),
- struct icaltimetype *t)
+set_icaltimetype (ECalComponent *comp,
+ icalproperty **prop,
+ icalproperty *(*prop_new_func) (struct icaltimetype v),
+ void (* prop_set_func) (icalproperty *prop,
+ struct icaltimetype v),
+ struct icaltimetype *t)
{
ECalComponentPrivate *priv;
@@ -2251,7 +2298,8 @@ set_icaltimetype (ECalComponent *comp, icalproperty **prop,
* Queries the date at which a calendar compoment object was completed.
**/
void
-e_cal_component_get_completed (ECalComponent *comp, struct icaltimetype **t)
+e_cal_component_get_completed (ECalComponent *comp,
+ struct icaltimetype **t)
{
ECalComponentPrivate *priv;
@@ -2273,7 +2321,8 @@ e_cal_component_get_completed (ECalComponent *comp, struct icaltimetype **t)
* Sets the date at which a calendar component object was completed.
**/
void
-e_cal_component_set_completed (ECalComponent *comp, struct icaltimetype *t)
+e_cal_component_set_completed (ECalComponent *comp,
+ struct icaltimetype *t)
{
ECalComponentPrivate *priv;
@@ -2299,7 +2348,8 @@ e_cal_component_set_completed (ECalComponent *comp, struct icaltimetype *t)
* calendar store.
**/
void
-e_cal_component_get_created (ECalComponent *comp, struct icaltimetype **t)
+e_cal_component_get_created (ECalComponent *comp,
+ struct icaltimetype **t)
{
ECalComponentPrivate *priv;
@@ -2323,7 +2373,8 @@ e_cal_component_get_created (ECalComponent *comp, struct icaltimetype **t)
* not by calendar user agents.
**/
void
-e_cal_component_set_created (ECalComponent *comp, struct icaltimetype *t)
+e_cal_component_set_created (ECalComponent *comp,
+ struct icaltimetype *t)
{
ECalComponentPrivate *priv;
@@ -2352,7 +2403,8 @@ e_cal_component_set_created (ECalComponent *comp, struct icaltimetype *t)
* most one description.
**/
void
-e_cal_component_get_description_list (ECalComponent *comp, GSList **text_list)
+e_cal_component_get_description_list (ECalComponent *comp,
+ GSList **text_list)
{
ECalComponentPrivate *priv;
@@ -2377,7 +2429,8 @@ e_cal_component_get_description_list (ECalComponent *comp, GSList **text_list)
* at most one description.
**/
void
-e_cal_component_set_description_list (ECalComponent *comp, GSList *text_list)
+e_cal_component_set_description_list (ECalComponent *comp,
+ GSList *text_list)
{
ECalComponentPrivate *priv;
@@ -2393,8 +2446,8 @@ e_cal_component_set_description_list (ECalComponent *comp, GSList *text_list)
/* Gets a date/time and timezone pair */
static void
get_datetime (struct datetime *datetime,
- struct icaltimetype (* get_prop_func) (const icalproperty *prop),
- ECalComponentDateTime *dt)
+ struct icaltimetype (* get_prop_func) (const icalproperty *prop),
+ ECalComponentDateTime *dt)
{
if (datetime->prop) {
dt->value = g_new (struct icaltimetype, 1);
@@ -2403,7 +2456,7 @@ get_datetime (struct datetime *datetime,
dt->value = NULL;
/* If the icaltimetype has is_utc set, we set "UTC" as the TZID.
- This makes the timezone code simpler. */
+ * This makes the timezone code simpler. */
if (datetime->tzid_param)
dt->tzid = g_strdup (icalparameter_get_tzid (datetime->tzid_param));
else if (dt->value && dt->value->is_utc)
@@ -2414,17 +2467,19 @@ get_datetime (struct datetime *datetime,
/* Sets a date/time and timezone pair */
static void
-set_datetime (ECalComponent *comp, struct datetime *datetime,
- icalproperty *(* prop_new_func) (struct icaltimetype v),
- void (* prop_set_func) (icalproperty * prop, struct icaltimetype v),
- ECalComponentDateTime *dt)
+set_datetime (ECalComponent *comp,
+ struct datetime *datetime,
+ icalproperty *(* prop_new_func) (struct icaltimetype v),
+ void (* prop_set_func) (icalproperty *prop,
+ struct icaltimetype v),
+ ECalComponentDateTime *dt)
{
ECalComponentPrivate *priv;
priv = comp->priv;
/* If we are setting the property to NULL (i.e. removing it), then
- we remove it if it exists. */
+ * we remove it if it exists. */
if (!dt) {
if (datetime->prop) {
icalcomponent_remove_property (priv->icalcomp, datetime->prop);
@@ -2472,11 +2527,11 @@ set_datetime (ECalComponent *comp, struct datetime *datetime,
}
/* This tries to get the DTSTART + DURATION for a VEVENT or VTODO. In a
- VEVENT this is used for the DTEND if no DTEND exists, In a VTOTO it is
- used for the DUE date if DUE doesn't exist. */
+ * VEVENT this is used for the DTEND if no DTEND exists, In a VTOTO it is
+ * used for the DUE date if DUE doesn't exist. */
static void
e_cal_component_get_start_plus_duration (ECalComponent *comp,
- ECalComponentDateTime *dt)
+ ECalComponentDateTime *dt)
{
ECalComponentPrivate *priv;
struct icaldurationtype duration;
@@ -2494,13 +2549,13 @@ e_cal_component_get_start_plus_duration (ECalComponent *comp,
duration = icalproperty_get_duration (priv->duration);
/* The DURATION shouldn't be negative, but just return DTSTART if it
- is, i.e. assume it is 0. */
+ * is, i.e. assume it is 0. */
if (duration.is_neg)
return;
/* If DTSTART is a DATE value, then we need to check if the DURATION
- includes any hours, minutes or seconds. If it does, we need to
- make the DTEND/DUE a DATE-TIME value. */
+ * includes any hours, minutes or seconds. If it does, we need to
+ * make the DTEND/DUE a DATE-TIME value. */
duration.days += duration.weeks * 7;
if (dt->value->is_date) {
if (duration.hours != 0 || duration.minutes != 0
@@ -2523,7 +2578,8 @@ e_cal_component_get_start_plus_duration (ECalComponent *comp,
* Queries the date/time end of a calendar component object.
**/
void
-e_cal_component_get_dtend (ECalComponent *comp, ECalComponentDateTime *dt)
+e_cal_component_get_dtend (ECalComponent *comp,
+ ECalComponentDateTime *dt)
{
ECalComponentPrivate *priv;
@@ -2541,7 +2597,7 @@ e_cal_component_get_dtend (ECalComponent *comp, ECalComponentDateTime *dt)
get_datetime (&priv->dtend, icalproperty_get_dtend, dt);
/* If we don't have a DTEND property, then we try to get DTSTART
- + DURATION. */
+ * + DURATION. */
if (!dt->value)
e_cal_component_get_start_plus_duration (comp, dt);
}
@@ -2554,7 +2610,8 @@ e_cal_component_get_dtend (ECalComponent *comp, ECalComponentDateTime *dt)
* Sets the date/time end property of a calendar component object.
**/
void
-e_cal_component_set_dtend (ECalComponent *comp, ECalComponentDateTime *dt)
+e_cal_component_set_dtend (ECalComponent *comp,
+ ECalComponentDateTime *dt)
{
ECalComponentPrivate *priv;
@@ -2570,8 +2627,8 @@ e_cal_component_set_dtend (ECalComponent *comp, ECalComponentDateTime *dt)
dt);
/* Make sure we remove any existing DURATION property, as it can't be
- used with a DTEND. If DTEND is set to NULL, i.e. removed, we also
- want to remove any DURATION. */
+ * used with a DTEND. If DTEND is set to NULL, i.e. removed, we also
+ * want to remove any DURATION. */
if (priv->duration) {
icalcomponent_remove_property (priv->icalcomp, priv->duration);
icalproperty_free (priv->duration);
@@ -2590,7 +2647,8 @@ e_cal_component_set_dtend (ECalComponent *comp, ECalComponentDateTime *dt)
* the last time at which the object was modified by a calendar user agent.
**/
void
-e_cal_component_get_dtstamp (ECalComponent *comp, struct icaltimetype *t)
+e_cal_component_get_dtstamp (ECalComponent *comp,
+ struct icaltimetype *t)
{
ECalComponentPrivate *priv;
@@ -2617,7 +2675,8 @@ e_cal_component_get_dtstamp (ECalComponent *comp, struct icaltimetype *t)
* properties.
**/
void
-e_cal_component_set_dtstamp (ECalComponent *comp, struct icaltimetype *t)
+e_cal_component_set_dtstamp (ECalComponent *comp,
+ struct icaltimetype *t)
{
ECalComponentPrivate *priv;
@@ -2643,7 +2702,8 @@ e_cal_component_set_dtstamp (ECalComponent *comp, struct icaltimetype *t)
* Queries the date/time start of a calendar component object.
**/
void
-e_cal_component_get_dtstart (ECalComponent *comp, ECalComponentDateTime *dt)
+e_cal_component_get_dtstart (ECalComponent *comp,
+ ECalComponentDateTime *dt)
{
ECalComponentPrivate *priv;
@@ -2669,7 +2729,8 @@ e_cal_component_get_dtstart (ECalComponent *comp, ECalComponentDateTime *dt)
* Sets the date/time start property of a calendar component object.
**/
void
-e_cal_component_set_dtstart (ECalComponent *comp, ECalComponentDateTime *dt)
+e_cal_component_set_dtstart (ECalComponent *comp,
+ ECalComponentDateTime *dt)
{
ECalComponentPrivate *priv;
@@ -2696,7 +2757,8 @@ e_cal_component_set_dtstart (ECalComponent *comp, ECalComponentDateTime *dt)
* Queries the due date/time of a calendar component object.
**/
void
-e_cal_component_get_due (ECalComponent *comp, ECalComponentDateTime *dt)
+e_cal_component_get_due (ECalComponent *comp,
+ ECalComponentDateTime *dt)
{
ECalComponentPrivate *priv;
@@ -2714,7 +2776,7 @@ e_cal_component_get_due (ECalComponent *comp, ECalComponentDateTime *dt)
get_datetime (&priv->due, icalproperty_get_due, dt);
/* If we don't have a DTEND property, then we try to get DTSTART
- + DURATION. */
+ * + DURATION. */
if (!dt->value)
e_cal_component_get_start_plus_duration (comp, dt);
}
@@ -2727,7 +2789,8 @@ e_cal_component_get_due (ECalComponent *comp, ECalComponentDateTime *dt)
* Sets the due date/time property of a calendar component object.
**/
void
-e_cal_component_set_due (ECalComponent *comp, ECalComponentDateTime *dt)
+e_cal_component_set_due (ECalComponent *comp,
+ ECalComponentDateTime *dt)
{
ECalComponentPrivate *priv;
@@ -2743,8 +2806,8 @@ e_cal_component_set_due (ECalComponent *comp, ECalComponentDateTime *dt)
dt);
/* Make sure we remove any existing DURATION property, as it can't be
- used with a DTEND. If DTEND is set to NULL, i.e. removed, we also
- want to remove any DURATION. */
+ * used with a DTEND. If DTEND is set to NULL, i.e. removed, we also
+ * want to remove any DURATION. */
if (priv->duration) {
icalcomponent_remove_property (priv->icalcomp, priv->duration);
icalproperty_free (priv->duration);
@@ -2757,8 +2820,8 @@ e_cal_component_set_due (ECalComponent *comp, ECalComponentDateTime *dt)
/* Builds a list of ECalComponentPeriod structures based on a list of icalproperties */
static void
get_period_list (GSList *period_list,
- struct icaldatetimeperiodtype (* get_prop_func) (const icalproperty *prop),
- GSList **list)
+ struct icaldatetimeperiodtype (* get_prop_func) (const icalproperty *prop),
+ GSList **list)
{
GSList *l;
@@ -2823,9 +2886,9 @@ get_period_list (GSList *period_list,
/* Sets a period list value */
static void
set_period_list (ECalComponent *comp,
- icalproperty *(* new_prop_func) (struct icaldatetimeperiodtype period),
- GSList **period_list,
- GSList *pl)
+ icalproperty *(* new_prop_func) (struct icaldatetimeperiodtype period),
+ GSList **period_list,
+ GSList *pl)
{
ECalComponentPrivate *priv;
GSList *l;
@@ -2899,7 +2962,8 @@ set_period_list (ECalComponent *comp,
* Queries the list of exception date properties in a calendar component object.
**/
void
-e_cal_component_get_exdate_list (ECalComponent *comp, GSList **exdate_list)
+e_cal_component_get_exdate_list (ECalComponent *comp,
+ GSList **exdate_list)
{
ECalComponentPrivate *priv;
GSList *l;
@@ -2943,7 +3007,8 @@ e_cal_component_get_exdate_list (ECalComponent *comp, GSList **exdate_list)
* Sets the list of exception dates in a calendar component object.
**/
void
-e_cal_component_set_exdate_list (ECalComponent *comp, GSList *exdate_list)
+e_cal_component_set_exdate_list (ECalComponent *comp,
+ GSList *exdate_list)
{
ECalComponentPrivate *priv;
GSList *l;
@@ -2962,7 +3027,7 @@ e_cal_component_set_exdate_list (ECalComponent *comp, GSList *exdate_list)
dt = l->data;
/* Removing the DATE or DATE-TIME property will also remove
- any TZID parameter. */
+ * any TZID parameter. */
icalcomponent_remove_property (priv->icalcomp, dt->prop);
icalproperty_free (dt->prop);
g_free (dt);
@@ -3026,8 +3091,8 @@ e_cal_component_has_exdates (ECalComponent *comp)
/* Gets a list of recurrence rules */
static void
get_recur_list (GSList *recur_list,
- struct icalrecurrencetype (* get_prop_func) (const icalproperty *prop),
- GSList **list)
+ struct icalrecurrencetype (* get_prop_func) (const icalproperty *prop),
+ GSList **list)
{
GSList *l;
@@ -3051,9 +3116,9 @@ get_recur_list (GSList *recur_list,
/* Sets a list of recurrence rules */
static void
set_recur_list (ECalComponent *comp,
- icalproperty *(* new_prop_func) (struct icalrecurrencetype recur),
- GSList **recur_list,
- GSList *rl)
+ icalproperty *(* new_prop_func) (struct icalrecurrencetype recur),
+ GSList **recur_list,
+ GSList *rl)
{
ECalComponentPrivate *priv;
GSList *l;
@@ -3102,7 +3167,8 @@ set_recur_list (ECalComponent *comp,
* object.
**/
void
-e_cal_component_get_exrule_list (ECalComponent *comp, GSList **recur_list)
+e_cal_component_get_exrule_list (ECalComponent *comp,
+ GSList **recur_list)
{
ECalComponentPrivate *priv;
@@ -3124,7 +3190,8 @@ e_cal_component_get_exrule_list (ECalComponent *comp, GSList **recur_list)
* Queries the list of exception rule properties of a calendar component object.
**/
void
-e_cal_component_get_exrule_property_list (ECalComponent *comp, GSList **recur_list)
+e_cal_component_get_exrule_property_list (ECalComponent *comp,
+ GSList **recur_list)
{
ECalComponentPrivate *priv;
@@ -3146,7 +3213,8 @@ e_cal_component_get_exrule_property_list (ECalComponent *comp, GSList **recur_li
* Sets the list of exception rules in a calendar component object.
**/
void
-e_cal_component_set_exrule_list (ECalComponent *comp, GSList *recur_list)
+e_cal_component_set_exrule_list (ECalComponent *comp,
+ GSList *recur_list)
{
ECalComponentPrivate *priv;
@@ -3208,7 +3276,8 @@ e_cal_component_has_exceptions (ECalComponent *comp)
* Gets the geographic position property of a calendar component object.
**/
void
-e_cal_component_get_geo (ECalComponent *comp, struct icalgeotype **geo)
+e_cal_component_get_geo (ECalComponent *comp,
+ struct icalgeotype **geo)
{
ECalComponentPrivate *priv;
@@ -3234,7 +3303,8 @@ e_cal_component_get_geo (ECalComponent *comp, struct icalgeotype **geo)
* Sets the geographic position property on a calendar component object.
**/
void
-e_cal_component_set_geo (ECalComponent *comp, struct icalgeotype *geo)
+e_cal_component_set_geo (ECalComponent *comp,
+ struct icalgeotype *geo)
{
ECalComponentPrivate *priv;
@@ -3271,7 +3341,8 @@ e_cal_component_set_geo (ECalComponent *comp, struct icalgeotype *geo)
* the calendar store.
**/
void
-e_cal_component_get_last_modified (ECalComponent *comp, struct icaltimetype **t)
+e_cal_component_get_last_modified (ECalComponent *comp,
+ struct icaltimetype **t)
{
ECalComponentPrivate *priv;
@@ -3294,7 +3365,8 @@ e_cal_component_get_last_modified (ECalComponent *comp, struct icaltimetype **t)
* calendar store. This should not be called by plain calendar user agents.
**/
void
-e_cal_component_set_last_modified (ECalComponent *comp, struct icaltimetype *t)
+e_cal_component_set_last_modified (ECalComponent *comp,
+ struct icaltimetype *t)
{
ECalComponentPrivate *priv;
@@ -3318,7 +3390,8 @@ e_cal_component_set_last_modified (ECalComponent *comp, struct icaltimetype *t)
* Queries the organizer property of a calendar component object
**/
void
-e_cal_component_get_organizer (ECalComponent *comp, ECalComponentOrganizer *organizer)
+e_cal_component_get_organizer (ECalComponent *comp,
+ ECalComponentOrganizer *organizer)
{
ECalComponentPrivate *priv;
@@ -3359,7 +3432,8 @@ e_cal_component_get_organizer (ECalComponent *comp, ECalComponentOrganizer *orga
* Sets the organizer of a calendar component object
**/
void
-e_cal_component_set_organizer (ECalComponent *comp, ECalComponentOrganizer *organizer)
+e_cal_component_set_organizer (ECalComponent *comp,
+ ECalComponentOrganizer *organizer)
{
ECalComponentPrivate *priv;
@@ -3475,7 +3549,8 @@ e_cal_component_has_organizer (ECalComponent *comp)
* Queries the percent-complete property of a calendar component object.
**/
void
-e_cal_component_get_percent (ECalComponent *comp, gint **percent)
+e_cal_component_get_percent (ECalComponent *comp,
+ gint **percent)
{
ECalComponentPrivate *priv;
@@ -3499,7 +3574,8 @@ e_cal_component_get_percent (ECalComponent *comp, gint **percent)
* Since: 2.28
**/
void
-e_cal_component_set_percent_as_int (ECalComponent *comp, gint percent)
+e_cal_component_set_percent_as_int (ECalComponent *comp,
+ gint percent)
{
ECalComponentPrivate *priv;
@@ -3560,7 +3636,8 @@ e_cal_component_get_percent_as_int (ECalComponent *comp)
* Sets the percent-complete property of a calendar component object.
**/
void
-e_cal_component_set_percent (ECalComponent *comp, gint *percent)
+e_cal_component_set_percent (ECalComponent *comp,
+ gint *percent)
{
ECalComponentPrivate *priv;
@@ -3599,7 +3676,8 @@ e_cal_component_set_percent (ECalComponent *comp, gint *percent)
* Queries the priority property of a calendar component object.
**/
void
-e_cal_component_get_priority (ECalComponent *comp, gint **priority)
+e_cal_component_get_priority (ECalComponent *comp,
+ gint **priority)
{
ECalComponentPrivate *priv;
@@ -3625,7 +3703,8 @@ e_cal_component_get_priority (ECalComponent *comp, gint **priority)
* Sets the priority property of a calendar component object.
**/
void
-e_cal_component_set_priority (ECalComponent *comp, gint *priority)
+e_cal_component_set_priority (ECalComponent *comp,
+ gint *priority)
{
ECalComponentPrivate *priv;
@@ -3663,7 +3742,8 @@ e_cal_component_set_priority (ECalComponent *comp, gint *priority)
* Queries the recurrence id property of a calendar component object.
**/
void
-e_cal_component_get_recurid (ECalComponent *comp, ECalComponentRange *recur_id)
+e_cal_component_get_recurid (ECalComponent *comp,
+ ECalComponentRange *recur_id)
{
ECalComponentPrivate *priv;
@@ -3717,7 +3797,8 @@ e_cal_component_get_recurid_as_string (ECalComponent *comp)
* Sets the recurrence id property of a calendar component object.
**/
void
-e_cal_component_set_recurid (ECalComponent *comp, ECalComponentRange *recur_id)
+e_cal_component_set_recurid (ECalComponent *comp,
+ ECalComponentRange *recur_id)
{
ECalComponentPrivate *priv;
@@ -3744,7 +3825,8 @@ e_cal_component_set_recurid (ECalComponent *comp, ECalComponentRange *recur_id)
* object.
**/
void
-e_cal_component_get_rdate_list (ECalComponent *comp, GSList **period_list)
+e_cal_component_get_rdate_list (ECalComponent *comp,
+ GSList **period_list)
{
ECalComponentPrivate *priv;
@@ -3766,7 +3848,8 @@ e_cal_component_get_rdate_list (ECalComponent *comp, GSList **period_list)
* Sets the list of recurrence dates in a calendar component object.
**/
void
-e_cal_component_set_rdate_list (ECalComponent *comp, GSList *period_list)
+e_cal_component_set_rdate_list (ECalComponent *comp,
+ GSList *period_list)
{
ECalComponentPrivate *priv;
@@ -3815,7 +3898,8 @@ e_cal_component_has_rdates (ECalComponent *comp)
* object.
**/
void
-e_cal_component_get_rrule_list (ECalComponent *comp, GSList **recur_list)
+e_cal_component_get_rrule_list (ECalComponent *comp,
+ GSList **recur_list)
{
ECalComponentPrivate *priv;
@@ -3837,7 +3921,8 @@ e_cal_component_get_rrule_list (ECalComponent *comp, GSList **recur_list)
* Queries a list of recurrence rule properties of a calendar component object.
**/
void
-e_cal_component_get_rrule_property_list (ECalComponent *comp, GSList **recur_list)
+e_cal_component_get_rrule_property_list (ECalComponent *comp,
+ GSList **recur_list)
{
ECalComponentPrivate *priv;
@@ -3859,7 +3944,8 @@ e_cal_component_get_rrule_property_list (ECalComponent *comp, GSList **recur_lis
* Sets the list of recurrence rules in a calendar component object.
**/
void
-e_cal_component_set_rrule_list (ECalComponent *comp, GSList *recur_list)
+e_cal_component_set_rrule_list (ECalComponent *comp,
+ GSList *recur_list)
{
ECalComponentPrivate *priv;
@@ -3914,7 +4000,8 @@ e_cal_component_has_recurrences (ECalComponent *comp)
/* Counts the elements in the by_xxx fields of an icalrecurrencetype */
static gint
-count_by_xxx (gshort *field, gint max_elements)
+count_by_xxx (gshort *field,
+ gint max_elements)
{
gint i;
@@ -4036,8 +4123,8 @@ e_cal_component_has_simple_recurrence (ECalComponent *comp)
gint pos;
/* Outlook 2000 uses BYDAY=TU;BYSETPOS=2, and will not
- accept BYDAY=2TU. So we now use the same as Outlook
- by default. */
+ * accept BYDAY=2TU. So we now use the same as Outlook
+ * by default. */
weekday = icalrecurrencetype_day_day_of_week (r->by_day[0]);
pos = icalrecurrencetype_day_position (r->by_day[0]);
@@ -4123,7 +4210,8 @@ e_cal_component_is_instance (ECalComponent *comp)
* Queries the sequence number of a calendar component object.
**/
void
-e_cal_component_get_sequence (ECalComponent *comp, gint **sequence)
+e_cal_component_get_sequence (ECalComponent *comp,
+ gint **sequence)
{
ECalComponentPrivate *priv;
@@ -4153,7 +4241,8 @@ e_cal_component_get_sequence (ECalComponent *comp, gint **sequence)
* automatically at the proper times.
**/
void
-e_cal_component_set_sequence (ECalComponent *comp, gint *sequence)
+e_cal_component_set_sequence (ECalComponent *comp,
+ gint *sequence)
{
ECalComponentPrivate *priv;
@@ -4192,7 +4281,8 @@ e_cal_component_set_sequence (ECalComponent *comp, gint *sequence)
* Queries the status property of a calendar component object.
**/
void
-e_cal_component_get_status (ECalComponent *comp, icalproperty_status *status)
+e_cal_component_get_status (ECalComponent *comp,
+ icalproperty_status *status)
{
ECalComponentPrivate *priv;
@@ -4220,7 +4310,8 @@ e_cal_component_get_status (ECalComponent *comp, icalproperty_status *status)
* Sets the status property of a calendar component object.
**/
void
-e_cal_component_set_status (ECalComponent *comp, icalproperty_status status)
+e_cal_component_set_status (ECalComponent *comp,
+ icalproperty_status status)
{
ECalComponentPrivate *priv;
@@ -4258,7 +4349,8 @@ e_cal_component_set_status (ECalComponent *comp, icalproperty_status status)
* Queries the summary of a calendar component object.
**/
void
-e_cal_component_get_summary (ECalComponent *comp, ECalComponentText *summary)
+e_cal_component_get_summary (ECalComponent *comp,
+ ECalComponentText *summary)
{
ECalComponentPrivate *priv;
@@ -4286,7 +4378,9 @@ typedef struct {
} SetAlarmDescriptionData;
static void
-set_alarm_description_cb (gpointer key, gpointer value, gpointer user_data)
+set_alarm_description_cb (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
icalcomponent *alarm;
icalproperty *icalprop, *desc_prop;
@@ -4337,7 +4431,8 @@ set_alarm_description_cb (gpointer key, gpointer value, gpointer user_data)
* Sets the summary of a calendar component object.
**/
void
-e_cal_component_set_summary (ECalComponent *comp, ECalComponentText *summary)
+e_cal_component_set_summary (ECalComponent *comp,
+ ECalComponentText *summary)
{
ECalComponentPrivate *priv;
SetAlarmDescriptionData sadd;
@@ -4401,7 +4496,8 @@ e_cal_component_set_summary (ECalComponent *comp, ECalComponentText *summary)
* Queries the time transparency of a calendar component object.
**/
void
-e_cal_component_get_transparency (ECalComponent *comp, ECalComponentTransparency *transp)
+e_cal_component_get_transparency (ECalComponent *comp,
+ ECalComponentTransparency *transp)
{
ECalComponentPrivate *priv;
icalproperty_transp ical_transp;
@@ -4446,7 +4542,8 @@ e_cal_component_get_transparency (ECalComponent *comp, ECalComponentTransparency
* Sets the time transparency of a calendar component object.
**/
void
-e_cal_component_set_transparency (ECalComponent *comp, ECalComponentTransparency transp)
+e_cal_component_set_transparency (ECalComponent *comp,
+ ECalComponentTransparency transp)
{
ECalComponentPrivate *priv;
icalproperty_transp ical_transp;
@@ -4498,7 +4595,8 @@ e_cal_component_set_transparency (ECalComponent *comp, ECalComponentTransparency
* Queries the uniform resource locator property of a calendar component object.
**/
void
-e_cal_component_get_url (ECalComponent *comp, const gchar **url)
+e_cal_component_get_url (ECalComponent *comp,
+ const gchar **url)
{
ECalComponentPrivate *priv;
@@ -4523,7 +4621,8 @@ e_cal_component_get_url (ECalComponent *comp, const gchar **url)
* Sets the uniform resource locator property of a calendar component object.
**/
void
-e_cal_component_set_url (ECalComponent *comp, const gchar *url)
+e_cal_component_set_url (ECalComponent *comp,
+ const gchar *url)
{
ECalComponentPrivate *priv;
@@ -4553,7 +4652,8 @@ e_cal_component_set_url (ECalComponent *comp, const gchar *url)
/* Gets a text list value */
static void
-get_attendee_list (GSList *attendee_list, GSList **al)
+get_attendee_list (GSList *attendee_list,
+ GSList **al)
{
GSList *l;
@@ -4610,8 +4710,8 @@ get_attendee_list (GSList *attendee_list, GSList **al)
/* Sets a text list value */
static void
set_attendee_list (icalcomponent *icalcomp,
- GSList **attendee_list,
- GSList *al)
+ GSList **attendee_list,
+ GSList *al)
{
GSList *l;
@@ -4702,7 +4802,8 @@ set_attendee_list (icalcomponent *icalcomp,
* Queries the attendee properties of the calendar component object
**/
void
-e_cal_component_get_attendee_list (ECalComponent *comp, GSList **attendee_list)
+e_cal_component_get_attendee_list (ECalComponent *comp,
+ GSList **attendee_list)
{
ECalComponentPrivate *priv;
@@ -4724,7 +4825,8 @@ e_cal_component_get_attendee_list (ECalComponent *comp, GSList **attendee_list)
* Sets the attendees of a calendar component object
**/
void
-e_cal_component_set_attendee_list (ECalComponent *comp, GSList *attendee_list)
+e_cal_component_set_attendee_list (ECalComponent *comp,
+ GSList *attendee_list)
{
ECalComponentPrivate *priv;
@@ -4769,7 +4871,8 @@ e_cal_component_has_attendees (ECalComponent *comp)
* Queries the location property of a calendar component object.
**/
void
-e_cal_component_get_location (ECalComponent *comp, const gchar **location)
+e_cal_component_get_location (ECalComponent *comp,
+ const gchar **location)
{
ECalComponentPrivate *priv;
@@ -4794,7 +4897,8 @@ e_cal_component_get_location (ECalComponent *comp, const gchar **location)
* Sets the location property of a calendar component object.
**/
void
-e_cal_component_set_location (ECalComponent *comp, const gchar *location)
+e_cal_component_set_location (ECalComponent *comp,
+ const gchar *location)
{
ECalComponentPrivate *priv;
@@ -5091,7 +5195,8 @@ e_cal_component_has_alarms (ECalComponent *comp)
* e_cal_component_alarm_free().
**/
void
-e_cal_component_add_alarm (ECalComponent *comp, ECalComponentAlarm *alarm)
+e_cal_component_add_alarm (ECalComponent *comp,
+ ECalComponentAlarm *alarm)
{
ECalComponentPrivate *priv;
@@ -5117,7 +5222,8 @@ e_cal_component_add_alarm (ECalComponent *comp, ECalComponentAlarm *alarm)
* function.
**/
void
-e_cal_component_remove_alarm (ECalComponent *comp, const gchar *auid)
+e_cal_component_remove_alarm (ECalComponent *comp,
+ const gchar *auid)
{
ECalComponentPrivate *priv;
icalcomponent *alarm;
@@ -5139,7 +5245,9 @@ e_cal_component_remove_alarm (ECalComponent *comp, const gchar *auid)
}
static gboolean
-for_each_remove_all_alarms (gpointer key, gpointer value, gpointer data)
+for_each_remove_all_alarms (gpointer key,
+ gpointer value,
+ gpointer data)
{
ECalComponent *comp = E_CAL_COMPONENT (data);
ECalComponentPrivate *priv;
@@ -5177,7 +5285,8 @@ e_cal_component_remove_all_alarms (ECalComponent *comp)
* own alarm structure.
*/
static void
-scan_alarm_property (ECalComponentAlarm *alarm, icalproperty *prop)
+scan_alarm_property (ECalComponentAlarm *alarm,
+ icalproperty *prop)
{
icalproperty_kind kind;
const gchar *xname;
@@ -5324,7 +5433,8 @@ e_cal_component_get_alarm_uids (ECalComponent *comp)
* e_cal_component_alarm_free().
**/
ECalComponentAlarm *
-e_cal_component_get_alarm (ECalComponent *comp, const gchar *auid)
+e_cal_component_get_alarm (ECalComponent *comp,
+ const gchar *auid)
{
ECalComponentPrivate *priv;
icalcomponent *alarm;
@@ -5489,7 +5599,8 @@ e_cal_component_alarm_get_uid (ECalComponentAlarm *alarm)
* Queries the action type of an alarm.
**/
void
-e_cal_component_alarm_get_action (ECalComponentAlarm *alarm, ECalComponentAlarmAction *action)
+e_cal_component_alarm_get_action (ECalComponentAlarm *alarm,
+ ECalComponentAlarmAction *action)
{
enum icalproperty_action ipa;
@@ -5538,7 +5649,8 @@ e_cal_component_alarm_get_action (ECalComponentAlarm *alarm, ECalComponentAlarmA
* Sets the action type for an alarm.
**/
void
-e_cal_component_alarm_set_action (ECalComponentAlarm *alarm, ECalComponentAlarmAction action)
+e_cal_component_alarm_set_action (ECalComponentAlarm *alarm,
+ ECalComponentAlarmAction action)
{
enum icalproperty_action ipa;
@@ -5585,7 +5697,8 @@ e_cal_component_alarm_set_action (ECalComponentAlarm *alarm, ECalComponentAlarmA
* Queries the attachment property of an alarm.
**/
void
-e_cal_component_alarm_get_attach (ECalComponentAlarm *alarm, icalattach **attach)
+e_cal_component_alarm_get_attach (ECalComponentAlarm *alarm,
+ icalattach **attach)
{
g_return_if_fail (alarm != NULL);
g_return_if_fail (attach != NULL);
@@ -5606,7 +5719,8 @@ e_cal_component_alarm_get_attach (ECalComponentAlarm *alarm, icalattach **attach
* Sets the attachment property of an alarm.
**/
void
-e_cal_component_alarm_set_attach (ECalComponentAlarm *alarm, icalattach *attach)
+e_cal_component_alarm_set_attach (ECalComponentAlarm *alarm,
+ icalattach *attach)
{
g_return_if_fail (alarm != NULL);
g_return_if_fail (alarm->icalcomp != NULL);
@@ -5631,7 +5745,8 @@ e_cal_component_alarm_set_attach (ECalComponentAlarm *alarm, icalattach *attach)
* Queries the description property of an alarm.
**/
void
-e_cal_component_alarm_get_description (ECalComponentAlarm *alarm, ECalComponentText *description)
+e_cal_component_alarm_get_description (ECalComponentAlarm *alarm,
+ ECalComponentText *description)
{
g_return_if_fail (alarm != NULL);
g_return_if_fail (description != NULL);
@@ -5656,7 +5771,8 @@ e_cal_component_alarm_get_description (ECalComponentAlarm *alarm, ECalComponentT
* Sets the description property of an alarm.
**/
void
-e_cal_component_alarm_set_description (ECalComponentAlarm *alarm, ECalComponentText *description)
+e_cal_component_alarm_set_description (ECalComponentAlarm *alarm,
+ ECalComponentText *description)
{
g_return_if_fail (alarm != NULL);
g_return_if_fail (alarm->icalcomp != NULL);
@@ -5693,7 +5809,8 @@ e_cal_component_alarm_set_description (ECalComponentAlarm *alarm, ECalComponentT
* Queries the repeat/duration properties of an alarm.
**/
void
-e_cal_component_alarm_get_repeat (ECalComponentAlarm *alarm, ECalComponentAlarmRepeat *repeat)
+e_cal_component_alarm_get_repeat (ECalComponentAlarm *alarm,
+ ECalComponentAlarmRepeat *repeat)
{
g_return_if_fail (alarm != NULL);
g_return_if_fail (repeat != NULL);
@@ -5718,7 +5835,8 @@ e_cal_component_alarm_get_repeat (ECalComponentAlarm *alarm, ECalComponentAlarmR
* Sets the repeat/duration values for an alarm.
**/
void
-e_cal_component_alarm_set_repeat (ECalComponentAlarm *alarm, ECalComponentAlarmRepeat repeat)
+e_cal_component_alarm_set_repeat (ECalComponentAlarm *alarm,
+ ECalComponentAlarmRepeat repeat)
{
g_return_if_fail (alarm != NULL);
g_return_if_fail (repeat.repetitions >= 0);
@@ -5758,7 +5876,8 @@ e_cal_component_alarm_set_repeat (ECalComponentAlarm *alarm, ECalComponentAlarmR
* Queries the trigger time for an alarm.
**/
void
-e_cal_component_alarm_get_trigger (ECalComponentAlarm *alarm, ECalComponentAlarmTrigger *trigger)
+e_cal_component_alarm_get_trigger (ECalComponentAlarm *alarm,
+ ECalComponentAlarmTrigger *trigger)
{
icalparameter *param;
struct icaltriggertype t;
@@ -5841,7 +5960,8 @@ e_cal_component_alarm_get_trigger (ECalComponentAlarm *alarm, ECalComponentAlarm
* Sets the trigger time of an alarm.
**/
void
-e_cal_component_alarm_set_trigger (ECalComponentAlarm *alarm, ECalComponentAlarmTrigger trigger)
+e_cal_component_alarm_set_trigger (ECalComponentAlarm *alarm,
+ ECalComponentAlarmTrigger trigger)
{
struct icaltriggertype t;
icalparameter *param;
@@ -5923,7 +6043,8 @@ e_cal_component_alarm_set_trigger (ECalComponentAlarm *alarm, ECalComponentAlarm
* Gets the list of attendees associated with an alarm.
*/
void
-e_cal_component_alarm_get_attendee_list (ECalComponentAlarm *alarm, GSList **attendee_list)
+e_cal_component_alarm_get_attendee_list (ECalComponentAlarm *alarm,
+ GSList **attendee_list)
{
g_return_if_fail (alarm != NULL);
@@ -5938,7 +6059,8 @@ e_cal_component_alarm_get_attendee_list (ECalComponentAlarm *alarm, GSList **att
* Sets the list of attendees for an alarm.
*/
void
-e_cal_component_alarm_set_attendee_list (ECalComponentAlarm *alarm, GSList *attendee_list)
+e_cal_component_alarm_set_attendee_list (ECalComponentAlarm *alarm,
+ GSList *attendee_list)
{
g_return_if_fail (alarm != NULL);
@@ -5981,10 +6103,10 @@ e_cal_component_alarm_get_icalcomponent (ECalComponentAlarm *alarm)
}
/* Returns TRUE if both strings match, i.e. they are both NULL or the
- strings are equal. */
+ * strings are equal. */
static gboolean
-e_cal_component_strings_match (const gchar *string1,
- const gchar *string2)
+e_cal_component_strings_match (const gchar *string1,
+ const gchar *string2)
{
if (string1 == NULL || string2 == NULL)
return (string1 == string2) ? TRUE : FALSE;
@@ -6007,8 +6129,8 @@ e_cal_component_strings_match (const gchar *string1,
* Returns: TRUE if the DTSTART and DTEND properties of the 2 components match.
**/
gboolean
-e_cal_component_event_dates_match (ECalComponent *comp1,
- ECalComponent *comp2)
+e_cal_component_event_dates_match (ECalComponent *comp1,
+ ECalComponent *comp2)
{
ECalComponentDateTime comp1_dtstart, comp1_dtend;
ECalComponentDateTime comp2_dtstart, comp2_dtend;
diff --git a/calendar/libecal/e-cal-recur.c b/calendar/libecal/e-cal-recur.c
index 49df9e5..8278d00 100644
--- a/calendar/libecal/e-cal-recur.c
+++ b/calendar/libecal/e-cal-recur.c
@@ -107,8 +107,8 @@
*/
/* This is the maximum year we will go up to (inclusive). Since we use time_t
- values we can't go past 2037 anyway, and some of our VTIMEZONEs may stop
- at 2037 as well. */
+ * values we can't go past 2037 anyway, and some of our VTIMEZONEs may stop
+ * at 2037 as well. */
#define MAX_YEAR 2037
/* Define this for some debugging output. */
@@ -123,15 +123,15 @@ typedef struct {
gint interval;
/* Specifies the end of the recurrence, inclusive. No occurrences are
- generated after this date. If it is 0, the event recurs forever. */
+ * generated after this date. If it is 0, the event recurs forever. */
time_t enddate;
/* WKST property - the week start day: 0 = Monday to 6 = Sunday. */
gint week_start_day;
/* NOTE: I've used GList's here, but it doesn't matter if we use
- other data structures like arrays. The code should be easy to
- change. So long as it is easy to see if the modifier is set. */
+ * other data structures like arrays. The code should be easy to
+ * change. So long as it is easy to see if the modifier is set. */
/* For BYMONTH modifier. A list of GINT_TO_POINTERs, 0-11. */
GList *bymonth;
@@ -146,8 +146,8 @@ typedef struct {
GList *bymonthday;
/* For BYDAY modifier. A list of GINT_TO_POINTERs, in pairs.
- The first of each pair is the weekday, 0 = Monday to 6 = Sunday.
- The second of each pair is the week number[+-]0-53. */
+ * The first of each pair is the weekday, 0 = Monday to 6 = Sunday.
+ * The second of each pair is the week number[+-]0-53. */
GList *byday;
/* For BYHOUR modifier. A list of GINT_TO_POINTERs, 0-23. */
@@ -169,7 +169,7 @@ struct _RecurData {
ECalRecurrence *recur;
/* This is used for the WEEKLY frequency. It is the offset from the
- week_start_day. */
+ * week_start_day. */
gint weekday_offset;
/* This is used for fast lookup in BYMONTH filtering. */
@@ -204,16 +204,16 @@ struct _CalObjTime {
guint8 minute; /* 0 - 59 */
guint8 second; /* 0 - 59 (maybe up to 61 for leap seconds) */
guint8 flags; /* The meaning of this depends on where the
- CalObjTime is used. In most cases this is
- set to TRUE to indicate that this is an
- RDATE with an end or a duration set.
- In the exceptions code, this is set to TRUE
- to indicate that this is an EXDATE with a
- DATE value. */
+ * CalObjTime is used. In most cases this is
+ * set to TRUE to indicate that this is an
+ * RDATE with an end or a duration set.
+ * In the exceptions code, this is set to TRUE
+ * to indicate that this is an EXDATE with a
+ * DATE value. */
};
/* This is what we use to represent specific recurrence dates.
- Note that we assume it starts with a CalObjTime when sorting. */
+ * Note that we assume it starts with a CalObjTime when sorting. */
typedef struct _CalObjRecurrenceDate CalObjRecurrenceDate;
struct _CalObjRecurrenceDate {
CalObjTime start;
@@ -233,7 +233,7 @@ typedef gboolean (*CalObjFindNextFn) (CalObjTime *cotime,
CalObjTime *event_end,
RecurData *recur_data,
CalObjTime *interval_end);
-typedef GArray* (*CalObjFilterFn) (RecurData *recur_data,
+typedef GArray * (*CalObjFilterFn) (RecurData *recur_data,
GArray *occs);
typedef struct _ECalRecurVTable ECalRecurVTable;
@@ -252,7 +252,7 @@ struct _ECalRecurVTable {
};
/* This is used to specify which parts of the CalObjTime to compare in
- cal_obj_time_compare (). */
+ * cal_obj_time_compare (). */
typedef enum {
CALOBJ_YEAR,
CALOBJ_MONTH,
@@ -305,24 +305,24 @@ static gboolean generate_instances_for_chunk (ECalComponent *comp,
ECalRecurInstanceFn cb,
gpointer cb_data);
-static GArray* cal_obj_expand_recurrence (CalObjTime *event_start,
+static GArray * cal_obj_expand_recurrence (CalObjTime *event_start,
icaltimezone *zone,
ECalRecurrence *recur,
CalObjTime *interval_start,
CalObjTime *interval_end,
gboolean *finished);
-static GArray* cal_obj_generate_set_yearly (RecurData *recur_data,
+static GArray * cal_obj_generate_set_yearly (RecurData *recur_data,
ECalRecurVTable *vtable,
CalObjTime *occ);
-static GArray* cal_obj_generate_set_monthly (RecurData *recur_data,
+static GArray * cal_obj_generate_set_monthly (RecurData *recur_data,
ECalRecurVTable *vtable,
CalObjTime *occ);
-static GArray* cal_obj_generate_set_default (RecurData *recur_data,
+static GArray * cal_obj_generate_set_default (RecurData *recur_data,
ECalRecurVTable *vtable,
CalObjTime *occ);
-static ECalRecurVTable* cal_obj_get_vtable (icalrecurrencetype_frequency recur_type);
+static ECalRecurVTable * cal_obj_get_vtable (icalrecurrencetype_frequency recur_type);
static void cal_obj_initialize_recur_data (RecurData *recur_data,
ECalRecurrence *recur,
CalObjTime *event_start);
@@ -332,7 +332,7 @@ static gint cal_obj_time_compare_func (const void *arg1,
static void cal_obj_remove_duplicates_and_invalid_dates (GArray *occs);
static void cal_obj_remove_exceptions (GArray *occs,
GArray *ex_occs);
-static GArray* cal_obj_bysetpos_filter (ECalRecurrence *recur,
+static GArray * cal_obj_bysetpos_filter (ECalRecurrence *recur,
GArray *occs);
static gboolean cal_obj_yearly_find_start_position (CalObjTime *event_start,
@@ -412,44 +412,44 @@ static gboolean cal_obj_secondly_find_next_position (CalObjTime *cotime,
RecurData *recur_data,
CalObjTime *interval_end);
-static GArray* cal_obj_bymonth_expand (RecurData *recur_data,
+static GArray * cal_obj_bymonth_expand (RecurData *recur_data,
GArray *occs);
-static GArray* cal_obj_bymonth_filter (RecurData *recur_data,
+static GArray * cal_obj_bymonth_filter (RecurData *recur_data,
GArray *occs);
-static GArray* cal_obj_byweekno_expand (RecurData *recur_data,
+static GArray * cal_obj_byweekno_expand (RecurData *recur_data,
GArray *occs);
#if 0
/* This isn't used at present. */
-static GArray* cal_obj_byweekno_filter (RecurData *recur_data,
+static GArray * cal_obj_byweekno_filter (RecurData *recur_data,
GArray *occs);
#endif
-static GArray* cal_obj_byyearday_expand (RecurData *recur_data,
+static GArray * cal_obj_byyearday_expand (RecurData *recur_data,
GArray *occs);
-static GArray* cal_obj_byyearday_filter (RecurData *recur_data,
+static GArray * cal_obj_byyearday_filter (RecurData *recur_data,
GArray *occs);
-static GArray* cal_obj_bymonthday_expand (RecurData *recur_data,
+static GArray * cal_obj_bymonthday_expand (RecurData *recur_data,
GArray *occs);
-static GArray* cal_obj_bymonthday_filter (RecurData *recur_data,
+static GArray * cal_obj_bymonthday_filter (RecurData *recur_data,
GArray *occs);
-static GArray* cal_obj_byday_expand_yearly (RecurData *recur_data,
+static GArray * cal_obj_byday_expand_yearly (RecurData *recur_data,
GArray *occs);
-static GArray* cal_obj_byday_expand_monthly (RecurData *recur_data,
+static GArray * cal_obj_byday_expand_monthly (RecurData *recur_data,
GArray *occs);
-static GArray* cal_obj_byday_expand_weekly (RecurData *recur_data,
+static GArray * cal_obj_byday_expand_weekly (RecurData *recur_data,
GArray *occs);
-static GArray* cal_obj_byday_filter (RecurData *recur_data,
+static GArray * cal_obj_byday_filter (RecurData *recur_data,
GArray *occs);
-static GArray* cal_obj_byhour_expand (RecurData *recur_data,
+static GArray * cal_obj_byhour_expand (RecurData *recur_data,
GArray *occs);
-static GArray* cal_obj_byhour_filter (RecurData *recur_data,
+static GArray * cal_obj_byhour_filter (RecurData *recur_data,
GArray *occs);
-static GArray* cal_obj_byminute_expand (RecurData *recur_data,
+static GArray * cal_obj_byminute_expand (RecurData *recur_data,
GArray *occs);
-static GArray* cal_obj_byminute_filter (RecurData *recur_data,
+static GArray * cal_obj_byminute_filter (RecurData *recur_data,
GArray *occs);
-static GArray* cal_obj_bysecond_expand (RecurData *recur_data,
+static GArray * cal_obj_bysecond_expand (RecurData *recur_data,
GArray *occs);
-static GArray* cal_obj_bysecond_filter (RecurData *recur_data,
+static GArray * cal_obj_bysecond_filter (RecurData *recur_data,
GArray *occs);
static void cal_obj_time_add_months (CalObjTime *cotime,
@@ -623,14 +623,14 @@ static ECalRecurVTable cal_obj_secondly_vtable = {
* are DATE values or do not have a TZID (i.e. floating times).
*/
void
-e_cal_recur_generate_instances (ECalComponent *comp,
- time_t start,
- time_t end,
- ECalRecurInstanceFn cb,
- gpointer cb_data,
- ECalRecurResolveTimezoneFn tz_cb,
- gpointer tz_cb_data,
- icaltimezone *default_timezone)
+e_cal_recur_generate_instances (ECalComponent *comp,
+ time_t start,
+ time_t end,
+ ECalRecurInstanceFn cb,
+ gpointer cb_data,
+ ECalRecurResolveTimezoneFn tz_cb,
+ gpointer tz_cb_data,
+ icaltimezone *default_timezone)
{
#if 0
g_print ("In e_cal_recur_generate_instances comp: %p\n", comp);
@@ -657,15 +657,15 @@ e_cal_recur_generate_instances (ECalComponent *comp,
* instance and continue until it ends, or forever if it has no enddate.
*/
static void
-e_cal_recur_generate_instances_of_rule (ECalComponent *comp,
- icalproperty *prop,
- time_t start,
- time_t end,
- ECalRecurInstanceFn cb,
- gpointer cb_data,
- ECalRecurResolveTimezoneFn tz_cb,
- gpointer tz_cb_data,
- icaltimezone *default_timezone)
+e_cal_recur_generate_instances_of_rule (ECalComponent *comp,
+ icalproperty *prop,
+ time_t start,
+ time_t end,
+ ECalRecurInstanceFn cb,
+ gpointer cb_data,
+ ECalRecurResolveTimezoneFn tz_cb,
+ gpointer tz_cb_data,
+ icaltimezone *default_timezone)
{
ECalComponentDateTime dtstart, dtend;
time_t dtstart_time, dtend_time;
@@ -684,8 +684,8 @@ e_cal_recur_generate_instances_of_rule (ECalComponent *comp,
g_return_if_fail (end >= -1);
/* Get dtstart, dtend, recurrences, and exceptions. Note that
- cal_component_get_dtend () will convert a DURATION property to a
- DTEND so we don't need to worry about that. */
+ * cal_component_get_dtend () will convert a DURATION property to a
+ * DTEND so we don't need to worry about that. */
e_cal_component_get_dtstart (comp, &dtstart);
e_cal_component_get_dtend (comp, &dtend);
@@ -697,8 +697,8 @@ e_cal_recur_generate_instances_of_rule (ECalComponent *comp,
}
/* For DATE-TIME values with a TZID, we use the supplied callback to
- resolve the TZID. For DATE values and DATE-TIME values without a
- TZID (i.e. floating times) we use the default timezone. */
+ * resolve the TZID. For DATE values and DATE-TIME values without a
+ * TZID (i.e. floating times) we use the default timezone. */
if (dtstart.tzid && !dtstart.value->is_date) {
start_zone = (*tz_cb) (dtstart.tzid, tz_cb_data);
if (!start_zone)
@@ -707,7 +707,7 @@ e_cal_recur_generate_instances_of_rule (ECalComponent *comp,
start_zone = default_timezone;
/* Flag that we need to convert the saved ENDDATE property
- to the default timezone. */
+ * to the default timezone. */
convert_end_date = TRUE;
}
@@ -718,9 +718,9 @@ e_cal_recur_generate_instances_of_rule (ECalComponent *comp,
if (dtend.value) {
/* If both DTSTART and DTEND are DATE values, and they are the
- same day, we add 1 day to DTEND. This means that most
- events created with the old Evolution behavior will still
- work OK. I'm not sure what Outlook does in this case. */
+ * same day, we add 1 day to DTEND. This means that most
+ * events created with the old Evolution behavior will still
+ * work OK. I'm not sure what Outlook does in this case. */
if (dtstart.value->is_date && dtend.value->is_date) {
if (icaltime_compare_date_only (*dtstart.value,
*dtend.value) == 0) {
@@ -729,8 +729,8 @@ e_cal_recur_generate_instances_of_rule (ECalComponent *comp,
}
} else {
/* If there is no DTEND, then if DTSTART is a DATE-TIME value
- we use the same time (so we have a single point in time).
- If DTSTART is a DATE value we add 1 day. */
+ * we use the same time (so we have a single point in time).
+ * If DTSTART is a DATE value we add 1 day. */
dtend.value = g_new (struct icaltimetype, 1);
*dtend.value = *dtstart.value;
@@ -748,10 +748,10 @@ e_cal_recur_generate_instances_of_rule (ECalComponent *comp,
}
/* We don't do this any more, since Outlook assumes that the DTEND
- date is not included. */
+ * date is not included. */
#if 0
/* If DTEND is a DATE value, we add 1 day to it so that it includes
- the entire day. */
+ * the entire day. */
if (dtend.value->is_date) {
dtend.value->hour = 0;
dtend.value->minute = 0;
@@ -762,7 +762,7 @@ e_cal_recur_generate_instances_of_rule (ECalComponent *comp,
dtend_time = icaltime_as_timet_with_zone (*dtend.value, end_zone);
/* If there is no recurrence, just call the callback if the event
- intersects the given interval. */
+ * intersects the given interval. */
if (!(e_cal_component_has_recurrences (comp)
|| e_cal_component_has_exceptions (comp))) {
if (e_cal_component_get_vtype (comp) == E_CAL_COMPONENT_JOURNAL) {
@@ -779,7 +779,7 @@ e_cal_recur_generate_instances_of_rule (ECalComponent *comp,
}
/* If a specific recurrence rule is being used, set up a simple list,
- else get the recurrence rules from the component. */
+ * else get the recurrence rules from the component. */
if (prop) {
single_rule = TRUE;
@@ -801,10 +801,10 @@ e_cal_recur_generate_instances_of_rule (ECalComponent *comp,
}
/* Convert the interval start & end to CalObjTime. Note that if end
- is -1 interval_end won't be set, so don't use it!
- Also note that we use end - 1 since we want the interval to be
- inclusive as it makes the code simpler. We do all calculation
- in the timezone of the DTSTART. */
+ * is -1 interval_end won't be set, so don't use it!
+ * Also note that we use end - 1 since we want the interval to be
+ * inclusive as it makes the code simpler. We do all calculation
+ * in the timezone of the DTSTART. */
cal_object_time_from_time (&interval_start, start, start_zone);
if (end != -1)
cal_object_time_from_time (&interval_end, end - 1, start_zone);
@@ -813,29 +813,29 @@ e_cal_recur_generate_instances_of_rule (ECalComponent *comp,
cal_object_time_from_time (&event_end, dtend_time, start_zone);
/* Calculate the duration of the event, which we use for all
- occurrences. We can't just subtract start from end since that may
- be affected by daylight-saving time. So we want a value of days
- + seconds. */
+ * occurrences. We can't just subtract start from end since that may
+ * be affected by daylight-saving time. So we want a value of days
+ * + seconds. */
cal_object_compute_duration (&event_start, &event_end,
&days, &seconds);
/* Take off the duration from interval_start, so we get occurrences
- that start just before the start time but overlap it. But only do
- that if the interval is after the event's start time. */
+ * that start just before the start time but overlap it. But only do
+ * that if the interval is after the event's start time. */
if (start > dtstart_time) {
cal_obj_time_add_days (&interval_start, -days);
cal_obj_time_add_seconds (&interval_start, -seconds);
}
/* Expand the recurrence for each year between start & end, or until
- the callback returns 0 if end is 0. We do a year at a time to
- give the callback function a chance to break out of the loop, and
- so we don't get into problems with infinite recurrences. Since we
- have to work on complete sets of occurrences, if there is a yearly
- frequency it wouldn't make sense to break it into smaller chunks,
- since we would then be calculating the same sets several times.
- Though this does mean that we sometimes do a lot more work than
- is necessary, e.g. if COUNT is set to something quite low. */
+ * the callback returns 0 if end is 0. We do a year at a time to
+ * give the callback function a chance to break out of the loop, and
+ * so we don't get into problems with infinite recurrences. Since we
+ * have to work on complete sets of occurrences, if there is a yearly
+ * frequency it wouldn't make sense to break it into smaller chunks,
+ * since we would then be calculating the same sets several times.
+ * Though this does mean that we sometimes do a lot more work than
+ * is necessary, e.g. if COUNT is set to something quite low. */
for (year = interval_start.year;
(end == -1 || year <= interval_end.year) && year <= MAX_YEAR;
year++) {
@@ -889,7 +889,8 @@ e_cal_recur_generate_instances_of_rule (ECalComponent *comp,
* struct icalrecurrencetype.
*/
static GList *
-array_to_list (gshort *array, gint max_elements)
+array_to_list (gshort *array,
+ gint max_elements)
{
GList *l;
gint i;
@@ -918,8 +919,10 @@ array_to_list (gshort *array, gint max_elements)
* Since: 2.32
*/
time_t
-e_cal_recur_obtain_enddate (struct icalrecurrencetype *ir, icalproperty *prop,
- icaltimezone *zone, gboolean convert_end_date)
+e_cal_recur_obtain_enddate (struct icalrecurrencetype *ir,
+ icalproperty *prop,
+ icaltimezone *zone,
+ gboolean convert_end_date)
{
time_t enddate = -1;
@@ -977,8 +980,10 @@ e_cal_recur_obtain_enddate (struct icalrecurrencetype *ir, icalproperty *prop,
* Returns: #ECalRecurrence structure.
**/
static ECalRecurrence *
-e_cal_recur_from_icalproperty (icalproperty *prop, gboolean exception,
- icaltimezone *zone, gboolean convert_end_date)
+e_cal_recur_from_icalproperty (icalproperty *prop,
+ gboolean exception,
+ icaltimezone *zone,
+ gboolean convert_end_date)
{
struct icalrecurrencetype ir;
ECalRecurrence *r;
@@ -1051,7 +1056,7 @@ e_cal_recur_from_icalproperty (icalproperty *prop, gboolean exception,
}
static gint
-e_cal_recur_ical_weekday_to_weekday (enum icalrecurrencetype_weekday day)
+e_cal_recur_ical_weekday_to_weekday (enum icalrecurrencetype_weekday day)
{
gint weekday;
@@ -1125,23 +1130,23 @@ e_cal_recur_free (ECalRecurrence *r)
* interval_start and interval_end.
*/
static gboolean
-generate_instances_for_chunk (ECalComponent *comp,
- time_t comp_dtstart,
- icaltimezone *zone,
- GSList *rrules,
- GSList *rdates,
- GSList *exrules,
- GSList *exdates,
- gboolean single_rule,
- CalObjTime *event_start,
- time_t interval_start,
- CalObjTime *chunk_start,
- CalObjTime *chunk_end,
- gint duration_days,
- gint duration_seconds,
- gboolean convert_end_date,
- ECalRecurInstanceFn cb,
- gpointer cb_data)
+generate_instances_for_chunk (ECalComponent *comp,
+ time_t comp_dtstart,
+ icaltimezone *zone,
+ GSList *rrules,
+ GSList *rdates,
+ GSList *exrules,
+ GSList *exdates,
+ gboolean single_rule,
+ CalObjTime *event_start,
+ time_t interval_start,
+ CalObjTime *chunk_start,
+ CalObjTime *chunk_end,
+ gint duration_days,
+ gint duration_seconds,
+ gboolean convert_end_date,
+ ECalRecurInstanceFn cb,
+ gpointer cb_data)
{
GArray *occs, *ex_occs, *tmp_occs, *rdate_periods;
CalObjTime cotime, *occ;
@@ -1169,11 +1174,11 @@ generate_instances_for_chunk (ECalComponent *comp,
sizeof (CalObjRecurrenceDate));
/* The original DTSTART property is included in the occurrence set,
- but not if we are just generating occurrences for a single rule. */
+ * but not if we are just generating occurrences for a single rule. */
if (!single_rule) {
/* We add it if it is in this chunk. If it is after this chunk
- we set finished to FALSE, since we know we aren't finished
- yet. */
+ * we set finished to FALSE, since we know we aren't finished
+ * yet. */
if (cal_obj_time_compare_func (event_start, chunk_end) >= 0)
finished = FALSE;
else if (cal_obj_time_compare_func (event_start, chunk_start) >= 0)
@@ -1196,7 +1201,7 @@ generate_instances_for_chunk (ECalComponent *comp,
e_cal_recur_free (r);
/* If any of the rules return FALSE for finished, we know we
- have to carry on so we set finished to FALSE. */
+ * have to carry on so we set finished to FALSE. */
if (!rule_finished)
finished = FALSE;
@@ -1205,9 +1210,9 @@ generate_instances_for_chunk (ECalComponent *comp,
}
/* Add on specific RDATE occurrence dates. If they have an end time
- or duration set, flag them as RDATEs, and store a pointer to the
- period in the rdate_periods array. Otherwise we can just treat them
- as normal occurrences. */
+ * or duration set, flag them as RDATEs, and store a pointer to the
+ * period in the rdate_periods array. Otherwise we can just treat them
+ * as normal occurrences. */
for (elem = rdates; elem; elem = elem->next) {
ECalComponentPeriod *p;
CalObjRecurrenceDate rdate;
@@ -1225,16 +1230,16 @@ generate_instances_for_chunk (ECalComponent *comp,
cotime.flags = FALSE;
/* If the rdate is after the current chunk we set finished
- to FALSE, and we skip it. */
+ * to FALSE, and we skip it. */
if (cal_obj_time_compare_func (&cotime, chunk_end) >= 0) {
finished = FALSE;
continue;
}
/* Check if the end date or duration is set. If it is we need
- to store it so we can get it later. (libical seems to set
- second to -1 to denote an unset time. See icalvalue.c)
- FIXME. */
+ * to store it so we can get it later. (libical seems to set
+ * second to -1 to denote an unset time. See icalvalue.c)
+ * FIXME. */
if (p->type != E_CAL_COMPONENT_PERIOD_DATETIME
|| p->u.end.second != -1) {
cotime.flags = TRUE;
@@ -1273,15 +1278,15 @@ generate_instances_for_chunk (ECalComponent *comp,
cdt = elem->data;
/* FIXME: We currently assume EXDATEs are in the same timezone
- as DTSTART. We should get the EXDATE timezone and convert
- to the DTSTART timezone first. */
+ * as DTSTART. We should get the EXDATE timezone and convert
+ * to the DTSTART timezone first. */
cotime.year = cdt->value->year;
cotime.month = cdt->value->month - 1;
cotime.day = cdt->value->day;
/* If the EXDATE has a DATE value, set the time to the start
- of the day and set flags to TRUE so we know to skip all
- occurrences on that date. */
+ * of the day and set flags to TRUE so we know to skip all
+ * occurrences on that date. */
if (cdt->value->is_date) {
cotime.hour = 0;
cotime.minute = 0;
@@ -1305,14 +1310,14 @@ generate_instances_for_chunk (ECalComponent *comp,
sizeof (CalObjRecurrenceDate), cal_obj_time_compare_func);
/* Create the final array, by removing the exceptions from the
- occurrences, and removing any duplicates. */
+ * occurrences, and removing any duplicates. */
cal_obj_remove_exceptions (occs, ex_occs);
/* Call the callback for each occurrence. If it returns 0 we break
- out of the loop. */
+ * out of the loop. */
for (i = 0; i < occs->len; i++) {
/* Convert each CalObjTime into a start & end time_t, and
- check it is within the bounds of the event & interval. */
+ * check it is within the bounds of the event & interval. */
occ = &g_array_index (occs, CalObjTime, i);
#if 0
g_print ("Checking occurrence: %s\n",
@@ -1334,10 +1339,10 @@ generate_instances_for_chunk (ECalComponent *comp,
}
/* Check to ensure that the start time is at or after the
- event's DTSTART time, and that it is inside the chunk that
- we are currently working on. (Note that the chunk_end time
- is never after the interval end time, so this also tests
- that we don't go past the end of the required interval). */
+ * event's DTSTART time, and that it is inside the chunk that
+ * we are currently working on. (Note that the chunk_end time
+ * is never after the interval end time, so this also tests
+ * that we don't go past the end of the required interval). */
if (start_time < comp_dtstart
|| cal_obj_time_compare_func (occ, chunk_start) < 0
|| cal_obj_time_compare_func (occ, chunk_end) > 0) {
@@ -1349,8 +1354,8 @@ generate_instances_for_chunk (ECalComponent *comp,
if (occ->flags) {
/* If it is an RDATE, we see if the end date or
- duration was set. If not, we use the same duration
- as the original occurrence. */
+ * duration was set. If not, we use the same duration
+ * as the original occurrence. */
if (!cal_object_get_rdate_end (occ, rdate_periods, zone)) {
cal_obj_time_add_days (occ, duration_days);
cal_obj_time_add_seconds (occ,
@@ -1377,7 +1382,7 @@ generate_instances_for_chunk (ECalComponent *comp,
}
/* Check that the end time is after the interval start, so we
- know that it intersects the required interval. */
+ * know that it intersects the required interval. */
if (end_time <= interval_start) {
#if 0
g_print (" end time invalid\n");
@@ -1395,18 +1400,18 @@ generate_instances_for_chunk (ECalComponent *comp,
g_array_free (rdate_periods, TRUE);
/* We return TRUE (i.e. carry on) only if the callback has always
- returned TRUE and we know that we have more occurrences to generate
- (i.e. finished is FALSE). */
+ * returned TRUE and we know that we have more occurrences to generate
+ * (i.e. finished is FALSE). */
return cb_status && !finished;
}
/* This looks up the occurrence time in the sorted rdate_periods array, and
- tries to compute the end time of the occurrence. If no end time or duration
- is set it returns FALSE and the default duration will be used. */
+ * tries to compute the end time of the occurrence. If no end time or duration
+ * is set it returns FALSE and the default duration will be used. */
static gboolean
-cal_object_get_rdate_end (CalObjTime *occ,
- GArray *rdate_periods,
- icaltimezone *zone)
+cal_object_get_rdate_end (CalObjTime *occ,
+ GArray *rdate_periods,
+ icaltimezone *zone)
{
CalObjRecurrenceDate *rdate = NULL;
ECalComponentPeriod *p;
@@ -1463,9 +1468,9 @@ cal_object_get_rdate_end (CalObjTime *occ,
static void
cal_object_compute_duration (CalObjTime *start,
- CalObjTime *end,
- gint *days,
- gint *seconds)
+ CalObjTime *end,
+ gint *days,
+ gint *seconds)
{
GDate start_date, end_date;
gint start_seconds, end_seconds;
@@ -1490,19 +1495,19 @@ cal_object_compute_duration (CalObjTime *start,
}
/* Returns an unsorted GArray of CalObjTime's resulting from expanding the
- given recurrence rule within the given interval. Note that it doesn't
- clip the generated occurrences to the interval, i.e. if the interval
- starts part way through the year this function still returns all the
- occurrences for the year. Clipping is done later.
- The finished flag is set to FALSE if there are more occurrences to generate
- after the given interval.*/
-static GArray*
-cal_obj_expand_recurrence (CalObjTime *event_start,
- icaltimezone *zone,
- ECalRecurrence *recur,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- gboolean *finished)
+ * given recurrence rule within the given interval. Note that it doesn't
+ * clip the generated occurrences to the interval, i.e. if the interval
+ * starts part way through the year this function still returns all the
+ * occurrences for the year. Clipping is done later.
+ * The finished flag is set to FALSE if there are more occurrences to generate
+ * after the given interval.*/
+static GArray *
+cal_obj_expand_recurrence (CalObjTime *event_start,
+ icaltimezone *zone,
+ ECalRecurrence *recur,
+ CalObjTime *interval_start,
+ CalObjTime *interval_end,
+ gboolean *finished)
{
ECalRecurVTable *vtable;
CalObjTime *event_end = NULL, event_end_cotime;
@@ -1535,13 +1540,13 @@ cal_obj_expand_recurrence (CalObjTime *event_start,
}
/* Set finished to FALSE if we know there will be more occurrences to
- do after this interval. */
+ * do after this interval. */
if (!interval_end || !event_end
|| cal_obj_time_compare_func (event_end, interval_end) > 0)
*finished = FALSE;
/* Get the first period based on the frequency and the interval that
- intersects the interval between start and end. */
+ * intersects the interval between start and end. */
if ((*vtable->find_start_position) (event_start, event_end,
&recur_data,
interval_start, interval_end,
@@ -1549,7 +1554,7 @@ cal_obj_expand_recurrence (CalObjTime *event_start,
return all_occs;
/* Loop until the event ends or we go past the end of the required
- interval. */
+ * interval. */
for (;;) {
/* Generate the set of occurrences for this period. */
switch (recur->freq) {
@@ -1602,34 +1607,34 @@ cal_obj_expand_recurrence (CalObjTime *event_start,
return all_occs;
}
-static GArray*
-cal_obj_generate_set_yearly (RecurData *recur_data,
- ECalRecurVTable *vtable,
- CalObjTime *occ)
+static GArray *
+cal_obj_generate_set_yearly (RecurData *recur_data,
+ ECalRecurVTable *vtable,
+ CalObjTime *occ)
{
ECalRecurrence *recur = recur_data->recur;
GArray *occs_arrays[4], *occs, *occs2;
gint num_occs_arrays = 0, i;
/* This is a bit complicated, since the iCalendar spec says that
- several BYxxx modifiers can be used simultaneously. So we have to
- be quite careful when determining the days of the occurrences.
- The BYHOUR, BYMINUTE & BYSECOND modifiers are no problem at all.
-
- The modifiers we have to worry about are: BYMONTH, BYWEEKNO,
- BYYEARDAY, BYMONTHDAY & BYDAY. We can't do these sequentially
- since each filter will mess up the results of the previous one.
- But they aren't all completely independant, e.g. BYMONTHDAY and
- BYDAY are related to BYMONTH, and BYDAY is related to BYWEEKNO.
-
- BYDAY & BYMONTHDAY can also be applied independently, which makes
- it worse. So we assume that if BYMONTH or BYWEEKNO is used, then
- the BYDAY modifier applies to those, else it is applied
- independantly.
-
- We expand the occurrences in parallel into the occs_arrays[] array,
- and then merge them all into one GArray before expanding BYHOUR,
- BYMINUTE & BYSECOND. */
+ * several BYxxx modifiers can be used simultaneously. So we have to
+ * be quite careful when determining the days of the occurrences.
+ * The BYHOUR, BYMINUTE & BYSECOND modifiers are no problem at all.
+ *
+ * The modifiers we have to worry about are: BYMONTH, BYWEEKNO,
+ * BYYEARDAY, BYMONTHDAY & BYDAY. We can't do these sequentially
+ * since each filter will mess up the results of the previous one.
+ * But they aren't all completely independant, e.g. BYMONTHDAY and
+ * BYDAY are related to BYMONTH, and BYDAY is related to BYWEEKNO.
+ *
+ * BYDAY & BYMONTHDAY can also be applied independently, which makes
+ * it worse. So we assume that if BYMONTH or BYWEEKNO is used, then
+ * the BYDAY modifier applies to those, else it is applied
+ * independantly.
+ *
+ * We expand the occurrences in parallel into the occs_arrays[] array,
+ * and then merge them all into one GArray before expanding BYHOUR,
+ * BYMINUTE & BYSECOND. */
if (recur->bymonth) {
occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
@@ -1638,7 +1643,7 @@ cal_obj_generate_set_yearly (RecurData *recur_data,
occs = (*vtable->bymonth_filter) (recur_data, occs);
/* If BYMONTHDAY & BYDAY are both set we need to expand them
- in parallel and add the results. */
+ * in parallel and add the results. */
if (recur->bymonthday && recur->byday) {
CalObjTime *prev_occ = NULL;
GArray *new_occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
@@ -1650,7 +1655,7 @@ cal_obj_generate_set_yearly (RecurData *recur_data,
occs = (*vtable->bymonthday_filter) (recur_data, occs);
/* Note that we explicitly call the monthly version
- of the BYDAY expansion filter. */
+ * of the BYDAY expansion filter. */
occs2 = cal_obj_byday_expand_monthly (recur_data,
occs2);
@@ -1675,7 +1680,7 @@ cal_obj_generate_set_yearly (RecurData *recur_data,
} else {
occs = (*vtable->bymonthday_filter) (recur_data, occs);
/* Note that we explicitly call the monthly version
- of the BYDAY expansion filter. */
+ * of the BYDAY expansion filter. */
occs = cal_obj_byday_expand_monthly (recur_data, occs);
}
@@ -1688,7 +1693,7 @@ cal_obj_generate_set_yearly (RecurData *recur_data,
occs = (*vtable->byweekno_filter) (recur_data, occs);
/* Note that we explicitly call the weekly version of the
- BYDAY expansion filter. */
+ * BYDAY expansion filter. */
occs = cal_obj_byday_expand_weekly (recur_data, occs);
occs_arrays[num_occs_arrays++] = occs;
@@ -1704,7 +1709,7 @@ cal_obj_generate_set_yearly (RecurData *recur_data,
}
/* If BYMONTHDAY is set, and BYMONTH is not set, we need to
- expand BYMONTHDAY independantly. */
+ * expand BYMONTHDAY independantly. */
if (recur->bymonthday && !recur->bymonth) {
occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
g_array_append_vals (occs, occ, 1);
@@ -1715,7 +1720,7 @@ cal_obj_generate_set_yearly (RecurData *recur_data,
}
/* If BYDAY is set, and BYMONTH and BYWEEKNO are not set, we need to
- expand BYDAY independantly. */
+ * expand BYDAY independantly. */
if (recur->byday && !recur->bymonth && !recur->byweekno) {
occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
g_array_append_vals (occs, occ, 1);
@@ -1726,7 +1731,7 @@ cal_obj_generate_set_yearly (RecurData *recur_data,
}
/* Add all the arrays together. If no filters were used we just
- create an array with one element. */
+ * create an array with one element. */
if (num_occs_arrays > 0) {
occs = occs_arrays[0];
for (i = 1; i < num_occs_arrays; i++) {
@@ -1747,10 +1752,10 @@ cal_obj_generate_set_yearly (RecurData *recur_data,
return occs;
}
-static GArray*
-cal_obj_generate_set_monthly (RecurData *recur_data,
- ECalRecurVTable *vtable,
- CalObjTime *occ)
+static GArray *
+cal_obj_generate_set_monthly (RecurData *recur_data,
+ ECalRecurVTable *vtable,
+ CalObjTime *occ)
{
GArray *occs, *occs2;
@@ -1761,9 +1766,9 @@ cal_obj_generate_set_monthly (RecurData *recur_data,
occs = (*vtable->bymonth_filter) (recur_data, occs);
/* We need to combine the output of BYMONTHDAY & BYDAY, by doing them
- in parallel rather than sequentially. If we did them sequentially
- then we would lose the occurrences generated by BYMONTHDAY, and
- instead have repetitions of the occurrences from BYDAY. */
+ * in parallel rather than sequentially. If we did them sequentially
+ * then we would lose the occurrences generated by BYMONTHDAY, and
+ * instead have repetitions of the occurrences from BYDAY. */
if (recur_data->recur->bymonthday && recur_data->recur->byday) {
occs2 = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
g_array_append_vals (occs2, occs->data, occs->len);
@@ -1785,10 +1790,10 @@ cal_obj_generate_set_monthly (RecurData *recur_data,
return occs;
}
-static GArray*
-cal_obj_generate_set_default (RecurData *recur_data,
- ECalRecurVTable *vtable,
- CalObjTime *occ)
+static GArray *
+cal_obj_generate_set_default (RecurData *recur_data,
+ ECalRecurVTable *vtable,
+ CalObjTime *occ)
{
GArray *occs;
@@ -1819,9 +1824,9 @@ cal_obj_generate_set_default (RecurData *recur_data,
}
/* Returns the function table corresponding to the recurrence frequency. */
-static ECalRecurVTable* cal_obj_get_vtable (icalrecurrencetype_frequency recur_type)
+static ECalRecurVTable * cal_obj_get_vtable (icalrecurrencetype_frequency recur_type)
{
- ECalRecurVTable* vtable;
+ ECalRecurVTable * vtable;
switch (recur_type) {
case ICAL_YEARLY_RECURRENCE:
@@ -1854,11 +1859,11 @@ static ECalRecurVTable* cal_obj_get_vtable (icalrecurrencetype_frequency recur_t
}
/* This creates a number of fast lookup tables used when filtering with the
- modifier properties BYMONTH, BYYEARDAY etc. */
+ * modifier properties BYMONTH, BYYEARDAY etc. */
static void
-cal_obj_initialize_recur_data (RecurData *recur_data,
- ECalRecurrence *recur,
- CalObjTime *event_start)
+cal_obj_initialize_recur_data (RecurData *recur_data,
+ ECalRecurrence *recur,
+ CalObjTime *event_start)
{
GList *elem;
gint month, yearday, monthday, weekday, hour, minute, second;
@@ -1869,7 +1874,7 @@ cal_obj_initialize_recur_data (RecurData *recur_data,
recur_data->recur = recur;
/* Set the weekday, used for the WEEKLY frequency and the BYWEEKNO
- modifier. */
+ * modifier. */
recur_data->weekday_offset = cal_obj_time_weekday_offset (event_start,
recur);
@@ -1882,8 +1887,8 @@ cal_obj_initialize_recur_data (RecurData *recur_data,
}
/* Create an array of yeardays from byyearday for fast lookup.
- We create a second array to handle the negative values. The first
- element there corresponds to the last day of the year. */
+ * We create a second array to handle the negative values. The first
+ * element there corresponds to the last day of the year. */
elem = recur->byyearday;
while (elem) {
yearday = GPOINTER_TO_INT (elem->data);
@@ -1895,8 +1900,8 @@ cal_obj_initialize_recur_data (RecurData *recur_data,
}
/* Create an array of monthdays from bymonthday for fast lookup.
- We create a second array to handle the negative values. The first
- element there corresponds to the last day of the month. */
+ * We create a second array to handle the negative values. The first
+ * element there corresponds to the last day of the month. */
elem = recur->bymonthday;
while (elem) {
monthday = GPOINTER_TO_INT (elem->data);
@@ -1995,10 +2000,10 @@ cal_obj_remove_duplicates_and_invalid_dates (GArray *occs)
}
/* Removes the exceptions from the ex_occs array from the occurrences in the
- occs array, and removes any duplicates. Both arrays are sorted. */
+ * occs array, and removes any duplicates. Both arrays are sorted. */
static void
cal_obj_remove_exceptions (GArray *occs,
- GArray *ex_occs)
+ GArray *ex_occs)
{
CalObjTime *occ, *prev_occ = NULL, *ex_occ = NULL, *last_occ_kept;
gint i, j = 0, cmp, ex_index, occs_len, ex_occs_len;
@@ -2019,15 +2024,15 @@ cal_obj_remove_exceptions (GArray *occs,
keep_occ = TRUE;
/* If the occurrence is a duplicate of the previous one, skip
- it. */
+ * it. */
if (prev_occ
&& cal_obj_time_compare_func (occ, prev_occ) == 0) {
keep_occ = FALSE;
/* If this occurrence is an RDATE with an end or
- duration set, and the previous occurrence in the
- array was kept, set the RDATE flag of the last one,
- so we still use the end date or duration. */
+ * duration set, and the previous occurrence in the
+ * array was kept, set the RDATE flag of the last one,
+ * so we still use the end date or duration. */
if (occ->flags && !current_time_is_exception) {
last_occ_kept = &g_array_index (occs,
CalObjTime,
@@ -2036,18 +2041,18 @@ cal_obj_remove_exceptions (GArray *occs,
}
} else {
/* We've found a new occurrence time. Reset the flag
- to indicate that it hasn't been found in the
- exceptions array (yet). */
+ * to indicate that it hasn't been found in the
+ * exceptions array (yet). */
current_time_is_exception = FALSE;
if (ex_occ) {
/* Step through the exceptions until we come
- to one that matches or follows this
- occurrence. */
+ * to one that matches or follows this
+ * occurrence. */
while (ex_occ) {
/* If the exception is an EXDATE with
- a DATE value, we only have to
- compare the date. */
+ * a DATE value, we only have to
+ * compare the date. */
if (ex_occ->flags)
cmp = cal_obj_date_only_compare_func (ex_occ, occ);
else
@@ -2057,8 +2062,8 @@ cal_obj_remove_exceptions (GArray *occs,
break;
/* Move to the next exception, or set
- ex_occ to NULL when we reach the
- end of array. */
+ * ex_occ to NULL when we reach the
+ * end of array. */
ex_index++;
if (ex_index < ex_occs_len)
ex_occ = &g_array_index (ex_occs, CalObjTime, ex_index);
@@ -2066,9 +2071,9 @@ cal_obj_remove_exceptions (GArray *occs,
ex_occ = NULL;
/* If the exception did match this
- occurrence we remove it, and set the
- flag to indicate that the current
- time is an exception. */
+ * occurrence we remove it, and set the
+ * flag to indicate that the current
+ * time is an exception. */
if (cmp == 0) {
current_time_is_exception = TRUE;
keep_occ = FALSE;
@@ -2080,9 +2085,9 @@ cal_obj_remove_exceptions (GArray *occs,
if (keep_occ) {
/* We are keeping this occurrence, so we move it to
- the next free space, unless its position hasn't
- changed (i.e. all previous occurrences were also
- kept). */
+ * the next free space, unless its position hasn't
+ * changed (i.e. all previous occurrences were also
+ * kept). */
if (i != j)
g_array_index (occs, CalObjTime, j)
= g_array_index (occs, CalObjTime, i);
@@ -2095,9 +2100,9 @@ cal_obj_remove_exceptions (GArray *occs,
g_array_set_size (occs, j);
}
-static GArray*
+static GArray *
cal_obj_bysetpos_filter (ECalRecurrence *recur,
- GArray *occs)
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ;
@@ -2105,7 +2110,7 @@ cal_obj_bysetpos_filter (ECalRecurrence *recur,
gint len, pos;
/* If BYSETPOS has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
elem = recur->bysetpos;
if (!elem || occs->len == 0)
return occs;
@@ -2113,7 +2118,7 @@ cal_obj_bysetpos_filter (ECalRecurrence *recur,
new_occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
/* Iterate over the indices given in bysetpos, adding the corresponding
- element from occs to new_occs. */
+ * element from occs to new_occs. */
len = occs->len;
while (elem) {
pos = GPOINTER_TO_INT (elem->data);
@@ -2122,7 +2127,7 @@ cal_obj_bysetpos_filter (ECalRecurrence *recur,
if (pos < 0)
pos += len;
/* Positive values need to be decremented since the array is
- 0-based. */
+ * 0 - based. */
else
pos--;
@@ -2139,20 +2144,20 @@ cal_obj_bysetpos_filter (ECalRecurrence *recur,
}
/* Finds the first year from the event_start, counting in multiples of the
- recurrence interval, that intersects the given interval. It returns TRUE
- if there is no intersection. */
+ * recurrence interval, that intersects the given interval. It returns TRUE
+ * if there is no intersection. */
static gboolean
cal_obj_yearly_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime)
+ CalObjTime *event_end,
+ RecurData *recur_data,
+ CalObjTime *interval_start,
+ CalObjTime *interval_end,
+ CalObjTime *cotime)
{
*cotime = *event_start;
/* Move on to the next interval, if the event starts before the
- given interval. */
+ * given interval. */
if (cotime->year < interval_start->year) {
gint years = interval_start->year - cotime->year
+ recur_data->recur->interval - 1;
@@ -2170,9 +2175,9 @@ cal_obj_yearly_find_start_position (CalObjTime *event_start,
static gboolean
cal_obj_yearly_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end)
+ CalObjTime *event_end,
+ RecurData *recur_data,
+ CalObjTime *interval_end)
{
/* NOTE: The day may now be invalid, e.g. 29th Feb. */
cotime->year += recur_data->recur->interval;
@@ -2186,16 +2191,16 @@ cal_obj_yearly_find_next_position (CalObjTime *cotime,
static gboolean
cal_obj_monthly_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime)
+ CalObjTime *event_end,
+ RecurData *recur_data,
+ CalObjTime *interval_start,
+ CalObjTime *interval_end,
+ CalObjTime *cotime)
{
*cotime = *event_start;
/* Move on to the next interval, if the event starts before the
- given interval. */
+ * given interval. */
if (cal_obj_time_compare (cotime, interval_start, CALOBJ_MONTH) < 0) {
gint months = (interval_start->year - cotime->year) * 12
+ interval_start->month - cotime->month
@@ -2217,9 +2222,9 @@ cal_obj_monthly_find_start_position (CalObjTime *event_start,
static gboolean
cal_obj_monthly_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end)
+ CalObjTime *event_end,
+ RecurData *recur_data,
+ CalObjTime *interval_end)
{
/* NOTE: The day may now be invalid, e.g. 31st Sep. */
cal_obj_time_add_months (cotime, recur_data->recur->interval);
@@ -2236,11 +2241,11 @@ cal_obj_monthly_find_next_position (CalObjTime *cotime,
static gboolean
cal_obj_weekly_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime)
+ CalObjTime *event_end,
+ RecurData *recur_data,
+ CalObjTime *interval_start,
+ CalObjTime *interval_end,
+ CalObjTime *cotime)
{
GDate event_start_date, interval_start_date;
guint32 event_start_julian, interval_start_julian;
@@ -2257,7 +2262,7 @@ cal_obj_weekly_find_start_position (CalObjTime *event_start,
*cotime = *event_start;
/* Convert the event start and interval start to GDates, so we can
- easily find the number of days between them. */
+ * easily find the number of days between them. */
g_date_clear (&event_start_date, 1);
g_date_set_dmy (&event_start_date, event_start->day,
event_start->month + 1, event_start->year);
@@ -2266,7 +2271,7 @@ cal_obj_weekly_find_start_position (CalObjTime *event_start,
interval_start->month + 1, interval_start->year);
/* Calculate the start of the weeks corresponding to the event start
- and interval start. */
+ * and interval start. */
event_start_julian = g_date_get_julian (&event_start_date);
event_start_julian -= recur_data->weekday_offset;
@@ -2275,7 +2280,7 @@ cal_obj_weekly_find_start_position (CalObjTime *event_start,
interval_start_julian -= interval_start_weekday_offset;
/* We want to find the first full week using the recurrence interval
- that intersects the given interval dates. */
+ * that intersects the given interval dates. */
if (event_start_julian < interval_start_julian) {
gint weeks = (interval_start_julian - event_start_julian) / 7;
weeks += recur_data->recur->interval - 1;
@@ -2298,16 +2303,16 @@ cal_obj_weekly_find_start_position (CalObjTime *event_start,
static gboolean
cal_obj_weekly_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end)
+ CalObjTime *event_end,
+ RecurData *recur_data,
+ CalObjTime *interval_end)
{
CalObjTime week_start;
cal_obj_time_add_days (cotime, recur_data->recur->interval * 7);
/* Return TRUE if the start of this week is after the event finishes
- or is after the end of the required interval. */
+ * or is after the end of the required interval. */
week_start = *cotime;
cal_obj_time_add_days (&week_start, -recur_data->weekday_offset);
@@ -2332,12 +2337,12 @@ cal_obj_weekly_find_next_position (CalObjTime *cotime,
}
static gboolean
-cal_obj_daily_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime)
+cal_obj_daily_find_start_position (CalObjTime *event_start,
+ CalObjTime *event_end,
+ RecurData *recur_data,
+ CalObjTime *interval_start,
+ CalObjTime *interval_end,
+ CalObjTime *cotime)
{
GDate event_start_date, interval_start_date;
guint32 event_start_julian, interval_start_julian, days;
@@ -2352,7 +2357,7 @@ cal_obj_daily_find_start_position (CalObjTime *event_start,
*cotime = *event_start;
/* Convert the event start and interval start to GDates, so we can
- easily find the number of days between them. */
+ * easily find the number of days between them. */
g_date_clear (&event_start_date, 1);
g_date_set_dmy (&event_start_date, event_start->day,
event_start->month + 1, event_start->year);
@@ -2381,10 +2386,10 @@ cal_obj_daily_find_start_position (CalObjTime *event_start,
}
static gboolean
-cal_obj_daily_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end)
+cal_obj_daily_find_next_position (CalObjTime *cotime,
+ CalObjTime *event_end,
+ RecurData *recur_data,
+ CalObjTime *interval_end)
{
cal_obj_time_add_days (cotime, recur_data->recur->interval);
@@ -2400,11 +2405,11 @@ cal_obj_daily_find_next_position (CalObjTime *cotime,
static gboolean
cal_obj_hourly_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime)
+ CalObjTime *event_end,
+ RecurData *recur_data,
+ CalObjTime *interval_start,
+ CalObjTime *interval_end,
+ CalObjTime *cotime)
{
GDate event_start_date, interval_start_date;
guint32 event_start_julian, interval_start_julian, hours;
@@ -2421,7 +2426,7 @@ cal_obj_hourly_find_start_position (CalObjTime *event_start,
if (cal_obj_time_compare (event_start, interval_start,
CALOBJ_HOUR) < 0) {
/* Convert the event start and interval start to GDates, so we
- can easily find the number of days between them. */
+ * can easily find the number of days between them. */
g_date_clear (&event_start_date, 1);
g_date_set_dmy (&event_start_date, event_start->day,
event_start->month + 1, event_start->year);
@@ -2452,9 +2457,9 @@ cal_obj_hourly_find_start_position (CalObjTime *event_start,
static gboolean
cal_obj_hourly_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end)
+ CalObjTime *event_end,
+ RecurData *recur_data,
+ CalObjTime *interval_end)
{
cal_obj_time_add_hours (cotime, recur_data->recur->interval);
@@ -2470,11 +2475,11 @@ cal_obj_hourly_find_next_position (CalObjTime *cotime,
static gboolean
cal_obj_minutely_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime)
+ CalObjTime *event_end,
+ RecurData *recur_data,
+ CalObjTime *interval_start,
+ CalObjTime *interval_end,
+ CalObjTime *cotime)
{
GDate event_start_date, interval_start_date;
guint32 event_start_julian, interval_start_julian, minutes;
@@ -2491,7 +2496,7 @@ cal_obj_minutely_find_start_position (CalObjTime *event_start,
if (cal_obj_time_compare (event_start, interval_start,
CALOBJ_MINUTE) < 0) {
/* Convert the event start and interval start to GDates, so we
- can easily find the number of days between them. */
+ * can easily find the number of days between them. */
g_date_clear (&event_start_date, 1);
g_date_set_dmy (&event_start_date, event_start->day,
event_start->month + 1, event_start->year);
@@ -2524,9 +2529,9 @@ cal_obj_minutely_find_start_position (CalObjTime *event_start,
static gboolean
cal_obj_minutely_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end)
+ CalObjTime *event_end,
+ RecurData *recur_data,
+ CalObjTime *interval_end)
{
cal_obj_time_add_minutes (cotime, recur_data->recur->interval);
@@ -2542,11 +2547,11 @@ cal_obj_minutely_find_next_position (CalObjTime *cotime,
static gboolean
cal_obj_secondly_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime)
+ CalObjTime *event_end,
+ RecurData *recur_data,
+ CalObjTime *interval_start,
+ CalObjTime *interval_end,
+ CalObjTime *cotime)
{
GDate event_start_date, interval_start_date;
guint32 event_start_julian, interval_start_julian, seconds;
@@ -2563,7 +2568,7 @@ cal_obj_secondly_find_start_position (CalObjTime *event_start,
if (cal_obj_time_compare (event_start, interval_start,
CALOBJ_SECOND) < 0) {
/* Convert the event start and interval start to GDates, so we
- can easily find the number of days between them. */
+ * can easily find the number of days between them. */
g_date_clear (&event_start_date, 1);
g_date_set_dmy (&event_start_date, event_start->day,
event_start->month + 1, event_start->year);
@@ -2598,9 +2603,9 @@ cal_obj_secondly_find_start_position (CalObjTime *event_start,
static gboolean
cal_obj_secondly_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end)
+ CalObjTime *event_end,
+ RecurData *recur_data,
+ CalObjTime *interval_end)
{
cal_obj_time_add_seconds (cotime, recur_data->recur->interval);
@@ -2615,10 +2620,10 @@ cal_obj_secondly_find_next_position (CalObjTime *cotime,
}
/* If the BYMONTH rule is specified it expands each occurrence in occs, by
- using each of the months in the bymonth list. */
-static GArray*
-cal_obj_bymonth_expand (RecurData *recur_data,
- GArray *occs)
+ * using each of the months in the bymonth list. */
+static GArray *
+cal_obj_bymonth_expand (RecurData *recur_data,
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ;
@@ -2626,7 +2631,7 @@ cal_obj_bymonth_expand (RecurData *recur_data,
gint len, i;
/* If BYMONTH has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
if (!recur_data->recur->bymonth || occs->len == 0)
return occs;
@@ -2651,17 +2656,17 @@ cal_obj_bymonth_expand (RecurData *recur_data,
}
/* If the BYMONTH rule is specified it filters out all occurrences in occs
- which do not match one of the months in the bymonth list. */
-static GArray*
-cal_obj_bymonth_filter (RecurData *recur_data,
- GArray *occs)
+ * which do not match one of the months in the bymonth list. */
+static GArray *
+cal_obj_bymonth_filter (RecurData *recur_data,
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ;
gint len, i;
/* If BYMONTH has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
if (!recur_data->recur->bymonth || occs->len == 0)
return occs;
@@ -2679,9 +2684,9 @@ cal_obj_bymonth_filter (RecurData *recur_data,
return new_occs;
}
-static GArray*
-cal_obj_byweekno_expand (RecurData *recur_data,
- GArray *occs)
+static GArray *
+cal_obj_byweekno_expand (RecurData *recur_data,
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ, year_start_cotime, year_end_cotime, cotime;
@@ -2689,7 +2694,7 @@ cal_obj_byweekno_expand (RecurData *recur_data,
gint len, i, weekno;
/* If BYWEEKNO has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
if (!recur_data->recur->byweekno || occs->len == 0)
return occs;
@@ -2700,21 +2705,21 @@ cal_obj_byweekno_expand (RecurData *recur_data,
occ = &g_array_index (occs, CalObjTime, i);
/* Find the day that would correspond to week 1 (note that
- week 1 is the first week starting from the specified week
- start day that has 4 days in the new year). */
+ * week 1 is the first week starting from the specified week
+ * start day that has 4 days in the new year). */
year_start_cotime = *occ;
cal_obj_time_find_first_week (&year_start_cotime,
recur_data);
/* Find the day that would correspond to week 1 of the next
- year, which we use for -ve week numbers. */
+ * year, which we use for -ve week numbers. */
year_end_cotime = *occ;
year_end_cotime.year++;
cal_obj_time_find_first_week (&year_end_cotime,
recur_data);
/* Now iterate over the week numbers in byweekno, generating a
- new occurrence for each one. */
+ * new occurrence for each one. */
elem = recur_data->recur->byweekno;
while (elem) {
weekno = GPOINTER_TO_INT (elem->data);
@@ -2739,20 +2744,9 @@ cal_obj_byweekno_expand (RecurData *recur_data,
return new_occs;
}
-#if 0
-/* This isn't used at present. */
-static GArray*
-cal_obj_byweekno_filter (RecurData *recur_data,
- GArray *occs)
-{
-
- return occs;
-}
-#endif
-
-static GArray*
-cal_obj_byyearday_expand (RecurData *recur_data,
- GArray *occs)
+static GArray *
+cal_obj_byyearday_expand (RecurData *recur_data,
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ, year_start_cotime, year_end_cotime, cotime;
@@ -2760,7 +2754,7 @@ cal_obj_byyearday_expand (RecurData *recur_data,
gint len, i, dayno;
/* If BYYEARDAY has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
if (!recur_data->recur->byyearday || occs->len == 0)
return occs;
@@ -2776,14 +2770,14 @@ cal_obj_byyearday_expand (RecurData *recur_data,
year_start_cotime.day = 1;
/* Find the day that would correspond to day 1 of the next
- year, which we use for -ve day numbers. */
+ * year, which we use for -ve day numbers. */
year_end_cotime = *occ;
year_end_cotime.year++;
year_end_cotime.month = 0;
year_end_cotime.day = 1;
/* Now iterate over the day numbers in byyearday, generating a
- new occurrence for each one. */
+ * new occurrence for each one. */
elem = recur_data->recur->byyearday;
while (elem) {
dayno = GPOINTER_TO_INT (elem->data);
@@ -2808,16 +2802,16 @@ cal_obj_byyearday_expand (RecurData *recur_data,
}
/* Note: occs must not contain invalid dates, e.g. 31st September. */
-static GArray*
-cal_obj_byyearday_filter (RecurData *recur_data,
- GArray *occs)
+static GArray *
+cal_obj_byyearday_filter (RecurData *recur_data,
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ;
gint yearday, len, i, days_in_year;
/* If BYYEARDAY has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
if (!recur_data->recur->byyearday || occs->len == 0)
return occs;
@@ -2843,9 +2837,9 @@ cal_obj_byyearday_filter (RecurData *recur_data,
return new_occs;
}
-static GArray*
-cal_obj_bymonthday_expand (RecurData *recur_data,
- GArray *occs)
+static GArray *
+cal_obj_bymonthday_expand (RecurData *recur_data,
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ, month_start_cotime, month_end_cotime, cotime;
@@ -2853,7 +2847,7 @@ cal_obj_bymonthday_expand (RecurData *recur_data,
gint len, i, dayno;
/* If BYMONTHDAY has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
if (!recur_data->recur->bymonthday || occs->len == 0)
return occs;
@@ -2868,13 +2862,13 @@ cal_obj_bymonthday_expand (RecurData *recur_data,
month_start_cotime.day = 1;
/* Find the day that would correspond to day 1 of the next
- month, which we use for -ve day numbers. */
+ * month, which we use for -ve day numbers. */
month_end_cotime = *occ;
month_end_cotime.month++;
month_end_cotime.day = 1;
/* Now iterate over the day numbers in bymonthday, generating a
- new occurrence for each one. */
+ * new occurrence for each one. */
elem = recur_data->recur->bymonthday;
while (elem) {
dayno = GPOINTER_TO_INT (elem->data);
@@ -2903,16 +2897,16 @@ cal_obj_bymonthday_expand (RecurData *recur_data,
return new_occs;
}
-static GArray*
-cal_obj_bymonthday_filter (RecurData *recur_data,
- GArray *occs)
+static GArray *
+cal_obj_bymonthday_filter (RecurData *recur_data,
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ;
gint len, i, days_in_month;
/* If BYMONTHDAY has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
if (!recur_data->recur->bymonthday || occs->len == 0)
return occs;
@@ -2937,9 +2931,9 @@ cal_obj_bymonthday_filter (RecurData *recur_data,
return new_occs;
}
-static GArray*
-cal_obj_byday_expand_yearly (RecurData *recur_data,
- GArray *occs)
+static GArray *
+cal_obj_byday_expand_yearly (RecurData *recur_data,
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ;
@@ -2949,7 +2943,7 @@ cal_obj_byday_expand_yearly (RecurData *recur_data,
guint16 year;
/* If BYDAY has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
if (!recur_data->recur->byday || occs->len == 0)
return occs;
@@ -3013,9 +3007,9 @@ cal_obj_byday_expand_yearly (RecurData *recur_data,
return new_occs;
}
-static GArray*
-cal_obj_byday_expand_monthly (RecurData *recur_data,
- GArray *occs)
+static GArray *
+cal_obj_byday_expand_monthly (RecurData *recur_data,
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ;
@@ -3026,7 +3020,7 @@ cal_obj_byday_expand_monthly (RecurData *recur_data,
guint8 month;
/* If BYDAY has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
if (!recur_data->recur->byday || occs->len == 0)
return occs;
@@ -3075,8 +3069,8 @@ cal_obj_byday_expand_monthly (RecurData *recur_data,
last_weekday = cal_obj_time_weekday (occ);
/* This calculates the number of days to step
- backwards from the last day of the month
- to the weekday we want. */
+ * backwards from the last day of the month
+ * to the weekday we want. */
offset = (last_weekday + 7 - weekday) % 7;
/* This adds on the weeks. */
@@ -3088,7 +3082,7 @@ cal_obj_byday_expand_monthly (RecurData *recur_data,
}
/* Reset the year & month, as we may have gone past
- the end. */
+ * the end. */
occ->year = year;
occ->month = month;
}
@@ -3100,9 +3094,9 @@ cal_obj_byday_expand_monthly (RecurData *recur_data,
}
/* Note: occs must not contain invalid dates, e.g. 31st September. */
-static GArray*
-cal_obj_byday_expand_weekly (RecurData *recur_data,
- GArray *occs)
+static GArray *
+cal_obj_byday_expand_weekly (RecurData *recur_data,
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ;
@@ -3111,7 +3105,7 @@ cal_obj_byday_expand_weekly (RecurData *recur_data,
gint weekday_offset, new_weekday_offset;
/* If BYDAY has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
if (!recur_data->recur->byday || occs->len == 0)
return occs;
@@ -3127,8 +3121,8 @@ cal_obj_byday_expand_weekly (RecurData *recur_data,
elem = elem->next;
/* FIXME: Currently we just ignore this, but maybe we
- should skip all elements where week_num != 0.
- The spec isn't clear about this. */
+ * should skip all elements where week_num != 0.
+ * The spec isn't clear about this. */
/*week_num = GPOINTER_TO_INT (elem->data);*/
elem = elem->next;
@@ -3145,16 +3139,16 @@ cal_obj_byday_expand_weekly (RecurData *recur_data,
}
/* Note: occs must not contain invalid dates, e.g. 31st September. */
-static GArray*
-cal_obj_byday_filter (RecurData *recur_data,
- GArray *occs)
+static GArray *
+cal_obj_byday_filter (RecurData *recur_data,
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ;
gint len, i, weekday;
/* If BYDAY has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
if (!recur_data->recur->byday || occs->len == 0)
return occs;
@@ -3176,10 +3170,10 @@ cal_obj_byday_filter (RecurData *recur_data,
}
/* If the BYHOUR rule is specified it expands each occurrence in occs, by
- using each of the hours in the byhour list. */
-static GArray*
-cal_obj_byhour_expand (RecurData *recur_data,
- GArray *occs)
+ * using each of the hours in the byhour list. */
+static GArray *
+cal_obj_byhour_expand (RecurData *recur_data,
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ;
@@ -3187,7 +3181,7 @@ cal_obj_byhour_expand (RecurData *recur_data,
gint len, i;
/* If BYHOUR has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
if (!recur_data->recur->byhour || occs->len == 0)
return occs;
@@ -3211,17 +3205,17 @@ cal_obj_byhour_expand (RecurData *recur_data,
}
/* If the BYHOUR rule is specified it filters out all occurrences in occs
- which do not match one of the hours in the byhour list. */
-static GArray*
-cal_obj_byhour_filter (RecurData *recur_data,
- GArray *occs)
+ * which do not match one of the hours in the byhour list. */
+static GArray *
+cal_obj_byhour_filter (RecurData *recur_data,
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ;
gint len, i;
/* If BYHOUR has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
if (!recur_data->recur->byhour || occs->len == 0)
return occs;
@@ -3240,10 +3234,10 @@ cal_obj_byhour_filter (RecurData *recur_data,
}
/* If the BYMINUTE rule is specified it expands each occurrence in occs, by
- using each of the minutes in the byminute list. */
-static GArray*
-cal_obj_byminute_expand (RecurData *recur_data,
- GArray *occs)
+ * using each of the minutes in the byminute list. */
+static GArray *
+cal_obj_byminute_expand (RecurData *recur_data,
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ;
@@ -3251,7 +3245,7 @@ cal_obj_byminute_expand (RecurData *recur_data,
gint len, i;
/* If BYMINUTE has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
if (!recur_data->recur->byminute || occs->len == 0)
return occs;
@@ -3275,17 +3269,17 @@ cal_obj_byminute_expand (RecurData *recur_data,
}
/* If the BYMINUTE rule is specified it filters out all occurrences in occs
- which do not match one of the minutes in the byminute list. */
-static GArray*
-cal_obj_byminute_filter (RecurData *recur_data,
- GArray *occs)
+ * which do not match one of the minutes in the byminute list. */
+static GArray *
+cal_obj_byminute_filter (RecurData *recur_data,
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ;
gint len, i;
/* If BYMINUTE has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
if (!recur_data->recur->byminute || occs->len == 0)
return occs;
@@ -3304,10 +3298,10 @@ cal_obj_byminute_filter (RecurData *recur_data,
}
/* If the BYSECOND rule is specified it expands each occurrence in occs, by
- using each of the seconds in the bysecond list. */
-static GArray*
-cal_obj_bysecond_expand (RecurData *recur_data,
- GArray *occs)
+ * using each of the seconds in the bysecond list. */
+static GArray *
+cal_obj_bysecond_expand (RecurData *recur_data,
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ;
@@ -3315,7 +3309,7 @@ cal_obj_bysecond_expand (RecurData *recur_data,
gint len, i;
/* If BYSECOND has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
if (!recur_data->recur->bysecond || occs->len == 0)
return occs;
@@ -3339,17 +3333,17 @@ cal_obj_bysecond_expand (RecurData *recur_data,
}
/* If the BYSECOND rule is specified it filters out all occurrences in occs
- which do not match one of the seconds in the bysecond list. */
-static GArray*
-cal_obj_bysecond_filter (RecurData *recur_data,
- GArray *occs)
+ * which do not match one of the seconds in the bysecond list. */
+static GArray *
+cal_obj_bysecond_filter (RecurData *recur_data,
+ GArray *occs)
{
GArray *new_occs;
CalObjTime *occ;
gint len, i;
/* If BYSECOND has not been specified, or the array is empty, just
- return the array. */
+ * return the array. */
if (!recur_data->recur->bysecond || occs->len == 0)
return occs;
@@ -3368,11 +3362,11 @@ cal_obj_bysecond_filter (RecurData *recur_data,
}
/* Adds a positive or negative number of months to the given CalObjTime,
- updating the year appropriately so we end up with a valid month.
- Note that the day may be invalid, e.g. 30th Feb. */
+ * updating the year appropriately so we end up with a valid month.
+ * Note that the day may be invalid, e.g. 30th Feb. */
static void
-cal_obj_time_add_months (CalObjTime *cotime,
- gint months)
+cal_obj_time_add_months (CalObjTime *cotime,
+ gint months)
{
guint month, years;
@@ -3392,10 +3386,10 @@ cal_obj_time_add_months (CalObjTime *cotime,
}
/* Adds a positive or negative number of days to the given CalObjTime,
- updating the month and year appropriately so we end up with a valid day. */
+ * updating the month and year appropriately so we end up with a valid day. */
static void
-cal_obj_time_add_days (CalObjTime *cotime,
- gint days)
+cal_obj_time_add_days (CalObjTime *cotime,
+ gint days)
{
gint day, days_in_month;
@@ -3439,11 +3433,11 @@ cal_obj_time_add_days (CalObjTime *cotime,
}
/* Adds a positive or negative number of hours to the given CalObjTime,
- updating the day, month & year appropriately so we end up with a valid
- time. */
+ * updating the day, month & year appropriately so we end up with a valid
+ * time. */
static void
-cal_obj_time_add_hours (CalObjTime *cotime,
- gint hours)
+cal_obj_time_add_hours (CalObjTime *cotime,
+ gint hours)
{
gint hour, days;
@@ -3464,10 +3458,10 @@ cal_obj_time_add_hours (CalObjTime *cotime,
}
/* Adds a positive or negative number of minutes to the given CalObjTime,
- updating the rest of the CalObjTime appropriately. */
+ * updating the rest of the CalObjTime appropriately. */
static void
-cal_obj_time_add_minutes (CalObjTime *cotime,
- gint minutes)
+cal_obj_time_add_minutes (CalObjTime *cotime,
+ gint minutes)
{
gint minute, hours;
@@ -3488,10 +3482,10 @@ cal_obj_time_add_minutes (CalObjTime *cotime,
}
/* Adds a positive or negative number of seconds to the given CalObjTime,
- updating the rest of the CalObjTime appropriately. */
+ * updating the rest of the CalObjTime appropriately. */
static void
-cal_obj_time_add_seconds (CalObjTime *cotime,
- gint seconds)
+cal_obj_time_add_seconds (CalObjTime *cotime,
+ gint seconds)
{
gint second, minutes;
@@ -3512,13 +3506,13 @@ cal_obj_time_add_seconds (CalObjTime *cotime,
}
/* Compares 2 CalObjTimes. Returns -1 if the cotime1 is before cotime2, 0 if
- they are the same, or 1 if cotime1 is after cotime2. The comparison type
- specifies which parts of the times we are interested in, e.g. if CALOBJ_DAY
- is used we only want to know if the days are different. */
+ * they are the same, or 1 if cotime1 is after cotime2. The comparison type
+ * specifies which parts of the times we are interested in, e.g. if CALOBJ_DAY
+ * is used we only want to know if the days are different. */
static gint
-cal_obj_time_compare (CalObjTime *cotime1,
- CalObjTime *cotime2,
- CalObjTimeComparison type)
+cal_obj_time_compare (CalObjTime *cotime1,
+ CalObjTime *cotime2,
+ CalObjTimeComparison type)
{
if (cotime1->year < cotime2->year)
return -1;
@@ -3569,16 +3563,16 @@ cal_obj_time_compare (CalObjTime *cotime1,
}
/* This is the same as the above function, but without the comparison type.
- It is used for qsort (). */
+ * It is used for qsort (). */
static gint
cal_obj_time_compare_func (gconstpointer arg1,
- gconstpointer arg2)
+ gconstpointer arg2)
{
CalObjTime *cotime1, *cotime2;
gint retval;
- cotime1 = (CalObjTime*) arg1;
- cotime2 = (CalObjTime*) arg2;
+ cotime1 = (CalObjTime *) arg1;
+ cotime2 = (CalObjTime *) arg2;
if (cotime1->year < cotime2->year)
retval = -1;
@@ -3623,12 +3617,12 @@ cal_obj_time_compare_func (gconstpointer arg1,
static gint
cal_obj_date_only_compare_func (gconstpointer arg1,
- gconstpointer arg2)
+ gconstpointer arg2)
{
CalObjTime *cotime1, *cotime2;
- cotime1 = (CalObjTime*) arg1;
- cotime2 = (CalObjTime*) arg2;
+ cotime1 = (CalObjTime *) arg1;
+ cotime2 = (CalObjTime *) arg2;
if (cotime1->year < cotime2->year)
return -1;
@@ -3650,7 +3644,7 @@ cal_obj_date_only_compare_func (gconstpointer arg1,
/* Returns the weekday of the given CalObjTime, from 0 (Mon) - 6 (Sun). */
static gint
-cal_obj_time_weekday (CalObjTime *cotime)
+cal_obj_time_weekday (CalObjTime *cotime)
{
GDate date;
gint weekday;
@@ -3665,10 +3659,10 @@ cal_obj_time_weekday (CalObjTime *cotime)
}
/* Returns the weekday of the given CalObjTime, from 0 - 6. The week start
- day is Monday by default, but can be set in the recurrence rule. */
+ * day is Monday by default, but can be set in the recurrence rule. */
static gint
-cal_obj_time_weekday_offset (CalObjTime *cotime,
- ECalRecurrence *recur)
+cal_obj_time_weekday_offset (CalObjTime *cotime,
+ ECalRecurrence *recur)
{
GDate date;
gint weekday, offset;
@@ -3680,9 +3674,9 @@ cal_obj_time_weekday_offset (CalObjTime *cotime,
weekday = g_date_get_weekday (&date) - 1;
/* This calculates the offset of our day from the start of the week.
- We just add on a week (to avoid any possible negative values) and
- then subtract the specified week start day, then convert it into a
- value from 0-6. */
+ * We just add on a week (to avoid any possible negative values) and
+ * then subtract the specified week start day, then convert it into a
+ * value from 0-6. */
offset = (weekday + 7 - recur->week_start_day) % 7;
return offset;
@@ -3690,7 +3684,7 @@ cal_obj_time_weekday_offset (CalObjTime *cotime,
/* Returns the day of the year of the given CalObjTime, from 1 - 366. */
static gint
-cal_obj_time_day_of_year (CalObjTime *cotime)
+cal_obj_time_day_of_year (CalObjTime *cotime)
{
GDate date;
@@ -3701,13 +3695,13 @@ cal_obj_time_day_of_year (CalObjTime *cotime)
}
/* Finds the first week in the given CalObjTime's year, using the same weekday
- as the event start day (i.e. from the RecurData).
- The first week of the year is the first week starting from the specified
- week start day that has 4 days in the new year. It may be in the previous
- year. */
+ * as the event start day (i.e. from the RecurData).
+ * The first week of the year is the first week starting from the specified
+ * week start day that has 4 days in the new year. It may be in the previous
+ * year. */
static void
-cal_obj_time_find_first_week (CalObjTime *cotime,
- RecurData *recur_data)
+cal_obj_time_find_first_week (CalObjTime *cotime,
+ RecurData *recur_data)
{
GDate date;
gint weekday, week_start_day, first_full_week_start_offset, offset;
@@ -3718,15 +3712,15 @@ cal_obj_time_find_first_week (CalObjTime *cotime,
weekday = g_date_get_weekday (&date) - 1;
/* Calculate the first day of the year that starts a new week, i.e. the
- first week_start_day after weekday, using 0 = 1st Jan.
- e.g. if the 1st Jan is a Tuesday (1) and week_start_day is a
- Monday (0), the result will be (0 + 7 - 1) % 7 = 6 (7th Jan). */
+ * first week_start_day after weekday, using 0 = 1st Jan.
+ * e.g. if the 1st Jan is a Tuesday (1) and week_start_day is a
+ * Monday (0), the result will be (0 + 7 - 1) % 7 = 6 (7th Jan). */
week_start_day = recur_data->recur->week_start_day;
first_full_week_start_offset = (week_start_day + 7 - weekday) % 7;
/* Now see if we have to move backwards 1 week, i.e. if the week
- starts on or after Jan 5th (since the previous week has 4 days in
- this year and so will be the first week of the year). */
+ * starts on or after Jan 5th (since the previous week has 4 days in
+ * this year and so will be the first week of the year). */
if (first_full_week_start_offset >= 4)
first_full_week_start_offset -= 7;
@@ -3740,9 +3734,9 @@ cal_obj_time_find_first_week (CalObjTime *cotime,
}
static void
-cal_object_time_from_time (CalObjTime *cotime,
- time_t t,
- icaltimezone *zone)
+cal_object_time_from_time (CalObjTime *cotime,
+ time_t t,
+ icaltimezone *zone)
{
struct icaltimetype tt;
@@ -3761,10 +3755,10 @@ cal_object_time_from_time (CalObjTime *cotime,
}
/* Debugging function to convert a CalObjTime to a string. It uses a static
- buffer so beware. */
+ * buffer so beware. */
#ifdef CAL_OBJ_DEBUG
static const gchar *
-cal_obj_time_to_string (CalObjTime *cotime)
+cal_obj_time_to_string (CalObjTime *cotime)
{
static gchar buffer[50];
gchar *weekdays[] = { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun",
@@ -3795,10 +3789,10 @@ cal_obj_time_to_string (CalObjTime *cotime)
* Since: 2.32
**/
gboolean
-e_cal_recur_ensure_end_dates (ECalComponent *comp,
- gboolean refresh,
- ECalRecurResolveTimezoneFn tz_cb,
- gpointer tz_cb_data)
+e_cal_recur_ensure_end_dates (ECalComponent *comp,
+ gboolean refresh,
+ ECalRecurResolveTimezoneFn tz_cb,
+ gpointer tz_cb_data)
{
GSList *rrules, *exrules, *elem;
gboolean changed = FALSE;
@@ -3830,12 +3824,12 @@ struct _ECalRecurEnsureEndDateData {
};
static gboolean
-e_cal_recur_ensure_rule_end_date (ECalComponent *comp,
- icalproperty *prop,
- gboolean exception,
- gboolean refresh,
- ECalRecurResolveTimezoneFn tz_cb,
- gpointer tz_cb_data)
+e_cal_recur_ensure_rule_end_date (ECalComponent *comp,
+ icalproperty *prop,
+ gboolean exception,
+ gboolean refresh,
+ ECalRecurResolveTimezoneFn tz_cb,
+ gpointer tz_cb_data)
{
struct icalrecurrencetype rule;
ECalRecurEnsureEndDateData cb_data;
@@ -3850,17 +3844,17 @@ e_cal_recur_ensure_rule_end_date (ECalComponent *comp,
return FALSE;
/* If refresh is FALSE, we check if the enddate is already set, and
- if it is we just return. */
+ * if it is we just return. */
if (!refresh) {
if (e_cal_recur_get_rule_end_date (prop, NULL) != -1)
return FALSE;
}
/* Calculate the end date. Note that we initialize end_date to 0, so
- if the RULE doesn't generate COUNT instances we save a time_t of 0.
- Also note that we use the UTC timezone as the default timezone.
- In get_end_date () if the DTSTART is a DATE or floating time, we will
- convert the ENDDATE to the current timezone. */
+ * if the RULE doesn't generate COUNT instances we save a time_t of 0.
+ * Also note that we use the UTC timezone as the default timezone.
+ * In get_end_date () if the DTSTART is a DATE or floating time, we will
+ * convert the ENDDATE to the current timezone. */
cb_data.count = rule.count;
cb_data.instances = 0;
cb_data.end_date = 0;
@@ -3870,21 +3864,21 @@ e_cal_recur_ensure_rule_end_date (ECalComponent *comp,
icaltimezone_get_utc_timezone ());
/* Store the end date in the "X-EVOLUTION-ENDDATE" parameter of the
- rule. */
+ * rule. */
e_cal_recur_set_rule_end_date (prop, cb_data.end_date);
return TRUE;
}
static gboolean
-e_cal_recur_ensure_rule_end_date_cb (ECalComponent *comp,
- time_t instance_start,
- time_t instance_end,
- gpointer data)
+e_cal_recur_ensure_rule_end_date_cb (ECalComponent *comp,
+ time_t instance_start,
+ time_t instance_end,
+ gpointer data)
{
ECalRecurEnsureEndDateData *cb_data;
- cb_data = (ECalRecurEnsureEndDateData*) data;
+ cb_data = (ECalRecurEnsureEndDateData *) data;
cb_data->instances++;
@@ -3897,12 +3891,12 @@ e_cal_recur_ensure_rule_end_date_cb (ECalComponent *comp,
}
/* If default_timezone is set, the saved ENDDATE parameter is assumed to be
- in that timezone. This is used when the DTSTART is a DATE or floating
- value, since the RRULE end date will change depending on the timezone that
- it is evaluated in. */
+ * in that timezone. This is used when the DTSTART is a DATE or floating
+ * value, since the RRULE end date will change depending on the timezone that
+ * it is evaluated in. */
static time_t
-e_cal_recur_get_rule_end_date (icalproperty *prop,
- icaltimezone *default_timezone)
+e_cal_recur_get_rule_end_date (icalproperty *prop,
+ icaltimezone *default_timezone)
{
icalparameter *param;
const gchar *xname, *xvalue;
@@ -3936,8 +3930,8 @@ e_cal_recur_get_rule_end_date (icalproperty *prop,
}
static void
-e_cal_recur_set_rule_end_date (icalproperty *prop,
- time_t end_date)
+e_cal_recur_set_rule_end_date (icalproperty *prop,
+ time_t end_date)
{
icalparameter *param;
icalvalue *value;
@@ -3954,7 +3948,7 @@ e_cal_recur_set_rule_end_date (icalproperty *prop,
icalvalue_free (value);
/* If we already have an X-EVOLUTION-ENDDATE parameter, set the value
- to the new date-time. */
+ * to the new date-time. */
param = icalproperty_get_first_parameter (prop, ICAL_X_PARAMETER);
while (param) {
xname = icalparameter_get_xname (param);
diff --git a/calendar/libecal/e-cal-recur.h b/calendar/libecal/e-cal-recur.h
index 5ccfa38..2286146 100644
--- a/calendar/libecal/e-cal-recur.h
+++ b/calendar/libecal/e-cal-recur.h
@@ -32,7 +32,7 @@ typedef gboolean (* ECalRecurInstanceFn) (ECalComponent *comp,
time_t instance_end,
gpointer data);
-typedef icaltimezone* (* ECalRecurResolveTimezoneFn) (const gchar *tzid,
+typedef icaltimezone * (* ECalRecurResolveTimezoneFn) (const gchar *tzid,
gpointer data);
void e_cal_recur_generate_instances (ECalComponent *comp,
diff --git a/calendar/libecal/e-cal-system-timezone.c b/calendar/libecal/e-cal-system-timezone.c
index 16a0540..8fb108c 100644
--- a/calendar/libecal/e-cal-system-timezone.c
+++ b/calendar/libecal/e-cal-system-timezone.c
@@ -208,7 +208,8 @@ system_timezone_read_etc_conf_d_clock (void)
}
static void
-update_fallback (gchar **fallback, gchar *adept)
+update_fallback (gchar **fallback,
+ gchar *adept)
{
g_return_if_fail (fallback != NULL);
@@ -235,13 +236,13 @@ typedef gboolean (*CompareFiles) (struct stat *a_stat,
const gchar *b_filename);
static gchar *
-recursive_compare (struct stat *localtime_stat,
- const gchar *localtime_content,
- gsize localtime_content_len,
- const gchar *file,
- CompareFiles compare_func,
- gint deep_level,
- gchar **fallback)
+recursive_compare (struct stat *localtime_stat,
+ const gchar *localtime_content,
+ gsize localtime_content_len,
+ const gchar *file,
+ CompareFiles compare_func,
+ gint deep_level,
+ gchar **fallback)
{
struct stat file_stat;
@@ -299,10 +300,10 @@ recursive_compare (struct stat *localtime_stat,
static gboolean
files_are_identical_inode (struct stat *a_stat,
- struct stat *b_stat,
- const gchar *a_content,
- gsize a_content_len,
- const gchar *b_filename)
+ struct stat *b_stat,
+ const gchar *a_content,
+ gsize a_content_len,
+ const gchar *b_filename)
{
gboolean res = a_stat->st_ino == b_stat->st_ino;
@@ -316,7 +317,7 @@ files_are_identical_inode (struct stat *a_stat,
filename = b_filename;
/* There is a 'localtime' soft link to /etc/localtime in the zoneinfo
- directory on Slackware, thus rather skip this file. */
+ * directory on Slackware, thus rather skip this file. */
res = !g_str_equal (filename, "localtime");
}
@@ -355,10 +356,10 @@ system_timezone_read_etc_localtime_hardlink (void)
static gboolean
files_are_identical_content (struct stat *a_stat,
- struct stat *b_stat,
- const gchar *a_content,
- gsize a_content_len,
- const gchar *b_filename)
+ struct stat *b_stat,
+ const gchar *a_content,
+ gsize a_content_len,
+ const gchar *b_filename)
{
gchar *b_content = NULL;
gsize b_content_len = -1;
@@ -487,7 +488,7 @@ struct timezone_map_entry
};
static gchar *
-windows_timezone_string_to_olson (const gchar * windows_tz)
+windows_timezone_string_to_olson (const gchar *windows_tz)
{
/* source: http://www.chronos-st.org/Windows-to-Olson.txt */
static const struct timezone_map_entry timezone_map[] = {
@@ -656,7 +657,7 @@ windows_timezone_string_to_olson (const gchar * windows_tz)
gint i;
- for (i=0; timezone_map[i].windows_string && windows_tz; i++) {
+ for (i = 0; timezone_map[i].windows_string && windows_tz; i++) {
gint res = strcmp ( timezone_map[i].windows_string, windows_tz);
if (res > 0)
return NULL;
@@ -723,7 +724,7 @@ system_timezone_win32_query_registry (void)
return NULL;
}
- for (i=0, res = ERROR_SUCCESS; res != ERROR_NO_MORE_ITEMS; i++) {
+ for (i = 0, res = ERROR_SUCCESS; res != ERROR_NO_MORE_ITEMS; i++) {
size = MAX_VALUE_NAME;
res = RegEnumKeyEx (reg_key, i, subKey, &size, NULL, NULL, NULL, NULL);
if (res == ERROR_SUCCESS) {
diff --git a/calendar/libecal/e-cal-time-util.c b/calendar/libecal/e-cal-time-util.c
index 592c27a..d54c805 100644
--- a/calendar/libecal/e-cal-time-util.c
+++ b/calendar/libecal/e-cal-time-util.c
@@ -28,7 +28,7 @@
#define ISODATE_LENGTH 17 /* 4+2+2+1+2+2+2+1 + 1 */
/* Number of days in a month, using 0 (Jan) to 11 (Dec). For leap years,
- add 1 to February (month 1). */
+ * add 1 to February (month 1). */
static const gint days_in_month[12] = {
31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
};
@@ -57,7 +57,8 @@ static const gint days_in_month[12] = {
* Returns: a time_t value containing @time plus the days added.
*/
time_t
-time_add_day (time_t time, gint days)
+time_add_day (time_t time,
+ gint days)
{
struct tm *tm;
@@ -78,7 +79,8 @@ time_add_day (time_t time, gint days)
* Returns: a time_t value containing @time plus the weeks added.
*/
time_t
-time_add_week (time_t time, gint weeks)
+time_add_week (time_t time,
+ gint weeks)
{
return time_add_day (time, weeks * 7);
}
@@ -147,7 +149,9 @@ time_day_end (time_t t)
* Returns: a time_t value containing @time plus the days added.
*/
time_t
-time_add_day_with_zone (time_t time, gint days, icaltimezone *zone)
+time_add_day_with_zone (time_t time,
+ gint days,
+ icaltimezone *zone)
{
struct icaltimetype tt;
@@ -176,7 +180,9 @@ time_add_day_with_zone (time_t time, gint days, icaltimezone *zone)
* Returns: a time_t value containing @time plus the weeks added.
*/
time_t
-time_add_week_with_zone (time_t time, gint weeks, icaltimezone *zone)
+time_add_week_with_zone (time_t time,
+ gint weeks,
+ icaltimezone *zone)
{
return time_add_day_with_zone (time, weeks * 7, zone);
}
@@ -201,7 +207,9 @@ time_add_week_with_zone (time_t time, gint weeks, icaltimezone *zone)
* Returns: a time_t value containing @time plus the months added.
*/
time_t
-time_add_month_with_zone (time_t time, gint months, icaltimezone *zone)
+time_add_month_with_zone (time_t time,
+ gint months,
+ icaltimezone *zone)
{
struct icaltimetype tt;
gint day, days_in_month;
@@ -213,7 +221,7 @@ time_add_month_with_zone (time_t time, gint months, icaltimezone *zone)
tt.month += months;
/* Save the day, and set it to 1, so we don't overflow into the next
- month. */
+ * month. */
day = tt.day;
tt.day = 1;
@@ -245,7 +253,8 @@ time_add_month_with_zone (time_t time, gint months, icaltimezone *zone)
* Returns: the beginning of the year.
*/
time_t
-time_year_begin_with_zone (time_t time, icaltimezone *zone)
+time_year_begin_with_zone (time_t time,
+ icaltimezone *zone)
{
struct icaltimetype tt;
@@ -277,7 +286,8 @@ time_year_begin_with_zone (time_t time, icaltimezone *zone)
* Returns: the beginning of the month.
*/
time_t
-time_month_begin_with_zone (time_t time, icaltimezone *zone)
+time_month_begin_with_zone (time_t time,
+ icaltimezone *zone)
{
struct icaltimetype tt;
@@ -310,7 +320,9 @@ time_month_begin_with_zone (time_t time, icaltimezone *zone)
* Returns: the beginning of the week.
*/
time_t
-time_week_begin_with_zone (time_t time, gint week_start_day, icaltimezone *zone)
+time_week_begin_with_zone (time_t time,
+ gint week_start_day,
+ icaltimezone *zone)
{
struct icaltimetype tt;
gint weekday, offset;
@@ -351,7 +363,8 @@ time_week_begin_with_zone (time_t time, gint week_start_day, icaltimezone *zone)
* Returns: the beginning of the day.
*/
time_t
-time_day_begin_with_zone (time_t time, icaltimezone *zone)
+time_day_begin_with_zone (time_t time,
+ icaltimezone *zone)
{
struct icaltimetype tt;
@@ -381,7 +394,8 @@ time_day_begin_with_zone (time_t time, icaltimezone *zone)
* Returns: the end of the day.
*/
time_t
-time_day_end_with_zone (time_t time, icaltimezone *zone)
+time_day_end_with_zone (time_t time,
+ icaltimezone *zone)
{
struct icaltimetype tt;
@@ -412,7 +426,9 @@ time_day_end_with_zone (time_t time, icaltimezone *zone)
* This is analogous to g_date_set_time() but takes the timezone into account.
**/
void
-time_to_gdate_with_zone (GDate *date, time_t time, icaltimezone *zone)
+time_to_gdate_with_zone (GDate *date,
+ time_t time,
+ icaltimezone *zone)
{
struct icaltimetype tt;
@@ -440,7 +456,8 @@ time_to_gdate_with_zone (GDate *date, time_t time, icaltimezone *zone)
* Returns: number of days in the given month/year.
*/
gint
-time_days_in_month (gint year, gint month)
+time_days_in_month (gint year,
+ gint month)
{
gint days;
@@ -466,7 +483,9 @@ time_days_in_month (gint year, gint month)
* Returns: the day of the year.
*/
gint
-time_day_of_year (gint day, gint month, gint year)
+time_day_of_year (gint day,
+ gint month,
+ gint year)
{
gint i;
@@ -493,7 +512,9 @@ time_day_of_year (gint day, gint month, gint year)
* Returns: the day of the week for the given date.
*/
gint
-time_day_of_week (gint day, gint month, gint year)
+time_day_of_week (gint day,
+ gint month,
+ gint year)
{
gint n;
@@ -540,8 +561,8 @@ gint
time_leap_years_up_to (gint year)
{
/* There is normally a leap year every 4 years, except at the turn of
- centuries since 1700. But there is a leap year on centuries since 1700
- which are divisible by 400. */
+ * centuries since 1700. But there is a leap year on centuries since 1700
+ * which are divisible by 400. */
return (year / 4
- ((year > 1700) ? (year / 100 - 17) : 0)
+ ((year > 1600) ? ((year - 1600) / 400) : 0));
@@ -564,7 +585,7 @@ isodate_from_time_t (time_t t)
gmtime_r (&t, &stm);
ret = g_malloc (ISODATE_LENGTH);
- g_snprintf (ret, ISODATE_LENGTH, fmt, (stm.tm_year+1900), (stm.tm_mon+1), stm.tm_mday, stm.tm_hour, stm.tm_min, stm.tm_sec);
+ g_snprintf (ret, ISODATE_LENGTH, fmt, (stm.tm_year + 1900), (stm.tm_mon + 1), stm.tm_mday, stm.tm_hour, stm.tm_min, stm.tm_sec);
return ret;
}
@@ -676,8 +697,8 @@ icaltimetype_to_tm (struct icaltimetype *itt)
**/
struct tm
icaltimetype_to_tm_with_zone (struct icaltimetype *itt,
- icaltimezone *from_zone,
- icaltimezone *to_zone)
+ icaltimezone *from_zone,
+ icaltimezone *to_zone)
{
struct tm tm;
struct icaltimetype itt_copy;
@@ -707,7 +728,8 @@ icaltimetype_to_tm_with_zone (struct icaltimetype *itt,
* Since: 2.22
*/
struct icaltimetype
-tm_to_icaltimetype (struct tm *tm, gboolean is_date)
+tm_to_icaltimetype (struct tm *tm,
+ gboolean is_date)
{
struct icaltimetype itt;
diff --git a/calendar/libecal/e-cal-time-util.h b/calendar/libecal/e-cal-time-util.h
index 7130214..fb41fce 100644
--- a/calendar/libecal/e-cal-time-util.h
+++ b/calendar/libecal/e-cal-time-util.h
@@ -22,28 +22,28 @@ G_BEGIN_DECLS
**************************************************************************/
/* Returns the number of days in the month. Year is the normal year, e.g. 2001.
- Month is 0 (Jan) to 11 (Dec). */
+ * Month is 0 (Jan) to 11 (Dec). */
gint time_days_in_month (gint year, gint month);
/* Returns the 1-based day number within the year of the specified date.
- Year is the normal year, e.g. 2001. Month is 0 to 11. */
+ * Year is the normal year, e.g. 2001. Month is 0 to 11. */
gint time_day_of_year (gint day, gint month, gint year);
/* Returns the day of the week for the specified date, 0 (Sun) to 6 (Sat).
- For the days that were removed on the Gregorian reformation, it returns
- Thursday. Year is the normal year, e.g. 2001. Month is 0 to 11. */
+ * For the days that were removed on the Gregorian reformation, it returns
+ * Thursday. Year is the normal year, e.g. 2001. Month is 0 to 11. */
gint time_day_of_week (gint day, gint month, gint year);
/* Returns whether the specified year is a leap year. Year is the normal year,
- e.g. 2001. */
+ * e.g. 2001. */
gboolean time_is_leap_year (gint year);
/* Returns the number of leap years since year 1 up to (but not including) the
- specified year. Year is the normal year, e.g. 2001. */
+ * specified year. Year is the normal year, e.g. 2001. */
gint time_leap_years_up_to (gint year);
/* Convert to or from an ISO 8601 representation of a time, in UTC,
- e.g. "20010708T183000Z". */
+ * e.g. "20010708T183000Z". */
gchar *isodate_from_time_t (time_t t);
time_t time_from_isodate (const gchar *str);
@@ -72,37 +72,37 @@ time_t time_day_end (time_t t);
**************************************************************************/
/* Adds or subtracts a number of days to/from the given time_t value, using
- the given timezone. */
+ * the given timezone. */
time_t time_add_day_with_zone (time_t time, gint days, icaltimezone *zone);
/* Adds or subtracts a number of weeks to/from the given time_t value, using
- the given timezone. */
+ * the given timezone. */
time_t time_add_week_with_zone (time_t time, gint weeks, icaltimezone *zone);
/* Adds or subtracts a number of months to/from the given time_t value, using
- the given timezone. */
+ * the given timezone. */
time_t time_add_month_with_zone (time_t time, gint months, icaltimezone *zone);
/* Returns the start of the year containing the given time_t, using the given
- timezone. */
+ * timezone. */
time_t time_year_begin_with_zone (time_t time, icaltimezone *zone);
/* Returns the start of the month containing the given time_t, using the given
- timezone. */
+ * timezone. */
time_t time_month_begin_with_zone (time_t time, icaltimezone *zone);
/* Returns the start of the week containing the given time_t, using the given
- timezone. week_start_day should use the same values as mktime (),
- i.e. 0 (Sun) to 6 (Sat). */
+ * timezone. week_start_day should use the same values as mktime (),
+ * i.e. 0 (Sun) to 6 (Sat). */
time_t time_week_begin_with_zone (time_t time, gint week_start_day,
icaltimezone *zone);
/* Returns the start of the day containing the given time_t, using the given
- timezone. */
+ * timezone. */
time_t time_day_begin_with_zone (time_t time, icaltimezone *zone);
/* Returns the end of the day containing the given time_t, using the given
- timezone. (The end of the day is the start of the next day.) */
+ * timezone. (The end of the day is the start of the next day.) */
time_t time_day_end_with_zone (time_t time, icaltimezone *zone);
void time_to_gdate_with_zone (GDate *date, time_t time, icaltimezone *zone);
diff --git a/calendar/libecal/e-cal-util.c b/calendar/libecal/e-cal-util.c
index b1b1f72..88bbb47 100644
--- a/calendar/libecal/e-cal-util.c
+++ b/calendar/libecal/e-cal-util.c
@@ -206,7 +206,9 @@ e_cal_util_parse_ics_string (const gchar *string)
}
static gchar *
-get_line_fn (gchar *buf, gsize size, gpointer file)
+get_line_fn (gchar *buf,
+ gsize size,
+ gpointer file)
{
return fgets (buf, size, file);
}
@@ -246,8 +248,12 @@ e_cal_util_parse_ics_file (const gchar *filename)
* component in order to compute alarm trigger times.
*/
static void
-compute_alarm_range (ECalComponent *comp, GList *alarm_uids, time_t start, time_t end,
- time_t *alarm_start, time_t *alarm_end)
+compute_alarm_range (ECalComponent *comp,
+ GList *alarm_uids,
+ time_t start,
+ time_t end,
+ time_t *alarm_start,
+ time_t *alarm_end)
{
GList *l;
time_t repeat_time;
@@ -324,8 +330,11 @@ struct alarm_occurrence_data {
};
static void
-add_trigger (struct alarm_occurrence_data *aod, const gchar *auid, time_t trigger,
- time_t occur_start, time_t occur_end)
+add_trigger (struct alarm_occurrence_data *aod,
+ const gchar *auid,
+ time_t trigger,
+ time_t occur_start,
+ time_t occur_end)
{
ECalComponentAlarmInstance *instance;
@@ -343,7 +352,10 @@ add_trigger (struct alarm_occurrence_data *aod, const gchar *auid, time_t trigge
* of a component's RELATIVE alarms.
*/
static gboolean
-add_alarm_occurrences_cb (ECalComponent *comp, time_t start, time_t end, gpointer data)
+add_alarm_occurrences_cb (ECalComponent *comp,
+ time_t start,
+ time_t end,
+ gpointer data)
{
struct alarm_occurrence_data *aod;
GList *l;
@@ -426,10 +438,11 @@ add_alarm_occurrences_cb (ECalComponent *comp, time_t start, time_t end, gpointe
/* Generates the absolute triggers for a component */
static void
-generate_absolute_triggers (ECalComponent *comp, struct alarm_occurrence_data *aod,
- ECalRecurResolveTimezoneFn resolve_tzid,
- gpointer user_data,
- icaltimezone *default_timezone)
+generate_absolute_triggers (ECalComponent *comp,
+ struct alarm_occurrence_data *aod,
+ ECalRecurResolveTimezoneFn resolve_tzid,
+ gpointer user_data,
+ icaltimezone *default_timezone)
{
GList *l;
ECalComponentDateTime dt_start, dt_end;
@@ -524,7 +537,8 @@ generate_absolute_triggers (ECalComponent *comp, struct alarm_occurrence_data *a
/* Compares two alarm instances; called from g_slist_sort() */
static gint
-compare_alarm_instance (gconstpointer a, gconstpointer b)
+compare_alarm_instance (gconstpointer a,
+ gconstpointer b)
{
const ECalComponentAlarmInstance *aia, *aib;
@@ -560,12 +574,12 @@ compare_alarm_instance (gconstpointer a, gconstpointer b)
*/
ECalComponentAlarms *
e_cal_util_generate_alarms_for_comp (ECalComponent *comp,
- time_t start,
- time_t end,
- ECalComponentAlarmAction *omit,
- ECalRecurResolveTimezoneFn resolve_tzid,
- gpointer user_data,
- icaltimezone *default_timezone)
+ time_t start,
+ time_t end,
+ ECalComponentAlarmAction *omit,
+ ECalRecurResolveTimezoneFn resolve_tzid,
+ gpointer user_data,
+ icaltimezone *default_timezone)
{
GList *alarm_uids;
time_t alarm_start, alarm_end;
@@ -627,13 +641,13 @@ e_cal_util_generate_alarms_for_comp (ECalComponent *comp,
*/
gint
e_cal_util_generate_alarms_for_list (GList *comps,
- time_t start,
- time_t end,
- ECalComponentAlarmAction *omit,
- GSList **comp_alarms,
- ECalRecurResolveTimezoneFn resolve_tzid,
- gpointer user_data,
- icaltimezone *default_timezone)
+ time_t start,
+ time_t end,
+ ECalComponentAlarmAction *omit,
+ GSList **comp_alarms,
+ ECalRecurResolveTimezoneFn resolve_tzid,
+ gpointer user_data,
+ icaltimezone *default_timezone)
{
GList *l;
gint n;
@@ -720,7 +734,8 @@ typedef struct {
} ForeachTzidData;
static void
-add_timezone_cb (icalparameter *param, gpointer data)
+add_timezone_cb (icalparameter *param,
+ gpointer data)
{
icaltimezone *tz;
const gchar *tzid;
@@ -760,7 +775,7 @@ add_timezone_cb (icalparameter *param, gpointer data)
*/
void
e_cal_util_add_timezones_from_component (icalcomponent *vcal_comp,
- icalcomponent *icalcomp)
+ icalcomponent *icalcomp)
{
ForeachTzidData f_data;
@@ -913,7 +928,8 @@ e_cal_util_component_has_rrules (icalcomponent *icalcomp)
* Returns: TRUE if the dates of both components match, FALSE otherwise.
*/
gboolean
-e_cal_util_event_dates_match (icalcomponent *icalcomp1, icalcomponent *icalcomp2)
+e_cal_util_event_dates_match (icalcomponent *icalcomp1,
+ icalcomponent *icalcomp2)
{
struct icaltimetype c1_dtstart, c1_dtend, c2_dtstart, c2_dtend;
@@ -966,7 +982,9 @@ struct instance_data {
};
static void
-check_instance (icalcomponent *comp, struct icaltime_span *span, gpointer data)
+check_instance (icalcomponent *comp,
+ struct icaltime_span *span,
+ gpointer data)
{
struct instance_data *instance = data;
@@ -986,7 +1004,7 @@ check_instance (icalcomponent *comp, struct icaltime_span *span, gpointer data)
**/
icalcomponent *
e_cal_util_construct_instance (icalcomponent *icalcomp,
- struct icaltimetype rid)
+ struct icaltimetype rid)
{
struct instance_data instance;
struct icaltimetype start, end;
@@ -1018,7 +1036,9 @@ e_cal_util_construct_instance (icalcomponent *icalcomp,
}
static inline gboolean
-time_matches_rid (struct icaltimetype itt, struct icaltimetype rid, CalObjModType mod)
+time_matches_rid (struct icaltimetype itt,
+ struct icaltimetype rid,
+ CalObjModType mod)
{
gint compare;
@@ -1046,8 +1066,8 @@ time_matches_rid (struct icaltimetype itt, struct icaltimetype rid, CalObjModTyp
**/
void
e_cal_util_remove_instances (icalcomponent *icalcomp,
- struct icaltimetype rid,
- CalObjModType mod)
+ struct icaltimetype rid,
+ CalObjModType mod)
{
icalproperty *prop;
struct icaltimetype itt, recur;
@@ -1168,10 +1188,10 @@ e_cal_util_get_system_timezone (void)
}
static time_t
-componenttime_to_utc_timet (const ECalComponentDateTime* dt_time,
- ECalRecurResolveTimezoneFn tz_cb,
- gpointer tz_cb_data,
- const icaltimezone *default_zone)
+componenttime_to_utc_timet (const ECalComponentDateTime *dt_time,
+ ECalRecurResolveTimezoneFn tz_cb,
+ gpointer tz_cb_data,
+ const icaltimezone *default_zone)
{
time_t timet = -1;
icaltimezone *zone = NULL;
@@ -1199,12 +1219,12 @@ componenttime_to_utc_timet (const ECalComponentDateTime* dt_time,
**/
void
e_cal_util_get_component_occur_times (ECalComponent *comp,
- time_t* start,
- time_t* end,
- ECalRecurResolveTimezoneFn tz_cb,
- gpointer tz_cb_data,
- const icaltimezone *default_timezone,
- icalcomponent_kind kind)
+ time_t *start,
+ time_t *end,
+ ECalRecurResolveTimezoneFn tz_cb,
+ gpointer tz_cb_data,
+ const icaltimezone *default_timezone,
+ icalcomponent_kind kind)
{
struct icalrecurrencetype ir;
ECalComponentDateTime dt_start, dt_end;
@@ -1301,11 +1321,11 @@ e_cal_util_get_component_occur_times (ECalComponent *comp,
time_t rdate_end = _TIME_MAX;
/* FIXME: We currently assume RDATEs are in the same timezone
- as DTSTART. We should get the RDATE timezone and convert
- to the DTSTART timezone first. */
+ * as DTSTART. We should get the RDATE timezone and convert
+ * to the DTSTART timezone first. */
/* Check if the end date or duration is set, libical seems to set
- second to -1 to denote an unset time */
+ * second to -1 to denote an unset time */
if (p->type != E_CAL_COMPONENT_PERIOD_DATETIME || p->u.end.second != -1)
rdate_end = icaltime_as_timet (icaltime_add (p->start, p->u.duration));
else
diff --git a/calendar/libecal/e-cal-util.h b/calendar/libecal/e-cal-util.h
index 79dfed5..4a69b47 100644
--- a/calendar/libecal/e-cal-util.h
+++ b/calendar/libecal/e-cal-util.h
@@ -153,8 +153,8 @@ void e_cal_util_remove_instances (icalcomponent *icalcomp,
gchar *e_cal_util_get_system_timezone_location (void);
icaltimezone *e_cal_util_get_system_timezone (void);
void e_cal_util_get_component_occur_times (ECalComponent *comp,
- time_t* start,
- time_t* end,
+ time_t * start,
+ time_t * end,
ECalRecurResolveTimezoneFn tz_cb,
gpointer tz_cb_data,
const icaltimezone *default_timezone,
diff --git a/calendar/libecal/e-cal-view.c b/calendar/libecal/e-cal-view.c
index 2586413..4d45dc4 100644
--- a/calendar/libecal/e-cal-view.c
+++ b/calendar/libecal/e-cal-view.c
@@ -108,7 +108,9 @@ build_id_list (const gchar * const *seq)
}
static void
-objects_added_cb (EGdbusCalView *gdbus_calview, const gchar * const *objects, ECalView *view)
+objects_added_cb (EGdbusCalView *gdbus_calview,
+ const gchar * const *objects,
+ ECalView *view)
{
GList *list;
@@ -126,7 +128,9 @@ objects_added_cb (EGdbusCalView *gdbus_calview, const gchar * const *objects, EC
}
static void
-objects_modified_cb (EGdbusCalView *gdbus_calview, const gchar * const *objects, ECalView *view)
+objects_modified_cb (EGdbusCalView *gdbus_calview,
+ const gchar * const *objects,
+ ECalView *view)
{
GList *list;
@@ -144,7 +148,9 @@ objects_modified_cb (EGdbusCalView *gdbus_calview, const gchar * const *objects,
}
static void
-objects_removed_cb (EGdbusCalView *gdbus_calview, const gchar * const *seq, ECalView *view)
+objects_removed_cb (EGdbusCalView *gdbus_calview,
+ const gchar * const *seq,
+ ECalView *view)
{
GList *list;
@@ -162,7 +168,10 @@ objects_removed_cb (EGdbusCalView *gdbus_calview, const gchar * const *seq, ECal
}
static void
-progress_cb (EGdbusCalView *gdbus_calview, guint percent, const gchar *message, ECalView *view)
+progress_cb (EGdbusCalView *gdbus_calview,
+ guint percent,
+ const gchar *message,
+ ECalView *view)
{
g_return_if_fail (E_IS_CAL_VIEW (view));
@@ -170,7 +179,9 @@ progress_cb (EGdbusCalView *gdbus_calview, guint percent, const gchar *message,
}
static void
-complete_cb (EGdbusCalView *gdbus_calview, const gchar * const *arg_error, ECalView *view)
+complete_cb (EGdbusCalView *gdbus_calview,
+ const gchar * const *arg_error,
+ ECalView *view)
{
GError *error = NULL;
@@ -195,7 +206,10 @@ e_cal_view_init (ECalView *view)
}
static void
-e_cal_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+e_cal_view_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ECalView *view;
ECalViewPrivate *priv;
@@ -225,7 +239,10 @@ e_cal_view_set_property (GObject *object, guint property_id, const GValue *value
}
static void
-e_cal_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+e_cal_view_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ECalView *view;
ECalViewPrivate *priv;
@@ -384,7 +401,8 @@ e_cal_view_class_init (ECalViewClass *klass)
* Deprecated: 3.2: Use #ECalClientView
**/
ECalView *
-_e_cal_view_new (ECal *ecal, EGdbusCalView *gdbus_calview)
+_e_cal_view_new (ECal *ecal,
+ EGdbusCalView *gdbus_calview)
{
ECalView *view;
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index 80be45f..bef8cab 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -113,17 +113,17 @@ struct _ECalPrivate {
gpointer auth_user_data;
/* A cache of timezones retrieved from the server, to avoid getting
- them repeatedly for each get_object () call. */
+ * them repeatedly for each get_object () call. */
GHashTable *timezones;
/* The default timezone to use to resolve DATE and floating DATE-TIME
- values. */
+ * values. */
icaltimezone *default_zone;
gchar *local_attachment_store;
/* For locking the operation while localling cache values like
- static capabilities, cal address etc. */
+ * static capabilities, cal address etc. */
GStaticRecMutex cache_lock;
GList **free_busy_data;
@@ -450,7 +450,10 @@ gdbus_cal_disconnect (ECal *ecal);
* Called when the calendar server dies.
*/
static void
-gdbus_cal_closed_cb (GDBusConnection *connection, gboolean remote_peer_vanished, GError *error, ECal *ecal)
+gdbus_cal_closed_cb (GDBusConnection *connection,
+ gboolean remote_peer_vanished,
+ GError *error,
+ ECal *ecal)
{
GError *err = NULL;
@@ -474,10 +477,16 @@ gdbus_cal_closed_cb (GDBusConnection *connection, gboolean remote_peer_vanished,
}
static void
-gdbus_cal_connection_gone_cb (GDBusConnection *connection, const gchar *sender_name, const gchar *object_path, const gchar *interface_name, const gchar *signal_name, GVariant *parameters, gpointer user_data)
+gdbus_cal_connection_gone_cb (GDBusConnection *connection,
+ const gchar *sender_name,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *signal_name,
+ GVariant *parameters,
+ gpointer user_data)
{
/* signal subscription takes care of correct parameters,
- thus just do what is to be done here */
+ * thus just do what is to be done here */
gdbus_cal_closed_cb (connection, TRUE, NULL, user_data);
}
@@ -521,10 +530,12 @@ e_cal_dispose (GObject *object)
}
static void
-free_timezone (gpointer key, gpointer value, gpointer data)
+free_timezone (gpointer key,
+ gpointer value,
+ gpointer data)
{
/* Note that the key comes from within the icaltimezone value, so we
- don't free that. */
+ * don't free that. */
icaltimezone_free (value, TRUE);
}
@@ -670,7 +681,10 @@ e_cal_class_init (ECalClass *klass)
}
static void
-cal_factory_proxy_closed_cb (GDBusConnection *connection, gboolean remote_peer_vanished, GError *error, gpointer user_data)
+cal_factory_proxy_closed_cb (GDBusConnection *connection,
+ gboolean remote_peer_vanished,
+ GError *error,
+ gpointer user_data)
{
GError *err = NULL;
@@ -703,10 +717,16 @@ cal_factory_proxy_closed_cb (GDBusConnection *connection, gboolean remote_peer_v
}
static void
-cal_factory_connection_gone_cb (GDBusConnection *connection, const gchar *sender_name, const gchar *object_path, const gchar *interface_name, const gchar *signal_name, GVariant *parameters, gpointer user_data)
+cal_factory_connection_gone_cb (GDBusConnection *connection,
+ const gchar *sender_name,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *signal_name,
+ GVariant *parameters,
+ gpointer user_data)
{
/* signal subscription takes care of correct parameters,
- thus just do what is to be done here */
+ * thus just do what is to be done here */
cal_factory_proxy_closed_cb (connection, TRUE, NULL, user_data);
}
@@ -753,7 +773,8 @@ e_cal_activate (GError **error)
}
static gchar *
-build_proxy_pass_key (ECal *ecal, const gchar * parent_user)
+build_proxy_pass_key (ECal *ecal,
+ const gchar *parent_user)
{
gchar *euri_str;
const gchar *uri;
@@ -790,7 +811,9 @@ build_pass_key (ECal *ecal)
static void async_open_report_result (ECal *ecal, const GError *error);
static void
-authenticate_user_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+authenticate_user_ready_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECal *cal = user_data;
GError *error = NULL;
@@ -829,7 +852,9 @@ finish_backend_opening_phase (ECal *cal)
}
static gboolean
-call_authenticate_user (ECal *cal, gboolean async, GError **error)
+call_authenticate_user (ECal *cal,
+ gboolean async,
+ GError **error)
{
gchar *username = NULL, *password = NULL;
ECredentials *credentials = NULL;
@@ -875,8 +900,8 @@ call_authenticate_user (ECal *cal, gboolean async, GError **error)
if (parent_user) {
key = build_proxy_pass_key (cal, parent_user);
/*
- This password prompt will be prompted rarely. Since the key that is passed to
- the auth_func corresponds to the parent user.
+ * This password prompt will be prompted rarely. Since the key that is passed to
+ * the auth_func corresponds to the parent user.
*/
prompt = g_strdup_printf (_("Enter password for %s to enable proxy for user %s"), e_source_peek_name (priv->source), parent_user);
g_free (parent_user);
@@ -958,7 +983,9 @@ reopen_with_auth (gpointer data)
}
static void
-auth_required_cb (EGdbusCal *gdbus_cal, const gchar * const *credentials_strv, ECal *cal)
+auth_required_cb (EGdbusCal *gdbus_cal,
+ const gchar * const *credentials_strv,
+ ECal *cal)
{
ECalPrivate *priv;
g_return_if_fail (E_IS_CAL (cal));
@@ -972,7 +999,9 @@ auth_required_cb (EGdbusCal *gdbus_cal, const gchar * const *credentials_strv, E
}
static void
-free_busy_data_cb (EGdbusCal *gdbus_cal, const gchar * const *free_busy_strv, ECal *cal)
+free_busy_data_cb (EGdbusCal *gdbus_cal,
+ const gchar * const *free_busy_strv,
+ ECal *cal)
{
ECalPrivate *priv;
@@ -1038,7 +1067,9 @@ backend_error_idle_cb (gpointer data)
/* Handle the error_occurred signal from the listener */
static void
-backend_error_cb (EGdbusCal *gdbus_cal, const gchar *message, ECal *ecal)
+backend_error_cb (EGdbusCal *gdbus_cal,
+ const gchar *message,
+ ECal *ecal)
{
ECalErrorData *error_data;
@@ -1053,7 +1084,9 @@ backend_error_cb (EGdbusCal *gdbus_cal, const gchar *message, ECal *ecal)
}
static void
-readonly_cb (EGdbusCal *gdbus_cal, gboolean read_only, ECal *cal)
+readonly_cb (EGdbusCal *gdbus_cal,
+ gboolean read_only,
+ ECal *cal)
{
ECalPrivate *priv;
@@ -1064,7 +1097,9 @@ readonly_cb (EGdbusCal *gdbus_cal, gboolean read_only, ECal *cal)
}
static void
-online_cb (EGdbusCal *gdbus_cal, gboolean is_online, ECal *cal)
+online_cb (EGdbusCal *gdbus_cal,
+ gboolean is_online,
+ ECal *cal)
{
g_return_if_fail (E_IS_CAL (cal));
@@ -1074,11 +1109,12 @@ online_cb (EGdbusCal *gdbus_cal, gboolean is_online, ECal *cal)
/*
static void
-backend_died_cb (EComponentListener *cl, gpointer user_data)
+backend_died_cb (EComponentListener *cl,
+ * gpointer user_data)
{
ECalPrivate *priv;
ECal *ecal = (ECal *) user_data;
-
+ *
priv = ecal->priv;
priv->load_state = E_CAL_LOAD_NOT_LOADED;
g_signal_emit (G_OBJECT (ecal), e_cal_signals[BACKEND_DIED], 0);
@@ -1116,7 +1152,8 @@ set_local_attachment_store (ECal *ecal)
* Deprecated: 3.2: Use e_cal_client_new() instead.
**/
ECal *
-e_cal_new (ESource *source, ECalSourceType type)
+e_cal_new (ESource *source,
+ ECalSourceType type)
{
ECal *ecal;
ECalPrivate *priv;
@@ -1202,13 +1239,18 @@ e_cal_new (ESource *source, ECalSourceType type)
}
/* for each known source calls check_func, which should return TRUE if the required
- source have been found. Function returns NULL or the source on which was returned
- TRUE by the check_func. Non-NULL pointer should be unreffed by g_object_unref.
-
- 'sources' is an output parameter and cannot be NULL. When returned non-NULL, then
- should be freed with g_object_unref function. */
+ * source have been found. Function returns NULL or the source on which was returned
+ * TRUE by the check_func. Non-NULL pointer should be unreffed by g_object_unref.
+ *
+ * 'sources' is an output parameter and cannot be NULL. When returned non-NULL, then
+ * should be freed with g_object_unref function. */
static ESource *
-search_known_sources (ECalSourceType type, gboolean (*check_func)(ESource *source, gpointer user_data), gpointer user_data, ESourceList **sources, GError **error)
+search_known_sources (ECalSourceType type,
+ gboolean (*check_func) (ESource *source,
+ gpointer user_data),
+ gpointer user_data,
+ ESourceList **sources,
+ GError **error)
{
ESource *res = NULL;
GSList *g;
@@ -1245,7 +1287,8 @@ search_known_sources (ECalSourceType type, gboolean (*check_func)(ESource *sourc
}
static gboolean
-check_uri (ESource *source, gpointer uri)
+check_uri (ESource *source,
+ gpointer uri)
{
const gchar *suri;
@@ -1280,7 +1323,8 @@ check_uri (ESource *source, gpointer uri)
* Deprecated: 3.2: Use e_cal_client_new_from_uri() instead.
**/
ECal *
-e_cal_new_from_uri (const gchar *uri, ECalSourceType type)
+e_cal_new_from_uri (const gchar *uri,
+ ECalSourceType type)
{
ESourceList *sources = NULL;
ESource *source;
@@ -1432,7 +1476,9 @@ e_cal_new_system_memos (void)
* Deprecated: 3.2: Use EClient::authenticate() signal on an #ECalClient instead.
*/
void
-e_cal_set_auth_func (ECal *ecal, ECalAuthFunc func, gpointer data)
+e_cal_set_auth_func (ECal *ecal,
+ ECalAuthFunc func,
+ gpointer data)
{
g_return_if_fail (ecal != NULL);
g_return_if_fail (E_IS_CAL (ecal));
@@ -1442,7 +1488,8 @@ e_cal_set_auth_func (ECal *ecal, ECalAuthFunc func, gpointer data)
}
static void
-async_open_report_result (ECal *ecal, const GError *error)
+async_open_report_result (ECal *ecal,
+ const GError *error)
{
ECalendarStatus status;
@@ -1485,7 +1532,9 @@ reschedule_authenticate_cb (gpointer user_data)
}
static void
-async_open_ready_cb (GDBusProxy *gdbus_cal, GAsyncResult *res, ECal *ecal)
+async_open_ready_cb (GDBusProxy *gdbus_cal,
+ GAsyncResult *res,
+ ECal *ecal)
{
GError *error = NULL;
@@ -1508,9 +1557,12 @@ async_open_ready_cb (GDBusProxy *gdbus_cal, GAsyncResult *res, ECal *ecal)
}
static gboolean
-open_calendar (ECal *ecal, gboolean only_if_exists, GError **error,
- ECalendarStatus *status,
- gboolean needs_auth, gboolean async)
+open_calendar (ECal *ecal,
+ gboolean only_if_exists,
+ GError **error,
+ ECalendarStatus *status,
+ gboolean needs_auth,
+ gboolean async)
{
ECalPrivate *priv;
@@ -1586,7 +1638,9 @@ open_calendar (ECal *ecal, gboolean only_if_exists, GError **error,
* Deprecated: 3.2: Use e_client_open_sync() on an #ECalClient object instead.
**/
gboolean
-e_cal_open (ECal *ecal, gboolean only_if_exists, GError **error)
+e_cal_open (ECal *ecal,
+ gboolean only_if_exists,
+ GError **error)
{
ECalendarStatus status;
GError *err = NULL;
@@ -1630,7 +1684,8 @@ idle_async_error_reply_cb (gpointer user_data)
/* takes ownership of error */
static void
-async_report_idle (ECal *ecal, GError *error)
+async_report_idle (ECal *ecal,
+ GError *error)
{
struct idle_async_error_reply_data *data;
@@ -1664,7 +1719,8 @@ async_report_idle (ECal *ecal, GError *error)
* on an #ECalClient object instead.
**/
void
-e_cal_open_async (ECal *ecal, gboolean only_if_exists)
+e_cal_open_async (ECal *ecal,
+ gboolean only_if_exists)
{
ECalPrivate *priv;
GError *error = NULL;
@@ -1710,7 +1766,8 @@ e_cal_open_async (ECal *ecal, gboolean only_if_exists)
* Deprecated: 3.2: Use e_cal_client_refresh_sync() instead.
**/
gboolean
-e_cal_refresh (ECal *ecal, GError **error)
+e_cal_refresh (ECal *ecal,
+ GError **error)
{
ECalPrivate *priv;
@@ -1737,7 +1794,8 @@ e_cal_refresh (ECal *ecal, GError **error)
* Deprecated: 3.2: Use e_client_remove_sync() on an #ECalClient object instead.
*/
gboolean
-e_cal_remove (ECal *ecal, GError **error)
+e_cal_remove (ECal *ecal,
+ GError **error)
{
ECalPrivate *priv;
@@ -1779,7 +1837,8 @@ build_uri_list (GNOME_Evolution_Calendar_StringSeq *seq)
* Deprecated: 3.2: This function has been dropped completely.
*/
GList *
-e_cal_uri_list (ECal *ecal, CalMode mode)
+e_cal_uri_list (ECal *ecal,
+ CalMode mode)
{
#if 0
ECalPrivate *priv;
@@ -1956,7 +2015,9 @@ e_cal_get_local_attachment_store (ECal *ecal)
* Deprecated: 3.2: Use e_cal_client_is_readonly() on an #ECalClient object instead.
*/
gboolean
-e_cal_is_read_only (ECal *ecal, gboolean *read_only, GError **error)
+e_cal_is_read_only (ECal *ecal,
+ gboolean *read_only,
+ GError **error)
{
ECalPrivate *priv;
@@ -1984,7 +2045,9 @@ e_cal_is_read_only (ECal *ecal, gboolean *read_only, GError **error)
* with #CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS instead.
**/
gboolean
-e_cal_get_cal_address (ECal *ecal, gchar **cal_address, GError **error)
+e_cal_get_cal_address (ECal *ecal,
+ gchar **cal_address,
+ GError **error)
{
ECalPrivate *priv;
@@ -2029,7 +2092,9 @@ e_cal_get_cal_address (ECal *ecal, gchar **cal_address, GError **error)
* with #CAL_BACKEND_PROPERTY_ALARM_EMAIL_ADDRESS instead.
*/
gboolean
-e_cal_get_alarm_email_address (ECal *ecal, gchar **alarm_address, GError **error)
+e_cal_get_alarm_email_address (ECal *ecal,
+ gchar **alarm_address,
+ GError **error)
{
ECalPrivate *priv;
@@ -2064,7 +2129,9 @@ e_cal_get_alarm_email_address (ECal *ecal, gchar **alarm_address, GError **error
* Deprecated: 3.2: This function has been dropped completely.
*/
gboolean
-e_cal_get_ldap_attribute (ECal *ecal, gchar **ldap_attribute, GError **error)
+e_cal_get_ldap_attribute (ECal *ecal,
+ gchar **ldap_attribute,
+ GError **error)
{
ECalPrivate *priv;
@@ -2078,7 +2145,8 @@ e_cal_get_ldap_attribute (ECal *ecal, gchar **ldap_attribute, GError **error)
}
static gboolean
-load_capabilities (ECal *ecal, GError **error)
+load_capabilities (ECal *ecal,
+ GError **error)
{
ECalPrivate *priv;
@@ -2107,7 +2175,8 @@ load_capabilities (ECal *ecal, GError **error)
}
static gboolean
-check_capability (ECal *ecal, const gchar *cap)
+check_capability (ECal *ecal,
+ const gchar *cap)
{
ECalPrivate *priv;
@@ -2192,7 +2261,8 @@ e_cal_get_recurrences_no_master (ECal *ecal)
* Deprecated: 3.2: Use e_client_check_capability() on an #ECalClient object instead.
*/
gboolean
-e_cal_get_static_capability (ECal *ecal, const gchar *cap)
+e_cal_get_static_capability (ECal *ecal,
+ const gchar *cap)
{
g_return_val_if_fail (ecal != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL (ecal), FALSE);
@@ -2273,7 +2343,8 @@ e_cal_get_refresh_supported (ECal *ecal)
* Deprecated: 3.2: This function has been dropped completely.
*/
gboolean
-e_cal_set_mode (ECal *ecal, CalMode mode)
+e_cal_set_mode (ECal *ecal,
+ CalMode mode)
{
ECalPrivate *priv;
@@ -2291,13 +2362,13 @@ e_cal_set_mode (ECal *ecal, CalMode mode)
}
/* This is used in the callback which fetches all the timezones needed for an
- object. */
+ * object. */
typedef struct _ECalGetTimezonesData ECalGetTimezonesData;
struct _ECalGetTimezonesData {
ECal *ecal;
/* This starts out at E_CALENDAR_STATUS_OK. If an error occurs this
- contains the last error. */
+ * contains the last error. */
ECalendarStatus status;
};
@@ -2315,7 +2386,9 @@ struct _ECalGetTimezonesData {
* Deprecated: 3.2: Use e_cal_client_get_default_object_sync() instead.
*/
gboolean
-e_cal_get_default_object (ECal *ecal, icalcomponent **icalcomp, GError **error)
+e_cal_get_default_object (ECal *ecal,
+ icalcomponent **icalcomp,
+ GError **error)
{
ECalPrivate *priv;
ECalendarStatus status;
@@ -2367,7 +2440,11 @@ e_cal_get_default_object (ECal *ecal, icalcomponent **icalcomp, GError **error)
* Deprecated: 3.2: Use e_cal_client_get_attachment_uris_sync() instead.
**/
gboolean
-e_cal_get_attachments_for_comp (ECal *ecal, const gchar *uid, const gchar *rid, GSList **list, GError **error)
+e_cal_get_attachments_for_comp (ECal *ecal,
+ const gchar *uid,
+ const gchar *rid,
+ GSList **list,
+ GError **error)
{
ECalPrivate *priv;
ECalendarStatus status;
@@ -2423,7 +2500,11 @@ e_cal_get_attachments_for_comp (ECal *ecal, const gchar *uid, const gchar *rid,
* Deprecated: 3.2: Use e_cal_client_get_object_sync() instead.
**/
gboolean
-e_cal_get_object (ECal *ecal, const gchar *uid, const gchar *rid, icalcomponent **icalcomp, GError **error)
+e_cal_get_object (ECal *ecal,
+ const gchar *uid,
+ const gchar *rid,
+ icalcomponent **icalcomp,
+ GError **error)
{
ECalPrivate *priv;
ECalendarStatus status;
@@ -2509,7 +2590,10 @@ e_cal_get_object (ECal *ecal, const gchar *uid, const gchar *rid, icalcomponent
* Deprecated: 3.2: Use e_cal_client_get_objects_for_uid_sync() instead.
**/
gboolean
-e_cal_get_objects_for_uid (ECal *ecal, const gchar *uid, GList **objects, GError **error)
+e_cal_get_objects_for_uid (ECal *ecal,
+ const gchar *uid,
+ GList **objects,
+ GError **error)
{
ECalPrivate *priv;
ECalendarStatus status;
@@ -2601,8 +2685,9 @@ e_cal_get_objects_for_uid (ECal *ecal, const gchar *uid, GList **objects, GError
*
* Deprecated: 3.2: Use e_cal_client_resolve_tzid_cb() instead.
*/
-icaltimezone*
-e_cal_resolve_tzid_cb (const gchar *tzid, gpointer data)
+icaltimezone *
+e_cal_resolve_tzid_cb (const gchar *tzid,
+ gpointer data)
{
ECal *ecal;
icaltimezone *zone = NULL;
@@ -2634,7 +2719,10 @@ e_cal_resolve_tzid_cb (const gchar *tzid, gpointer data)
* Deprecated: 3.2: This function has been dropped completely.
*/
gboolean
-e_cal_get_changes (ECal *ecal, const gchar *change_id, GList **changes, GError **error)
+e_cal_get_changes (ECal *ecal,
+ const gchar *change_id,
+ GList **changes,
+ GError **error)
{
ECalPrivate *priv;
@@ -2692,7 +2780,10 @@ e_cal_free_change_list (GList *list)
* Deprecated: 3.2: Use e_cal_client_get_object_list_sync() instead.
**/
gboolean
-e_cal_get_object_list (ECal *ecal, const gchar *query, GList **objects, GError **error)
+e_cal_get_object_list (ECal *ecal,
+ const gchar *query,
+ GList **objects,
+ GError **error)
{
ECalPrivate *priv;
gchar **object_array = NULL, *gdbus_query = NULL;
@@ -2749,7 +2840,10 @@ e_cal_get_object_list (ECal *ecal, const gchar *query, GList **objects, GError *
* Deprecated: 3.2: Use e_cal_client_get_object_list_as_comps_sync() instead.
*/
gboolean
-e_cal_get_object_list_as_comp (ECal *ecal, const gchar *query, GList **objects, GError **error)
+e_cal_get_object_list_as_comp (ECal *ecal,
+ const gchar *query,
+ GList **objects,
+ GError **error)
{
GList *ical_objects = NULL;
GList *l;
@@ -2811,8 +2905,12 @@ e_cal_free_object_list (GList *objects)
* Deprecated: 3.2: Use e_cal_client_get_free_busy_sync() instead.
*/
gboolean
-e_cal_get_free_busy (ECal *ecal, GList *users, time_t start, time_t end,
- GList **freebusy, GError **error)
+e_cal_get_free_busy (ECal *ecal,
+ GList *users,
+ time_t start,
+ time_t end,
+ GList **freebusy,
+ GError **error)
{
ECalPrivate *priv;
gchar **strv;
@@ -2872,7 +2970,10 @@ struct instances_info {
/* Called from cal_recur_generate_instances(); adds an instance to the list */
static gboolean
-add_instance (ECalComponent *comp, time_t start, time_t end, gpointer data)
+add_instance (ECalComponent *comp,
+ time_t start,
+ time_t end,
+ gpointer data)
{
GList **list;
struct comp_instance *ci;
@@ -2935,7 +3036,8 @@ add_instance (ECalComponent *comp, time_t start, time_t end, gpointer data)
/* Used from g_list_sort(); compares two struct comp_instance structures */
static gint
-compare_comp_instance (gconstpointer a, gconstpointer b)
+compare_comp_instance (gconstpointer a,
+ gconstpointer b)
{
const struct comp_instance *cia, *cib;
time_t diff;
@@ -2948,7 +3050,8 @@ compare_comp_instance (gconstpointer a, gconstpointer b)
}
static GList *
-process_detached_instances (GList *instances, GList *detached_instances)
+process_detached_instances (GList *instances,
+ GList *detached_instances)
{
struct comp_instance *ci, *cid;
GList *dl, *unprocessed_instances = NULL;
@@ -3051,8 +3154,12 @@ process_detached_instances (GList *instances, GList *detached_instances)
}
static void
-generate_instances (ECal *ecal, time_t start, time_t end, const gchar *uid,
- ECalRecurInstanceFn cb, gpointer cb_data)
+generate_instances (ECal *ecal,
+ time_t start,
+ time_t end,
+ const gchar *uid,
+ ECalRecurInstanceFn cb,
+ gpointer cb_data)
{
GList *objects = NULL;
GList *instances, *detached_instances = NULL;
@@ -3131,10 +3238,10 @@ try_again:
e_cal_component_get_dtend (comp, &dtend);
/* For DATE-TIME values with a TZID, we use
- e_cal_resolve_tzid_cb to resolve the TZID.
- For DATE values and DATE-TIME values without a
- TZID (i.e. floating times) we use the default
- timezone. */
+ * e_cal_resolve_tzid_cb to resolve the TZID.
+ * For DATE values and DATE-TIME values without a
+ * TZID (i.e. floating times) we use the default
+ * timezone. */
if (dtstart.tzid && !dtstart.value->is_date) {
start_zone = e_cal_resolve_tzid_cb (dtstart.tzid, ecal);
if (!start_zone)
@@ -3257,8 +3364,11 @@ try_again:
* Deprecated: 3.2: Use e_cal_client_generate_instances() instead.
**/
void
-e_cal_generate_instances (ECal *ecal, time_t start, time_t end,
- ECalRecurInstanceFn cb, gpointer cb_data)
+e_cal_generate_instances (ECal *ecal,
+ time_t start,
+ time_t end,
+ ECalRecurInstanceFn cb,
+ gpointer cb_data)
{
ECalPrivate *priv;
@@ -3295,9 +3405,12 @@ e_cal_generate_instances (ECal *ecal, time_t start, time_t end,
* Deprecated: 3.2: Use e_cal_client_generate_instances_for_object() instead.
**/
void
-e_cal_generate_instances_for_object (ECal *ecal, icalcomponent *icalcomp,
- time_t start, time_t end,
- ECalRecurInstanceFn cb, gpointer cb_data)
+e_cal_generate_instances_for_object (ECal *ecal,
+ icalcomponent *icalcomp,
+ time_t start,
+ time_t end,
+ ECalRecurInstanceFn cb,
+ gpointer cb_data)
{
ECalComponent *comp;
const gchar *uid;
@@ -3383,7 +3496,10 @@ e_cal_generate_instances_for_object (ECal *ecal, icalcomponent *icalcomp,
/* Builds a list of ECalComponentAlarms structures */
static GSList *
-build_component_alarms_list (ECal *ecal, GList *object_list, time_t start, time_t end)
+build_component_alarms_list (ECal *ecal,
+ GList *object_list,
+ time_t start,
+ time_t end)
{
GSList *comp_alarms;
GList *l;
@@ -3427,7 +3543,9 @@ build_component_alarms_list (ECal *ecal, GList *object_list, time_t start, time_
* Deprecated: 3.2: This function has been dropped completely.
**/
GSList *
-e_cal_get_alarms_in_range (ECal *ecal, time_t start, time_t end)
+e_cal_get_alarms_in_range (ECal *ecal,
+ time_t start,
+ time_t end)
{
ECalPrivate *priv;
GSList *alarms;
@@ -3519,9 +3637,11 @@ e_cal_free_alarms (GSList *comp_alarms)
* Deprecated: 3.2: This function has been dropped completely.
**/
gboolean
-e_cal_get_alarms_for_object (ECal *ecal, const ECalComponentId *id,
- time_t start, time_t end,
- ECalComponentAlarms **alarms)
+e_cal_get_alarms_for_object (ECal *ecal,
+ const ECalComponentId *id,
+ time_t start,
+ time_t end,
+ ECalComponentAlarms **alarms)
{
ECalPrivate *priv;
icalcomponent *icalcomp;
@@ -3578,7 +3698,10 @@ e_cal_get_alarms_for_object (ECal *ecal, const ECalComponentId *id,
* Deprecated: 3.2: Use e_cal_client_discard_alarm_sync() instead.
*/
gboolean
-e_cal_discard_alarm (ECal *ecal, ECalComponent *comp, const gchar *auid, GError **error)
+e_cal_discard_alarm (ECal *ecal,
+ ECalComponent *comp,
+ const gchar *auid,
+ GError **error)
{
ECalPrivate *priv;
@@ -3606,9 +3729,10 @@ struct _ForeachTZIDCallbackData {
};
/* This adds the VTIMEZONE given by the TZID parameter to the GHashTable in
- data. */
+ * data. */
static void
-foreach_tzid_callback (icalparameter *param, gpointer cbdata)
+foreach_tzid_callback (icalparameter *param,
+ gpointer cbdata)
{
ForeachTZIDCallbackData *data = cbdata;
ECalPrivate *priv;
@@ -3635,7 +3759,7 @@ foreach_tzid_callback (icalparameter *param, gpointer cbdata)
}
} else {
/* Check if it is in our cache. If it is, it must already be
- on the server so return. */
+ * on the server so return. */
if (g_hash_table_lookup (priv->timezones, tzid))
return;
@@ -3658,7 +3782,9 @@ foreach_tzid_callback (icalparameter *param, gpointer cbdata)
/* This appends the value string to the GString given in data. */
static void
-append_timezone_string (gpointer key, gpointer value, gpointer data)
+append_timezone_string (gpointer key,
+ gpointer value,
+ gpointer data)
{
GString *vcal_string = data;
@@ -3668,26 +3794,28 @@ append_timezone_string (gpointer key, gpointer value, gpointer data)
/* This simply frees the hash values. */
static void
-free_timezone_string (gpointer key, gpointer value, gpointer data)
+free_timezone_string (gpointer key,
+ gpointer value,
+ gpointer data)
{
g_free (value);
}
/* This converts the VEVENT/VTODO to a string. If include_all_timezones is
- TRUE, it includes all the VTIMEZONE components needed for the VEVENT/VTODO.
- If not, it only includes builtin timezones that may not be on the server.
-
- To do that we check every TZID in the component to see if it is a builtin
- timezone. If it is, we see if it it in our cache. If it is in our cache,
- then we know the server already has it and we don't need to send it.
- If it isn't in our cache, then we need to send it to the server.
- If we need to send any timezones to the server, then we have to create a
- complete VCALENDAR object, otherwise we can just send a single VEVENT/VTODO
- as before. */
+ * TRUE, it includes all the VTIMEZONE components needed for the VEVENT/VTODO.
+ * If not, it only includes builtin timezones that may not be on the server.
+ *
+ * To do that we check every TZID in the component to see if it is a builtin
+ * timezone. If it is, we see if it it in our cache. If it is in our cache,
+ * then we know the server already has it and we don't need to send it.
+ * If it isn't in our cache, then we need to send it to the server.
+ * If we need to send any timezones to the server, then we have to create a
+ * complete VCALENDAR object, otherwise we can just send a single VEVENT/VTODO
+ * as before. */
static gchar *
e_cal_get_component_as_string_internal (ECal *ecal,
- icalcomponent *icalcomp,
- gboolean include_all_timezones)
+ icalcomponent *icalcomp,
+ gboolean include_all_timezones)
{
GHashTable *timezone_hash;
GString *vcal_string;
@@ -3698,7 +3826,7 @@ e_cal_get_component_as_string_internal (ECal *ecal,
timezone_hash = g_hash_table_new (g_str_hash, g_str_equal);
/* Add any timezones needed to the hash. We use a hash since we only
- want to add each timezone once at most. */
+ * want to add each timezone once at most. */
cbdata.ecal = ecal;
cbdata.timezone_hash = timezone_hash;
cbdata.include_all_timezones = include_all_timezones;
@@ -3711,7 +3839,7 @@ e_cal_get_component_as_string_internal (ECal *ecal,
}
/* Create the start of a VCALENDAR, to add the VTIMEZONES to,
- and remember its length so we know if any VTIMEZONEs get added. */
+ * and remember its length so we know if any VTIMEZONEs get added. */
vcal_string = g_string_new (NULL);
g_string_append (vcal_string,
"BEGIN:VCALENDAR\n"
@@ -3721,7 +3849,7 @@ e_cal_get_component_as_string_internal (ECal *ecal,
initial_vcal_string_len = vcal_string->len;
/* Now concatenate all the timezone strings. This also frees the
- timezone strings as it goes. */
+ * timezone strings as it goes. */
g_hash_table_foreach (timezone_hash, append_timezone_string,
vcal_string);
@@ -3729,7 +3857,7 @@ e_cal_get_component_as_string_internal (ECal *ecal,
obj_string = icalcomponent_as_ical_string_r (icalcomp);
/* If there were any timezones to send, create a complete VCALENDAR,
- else just send the VEVENT/VTODO string. */
+ * else just send the VEVENT / VTODO string. */
if (!include_all_timezones
&& vcal_string->len == initial_vcal_string_len) {
g_string_free (vcal_string, TRUE);
@@ -3760,7 +3888,8 @@ e_cal_get_component_as_string_internal (ECal *ecal,
* Deprecated: 3.2: Use e_cal_client_get_component_as_string() instead.
**/
gchar *
-e_cal_get_component_as_string (ECal *ecal, icalcomponent *icalcomp)
+e_cal_get_component_as_string (ECal *ecal,
+ icalcomponent *icalcomp)
{
return e_cal_get_component_as_string_internal (ecal, icalcomp, TRUE);
}
@@ -3781,7 +3910,10 @@ e_cal_get_component_as_string (ECal *ecal, icalcomponent *icalcomp)
* Deprecated: 3.2: Use e_cal_client_create_object_sync() instead.
*/
gboolean
-e_cal_create_object (ECal *ecal, icalcomponent *icalcomp, gchar **uid, GError **error)
+e_cal_create_object (ECal *ecal,
+ icalcomponent *icalcomp,
+ gchar **uid,
+ GError **error)
{
ECalPrivate *priv;
gchar *obj, *muid = NULL, *gdbus_obj = NULL;
@@ -3841,7 +3973,10 @@ e_cal_create_object (ECal *ecal, icalcomponent *icalcomp, gchar **uid, GError **
* Deprecated: 3.2: Use e_cal_client_modify_object_sync() instead.
*/
gboolean
-e_cal_modify_object (ECal *ecal, icalcomponent *icalcomp, CalObjModType mod, GError **error)
+e_cal_modify_object (ECal *ecal,
+ icalcomponent *icalcomp,
+ CalObjModType mod,
+ GError **error)
{
ECalPrivate *priv;
gchar *obj, **strv;
@@ -3928,8 +4063,11 @@ e_cal_modify_object (ECal *ecal, icalcomponent *icalcomp, CalObjModType mod, GEr
* Deprecated: 3.2: Use e_cal_client_remove_object_sync() instead.
*/
gboolean
-e_cal_remove_object_with_mod (ECal *ecal, const gchar *uid,
- const gchar *rid, CalObjModType mod, GError **error)
+e_cal_remove_object_with_mod (ECal *ecal,
+ const gchar *uid,
+ const gchar *rid,
+ CalObjModType mod,
+ GError **error)
{
ECalPrivate *priv;
gchar **strv;
@@ -3981,7 +4119,9 @@ e_cal_remove_object_with_mod (ECal *ecal, const gchar *uid,
* Deprecated: 3.2: Use e_cal_client_remove_object_sync() instead, with rid set to NULL and mod set to CALOBJ_MOD_ALL.
**/
gboolean
-e_cal_remove_object (ECal *ecal, const gchar *uid, GError **error)
+e_cal_remove_object (ECal *ecal,
+ const gchar *uid,
+ GError **error)
{
e_return_error_if_fail (ecal && E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (uid, E_CALENDAR_STATUS_INVALID_ARG);
@@ -4004,7 +4144,9 @@ e_cal_remove_object (ECal *ecal, const gchar *uid, GError **error)
* Deprecated: 3.2: Use e_cal_client_receive_objects_sync() instead.
*/
gboolean
-e_cal_receive_objects (ECal *ecal, icalcomponent *icalcomp, GError **error)
+e_cal_receive_objects (ECal *ecal,
+ icalcomponent *icalcomp,
+ GError **error)
{
ECalPrivate *priv;
gchar *obj, *gdbus_obj = NULL;
@@ -4050,7 +4192,11 @@ e_cal_receive_objects (ECal *ecal, icalcomponent *icalcomp, GError **error)
* Deprecated: 3.2: Use e_cal_client_send_objects_sync() instead.
*/
gboolean
-e_cal_send_objects (ECal *ecal, icalcomponent *icalcomp, GList **users, icalcomponent **modified_icalcomp, GError **error)
+e_cal_send_objects (ECal *ecal,
+ icalcomponent *icalcomp,
+ GList **users,
+ icalcomponent **modified_icalcomp,
+ GError **error)
{
ECalPrivate *priv;
ECalendarStatus status;
@@ -4121,7 +4267,10 @@ e_cal_send_objects (ECal *ecal, icalcomponent *icalcomp, GList **users, icalcomp
* Deprecated: 3.2: Use e_cal_client_get_timezone_sync() instead.
*/
gboolean
-e_cal_get_timezone (ECal *ecal, const gchar *tzid, icaltimezone **zone, GError **error)
+e_cal_get_timezone (ECal *ecal,
+ const gchar *tzid,
+ icaltimezone **zone,
+ GError **error)
{
ECalPrivate *priv;
ECalendarStatus status = E_CALENDAR_STATUS_OK;
@@ -4244,7 +4393,9 @@ e_cal_get_timezone (ECal *ecal, const gchar *tzid, icaltimezone **zone, GError *
* Deprecated: 3.2: Use e_cal_client_add_timezone_sync() instead.
*/
gboolean
-e_cal_add_timezone (ECal *ecal, icaltimezone *izone, GError **error)
+e_cal_add_timezone (ECal *ecal,
+ icaltimezone *izone,
+ GError **error)
{
ECalPrivate *priv;
gchar *tzobj, *gdbus_tzobj = NULL;
@@ -4302,7 +4453,10 @@ e_cal_add_timezone (ECal *ecal, icaltimezone *izone, GError **error)
* Deprecated: 3.2: Use e_cal_client_get_view_sync() instead.
**/
gboolean
-e_cal_get_query (ECal *ecal, const gchar *sexp, ECalView **query, GError **error)
+e_cal_get_query (ECal *ecal,
+ const gchar *sexp,
+ ECalView **query,
+ GError **error)
{
ECalPrivate *priv;
ECalendarStatus status;
@@ -4364,7 +4518,9 @@ e_cal_get_query (ECal *ecal, const gchar *sexp, ECalView **query, GError **error
* Deprecated: 3.2: Use e_cal_client_set_default_timezone() instead.
*/
gboolean
-e_cal_set_default_timezone (ECal *ecal, icaltimezone *zone, GError **error)
+e_cal_set_default_timezone (ECal *ecal,
+ icaltimezone *zone,
+ GError **error)
{
ECalPrivate *priv;
@@ -4531,7 +4687,8 @@ e_cal_open_default (ECal **ecal,
* Deprecated: 3.2: Use e_cal_client_set_default() instead.
*/
gboolean
-e_cal_set_default (ECal *ecal, GError **error)
+e_cal_set_default (ECal *ecal,
+ GError **error)
{
ESource *source;
ECalSourceType source_type;
@@ -4545,7 +4702,9 @@ e_cal_set_default (ECal *ecal, GError **error)
}
static gboolean
-set_default_source (ESourceList *sources, ESource *source, GError **error)
+set_default_source (ESourceList *sources,
+ ESource *source,
+ GError **error)
{
const gchar *uid;
GError *err = NULL;
@@ -4554,7 +4713,7 @@ set_default_source (ESourceList *sources, ESource *source, GError **error)
uid = e_source_peek_uid (source);
/* make sure the source is actually in the ESourceList. if
- it's not we don't bother adding it, just return an error */
+ * it's not we don't bother adding it, just return an error */
source = e_source_list_peek_source_by_uid (sources, uid);
if (!source) {
g_set_error_literal (error, E_CALENDAR_ERROR,
@@ -4565,7 +4724,7 @@ set_default_source (ESourceList *sources, ESource *source, GError **error)
}
/* loop over all the sources clearing out any "default"
- properties we find */
+ * properties we find */
for (g = e_source_list_peek_groups (sources); g; g = g->next) {
GSList *s;
for (s = e_source_group_peek_sources (E_SOURCE_GROUP (g->data));
@@ -4614,7 +4773,9 @@ e_cal_set_default_source (ESource *source,
}
static gboolean
-get_sources (ESourceList **sources, const gchar *key, GError **error)
+get_sources (ESourceList **sources,
+ const gchar *key,
+ GError **error)
{
GConfClient *gconf = gconf_client_get_default ();
@@ -4637,7 +4798,9 @@ get_sources (ESourceList **sources, const gchar *key, GError **error)
* Deprecated: 3.2: Use e_cal_client_get_sources() instead.
*/
gboolean
-e_cal_get_sources (ESourceList **sources, ECalSourceType type, GError **error)
+e_cal_get_sources (ESourceList **sources,
+ ECalSourceType type,
+ GError **error)
{
e_return_error_if_fail (sources != NULL, E_CALENDAR_STATUS_INVALID_ARG);
*sources = NULL;
diff --git a/calendar/libecal/e-cal.h b/calendar/libecal/e-cal.h
index 7908aae..3374240 100644
--- a/calendar/libecal/e-cal.h
+++ b/calendar/libecal/e-cal.h
@@ -195,9 +195,9 @@ gboolean e_cal_send_objects (ECal *ecal, icalcomponent *icalcomp, GList **users,
gboolean e_cal_get_timezone (ECal *ecal, const gchar *tzid, icaltimezone **zone, GError **error);
gboolean e_cal_add_timezone (ECal *ecal, icaltimezone *izone, GError **error);
/* Sets the default timezone to use to resolve DATE and floating DATE-TIME
- values. This will typically be from the user's timezone setting. Call this
- before using any other functions. It will pass the default timezone on to
- the server. Returns TRUE on success. */
+ * values. This will typically be from the user's timezone setting. Call this
+ * before using any other functions. It will pass the default timezone on to
+ * the server. Returns TRUE on success. */
gboolean e_cal_set_default_timezone (ECal *ecal, icaltimezone *zone, GError **error);
gboolean e_cal_get_query (ECal *ecal, const gchar *sexp, ECalView **query, GError **error);
@@ -206,7 +206,7 @@ gboolean e_cal_get_query (ECal *ecal, const gchar *sexp, ECalView **query, GErro
icaltimezone *e_cal_resolve_tzid_cb (const gchar *tzid, gpointer data);
/* Returns a complete VCALENDAR for a VEVENT/VTODO including all VTIMEZONEs
- used by the component. It also includes a 'METHOD:PUBLISH' property. */
+ * used by the component. It also includes a 'METHOD:PUBLISH' property. */
gchar * e_cal_get_component_as_string (ECal *ecal, icalcomponent *icalcomp);
const gchar * e_cal_get_error_message (ECalendarStatus status);
diff --git a/calendar/libedata-cal/e-cal-backend-cache.c b/calendar/libedata-cal/e-cal-backend-cache.c
index 6a02388..afd3d25 100644
--- a/calendar/libedata-cal/e-cal-backend-cache.c
+++ b/calendar/libedata-cal/e-cal-backend-cache.c
@@ -96,7 +96,8 @@ e_cal_backend_cache_new (const gchar *filename)
}
static gchar *
-get_key (const gchar *uid, const gchar *rid)
+get_key (const gchar *uid,
+ const gchar *rid)
{
GString *real_key;
gchar *retval;
@@ -126,7 +127,9 @@ get_key (const gchar *uid, const gchar *rid)
* or %NULL if it was not found in the cache.
*/
ECalComponent *
-e_cal_backend_cache_get_component (ECalBackendCache *cache, const gchar *uid, const gchar *rid)
+e_cal_backend_cache_get_component (ECalBackendCache *cache,
+ const gchar *uid,
+ const gchar *rid)
{
gchar *real_key;
const gchar *comp_str;
@@ -170,7 +173,7 @@ e_cal_backend_cache_get_component (ECalBackendCache *cache, const gchar *uid, co
*/
gboolean
e_cal_backend_cache_put_component (ECalBackendCache *cache,
- ECalComponent *comp)
+ ECalComponent *comp)
{
gchar *real_key, *uid, *comp_str;
gchar *rid;
@@ -213,8 +216,8 @@ e_cal_backend_cache_put_component (ECalBackendCache *cache,
*/
gboolean
e_cal_backend_cache_remove_component (ECalBackendCache *cache,
- const gchar *uid,
- const gchar *rid)
+ const gchar *uid,
+ const gchar *rid)
{
gchar *real_key;
gboolean retval;
@@ -293,7 +296,8 @@ e_cal_backend_cache_get_components (ECalBackendCache *cache)
* Returns: The list of calendar components if found, or NULL otherwise.
*/
GSList *
-e_cal_backend_cache_get_components_by_uid (ECalBackendCache *cache, const gchar *uid)
+e_cal_backend_cache_get_components_by_uid (ECalBackendCache *cache,
+ const gchar *uid)
{
gchar *comp_str;
GSList *l;
@@ -342,7 +346,8 @@ e_cal_backend_cache_get_components_by_uid (ECalBackendCache *cache, const gchar
* Returns: The timezone if found, or NULL otherwise.
*/
const icaltimezone *
-e_cal_backend_cache_get_timezone (ECalBackendCache *cache, const gchar *tzid)
+e_cal_backend_cache_get_timezone (ECalBackendCache *cache,
+ const gchar *tzid)
{
icaltimezone *zone;
const gchar *comp_str;
@@ -390,7 +395,8 @@ e_cal_backend_cache_get_timezone (ECalBackendCache *cache, const gchar *tzid)
* Returns: TRUE if the timezone was put on the cache, FALSE otherwise.
*/
gboolean
-e_cal_backend_cache_put_timezone (ECalBackendCache *cache, const icaltimezone *zone)
+e_cal_backend_cache_put_timezone (ECalBackendCache *cache,
+ const icaltimezone *zone)
{
ECalBackendCachePrivate *priv;
icaltimezone *new_zone;
@@ -441,7 +447,8 @@ e_cal_backend_cache_put_timezone (ECalBackendCache *cache, const icaltimezone *z
* Returns: TRUE if the operation was successful, FALSE otherwise.
*/
gboolean
-e_cal_backend_cache_put_default_timezone (ECalBackendCache *cache, icaltimezone *default_zone)
+e_cal_backend_cache_put_default_timezone (ECalBackendCache *cache,
+ icaltimezone *default_zone)
{
icalcomponent *icalcomp;
gboolean retval;
@@ -519,7 +526,8 @@ e_cal_backend_cache_get_default_timezone (ECalBackendCache *cache)
* Returns: TRUE if the timezone was removed, FALSE otherwise.
*/
gboolean
-e_cal_backend_cache_remove_timezone (ECalBackendCache *cache, const gchar *tzid)
+e_cal_backend_cache_remove_timezone (ECalBackendCache *cache,
+ const gchar *tzid)
{
ECalBackendCachePrivate *priv;
@@ -589,7 +597,8 @@ e_cal_backend_cache_get_marker (ECalBackendCache *cache)
* Returns: TRUE if the operation was successful, FALSE otherwise.
*/
gboolean
-e_cal_backend_cache_put_server_utc_time (ECalBackendCache *cache, const gchar *utc_str)
+e_cal_backend_cache_put_server_utc_time (ECalBackendCache *cache,
+ const gchar *utc_str)
{
gboolean ret_val = FALSE;
@@ -633,7 +642,9 @@ get_keys_key (const gchar *key)
* Returns: TRUE if the operation was successful, FALSE otherwise.
*/
gboolean
-e_cal_backend_cache_put_key_value (ECalBackendCache *cache, const gchar *key, const gchar *value)
+e_cal_backend_cache_put_key_value (ECalBackendCache *cache,
+ const gchar *key,
+ const gchar *value)
{
gchar *real_key;
gboolean ret_val = FALSE;
@@ -662,7 +673,8 @@ e_cal_backend_cache_put_key_value (ECalBackendCache *cache, const gchar *key, co
* Returns: The value.
*/
const gchar *
-e_cal_backend_cache_get_key_value (ECalBackendCache *cache, const gchar *key)
+e_cal_backend_cache_get_key_value (ECalBackendCache *cache,
+ const gchar *key)
{
gchar *real_key;
const gchar *value;
diff --git a/calendar/libedata-cal/e-cal-backend-factory.c b/calendar/libedata-cal/e-cal-backend-factory.c
index b34b139..75f3fc4 100644
--- a/calendar/libedata-cal/e-cal-backend-factory.c
+++ b/calendar/libedata-cal/e-cal-backend-factory.c
@@ -38,7 +38,7 @@ e_cal_backend_factory_class_init (ECalBackendFactoryClass *klass)
icalcomponent_kind
e_cal_backend_factory_get_kind (ECalBackendFactory *factory)
{
- g_return_val_if_fail (E_IS_CAL_BACKEND_FACTORY (factory), 0/*XXX*/);
+ g_return_val_if_fail (E_IS_CAL_BACKEND_FACTORY (factory), 0/*XXX */);
return E_CAL_BACKEND_FACTORY_GET_CLASS (factory)->get_kind (factory);
}
@@ -68,8 +68,9 @@ e_cal_backend_factory_get_protocol (ECalBackendFactory *factory)
*
* Returns: The newly created backend, or NULL if there was an error.
*/
-ECalBackend*
-e_cal_backend_factory_new_backend (ECalBackendFactory *factory, ESource *source)
+ECalBackend *
+e_cal_backend_factory_new_backend (ECalBackendFactory *factory,
+ ESource *source)
{
g_return_val_if_fail (E_IS_CAL_BACKEND_FACTORY (factory), NULL);
diff --git a/calendar/libedata-cal/e-cal-backend-factory.h b/calendar/libedata-cal/e-cal-backend-factory.h
index 0d41da5..4c2b668 100644
--- a/calendar/libedata-cal/e-cal-backend-factory.h
+++ b/calendar/libedata-cal/e-cal-backend-factory.h
@@ -45,14 +45,14 @@ typedef struct {
icalcomponent_kind (*get_kind) (ECalBackendFactory *factory);
const gchar * (*get_protocol) (ECalBackendFactory *factory);
- ECalBackend* (*new_backend) (ECalBackendFactory *factory, ESource *source);
+ ECalBackend * (*new_backend) (ECalBackendFactory *factory, ESource *source);
} ECalBackendFactoryClass;
GType e_cal_backend_factory_get_type (void);
icalcomponent_kind e_cal_backend_factory_get_kind (ECalBackendFactory *factory);
const gchar * e_cal_backend_factory_get_protocol (ECalBackendFactory *factory);
-ECalBackend* e_cal_backend_factory_new_backend (ECalBackendFactory *factory, ESource *source);
+ECalBackend * e_cal_backend_factory_new_backend (ECalBackendFactory *factory, ESource *source);
G_END_DECLS
diff --git a/calendar/libedata-cal/e-cal-backend-file-store.c b/calendar/libedata-cal/e-cal-backend-file-store.c
index 4dcd8d3..da250b8 100644
--- a/calendar/libedata-cal/e-cal-backend-file-store.c
+++ b/calendar/libedata-cal/e-cal-backend-file-store.c
@@ -99,7 +99,8 @@ copy_timezone (icaltimezone *zone)
}
static gboolean
-put_component (ECalBackendFileStore *fstore, ECalComponent *comp)
+put_component (ECalBackendFileStore *fstore,
+ ECalComponent *comp)
{
ECalBackendFileStorePrivate *priv;
FullCompObject *obj = NULL;
@@ -140,7 +141,9 @@ put_component (ECalBackendFileStore *fstore, ECalComponent *comp)
}
static gboolean
-remove_component (ECalBackendFileStore *fstore, const gchar *uid, const gchar *rid)
+remove_component (ECalBackendFileStore *fstore,
+ const gchar *uid,
+ const gchar *rid)
{
ECalBackendFileStorePrivate *priv;
FullCompObject *obj = NULL;
@@ -176,7 +179,9 @@ end:
}
static ECalComponent *
-get_component (ECalBackendFileStore *fstore, const gchar *uid, const gchar *rid)
+get_component (ECalBackendFileStore *fstore,
+ const gchar *uid,
+ const gchar *rid)
{
ECalBackendFileStorePrivate *priv;
FullCompObject *obj = NULL;
@@ -204,7 +209,9 @@ end:
}
static ECalComponent *
-e_cal_backend_file_store_get_component (ECalBackendStore *store, const gchar *uid, const gchar *rid)
+e_cal_backend_file_store_get_component (ECalBackendStore *store,
+ const gchar *uid,
+ const gchar *rid)
{
ECalBackendFileStore *fstore = E_CAL_BACKEND_FILE_STORE (store);
@@ -212,7 +219,9 @@ e_cal_backend_file_store_get_component (ECalBackendStore *store, const gchar *ui
}
static gboolean
-e_cal_backend_file_store_has_component (ECalBackendStore *store, const gchar *uid, const gchar *rid)
+e_cal_backend_file_store_has_component (ECalBackendStore *store,
+ const gchar *uid,
+ const gchar *rid)
{
ECalBackendFileStore *fstore = E_CAL_BACKEND_FILE_STORE (store);
ECalBackendFileStorePrivate *priv;
@@ -242,7 +251,8 @@ end:
}
static gboolean
-e_cal_backend_file_store_put_component (ECalBackendStore *store, ECalComponent *comp)
+e_cal_backend_file_store_put_component (ECalBackendStore *store,
+ ECalComponent *comp)
{
ECalBackendFileStore *fstore = E_CAL_BACKEND_FILE_STORE (store);
ECalBackendFileStorePrivate *priv;
@@ -263,7 +273,9 @@ e_cal_backend_file_store_put_component (ECalBackendStore *store, ECalComponent *
}
static gboolean
-e_cal_backend_file_store_remove_component (ECalBackendStore *store, const gchar *uid, const gchar *rid)
+e_cal_backend_file_store_remove_component (ECalBackendStore *store,
+ const gchar *uid,
+ const gchar *rid)
{
ECalBackendFileStore *fstore = E_CAL_BACKEND_FILE_STORE (store);
ECalBackendFileStorePrivate *priv;
@@ -284,7 +296,8 @@ e_cal_backend_file_store_remove_component (ECalBackendStore *store, const gchar
}
static const icaltimezone *
-e_cal_backend_file_store_get_timezone (ECalBackendStore *store, const gchar *tzid)
+e_cal_backend_file_store_get_timezone (ECalBackendStore *store,
+ const gchar *tzid)
{
ECalBackendFileStore *fstore = E_CAL_BACKEND_FILE_STORE (store);
ECalBackendFileStorePrivate *priv;
@@ -300,7 +313,8 @@ e_cal_backend_file_store_get_timezone (ECalBackendStore *store, const gchar *tzi
}
static gboolean
-e_cal_backend_file_store_put_timezone (ECalBackendStore *store, const icaltimezone *zone)
+e_cal_backend_file_store_put_timezone (ECalBackendStore *store,
+ const icaltimezone *zone)
{
ECalBackendFileStore *fstore = E_CAL_BACKEND_FILE_STORE (store);
ECalBackendFileStorePrivate *priv;
@@ -325,7 +339,8 @@ e_cal_backend_file_store_put_timezone (ECalBackendStore *store, const icaltimezo
}
static gboolean
-e_cal_backend_file_store_remove_timezone (ECalBackendStore *store, const gchar *tzid)
+e_cal_backend_file_store_remove_timezone (ECalBackendStore *store,
+ const gchar *tzid)
{
ECalBackendFileStore *fstore = E_CAL_BACKEND_FILE_STORE (store);
ECalBackendFileStorePrivate *priv;
@@ -348,7 +363,8 @@ e_cal_backend_file_store_remove_timezone (ECalBackendStore *store, const gchar *
}
static const gchar *
-e_cal_backend_file_store_get_key_value (ECalBackendStore *store, const gchar *key)
+e_cal_backend_file_store_get_key_value (ECalBackendStore *store,
+ const gchar *key)
{
ECalBackendFileStore *fstore = E_CAL_BACKEND_FILE_STORE (store);
ECalBackendFileStorePrivate *priv;
@@ -364,7 +380,9 @@ e_cal_backend_file_store_get_key_value (ECalBackendStore *store, const gchar *ke
}
static gboolean
-e_cal_backend_file_store_put_key_value (ECalBackendStore *store, const gchar *key, const gchar *value)
+e_cal_backend_file_store_put_key_value (ECalBackendStore *store,
+ const gchar *key,
+ const gchar *value)
{
ECalBackendFileStore *fstore = E_CAL_BACKEND_FILE_STORE (store);
ECalBackendFileStorePrivate *priv;
@@ -410,7 +428,8 @@ e_cal_backend_file_store_get_default_timezone (ECalBackendStore *store)
}
static gboolean
-e_cal_backend_file_store_set_default_timezone (ECalBackendStore *store, const icaltimezone *zone)
+e_cal_backend_file_store_set_default_timezone (ECalBackendStore *store,
+ const icaltimezone *zone)
{
ECalBackendFileStore *fstore = E_CAL_BACKEND_FILE_STORE (store);
ECalBackendFileStorePrivate *priv;
@@ -422,7 +441,7 @@ e_cal_backend_file_store_set_default_timezone (ECalBackendStore *store, const ic
g_static_rw_lock_writer_lock (&priv->lock);
- tzid = icaltimezone_get_tzid ((icaltimezone*) zone);
+ tzid = icaltimezone_get_tzid ((icaltimezone *) zone);
copy = copy_timezone ((icaltimezone *) zone);
g_hash_table_insert (priv->timezones, g_strdup (tzid), copy);
@@ -465,7 +484,9 @@ e_cal_backend_file_store_freeze_changes (ECalBackendStore *store)
}
static void
-add_comp_to_slist (gpointer key, gpointer value, gpointer user_data)
+add_comp_to_slist (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
GSList **slist = (GSList **) user_data;
ECalComponent *comp = (ECalComponent *) value;
@@ -475,7 +496,8 @@ add_comp_to_slist (gpointer key, gpointer value, gpointer user_data)
}
static GSList *
-e_cal_backend_file_store_get_components_by_uid (ECalBackendStore *store, const gchar *uid)
+e_cal_backend_file_store_get_components_by_uid (ECalBackendStore *store,
+ const gchar *uid)
{
ECalBackendFileStore *fstore = E_CAL_BACKEND_FILE_STORE (store);
ECalBackendFileStorePrivate *priv;
@@ -503,7 +525,9 @@ end:
}
static void
-add_full_comp_to_slist (gpointer key, gpointer value, gpointer user_data)
+add_full_comp_to_slist (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
GSList **slist = (GSList **) user_data;
FullCompObject *obj = NULL;
@@ -534,7 +558,9 @@ e_cal_backend_file_store_get_components (ECalBackendStore *store)
}
static void
-add_instance_ids_to_slist (gpointer key, gpointer value, gpointer user_data)
+add_instance_ids_to_slist (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
GSList **slist = (GSList **) user_data;
ECalComponent *comp = (ECalComponent *) value;
@@ -544,7 +570,9 @@ add_instance_ids_to_slist (gpointer key, gpointer value, gpointer user_data)
}
static void
-add_comp_ids_to_slist (gpointer key, gpointer value, gpointer user_data)
+add_comp_ids_to_slist (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
GSList **slist = (GSList **) user_data;
FullCompObject *obj = NULL;
@@ -576,7 +604,8 @@ e_cal_backend_file_store_get_component_ids (ECalBackendStore *store)
}
static void
-add_timezone (ECalBackendFileStore *fstore, icalcomponent *vtzcomp)
+add_timezone (ECalBackendFileStore *fstore,
+ icalcomponent *vtzcomp)
{
ECalBackendFileStorePrivate *priv;
icalproperty *prop;
@@ -605,7 +634,8 @@ add_timezone (ECalBackendFileStore *fstore, icalcomponent *vtzcomp)
}
static icaltimezone *
-resolve_tzid (const gchar *tzid, gpointer user_data)
+resolve_tzid (const gchar *tzid,
+ gpointer user_data)
{
icaltimezone *zone;
@@ -634,7 +664,8 @@ get_zone (icalcomponent *icalcomp)
} */
static void
-scan_vcalendar (ECalBackendStore *store, icalcomponent *top_icalcomp)
+scan_vcalendar (ECalBackendStore *store,
+ icalcomponent *top_icalcomp)
{
ECalBackendFileStore *fstore = E_CAL_BACKEND_FILE_STORE (store);
icalcompiter iter;
@@ -752,7 +783,9 @@ e_cal_backend_file_store_clean (ECalBackendStore *store)
}
static void
-save_instance (gpointer key, gpointer value, gpointer user_data)
+save_instance (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
icalcomponent *vcalcomp = user_data;
icalcomponent *icalcomp;
@@ -763,7 +796,9 @@ save_instance (gpointer key, gpointer value, gpointer user_data)
}
static void
-save_object (gpointer key, gpointer value, gpointer user_data)
+save_object (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
FullCompObject *obj = value;
icalcomponent *icalcomp, *vcalcomp = user_data;
@@ -777,7 +812,9 @@ save_object (gpointer key, gpointer value, gpointer user_data)
}
static void
-save_timezone (gpointer key, gpointer tz, gpointer vcalcomp)
+save_timezone (gpointer key,
+ gpointer tz,
+ gpointer vcalcomp)
{
icalcomponent *tzcomp;
@@ -970,7 +1007,7 @@ e_cal_backend_file_store_init (ECalBackendFileStore *store)
*
* Since: 2.28
**/
-ECalBackendStore*
+ECalBackendStore *
e_cal_backend_file_store_new (const gchar *path)
{
return g_object_new (
diff --git a/calendar/libedata-cal/e-cal-backend-intervaltree.c b/calendar/libedata-cal/e-cal-backend-intervaltree.c
index 4c9e42e..48b6bde 100644
--- a/calendar/libedata-cal/e-cal-backend-intervaltree.c
+++ b/calendar/libedata-cal/e-cal-backend-intervaltree.c
@@ -41,7 +41,7 @@ G_DEFINE_TYPE (EIntervalTree, e_intervaltree, G_TYPE_OBJECT)
typedef struct _EIntervalNode EIntervalNode;
-static EIntervalNode*
+static EIntervalNode *
intervaltree_node_next (EIntervalTree *tree, EIntervalNode *x);
struct _EIntervalNode
@@ -60,10 +60,10 @@ struct _EIntervalNode
ECalComponent *comp;
/* left child */
- EIntervalNode* left;
+ EIntervalNode * left;
/* right child */
- EIntervalNode* right;
- EIntervalNode* parent;
+ EIntervalNode * right;
+ EIntervalNode * parent;
};
struct _EIntervalTreePrivate
@@ -75,7 +75,9 @@ struct _EIntervalTreePrivate
};
static inline gint
-get_direction (EIntervalNode *x, time_t z_start, time_t z_end)
+get_direction (EIntervalNode *x,
+ time_t z_start,
+ time_t z_end)
{
if (x->start == z_start)
return x->end > z_end;
@@ -87,7 +89,8 @@ get_direction (EIntervalNode *x, time_t z_start, time_t z_end)
}
static inline gchar *
-component_key (const gchar *uid, const gchar *rid)
+component_key (const gchar *uid,
+ const gchar *rid)
{
if (rid)
return g_strdup_printf("%s_%s", uid, rid);
@@ -105,7 +108,10 @@ component_key (const gchar *uid, const gchar *rid)
*
**/
static inline gint
-compare_intervals (time_t x_start, time_t x_end, time_t y_start, time_t y_end)
+compare_intervals (time_t x_start,
+ time_t x_end,
+ time_t y_start,
+ time_t y_end)
{
/* assumption: x_start <= x_end */
/* assumption: y_start <= y_end */
@@ -131,7 +137,8 @@ compare_intervals (time_t x_start, time_t x_end, time_t y_start, time_t y_end)
* Caller should hold the lock
**/
static void
-left_rotate (EIntervalTree *tree, EIntervalNode *x)
+left_rotate (EIntervalTree *tree,
+ EIntervalNode *x)
{
EIntervalTreePrivate *priv;
EIntervalNode *y;
@@ -176,7 +183,8 @@ left_rotate (EIntervalTree *tree, EIntervalNode *x)
* Caller should hold the lock
**/
static void
-right_rotate (EIntervalTree *tree, EIntervalNode *y)
+right_rotate (EIntervalTree *tree,
+ EIntervalNode *y)
{
EIntervalTreePrivate *priv;
EIntervalNode *x;
@@ -211,7 +219,8 @@ right_rotate (EIntervalTree *tree, EIntervalNode *y)
}
static void
-fixup_min_max_fields (EIntervalTree *tree, EIntervalNode *node)
+fixup_min_max_fields (EIntervalTree *tree,
+ EIntervalNode *node)
{
EIntervalTreePrivate *priv = tree->priv;
while (node != priv->root)
@@ -225,7 +234,8 @@ fixup_min_max_fields (EIntervalTree *tree, EIntervalNode *node)
/* Caller should hold the lock */
static void
-binary_tree_insert (EIntervalTree *tree, EIntervalNode *z)
+binary_tree_insert (EIntervalTree *tree,
+ EIntervalNode *z)
{
EIntervalTreePrivate *priv = tree->priv;
EIntervalNode *x;
@@ -270,7 +280,10 @@ binary_tree_insert (EIntervalTree *tree, EIntervalNode *z)
* Since: 2.32
**/
gboolean
-e_intervaltree_insert (EIntervalTree *tree, time_t start, time_t end, ECalComponent *comp)
+e_intervaltree_insert (EIntervalTree *tree,
+ time_t start,
+ time_t end,
+ ECalComponent *comp)
{
EIntervalTreePrivate *priv;
EIntervalNode *y;
@@ -362,8 +375,9 @@ e_intervaltree_insert (EIntervalTree *tree, time_t start, time_t end, ECalCompon
return TRUE;
}
-static EIntervalNode*
-intervaltree_node_next (EIntervalTree *tree, EIntervalNode *x)
+static EIntervalNode *
+intervaltree_node_next (EIntervalTree *tree,
+ EIntervalNode *x)
{
EIntervalTreePrivate *priv;
EIntervalNode *y, *nil, *root;
@@ -420,7 +434,7 @@ e_intervaltree_destroy (EIntervalTree *tree)
while (pos != NULL)
{
- node = (EIntervalNode*) pos->data;
+ node = (EIntervalNode *) pos->data;
if (node != priv->nil)
{
@@ -440,7 +454,8 @@ e_intervaltree_destroy (EIntervalTree *tree)
/* Caller should hold the lock */
static void
-e_intervaltree_fixup_deletion (EIntervalTree *tree, EIntervalNode *x)
+e_intervaltree_fixup_deletion (EIntervalTree *tree,
+ EIntervalNode *x)
{
EIntervalTreePrivate *priv = tree->priv;
EIntervalNode *root = priv->root->left;
@@ -529,8 +544,10 @@ e_intervaltree_fixup_deletion (EIntervalTree *tree, EIntervalNode *x)
*
* Since: 2.32
**/
-GList*
-e_intervaltree_search (EIntervalTree *tree, time_t start, time_t end)
+GList *
+e_intervaltree_search (EIntervalTree *tree,
+ time_t start,
+ time_t end)
{
EIntervalTreePrivate *priv;
EIntervalNode *node;
@@ -546,7 +563,7 @@ e_intervaltree_search (EIntervalTree *tree, time_t start, time_t end)
while (pos != NULL)
{
- node = (EIntervalNode*) pos->data;
+ node = (EIntervalNode *) pos->data;
if (node != priv->nil)
{
@@ -575,12 +592,14 @@ e_intervaltree_search (EIntervalTree *tree, time_t start, time_t end)
#ifdef E_INTERVALTREE_DEBUG
static void
-e_intervaltree_node_dump (EIntervalTree *tree, EIntervalNode *node, gint indent)
+e_intervaltree_node_dump (EIntervalTree *tree,
+ EIntervalNode *node,
+ gint indent)
{
/*
gchar start_time[32] = {0}, end_time[32] = {0};
struct tm tm_start_time, tm_end_time;
-
+ *
localtime_r (&node->start, &tm_start_time);
localtime_r (&node->end, &tm_end_time);
strftime(start_time, sizeof (start_time), "%Y-%m-%d T%H:%M:%S", &tm_start_time);
@@ -615,8 +634,8 @@ e_intervaltree_dump (EIntervalTree *tree)
**/
static EIntervalNode *
e_intervaltree_search_component (EIntervalTree *tree,
- const gchar *searched_uid,
- const gchar *searched_rid)
+ const gchar *searched_uid,
+ const gchar *searched_rid)
{
EIntervalTreePrivate *priv;
EIntervalNode *node;
@@ -649,8 +668,8 @@ e_intervaltree_search_component (EIntervalTree *tree,
**/
gboolean
e_intervaltree_remove (EIntervalTree *tree,
- const gchar *uid,
- const gchar *rid)
+ const gchar *uid,
+ const gchar *rid)
{
EIntervalTreePrivate *priv;
EIntervalNode *y;
@@ -807,7 +826,7 @@ e_intervaltree_init (EIntervalTree *tree)
*
* Since: 2.32
**/
-EIntervalTree*
+EIntervalTree *
e_intervaltree_new (void)
{
EIntervalTree *tree;
diff --git a/calendar/libedata-cal/e-cal-backend-intervaltree.h b/calendar/libedata-cal/e-cal-backend-intervaltree.h
index 3c51657..9b24b7f 100644
--- a/calendar/libedata-cal/e-cal-backend-intervaltree.h
+++ b/calendar/libedata-cal/e-cal-backend-intervaltree.h
@@ -68,7 +68,7 @@ struct _EIntervalTreeClass
GType e_intervaltree_get_type (void);
-EIntervalTree* e_intervaltree_new (void);
+EIntervalTree * e_intervaltree_new (void);
gboolean e_intervaltree_insert (EIntervalTree *tree, time_t start, time_t end, ECalComponent *comp);
@@ -76,7 +76,7 @@ gboolean e_intervaltree_remove (EIntervalTree *tree, const gchar *uid, const gch
void e_intervaltree_destroy (EIntervalTree *tree);
-GList*
+GList *
e_intervaltree_search (EIntervalTree *tree, time_t start, time_t end);
#ifdef E_INTERVALTREE_DEBUG
void e_intervaltree_dump (EIntervalTree *tree);
diff --git a/calendar/libedata-cal/e-cal-backend-sexp.c b/calendar/libedata-cal/e-cal-backend-sexp.c
index 2908037..1076aa7 100644
--- a/calendar/libedata-cal/e-cal-backend-sexp.c
+++ b/calendar/libedata-cal/e-cal-backend-sexp.c
@@ -61,7 +61,10 @@ static ESExpResult *func_is_completed (ESExp *esexp, gint argc, ESExpResult **ar
* Returns: The result of the function.
*/
ESExpResult *
-e_cal_backend_sexp_func_time_now (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+e_cal_backend_sexp_func_time_now (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
ESExpResult *result;
@@ -92,7 +95,10 @@ e_cal_backend_sexp_func_time_now (ESExp *esexp, gint argc, ESExpResult **argv, g
* Returns: The result of the function.
*/
ESExpResult *
-e_cal_backend_sexp_func_make_time (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+e_cal_backend_sexp_func_make_time (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
const gchar *str;
time_t t;
@@ -152,7 +158,10 @@ e_cal_backend_sexp_func_make_time (ESExp *esexp, gint argc, ESExpResult **argv,
* Returns: The result of the function.
*/
ESExpResult *
-e_cal_backend_sexp_func_time_add_day (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+e_cal_backend_sexp_func_time_add_day (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
ESExpResult *result;
time_t t;
@@ -203,7 +212,10 @@ e_cal_backend_sexp_func_time_add_day (ESExp *esexp, gint argc, ESExpResult **arg
* Returns: The result of the function.
*/
ESExpResult *
-e_cal_backend_sexp_func_time_day_begin (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+e_cal_backend_sexp_func_time_day_begin (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
time_t t;
ESExpResult *result;
@@ -245,7 +257,10 @@ e_cal_backend_sexp_func_time_day_begin (ESExp *esexp, gint argc, ESExpResult **a
* Returns: The result of the function.
*/
ESExpResult *
-e_cal_backend_sexp_func_time_day_end (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+e_cal_backend_sexp_func_time_day_end (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
time_t t;
ESExpResult *result;
@@ -277,7 +292,10 @@ e_cal_backend_sexp_func_time_day_end (ESExp *esexp, gint argc, ESExpResult **arg
* Returns a boolean indicating whether the component has the given UID
*/
static ESExpResult *
-func_uid (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+func_uid (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
const gchar *uid = NULL, *arg_uid;
@@ -318,7 +336,10 @@ func_uid (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
}
static gboolean
-check_instance_time_range_cb (ECalComponent *comp, time_t instance_start, time_t instance_end, gpointer data)
+check_instance_time_range_cb (ECalComponent *comp,
+ time_t instance_start,
+ time_t instance_end,
+ gpointer data)
{
SearchContext *ctx = data;
@@ -329,7 +350,8 @@ check_instance_time_range_cb (ECalComponent *comp, time_t instance_start, time_t
}
static icaltimezone *
-resolve_tzid (const gchar *tzid, gpointer user_data)
+resolve_tzid (const gchar *tzid,
+ gpointer user_data)
{
SearchContext *ctx = user_data;
@@ -350,7 +372,10 @@ resolve_tzid (const gchar *tzid, gpointer user_data)
* specified time range.
*/
static ESExpResult *
-func_occur_in_time_range (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+func_occur_in_time_range (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
time_t start, end;
@@ -397,7 +422,10 @@ func_occur_in_time_range (ESExp *esexp, gint argc, ESExpResult **argv, gpointer
}
static ESExpResult *
-func_due_in_time_range (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+func_due_in_time_range (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
time_t start, end;
@@ -458,7 +486,8 @@ func_due_in_time_range (ESExp *esexp, gint argc, ESExpResult **argv, gpointer da
/* Returns whether a list of ECalComponentText items matches the specified string */
static gboolean
-matches_text_list (GSList *text_list, const gchar *str)
+matches_text_list (GSList *text_list,
+ const gchar *str)
{
GSList *l;
gboolean matches;
@@ -482,7 +511,8 @@ matches_text_list (GSList *text_list, const gchar *str)
/* Returns whether the comments in a component matches the specified string */
static gboolean
-matches_comment (ECalComponent *comp, const gchar *str)
+matches_comment (ECalComponent *comp,
+ const gchar *str)
{
GSList *list;
gboolean matches;
@@ -496,7 +526,8 @@ matches_comment (ECalComponent *comp, const gchar *str)
/* Returns whether the description in a component matches the specified string */
static gboolean
-matches_description (ECalComponent *comp, const gchar *str)
+matches_description (ECalComponent *comp,
+ const gchar *str)
{
GSList *list;
gboolean matches;
@@ -509,7 +540,8 @@ matches_description (ECalComponent *comp, const gchar *str)
}
static gboolean
-matches_attendee (ECalComponent *comp, const gchar *str)
+matches_attendee (ECalComponent *comp,
+ const gchar *str)
{
GSList *a_list = NULL, *l;
gboolean matches = FALSE;
@@ -533,7 +565,8 @@ matches_attendee (ECalComponent *comp, const gchar *str)
}
static gboolean
-matches_organizer (ECalComponent *comp, const gchar *str)
+matches_organizer (ECalComponent *comp,
+ const gchar *str)
{
ECalComponentOrganizer org;
@@ -550,7 +583,8 @@ matches_organizer (ECalComponent *comp, const gchar *str)
}
static gboolean
-matches_classification (ECalComponent *comp, const gchar *str)
+matches_classification (ECalComponent *comp,
+ const gchar *str)
{
ECalComponentClassification classification;
ECalComponentClassification classification1;
@@ -574,7 +608,8 @@ matches_classification (ECalComponent *comp, const gchar *str)
/* Returns whether the summary in a component matches the specified string */
static gboolean
-matches_summary (ECalComponent *comp, const gchar *str)
+matches_summary (ECalComponent *comp,
+ const gchar *str)
{
ECalComponentText text;
@@ -591,7 +626,8 @@ matches_summary (ECalComponent *comp, const gchar *str)
/* Returns whether the location in a component matches the specified string */
static gboolean
-matches_location (ECalComponent *comp, const gchar *str)
+matches_location (ECalComponent *comp,
+ const gchar *str)
{
const gchar *location = NULL;
@@ -605,7 +641,8 @@ matches_location (ECalComponent *comp, const gchar *str)
/* Returns whether any text field in a component matches the specified string */
static gboolean
-matches_any (ECalComponent *comp, const gchar *str)
+matches_any (ECalComponent *comp,
+ const gchar *str)
{
/* As an optimization, and to make life easier for the individual
* predicate functions, see if we are looking for the empty string right
@@ -665,7 +702,10 @@ matches_status (ECalComponent *comp ,const gchar *str)
}
static ESExpResult *
-func_has_attachment (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+func_has_attachment (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
ESExpResult *result;
@@ -683,7 +723,10 @@ func_has_attachment (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
}
static ESExpResult *
-func_percent_complete (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+func_percent_complete (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
ESExpResult *result = NULL;
@@ -715,7 +758,10 @@ func_percent_complete (ESExp *esexp, gint argc, ESExpResult **argv, gpointer dat
* specified string.
*/
static ESExpResult *
-func_contains (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+func_contains (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
const gchar *field;
@@ -790,7 +836,10 @@ func_contains (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
* Returns: a boolean indicating whether the component has start date/time filled or not.
*/
static ESExpResult *
-func_has_start (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+func_has_start (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
ESExpResult *result;
@@ -819,7 +868,10 @@ func_has_start (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
* Returns: a boolean indicating whether the component has alarms or not.
*/
static ESExpResult *
-func_has_alarms (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+func_has_alarms (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
ESExpResult *result;
@@ -847,7 +899,10 @@ func_has_alarms (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
* time range or not.
*/
static ESExpResult *
-func_has_alarms_in_range (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+func_has_alarms_in_range (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
time_t start, end;
ESExpResult *result;
@@ -908,7 +963,10 @@ func_has_alarms_in_range (ESExp *esexp, gint argc, ESExpResult **argv, gpointer
* categories.
*/
static ESExpResult *
-func_has_categories (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+func_has_categories (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
gboolean unfiled;
@@ -1010,7 +1068,10 @@ func_has_categories (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
* Returns: a boolean indicating whether the component has recurrences or not.
*/
static ESExpResult *
-func_has_recurrences (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+func_has_recurrences (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
ESExpResult *result;
@@ -1035,7 +1096,10 @@ func_has_recurrences (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data
* a COMPLETED property. This is really only useful for TODO components.
*/
static ESExpResult *
-func_is_completed (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+func_is_completed (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
ESExpResult *result;
@@ -1071,7 +1135,10 @@ func_is_completed (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
* This is really only useful for TODO components.
*/
static ESExpResult *
-func_completed_before (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
+func_completed_before (ESExp *esexp,
+ gint argc,
+ ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
ESExpResult *result;
@@ -1108,7 +1175,7 @@ func_completed_before (ESExp *esexp, gint argc, ESExpResult **argv, gpointer dat
#endif
/* We want to return TRUE if before_time is after
- completed_time. */
+ * completed_time. */
if (difftime (before_time, completed_time) > 0) {
#if 0
g_print (" Returning TRUE\n");
@@ -1167,9 +1234,11 @@ static struct prop_info {
};
static ESExpResult *
-entry_compare (SearchContext *ctx, struct _ESExp *f,
- gint argc, struct _ESExpResult **argv,
- gchar *(*compare)(const gchar *, const gchar *))
+entry_compare (SearchContext *ctx,
+ struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gchar *(*compare)(const gchar *, const gchar *))
{
ESExpResult *r;
gint truth = FALSE;
@@ -1193,7 +1262,7 @@ entry_compare (SearchContext *ctx, struct _ESExp *f,
if (info->prop_type == PROP_TYPE_NORMAL) {
gchar *prop = NULL;
/* searches where the query's property
- maps directly to an ecard property */
+ * maps directly to an ecard property */
prop = e_card_simple_get (ctx->card, info->field_id);
@@ -1210,7 +1279,7 @@ entry_compare (SearchContext *ctx, struct _ESExp *f,
} else if (info->prop_type == PROP_TYPE_ID) {
const gchar *prop = NULL;
/* searches where the query's property
- maps directly to an ecard property */
+ * maps directly to an ecard property */
prop = e_card_get_id (ctx->card->card);
@@ -1223,8 +1292,8 @@ entry_compare (SearchContext *ctx, struct _ESExp *f,
}
/* if we're looking at all fields and find a match,
- or if we're just looking at this one field,
- break. */
+ * or if we're just looking at this one field,
+ * break. */
if ((any_field && truth)
|| !any_field)
break;
@@ -1279,7 +1348,9 @@ static struct {
* Since: 2.32
*/
gboolean
-e_cal_backend_sexp_evaluate_occur_times (ECalBackendSExp *sexp, time_t *start, time_t *end)
+e_cal_backend_sexp_evaluate_occur_times (ECalBackendSExp *sexp,
+ time_t *start,
+ time_t *end)
{
g_return_val_if_fail (sexp != NULL, FALSE);
g_return_val_if_fail (start != NULL, FALSE);
@@ -1299,7 +1370,9 @@ e_cal_backend_sexp_evaluate_occur_times (ECalBackendSExp *sexp, time_t *start, t
* Returns: TRUE if the component matched the expression, FALSE if not.
*/
gboolean
-e_cal_backend_sexp_match_comp (ECalBackendSExp *sexp, ECalComponent *comp, ECalBackend *backend)
+e_cal_backend_sexp_match_comp (ECalBackendSExp *sexp,
+ ECalComponent *comp,
+ ECalBackend *backend)
{
ESExpResult *r;
gboolean retval;
@@ -1339,7 +1412,9 @@ e_cal_backend_sexp_match_comp (ECalBackendSExp *sexp, ECalComponent *comp, ECalB
* Returns: TRUE if the object matches the expression, FALSE if not.
*/
gboolean
-e_cal_backend_sexp_match_object (ECalBackendSExp *sexp, const gchar *object, ECalBackend *backend)
+e_cal_backend_sexp_match_object (ECalBackendSExp *sexp,
+ const gchar *object,
+ ECalBackend *backend)
{
ECalComponent *comp;
icalcomponent *icalcomp;
diff --git a/calendar/libedata-cal/e-cal-backend-store.c b/calendar/libedata-cal/e-cal-backend-store.c
index 158fd8b..33c606a 100644
--- a/calendar/libedata-cal/e-cal-backend-store.c
+++ b/calendar/libedata-cal/e-cal-backend-store.c
@@ -212,7 +212,9 @@ e_cal_backend_store_clean (ECalBackendStore *store)
* Since: 2.28
**/
ECalComponent *
-e_cal_backend_store_get_component (ECalBackendStore *store, const gchar *uid, const gchar *rid)
+e_cal_backend_store_get_component (ECalBackendStore *store,
+ const gchar *uid,
+ const gchar *rid)
{
g_return_val_if_fail (E_IS_CAL_BACKEND_STORE (store), NULL);
g_return_val_if_fail (uid != NULL, NULL);
@@ -226,7 +228,9 @@ e_cal_backend_store_get_component (ECalBackendStore *store, const gchar *uid, co
* Since: 2.28
**/
gboolean
-e_cal_backend_store_has_component (ECalBackendStore *store, const gchar *uid, const gchar *rid)
+e_cal_backend_store_has_component (ECalBackendStore *store,
+ const gchar *uid,
+ const gchar *rid)
{
g_return_val_if_fail (E_IS_CAL_BACKEND_STORE (store), FALSE);
g_return_val_if_fail (uid != NULL, FALSE);
@@ -240,7 +244,10 @@ e_cal_backend_store_has_component (ECalBackendStore *store, const gchar *uid, co
* Since: 2.32
**/
gboolean
-e_cal_backend_store_put_component_with_time_range (ECalBackendStore *store, ECalComponent *comp, time_t occurence_start, time_t occurence_end)
+e_cal_backend_store_put_component_with_time_range (ECalBackendStore *store,
+ ECalComponent *comp,
+ time_t occurence_start,
+ time_t occurence_end)
{
ECalBackendStorePrivate *priv;
@@ -263,7 +270,8 @@ e_cal_backend_store_put_component_with_time_range (ECalBackendStore *store, ECal
* Since: 2.28
**/
gboolean
-e_cal_backend_store_put_component (ECalBackendStore *store, ECalComponent *comp)
+e_cal_backend_store_put_component (ECalBackendStore *store,
+ ECalComponent *comp)
{
g_return_val_if_fail (E_IS_CAL_BACKEND_STORE (store), FALSE);
g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), FALSE);
@@ -277,7 +285,9 @@ e_cal_backend_store_put_component (ECalBackendStore *store, ECalComponent *comp)
* Since: 2.28
**/
gboolean
-e_cal_backend_store_remove_component (ECalBackendStore *store, const gchar *uid, const gchar *rid)
+e_cal_backend_store_remove_component (ECalBackendStore *store,
+ const gchar *uid,
+ const gchar *rid)
{
ECalBackendStorePrivate *priv;
@@ -299,7 +309,8 @@ e_cal_backend_store_remove_component (ECalBackendStore *store, const gchar *uid,
* Since: 2.28
**/
const icaltimezone *
-e_cal_backend_store_get_timezone (ECalBackendStore *store, const gchar *tzid)
+e_cal_backend_store_get_timezone (ECalBackendStore *store,
+ const gchar *tzid)
{
g_return_val_if_fail (E_IS_CAL_BACKEND_STORE (store), NULL);
g_return_val_if_fail (tzid != NULL, NULL);
@@ -313,7 +324,8 @@ e_cal_backend_store_get_timezone (ECalBackendStore *store, const gchar *tzid)
* Since: 2.28
**/
gboolean
-e_cal_backend_store_put_timezone (ECalBackendStore *store, const icaltimezone *zone)
+e_cal_backend_store_put_timezone (ECalBackendStore *store,
+ const icaltimezone *zone)
{
g_return_val_if_fail (E_IS_CAL_BACKEND_STORE (store), FALSE);
g_return_val_if_fail (zone != NULL, FALSE);
@@ -327,7 +339,8 @@ e_cal_backend_store_put_timezone (ECalBackendStore *store, const icaltimezone *z
* Since: 2.28
**/
gboolean
-e_cal_backend_store_remove_timezone (ECalBackendStore *store, const gchar *tzid)
+e_cal_backend_store_remove_timezone (ECalBackendStore *store,
+ const gchar *tzid)
{
g_return_val_if_fail (E_IS_CAL_BACKEND_STORE (store), FALSE);
g_return_val_if_fail (tzid != NULL, FALSE);
@@ -354,7 +367,8 @@ e_cal_backend_store_get_default_timezone (ECalBackendStore *store)
* Since: 2.28
**/
gboolean
-e_cal_backend_store_set_default_timezone (ECalBackendStore *store, const icaltimezone *zone)
+e_cal_backend_store_set_default_timezone (ECalBackendStore *store,
+ const icaltimezone *zone)
{
g_return_val_if_fail (E_IS_CAL_BACKEND_STORE (store), FALSE);
g_return_val_if_fail (zone != NULL, FALSE);
@@ -368,7 +382,8 @@ e_cal_backend_store_set_default_timezone (ECalBackendStore *store, const icaltim
* Since: 2.28
**/
GSList *
-e_cal_backend_store_get_components_by_uid (ECalBackendStore *store, const gchar *uid)
+e_cal_backend_store_get_components_by_uid (ECalBackendStore *store,
+ const gchar *uid)
{
g_return_val_if_fail (E_IS_CAL_BACKEND_STORE (store), NULL);
g_return_val_if_fail (uid != NULL, NULL);
@@ -403,7 +418,9 @@ e_cal_backend_store_get_components (ECalBackendStore *store)
* Since: 2.32
*/
GSList *
-e_cal_backend_store_get_components_occuring_in_range (ECalBackendStore *store, time_t start, time_t end)
+e_cal_backend_store_get_components_occuring_in_range (ECalBackendStore *store,
+ time_t start,
+ time_t end)
{
ECalBackendStorePrivate *priv;
GList *l, *objects;
@@ -457,7 +474,8 @@ e_cal_backend_store_get_component_ids (ECalBackendStore *store)
* Since: 2.28
**/
const gchar *
-e_cal_backend_store_get_key_value (ECalBackendStore *store, const gchar *key)
+e_cal_backend_store_get_key_value (ECalBackendStore *store,
+ const gchar *key)
{
g_return_val_if_fail (E_IS_CAL_BACKEND_STORE (store), NULL);
g_return_val_if_fail (key != NULL, NULL);
@@ -471,7 +489,9 @@ e_cal_backend_store_get_key_value (ECalBackendStore *store, const gchar *key)
* Since: 2.28
**/
gboolean
-e_cal_backend_store_put_key_value (ECalBackendStore *store, const gchar *key, const gchar *value)
+e_cal_backend_store_put_key_value (ECalBackendStore *store,
+ const gchar *key,
+ const gchar *value)
{
g_return_val_if_fail (E_IS_CAL_BACKEND_STORE (store), FALSE);
g_return_val_if_fail (key != NULL, FALSE);
@@ -511,7 +531,10 @@ e_cal_backend_store_freeze_changes (ECalBackendStore *store)
* Since: 2.32
**/
void
-e_cal_backend_store_interval_tree_add_comp (ECalBackendStore *store, ECalComponent *comp, time_t occurence_start, time_t occurence_end)
+e_cal_backend_store_interval_tree_add_comp (ECalBackendStore *store,
+ ECalComponent *comp,
+ time_t occurence_start,
+ time_t occurence_end)
{
ECalBackendStorePrivate *priv;
diff --git a/calendar/libedata-cal/e-cal-backend-sync.c b/calendar/libedata-cal/e-cal-backend-sync.c
index baf2602..bdeee2a 100644
--- a/calendar/libedata-cal/e-cal-backend-sync.c
+++ b/calendar/libedata-cal/e-cal-backend-sync.c
@@ -52,7 +52,8 @@ struct _ECalBackendSyncPrivate {
* can happen at the same time.
*/
void
-e_cal_backend_sync_set_lock (ECalBackendSync *backend, gboolean lock)
+e_cal_backend_sync_set_lock (ECalBackendSync *backend,
+ gboolean lock)
{
g_return_if_fail (backend && E_IS_CAL_BACKEND_SYNC (backend));
@@ -71,7 +72,11 @@ e_cal_backend_sync_set_lock (ECalBackendSync *backend, gboolean lock)
* Calls the open_sync method on the given backend.
*/
void
-e_cal_backend_sync_open (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, gboolean only_if_exists, GError **error)
+e_cal_backend_sync_open (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ gboolean only_if_exists,
+ GError **error)
{
e_return_data_cal_error_if_fail (backend && E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
@@ -88,7 +93,10 @@ e_cal_backend_sync_open (ECalBackendSync *backend, EDataCal *cal, GCancellable *
* Authenticates @backend with given @credentials.
**/
void
-e_cal_backend_sync_authenticate_user (ECalBackendSync *backend, GCancellable *cancellable, ECredentials *credentials, GError **error)
+e_cal_backend_sync_authenticate_user (ECalBackendSync *backend,
+ GCancellable *cancellable,
+ ECredentials *credentials,
+ GError **error)
{
e_return_data_cal_error_if_fail (E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
e_return_data_cal_error_if_fail (credentials, InvalidArg);
@@ -106,7 +114,10 @@ e_cal_backend_sync_authenticate_user (ECalBackendSync *backend, GCancellable *ca
* Calls the remove_sync method on the given backend.
*/
void
-e_cal_backend_sync_remove (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, GError **error)
+e_cal_backend_sync_remove (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ GError **error)
{
e_return_data_cal_error_if_fail (backend && E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
@@ -125,7 +136,10 @@ e_cal_backend_sync_remove (ECalBackendSync *backend, EDataCal *cal, GCancellable
* Since: 2.30
*/
void
-e_cal_backend_sync_refresh (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, GError **error)
+e_cal_backend_sync_refresh (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ GError **error)
{
e_return_data_cal_error_if_fail (backend && E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
e_return_data_cal_error_if_fail (E_CAL_BACKEND_SYNC_GET_CLASS (backend)->refresh_sync != NULL, UnsupportedMethod);
@@ -151,7 +165,12 @@ e_cal_backend_sync_refresh (ECalBackendSync *backend, EDataCal *cal, GCancellab
* Since: 3.2
**/
gboolean
-e_cal_backend_sync_get_backend_property (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *prop_name, gchar **prop_value, GError **error)
+e_cal_backend_sync_get_backend_property (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ gchar **prop_value,
+ GError **error)
{
gboolean res = FALSE;
@@ -182,7 +201,12 @@ e_cal_backend_sync_get_backend_property (ECalBackendSync *backend, EDataCal *cal
* Since: 3.2
**/
gboolean
-e_cal_backend_sync_set_backend_property (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *prop_name, const gchar *prop_value, GError **error)
+e_cal_backend_sync_set_backend_property (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ const gchar *prop_value,
+ GError **error)
{
gboolean res = FALSE;
@@ -209,7 +233,13 @@ e_cal_backend_sync_set_backend_property (ECalBackendSync *backend, EDataCal *cal
* Calls the get_object_sync method on the given backend.
*/
void
-e_cal_backend_sync_get_object (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *uid, const gchar *rid, gchar **calobj, GError **error)
+e_cal_backend_sync_get_object (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid,
+ gchar **calobj,
+ GError **error)
{
e_return_data_cal_error_if_fail (backend && E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
e_return_data_cal_error_if_fail (calobj, InvalidArg);
@@ -229,7 +259,12 @@ e_cal_backend_sync_get_object (ECalBackendSync *backend, EDataCal *cal, GCancell
* Calls the get_object_list_sync method on the given backend.
*/
void
-e_cal_backend_sync_get_object_list (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *sexp, GSList **calobjs, GError **error)
+e_cal_backend_sync_get_object_list (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *sexp,
+ GSList **calobjs,
+ GError **error)
{
e_return_data_cal_error_if_fail (backend && E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
e_return_data_cal_error_if_fail (calobjs, InvalidArg);
@@ -251,7 +286,14 @@ e_cal_backend_sync_get_object_list (ECalBackendSync *backend, EDataCal *cal, GCa
* Calls the get_free_busy_sync method on the given backend.
*/
void
-e_cal_backend_sync_get_free_busy (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const GSList *users, time_t start, time_t end, GSList **freebusyobjects, GError **error)
+e_cal_backend_sync_get_free_busy (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const GSList *users,
+ time_t start,
+ time_t end,
+ GSList **freebusyobjects,
+ GError **error)
{
e_return_data_cal_error_if_fail (E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
@@ -271,7 +313,13 @@ e_cal_backend_sync_get_free_busy (ECalBackendSync *backend, EDataCal *cal, GCanc
* Calls the create_object_sync method on the given backend.
*/
void
-e_cal_backend_sync_create_object (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *calobj, gchar **uid, gchar **new_object, GError **error)
+e_cal_backend_sync_create_object (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ gchar **uid,
+ gchar **new_object,
+ GError **error)
{
e_return_data_cal_error_if_fail (backend && E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
e_return_data_cal_error_if_fail (E_CAL_BACKEND_SYNC_GET_CLASS (backend)->create_object_sync != NULL, UnsupportedMethod);
@@ -295,8 +343,14 @@ e_cal_backend_sync_create_object (ECalBackendSync *backend, EDataCal *cal, GCanc
* Calls the modify_object_sync method on the given backend.
*/
void
-e_cal_backend_sync_modify_object (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *calobj,
- CalObjModType mod, gchar **old_object, gchar **new_object, GError **error)
+e_cal_backend_sync_modify_object (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ CalObjModType mod,
+ gchar **old_object,
+ gchar **new_object,
+ GError **error)
{
e_return_data_cal_error_if_fail (backend && E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
e_return_data_cal_error_if_fail (E_CAL_BACKEND_SYNC_GET_CLASS (backend)->modify_object_sync != NULL, UnsupportedMethod);
@@ -323,8 +377,15 @@ e_cal_backend_sync_modify_object (ECalBackendSync *backend, EDataCal *cal, GCanc
* Calls the remove_object_sync method on the given backend.
*/
void
-e_cal_backend_sync_remove_object (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *uid, const gchar *rid,
- CalObjModType mod, gchar **old_object, gchar **new_object, GError **error)
+e_cal_backend_sync_remove_object (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid,
+ CalObjModType mod,
+ gchar **old_object,
+ gchar **new_object,
+ GError **error)
{
e_return_data_cal_error_if_fail (backend && E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
e_return_data_cal_error_if_fail (E_CAL_BACKEND_SYNC_GET_CLASS (backend)->remove_object_sync != NULL, UnsupportedMethod);
@@ -343,7 +404,11 @@ e_cal_backend_sync_remove_object (ECalBackendSync *backend, EDataCal *cal, GCanc
* Calls the receive_objects_sync method on the given backend.
*/
void
-e_cal_backend_sync_receive_objects (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *calobj, GError **error)
+e_cal_backend_sync_receive_objects (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ GError **error)
{
e_return_data_cal_error_if_fail (backend && E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
e_return_data_cal_error_if_fail (E_CAL_BACKEND_SYNC_GET_CLASS (backend)->receive_objects_sync != NULL, UnsupportedMethod);
@@ -364,8 +429,13 @@ e_cal_backend_sync_receive_objects (ECalBackendSync *backend, EDataCal *cal, GCa
* Calls the send_objects_sync method on the given backend.
*/
void
-e_cal_backend_sync_send_objects (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *calobj, GSList **users,
- gchar **modified_calobj, GError **error)
+e_cal_backend_sync_send_objects (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ GSList **users,
+ gchar **modified_calobj,
+ GError **error)
{
e_return_data_cal_error_if_fail (backend && E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
e_return_data_cal_error_if_fail (E_CAL_BACKEND_SYNC_GET_CLASS (backend)->send_objects_sync != NULL, UnsupportedMethod);
@@ -386,7 +456,13 @@ e_cal_backend_sync_send_objects (ECalBackendSync *backend, EDataCal *cal, GCance
* Calls the get_attachment_uris_sync method on the given backend.
*/
void
-e_cal_backend_sync_get_attachment_uris (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *uid, const gchar *rid, GSList **attachments, GError **error)
+e_cal_backend_sync_get_attachment_uris (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid,
+ GSList **attachments,
+ GError **error)
{
e_return_data_cal_error_if_fail (backend && E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
e_return_data_cal_error_if_fail (attachments, InvalidArg);
@@ -407,7 +483,13 @@ e_cal_backend_sync_get_attachment_uris (ECalBackendSync *backend, EDataCal *cal,
* Calls the discard_alarm_sync method on the given backend.
**/
void
-e_cal_backend_sync_discard_alarm (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *uid, const gchar *rid, const gchar *auid, GError **error)
+e_cal_backend_sync_discard_alarm (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid,
+ const gchar *auid,
+ GError **error)
{
e_return_data_cal_error_if_fail (backend && E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
e_return_data_cal_error_if_fail (uid, InvalidArg);
@@ -434,7 +516,12 @@ e_cal_backend_sync_discard_alarm (ECalBackendSync *backend, EDataCal *cal, GCanc
* get_timezone_sync completely.
*/
void
-e_cal_backend_sync_get_timezone (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *tzid, gchar **tzobject, GError **error)
+e_cal_backend_sync_get_timezone (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *tzid,
+ gchar **tzobject,
+ GError **error)
{
e_return_data_cal_error_if_fail (E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
@@ -478,7 +565,11 @@ e_cal_backend_sync_get_timezone (ECalBackendSync *backend, EDataCal *cal, GCance
* Calls the add_timezone_sync method on the given backend.
*/
void
-e_cal_backend_sync_add_timezone (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *tzobject, GError **error)
+e_cal_backend_sync_add_timezone (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *tzobject,
+ GError **error)
{
e_return_data_cal_error_if_fail (E_IS_CAL_BACKEND_SYNC (backend), InvalidArg);
@@ -486,7 +577,11 @@ e_cal_backend_sync_add_timezone (ECalBackendSync *backend, EDataCal *cal, GCance
}
static void
-cal_backend_open (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, gboolean only_if_exists)
+cal_backend_open (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ gboolean only_if_exists)
{
GError *error = NULL;
@@ -496,7 +591,9 @@ cal_backend_open (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellabl
}
static void
-cal_backend_authenticate_user (ECalBackend *backend, GCancellable *cancellable, ECredentials *credentials)
+cal_backend_authenticate_user (ECalBackend *backend,
+ GCancellable *cancellable,
+ ECredentials *credentials)
{
GError *error = NULL;
@@ -506,7 +603,10 @@ cal_backend_authenticate_user (ECalBackend *backend, GCancellable *cancellable,
}
static void
-cal_backend_remove (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable)
+cal_backend_remove (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable)
{
GError *error = NULL;
@@ -516,7 +616,10 @@ cal_backend_remove (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancella
}
static void
-cal_backend_refresh (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable)
+cal_backend_refresh (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable)
{
GError *error = NULL;
@@ -526,7 +629,11 @@ cal_backend_refresh (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancell
}
static void
-cal_backend_get_backend_property (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *prop_name)
+cal_backend_get_backend_property (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *prop_name)
{
GError *error = NULL;
gchar *prop_value = NULL;
@@ -540,7 +647,12 @@ cal_backend_get_backend_property (ECalBackend *backend, EDataCal *cal, guint32 o
}
static void
-cal_backend_set_backend_property (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *prop_name, const gchar *prop_value)
+cal_backend_set_backend_property (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ const gchar *prop_value)
{
GError *error = NULL;
@@ -551,7 +663,12 @@ cal_backend_set_backend_property (ECalBackend *backend, EDataCal *cal, guint32 o
}
static void
-cal_backend_get_object (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *uid, const gchar *rid)
+cal_backend_get_object (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid)
{
GError *error = NULL;
gchar *calobj = NULL;
@@ -564,7 +681,11 @@ cal_backend_get_object (ECalBackend *backend, EDataCal *cal, guint32 opid, GCanc
}
static void
-cal_backend_get_object_list (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *sexp)
+cal_backend_get_object_list (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *sexp)
{
GError *error = NULL;
GSList *calobjs = NULL;
@@ -578,7 +699,13 @@ cal_backend_get_object_list (ECalBackend *backend, EDataCal *cal, guint32 opid,
}
static void
-cal_backend_get_free_busy (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const GSList *users, time_t start, time_t end)
+cal_backend_get_free_busy (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const GSList *users,
+ time_t start,
+ time_t end)
{
GError *error = NULL;
GSList *freebusyobjs = NULL;
@@ -594,7 +721,11 @@ cal_backend_get_free_busy (ECalBackend *backend, EDataCal *cal, guint32 opid, GC
}
static void
-cal_backend_create_object (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *calobj)
+cal_backend_create_object (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *calobj)
{
GError *error = NULL;
gchar *uid = NULL, *new_object = NULL;
@@ -608,7 +739,12 @@ cal_backend_create_object (ECalBackend *backend, EDataCal *cal, guint32 opid, GC
}
static void
-cal_backend_modify_object (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *calobj, CalObjModType mod)
+cal_backend_modify_object (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ CalObjModType mod)
{
GError *error = NULL;
gchar *old_object = NULL, *new_object = NULL;
@@ -622,7 +758,13 @@ cal_backend_modify_object (ECalBackend *backend, EDataCal *cal, guint32 opid, GC
}
static void
-cal_backend_remove_object (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *uid, const gchar *rid, CalObjModType mod)
+cal_backend_remove_object (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid,
+ CalObjModType mod)
{
GError *error = NULL;
gchar *old_object = NULL, *new_object = NULL;
@@ -640,7 +782,11 @@ cal_backend_remove_object (ECalBackend *backend, EDataCal *cal, guint32 opid, GC
}
static void
-cal_backend_receive_objects (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *calobj)
+cal_backend_receive_objects (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *calobj)
{
GError *error = NULL;
@@ -650,7 +796,11 @@ cal_backend_receive_objects (ECalBackend *backend, EDataCal *cal, guint32 opid,
}
static void
-cal_backend_send_objects (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *calobj)
+cal_backend_send_objects (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *calobj)
{
GError *error = NULL;
GSList *users = NULL;
@@ -666,7 +816,12 @@ cal_backend_send_objects (ECalBackend *backend, EDataCal *cal, guint32 opid, GCa
}
static void
-cal_backend_get_attachment_uris (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *uid, const gchar *rid)
+cal_backend_get_attachment_uris (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid)
{
GError *error = NULL;
GSList *attachments = NULL;
@@ -680,7 +835,13 @@ cal_backend_get_attachment_uris (ECalBackend *backend, EDataCal *cal, guint32 op
}
static void
-cal_backend_discard_alarm (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *uid, const gchar *rid, const gchar *auid)
+cal_backend_discard_alarm (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid,
+ const gchar *auid)
{
GError *error = NULL;
@@ -690,7 +851,11 @@ cal_backend_discard_alarm (ECalBackend *backend, EDataCal *cal, guint32 opid, GC
}
static void
-cal_backend_get_timezone (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *tzid)
+cal_backend_get_timezone (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *tzid)
{
GError *error = NULL;
gchar *object = NULL;
@@ -749,7 +914,11 @@ cal_backend_get_timezone (ECalBackend *backend, EDataCal *cal, guint32 opid, GCa
}
static void
-cal_backend_add_timezone (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *tzobject)
+cal_backend_add_timezone (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *tzobject)
{
GError *error = NULL;
@@ -759,14 +928,15 @@ cal_backend_add_timezone (ECalBackend *backend, EDataCal *cal, guint32 opid, GCa
}
/* The default implementation is looking for timezone in the ical's builtin timezones,
- and if that fails, then it tries to extract the location from the tzid and get the
- timezone based on it. If even that fails, then it's returning UTC timezone.
- That means, that any object deriving from ECalBackendSync is supposed to implement
- this function for checking for a timezone in its own timezone cache, and if that
- fails, then call parent's object internal_get_timezone, and that's all.
+ * and if that fails, then it tries to extract the location from the tzid and get the
+ * timezone based on it. If even that fails, then it's returning UTC timezone.
+ * That means, that any object deriving from ECalBackendSync is supposed to implement
+ * this function for checking for a timezone in its own timezone cache, and if that
+ * fails, then call parent's object internal_get_timezone, and that's all.
*/
static icaltimezone *
-cal_backend_internal_get_timezone (ECalBackend *backend, const gchar *tzid)
+cal_backend_internal_get_timezone (ECalBackend *backend,
+ const gchar *tzid)
{
icaltimezone *zone = NULL;
@@ -799,14 +969,24 @@ cal_backend_internal_get_timezone (ECalBackend *backend, const gchar *tzid)
}
static gboolean
-cal_backend_sync_get_backend_property (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *prop_name, gchar **prop_value, GError **error)
+cal_backend_sync_get_backend_property (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ gchar **prop_value,
+ GError **error)
{
/* to indicate to pass to the ECalBackend parent class */
return FALSE;
}
static gboolean
-cal_backend_sync_set_backend_property (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, const gchar *prop_name, const gchar *prop_value, GError **error)
+cal_backend_sync_set_backend_property (ECalBackendSync *backend,
+ EDataCal *cal,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ const gchar *prop_value,
+ GError **error)
{
/* to indicate to pass to the ECalBackend parent class */
return FALSE;
diff --git a/calendar/libedata-cal/e-cal-backend-util.c b/calendar/libedata-cal/e-cal-backend-util.c
index 7df67d4..4adf829 100644
--- a/calendar/libedata-cal/e-cal-backend-util.c
+++ b/calendar/libedata-cal/e-cal-backend-util.c
@@ -40,7 +40,8 @@ static EAccountList *accounts;
* Returns: TRUE if there is a default account, FALSE otherwise.
*/
gboolean
-e_cal_backend_mail_account_get_default (gchar **address, gchar **name)
+e_cal_backend_mail_account_get_default (gchar **address,
+ gchar **name)
{
const EAccount *account;
@@ -71,7 +72,8 @@ e_cal_backend_mail_account_get_default (gchar **address, gchar **name)
* Returns: TRUE if the account is valid, FALSE if not.
*/
gboolean
-e_cal_backend_mail_account_is_valid (gchar *user, gchar **name)
+e_cal_backend_mail_account_is_valid (gchar *user,
+ gchar **name)
{
const EAccount *account;
@@ -99,7 +101,8 @@ e_cal_backend_mail_account_is_valid (gchar *user, gchar **name)
* It's not necessary to have this attendee in the list.
**/
static gboolean
-is_attendee_declined (icalcomponent *icalcomp, const gchar *email)
+is_attendee_declined (icalcomponent *icalcomp,
+ const gchar *email)
{
icalproperty *prop;
icalparameter *param;
diff --git a/calendar/libedata-cal/e-cal-backend.c b/calendar/libedata-cal/e-cal-backend.c
index c8564da..a137e12 100644
--- a/calendar/libedata-cal/e-cal-backend.c
+++ b/calendar/libedata-cal/e-cal-backend.c
@@ -82,7 +82,8 @@ static void e_cal_backend_remove_client_private (ECalBackend *backend, EDataCal
G_DEFINE_TYPE (ECalBackend, e_cal_backend, G_TYPE_OBJECT);
static void
-source_changed_cb (ESource *source, ECalBackend *backend)
+source_changed_cb (ESource *source,
+ ECalBackend *backend)
{
ECalBackendPrivate *priv;
gchar *suri;
@@ -186,7 +187,11 @@ cal_backend_set_kind (ECalBackend *backend,
}
static void
-cal_backend_get_backend_property (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *prop_name)
+cal_backend_get_backend_property (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *prop_name)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -209,7 +214,12 @@ cal_backend_get_backend_property (ECalBackend *backend, EDataCal *cal, guint32 o
}
static void
-cal_backend_set_backend_property (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *prop_name, const gchar *prop_value)
+cal_backend_set_backend_property (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ const gchar *prop_value)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -549,7 +559,8 @@ e_cal_backend_is_removed (ECalBackend *backend)
* Meant to be used by backend implementations.
**/
void
-e_cal_backend_set_is_removed (ECalBackend *backend, gboolean is_removed)
+e_cal_backend_set_is_removed (ECalBackend *backend,
+ gboolean is_removed)
{
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -618,7 +629,11 @@ e_cal_backend_set_cache_dir (ECalBackend *backend,
* Since: 3.2
**/
void
-e_cal_backend_get_backend_property (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *prop_name)
+e_cal_backend_get_backend_property (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *prop_name)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -646,7 +661,12 @@ e_cal_backend_get_backend_property (ECalBackend *backend, EDataCal *cal, guint32
* Since: 3.2
**/
void
-e_cal_backend_set_backend_property (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *prop_name, const gchar *prop_value)
+e_cal_backend_set_backend_property (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *prop_name,
+ const gchar *prop_value)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -658,7 +678,8 @@ e_cal_backend_set_backend_property (ECalBackend *backend, EDataCal *cal, guint32
}
static void
-cal_destroy_cb (gpointer data, GObject *where_cal_was)
+cal_destroy_cb (gpointer data,
+ GObject *where_cal_was)
{
e_cal_backend_remove_client_private (E_CAL_BACKEND (data),
(EDataCal *) where_cal_was, FALSE);
@@ -673,7 +694,8 @@ cal_destroy_cb (gpointer data, GObject *where_cal_was)
* notify all clients added via this function.
*/
void
-e_cal_backend_add_client (ECalBackend *backend, EDataCal *cal)
+e_cal_backend_add_client (ECalBackend *backend,
+ EDataCal *cal)
{
ECalBackendPrivate *priv;
@@ -692,13 +714,15 @@ e_cal_backend_add_client (ECalBackend *backend, EDataCal *cal)
}
static void
-e_cal_backend_remove_client_private (ECalBackend *backend, EDataCal *cal, gboolean weak_unref)
+e_cal_backend_remove_client_private (ECalBackend *backend,
+ EDataCal *cal,
+ gboolean weak_unref)
{
ECalBackendPrivate *priv;
/* XXX this needs a bit more thinking wrt the mutex - we
- should be holding it when we check to see if clients is
- NULL */
+ * should be holding it when we check to see if clients is
+ * NULL */
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
g_return_if_fail (cal != NULL);
@@ -731,7 +755,8 @@ e_cal_backend_remove_client_private (ECalBackend *backend, EDataCal *cal, gboole
* Removes a client from the list of connected clients to the given backend.
*/
void
-e_cal_backend_remove_client (ECalBackend *backend, EDataCal *cal)
+e_cal_backend_remove_client (ECalBackend *backend,
+ EDataCal *cal)
{
e_cal_backend_remove_client_private (backend, cal, TRUE);
}
@@ -746,7 +771,8 @@ e_cal_backend_remove_client (ECalBackend *backend, EDataCal *cal)
* change that affect the live view.
*/
void
-e_cal_backend_add_view (ECalBackend *backend, EDataCalView *view)
+e_cal_backend_add_view (ECalBackend *backend,
+ EDataCalView *view)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -768,7 +794,8 @@ e_cal_backend_add_view (ECalBackend *backend, EDataCalView *view)
* Since: 2.24
**/
void
-e_cal_backend_remove_view (ECalBackend *backend, EDataCalView *view)
+e_cal_backend_remove_view (ECalBackend *backend,
+ EDataCalView *view)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -790,7 +817,10 @@ e_cal_backend_remove_view (ECalBackend *backend, EDataCalView *view)
* @callback returns %FALSE to stop further processing.
**/
void
-e_cal_backend_foreach_view (ECalBackend *backend, gboolean (* callback) (EDataCalView *view, gpointer user_data), gpointer user_data)
+e_cal_backend_foreach_view (ECalBackend *backend,
+ gboolean (*callback) (EDataCalView *view,
+ gpointer user_data),
+ gpointer user_data)
{
const GSList *views;
EDataCalView *view;
@@ -820,7 +850,8 @@ e_cal_backend_foreach_view (ECalBackend *backend, gboolean (* callback) (EDataCa
* Sets the backend that will act as notification proxy for the given backend.
*/
void
-e_cal_backend_set_notification_proxy (ECalBackend *backend, ECalBackend *proxy)
+e_cal_backend_set_notification_proxy (ECalBackend *backend,
+ ECalBackend *proxy)
{
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -835,7 +866,8 @@ e_cal_backend_set_notification_proxy (ECalBackend *backend, ECalBackend *proxy)
* Sets the online mode of the calendar
*/
void
-e_cal_backend_set_online (ECalBackend *backend, gboolean is_online)
+e_cal_backend_set_online (ECalBackend *backend,
+ gboolean is_online)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -901,7 +933,11 @@ e_cal_backend_set_online (ECalBackend *backend, gboolean is_online)
* required, there is e_cal_backend_notify_auth_required() for this.
**/
void
-e_cal_backend_open (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, gboolean only_if_exists)
+e_cal_backend_open (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ gboolean only_if_exists)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -945,9 +981,9 @@ e_cal_backend_open (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancella
* how the opening phase works.
**/
void
-e_cal_backend_authenticate_user (ECalBackend *backend,
- GCancellable *cancellable,
- ECredentials *credentials)
+e_cal_backend_authenticate_user (ECalBackend *backend,
+ GCancellable *cancellable,
+ ECredentials *credentials)
{
g_return_if_fail (E_IS_CAL_BACKEND (backend));
g_return_if_fail (credentials != NULL);
@@ -970,7 +1006,10 @@ e_cal_backend_authenticate_user (ECalBackend *backend,
* This might be finished with e_data_cal_respond_remove().
**/
void
-e_cal_backend_remove (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable)
+e_cal_backend_remove (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -999,7 +1038,10 @@ e_cal_backend_remove (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancel
* Since: 2.30
**/
void
-e_cal_backend_refresh (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable)
+e_cal_backend_refresh (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -1028,7 +1070,12 @@ e_cal_backend_refresh (ECalBackend *backend, EDataCal *cal, guint32 opid, GCance
* This might be finished with e_data_cal_respond_get_object().
**/
void
-e_cal_backend_get_object (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *uid, const gchar *rid)
+e_cal_backend_get_object (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -1055,7 +1102,11 @@ e_cal_backend_get_object (ECalBackend *backend, EDataCal *cal, guint32 opid, GCa
* This might be finished with e_data_cal_respond_get_object_list().
**/
void
-e_cal_backend_get_object_list (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *sexp)
+e_cal_backend_get_object_list (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *sexp)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -1084,7 +1135,13 @@ e_cal_backend_get_object_list (ECalBackend *backend, EDataCal *cal, guint32 opid
* This might be finished with e_data_cal_respond_get_free_busy().
**/
void
-e_cal_backend_get_free_busy (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const GSList *users, time_t start, time_t end)
+e_cal_backend_get_free_busy (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const GSList *users,
+ time_t start,
+ time_t end)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -1112,7 +1169,11 @@ e_cal_backend_get_free_busy (ECalBackend *backend, EDataCal *cal, guint32 opid,
* This might be finished with e_data_cal_respond_create_object().
**/
void
-e_cal_backend_create_object (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *calobj)
+e_cal_backend_create_object (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *calobj)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -1141,7 +1202,12 @@ e_cal_backend_create_object (ECalBackend *backend, EDataCal *cal, guint32 opid,
* This might be finished with e_data_cal_respond_modify_object().
**/
void
-e_cal_backend_modify_object (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *calobj, CalObjModType mod)
+e_cal_backend_modify_object (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *calobj,
+ CalObjModType mod)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -1172,7 +1238,13 @@ e_cal_backend_modify_object (ECalBackend *backend, EDataCal *cal, guint32 opid,
* This might be finished with e_data_cal_respond_remove_object().
**/
void
-e_cal_backend_remove_object (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *uid, const gchar *rid, CalObjModType mod)
+e_cal_backend_remove_object (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid,
+ CalObjModType mod)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -1199,7 +1271,11 @@ e_cal_backend_remove_object (ECalBackend *backend, EDataCal *cal, guint32 opid,
* This might be finished with e_data_cal_respond_receive_objects().
**/
void
-e_cal_backend_receive_objects (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *calobj)
+e_cal_backend_receive_objects (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *calobj)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -1226,7 +1302,11 @@ e_cal_backend_receive_objects (ECalBackend *backend, EDataCal *cal, guint32 opid
* This might be finished with e_data_cal_respond_send_objects().
**/
void
-e_cal_backend_send_objects (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *calobj)
+e_cal_backend_send_objects (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *calobj)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -1255,7 +1335,12 @@ e_cal_backend_send_objects (ECalBackend *backend, EDataCal *cal, guint32 opid, G
* This might be finished with e_data_cal_respond_get_attachment_uris().
**/
void
-e_cal_backend_get_attachment_uris (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *uid, const gchar *rid)
+e_cal_backend_get_attachment_uris (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -1285,7 +1370,13 @@ e_cal_backend_get_attachment_uris (ECalBackend *backend, EDataCal *cal, guint32
* Default implementation of this method returns Not Supported error.
**/
void
-e_cal_backend_discard_alarm (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *uid, const gchar *rid, const gchar *auid)
+e_cal_backend_discard_alarm (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *uid,
+ const gchar *rid,
+ const gchar *auid)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -1316,7 +1407,11 @@ e_cal_backend_discard_alarm (ECalBackend *backend, EDataCal *cal, guint32 opid,
* This might be finished with e_data_cal_respond_get_timezone().
**/
void
-e_cal_backend_get_timezone (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *tzid)
+e_cal_backend_get_timezone (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *tzid)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -1343,7 +1438,11 @@ e_cal_backend_get_timezone (ECalBackend *backend, EDataCal *cal, guint32 opid, G
* This might be finished with e_data_cal_respond_add_timezone().
**/
void
-e_cal_backend_add_timezone (ECalBackend *backend, EDataCal *cal, guint32 opid, GCancellable *cancellable, const gchar *tzobject)
+e_cal_backend_add_timezone (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GCancellable *cancellable,
+ const gchar *tzobject)
{
g_return_if_fail (E_IS_CAL_BACKEND (backend));
g_return_if_fail (tzobject != NULL);
@@ -1365,7 +1464,8 @@ e_cal_backend_add_timezone (ECalBackend *backend, EDataCal *cal, guint32 opid, G
* Calls the internal_get_timezone method on the given backend.
*/
icaltimezone *
-e_cal_backend_internal_get_timezone (ECalBackend *backend, const gchar *tzid)
+e_cal_backend_internal_get_timezone (ECalBackend *backend,
+ const gchar *tzid)
{
g_return_val_if_fail (E_IS_CAL_BACKEND (backend), NULL);
g_return_val_if_fail (tzid != NULL, NULL);
@@ -1382,7 +1482,8 @@ e_cal_backend_internal_get_timezone (ECalBackend *backend, const gchar *tzid)
* Starts a new live view on the given backend.
*/
void
-e_cal_backend_start_view (ECalBackend *backend, EDataCalView *view)
+e_cal_backend_start_view (ECalBackend *backend,
+ EDataCalView *view)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -1401,7 +1502,8 @@ e_cal_backend_start_view (ECalBackend *backend, EDataCalView *view)
* Since: 3.2
*/
void
-e_cal_backend_stop_view (ECalBackend *backend, EDataCalView *view)
+e_cal_backend_stop_view (ECalBackend *backend,
+ EDataCalView *view)
{
g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
@@ -1414,7 +1516,8 @@ e_cal_backend_stop_view (ECalBackend *backend, EDataCalView *view)
}
static gboolean
-object_created_cb (EDataCalView *view, gpointer calobj)
+object_created_cb (EDataCalView *view,
+ gpointer calobj)
{
if (e_data_cal_view_object_matches (view, calobj))
e_data_cal_view_notify_objects_added_1 (view, calobj);
@@ -1434,7 +1537,8 @@ object_created_cb (EDataCalView *view, gpointer calobj)
* created by non-EDS clients.
**/
void
-e_cal_backend_notify_object_created (ECalBackend *backend, const gchar *calobj)
+e_cal_backend_notify_object_created (ECalBackend *backend,
+ const gchar *calobj)
{
ECalBackendPrivate *priv;
@@ -1454,13 +1558,17 @@ e_cal_backend_notify_object_created (ECalBackend *backend, const gchar *calobj)
* Since: 2.24
**/
void
-e_cal_backend_notify_objects_added (ECalBackend *backend, EDataCalView *view, const GSList *objects)
+e_cal_backend_notify_objects_added (ECalBackend *backend,
+ EDataCalView *view,
+ const GSList *objects)
{
e_data_cal_view_notify_objects_added (view, objects);
}
static void
-match_view_and_notify (EDataCalView *view, const gchar *old_object, const gchar *object)
+match_view_and_notify (EDataCalView *view,
+ const gchar *old_object,
+ const gchar *object)
{
gboolean old_match = FALSE, new_match = FALSE;
@@ -1494,7 +1602,8 @@ struct call_data {
};
static gboolean
-call_match_and_notify (EDataCalView *view, gpointer user_data)
+call_match_and_notify (EDataCalView *view,
+ gpointer user_data)
{
struct call_data *cd = user_data;
@@ -1518,7 +1627,9 @@ call_match_and_notify (EDataCalView *view, gpointer user_data)
* modified by non-EDS clients.
**/
void
-e_cal_backend_notify_object_modified (ECalBackend *backend, const gchar *old_object, const gchar *object)
+e_cal_backend_notify_object_modified (ECalBackend *backend,
+ const gchar *old_object,
+ const gchar *object)
{
ECalBackendPrivate *priv;
struct call_data cd;
@@ -1543,13 +1654,16 @@ e_cal_backend_notify_object_modified (ECalBackend *backend, const gchar *old_obj
* Since: 2.24
**/
void
-e_cal_backend_notify_objects_modified (ECalBackend *backend, EDataCalView *view, const GSList *objects)
+e_cal_backend_notify_objects_modified (ECalBackend *backend,
+ EDataCalView *view,
+ const GSList *objects)
{
e_data_cal_view_notify_objects_modified (view, objects);
}
static gboolean
-object_removed_cb (EDataCalView *view, gpointer user_data)
+object_removed_cb (EDataCalView *view,
+ gpointer user_data)
{
struct call_data *cd = user_data;
@@ -1557,7 +1671,7 @@ object_removed_cb (EDataCalView *view, gpointer user_data)
if (cd->object == NULL) {
/* if object == NULL, it means the object has been completely
- removed from the backend */
+ * removed from the backend */
if (!cd->old_object || e_data_cal_view_object_matches (view, cd->old_object))
e_data_cal_view_notify_objects_removed_1 (view, cd->id);
} else
@@ -1582,8 +1696,10 @@ object_removed_cb (EDataCalView *view, gpointer user_data)
* removed by non-EDS clients.
**/
void
-e_cal_backend_notify_object_removed (ECalBackend *backend, const ECalComponentId *id,
- const gchar *old_object, const gchar *object)
+e_cal_backend_notify_object_removed (ECalBackend *backend,
+ const ECalComponentId *id,
+ const gchar *old_object,
+ const gchar *object)
{
ECalBackendPrivate *priv;
struct call_data cd;
@@ -1608,7 +1724,9 @@ e_cal_backend_notify_object_removed (ECalBackend *backend, const ECalComponentId
* Since: 2.24
**/
void
-e_cal_backend_notify_objects_removed (ECalBackend *backend, EDataCalView *view, const GSList *ids)
+e_cal_backend_notify_objects_removed (ECalBackend *backend,
+ EDataCalView *view,
+ const GSList *ids)
{
e_data_cal_view_notify_objects_removed (view, ids);
}
@@ -1621,7 +1739,8 @@ e_cal_backend_notify_objects_removed (ECalBackend *backend, EDataCalView *view,
* Notifies each of the backend's listeners about an error
**/
void
-e_cal_backend_notify_error (ECalBackend *backend, const gchar *message)
+e_cal_backend_notify_error (ECalBackend *backend,
+ const gchar *message)
{
ECalBackendPrivate *priv = backend->priv;
GSList *l;
@@ -1648,7 +1767,8 @@ e_cal_backend_notify_error (ECalBackend *backend, const gchar *message)
* Meant to be used by backend implementations.
**/
void
-e_cal_backend_notify_readonly (ECalBackend *backend, gboolean is_readonly)
+e_cal_backend_notify_readonly (ECalBackend *backend,
+ gboolean is_readonly)
{
ECalBackendPrivate *priv;
GSList *l;
@@ -1678,7 +1798,8 @@ e_cal_backend_notify_readonly (ECalBackend *backend, gboolean is_readonly)
* Meant to be used by backend implementations.
**/
void
-e_cal_backend_notify_online (ECalBackend *backend, gboolean is_online)
+e_cal_backend_notify_online (ECalBackend *backend,
+ gboolean is_online)
{
ECalBackendPrivate *priv;
GSList *clients;
@@ -1722,7 +1843,9 @@ e_cal_backend_notify_online (ECalBackend *backend, gboolean is_online)
* Meant to be used by backend implementations.
**/
void
-e_cal_backend_notify_auth_required (ECalBackend *backend, gboolean is_self, const ECredentials *credentials)
+e_cal_backend_notify_auth_required (ECalBackend *backend,
+ gboolean is_self,
+ const ECredentials *credentials)
{
ECalBackendPrivate *priv;
GSList *clients;
@@ -1765,7 +1888,8 @@ e_cal_backend_notify_auth_required (ECalBackend *backend, gboolean is_self, cons
* Meant to be used by backend implementations.
**/
void
-e_cal_backend_notify_opened (ECalBackend *backend, GError *error)
+e_cal_backend_notify_opened (ECalBackend *backend,
+ GError *error)
{
ECalBackendPrivate *priv;
GSList *clients;
@@ -1794,7 +1918,9 @@ e_cal_backend_notify_opened (ECalBackend *backend, GError *error)
* Notifies client about property value change.
**/
void
-e_cal_backend_notify_property_changed (ECalBackend *backend, const gchar *prop_name, const gchar *prop_value)
+e_cal_backend_notify_property_changed (ECalBackend *backend,
+ const gchar *prop_name,
+ const gchar *prop_value)
{
ECalBackendPrivate *priv;
GSList *clients;
@@ -1830,7 +1956,10 @@ e_cal_backend_notify_property_changed (ECalBackend *backend, const gchar *prop_n
* See e_cal_backend_open() for more details how the opening phase works.
**/
void
-e_cal_backend_respond_opened (ECalBackend *backend, EDataCal *cal, guint32 opid, GError *error)
+e_cal_backend_respond_opened (ECalBackend *backend,
+ EDataCal *cal,
+ guint32 opid,
+ GError *error)
{
GError *copy = NULL;
@@ -1857,7 +1986,8 @@ e_cal_backend_respond_opened (ECalBackend *backend, EDataCal *cal, guint32 opid,
* Since: 2.28
**/
void
-e_cal_backend_empty_cache (ECalBackend *backend, ECalBackendCache *cache)
+e_cal_backend_empty_cache (ECalBackend *backend,
+ ECalBackendCache *cache)
{
GList *comps_in_cache;
diff --git a/calendar/libedata-cal/e-data-cal-factory.c b/calendar/libedata-cal/e-data-cal-factory.c
index d1f63b4..3e2b937 100644
--- a/calendar/libedata-cal/e-data-cal-factory.c
+++ b/calendar/libedata-cal/e-data-cal-factory.c
@@ -272,7 +272,8 @@ remove_dead_calendar_cb (gpointer path,
}
static void
-calendar_freed_cb (EDataCalFactory *factory, GObject *dead)
+calendar_freed_cb (EDataCalFactory *factory,
+ GObject *dead)
{
EDataCalFactoryPrivate *priv = factory->priv;
GHashTableIter iter;
@@ -310,7 +311,8 @@ calendar_freed_cb (EDataCalFactory *factory, GObject *dead)
}
static void
-last_client_gone_cb (ECalBackend *backend, EDataCalFactory *factory)
+last_client_gone_cb (ECalBackend *backend,
+ EDataCalFactory *factory)
{
EDataCalFactoryPrivate *priv = factory->priv;
@@ -329,7 +331,9 @@ struct find_backend_data {
};
static void
-find_backend_cb (gpointer key, gpointer value, gpointer data)
+find_backend_cb (gpointer key,
+ gpointer value,
+ gpointer data)
{
struct find_backend_data *fbd = data;
@@ -539,9 +543,9 @@ impl_CalFactory_get_cal (EGdbusCalFactory *object,
cleanup:
/* The reason why the lock is held for such a long time is that there is
- a subtle race where e_cal_backend_add_client () can be called just
- before e_cal_backend_finalize () is called from the
- backend_last_client_gone_cb (), for details see bug 506457. */
+ * a subtle race where e_cal_backend_add_client () can be called just
+ * before e_cal_backend_finalize () is called from the
+ * backend_last_client_gone_cb (), for details see bug 506457. */
g_mutex_unlock (priv->backends_mutex);
cleanup2:
@@ -577,7 +581,9 @@ remove_data_cal_cb (gpointer data_cl,
}
static void
-unref_backend_cb (gpointer key, gpointer value, gpointer user_data)
+unref_backend_cb (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
ECalBackend *backend = value;
@@ -854,7 +860,9 @@ e_data_cal_factory_get_n_backends (EDataCalFactory *factory)
/* Frees a uri/backend pair from the backends hash table */
static void
-dump_backend (gpointer key, gpointer value, gpointer data)
+dump_backend (gpointer key,
+ gpointer value,
+ gpointer data)
{
gchar *uri;
ECalBackend *backend;
@@ -989,7 +997,8 @@ static GOptionEntry entries[] = {
};
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EOfflineListener *eol;
GOptionContext *context;
@@ -1014,7 +1023,7 @@ main (gint argc, gchar **argv)
p_SetProcessDEPPolicy = GetProcAddress (GetModuleHandle ("kernel32.dll"), "SetProcessDEPPolicy");
if (p_SetProcessDEPPolicy)
- (*p_SetProcessDEPPolicy) (PROCESS_DEP_ENABLE|PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION);
+ (*p_SetProcessDEPPolicy) (PROCESS_DEP_ENABLE | PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION);
}
#endif
#endif
diff --git a/calendar/libedata-cal/e-data-cal-view.c b/calendar/libedata-cal/e-data-cal-view.c
index 479692e..db14325 100644
--- a/calendar/libedata-cal/e-data-cal-view.c
+++ b/calendar/libedata-cal/e-data-cal-view.c
@@ -120,7 +120,8 @@ str_ic_hash (gconstpointer key)
}
static gboolean
-str_ic_equal (gconstpointer a, gconstpointer b)
+str_ic_equal (gconstpointer a,
+ gconstpointer b)
{
const gchar *stra = a, *strb = b;
gint ii;
@@ -147,14 +148,16 @@ id_hash (gconstpointer key)
}
static gboolean
-id_equal (gconstpointer a, gconstpointer b)
+id_equal (gconstpointer a,
+ gconstpointer b)
{
const ECalComponentId *id_a = a, *id_b = b;
return g_strcmp0 (id_a->uid, id_b->uid) == 0 && g_strcmp0 (id_a->rid, id_b->rid) == 0;
}
EDataCalView *
-e_data_cal_view_new (ECalBackend *backend, ECalBackendSExp *sexp)
+e_data_cal_view_new (ECalBackend *backend,
+ ECalBackendSExp *sexp)
{
EDataCalView *view;
@@ -169,7 +172,10 @@ e_data_cal_view_new (ECalBackend *backend, ECalBackendSExp *sexp)
* Since: 2.32
**/
guint
-e_data_cal_view_register_gdbus_object (EDataCalView *view, GDBusConnection *connection, const gchar *object_path, GError **error)
+e_data_cal_view_register_gdbus_object (EDataCalView *view,
+ GDBusConnection *connection,
+ const gchar *object_path,
+ GError **error)
{
g_return_val_if_fail (view != NULL, 0);
g_return_val_if_fail (E_IS_DATA_CAL_VIEW (view), 0);
@@ -263,7 +269,8 @@ ensure_pending_flush_timeout (EDataCalView *view)
}
static void
-notify_add (EDataCalView *view, gchar *obj)
+notify_add (EDataCalView *view,
+ gchar *obj)
{
EDataCalViewPrivate *priv = view->priv;
ECalComponent *comp;
@@ -286,7 +293,8 @@ notify_add (EDataCalView *view, gchar *obj)
}
static void
-notify_change (EDataCalView *view, gchar *obj)
+notify_change (EDataCalView *view,
+ gchar *obj)
{
EDataCalViewPrivate *priv = view->priv;
@@ -303,7 +311,8 @@ notify_change (EDataCalView *view, gchar *obj)
}
static void
-notify_remove (EDataCalView *view, ECalComponentId *id)
+notify_remove (EDataCalView *view,
+ ECalComponentId *id)
{
EDataCalViewPrivate *priv = view->priv;
gchar *ids;
@@ -356,7 +365,8 @@ notify_remove (EDataCalView *view, ECalComponentId *id)
}
static void
-notify_complete (EDataCalView *view, const GError *error)
+notify_complete (EDataCalView *view,
+ const GError *error)
{
gchar **error_strv;
@@ -372,7 +382,9 @@ notify_complete (EDataCalView *view, const GError *error)
}
static gboolean
-impl_DataCalView_start (EGdbusCalView *object, GDBusMethodInvocation *invocation, EDataCalView *view)
+impl_DataCalView_start (EGdbusCalView *object,
+ GDBusMethodInvocation *invocation,
+ EDataCalView *view)
{
EDataCalViewPrivate *priv;
@@ -390,7 +402,9 @@ impl_DataCalView_start (EGdbusCalView *object, GDBusMethodInvocation *invocation
}
static gboolean
-impl_DataCalView_stop (EGdbusCalView *object, GDBusMethodInvocation *invocation, EDataCalView *view)
+impl_DataCalView_stop (EGdbusCalView *object,
+ GDBusMethodInvocation *invocation,
+ EDataCalView *view)
{
EDataCalViewPrivate *priv;
@@ -405,7 +419,9 @@ impl_DataCalView_stop (EGdbusCalView *object, GDBusMethodInvocation *invocation,
}
static gboolean
-impl_DataCalView_dispose (EGdbusCalView *object, GDBusMethodInvocation *invocation, EDataCalView *view)
+impl_DataCalView_dispose (EGdbusCalView *object,
+ GDBusMethodInvocation *invocation,
+ EDataCalView *view)
{
e_gdbus_cal_view_complete_dispose (object, invocation, NULL);
@@ -418,7 +434,10 @@ impl_DataCalView_dispose (EGdbusCalView *object, GDBusMethodInvocation *invocati
}
static gboolean
-impl_DataCalView_set_fields_of_interest (EGdbusCalView *object, GDBusMethodInvocation *invocation, const gchar * const *in_fields_of_interest, EDataCalView *view)
+impl_DataCalView_set_fields_of_interest (EGdbusCalView *object,
+ GDBusMethodInvocation *invocation,
+ const gchar * const *in_fields_of_interest,
+ EDataCalView *view)
{
EDataCalViewPrivate *priv;
gint ii;
@@ -449,7 +468,10 @@ impl_DataCalView_set_fields_of_interest (EGdbusCalView *object, GDBusMethodInvoc
}
static void
-e_data_cal_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+e_data_cal_view_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
EDataCalView *view;
EDataCalViewPrivate *priv;
@@ -471,7 +493,10 @@ e_data_cal_view_set_property (GObject *object, guint property_id, const GValue *
}
static void
-e_data_cal_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+e_data_cal_view_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
EDataCalView *view;
EDataCalViewPrivate *priv;
@@ -632,7 +657,8 @@ e_data_cal_view_get_object_sexp (EDataCalView *view)
* Returns: TRUE if the object matches the expression, FALSE if not.
*/
gboolean
-e_data_cal_view_object_matches (EDataCalView *view, const gchar *object)
+e_data_cal_view_object_matches (EDataCalView *view,
+ const gchar *object)
{
EDataCalViewPrivate *priv;
@@ -726,7 +752,8 @@ e_data_cal_view_get_fields_of_interest (EDataCalView *view)
* Notifies all view listeners of the addition of a list of objects.
*/
void
-e_data_cal_view_notify_objects_added (EDataCalView *view, const GSList *objects)
+e_data_cal_view_notify_objects_added (EDataCalView *view,
+ const GSList *objects)
{
EDataCalViewPrivate *priv;
const GSList *l;
@@ -754,7 +781,8 @@ e_data_cal_view_notify_objects_added (EDataCalView *view, const GSList *objects)
* Notifies all the view listeners of the addition of a single object.
*/
void
-e_data_cal_view_notify_objects_added_1 (EDataCalView *view, const gchar *object)
+e_data_cal_view_notify_objects_added_1 (EDataCalView *view,
+ const gchar *object)
{
GSList l = {NULL,};
@@ -773,7 +801,8 @@ e_data_cal_view_notify_objects_added_1 (EDataCalView *view, const gchar *object)
* Notifies all view listeners of the modification of a list of objects.
*/
void
-e_data_cal_view_notify_objects_modified (EDataCalView *view, const GSList *objects)
+e_data_cal_view_notify_objects_modified (EDataCalView *view,
+ const GSList *objects)
{
EDataCalViewPrivate *priv;
const GSList *l;
@@ -802,7 +831,8 @@ e_data_cal_view_notify_objects_modified (EDataCalView *view, const GSList *objec
* Notifies all view listeners of the modification of a single object.
*/
void
-e_data_cal_view_notify_objects_modified_1 (EDataCalView *view, const gchar *object)
+e_data_cal_view_notify_objects_modified_1 (EDataCalView *view,
+ const gchar *object)
{
GSList l = {NULL,};
@@ -821,7 +851,8 @@ e_data_cal_view_notify_objects_modified_1 (EDataCalView *view, const gchar *obje
* Notifies all view listener of the removal of a list of objects.
*/
void
-e_data_cal_view_notify_objects_removed (EDataCalView *view, const GSList *ids)
+e_data_cal_view_notify_objects_removed (EDataCalView *view,
+ const GSList *ids)
{
EDataCalViewPrivate *priv;
const GSList *l;
@@ -851,7 +882,8 @@ e_data_cal_view_notify_objects_removed (EDataCalView *view, const GSList *ids)
* Notifies all view listener of the removal of a single object.
*/
void
-e_data_cal_view_notify_objects_removed_1 (EDataCalView *view, const ECalComponentId *id)
+e_data_cal_view_notify_objects_removed_1 (EDataCalView *view,
+ const ECalComponentId *id)
{
GSList l = {NULL,};
@@ -871,7 +903,9 @@ e_data_cal_view_notify_objects_removed_1 (EDataCalView *view, const ECalComponen
* Notifies all view listeners of progress messages.
*/
void
-e_data_cal_view_notify_progress (EDataCalView *view, gint percent, const gchar *message)
+e_data_cal_view_notify_progress (EDataCalView *view,
+ gint percent,
+ const gchar *message)
{
EDataCalViewPrivate *priv;
gchar *gdbus_message = NULL;
@@ -896,7 +930,8 @@ e_data_cal_view_notify_progress (EDataCalView *view, gint percent, const gchar *
* status code.
*/
void
-e_data_cal_view_notify_complete (EDataCalView *view, const GError *error)
+e_data_cal_view_notify_complete (EDataCalView *view,
+ const GError *error)
{
EDataCalViewPrivate *priv;
diff --git a/calendar/libedata-cal/e-data-cal.c b/calendar/libedata-cal/e-data-cal.c
index 6eeaa96..ce32805 100644
--- a/calendar/libedata-cal/e-data-cal.c
+++ b/calendar/libedata-cal/e-data-cal.c
@@ -158,7 +158,9 @@ construct_calview_path (void)
}
static void
-cancel_ops_cb (gpointer opid, gpointer cancellable, gpointer user_data)
+cancel_ops_cb (gpointer opid,
+ gpointer cancellable,
+ gpointer user_data)
{
g_return_if_fail (cancellable != NULL);
@@ -166,7 +168,8 @@ cancel_ops_cb (gpointer opid, gpointer cancellable, gpointer user_data)
}
static void
-operation_thread (gpointer data, gpointer user_data)
+operation_thread (gpointer data,
+ gpointer user_data)
{
OperationData *op = data;
ECalBackend *backend;
@@ -246,8 +249,8 @@ operation_thread (gpointer data, gpointer user_data)
GError *error = NULL;
/* we handle this entirely here, since it doesn't require any
- backend involvement now that we have e_cal_view_start to
- actually kick off the search. */
+ * backend involvement now that we have e_cal_view_start to
+ * actually kick off the search. */
obj_sexp = e_cal_backend_sexp_new (op->d.sexp);
if (!obj_sexp) {
@@ -324,7 +327,8 @@ operation_thread (gpointer data, gpointer user_data)
}
static OperationData *
-op_new (OperationID op, EDataCal *cal)
+op_new (OperationID op,
+ EDataCal *cal)
{
OperationData *data;
@@ -342,7 +346,8 @@ op_new (OperationID op, EDataCal *cal)
}
static void
-op_complete (EDataCal *cal, guint32 opid)
+op_complete (EDataCal *cal,
+ guint32 opid)
{
g_return_if_fail (cal != NULL);
@@ -455,7 +460,8 @@ e_data_cal_status_to_string (EDataCalCallStatus status)
* Since: 2.32
**/
GError *
-e_data_cal_create_error (EDataCalCallStatus status, const gchar *custom_msg)
+e_data_cal_create_error (EDataCalCallStatus status,
+ const gchar *custom_msg)
{
if (status == Success)
return NULL;
@@ -469,7 +475,9 @@ e_data_cal_create_error (EDataCalCallStatus status, const gchar *custom_msg)
* Since: 2.32
**/
GError *
-e_data_cal_create_error_fmt (EDataCalCallStatus status, const gchar *custom_msg_fmt, ...)
+e_data_cal_create_error_fmt (EDataCalCallStatus status,
+ const gchar *custom_msg_fmt,
+ ...)
{
GError *error;
gchar *custom_msg;
@@ -490,7 +498,9 @@ e_data_cal_create_error_fmt (EDataCalCallStatus status, const gchar *custom_msg_
}
static void
-data_cal_return_error (GDBusMethodInvocation *invocation, const GError *perror, const gchar *error_fmt)
+data_cal_return_error (GDBusMethodInvocation *invocation,
+ const GError *perror,
+ const gchar *error_fmt)
{
GError *error;
@@ -504,7 +514,8 @@ data_cal_return_error (GDBusMethodInvocation *invocation, const GError *perror,
}
EDataCal *
-e_data_cal_new (ECalBackend *backend, ESource *source)
+e_data_cal_new (ECalBackend *backend,
+ ESource *source)
{
EDataCal *cal;
@@ -525,13 +536,13 @@ e_data_cal_new (ECalBackend *backend, ESource *source)
*
* Since: 2.30
**/
-ESource*
+ESource *
e_data_cal_get_source (EDataCal *cal)
{
return cal->priv->source;
}
-ECalBackend*
+ECalBackend *
e_data_cal_get_backend (EDataCal *cal)
{
return cal->priv->backend;
@@ -545,7 +556,10 @@ e_data_cal_get_backend (EDataCal *cal)
* Since: 2.32
**/
guint
-e_data_cal_register_gdbus_object (EDataCal *cal, GDBusConnection *connection, const gchar *object_path, GError **error)
+e_data_cal_register_gdbus_object (EDataCal *cal,
+ GDBusConnection *connection,
+ const gchar *object_path,
+ GError **error)
{
g_return_val_if_fail (cal != NULL, 0);
g_return_val_if_fail (E_IS_DATA_CAL (cal), 0);
@@ -556,7 +570,10 @@ e_data_cal_register_gdbus_object (EDataCal *cal, GDBusConnection *connection, co
}
static gboolean
-impl_Cal_open (EGdbusCal *object, GDBusMethodInvocation *invocation, gboolean in_only_if_exists, EDataCal *cal)
+impl_Cal_open (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ gboolean in_only_if_exists,
+ EDataCal *cal)
{
OperationData *op;
@@ -570,7 +587,9 @@ impl_Cal_open (EGdbusCal *object, GDBusMethodInvocation *invocation, gboolean in
}
static gboolean
-impl_Cal_remove (EGdbusCal *object, GDBusMethodInvocation *invocation, EDataCal *cal)
+impl_Cal_remove (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ EDataCal *cal)
{
OperationData *op;
@@ -583,7 +602,9 @@ impl_Cal_remove (EGdbusCal *object, GDBusMethodInvocation *invocation, EDataCal
}
static gboolean
-impl_Cal_refresh (EGdbusCal *object, GDBusMethodInvocation *invocation, EDataCal *cal)
+impl_Cal_refresh (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ EDataCal *cal)
{
OperationData *op;
@@ -596,7 +617,10 @@ impl_Cal_refresh (EGdbusCal *object, GDBusMethodInvocation *invocation, EDataCal
}
static gboolean
-impl_Cal_get_backend_property (EGdbusCal *object, GDBusMethodInvocation *invocation, const gchar *in_prop_name, EDataCal *cal)
+impl_Cal_get_backend_property (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *in_prop_name,
+ EDataCal *cal)
{
OperationData *op;
@@ -610,7 +634,10 @@ impl_Cal_get_backend_property (EGdbusCal *object, GDBusMethodInvocation *invocat
}
static gboolean
-impl_Cal_set_backend_property (EGdbusCal *object, GDBusMethodInvocation *invocation, const gchar * const *in_prop_name_value, EDataCal *cal)
+impl_Cal_set_backend_property (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ const gchar * const *in_prop_name_value,
+ EDataCal *cal)
{
OperationData *op;
@@ -624,7 +651,10 @@ impl_Cal_set_backend_property (EGdbusCal *object, GDBusMethodInvocation *invocat
}
static gboolean
-impl_Cal_get_object (EGdbusCal *object, GDBusMethodInvocation *invocation, const gchar * const *in_uid_rid, EDataCal *cal)
+impl_Cal_get_object (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ const gchar * const *in_uid_rid,
+ EDataCal *cal)
{
OperationData *op;
@@ -638,7 +668,10 @@ impl_Cal_get_object (EGdbusCal *object, GDBusMethodInvocation *invocation, const
}
static gboolean
-impl_Cal_get_object_list (EGdbusCal *object, GDBusMethodInvocation *invocation, const gchar *in_sexp, EDataCal *cal)
+impl_Cal_get_object_list (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *in_sexp,
+ EDataCal *cal)
{
OperationData *op;
@@ -652,7 +685,10 @@ impl_Cal_get_object_list (EGdbusCal *object, GDBusMethodInvocation *invocation,
}
static gboolean
-impl_Cal_get_free_busy (EGdbusCal *object, GDBusMethodInvocation *invocation, const gchar * const *in_start_end_userlist, EDataCal *cal)
+impl_Cal_get_free_busy (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ const gchar * const *in_start_end_userlist,
+ EDataCal *cal)
{
OperationData *op;
guint start, end;
@@ -670,7 +706,10 @@ impl_Cal_get_free_busy (EGdbusCal *object, GDBusMethodInvocation *invocation, co
}
static gboolean
-impl_Cal_create_object (EGdbusCal *object, GDBusMethodInvocation *invocation, const gchar *in_calobj, EDataCal *cal)
+impl_Cal_create_object (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *in_calobj,
+ EDataCal *cal)
{
OperationData *op;
@@ -684,7 +723,10 @@ impl_Cal_create_object (EGdbusCal *object, GDBusMethodInvocation *invocation, co
}
static gboolean
-impl_Cal_modify_object (EGdbusCal *object, GDBusMethodInvocation *invocation, const gchar * const *in_calobj_mod, EDataCal *cal)
+impl_Cal_modify_object (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ const gchar * const *in_calobj_mod,
+ EDataCal *cal)
{
OperationData *op;
guint mod;
@@ -700,7 +742,10 @@ impl_Cal_modify_object (EGdbusCal *object, GDBusMethodInvocation *invocation, co
}
static gboolean
-impl_Cal_remove_object (EGdbusCal *object, GDBusMethodInvocation *invocation, const gchar * const *in_uid_rid_mod, EDataCal *cal)
+impl_Cal_remove_object (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ const gchar * const *in_uid_rid_mod,
+ EDataCal *cal)
{
OperationData *op;
guint mod = 0;
@@ -716,7 +761,10 @@ impl_Cal_remove_object (EGdbusCal *object, GDBusMethodInvocation *invocation, co
}
static gboolean
-impl_Cal_receive_objects (EGdbusCal *object, GDBusMethodInvocation *invocation, const gchar *in_calobj, EDataCal *cal)
+impl_Cal_receive_objects (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *in_calobj,
+ EDataCal *cal)
{
OperationData *op;
@@ -730,7 +778,10 @@ impl_Cal_receive_objects (EGdbusCal *object, GDBusMethodInvocation *invocation,
}
static gboolean
-impl_Cal_send_objects (EGdbusCal *object, GDBusMethodInvocation *invocation, const gchar *in_calobj, EDataCal *cal)
+impl_Cal_send_objects (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *in_calobj,
+ EDataCal *cal)
{
OperationData *op;
@@ -744,7 +795,10 @@ impl_Cal_send_objects (EGdbusCal *object, GDBusMethodInvocation *invocation, con
}
static gboolean
-impl_Cal_get_attachment_uris (EGdbusCal *object, GDBusMethodInvocation *invocation, const gchar * const *in_uid_rid, EDataCal *cal)
+impl_Cal_get_attachment_uris (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ const gchar * const *in_uid_rid,
+ EDataCal *cal)
{
OperationData *op;
@@ -758,7 +812,10 @@ impl_Cal_get_attachment_uris (EGdbusCal *object, GDBusMethodInvocation *invocati
}
static gboolean
-impl_Cal_discard_alarm (EGdbusCal *object, GDBusMethodInvocation *invocation, const gchar * const *in_uid_rid_auid, EDataCal *cal)
+impl_Cal_discard_alarm (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ const gchar * const *in_uid_rid_auid,
+ EDataCal *cal)
{
OperationData *op;
@@ -772,7 +829,10 @@ impl_Cal_discard_alarm (EGdbusCal *object, GDBusMethodInvocation *invocation, co
}
static gboolean
-impl_Cal_get_view (EGdbusCal *object, GDBusMethodInvocation *invocation, const gchar *in_sexp, EDataCal *cal)
+impl_Cal_get_view (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *in_sexp,
+ EDataCal *cal)
{
OperationData *op;
@@ -786,7 +846,10 @@ impl_Cal_get_view (EGdbusCal *object, GDBusMethodInvocation *invocation, const g
}
static gboolean
-impl_Cal_get_timezone (EGdbusCal *object, GDBusMethodInvocation *invocation, const gchar *in_tzid, EDataCal *cal)
+impl_Cal_get_timezone (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *in_tzid,
+ EDataCal *cal)
{
OperationData *op;
@@ -800,7 +863,10 @@ impl_Cal_get_timezone (EGdbusCal *object, GDBusMethodInvocation *invocation, con
}
static gboolean
-impl_Cal_add_timezone (EGdbusCal *object, GDBusMethodInvocation *invocation, const gchar *in_tzobject, EDataCal *cal)
+impl_Cal_add_timezone (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *in_tzobject,
+ EDataCal *cal)
{
OperationData *op;
@@ -814,7 +880,10 @@ impl_Cal_add_timezone (EGdbusCal *object, GDBusMethodInvocation *invocation, con
}
static gboolean
-impl_Cal_authenticate_user (EGdbusCal *object, GDBusMethodInvocation *invocation, const gchar * const *in_credentials, EDataCal *cal)
+impl_Cal_authenticate_user (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ const gchar * const *in_credentials,
+ EDataCal *cal)
{
OperationData *op;
@@ -836,7 +905,10 @@ impl_Cal_authenticate_user (EGdbusCal *object, GDBusMethodInvocation *invocation
}
static gboolean
-impl_Cal_cancel_operation (EGdbusCal *object, GDBusMethodInvocation *invocation, guint in_opid, EDataCal *cal)
+impl_Cal_cancel_operation (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ guint in_opid,
+ EDataCal *cal)
{
OperationData *op;
@@ -850,7 +922,9 @@ impl_Cal_cancel_operation (EGdbusCal *object, GDBusMethodInvocation *invocation,
}
static gboolean
-impl_Cal_cancel_all (EGdbusCal *object, GDBusMethodInvocation *invocation, EDataCal *cal)
+impl_Cal_cancel_all (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ EDataCal *cal)
{
OperationData *op;
@@ -863,7 +937,9 @@ impl_Cal_cancel_all (EGdbusCal *object, GDBusMethodInvocation *invocation, EData
}
static gboolean
-impl_Cal_close (EGdbusCal *object, GDBusMethodInvocation *invocation, EDataCal *cal)
+impl_Cal_close (EGdbusCal *object,
+ GDBusMethodInvocation *invocation,
+ EDataCal *cal)
{
OperationData *op;
@@ -901,7 +977,9 @@ gslist_to_strv (const GSList *lst)
* Notifies listeners of the completion of the open method call.
*/
void
-e_data_cal_respond_open (EDataCal *cal, guint32 opid, GError *error)
+e_data_cal_respond_open (EDataCal *cal,
+ guint32 opid,
+ GError *error)
{
op_complete (cal, opid);
@@ -922,7 +1000,9 @@ e_data_cal_respond_open (EDataCal *cal, guint32 opid, GError *error)
* Notifies listeners of the completion of the remove method call.
*/
void
-e_data_cal_respond_remove (EDataCal *cal, guint32 opid, GError *error)
+e_data_cal_respond_remove (EDataCal *cal,
+ guint32 opid,
+ GError *error)
{
op_complete (cal, opid);
@@ -947,7 +1027,9 @@ e_data_cal_respond_remove (EDataCal *cal, guint32 opid, GError *error)
* Since: 2.30
*/
void
-e_data_cal_respond_refresh (EDataCal *cal, guint32 opid, GError *error)
+e_data_cal_respond_refresh (EDataCal *cal,
+ guint32 opid,
+ GError *error)
{
op_complete (cal, opid);
@@ -969,7 +1051,10 @@ e_data_cal_respond_refresh (EDataCal *cal, guint32 opid, GError *error)
* Notifies listeners of the completion of the get_backend_property method call.
*/
void
-e_data_cal_respond_get_backend_property (EDataCal *cal, guint32 opid, GError *error, const gchar *prop_value)
+e_data_cal_respond_get_backend_property (EDataCal *cal,
+ guint32 opid,
+ GError *error,
+ const gchar *prop_value)
{
gchar *gdbus_prop_value = NULL;
@@ -993,7 +1078,9 @@ e_data_cal_respond_get_backend_property (EDataCal *cal, guint32 opid, GError *er
* Notifies listeners of the completion of the set_backend_property method call.
*/
void
-e_data_cal_respond_set_backend_property (EDataCal *cal, guint32 opid, GError *error)
+e_data_cal_respond_set_backend_property (EDataCal *cal,
+ guint32 opid,
+ GError *error)
{
op_complete (cal, opid);
@@ -1015,7 +1102,10 @@ e_data_cal_respond_set_backend_property (EDataCal *cal, guint32 opid, GError *er
* Notifies listeners of the completion of the get_object method call.
*/
void
-e_data_cal_respond_get_object (EDataCal *cal, guint32 opid, GError *error, const gchar *object)
+e_data_cal_respond_get_object (EDataCal *cal,
+ guint32 opid,
+ GError *error,
+ const gchar *object)
{
gchar *gdbus_object = NULL;
@@ -1040,7 +1130,10 @@ e_data_cal_respond_get_object (EDataCal *cal, guint32 opid, GError *error, const
* Notifies listeners of the completion of the get_object_list method call.
*/
void
-e_data_cal_respond_get_object_list (EDataCal *cal, guint32 opid, GError *error, const GSList *objects)
+e_data_cal_respond_get_object_list (EDataCal *cal,
+ guint32 opid,
+ GError *error,
+ const GSList *objects)
{
gchar **strv_objects;
@@ -1067,7 +1160,9 @@ e_data_cal_respond_get_object_list (EDataCal *cal, guint32 opid, GError *error,
* To pass actual free/busy objects to the client use e_data_cal_report_free_busy_data().
*/
void
-e_data_cal_respond_get_free_busy (EDataCal *cal, guint32 opid, GError *error)
+e_data_cal_respond_get_free_busy (EDataCal *cal,
+ guint32 opid,
+ GError *error)
{
op_complete (cal, opid);
@@ -1090,8 +1185,11 @@ e_data_cal_respond_get_free_busy (EDataCal *cal, guint32 opid, GError *error)
* Notifies listeners of the completion of the create_object method call.
*/
void
-e_data_cal_respond_create_object (EDataCal *cal, guint32 opid, GError *error,
- const gchar *uid, const gchar *object)
+e_data_cal_respond_create_object (EDataCal *cal,
+ guint32 opid,
+ GError *error,
+ const gchar *uid,
+ const gchar *object)
{
gchar *gdbus_uid = NULL;
@@ -1119,8 +1217,11 @@ e_data_cal_respond_create_object (EDataCal *cal, guint32 opid, GError *error,
* Notifies listeners of the completion of the modify_object method call.
*/
void
-e_data_cal_respond_modify_object (EDataCal *cal, guint32 opid, GError *error,
- const gchar *old_object, const gchar *object)
+e_data_cal_respond_modify_object (EDataCal *cal,
+ guint32 opid,
+ GError *error,
+ const gchar *old_object,
+ const gchar *object)
{
op_complete (cal, opid);
@@ -1147,8 +1248,12 @@ e_data_cal_respond_modify_object (EDataCal *cal, guint32 opid, GError *error,
* Notifies listeners of the completion of the remove_object method call.
*/
void
-e_data_cal_respond_remove_object (EDataCal *cal, guint32 opid, GError *error,
- const ECalComponentId *id, const gchar *old_object, const gchar *object)
+e_data_cal_respond_remove_object (EDataCal *cal,
+ guint32 opid,
+ GError *error,
+ const ECalComponentId *id,
+ const gchar *old_object,
+ const gchar *object)
{
op_complete (cal, opid);
@@ -1171,7 +1276,9 @@ e_data_cal_respond_remove_object (EDataCal *cal, guint32 opid, GError *error,
* Notifies listeners of the completion of the receive_objects method call.
*/
void
-e_data_cal_respond_receive_objects (EDataCal *cal, guint32 opid, GError *error)
+e_data_cal_respond_receive_objects (EDataCal *cal,
+ guint32 opid,
+ GError *error)
{
op_complete (cal, opid);
@@ -1194,7 +1301,11 @@ e_data_cal_respond_receive_objects (EDataCal *cal, guint32 opid, GError *error)
* Notifies listeners of the completion of the send_objects method call.
*/
void
-e_data_cal_respond_send_objects (EDataCal *cal, guint32 opid, GError *error, const GSList *users, const gchar *calobj)
+e_data_cal_respond_send_objects (EDataCal *cal,
+ guint32 opid,
+ GError *error,
+ const GSList *users,
+ const gchar *calobj)
{
gchar **strv_users_calobj;
@@ -1221,7 +1332,10 @@ e_data_cal_respond_send_objects (EDataCal *cal, guint32 opid, GError *error, con
* Notifies listeners of the completion of the get_attachment_uris method call.
**/
void
-e_data_cal_respond_get_attachment_uris (EDataCal *cal, guint32 opid, GError *error, const GSList *attachment_uris)
+e_data_cal_respond_get_attachment_uris (EDataCal *cal,
+ guint32 opid,
+ GError *error,
+ const GSList *attachment_uris)
{
gchar **strv_attachment_uris;
@@ -1247,7 +1361,9 @@ e_data_cal_respond_get_attachment_uris (EDataCal *cal, guint32 opid, GError *err
* Notifies listeners of the completion of the discard_alarm method call.
**/
void
-e_data_cal_respond_discard_alarm (EDataCal *cal, guint32 opid, GError *error)
+e_data_cal_respond_discard_alarm (EDataCal *cal,
+ guint32 opid,
+ GError *error)
{
op_complete (cal, opid);
@@ -1269,7 +1385,10 @@ e_data_cal_respond_discard_alarm (EDataCal *cal, guint32 opid, GError *error)
* Notifies listeners of the completion of the get_view method call.
*/
void
-e_data_cal_respond_get_view (EDataCal *cal, guint32 opid, GError *error, const gchar *view_path)
+e_data_cal_respond_get_view (EDataCal *cal,
+ guint32 opid,
+ GError *error,
+ const gchar *view_path)
{
gchar *gdbus_view_path = NULL;
@@ -1294,7 +1413,10 @@ e_data_cal_respond_get_view (EDataCal *cal, guint32 opid, GError *error, const g
* Notifies listeners of the completion of the get_timezone method call.
*/
void
-e_data_cal_respond_get_timezone (EDataCal *cal, guint32 opid, GError *error, const gchar *tzobject)
+e_data_cal_respond_get_timezone (EDataCal *cal,
+ guint32 opid,
+ GError *error,
+ const gchar *tzobject)
{
gchar *gdbus_tzobject = NULL;
@@ -1318,7 +1440,9 @@ e_data_cal_respond_get_timezone (EDataCal *cal, guint32 opid, GError *error, con
* Notifies listeners of the completion of the add_timezone method call.
*/
void
-e_data_cal_respond_add_timezone (EDataCal *cal, guint32 opid, GError *error)
+e_data_cal_respond_add_timezone (EDataCal *cal,
+ guint32 opid,
+ GError *error)
{
op_complete (cal, opid);
@@ -1332,7 +1456,8 @@ e_data_cal_respond_add_timezone (EDataCal *cal, guint32 opid, GError *error)
}
void
-e_data_cal_report_error (EDataCal *cal, const gchar *message)
+e_data_cal_report_error (EDataCal *cal,
+ const gchar *message)
{
g_return_if_fail (cal != NULL);
g_return_if_fail (message != NULL);
@@ -1341,7 +1466,8 @@ e_data_cal_report_error (EDataCal *cal, const gchar *message)
}
void
-e_data_cal_report_readonly (EDataCal *cal, gboolean readonly)
+e_data_cal_report_readonly (EDataCal *cal,
+ gboolean readonly)
{
g_return_if_fail (cal != NULL);
@@ -1349,7 +1475,8 @@ e_data_cal_report_readonly (EDataCal *cal, gboolean readonly)
}
void
-e_data_cal_report_online (EDataCal *cal, gboolean is_online)
+e_data_cal_report_online (EDataCal *cal,
+ gboolean is_online)
{
g_return_if_fail (cal != NULL);
@@ -1357,10 +1484,11 @@ e_data_cal_report_online (EDataCal *cal, gboolean is_online)
}
/* credentilas contains extra information for a source for which authentication is requested.
- This parameter can be NULL to indicate "for this calendar".
+ * This parameter can be NULL to indicate "for this calendar".
*/
void
-e_data_cal_report_auth_required (EDataCal *cal, const ECredentials *credentials)
+e_data_cal_report_auth_required (EDataCal *cal,
+ const ECredentials *credentials)
{
gchar *empty_strv[2];
gchar **strv = NULL;
@@ -1379,12 +1507,13 @@ e_data_cal_report_auth_required (EDataCal *cal, const ECredentials *credentials)
}
/* Reports to associated client that opening phase of the cal is finished.
- error being NULL means successfully, otherwise reports an error which happened
- during opening phase. By opening phase is meant a process including successfull
- authentication to the server/storage.
-*/
+ * error being NULL means successfully, otherwise reports an error which happened
+ * during opening phase. By opening phase is meant a process including successfull
+ * authentication to the server/storage.
+ */
void
-e_data_cal_report_opened (EDataCal *cal, const GError *error)
+e_data_cal_report_opened (EDataCal *cal,
+ const GError *error)
{
gchar **strv_error;
@@ -1396,7 +1525,8 @@ e_data_cal_report_opened (EDataCal *cal, const GError *error)
}
void
-e_data_cal_report_free_busy_data (EDataCal *cal, const GSList *freebusy)
+e_data_cal_report_free_busy_data (EDataCal *cal,
+ const GSList *freebusy)
{
gchar **strv_freebusy;
@@ -1411,7 +1541,9 @@ e_data_cal_report_free_busy_data (EDataCal *cal, const GSList *freebusy)
/* Notifies client about certain property value change */
void
-e_data_cal_report_backend_property_changed (EDataCal *cal, const gchar *prop_name, const gchar *prop_value)
+e_data_cal_report_backend_property_changed (EDataCal *cal,
+ const gchar *prop_name,
+ const gchar *prop_value)
{
gchar **strv;
diff --git a/calendar/libegdbus/e-gdbus-cal-factory.c b/calendar/libegdbus/e-gdbus-cal-factory.c
index 1e29b72..aa0a5f2 100644
--- a/calendar/libegdbus/e-gdbus-cal-factory.c
+++ b/calendar/libegdbus/e-gdbus-cal-factory.c
@@ -74,9 +74,10 @@ e_gdbus_cal_factory_default_init (EGdbusCalFactoryIface *iface)
}
/* encodes source and source type into a strv usable for a wire transfer;
- Free returned pointer with g_strfreev () */
+ * Free returned pointer with g_strfreev () */
gchar **
-e_gdbus_cal_factory_encode_get_cal (const gchar *in_source, guint in_type)
+e_gdbus_cal_factory_encode_get_cal (const gchar *in_source,
+ guint in_type)
{
gchar **strv;
@@ -91,9 +92,11 @@ e_gdbus_cal_factory_encode_get_cal (const gchar *in_source, guint in_type)
}
/* decodes source and source type from a strv recevied from a wire transfer;
- free out_source with g_free (); returns TRUE is successful. */
+ * free out_source with g_free (); returns TRUE is successful. */
gboolean
-e_gdbus_cal_factory_decode_get_cal (const gchar * const * in_strv, gchar **out_source, guint *out_type)
+e_gdbus_cal_factory_decode_get_cal (const gchar * const * in_strv,
+ gchar **out_source,
+ guint *out_type)
{
g_return_val_if_fail (in_strv != NULL, FALSE);
g_return_val_if_fail (in_strv[0] != NULL, FALSE);
@@ -111,7 +114,11 @@ e_gdbus_cal_factory_decode_get_cal (const gchar * const * in_strv, gchar **out_s
/* C Bindings for properties */
void
-e_gdbus_cal_factory_call_get_cal (GDBusProxy *proxy, const gchar * const *in_source_type, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_factory_call_get_cal (GDBusProxy *proxy,
+ const gchar * const *in_source_type,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
/* in_source_type has only two items, the first is ESource, the second is source type */
/* use e_gdbus_cal_factory_encode_get_cal() to encode them */
@@ -125,13 +132,20 @@ e_gdbus_cal_factory_call_get_cal (GDBusProxy *proxy, const gchar * const *in_sou
}
gboolean
-e_gdbus_cal_factory_call_get_cal_finish (GDBusProxy *proxy, GAsyncResult *result, gchar **out_path, GError **error)
+e_gdbus_cal_factory_call_get_cal_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar **out_path,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_string (proxy, result, out_path, error);
}
gboolean
-e_gdbus_cal_factory_call_get_cal_sync (GDBusProxy *proxy, const gchar * const *in_source_type, gchar **out_path, GCancellable *cancellable, GError **error)
+e_gdbus_cal_factory_call_get_cal_sync (GDBusProxy *proxy,
+ const gchar * const *in_source_type,
+ gchar **out_path,
+ GCancellable *cancellable,
+ GError **error)
{
/* in_source_type has only two items, the first is ESource, the second is source type */
/* use e_gdbus_cal_factory_encode_get_cal() to encode them */
@@ -145,7 +159,10 @@ e_gdbus_cal_factory_call_get_cal_sync (GDBusProxy *proxy, const gchar * const *i
}
void
-e_gdbus_cal_factory_complete_get_cal (EGdbusCalFactory *object, GDBusMethodInvocation *invocation, const gchar *out_path, const GError *error)
+e_gdbus_cal_factory_complete_get_cal (EGdbusCalFactory *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *out_path,
+ const GError *error)
{
e_gdbus_complete_sync_method_string (object, invocation, out_path, error);
}
@@ -168,14 +185,14 @@ static const GDBusInterfaceInfo _e_gdbus_cal_factory_interface_info =
};
static void
-handle_method_call (GDBusConnection *connection,
- const gchar *sender,
- const gchar *object_path,
- const gchar *interface_name,
- const gchar *method_name,
- GVariant *parameters,
+handle_method_call (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *method_name,
+ GVariant *parameters,
GDBusMethodInvocation *invocation,
- gpointer user_data)
+ gpointer user_data)
{
guint method_id, method_type;
@@ -189,14 +206,27 @@ handle_method_call (GDBusConnection *connection,
}
static GVariant *
-get_property (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *property_name, GError **error, gpointer user_data)
+get_property (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *property_name,
+ GError **error,
+ gpointer user_data)
{
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "This implementation does not support property `%s'", property_name);
return NULL;
}
static gboolean
-set_property (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *property_name, GVariant *value, GError **error, gpointer user_data)
+set_property (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *property_name,
+ GVariant *value,
+ GError **error,
+ gpointer user_data)
{
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "This implementation does not support property `%s'", property_name);
return FALSE;
@@ -311,7 +341,10 @@ on_object_unregistered (GObject *object)
* Returns: 0 if @error is set, otherwise a registration id (never 0) that can be used with g_dbus_connection_unregister_object().
*/
guint
-e_gdbus_cal_factory_register_object (EGdbusCalFactory *object, GDBusConnection *connection, const gchar *object_path, GError **error)
+e_gdbus_cal_factory_register_object (EGdbusCalFactory *object,
+ GDBusConnection *connection,
+ const gchar *object_path,
+ GError **error)
{
GHashTable *pvc;
@@ -356,17 +389,20 @@ e_gdbus_cal_factory_proxy_init (EGdbusCalFactoryProxy *proxy)
}
static void
-g_signal (GDBusProxy *proxy, const gchar *sender_name, const gchar *signal_name, GVariant *parameters)
+g_signal (GDBusProxy *proxy,
+ const gchar *sender_name,
+ const gchar *signal_name,
+ GVariant *parameters)
{
/*
guint signal_id, signal_type;
-
+ *
signal_id = lookup_signal_id_from_signal_name (signal_name);
signal_type = lookup_signal_type_from_signal_name (signal_name);
-
+ *
g_return_if_fail (signal_id != 0);
g_return_if_fail (signal_type != 0);
-
+ *
e_gdbus_proxy_emit_signal (proxy, parameters, signals[signal_id], signal_type);
*/
}
@@ -400,7 +436,13 @@ proxy_iface_init (EGdbusCalFactoryIface *iface)
* This is a failable asynchronous constructor - when the proxy is ready, callback will be invoked and you can use e_gdbus_cal_factory_proxy_new_finish() to get the result.
*/
void
-e_gdbus_cal_factory_proxy_new (GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_factory_proxy_new (GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
g_async_initable_new_async (E_TYPE_GDBUS_CAL_FACTORY_PROXY,
G_PRIORITY_DEFAULT,
@@ -425,7 +467,8 @@ e_gdbus_cal_factory_proxy_new (GDBusConnection *connection, GDBusProxyFlags flag
* Returns: A #EGdbusCalFactoryProxy or %NULL if @error is set. Free with g_object_unref().
*/
EGdbusCalFactory *
-e_gdbus_cal_factory_proxy_new_finish (GAsyncResult *result, GError **error)
+e_gdbus_cal_factory_proxy_new_finish (GAsyncResult *result,
+ GError **error)
{
GObject *object;
GObject *source_object;
@@ -455,7 +498,12 @@ e_gdbus_cal_factory_proxy_new_finish (GAsyncResult *result, GError **error)
* Returns: A #EGdbusCalFactoryProxy or %NULL if error is set. Free with g_object_unref().
*/
EGdbusCalFactory *
-e_gdbus_cal_factory_proxy_new_sync (GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GError **error)
+e_gdbus_cal_factory_proxy_new_sync (GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
{
GInitable *initable;
initable = g_initable_new (E_TYPE_GDBUS_CAL_FACTORY_PROXY,
@@ -488,7 +536,13 @@ e_gdbus_cal_factory_proxy_new_sync (GDBusConnection *connection, GDBusProxyFlags
* This is a failable asynchronous constructor - when the proxy is ready, callback will be invoked and you can use e_gdbus_cal_factory_proxy_new_for_bus_finish() to get the result.
*/
void
-e_gdbus_cal_factory_proxy_new_for_bus (GBusType bus_type, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_factory_proxy_new_for_bus (GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
g_async_initable_new_async (E_TYPE_GDBUS_CAL_FACTORY_PROXY,
G_PRIORITY_DEFAULT,
@@ -513,7 +567,8 @@ e_gdbus_cal_factory_proxy_new_for_bus (GBusType bus_type, GDBusProxyFlags flags,
* Returns: A #EGdbusCalFactoryProxy or %NULL if @error is set. Free with g_object_unref().
*/
EGdbusCalFactory *
-e_gdbus_cal_factory_proxy_new_for_bus_finish (GAsyncResult *result, GError **error)
+e_gdbus_cal_factory_proxy_new_for_bus_finish (GAsyncResult *result,
+ GError **error)
{
GObject *object;
GObject *source_object;
@@ -543,7 +598,12 @@ e_gdbus_cal_factory_proxy_new_for_bus_finish (GAsyncResult *result, GError **err
* Returns: A #EGdbusCalFactoryProxy or %NULL if error is set. Free with g_object_unref().
*/
EGdbusCalFactory *
-e_gdbus_cal_factory_proxy_new_for_bus_sync (GBusType bus_type, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GError **error)
+e_gdbus_cal_factory_proxy_new_for_bus_sync (GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
{
GInitable *initable;
initable = g_initable_new (E_TYPE_GDBUS_CAL_FACTORY_PROXY,
diff --git a/calendar/libegdbus/e-gdbus-cal-view.c b/calendar/libegdbus/e-gdbus-cal-view.c
index 28700e2..ed41064 100644
--- a/calendar/libegdbus/e-gdbus-cal-view.c
+++ b/calendar/libegdbus/e-gdbus-cal-view.c
@@ -84,11 +84,16 @@ lookup_signal_type_from_signal_name (const gchar *signal_name)
/* ------------------------------------------------------------------------- */
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_CAL_VIEW_INTERFACE_NAME, objects_added)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_CAL_VIEW_INTERFACE_NAME, objects_modified)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_CAL_VIEW_INTERFACE_NAME, objects_removed)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_UINT_STRING (GDBUS_CAL_VIEW_INTERFACE_NAME, progress)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_CAL_VIEW_INTERFACE_NAME, complete)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_CAL_VIEW_INTERFACE_NAME,
+ objects_added)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_CAL_VIEW_INTERFACE_NAME,
+ objects_modified)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_CAL_VIEW_INTERFACE_NAME,
+ objects_removed)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_UINT_STRING (GDBUS_CAL_VIEW_INTERFACE_NAME,
+ progress)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_CAL_VIEW_INTERFACE_NAME,
+ complete)
static void
e_gdbus_cal_view_default_init (EGdbusCalViewIface *iface)
@@ -114,103 +119,139 @@ e_gdbus_cal_view_default_init (EGdbusCalViewIface *iface)
}
void
-e_gdbus_cal_view_call_start (GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_view_call_start (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_method_call_void ("start", proxy, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_view_call_start_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_view_call_start_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
}
gboolean
-e_gdbus_cal_view_call_start_sync (GDBusProxy *proxy, GCancellable *cancellable, GError **error)
+e_gdbus_cal_view_call_start_sync (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_method_call_sync_void__void ("start", proxy, cancellable, error);
}
void
-e_gdbus_cal_view_call_stop (GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_view_call_stop (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_method_call_void ("stop", proxy, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_view_call_stop_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_view_call_stop_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
}
gboolean
-e_gdbus_cal_view_call_stop_sync (GDBusProxy *proxy, GCancellable *cancellable, GError **error)
+e_gdbus_cal_view_call_stop_sync (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_method_call_sync_void__void ("stop", proxy, cancellable, error);
}
void
-e_gdbus_cal_view_call_dispose (GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_view_call_dispose (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_method_call_void ("dispose", proxy, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_view_call_dispose_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_view_call_dispose_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
}
gboolean
-e_gdbus_cal_view_call_dispose_sync (GDBusProxy *proxy, GCancellable *cancellable, GError **error)
+e_gdbus_cal_view_call_dispose_sync (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_method_call_sync_void__void ("dispose", proxy, cancellable, error);
}
void
-e_gdbus_cal_view_call_set_fields_of_interest (GDBusProxy *proxy, const gchar * const *in_only_fields, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_view_call_set_fields_of_interest (GDBusProxy *proxy,
+ const gchar * const *in_only_fields,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_method_call_strv ("set_fields_of_interest", proxy, in_only_fields, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_view_call_set_fields_of_interest_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_view_call_set_fields_of_interest_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
}
gboolean
-e_gdbus_cal_view_call_set_fields_of_interest_sync (GDBusProxy *proxy, const gchar * const *in_only_fields, GCancellable *cancellable, GError **error)
+e_gdbus_cal_view_call_set_fields_of_interest_sync (GDBusProxy *proxy,
+ const gchar * const *in_only_fields,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_method_call_sync_strv__void ("set_fields_of_interest", proxy, in_only_fields, cancellable, error);
}
void
-e_gdbus_cal_view_emit_objects_added (EGdbusCalView *object, const gchar * const *arg_objects)
+e_gdbus_cal_view_emit_objects_added (EGdbusCalView *object,
+ const gchar * const *arg_objects)
{
g_signal_emit (object, signals[__OBJECTS_ADDED_SIGNAL], 0, arg_objects);
}
void
-e_gdbus_cal_view_emit_objects_modified (EGdbusCalView *object, const gchar * const *arg_objects)
+e_gdbus_cal_view_emit_objects_modified (EGdbusCalView *object,
+ const gchar * const *arg_objects)
{
g_signal_emit (object, signals[__OBJECTS_MODIFIED_SIGNAL], 0, arg_objects);
}
void
-e_gdbus_cal_view_emit_objects_removed (EGdbusCalView *object, const gchar * const *arg_uids)
+e_gdbus_cal_view_emit_objects_removed (EGdbusCalView *object,
+ const gchar * const *arg_uids)
{
g_signal_emit (object, signals[__OBJECTS_REMOVED_SIGNAL], 0, arg_uids);
}
void
-e_gdbus_cal_view_emit_progress (EGdbusCalView *object, guint arg_percent, const gchar *arg_message)
+e_gdbus_cal_view_emit_progress (EGdbusCalView *object,
+ guint arg_percent,
+ const gchar *arg_message)
{
g_signal_emit (object, signals[__PROGRESS_SIGNAL], 0, arg_percent, arg_message);
}
void
-e_gdbus_cal_view_emit_complete (EGdbusCalView *object, const gchar * const *arg_error)
+e_gdbus_cal_view_emit_complete (EGdbusCalView *object,
+ const gchar * const *arg_error)
{
g_signal_emit (object, signals[__COMPLETE_SIGNAL], 0, arg_error);
}
@@ -221,9 +262,12 @@ E_DECLARE_GDBUS_NOTIFY_SIGNAL_1 (cal_view, objects_removed, uids, "as")
E_DECLARE_GDBUS_NOTIFY_SIGNAL_2 (cal_view, progress, percent, "u", message, "s")
E_DECLARE_GDBUS_NOTIFY_SIGNAL_1 (cal_view, complete, error, "as")
-E_DECLARE_GDBUS_SYNC_METHOD_0 (cal_view, start)
-E_DECLARE_GDBUS_SYNC_METHOD_0 (cal_view, stop)
-E_DECLARE_GDBUS_SYNC_METHOD_0 (cal_view, dispose)
+E_DECLARE_GDBUS_SYNC_METHOD_0 (cal_view,
+ start)
+E_DECLARE_GDBUS_SYNC_METHOD_0 (cal_view,
+ stop)
+E_DECLARE_GDBUS_SYNC_METHOD_0 (cal_view,
+ dispose)
E_DECLARE_GDBUS_SYNC_METHOD_1 (cal_view, set_fields_of_interest, fields_of_interest, "as")
static const GDBusMethodInfo * const e_gdbus_cal_view_method_info_pointers[] =
@@ -255,14 +299,14 @@ static const GDBusInterfaceInfo _e_gdbus_cal_view_interface_info =
};
static void
-handle_method_call (GDBusConnection *connection,
- const gchar *sender,
- const gchar *object_path,
- const gchar *interface_name,
- const gchar *method_name,
- GVariant *parameters,
+handle_method_call (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *method_name,
+ GVariant *parameters,
GDBusMethodInvocation *invocation,
- gpointer user_data)
+ gpointer user_data)
{
guint method_id, method_type;
@@ -276,14 +320,27 @@ handle_method_call (GDBusConnection *connection,
}
static GVariant *
-get_property (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *property_name, GError **error, gpointer user_data)
+get_property (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *property_name,
+ GError **error,
+ gpointer user_data)
{
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "This implementation does not support property `%s'", property_name);
return NULL;
}
static gboolean
-set_property (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *property_name, GVariant *value, GError **error, gpointer user_data)
+set_property (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *property_name,
+ GVariant *value,
+ GError **error,
+ gpointer user_data)
{
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "This implementation does not support property `%s'", property_name);
return FALSE;
@@ -398,7 +455,10 @@ on_object_unregistered (GObject *object)
* Returns: 0 if @error is set, otherwise a registration id (never 0) that can be used with g_dbus_connection_unregister_object().
*/
guint
-e_gdbus_cal_view_register_object (EGdbusCalView *object, GDBusConnection *connection, const gchar *object_path, GError **error)
+e_gdbus_cal_view_register_object (EGdbusCalView *object,
+ GDBusConnection *connection,
+ const gchar *object_path,
+ GError **error)
{
GHashTable *pvc;
@@ -443,7 +503,10 @@ e_gdbus_cal_view_proxy_init (EGdbusCalViewProxy *proxy)
}
static void
-g_signal (GDBusProxy *proxy, const gchar *sender_name, const gchar *signal_name, GVariant *parameters)
+g_signal (GDBusProxy *proxy,
+ const gchar *sender_name,
+ const gchar *signal_name,
+ GVariant *parameters)
{
guint signal_id, signal_type;
@@ -485,7 +548,13 @@ proxy_iface_init (EGdbusCalViewIface *iface)
* This is a failable asynchronous constructor - when the proxy is ready, callback will be invoked and you can use e_gdbus_cal_view_proxy_new_finish() to get the result.
*/
void
-e_gdbus_cal_view_proxy_new (GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_view_proxy_new (GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
g_async_initable_new_async (E_TYPE_GDBUS_CAL_VIEW_PROXY,
G_PRIORITY_DEFAULT,
@@ -510,7 +579,8 @@ e_gdbus_cal_view_proxy_new (GDBusConnection *connection, GDBusProxyFlags flags,
* Returns: A #EGdbusCalViewProxy or %NULL if @error is set. Free with g_object_unref().
*/
EGdbusCalView *
-e_gdbus_cal_view_proxy_new_finish (GAsyncResult *result, GError **error)
+e_gdbus_cal_view_proxy_new_finish (GAsyncResult *result,
+ GError **error)
{
GObject *object;
GObject *source_object;
@@ -540,7 +610,12 @@ e_gdbus_cal_view_proxy_new_finish (GAsyncResult *result, GError **error)
* Returns: A #EGdbusCalViewProxy or %NULL if error is set. Free with g_object_unref().
*/
EGdbusCalView *
-e_gdbus_cal_view_proxy_new_sync (GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GError **error)
+e_gdbus_cal_view_proxy_new_sync (GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
{
GInitable *initable;
initable = g_initable_new (E_TYPE_GDBUS_CAL_VIEW_PROXY,
@@ -573,7 +648,13 @@ e_gdbus_cal_view_proxy_new_sync (GDBusConnection *connection, GDBusProxyFlags fl
* This is a failable asynchronous constructor - when the proxy is ready, callback will be invoked and you can use e_gdbus_cal_view_proxy_new_for_bus_finish() to get the result.
*/
void
-e_gdbus_cal_view_proxy_new_for_bus (GBusType bus_type, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_view_proxy_new_for_bus (GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
g_async_initable_new_async (E_TYPE_GDBUS_CAL_VIEW_PROXY,
G_PRIORITY_DEFAULT,
@@ -598,7 +679,8 @@ e_gdbus_cal_view_proxy_new_for_bus (GBusType bus_type, GDBusProxyFlags flags, co
* Returns: A #EGdbusCalViewProxy or %NULL if @error is set. Free with g_object_unref().
*/
EGdbusCalView *
-e_gdbus_cal_view_proxy_new_for_bus_finish (GAsyncResult *result, GError **error)
+e_gdbus_cal_view_proxy_new_for_bus_finish (GAsyncResult *result,
+ GError **error)
{
GObject *object;
GObject *source_object;
@@ -628,7 +710,12 @@ e_gdbus_cal_view_proxy_new_for_bus_finish (GAsyncResult *result, GError **error
* Returns: A #EGdbusCalViewProxy or %NULL if error is set. Free with g_object_unref().
*/
EGdbusCalView *
-e_gdbus_cal_view_proxy_new_for_bus_sync (GBusType bus_type, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GError **error)
+e_gdbus_cal_view_proxy_new_for_bus_sync (GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
{
GInitable *initable;
initable = g_initable_new (E_TYPE_GDBUS_CAL_VIEW_PROXY,
diff --git a/calendar/libegdbus/e-gdbus-cal.c b/calendar/libegdbus/e-gdbus-cal.c
index 9e747c3..fb7aefb 100644
--- a/calendar/libegdbus/e-gdbus-cal.c
+++ b/calendar/libegdbus/e-gdbus-cal.c
@@ -128,32 +128,57 @@ lookup_signal_type_from_signal_name (const gchar *signal_name)
/* ------------------------------------------------------------------------- */
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRING (GDBUS_CAL_INTERFACE_NAME, backend_error)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_BOOLEAN (GDBUS_CAL_INTERFACE_NAME, readonly)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_BOOLEAN (GDBUS_CAL_INTERFACE_NAME, online)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_CAL_INTERFACE_NAME, auth_required)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_CAL_INTERFACE_NAME, opened)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_CAL_INTERFACE_NAME, free_busy_data)
-E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_CAL_INTERFACE_NAME, backend_property_changed)
-
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME, open)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME, remove)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME, refresh)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_CAL_INTERFACE_NAME, get_backend_property)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME, set_backend_property)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_CAL_INTERFACE_NAME, get_object)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRV (GDBUS_CAL_INTERFACE_NAME, get_object_list)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME, get_free_busy)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_CAL_INTERFACE_NAME, create_object)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME, modify_object)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME, remove_object)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME, receive_objects)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRV (GDBUS_CAL_INTERFACE_NAME, send_objects)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRV (GDBUS_CAL_INTERFACE_NAME, get_attachment_uris)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME, discard_alarm)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_CAL_INTERFACE_NAME, get_view)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_CAL_INTERFACE_NAME, get_timezone)
-E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME, add_timezone)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRING (GDBUS_CAL_INTERFACE_NAME,
+ backend_error)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_BOOLEAN (GDBUS_CAL_INTERFACE_NAME,
+ readonly)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_BOOLEAN (GDBUS_CAL_INTERFACE_NAME,
+ online)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_CAL_INTERFACE_NAME,
+ auth_required)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_CAL_INTERFACE_NAME,
+ opened)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_CAL_INTERFACE_NAME,
+ free_busy_data)
+E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_STRV (GDBUS_CAL_INTERFACE_NAME,
+ backend_property_changed)
+
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME,
+ open)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME,
+ remove)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME,
+ refresh)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_CAL_INTERFACE_NAME,
+ get_backend_property)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME,
+ set_backend_property)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_CAL_INTERFACE_NAME,
+ get_object)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRV (GDBUS_CAL_INTERFACE_NAME,
+ get_object_list)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME,
+ get_free_busy)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_CAL_INTERFACE_NAME,
+ create_object)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME,
+ modify_object)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME,
+ remove_object)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME,
+ receive_objects)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRV (GDBUS_CAL_INTERFACE_NAME,
+ send_objects)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRV (GDBUS_CAL_INTERFACE_NAME,
+ get_attachment_uris)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME,
+ discard_alarm)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_CAL_INTERFACE_NAME,
+ get_view)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_STRING (GDBUS_CAL_INTERFACE_NAME,
+ get_timezone)
+E_DECLARE_GDBUS_METHOD_DONE_EMISSION_HOOK_ASYNC_VOID (GDBUS_CAL_INTERFACE_NAME,
+ add_timezone)
static void
e_gdbus_cal_default_init (EGdbusCalIface *iface)
@@ -199,19 +224,28 @@ e_gdbus_cal_default_init (EGdbusCalIface *iface)
}
void
-e_gdbus_cal_call_open (GDBusProxy *proxy, gboolean in_only_if_exists, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_open (GDBusProxy *proxy,
+ gboolean in_only_if_exists,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_boolean ("open", e_gdbus_cal_call_open, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_only_if_exists, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_open_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_call_open_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_finish_call_void (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, error, e_gdbus_cal_call_open);
}
gboolean
-e_gdbus_cal_call_open_sync (GDBusProxy *proxy, gboolean in_only_if_exists, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_open_sync (GDBusProxy *proxy,
+ gboolean in_only_if_exists,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_boolean__void (proxy, in_only_if_exists, cancellable, error,
e_gdbus_cal_call_open,
@@ -219,19 +253,26 @@ e_gdbus_cal_call_open_sync (GDBusProxy *proxy, gboolean in_only_if_exists, GCanc
}
void
-e_gdbus_cal_call_remove (GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_remove (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_void ("remove", e_gdbus_cal_call_remove, E_GDBUS_ASYNC_OP_KEEPER (proxy), cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_remove_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_call_remove_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_finish_call_void (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, error, e_gdbus_cal_call_remove);
}
gboolean
-e_gdbus_cal_call_remove_sync (GDBusProxy *proxy, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_remove_sync (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_void__void (proxy, cancellable, error,
e_gdbus_cal_call_remove,
@@ -239,19 +280,26 @@ e_gdbus_cal_call_remove_sync (GDBusProxy *proxy, GCancellable *cancellable, GErr
}
void
-e_gdbus_cal_call_refresh (GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_refresh (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_void ("refresh", e_gdbus_cal_call_refresh, E_GDBUS_ASYNC_OP_KEEPER (proxy), cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_refresh_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_call_refresh_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_finish_call_void (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, error, e_gdbus_cal_call_refresh);
}
gboolean
-e_gdbus_cal_call_refresh_sync (GDBusProxy *proxy, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_refresh_sync (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_void__void (proxy, cancellable, error,
e_gdbus_cal_call_refresh,
@@ -259,19 +307,30 @@ e_gdbus_cal_call_refresh_sync (GDBusProxy *proxy, GCancellable *cancellable, GEr
}
void
-e_gdbus_cal_call_get_backend_property (GDBusProxy *proxy, const gchar *in_prop_name, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_get_backend_property (GDBusProxy *proxy,
+ const gchar *in_prop_name,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_string ("get_backend_property", e_gdbus_cal_call_get_backend_property, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_prop_name, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_get_backend_property_finish (GDBusProxy *proxy, GAsyncResult *result, gchar **out_prop_value, GError **error)
+e_gdbus_cal_call_get_backend_property_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar **out_prop_value,
+ GError **error)
{
return e_gdbus_proxy_finish_call_string (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, out_prop_value, error, e_gdbus_cal_call_get_backend_property);
}
gboolean
-e_gdbus_cal_call_get_backend_property_sync (GDBusProxy *proxy, const gchar *in_prop_name, gchar **out_prop_value, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_get_backend_property_sync (GDBusProxy *proxy,
+ const gchar *in_prop_name,
+ gchar **out_prop_value,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_string__string (proxy, in_prop_name, out_prop_value, cancellable, error,
e_gdbus_cal_call_get_backend_property,
@@ -280,32 +339,44 @@ e_gdbus_cal_call_get_backend_property_sync (GDBusProxy *proxy, const gchar *in_p
/* free returned pointer with g_strfreev() */
gchar **
-e_gdbus_cal_encode_set_backend_property (const gchar *in_prop_name, const gchar *in_prop_value)
+e_gdbus_cal_encode_set_backend_property (const gchar *in_prop_name,
+ const gchar *in_prop_value)
{
return e_gdbus_templates_encode_two_strings (in_prop_name, in_prop_value);
}
/* free out_prop_name and out_prop_value with g_free() */
gboolean
-e_gdbus_cal_decode_set_backend_property (const gchar * const *in_strv, gchar **out_prop_name, gchar **out_prop_value)
+e_gdbus_cal_decode_set_backend_property (const gchar * const *in_strv,
+ gchar **out_prop_name,
+ gchar **out_prop_value)
{
return e_gdbus_templates_decode_two_strings (in_strv, out_prop_name, out_prop_value);
}
void
-e_gdbus_cal_call_set_backend_property (GDBusProxy *proxy, const gchar * const *in_prop_name_value, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_set_backend_property (GDBusProxy *proxy,
+ const gchar * const *in_prop_name_value,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_strv ("set_backend_property", e_gdbus_cal_call_set_backend_property, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_prop_name_value, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_set_backend_property_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_call_set_backend_property_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_finish_call_void (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, error, e_gdbus_cal_call_set_backend_property);
}
gboolean
-e_gdbus_cal_call_set_backend_property_sync (GDBusProxy *proxy, const gchar * const *in_prop_name_value, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_set_backend_property_sync (GDBusProxy *proxy,
+ const gchar * const *in_prop_name_value,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_strv__void (proxy, in_prop_name_value, cancellable, error,
e_gdbus_cal_call_set_backend_property,
@@ -314,32 +385,46 @@ e_gdbus_cal_call_set_backend_property_sync (GDBusProxy *proxy, const gchar * con
/* free returned pointer with g_strfreev() */
gchar **
-e_gdbus_cal_encode_get_object (const gchar *in_uid, const gchar *in_rid)
+e_gdbus_cal_encode_get_object (const gchar *in_uid,
+ const gchar *in_rid)
{
return e_gdbus_templates_encode_two_strings (in_uid, in_rid);
}
/* free out_uid and out_rid with g_free() */
gboolean
-e_gdbus_cal_decode_get_object (const gchar * const *in_strv, gchar **out_uid, gchar **out_rid)
+e_gdbus_cal_decode_get_object (const gchar * const *in_strv,
+ gchar **out_uid,
+ gchar **out_rid)
{
return e_gdbus_templates_decode_two_strings (in_strv, out_uid, out_rid);
}
void
-e_gdbus_cal_call_get_object (GDBusProxy *proxy, const gchar * const *in_uid_rid, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_get_object (GDBusProxy *proxy,
+ const gchar * const *in_uid_rid,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_strv ("get_object", e_gdbus_cal_call_get_object, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_uid_rid, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_get_object_finish (GDBusProxy *proxy, GAsyncResult *result, gchar **out_object, GError **error)
+e_gdbus_cal_call_get_object_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar **out_object,
+ GError **error)
{
return e_gdbus_proxy_finish_call_string (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, out_object, error, e_gdbus_cal_call_get_object);
}
gboolean
-e_gdbus_cal_call_get_object_sync (GDBusProxy *proxy, const gchar * const *in_uid_rid, gchar **out_object, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_get_object_sync (GDBusProxy *proxy,
+ const gchar * const *in_uid_rid,
+ gchar **out_object,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_strv__string (proxy, in_uid_rid, out_object, cancellable, error,
e_gdbus_cal_call_get_object,
@@ -347,19 +432,30 @@ e_gdbus_cal_call_get_object_sync (GDBusProxy *proxy, const gchar * const *in_uid
}
void
-e_gdbus_cal_call_get_object_list (GDBusProxy *proxy, const gchar *in_sexp, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_get_object_list (GDBusProxy *proxy,
+ const gchar *in_sexp,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_string ("get_object_list", e_gdbus_cal_call_get_object_list, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_sexp, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_get_object_list_finish (GDBusProxy *proxy, GAsyncResult *result, gchar ***out_objects, GError **error)
+e_gdbus_cal_call_get_object_list_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar ***out_objects,
+ GError **error)
{
return e_gdbus_proxy_finish_call_strv (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, out_objects, error, e_gdbus_cal_call_get_object_list);
}
gboolean
-e_gdbus_cal_call_get_object_list_sync (GDBusProxy *proxy, const gchar *in_sexp, gchar ***out_objects, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_get_object_list_sync (GDBusProxy *proxy,
+ const gchar *in_sexp,
+ gchar ***out_objects,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_string__strv (proxy, in_sexp, out_objects, cancellable, error,
e_gdbus_cal_call_get_object_list,
@@ -368,7 +464,9 @@ e_gdbus_cal_call_get_object_list_sync (GDBusProxy *proxy, const gchar *in_sexp,
/* free returned pointer with g_strfreev() */
gchar **
-e_gdbus_cal_encode_get_free_busy (guint in_start, guint in_end, const GSList *in_users)
+e_gdbus_cal_encode_get_free_busy (guint in_start,
+ guint in_end,
+ const GSList *in_users)
{
gchar **strv;
gint ii;
@@ -390,7 +488,10 @@ e_gdbus_cal_encode_get_free_busy (guint in_start, guint in_end, const GSList *in
/* free out_users with g_slist_foreach (out_users, (GFunc) g_free, NULL), g_slist_free (out_users); */
gboolean
-e_gdbus_cal_decode_get_free_busy (const gchar * const *in_strv, guint *out_start, guint *out_end, GSList **out_users)
+e_gdbus_cal_decode_get_free_busy (const gchar * const *in_strv,
+ guint *out_start,
+ guint *out_end,
+ GSList **out_users)
{
gint ii;
@@ -415,19 +516,28 @@ e_gdbus_cal_decode_get_free_busy (const gchar * const *in_strv, guint *out_start
}
void
-e_gdbus_cal_call_get_free_busy (GDBusProxy *proxy, const gchar * const *in_start_end_userlist, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_get_free_busy (GDBusProxy *proxy,
+ const gchar * const *in_start_end_userlist,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_strv ("get_free_busy", e_gdbus_cal_call_get_free_busy, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_start_end_userlist, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_get_free_busy_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_call_get_free_busy_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_finish_call_void (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, error, e_gdbus_cal_call_get_free_busy);
}
gboolean
-e_gdbus_cal_call_get_free_busy_sync (GDBusProxy *proxy, const gchar * const *in_start_end_userlist, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_get_free_busy_sync (GDBusProxy *proxy,
+ const gchar * const *in_start_end_userlist,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_strv__void (proxy, in_start_end_userlist, cancellable, error,
e_gdbus_cal_call_get_free_busy,
@@ -435,19 +545,30 @@ e_gdbus_cal_call_get_free_busy_sync (GDBusProxy *proxy, const gchar * const *in_
}
void
-e_gdbus_cal_call_create_object (GDBusProxy *proxy, const gchar *in_calobj, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_create_object (GDBusProxy *proxy,
+ const gchar *in_calobj,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_string ("create_object", e_gdbus_cal_call_create_object, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_calobj, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_create_object_finish (GDBusProxy *proxy, GAsyncResult *result, gchar **out_uid, GError **error)
+e_gdbus_cal_call_create_object_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar **out_uid,
+ GError **error)
{
return e_gdbus_proxy_finish_call_string (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, out_uid, error, e_gdbus_cal_call_create_object);
}
gboolean
-e_gdbus_cal_call_create_object_sync (GDBusProxy *proxy, const gchar *in_calobj, gchar **out_uid, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_create_object_sync (GDBusProxy *proxy,
+ const gchar *in_calobj,
+ gchar **out_uid,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_string__string (proxy, in_calobj, out_uid, cancellable, error,
e_gdbus_cal_call_create_object,
@@ -456,7 +577,8 @@ e_gdbus_cal_call_create_object_sync (GDBusProxy *proxy, const gchar *in_calobj,
/* free returned pointer with g_strfreev() */
gchar **
-e_gdbus_cal_encode_modify_object (const gchar *in_calobj, guint in_mod)
+e_gdbus_cal_encode_modify_object (const gchar *in_calobj,
+ guint in_mod)
{
gchar **strv;
@@ -472,7 +594,9 @@ e_gdbus_cal_encode_modify_object (const gchar *in_calobj, guint in_mod)
/* free out_calobj with g_free() */
gboolean
-e_gdbus_cal_decode_modify_object (const gchar * const *in_strv, gchar **out_calobj, guint *out_mod)
+e_gdbus_cal_decode_modify_object (const gchar * const *in_strv,
+ gchar **out_calobj,
+ guint *out_mod)
{
g_return_val_if_fail (in_strv != NULL, FALSE);
g_return_val_if_fail (in_strv[0] != NULL, FALSE);
@@ -488,19 +612,28 @@ e_gdbus_cal_decode_modify_object (const gchar * const *in_strv, gchar **out_calo
}
void
-e_gdbus_cal_call_modify_object (GDBusProxy *proxy, const gchar * const *in_calobj_mod, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_modify_object (GDBusProxy *proxy,
+ const gchar * const *in_calobj_mod,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_strv ("modify_object", e_gdbus_cal_call_modify_object, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_calobj_mod, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_modify_object_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_call_modify_object_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_finish_call_void (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, error, e_gdbus_cal_call_modify_object);
}
gboolean
-e_gdbus_cal_call_modify_object_sync (GDBusProxy *proxy, const gchar * const *in_calobj_mod, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_modify_object_sync (GDBusProxy *proxy,
+ const gchar * const *in_calobj_mod,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_strv__void (proxy, in_calobj_mod, cancellable, error,
e_gdbus_cal_call_modify_object,
@@ -509,7 +642,9 @@ e_gdbus_cal_call_modify_object_sync (GDBusProxy *proxy, const gchar * const *in_
/* free returned pointer with g_strfreev() */
gchar **
-e_gdbus_cal_encode_remove_object (const gchar *in_uid, const gchar *in_rid, guint in_mod)
+e_gdbus_cal_encode_remove_object (const gchar *in_uid,
+ const gchar *in_rid,
+ guint in_mod)
{
gchar **strv;
@@ -526,7 +661,10 @@ e_gdbus_cal_encode_remove_object (const gchar *in_uid, const gchar *in_rid, guin
/* free out_uid and out_rid with g_free() */
gboolean
-e_gdbus_cal_decode_remove_object (const gchar * const *in_strv, gchar **out_uid, gchar **out_rid, guint *out_mod)
+e_gdbus_cal_decode_remove_object (const gchar * const *in_strv,
+ gchar **out_uid,
+ gchar **out_rid,
+ guint *out_mod)
{
g_return_val_if_fail (in_strv != NULL, FALSE);
g_return_val_if_fail (in_strv[0] != NULL, FALSE);
@@ -545,19 +683,28 @@ e_gdbus_cal_decode_remove_object (const gchar * const *in_strv, gchar **out_uid,
}
void
-e_gdbus_cal_call_remove_object (GDBusProxy *proxy, const gchar * const *in_uid_rid_mod, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_remove_object (GDBusProxy *proxy,
+ const gchar * const *in_uid_rid_mod,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_strv ("remove_object", e_gdbus_cal_call_remove_object, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_uid_rid_mod, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_remove_object_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_call_remove_object_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_finish_call_void (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, error, e_gdbus_cal_call_remove_object);
}
gboolean
-e_gdbus_cal_call_remove_object_sync (GDBusProxy *proxy, const gchar * const *in_uid_rid_mod, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_remove_object_sync (GDBusProxy *proxy,
+ const gchar * const *in_uid_rid_mod,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_strv__void (proxy, in_uid_rid_mod, cancellable, error,
e_gdbus_cal_call_remove_object,
@@ -565,19 +712,28 @@ e_gdbus_cal_call_remove_object_sync (GDBusProxy *proxy, const gchar * const *in_
}
void
-e_gdbus_cal_call_receive_objects (GDBusProxy *proxy, const gchar *in_calobj, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_receive_objects (GDBusProxy *proxy,
+ const gchar *in_calobj,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_string ("receive_objects", e_gdbus_cal_call_receive_objects, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_calobj, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_receive_objects_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_call_receive_objects_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_finish_call_void (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, error, e_gdbus_cal_call_receive_objects);
}
gboolean
-e_gdbus_cal_call_receive_objects_sync (GDBusProxy *proxy, const gchar *in_calobj, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_receive_objects_sync (GDBusProxy *proxy,
+ const gchar *in_calobj,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_string__void (proxy, in_calobj, cancellable, error,
e_gdbus_cal_call_receive_objects,
@@ -586,7 +742,8 @@ e_gdbus_cal_call_receive_objects_sync (GDBusProxy *proxy, const gchar *in_calobj
/* free returned pointer with g_strfreev() */
gchar **
-e_gdbus_cal_encode_send_objects (const gchar *in_calobj, const GSList *in_users)
+e_gdbus_cal_encode_send_objects (const gchar *in_calobj,
+ const GSList *in_users)
{
gint ii;
gchar **strv;
@@ -605,7 +762,9 @@ e_gdbus_cal_encode_send_objects (const gchar *in_calobj, const GSList *in_users)
/* free out_calobj with g_free() and out_users with g_strfreev() */
gboolean
-e_gdbus_cal_decode_send_objects (const gchar * const *in_strv, gchar **out_calobj, GSList **out_users)
+e_gdbus_cal_decode_send_objects (const gchar * const *in_strv,
+ gchar **out_calobj,
+ GSList **out_users)
{
gint ii;
@@ -627,19 +786,30 @@ e_gdbus_cal_decode_send_objects (const gchar * const *in_strv, gchar **out_calob
}
void
-e_gdbus_cal_call_send_objects (GDBusProxy *proxy, const gchar *in_calobj, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_send_objects (GDBusProxy *proxy,
+ const gchar *in_calobj,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_string ("send_objects", e_gdbus_cal_call_send_objects, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_calobj, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_send_objects_finish (GDBusProxy *proxy, GAsyncResult *result, gchar ***out_calobj_users, GError **error)
+e_gdbus_cal_call_send_objects_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar ***out_calobj_users,
+ GError **error)
{
return e_gdbus_proxy_finish_call_strv (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, out_calobj_users, error, e_gdbus_cal_call_send_objects);
}
gboolean
-e_gdbus_cal_call_send_objects_sync (GDBusProxy *proxy, const gchar *in_calobj, gchar ***out_calobj_users, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_send_objects_sync (GDBusProxy *proxy,
+ const gchar *in_calobj,
+ gchar ***out_calobj_users,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_string__strv (proxy, in_calobj, out_calobj_users, cancellable, error,
e_gdbus_cal_call_send_objects,
@@ -648,32 +818,46 @@ e_gdbus_cal_call_send_objects_sync (GDBusProxy *proxy, const gchar *in_calobj, g
/* free returned pointer with g_strfreev() */
gchar **
-e_gdbus_cal_encode_get_attachment_uris (const gchar *in_uid, const gchar *in_rid)
+e_gdbus_cal_encode_get_attachment_uris (const gchar *in_uid,
+ const gchar *in_rid)
{
return e_gdbus_templates_encode_two_strings (in_uid, in_rid);
}
/* free out_uid and out_rid with g_free() */
gboolean
-e_gdbus_cal_decode_get_attachment_uris (const gchar * const *in_strv, gchar **out_uid, gchar **out_rid)
+e_gdbus_cal_decode_get_attachment_uris (const gchar * const *in_strv,
+ gchar **out_uid,
+ gchar **out_rid)
{
return e_gdbus_templates_decode_two_strings (in_strv, out_uid, out_rid);
}
void
-e_gdbus_cal_call_get_attachment_uris (GDBusProxy *proxy, const gchar * const *in_uid_rid, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_get_attachment_uris (GDBusProxy *proxy,
+ const gchar * const *in_uid_rid,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_strv ("get_attachment_uris", e_gdbus_cal_call_get_attachment_uris, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_uid_rid, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_get_attachment_uris_finish (GDBusProxy *proxy, GAsyncResult *result, gchar ***out_attachments, GError **error)
+e_gdbus_cal_call_get_attachment_uris_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar ***out_attachments,
+ GError **error)
{
return e_gdbus_proxy_finish_call_strv (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, out_attachments, error, e_gdbus_cal_call_get_attachment_uris);
}
gboolean
-e_gdbus_cal_call_get_attachment_uris_sync (GDBusProxy *proxy, const gchar * const *in_uid_rid, gchar ***out_attachments, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_get_attachment_uris_sync (GDBusProxy *proxy,
+ const gchar * const *in_uid_rid,
+ gchar ***out_attachments,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_strv__strv (proxy, in_uid_rid, out_attachments, cancellable, error,
e_gdbus_cal_call_get_attachment_uris,
@@ -682,7 +866,9 @@ e_gdbus_cal_call_get_attachment_uris_sync (GDBusProxy *proxy, const gchar * cons
/* free returned pointer with g_strfreev() */
gchar **
-e_gdbus_cal_encode_discard_alarm (const gchar *in_uid, const gchar *in_rid, const gchar *in_auid)
+e_gdbus_cal_encode_discard_alarm (const gchar *in_uid,
+ const gchar *in_rid,
+ const gchar *in_auid)
{
gchar **strv;
@@ -697,7 +883,10 @@ e_gdbus_cal_encode_discard_alarm (const gchar *in_uid, const gchar *in_rid, cons
/* free out_uid, out_rid and out_auid with g_free() */
gboolean
-e_gdbus_cal_decode_discard_alarm (const gchar * const *in_strv, gchar **out_uid, gchar **out_rid, gchar **out_auid)
+e_gdbus_cal_decode_discard_alarm (const gchar * const *in_strv,
+ gchar **out_uid,
+ gchar **out_rid,
+ gchar **out_auid)
{
g_return_val_if_fail (in_strv != NULL, FALSE);
g_return_val_if_fail (in_strv[0] != NULL, FALSE);
@@ -716,19 +905,28 @@ e_gdbus_cal_decode_discard_alarm (const gchar * const *in_strv, gchar **out_uid,
}
void
-e_gdbus_cal_call_discard_alarm (GDBusProxy *proxy, const gchar * const *in_uid_rid_auid, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_discard_alarm (GDBusProxy *proxy,
+ const gchar * const *in_uid_rid_auid,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_strv ("discard_alarm", e_gdbus_cal_call_discard_alarm, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_uid_rid_auid, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_discard_alarm_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_call_discard_alarm_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_finish_call_void (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, error, e_gdbus_cal_call_discard_alarm);
}
gboolean
-e_gdbus_cal_call_discard_alarm_sync (GDBusProxy *proxy, const gchar * const *in_uid_rid_auid, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_discard_alarm_sync (GDBusProxy *proxy,
+ const gchar * const *in_uid_rid_auid,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_strv__void (proxy, in_uid_rid_auid, cancellable, error,
e_gdbus_cal_call_discard_alarm,
@@ -736,19 +934,30 @@ e_gdbus_cal_call_discard_alarm_sync (GDBusProxy *proxy, const gchar * const *in_
}
void
-e_gdbus_cal_call_get_view (GDBusProxy *proxy, const gchar *in_sexp, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_get_view (GDBusProxy *proxy,
+ const gchar *in_sexp,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_string ("get_view", e_gdbus_cal_call_get_view, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_sexp, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_get_view_finish (GDBusProxy *proxy, GAsyncResult *result, gchar **out_view_path, GError **error)
+e_gdbus_cal_call_get_view_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar **out_view_path,
+ GError **error)
{
return e_gdbus_proxy_finish_call_string (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, out_view_path, error, e_gdbus_cal_call_get_view);
}
gboolean
-e_gdbus_cal_call_get_view_sync (GDBusProxy *proxy, const gchar *in_sexp, gchar **out_view_path, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_get_view_sync (GDBusProxy *proxy,
+ const gchar *in_sexp,
+ gchar **out_view_path,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_string__string (proxy, in_sexp, out_view_path, cancellable, error,
e_gdbus_cal_call_get_view,
@@ -756,19 +965,30 @@ e_gdbus_cal_call_get_view_sync (GDBusProxy *proxy, const gchar *in_sexp, gchar *
}
void
-e_gdbus_cal_call_get_timezone (GDBusProxy *proxy, const gchar *in_tzid, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_get_timezone (GDBusProxy *proxy,
+ const gchar *in_tzid,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_string ("get_timezone", e_gdbus_cal_call_get_timezone, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_tzid, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_get_timezone_finish (GDBusProxy *proxy, GAsyncResult *result, gchar **out_tzobject, GError **error)
+e_gdbus_cal_call_get_timezone_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar **out_tzobject,
+ GError **error)
{
return e_gdbus_proxy_finish_call_string (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, out_tzobject, error, e_gdbus_cal_call_get_timezone);
}
gboolean
-e_gdbus_cal_call_get_timezone_sync (GDBusProxy *proxy, const gchar *in_tzid, gchar **out_tzobject, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_get_timezone_sync (GDBusProxy *proxy,
+ const gchar *in_tzid,
+ gchar **out_tzobject,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_string__string (proxy, in_tzid, out_tzobject, cancellable, error,
e_gdbus_cal_call_get_timezone,
@@ -776,19 +996,28 @@ e_gdbus_cal_call_get_timezone_sync (GDBusProxy *proxy, const gchar *in_tzid, gch
}
void
-e_gdbus_cal_call_add_timezone (GDBusProxy *proxy, const gchar *in_tzobject, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_add_timezone (GDBusProxy *proxy,
+ const gchar *in_tzobject,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_call_string ("add_timezone", e_gdbus_cal_call_add_timezone, E_GDBUS_ASYNC_OP_KEEPER (proxy), in_tzobject, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_add_timezone_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_call_add_timezone_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_finish_call_void (E_GDBUS_ASYNC_OP_KEEPER (proxy), result, error, e_gdbus_cal_call_add_timezone);
}
gboolean
-e_gdbus_cal_call_add_timezone_sync (GDBusProxy *proxy, const gchar *in_tzobject, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_add_timezone_sync (GDBusProxy *proxy,
+ const gchar *in_tzobject,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_call_sync_string__void (proxy, in_tzobject, cancellable, error,
e_gdbus_cal_call_add_timezone,
@@ -796,73 +1025,105 @@ e_gdbus_cal_call_add_timezone_sync (GDBusProxy *proxy, const gchar *in_tzobject,
}
void
-e_gdbus_cal_call_authenticate_user (GDBusProxy *proxy, const gchar * const *in_credentials, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_authenticate_user (GDBusProxy *proxy,
+ const gchar * const *in_credentials,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_method_call_strv ("authenticate_user", proxy, in_credentials, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_authenticate_user_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_call_authenticate_user_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
}
gboolean
-e_gdbus_cal_call_authenticate_user_sync (GDBusProxy *proxy, const gchar * const *in_credentials, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_authenticate_user_sync (GDBusProxy *proxy,
+ const gchar * const *in_credentials,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_method_call_sync_strv__void ("authenticate_user", proxy, in_credentials, cancellable, error);
}
void
-e_gdbus_cal_call_cancel_operation (GDBusProxy *proxy, guint in_opid, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_cancel_operation (GDBusProxy *proxy,
+ guint in_opid,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_method_call_uint ("cancel_operation", proxy, in_opid, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_cancel_operation_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_call_cancel_operation_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
}
gboolean
-e_gdbus_cal_call_cancel_operation_sync (GDBusProxy *proxy, guint in_opid, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_cancel_operation_sync (GDBusProxy *proxy,
+ guint in_opid,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_method_call_sync_uint__void ("cancel_operation", proxy, in_opid, cancellable, error);
}
void
-e_gdbus_cal_call_cancel_all (GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_cancel_all (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_method_call_void ("cancel_all", proxy, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_cancel_all_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_call_cancel_all_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
}
gboolean
-e_gdbus_cal_call_cancel_all_sync (GDBusProxy *proxy, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_cancel_all_sync (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_method_call_sync_void__void ("cancel_all", proxy, cancellable, error);
}
void
-e_gdbus_cal_call_close (GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_call_close (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
e_gdbus_proxy_method_call_void ("close", proxy, cancellable, callback, user_data);
}
gboolean
-e_gdbus_cal_call_close_finish (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_cal_call_close_finish (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return e_gdbus_proxy_method_call_finish_void (proxy, result, error);
}
gboolean
-e_gdbus_cal_call_close_sync (GDBusProxy *proxy, GCancellable *cancellable, GError **error)
+e_gdbus_cal_call_close_sync (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_proxy_method_call_sync_void__void ("close", proxy, cancellable, error);
}
@@ -881,27 +1142,54 @@ e_gdbus_cal_emit_ ## _mname ## _done (EGdbusCal *object, guint arg_opid, const G
g_signal_emit (object, signals[_sig_id], 0, arg_opid, arg_error, out_par); \
}
-DECLARE_EMIT_DONE_SIGNAL_0 (open, __OPEN_DONE_SIGNAL)
-DECLARE_EMIT_DONE_SIGNAL_0 (remove, __REMOVE_DONE_SIGNAL)
-DECLARE_EMIT_DONE_SIGNAL_0 (refresh, __REFRESH_DONE_SIGNAL)
-DECLARE_EMIT_DONE_SIGNAL_1 (get_backend_property, __GET_BACKEND_PROPERTY_DONE_SIGNAL, const gchar *)
-DECLARE_EMIT_DONE_SIGNAL_0 (set_backend_property, __SET_BACKEND_PROPERTY_DONE_SIGNAL)
-DECLARE_EMIT_DONE_SIGNAL_1 (get_object, __GET_OBJECT_DONE_SIGNAL, const gchar *)
-DECLARE_EMIT_DONE_SIGNAL_1 (get_object_list, __GET_OBJECT_LIST_DONE_SIGNAL, const gchar * const *)
-DECLARE_EMIT_DONE_SIGNAL_0 (get_free_busy, __GET_FREE_BUSY_DONE_SIGNAL)
-DECLARE_EMIT_DONE_SIGNAL_1 (create_object, __CREATE_OBJECT_DONE_SIGNAL, const gchar *)
-DECLARE_EMIT_DONE_SIGNAL_0 (modify_object, __MODIFY_OBJECT_DONE_SIGNAL)
-DECLARE_EMIT_DONE_SIGNAL_0 (remove_object, __REMOVE_OBJECT_DONE_SIGNAL)
-DECLARE_EMIT_DONE_SIGNAL_0 (receive_objects, __RECEIVE_OBJECTS_DONE_SIGNAL)
-DECLARE_EMIT_DONE_SIGNAL_1 (send_objects, __SEND_OBJECTS_DONE_SIGNAL, const gchar * const *)
-DECLARE_EMIT_DONE_SIGNAL_1 (get_attachment_uris, __GET_ATTACHMENT_URIS_DONE_SIGNAL, const gchar * const *)
-DECLARE_EMIT_DONE_SIGNAL_0 (discard_alarm, __DISCARD_ALARM_DONE_SIGNAL)
-DECLARE_EMIT_DONE_SIGNAL_1 (get_view, __GET_VIEW_DONE_SIGNAL, const gchar *)
-DECLARE_EMIT_DONE_SIGNAL_1 (get_timezone, __GET_TIMEZONE_DONE_SIGNAL, const gchar *)
-DECLARE_EMIT_DONE_SIGNAL_0 (add_timezone, __ADD_TIMEZONE_DONE_SIGNAL)
+DECLARE_EMIT_DONE_SIGNAL_0 (open,
+ __OPEN_DONE_SIGNAL)
+DECLARE_EMIT_DONE_SIGNAL_0 (remove,
+ __REMOVE_DONE_SIGNAL)
+DECLARE_EMIT_DONE_SIGNAL_0 (refresh,
+ __REFRESH_DONE_SIGNAL)
+DECLARE_EMIT_DONE_SIGNAL_1 (get_backend_property,
+ __GET_BACKEND_PROPERTY_DONE_SIGNAL,
+ const gchar *)
+DECLARE_EMIT_DONE_SIGNAL_0 (set_backend_property,
+ __SET_BACKEND_PROPERTY_DONE_SIGNAL)
+DECLARE_EMIT_DONE_SIGNAL_1 (get_object,
+ __GET_OBJECT_DONE_SIGNAL,
+ const gchar *)
+DECLARE_EMIT_DONE_SIGNAL_1 (get_object_list,
+ __GET_OBJECT_LIST_DONE_SIGNAL,
+ const gchar * const *)
+DECLARE_EMIT_DONE_SIGNAL_0 (get_free_busy,
+ __GET_FREE_BUSY_DONE_SIGNAL)
+DECLARE_EMIT_DONE_SIGNAL_1 (create_object,
+ __CREATE_OBJECT_DONE_SIGNAL,
+ const gchar *)
+DECLARE_EMIT_DONE_SIGNAL_0 (modify_object,
+ __MODIFY_OBJECT_DONE_SIGNAL)
+DECLARE_EMIT_DONE_SIGNAL_0 (remove_object,
+ __REMOVE_OBJECT_DONE_SIGNAL)
+DECLARE_EMIT_DONE_SIGNAL_0 (receive_objects,
+ __RECEIVE_OBJECTS_DONE_SIGNAL)
+DECLARE_EMIT_DONE_SIGNAL_1 (send_objects,
+ __SEND_OBJECTS_DONE_SIGNAL,
+ const gchar * const *)
+DECLARE_EMIT_DONE_SIGNAL_1 (get_attachment_uris,
+ __GET_ATTACHMENT_URIS_DONE_SIGNAL,
+ const gchar * const *)
+DECLARE_EMIT_DONE_SIGNAL_0 (discard_alarm,
+ __DISCARD_ALARM_DONE_SIGNAL)
+DECLARE_EMIT_DONE_SIGNAL_1 (get_view,
+ __GET_VIEW_DONE_SIGNAL,
+ const gchar *)
+DECLARE_EMIT_DONE_SIGNAL_1 (get_timezone,
+ __GET_TIMEZONE_DONE_SIGNAL,
+ const gchar *)
+DECLARE_EMIT_DONE_SIGNAL_0 (add_timezone,
+ __ADD_TIMEZONE_DONE_SIGNAL)
void
-e_gdbus_cal_emit_backend_error (EGdbusCal *object, const gchar *arg_message)
+e_gdbus_cal_emit_backend_error (EGdbusCal *object,
+ const gchar *arg_message)
{
g_return_if_fail (object != NULL);
g_return_if_fail (arg_message != NULL);
@@ -910,37 +1198,43 @@ e_gdbus_cal_emit_backend_error (EGdbusCal *object, const gchar *arg_message)
}
void
-e_gdbus_cal_emit_readonly (EGdbusCal *object, gboolean arg_is_readonly)
+e_gdbus_cal_emit_readonly (EGdbusCal *object,
+ gboolean arg_is_readonly)
{
g_signal_emit (object, signals[__READONLY_SIGNAL], 0, arg_is_readonly);
}
void
-e_gdbus_cal_emit_online (EGdbusCal *object, gboolean arg_is_online)
+e_gdbus_cal_emit_online (EGdbusCal *object,
+ gboolean arg_is_online)
{
g_signal_emit (object, signals[__ONLINE_SIGNAL], 0, arg_is_online);
}
void
-e_gdbus_cal_emit_auth_required (EGdbusCal *object, const gchar * const *arg_credentials)
+e_gdbus_cal_emit_auth_required (EGdbusCal *object,
+ const gchar * const *arg_credentials)
{
g_signal_emit (object, signals[__AUTH_REQUIRED_SIGNAL], 0, arg_credentials);
}
void
-e_gdbus_cal_emit_opened (EGdbusCal *object, const gchar * const *arg_error)
+e_gdbus_cal_emit_opened (EGdbusCal *object,
+ const gchar * const *arg_error)
{
g_signal_emit (object, signals[__OPENED_SIGNAL], 0, arg_error);
}
void
-e_gdbus_cal_emit_free_busy_data (EGdbusCal *object, const gchar * const *arg_free_busy)
+e_gdbus_cal_emit_free_busy_data (EGdbusCal *object,
+ const gchar * const *arg_free_busy)
{
g_signal_emit (object, signals[__FREE_BUSY_DATA_SIGNAL], 0, arg_free_busy);
}
void
-e_gdbus_cal_emit_backend_property_changed (EGdbusCal *object, const gchar * const *arg_name_value)
+e_gdbus_cal_emit_backend_property_changed (EGdbusCal *object,
+ const gchar * const *arg_name_value)
{
g_signal_emit (object, signals[__BACKEND_PROPERTY_CHANGED_SIGNAL], 0, arg_name_value);
}
@@ -954,8 +1248,10 @@ E_DECLARE_GDBUS_NOTIFY_SIGNAL_1 (cal, free_busy_data, free_busy_data, "as")
E_DECLARE_GDBUS_NOTIFY_SIGNAL_1 (cal, backend_property_changed, name_value, "as")
E_DECLARE_GDBUS_ASYNC_METHOD_1 (cal, open, only_if_exists, "b")
-E_DECLARE_GDBUS_ASYNC_METHOD_0 (cal, remove)
-E_DECLARE_GDBUS_ASYNC_METHOD_0 (cal, refresh)
+E_DECLARE_GDBUS_ASYNC_METHOD_0 (cal,
+ remove)
+E_DECLARE_GDBUS_ASYNC_METHOD_0 (cal,
+ refresh)
E_DECLARE_GDBUS_ASYNC_METHOD_1_WITH_RETURN (cal, get_backend_property, propname, "s", propvalue, "s")
E_DECLARE_GDBUS_ASYNC_METHOD_1 (cal, set_backend_property, propnamevalue, "as")
E_DECLARE_GDBUS_ASYNC_METHOD_1_WITH_RETURN (cal, get_object, uid_rid, "as", object, "s")
@@ -974,8 +1270,10 @@ E_DECLARE_GDBUS_ASYNC_METHOD_1 (cal, add_timezone, tzobject, "s")
E_DECLARE_GDBUS_SYNC_METHOD_1 (cal, authenticate_user, credentials, "as")
E_DECLARE_GDBUS_SYNC_METHOD_1 (cal, cancel_operation, opid, "u")
-E_DECLARE_GDBUS_SYNC_METHOD_0 (cal, cancel_all)
-E_DECLARE_GDBUS_SYNC_METHOD_0 (cal, close)
+E_DECLARE_GDBUS_SYNC_METHOD_0 (cal,
+ cancel_all)
+E_DECLARE_GDBUS_SYNC_METHOD_0 (cal,
+ close)
static const GDBusMethodInfo * const e_gdbus_cal_method_info_pointers[] =
{
@@ -1045,14 +1343,14 @@ static const GDBusInterfaceInfo _e_gdbus_cal_interface_info =
};
static void
-handle_method_call (GDBusConnection *connection,
- const gchar *sender,
- const gchar *object_path,
- const gchar *interface_name,
- const gchar *method_name,
- GVariant *parameters,
+handle_method_call (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *method_name,
+ GVariant *parameters,
GDBusMethodInvocation *invocation,
- gpointer user_data)
+ gpointer user_data)
{
guint method_id, method_type;
@@ -1066,14 +1364,27 @@ handle_method_call (GDBusConnection *connection,
}
static GVariant *
-get_property (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *property_name, GError **error, gpointer user_data)
+get_property (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *property_name,
+ GError **error,
+ gpointer user_data)
{
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "This implementation does not support property `%s'", property_name);
return NULL;
}
static gboolean
-set_property (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *property_name, GVariant *value, GError **error, gpointer user_data)
+set_property (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *property_name,
+ GVariant *value,
+ GError **error,
+ gpointer user_data)
{
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "This implementation does not support property `%s'", property_name);
return FALSE;
@@ -1188,7 +1499,10 @@ on_object_unregistered (GObject *object)
* Returns: 0 if @error is set, otherwise a registration id (never 0) that can be used with g_dbus_connection_unregister_object().
*/
guint
-e_gdbus_cal_register_object (EGdbusCal *object, GDBusConnection *connection, const gchar *object_path, GError **error)
+e_gdbus_cal_register_object (EGdbusCal *object,
+ GDBusConnection *connection,
+ const gchar *object_path,
+ GError **error)
{
GHashTable *pvc;
@@ -1258,7 +1572,10 @@ e_gdbus_cal_proxy_init (EGdbusCalProxy *proxy)
}
static void
-g_signal (GDBusProxy *proxy, const gchar *sender_name, const gchar *signal_name, GVariant *parameters)
+g_signal (GDBusProxy *proxy,
+ const gchar *sender_name,
+ const gchar *signal_name,
+ GVariant *parameters)
{
guint signal_id, signal_type;
@@ -1323,7 +1640,10 @@ gdbus_cal_get_pending_ops (EGdbusAsyncOpKeeper *object)
}
static gboolean
-gdbus_cal_call_cancel_operation_sync (EGdbusAsyncOpKeeper *object, guint in_opid, GCancellable *cancellable, GError **error)
+gdbus_cal_call_cancel_operation_sync (EGdbusAsyncOpKeeper *object,
+ guint in_opid,
+ GCancellable *cancellable,
+ GError **error)
{
return e_gdbus_cal_call_cancel_operation_sync (G_DBUS_PROXY (object), in_opid, cancellable, error);
}
@@ -1352,7 +1672,13 @@ async_op_keeper_iface_init (EGdbusAsyncOpKeeperInterface *iface)
* This is a failable asynchronous constructor - when the proxy is ready, callback will be invoked and you can use e_gdbus_cal_proxy_new_finish() to get the result.
*/
void
-e_gdbus_cal_proxy_new (GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_proxy_new (GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
g_async_initable_new_async (E_TYPE_GDBUS_CAL_PROXY,
G_PRIORITY_DEFAULT,
@@ -1377,7 +1703,8 @@ e_gdbus_cal_proxy_new (GDBusConnection *connection, GDBusProxyFlags flags, const
* Returns: A #EGdbusCalProxy or %NULL if @error is set. Free with g_object_unref().
*/
EGdbusCal *
-e_gdbus_cal_proxy_new_finish (GAsyncResult *result, GError **error)
+e_gdbus_cal_proxy_new_finish (GAsyncResult *result,
+ GError **error)
{
GObject *object;
GObject *source_object;
@@ -1407,7 +1734,12 @@ e_gdbus_cal_proxy_new_finish (GAsyncResult *result, GError **error)
* Returns: A #EGdbusCalProxy or %NULL if error is set. Free with g_object_unref().
*/
EGdbusCal *
-e_gdbus_cal_proxy_new_sync (GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GError **error)
+e_gdbus_cal_proxy_new_sync (GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
{
GInitable *initable;
initable = g_initable_new (E_TYPE_GDBUS_CAL_PROXY,
@@ -1440,7 +1772,13 @@ e_gdbus_cal_proxy_new_sync (GDBusConnection *connection, GDBusProxyFlags flags,
* This is a failable asynchronous constructor - when the proxy is ready, callback will be invoked and you can use e_gdbus_cal_proxy_new_for_bus_finish() to get the result.
*/
void
-e_gdbus_cal_proxy_new_for_bus (GBusType bus_type, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_cal_proxy_new_for_bus (GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
g_async_initable_new_async (E_TYPE_GDBUS_CAL_PROXY,
G_PRIORITY_DEFAULT,
@@ -1465,7 +1803,8 @@ e_gdbus_cal_proxy_new_for_bus (GBusType bus_type, GDBusProxyFlags flags, const g
* Returns: A #EGdbusCalProxy or %NULL if @error is set. Free with g_object_unref().
*/
EGdbusCal *
-e_gdbus_cal_proxy_new_for_bus_finish (GAsyncResult *result, GError **error)
+e_gdbus_cal_proxy_new_for_bus_finish (GAsyncResult *result,
+ GError **error)
{
GObject *object;
GObject *source_object;
@@ -1495,7 +1834,12 @@ e_gdbus_cal_proxy_new_for_bus_finish (GAsyncResult *result, GError **error)
* Returns: A #EGdbusCalProxy or %NULL if error is set. Free with g_object_unref().
*/
EGdbusCal *
-e_gdbus_cal_proxy_new_for_bus_sync (GBusType bus_type, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GError **error)
+e_gdbus_cal_proxy_new_for_bus_sync (GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
{
GInitable *initable;
initable = g_initable_new (E_TYPE_GDBUS_CAL_PROXY,
diff --git a/camel/camel-address.c b/camel/camel-address.c
index 937cd4f..544e2e9 100644
--- a/camel/camel-address.c
+++ b/camel/camel-address.c
@@ -105,7 +105,8 @@ camel_address_length (CamelAddress *addr)
* Returns: the number of addresses parsed or %-1 on fail
**/
gint
-camel_address_decode (CamelAddress *addr, const gchar *raw)
+camel_address_decode (CamelAddress *addr,
+ const gchar *raw)
{
CamelAddressClass *class;
@@ -149,7 +150,8 @@ camel_address_encode (CamelAddress *addr)
* Returns: the number of addresses parsed or %-1 on fail
**/
gint
-camel_address_unformat (CamelAddress *addr, const gchar *raw)
+camel_address_unformat (CamelAddress *addr,
+ const gchar *raw)
{
CamelAddressClass *class;
@@ -193,7 +195,8 @@ camel_address_format (CamelAddress *addr)
* Returns: the number of addresses concatenated
**/
gint
-camel_address_cat (CamelAddress *dest, CamelAddress *source)
+camel_address_cat (CamelAddress *dest,
+ CamelAddress *source)
{
CamelAddressClass *class;
@@ -216,7 +219,8 @@ camel_address_cat (CamelAddress *dest, CamelAddress *source)
* Returns: the number of addresses copied
**/
gint
-camel_address_copy (CamelAddress *dest, CamelAddress *source)
+camel_address_copy (CamelAddress *dest,
+ CamelAddress *source)
{
g_return_val_if_fail (CAMEL_IS_ADDRESS (dest), -1);
g_return_val_if_fail (CAMEL_IS_ADDRESS (source), -1);
@@ -233,7 +237,8 @@ camel_address_copy (CamelAddress *dest, CamelAddress *source)
* Remove an address by index, or all addresses.
**/
void
-camel_address_remove (CamelAddress *addr, gint index)
+camel_address_remove (CamelAddress *addr,
+ gint index)
{
CamelAddressClass *class;
diff --git a/camel/camel-block-file.c b/camel/camel-block-file.c
index 1dd811b..d1f43f8 100644
--- a/camel/camel-block-file.c
+++ b/camel/camel-block-file.c
@@ -52,7 +52,7 @@ struct _CamelBlockFilePrivate {
GStaticMutex cache_lock; /* for refcounting, flag manip, cache manip */
GStaticMutex io_lock; /* for all io ops */
- guint deleted:1;
+ guint deleted : 1;
};
#define CAMEL_BLOCK_FILE_LOCK(kf, lock) (g_static_mutex_lock(&(kf)->priv->lock))
@@ -215,7 +215,7 @@ camel_block_file_init (CamelBlockFile *bs)
camel_dlist_init (&bs->block_cache);
bs->blocks = g_hash_table_new ((GHashFunc) block_hash_func, NULL);
/* this cache size and the text index size have been tuned for about the best
- with moderate memory usage. Doubling the memory usage barely affects performance. */
+ * with moderate memory usage. Doubling the memory usage barely affects performance. */
bs->block_cache_limit = 256;
p = bs->priv = g_malloc0 (sizeof (*bs->priv));
@@ -253,13 +253,13 @@ block_file_use (CamelBlockFile *bs)
gint err;
/* We want to:
- remove file from active list
- lock it
-
- Then when done:
- unlock it
- add it back to end of active list
- */
+ * remove file from active list
+ * lock it
+ *
+ * Then when done:
+ * unlock it
+ * add it back to end of active list
+ */
CAMEL_BLOCK_FILE_LOCK (bs, io_lock);
@@ -273,7 +273,7 @@ block_file_use (CamelBlockFile *bs)
d(printf("Turning block file online: %s\n", bs->path));
}
- if ((bs->fd = g_open (bs->path, bs->flags|O_BINARY, 0600)) == -1) {
+ if ((bs->fd = g_open (bs->path, bs->flags | O_BINARY, 0600)) == -1) {
err = errno;
CAMEL_BLOCK_FILE_UNLOCK (bs, io_lock);
errno = err;
@@ -293,7 +293,7 @@ block_file_use (CamelBlockFile *bs)
bf = nw->base;
if (bf->fd != -1) {
/* Need to trylock, as any of these lock levels might be trying
- to lock the block_file_lock, so we need to check and abort if so */
+ * to lock the block_file_lock, so we need to check and abort if so */
if (CAMEL_BLOCK_FILE_TRYLOCK (bf, root_lock)) {
if (CAMEL_BLOCK_FILE_TRYLOCK (bf, cache_lock)) {
if (CAMEL_BLOCK_FILE_TRYLOCK (bf, io_lock)) {
@@ -330,11 +330,11 @@ block_file_unuse (CamelBlockFile *bs)
}
/*
-o = camel_cache_get (c, key);
-camel_cache_unref (c, key);
-camel_cache_add (c, key, o);
-camel_cache_remove (c, key);
-*/
+ * o = camel_cache_get (c, key);
+ * camel_cache_unref (c, key);
+ * camel_cache_add (c, key, o);
+ * camel_cache_remove (c, key);
+ */
/**
* camel_block_file_new:
@@ -370,10 +370,10 @@ camel_block_file_new (const gchar *path,
return NULL;
}
camel_block_file_detach_block (bs, bs->root_block);
- bs->root = (CamelBlockRoot *)&bs->root_block->data;
+ bs->root = (CamelBlockRoot *) &bs->root_block->data;
/* we only need these flags on first open */
- bs->flags &= ~(O_CREAT|O_EXCL|O_TRUNC);
+ bs->flags &= ~(O_CREAT | O_EXCL | O_TRUNC);
class = CAMEL_BLOCK_FILE_GET_CLASS (bs);
@@ -400,7 +400,8 @@ camel_block_file_new (const gchar *path,
}
gint
-camel_block_file_rename (CamelBlockFile *bs, const gchar *path)
+camel_block_file_rename (CamelBlockFile *bs,
+ const gchar *path)
{
gint ret;
struct stat st;
@@ -549,7 +550,7 @@ camel_block_file_get_block (CamelBlockFile *bs,
g_return_val_if_fail (CAMEL_IS_BLOCK_FILE (bs), NULL);
/* Sanity check: Dont allow reading of root block (except before its been read)
- or blocks with invalid block id's */
+ * or blocks with invalid block id's */
if ((bs->root == NULL && id != 0)
|| (bs->root != NULL && (id > bs->root->last || id == 0))
|| (id % bs->block_size) != 0) {
@@ -625,7 +626,8 @@ camel_block_file_get_block (CamelBlockFile *bs,
* fills.
**/
void
-camel_block_file_detach_block (CamelBlockFile *bs, CamelBlock *bl)
+camel_block_file_detach_block (CamelBlockFile *bs,
+ CamelBlock *bl)
{
g_return_if_fail (CAMEL_IS_BLOCK_FILE (bs));
g_return_if_fail (bl != NULL);
@@ -647,7 +649,8 @@ camel_block_file_detach_block (CamelBlockFile *bs, CamelBlock *bl)
* Reattach a block that has been detached.
**/
void
-camel_block_file_attach_block (CamelBlockFile *bs, CamelBlock *bl)
+camel_block_file_attach_block (CamelBlockFile *bs,
+ CamelBlock *bl)
{
g_return_if_fail (CAMEL_IS_BLOCK_FILE (bs));
g_return_if_fail (bl != NULL);
@@ -670,7 +673,8 @@ camel_block_file_attach_block (CamelBlockFile *bs, CamelBlock *bl)
* it ever expires from the cache.
**/
void
-camel_block_file_touch_block (CamelBlockFile *bs, CamelBlock *bl)
+camel_block_file_touch_block (CamelBlockFile *bs,
+ CamelBlock *bl)
{
g_return_if_fail (CAMEL_IS_BLOCK_FILE (bs));
g_return_if_fail (bl != NULL);
@@ -703,7 +707,8 @@ camel_block_file_touch_block (CamelBlockFile *bs, CamelBlock *bl)
* block will be freed.
**/
void
-camel_block_file_unref_block (CamelBlockFile *bs, CamelBlock *bl)
+camel_block_file_unref_block (CamelBlockFile *bs,
+ CamelBlock *bl)
{
g_return_if_fail (CAMEL_IS_BLOCK_FILE (bs));
g_return_if_fail (bl != NULL);
@@ -719,7 +724,8 @@ camel_block_file_unref_block (CamelBlockFile *bs, CamelBlock *bl)
}
static gint
-sync_block_nolock (CamelBlockFile *bs, CamelBlock *bl)
+sync_block_nolock (CamelBlockFile *bs,
+ CamelBlock *bl)
{
d(printf("Sync block %08x: %s\n", bl->id, (bl->flags & CAMEL_BLOCK_DIRTY)?"dirty":"clean"));
@@ -776,7 +782,8 @@ sync_nolock (CamelBlockFile *bs)
* Returns: -1 on io error.
**/
gint
-camel_block_file_sync_block (CamelBlockFile *bs, CamelBlock *bl)
+camel_block_file_sync_block (CamelBlockFile *bs,
+ CamelBlock *bl)
{
gint ret;
@@ -834,7 +841,7 @@ struct _CamelKeyFilePrivate {
struct _CamelKeyFile *base;
GStaticMutex lock;
- guint deleted:1;
+ guint deleted : 1;
};
#define CAMEL_KEY_FILE_LOCK(kf, lock) (g_static_mutex_lock(&(kf)->priv->lock))
@@ -911,12 +918,12 @@ key_file_use (CamelKeyFile *bs)
const gchar *flag;
/* We want to:
- remove file from active list
- lock it
-
- Then when done:
- unlock it
- add it back to end of active list
+ * remove file from active list
+ * lock it
+ *
+ * Then when done:
+ * unlock it
+ * add it back to end of active list
*/
/* TODO: Check header on reset? */
@@ -938,7 +945,7 @@ key_file_use (CamelKeyFile *bs)
else
flag = "a+b";
- if ((fd = g_open (bs->path, bs->flags|O_BINARY, 0600)) == -1
+ if ((fd = g_open (bs->path, bs->flags | O_BINARY, 0600)) == -1
|| (bs->fp = fdopen (fd, flag)) == NULL) {
err = errno;
if (fd != -1)
@@ -961,7 +968,7 @@ key_file_use (CamelKeyFile *bs)
bf = nw->base;
if (bf->fp != NULL) {
/* Need to trylock, as any of these lock levels might be trying
- to lock the key_file_lock, so we need to check and abort if so */
+ * to lock the key_file_lock, so we need to check and abort if so */
if (CAMEL_BLOCK_FILE_TRYLOCK (bf, lock)) {
d(printf("Turning key file offline: %s\n", bf->path));
fclose (bf->fp);
@@ -1003,7 +1010,9 @@ key_file_unuse (CamelKeyFile *bs)
* be opened/created/initialised.
**/
CamelKeyFile *
-camel_key_file_new (const gchar *path, gint flags, const gchar version[8])
+camel_key_file_new (const gchar *path,
+ gint flags,
+ const gchar version[8])
{
CamelKeyFile *kf;
goffset last;
@@ -1033,7 +1042,7 @@ camel_key_file_new (const gchar *path, gint flags, const gchar version[8])
key_file_unuse (kf);
/* we only need these flags on first open */
- kf->flags &= ~(O_CREAT|O_EXCL|O_TRUNC);
+ kf->flags &= ~(O_CREAT | O_EXCL | O_TRUNC);
if (err) {
g_object_unref (kf);
@@ -1045,7 +1054,8 @@ camel_key_file_new (const gchar *path, gint flags, const gchar version[8])
}
gint
-camel_key_file_rename (CamelKeyFile *kf, const gchar *path)
+camel_key_file_rename (CamelKeyFile *kf,
+ const gchar *path)
{
gint ret;
struct stat st;
@@ -1115,7 +1125,10 @@ camel_key_file_delete (CamelKeyFile *kf)
* Returns: -1 on io error. The key file will remain unchanged.
**/
gint
-camel_key_file_write (CamelKeyFile *kf, camel_block_t *parent, gsize len, camel_key_t *records)
+camel_key_file_write (CamelKeyFile *kf,
+ camel_block_t *parent,
+ gsize len,
+ camel_key_t *records)
{
camel_block_t next;
guint32 size;
@@ -1174,7 +1187,10 @@ camel_key_file_write (CamelKeyFile *kf, camel_block_t *parent, gsize len, camel_
* Returns: -1 on io error.
**/
gint
-camel_key_file_read (CamelKeyFile *kf, camel_block_t *start, gsize *len, camel_key_t **records)
+camel_key_file_read (CamelKeyFile *kf,
+ camel_block_t *start,
+ gsize *len,
+ camel_key_t **records)
{
guint32 size;
glong pos;
diff --git a/camel/camel-certdb.c b/camel/camel-certdb.c
index 37feb6d..68089d4 100644
--- a/camel/camel-certdb.c
+++ b/camel/camel-certdb.c
@@ -176,7 +176,8 @@ camel_certdb_get_default (void)
}
void
-camel_certdb_set_filename (CamelCertDB *certdb, const gchar *filename)
+camel_certdb_set_filename (CamelCertDB *certdb,
+ const gchar *filename)
{
g_return_if_fail (CAMEL_IS_CERTDB (certdb));
g_return_if_fail (filename != NULL);
@@ -190,7 +191,8 @@ camel_certdb_set_filename (CamelCertDB *certdb, const gchar *filename)
}
static gint
-certdb_header_load (CamelCertDB *certdb, FILE *istream)
+certdb_header_load (CamelCertDB *certdb,
+ FILE *istream)
{
if (camel_file_util_decode_uint32 (istream, &certdb->version) == -1)
return -1;
@@ -201,7 +203,8 @@ certdb_header_load (CamelCertDB *certdb, FILE *istream)
}
static CamelCert *
-certdb_cert_load (CamelCertDB *certdb, FILE *istream)
+certdb_cert_load (CamelCertDB *certdb,
+ FILE *istream)
{
CamelCert *cert;
@@ -280,7 +283,8 @@ camel_certdb_load (CamelCertDB *certdb)
}
static gint
-certdb_header_save (CamelCertDB *certdb, FILE *ostream)
+certdb_header_save (CamelCertDB *certdb,
+ FILE *ostream)
{
if (camel_file_util_encode_uint32 (ostream, certdb->version) == -1)
return -1;
@@ -291,7 +295,9 @@ certdb_header_save (CamelCertDB *certdb, FILE *ostream)
}
static gint
-certdb_cert_save (CamelCertDB *certdb, CamelCert *cert, FILE *ostream)
+certdb_cert_save (CamelCertDB *certdb,
+ CamelCert *cert,
+ FILE *ostream)
{
if (camel_file_util_encode_string (ostream, cert->issuer) == -1)
return -1;
@@ -407,7 +413,8 @@ camel_certdb_touch (CamelCertDB *certdb)
}
CamelCert *
-camel_certdb_get_cert (CamelCertDB *certdb, const gchar *fingerprint)
+camel_certdb_get_cert (CamelCertDB *certdb,
+ const gchar *fingerprint)
{
CamelCert *cert;
@@ -425,7 +432,8 @@ camel_certdb_get_cert (CamelCertDB *certdb, const gchar *fingerprint)
}
void
-camel_certdb_add (CamelCertDB *certdb, CamelCert *cert)
+camel_certdb_add (CamelCertDB *certdb,
+ CamelCert *cert)
{
g_return_if_fail (CAMEL_IS_CERTDB (certdb));
@@ -446,7 +454,8 @@ camel_certdb_add (CamelCertDB *certdb, CamelCert *cert)
}
void
-camel_certdb_remove (CamelCertDB *certdb, CamelCert *cert)
+camel_certdb_remove (CamelCertDB *certdb,
+ CamelCert *cert)
{
g_return_if_fail (CAMEL_IS_CERTDB (certdb));
@@ -499,7 +508,8 @@ camel_certdb_cert_new (CamelCertDB *certdb)
}
void
-camel_certdb_cert_ref (CamelCertDB *certdb, CamelCert *cert)
+camel_certdb_cert_ref (CamelCertDB *certdb,
+ CamelCert *cert)
{
g_return_if_fail (CAMEL_IS_CERTDB (certdb));
g_return_if_fail (cert != NULL);
@@ -510,7 +520,8 @@ camel_certdb_cert_ref (CamelCertDB *certdb, CamelCert *cert)
}
static void
-certdb_cert_free (CamelCertDB *certdb, CamelCert *cert)
+certdb_cert_free (CamelCertDB *certdb,
+ CamelCert *cert)
{
g_free (cert->issuer);
g_free (cert->subject);
@@ -548,7 +559,9 @@ camel_certdb_cert_unref (CamelCertDB *certdb,
}
static gboolean
-cert_remove (gpointer key, gpointer value, gpointer user_data)
+cert_remove (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
return TRUE;
}
@@ -577,7 +590,9 @@ camel_certdb_clear (CamelCertDB *certdb)
}
static const gchar *
-cert_get_string (CamelCertDB *certdb, CamelCert *cert, gint string)
+cert_get_string (CamelCertDB *certdb,
+ CamelCert *cert,
+ gint string)
{
switch (string) {
case CAMEL_CERT_STRING_ISSUER:
@@ -612,7 +627,10 @@ camel_cert_get_string (CamelCertDB *certdb,
}
static void
-cert_set_string (CamelCertDB *certdb, CamelCert *cert, gint string, const gchar *value)
+cert_set_string (CamelCertDB *certdb,
+ CamelCert *cert,
+ gint string,
+ const gchar *value)
{
switch (string) {
case CAMEL_CERT_STRING_ISSUER:
@@ -656,7 +674,8 @@ camel_cert_set_string (CamelCertDB *certdb,
}
CamelCertTrust
-camel_cert_get_trust (CamelCertDB *certdb, CamelCert *cert)
+camel_cert_get_trust (CamelCertDB *certdb,
+ CamelCert *cert)
{
g_return_val_if_fail (CAMEL_IS_CERTDB (certdb), CAMEL_CERT_TRUST_UNKNOWN);
g_return_val_if_fail (cert != NULL, CAMEL_CERT_TRUST_UNKNOWN);
@@ -665,7 +684,9 @@ camel_cert_get_trust (CamelCertDB *certdb, CamelCert *cert)
}
void
-camel_cert_set_trust (CamelCertDB *certdb, CamelCert *cert, CamelCertTrust trust)
+camel_cert_set_trust (CamelCertDB *certdb,
+ CamelCert *cert,
+ CamelCertTrust trust)
{
g_return_if_fail (CAMEL_IS_CERTDB (certdb));
g_return_if_fail (cert != NULL);
@@ -683,7 +704,8 @@ camel_cert_set_trust (CamelCertDB *certdb, CamelCert *cert, CamelCertTrust trust
* Since: 2.32
**/
void
-camel_certdb_lock (CamelCertDB *certdb, CamelCertDBLock lock)
+camel_certdb_lock (CamelCertDB *certdb,
+ CamelCertDBLock lock)
{
g_return_if_fail (certdb != NULL);
g_return_if_fail (CAMEL_IS_CERTDB (certdb));
@@ -717,7 +739,8 @@ camel_certdb_lock (CamelCertDB *certdb, CamelCertDBLock lock)
* Since: 2.32
**/
void
-camel_certdb_unlock (CamelCertDB *certdb, CamelCertDBLock lock)
+camel_certdb_unlock (CamelCertDB *certdb,
+ CamelCertDBLock lock)
{
g_return_if_fail (certdb != NULL);
g_return_if_fail (CAMEL_IS_CERTDB (certdb));
diff --git a/camel/camel-charset-map.c b/camel/camel-charset-map.c
index d0c4c90..cb67f94 100644
--- a/camel/camel-charset-map.c
+++ b/camel/camel-charset-map.c
@@ -39,19 +39,19 @@
#include "camel-iconv.h"
/*
- if you want to build the charset map, compile this with something like:
- gcc -DBUILD_MAP camel-charset-map.c `pkg-config --cflags --libs glib-2.0`
- (plus any -I/-L/-l flags you need for iconv), then run it as
- ./a.out > camel-charset-map-private.h
-
- Note that the big-endian variant isn't tested...
-
- The tables genereated work like this:
-
- An indirect array for each page of unicode character
- Each array element has an indirect pointer to one of the bytes of
- the generated bitmask.
-*/
+ * if you want to build the charset map, compile this with something like:
+ * gcc -DBUILD_MAP camel-charset-map.c `pkg-config --cflags --libs glib-2.0`
+ * (plus any -I/-L/-l flags you need for iconv), then run it as
+ * ./a.out > camel-charset-map-private.h
+ *
+ * Note that the big-endian variant isn't tested...
+ *
+ * The tables genereated work like this:
+ *
+ * An indirect array for each page of unicode character
+ * Each array element has an indirect pointer to one of the bytes of
+ * the generated bitmask.
+ */
#ifdef BUILD_MAP
@@ -119,7 +119,8 @@ block_hash (gconstpointer v)
}
static gint
-block_equal (gconstpointer v1, gconstpointer v2)
+block_equal (gconstpointer v1,
+ gconstpointer v2)
{
return !memcmp (v1, v2, 256);
}
@@ -312,7 +313,9 @@ camel_charset_init (CamelCharset *c)
}
void
-camel_charset_step (CamelCharset *cc, const gchar *in, gint len)
+camel_charset_step (CamelCharset *cc,
+ const gchar *in,
+ gint len)
{
const guchar *inptr = (const guchar *) in;
const guchar *inend = inptr + len;
@@ -328,9 +331,9 @@ camel_charset_step (CamelCharset *cc, const gchar *in, gint len)
if (c < 0xffff) {
mask &= charset_mask (c);
- if (c>=128 && c<256)
+ if (c >= 128 && c < 256)
level = MAX (level, 1);
- else if (c>=256)
+ else if (c >= 256)
level = 2;
} else {
mask = 0;
@@ -376,7 +379,8 @@ camel_charset_best_name (CamelCharset *charset)
/* finds the minimum charset for this string NULL means US-ASCII */
const gchar *
-camel_charset_best (const gchar *in, gint len)
+camel_charset_best (const gchar *in,
+ gint len)
{
CamelCharset charset;
diff --git a/camel/camel-cipher-context.c b/camel/camel-cipher-context.c
index 5fa9802..4b9b746 100644
--- a/camel/camel-cipher-context.c
+++ b/camel/camel-cipher-context.c
@@ -1546,11 +1546,12 @@ camel_cipher_validity_get_valid (CamelCipherValidity *validity)
}
void
-camel_cipher_validity_set_valid (CamelCipherValidity *validity, gboolean valid)
+camel_cipher_validity_set_valid (CamelCipherValidity *validity,
+ gboolean valid)
{
g_assert (validity != NULL);
- validity->sign.status = valid?CAMEL_CIPHER_VALIDITY_SIGN_GOOD:CAMEL_CIPHER_VALIDITY_SIGN_BAD;
+ validity->sign.status = valid ? CAMEL_CIPHER_VALIDITY_SIGN_GOOD : CAMEL_CIPHER_VALIDITY_SIGN_BAD;
}
gchar *
@@ -1563,7 +1564,8 @@ camel_cipher_validity_get_description (CamelCipherValidity *validity)
}
void
-camel_cipher_validity_set_description (CamelCipherValidity *validity, const gchar *description)
+camel_cipher_validity_set_description (CamelCipherValidity *validity,
+ const gchar *description)
{
g_assert (validity != NULL);
@@ -1625,7 +1627,10 @@ camel_cipher_validity_clone (CamelCipherValidity *vin)
* Add a cert info to the signer or encrypter info.
**/
void
-camel_cipher_validity_add_certinfo (CamelCipherValidity *vin, enum _camel_cipher_validity_mode_t mode, const gchar *name, const gchar *email)
+camel_cipher_validity_add_certinfo (CamelCipherValidity *vin,
+ enum _camel_cipher_validity_mode_t mode,
+ const gchar *name,
+ const gchar *email)
{
camel_cipher_validity_add_certinfo_ex (vin, mode, name, email, NULL, NULL, NULL);
}
@@ -1638,7 +1643,13 @@ camel_cipher_validity_add_certinfo (CamelCipherValidity *vin, enum _camel_cipher
* Since: 2.30
**/
void
-camel_cipher_validity_add_certinfo_ex (CamelCipherValidity *vin, camel_cipher_validity_mode_t mode, const gchar *name, const gchar *email, gpointer cert_data, void (*cert_data_free)(gpointer cert_data), gpointer (*cert_data_clone)(gpointer cert_data))
+camel_cipher_validity_add_certinfo_ex (CamelCipherValidity *vin,
+ camel_cipher_validity_mode_t mode,
+ const gchar *name,
+ const gchar *email,
+ gpointer cert_data,
+ void (*cert_data_free)(gpointer cert_data),
+ gpointer (*cert_data_clone)(gpointer cert_data))
{
CamelCipherCertInfo *info;
CamelDList *list;
@@ -1659,7 +1670,7 @@ camel_cipher_validity_add_certinfo_ex (CamelCipherValidity *vin, camel_cipher_va
}
}
- list = (mode==CAMEL_CIPHER_VALIDITY_SIGN)?&vin->sign.signers:&vin->encrypt.encrypters;
+ list = (mode == CAMEL_CIPHER_VALIDITY_SIGN) ? &vin->sign.signers : &vin->encrypt.encrypters;
camel_dlist_addtail (list, (CamelDListNode *) info);
}
@@ -1672,7 +1683,8 @@ camel_cipher_validity_add_certinfo_ex (CamelCipherValidity *vin, camel_cipher_va
* another one.
**/
void
-camel_cipher_validity_envelope (CamelCipherValidity *parent, CamelCipherValidity *valid)
+camel_cipher_validity_envelope (CamelCipherValidity *parent,
+ CamelCipherValidity *valid)
{
CamelCipherCertInfo *info;
@@ -1763,8 +1775,8 @@ camel_cipher_context_get_session (CamelCipherContext *context)
/* See rfc3156, section 2 and others */
/* We do this simply: Anything not base64 must be qp
- This is so that we can safely translate any occurance of "From "
- into the quoted-printable escaped version safely. */
+ * This is so that we can safely translate any occurance of "From "
+ * into the quoted-printable escaped version safely. */
static void
cc_prepare_sign (CamelMimePart *part)
{
@@ -1817,7 +1829,7 @@ camel_cipher_canonical_to_stream (CamelMimePart *part,
CamelMimeFilter *canon;
gint res = -1;
- if (flags & (CAMEL_MIME_FILTER_CANON_FROM|CAMEL_MIME_FILTER_CANON_STRIP))
+ if (flags & (CAMEL_MIME_FILTER_CANON_FROM | CAMEL_MIME_FILTER_CANON_STRIP))
cc_prepare_sign (part);
filter = camel_stream_filter_new (ostream);
diff --git a/camel/camel-cipher-context.h b/camel/camel-cipher-context.h
index e0b2c83..1dc81f3 100644
--- a/camel/camel-cipher-context.h
+++ b/camel/camel-cipher-context.h
@@ -256,9 +256,9 @@ const gchar * camel_cipher_context_hash_to_id (CamelCipherContext *context,
CamelCipherHash hash);
/* FIXME:
- There are some inconsistencies here, the api's should probably handle CamelMimePart's as input/outputs,
- Something that might generate a multipart/signed should do it as part of that processing, internally
- to the cipher, etc etc. */
+ * There are some inconsistencies here, the api's should probably handle CamelMimePart's as input/outputs,
+ * Something that might generate a multipart/signed should do it as part of that processing, internally
+ * to the cipher, etc etc. */
/* cipher routines */
gboolean camel_cipher_context_sign_sync (CamelCipherContext *context,
diff --git a/camel/camel-data-cache.c b/camel/camel-data-cache.c
index 34e2498..dff4c4b 100644
--- a/camel/camel-data-cache.c
+++ b/camel/camel-data-cache.c
@@ -46,7 +46,7 @@
#define CAMEL_DATA_CACHE_MASK ((1 << CAMEL_DATA_CACHE_BITS)-1)
/* timeout before a cache dir is checked again for expired entries,
- once an hour should be enough */
+ * once an hour should be enough */
#define CAMEL_DATA_CACHE_CYCLE_TIME (60*60)
struct _CamelDataCachePrivate {
@@ -238,7 +238,8 @@ camel_data_cache_set_path (CamelDataCache *cdc,
* age acts as a hard limit on cache entries.
**/
void
-camel_data_cache_set_expire_age (CamelDataCache *cdc, time_t when)
+camel_data_cache_set_expire_age (CamelDataCache *cdc,
+ time_t when)
{
cdc->priv->expire_age = when;
}
@@ -259,13 +260,18 @@ camel_data_cache_set_expire_age (CamelDataCache *cdc, time_t when)
* age acts as a hard limit on cache entries.
**/
void
-camel_data_cache_set_expire_access (CamelDataCache *cdc, time_t when)
+camel_data_cache_set_expire_access (CamelDataCache *cdc,
+ time_t when)
{
cdc->priv->expire_access = when;
}
static void
-data_cache_expire (CamelDataCache *cdc, const gchar *path, const gchar *keep, time_t now, gboolean expire_all)
+data_cache_expire (CamelDataCache *cdc,
+ const gchar *path,
+ const gchar *keep,
+ time_t now,
+ gboolean expire_all)
{
GDir *dir;
const gchar *dname;
@@ -303,17 +309,20 @@ data_cache_expire (CamelDataCache *cdc, const gchar *path, const gchar *keep, ti
}
/* Since we have to stat the directory anyway, we use this opportunity to
- lazily expire old data.
- If it is this directories 'turn', and we haven't done it for CYCLE_TIME seconds,
- then we perform an expiry run */
+ * lazily expire old data.
+ * If it is this directories 'turn', and we haven't done it for CYCLE_TIME seconds,
+ * then we perform an expiry run */
static gchar *
-data_cache_path (CamelDataCache *cdc, gint create, const gchar *path, const gchar *key)
+data_cache_path (CamelDataCache *cdc,
+ gint create,
+ const gchar *path,
+ const gchar *key)
{
gchar *dir, *real, *tmp;
guint32 hash;
hash = g_str_hash (key);
- hash = (hash>>5)&CAMEL_DATA_CACHE_MASK;
+ hash = (hash >> 5) &CAMEL_DATA_CACHE_MASK;
dir = alloca (strlen (cdc->priv->path) + strlen (path) + 8);
sprintf(dir, "%s/%s/%02x", cdc->priv->path, path, hash);
@@ -379,7 +388,7 @@ camel_data_cache_add (CamelDataCache *cdc,
} while (stream != NULL);
stream = camel_stream_fs_new_with_name (
- real, O_RDWR|O_CREAT|O_TRUNC, 0600, error);
+ real, O_RDWR | O_CREAT | O_TRUNC, 0600, error);
if (stream)
camel_object_bag_add (cdc->priv->busy_bag, real, stream);
else
@@ -512,7 +521,8 @@ camel_data_cache_remove (CamelDataCache *cdc,
* Clear cache's content in @path.
**/
void
-camel_data_cache_clear (CamelDataCache *cdc, const gchar *path)
+camel_data_cache_clear (CamelDataCache *cdc,
+ const gchar *path)
{
gchar *base_dir;
GDir *dir;
diff --git a/camel/camel-data-wrapper.h b/camel/camel-data-wrapper.h
index eb7e427..6772584 100644
--- a/camel/camel-data-wrapper.h
+++ b/camel/camel-data-wrapper.h
@@ -76,7 +76,7 @@ struct _CamelDataWrapper {
CamelContentType *mime_type;
- guint offline:1;
+ guint offline : 1;
};
struct _CamelDataWrapperClass {
diff --git a/camel/camel-db.c b/camel/camel-db.c
index 1d1410e..9dee660 100644
--- a/camel/camel-db.c
+++ b/camel/camel-db.c
@@ -59,7 +59,8 @@ typedef struct {
} CamelSqlite3File;
static gint
-call_old_file_Sync (CamelSqlite3File *cFile, gint flags)
+call_old_file_Sync (CamelSqlite3File *cFile,
+ gint flags)
{
g_return_val_if_fail (old_vfs != NULL, SQLITE_ERROR);
g_return_val_if_fail (cFile != NULL, SQLITE_ERROR);
@@ -76,7 +77,8 @@ struct SyncRequestData
};
static void
-sync_request_thread_cb (gpointer task_data, gpointer null_data)
+sync_request_thread_cb (gpointer task_data,
+ gpointer null_data)
{
struct SyncRequestData *sync_data = task_data;
EFlag *sync_op;
@@ -94,7 +96,8 @@ sync_request_thread_cb (gpointer task_data, gpointer null_data)
}
static void
-sync_push_request (CamelSqlite3File *cFile, gboolean wait_for_finish)
+sync_push_request (CamelSqlite3File *cFile,
+ gboolean wait_for_finish)
{
struct SyncRequestData *data;
EFlag *sync_op = NULL;
@@ -177,7 +180,8 @@ def_subclassed (xDeviceCharacteristics, (sqlite3_file *pFile), (cFile->old_vfs_f
#undef def_subclassed
static gint
-camel_sqlite3_file_xCheckReservedLock (sqlite3_file *pFile, gint *pResOut)
+camel_sqlite3_file_xCheckReservedLock (sqlite3_file *pFile,
+ gint *pResOut)
{
CamelSqlite3File *cFile;
@@ -232,7 +236,8 @@ camel_sqlite3_file_xClose (sqlite3_file *pFile)
}
static gint
-camel_sqlite3_file_xSync (sqlite3_file *pFile, gint flags)
+camel_sqlite3_file_xSync (sqlite3_file *pFile,
+ gint flags)
{
CamelSqlite3File *cFile;
@@ -261,7 +266,11 @@ camel_sqlite3_file_xSync (sqlite3_file *pFile, gint flags)
}
static gint
-camel_sqlite3_vfs_xOpen (sqlite3_vfs *pVfs, const gchar *zPath, sqlite3_file *pFile, gint flags, gint *pOutFlags)
+camel_sqlite3_vfs_xOpen (sqlite3_vfs *pVfs,
+ const gchar *zPath,
+ sqlite3_file *pFile,
+ gint flags,
+ gint *pOutFlags)
{
static GStaticRecMutex only_once_lock = G_STATIC_REC_MUTEX_INIT;
static sqlite3_io_methods io_methods = {0};
@@ -288,7 +297,7 @@ camel_sqlite3_vfs_xOpen (sqlite3_vfs *pVfs, const gchar *zPath, sqlite3_file *pF
sync_pool = g_thread_pool_new (sync_request_thread_cb, NULL, 2, FALSE, NULL);
/* cFile->old_vfs_file->pMethods is NULL when open failed for some reason,
- thus do not initialize our structure when do not know the version */
+ * thus do not initialize our structure when do not know the version */
if (io_methods.xClose == NULL && cFile->old_vfs_file->pMethods) {
/* initialize our subclass function only once */
io_methods.iVersion = cFile->old_vfs_file->pMethods->iVersion;
@@ -365,8 +374,8 @@ struct _CamelDBPrivate {
static gint
cdb_sql_exec (sqlite3 *db,
const gchar *stmt,
- gint (*callback)(gpointer ,gint,gchar **,gchar **),
- gpointer data,
+ gint (*callback)(gpointer ,gint,gchar **,gchar **),
+ gpointer data,
GError **error)
{
gchar *errmsg = NULL;
@@ -402,10 +411,12 @@ cdb_sql_exec (sqlite3 *db,
}
/* checks whether string 'where' contains whole word 'what',
- case insensitively (ascii, not utf8, same as 'LIKE' in SQLite3)
+ * case insensitively (ascii, not utf8, same as 'LIKE' in SQLite3)
*/
static void
-cdb_match_func (sqlite3_context *ctx, gint nArgs, sqlite3_value **values)
+cdb_match_func (sqlite3_context *ctx,
+ gint nArgs,
+ sqlite3_value **values)
{
gboolean matches = FALSE;
const gchar *what, *where;
@@ -548,7 +559,10 @@ camel_db_close (CamelDB *cdb)
* Since: 2.24
**/
gint
-camel_db_set_collate (CamelDB *cdb, const gchar *col, const gchar *collate, CamelDBCollate func)
+camel_db_set_collate (CamelDB *cdb,
+ const gchar *col,
+ const gchar *collate,
+ CamelDBCollate func)
{
gint ret = 0;
@@ -710,11 +724,14 @@ end:
}
static gint
-count_cb (gpointer data, gint argc, gchar **argv, gchar **azColName)
+count_cb (gpointer data,
+ gint argc,
+ gchar **argv,
+ gchar **azColName)
{
gint i;
- for (i=0; i<argc; i++) {
+ for (i = 0; i < argc; i++) {
if (strstr(azColName[i], "COUNT")) {
*(guint32 *)data = argv [i] ? strtoul (argv [i], NULL, 10) : 0;
}
@@ -1053,7 +1070,10 @@ camel_db_delete_uid_from_vfolder_transaction (CamelDB *db,
}
static gint
-read_uids_callback (gpointer ref, gint ncol, gchar ** cols, gchar ** name)
+read_uids_callback (gpointer ref,
+ gint ncol,
+ gchar **cols,
+ gchar **name)
{
GPtrArray *array = (GPtrArray *) ref;
@@ -1153,11 +1173,14 @@ camel_db_get_folder_deleted_uids (CamelDB *db,
}
static gint
-read_preview_callback (gpointer ref, gint ncol, gchar ** cols, gchar ** name)
+read_preview_callback (gpointer ref,
+ gint ncol,
+ gchar **cols,
+ gchar **name)
{
GHashTable *hash = (GHashTable *) ref;
- const gchar *uid=NULL;
- gchar *msg=NULL;
+ const gchar *uid = NULL;
+ gchar *msg = NULL;
gint i;
for (i = 0; i < ncol; ++i) {
@@ -1226,7 +1249,10 @@ camel_db_write_preview_record (CamelDB *db,
}
static gint
-read_vuids_callback (gpointer ref, gint ncol, gchar ** cols, gchar ** name)
+read_vuids_callback (gpointer ref,
+ gint ncol,
+ gchar **cols,
+ gchar **name)
{
GPtrArray *array = (GPtrArray *) ref;
@@ -1534,7 +1560,10 @@ camel_db_write_folder_version (CamelDB *cdb,
}
static gint
-read_version_callback (gpointer ref, gint ncol, gchar ** cols, gchar ** name)
+read_version_callback (gpointer ref,
+ gint ncol,
+ gchar **cols,
+ gchar **name)
{
gint *version = (gint *) ref;
@@ -1740,7 +1769,10 @@ camel_db_write_folder_info_record (CamelDB *cdb,
}
static gint
-read_fir_callback (gpointer ref, gint ncol, gchar ** cols, gchar ** name)
+read_fir_callback (gpointer ref,
+ gint ncol,
+ gchar **cols,
+ gchar **name)
{
CamelFIRecord *record = *(CamelFIRecord **) ref;
gint i;
diff --git a/camel/camel-db.h b/camel/camel-db.h
index a92b666..761d413 100644
--- a/camel/camel-db.h
+++ b/camel/camel-db.h
@@ -57,7 +57,7 @@ typedef gint (*CamelDBCollate)(gpointer, gint, gconstpointer, gint, gconstpointe
struct _CamelDB {
sqlite3 *db;
/* this lock has been replaced with a rw lock which sits inside priv.
- This is currently unused. Keeping it, not to break the ABI */
+ * This is currently unused. Keeping it, not to break the ABI */
GMutex *lock;
CamelDBPrivate *priv;
};
diff --git a/camel/camel-debug.c b/camel/camel-debug.c
index 9cfb336..6509475 100644
--- a/camel/camel-debug.c
+++ b/camel/camel-debug.c
@@ -92,9 +92,9 @@ gboolean camel_debug (const gchar *mode)
/* Check for fully qualified debug */
colon = strchr (mode, ':');
if (colon) {
- fallback = g_alloca (strlen (mode)+1);
+ fallback = g_alloca (strlen (mode) + 1);
strcpy (fallback, mode);
- colon = (colon-mode) + fallback;
+ colon = (colon - mode) + fallback;
/* Now check 'module[:*]' */
*colon = 0;
if (g_hash_table_lookup (debug_table, fallback))
@@ -149,7 +149,8 @@ camel_debug_end (void)
#include <sys/debugreg.h>
static unsigned
-i386_length_and_rw_bits (gint len, enum target_hw_bp_type type)
+i386_length_and_rw_bits (gint len,
+ enum target_hw_bp_type type)
{
unsigned rw;
@@ -192,8 +193,8 @@ i386_length_and_rw_bits (gint len, enum target_hw_bp_type type)
#define I386_DR_SET_RW_LEN(i,rwlen) \
do { \
- dr_control_mirror &= ~(0x0f << (DR_CONTROL_SHIFT+DR_CONTROL_SIZE*(i))); \
- dr_control_mirror |= ((rwlen) << (DR_CONTROL_SHIFT+DR_CONTROL_SIZE*(i))); \
+ dr_control_mirror &= ~(0x0f << (DR_CONTROL_SHIFT + DR_CONTROL_SIZE * (i))); \
+ dr_control_mirror |= ((rwlen) << (DR_CONTROL_SHIFT + DR_CONTROL_SIZE * (i))); \
} while (0)
#define I386_DR_LOCAL_ENABLE(i) \
@@ -210,7 +211,8 @@ i386_length_and_rw_bits (gint len, enum target_hw_bp_type type)
/* fine idea, but it doesn't work, crashes in get_dr :-/ */
void
-camel_debug_hwatch (gint wp, gpointer addr)
+camel_debug_hwatch (gint wp,
+ gpointer addr)
{
guint32 control, rw;
@@ -220,8 +222,8 @@ camel_debug_hwatch (gint wp, gpointer addr)
get_dr (7, control);
/* set watch mode + size */
rw = DR_RW_WRITE | DR_LEN_4;
- control &= ~(((1 << DR_CONTROL_SIZE)-1) << (DR_CONTROL_SHIFT+DR_CONTROL_SIZE * wp));
- control |= rw << (DR_CONTROL_SHIFT + DR_CONTROL_SIZE*wp);
+ control &= ~(((1 << DR_CONTROL_SIZE) - 1) << (DR_CONTROL_SHIFT + DR_CONTROL_SIZE * wp));
+ control |= rw << (DR_CONTROL_SHIFT + DR_CONTROL_SIZE * wp);
/* set watch enable */
control |= ( 1<< (DR_LOCAL_ENABLE_SHIFT + DR_ENABLE_SIZE * wp));
control |= DR_LOCAL_SLOWDOWN;
diff --git a/camel/camel-disco-diary.c b/camel/camel-disco-diary.c
index cb4f516..5410c67 100644
--- a/camel/camel-disco-diary.c
+++ b/camel/camel-disco-diary.c
@@ -46,13 +46,17 @@
G_DEFINE_TYPE (CamelDiscoDiary, camel_disco_diary, CAMEL_TYPE_OBJECT)
static void
-unref_folder (gpointer key, gpointer value, gpointer data)
+unref_folder (gpointer key,
+ gpointer value,
+ gpointer data)
{
g_object_unref (value);
}
static void
-free_uid (gpointer key, gpointer value, gpointer data)
+free_uid (gpointer key,
+ gpointer value,
+ gpointer data)
{
g_free (key);
g_free (value);
@@ -97,7 +101,8 @@ camel_disco_diary_init (CamelDiscoDiary *diary)
}
static gint
-diary_encode_uids (CamelDiscoDiary *diary, GPtrArray *uids)
+diary_encode_uids (CamelDiscoDiary *diary,
+ GPtrArray *uids)
{
gint i, status;
@@ -108,8 +113,9 @@ diary_encode_uids (CamelDiscoDiary *diary, GPtrArray *uids)
}
void
-camel_disco_diary_log (CamelDiscoDiary *diary, CamelDiscoDiaryAction action,
- ...)
+camel_disco_diary_log (CamelDiscoDiary *diary,
+ CamelDiscoDiaryAction action,
+ ...)
{
va_list ap;
gint status;
@@ -442,16 +448,17 @@ camel_disco_diary_new (CamelDiscoStore *store,
d(printf("diary log file '%s'\n", filename));
/* Note that the linux man page says:
-
- a+ Open for reading and appending (writing at end of file). The
- file is created if it does not exist. The stream is positioned
- at the end of the file.
- However, c99 (which glibc uses?) says:
- a+ append; open or create text file for update, writing at
- end-of-file
-
- So we must seek ourselves.
- */
+ *
+ * a+ Open for reading and appending (writing at end of file).
+ * The file is created if it does not exist. The stream is
+ * positioned at the end of the file.
+ *
+ * However, c99 (which glibc uses?) says:
+ * a+ append; open or create text file for update, writing at
+ * end-of-file
+ *
+ * So we must seek ourselves.
+ */
diary->file = g_fopen (filename, "a+b");
if (!diary->file) {
@@ -472,21 +479,23 @@ camel_disco_diary_new (CamelDiscoStore *store,
}
gboolean
-camel_disco_diary_empty (CamelDiscoDiary *diary)
+camel_disco_diary_empty (CamelDiscoDiary *diary)
{
return ftell (diary->file) == 0;
}
void
-camel_disco_diary_uidmap_add (CamelDiscoDiary *diary, const gchar *old_uid,
- const gchar *new_uid)
+camel_disco_diary_uidmap_add (CamelDiscoDiary *diary,
+ const gchar *old_uid,
+ const gchar *new_uid)
{
g_hash_table_insert (diary->uidmap, g_strdup (old_uid),
g_strdup (new_uid));
}
const gchar *
-camel_disco_diary_uidmap_lookup (CamelDiscoDiary *diary, const gchar *uid)
+camel_disco_diary_uidmap_lookup (CamelDiscoDiary *diary,
+ const gchar *uid)
{
return g_hash_table_lookup (diary->uidmap, uid);
}
diff --git a/camel/camel-disco-store.c b/camel/camel-disco-store.c
index e2c3c65..44b0ce6 100644
--- a/camel/camel-disco-store.c
+++ b/camel/camel-disco-store.c
@@ -105,7 +105,7 @@ disco_store_connect_sync (CamelService *service,
return TRUE;
/* Need to resync. Note we do the ref thing since during the replay
- disconnect could be called, which will remove store->diary and unref it */
+ * disconnect could be called, which will remove store->diary and unref it */
store->status = CAMEL_DISCO_STORE_RESYNCING;
diary = g_object_ref (store->diary);
camel_disco_diary_replay (diary, cancellable, &local_error);
diff --git a/camel/camel-file-utils.c b/camel/camel-file-utils.c
index bbf4610..cd33c95 100644
--- a/camel/camel-file-utils.c
+++ b/camel/camel-file-utils.c
@@ -57,7 +57,8 @@
* Returns: %0 on success, %-1 on error.
**/
gint
-camel_file_util_encode_uint32 (FILE *out, guint32 value)
+camel_file_util_encode_uint32 (FILE *out,
+ guint32 value)
{
gint i;
@@ -82,13 +83,14 @@ camel_file_util_encode_uint32 (FILE *out, guint32 value)
* decoded value.
**/
gint
-camel_file_util_decode_uint32 (FILE *in, guint32 *dest)
+camel_file_util_decode_uint32 (FILE *in,
+ guint32 *dest)
{
guint32 value = 0;
gint v;
/* until we get the last byte, keep decoding 7 bits at a time */
- while ( ((v = fgetc (in)) & 0x80) == 0 && v!=EOF) {
+ while ( ((v = fgetc (in)) & 0x80) == 0 && v != EOF) {
value |= v;
value <<= 7;
}
@@ -112,7 +114,8 @@ camel_file_util_decode_uint32 (FILE *in, guint32 *dest)
* Returns: %0 on success, %-1 on error.
**/
gint
-camel_file_util_encode_fixed_int32 (FILE *out, gint32 value)
+camel_file_util_encode_fixed_int32 (FILE *out,
+ gint32 value)
{
guint32 save;
@@ -132,7 +135,8 @@ camel_file_util_encode_fixed_int32 (FILE *out, gint32 value)
* Returns: %0 on success, %-1 on error.
**/
gint
-camel_file_util_decode_fixed_int32 (FILE *in, gint32 *dest)
+camel_file_util_decode_fixed_int32 (FILE *in,
+ gint32 *dest)
{
guint32 save;
@@ -251,7 +255,8 @@ CFU_DECODE_T (gsize)
* Returns: %0 on success, %-1 on error.
**/
gint
-camel_file_util_encode_string (FILE *out, const gchar *str)
+camel_file_util_encode_string (FILE *out,
+ const gchar *str)
{
register gint len;
@@ -261,7 +266,7 @@ camel_file_util_encode_string (FILE *out, const gchar *str)
if ((len = strlen (str)) > 65536)
len = 65536;
- if (camel_file_util_encode_uint32 (out, len+1) == -1)
+ if (camel_file_util_encode_uint32 (out, len + 1) == -1)
return -1;
if (len == 0 || fwrite (str, len, 1, out) == 1)
return 0;
@@ -278,7 +283,8 @@ camel_file_util_encode_string (FILE *out, const gchar *str)
* Returns: %0 on success, %-1 on error.
**/
gint
-camel_file_util_decode_string (FILE *in, gchar **str)
+camel_file_util_decode_string (FILE *in,
+ gchar **str)
{
guint32 len;
register gchar *ret;
@@ -294,7 +300,7 @@ camel_file_util_decode_string (FILE *in, gchar **str)
return -1;
}
- ret = g_malloc (len+1);
+ ret = g_malloc (len + 1);
if (len > 0 && fread (ret, len, 1, in) != 1) {
g_free (ret);
*str = NULL;
@@ -319,7 +325,9 @@ camel_file_util_decode_string (FILE *in, gchar **str)
* Returns: %0 on success, %-1 on error.
**/
gint
-camel_file_util_encode_fixed_string (FILE *out, const gchar *str, gsize len)
+camel_file_util_encode_fixed_string (FILE *out,
+ const gchar *str,
+ gsize len)
{
gint retval = -1;
@@ -354,7 +362,9 @@ camel_file_util_encode_fixed_string (FILE *out, const gchar *str, gsize len)
* Returns: %0 on success, %-1 on error.
**/
gint
-camel_file_util_decode_fixed_string (FILE *in, gchar **str, gsize len)
+camel_file_util_decode_fixed_string (FILE *in,
+ gchar **str,
+ gsize len)
{
register gchar *ret;
@@ -363,7 +373,7 @@ camel_file_util_decode_fixed_string (FILE *in, gchar **str, gsize len)
return -1;
}
- ret = g_malloc (len+1);
+ ret = g_malloc (len + 1);
if (len > 0 && fread (ret, len, 1, in) != 1) {
g_free (ret);
*str = NULL;
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c
index 3de4569..ea2da51 100644
--- a/camel/camel-filter-driver.c
+++ b/camel/camel-filter-driver.c
@@ -174,7 +174,9 @@ static struct {
G_DEFINE_TYPE (CamelFilterDriver, camel_filter_driver, CAMEL_TYPE_OBJECT)
static void
-free_hash_strings (gpointer key, gpointer value, gpointer data)
+free_hash_strings (gpointer key,
+ gpointer value,
+ gpointer data)
{
g_free (key);
g_free (value);
@@ -300,48 +302,60 @@ camel_filter_driver_new (CamelSession *session)
}
void
-camel_filter_driver_set_folder_func (CamelFilterDriver *d, CamelFilterGetFolderFunc get_folder, gpointer data)
+camel_filter_driver_set_folder_func (CamelFilterDriver *d,
+ CamelFilterGetFolderFunc get_folder,
+ gpointer data)
{
d->priv->get_folder = get_folder;
d->priv->data = data;
}
void
-camel_filter_driver_set_logfile (CamelFilterDriver *d, FILE *logfile)
+camel_filter_driver_set_logfile (CamelFilterDriver *d,
+ FILE *logfile)
{
d->priv->logfile = logfile;
}
void
-camel_filter_driver_set_status_func (CamelFilterDriver *d, CamelFilterStatusFunc *func, gpointer data)
+camel_filter_driver_set_status_func (CamelFilterDriver *d,
+ CamelFilterStatusFunc *func,
+ gpointer data)
{
d->priv->statusfunc = func;
d->priv->statusdata = data;
}
void
-camel_filter_driver_set_shell_func (CamelFilterDriver *d, CamelFilterShellFunc *func, gpointer data)
+camel_filter_driver_set_shell_func (CamelFilterDriver *d,
+ CamelFilterShellFunc *func,
+ gpointer data)
{
d->priv->shellfunc = func;
d->priv->shelldata = data;
}
void
-camel_filter_driver_set_play_sound_func (CamelFilterDriver *d, CamelFilterPlaySoundFunc *func, gpointer data)
+camel_filter_driver_set_play_sound_func (CamelFilterDriver *d,
+ CamelFilterPlaySoundFunc *func,
+ gpointer data)
{
d->priv->playfunc = func;
d->priv->playdata = data;
}
void
-camel_filter_driver_set_system_beep_func (CamelFilterDriver *d, CamelFilterSystemBeepFunc *func, gpointer data)
+camel_filter_driver_set_system_beep_func (CamelFilterDriver *d,
+ CamelFilterSystemBeepFunc *func,
+ gpointer data)
{
d->priv->beep = func;
d->priv->beepdata = data;
}
void
-camel_filter_driver_set_default_folder (CamelFilterDriver *d, CamelFolder *def)
+camel_filter_driver_set_default_folder (CamelFilterDriver *d,
+ CamelFolder *def)
{
if (d->priv->defaultfolder) {
camel_folder_thaw (d->priv->defaultfolder);
@@ -357,7 +371,10 @@ camel_filter_driver_set_default_folder (CamelFilterDriver *d, CamelFolder *def)
}
void
-camel_filter_driver_add_rule (CamelFilterDriver *d, const gchar *name, const gchar *match, const gchar *action)
+camel_filter_driver_add_rule (CamelFilterDriver *d,
+ const gchar *name,
+ const gchar *match,
+ const gchar *action)
{
struct _filter_rule *node;
@@ -369,7 +386,8 @@ camel_filter_driver_add_rule (CamelFilterDriver *d, const gchar *name, const gch
}
gint
-camel_filter_driver_remove_rule_by_name (CamelFilterDriver *d, const gchar *name)
+camel_filter_driver_remove_rule_by_name (CamelFilterDriver *d,
+ const gchar *name)
{
struct _filter_rule *node;
@@ -392,7 +410,11 @@ camel_filter_driver_remove_rule_by_name (CamelFilterDriver *d, const gchar *name
}
static void
-report_status (CamelFilterDriver *driver, enum camel_filter_status_t status, gint pc, const gchar *desc, ...)
+report_status (CamelFilterDriver *driver,
+ enum camel_filter_status_t status,
+ gint pc,
+ const gchar *desc,
+ ...)
{
/* call user-defined status report function */
va_list ap;
@@ -408,11 +430,13 @@ report_status (CamelFilterDriver *driver, enum camel_filter_status_t status, gin
#if 0
void
-camel_filter_driver_set_global (CamelFilterDriver *d, const gchar *name, const gchar *value)
+camel_filter_driver_set_global (CamelFilterDriver *d,
+ const gchar *name,
+ const gchar *value)
{
gchar *oldkey, *oldvalue;
- if (g_hash_table_lookup_extended (d->priv->globals, name, (gpointer)&oldkey, (gpointer)&oldvalue)) {
+ if (g_hash_table_lookup_extended (d->priv->globals, name, (gpointer) &oldkey, (gpointer) &oldvalue)) {
g_free (oldvalue);
g_hash_table_insert (d->priv->globals, oldkey, g_strdup (value));
} else {
@@ -422,7 +446,10 @@ camel_filter_driver_set_global (CamelFilterDriver *d, const gchar *name, const g
#endif
static ESExpResult *
-do_delete (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+do_delete (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFilterDriver *driver)
{
d(fprintf (stderr, "doing delete\n"));
driver->priv->deleted = TRUE;
@@ -432,7 +459,10 @@ do_delete (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterD
}
static ESExpResult *
-do_forward_to (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+do_forward_to (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFilterDriver *driver)
{
CamelFilterDriverPrivate *p = driver->priv;
@@ -458,7 +488,10 @@ do_forward_to (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFil
}
static ESExpResult *
-do_copy (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+do_copy (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFilterDriver *driver)
{
CamelFilterDriverPrivate *p = driver->priv;
gint i;
@@ -515,7 +548,10 @@ do_copy (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDri
}
static ESExpResult *
-do_move (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+do_move (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFilterDriver *driver)
{
CamelFilterDriverPrivate *p = driver->priv;
gint i;
@@ -537,7 +573,7 @@ do_move (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDri
break;
/* only delete on last folder (only 1 can ever be supplied by ui currently) */
- last = (i == argc-1);
+ last = (i == argc - 1);
if (!p->modified && p->uid && p->source && camel_folder_has_summary_capability (p->source)) {
GPtrArray *uids;
@@ -594,7 +630,10 @@ do_move (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDri
}
static ESExpResult *
-do_stop (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+do_stop (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFilterDriver *driver)
{
CamelFilterDriverPrivate *p = driver->priv;
@@ -606,14 +645,17 @@ do_stop (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDri
}
static ESExpResult *
-do_label (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+do_label (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFilterDriver *driver)
{
CamelFilterDriverPrivate *p = driver->priv;
d(fprintf (stderr, "setting label tag\n"));
if (argc > 0 && argv[0]->type == ESEXP_RES_STRING) {
/* This is a list of new labels, we should used these in case of passing in old names.
- This all is required only because backward compatibility. */
+ * This all is required only because backward compatibility. */
const gchar *new_labels[] = { "$Labelimportant", "$Labelwork", "$Labelpersonal", "$Labeltodo", "$Labellater", NULL};
const gchar *label;
gint i;
@@ -638,7 +680,10 @@ do_label (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDr
}
static ESExpResult *
-do_color (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+do_color (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFilterDriver *driver)
{
CamelFilterDriverPrivate *p = driver->priv;
@@ -655,7 +700,10 @@ do_color (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDr
}
static ESExpResult *
-do_score (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+do_score (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFilterDriver *driver)
{
CamelFilterDriverPrivate *p = driver->priv;
@@ -673,7 +721,10 @@ do_score (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDr
}
static ESExpResult *
-do_adjust_score (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+do_adjust_score (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFilterDriver *driver)
{
CamelFilterDriverPrivate *p = driver->priv;
@@ -683,7 +734,7 @@ do_adjust_score (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelF
gint old;
value = (gchar *)camel_message_info_user_tag(p->info, "score");
- old = value?atoi (value):0;
+ old = value ? atoi (value) : 0;
value = g_strdup_printf ("%d", old+argv[0]->value.number);
camel_message_info_set_user_tag(p->info, "score", value);
camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Adjust score (%d) to %s", argv[0]->value.number, value);
@@ -694,7 +745,10 @@ do_adjust_score (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelF
}
static ESExpResult *
-set_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+set_flag (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFilterDriver *driver)
{
CamelFilterDriverPrivate *p = driver->priv;
guint32 flags;
@@ -716,7 +770,10 @@ set_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDr
}
static ESExpResult *
-unset_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+unset_flag (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFilterDriver *driver)
{
CamelFilterDriverPrivate *p = driver->priv;
guint32 flags;
@@ -753,9 +810,9 @@ typedef struct {
} child_watch_data_t;
static void
-child_watch (GPid pid,
- gint status,
- gpointer data)
+child_watch (GPid pid,
+ gint status,
+ gpointer data)
{
child_watch_data_t *child_watch_data = data;
@@ -767,7 +824,10 @@ child_watch (GPid pid,
}
static gint
-pipe_to_system (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+pipe_to_system (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFilterDriver *driver)
{
CamelFilterDriverPrivate *p = driver->priv;
gint i, pipe_to_child, pipe_from_child;
@@ -899,7 +959,10 @@ pipe_to_system (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFi
}
static ESExpResult *
-pipe_message (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+pipe_message (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFilterDriver *driver)
{
gint i;
@@ -916,7 +979,10 @@ pipe_message (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilt
}
static ESExpResult *
-do_shell (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+do_shell (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFilterDriver *driver)
{
CamelFilterDriverPrivate *p = driver->priv;
GString *command;
@@ -957,7 +1023,10 @@ do_shell (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDr
}
static ESExpResult *
-do_beep (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+do_beep (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFilterDriver *driver)
{
CamelFilterDriverPrivate *p = driver->priv;
@@ -972,7 +1041,10 @@ do_beep (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDri
}
static ESExpResult *
-play_sound (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+play_sound (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFilterDriver *driver)
{
CamelFilterDriverPrivate *p = driver->priv;
@@ -987,7 +1059,10 @@ play_sound (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilter
}
static ESExpResult *
-do_only_once (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+do_only_once (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFilterDriver *driver)
{
CamelFilterDriverPrivate *p = driver->priv;
@@ -1001,7 +1076,8 @@ do_only_once (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilt
}
static CamelFolder *
-open_folder (CamelFilterDriver *driver, const gchar *folder_url)
+open_folder (CamelFilterDriver *driver,
+ const gchar *folder_url)
{
CamelFilterDriverPrivate *p = driver->priv;
CamelFolder *camelfolder;
@@ -1009,12 +1085,12 @@ open_folder (CamelFilterDriver *driver, const gchar *folder_url)
/* we have a lookup table of currently open folders */
camelfolder = g_hash_table_lookup (p->folders, folder_url);
if (camelfolder)
- return camelfolder == FOLDER_INVALID?NULL:camelfolder;
+ return camelfolder == FOLDER_INVALID ? NULL : camelfolder;
/* if we have a default folder, ignore exceptions. This is so
- a bad filter rule on pop or local delivery doesn't result
- in duplicate mails, just mail going to inbox. Otherwise,
- we want to know about exceptions and abort processing */
+ * a bad filter rule on pop or local delivery doesn't result
+ * in duplicate mails, just mail going to inbox. Otherwise,
+ * we want to know about exceptions and abort processing */
if (p->defaultfolder) {
camelfolder = p->get_folder (driver, folder_url, p->data, NULL);
} else {
@@ -1032,7 +1108,9 @@ open_folder (CamelFilterDriver *driver, const gchar *folder_url)
}
static void
-close_folder (gpointer key, gpointer value, gpointer data)
+close_folder (gpointer key,
+ gpointer value,
+ gpointer data)
{
CamelFolder *folder = value;
CamelFilterDriver *driver = data;
@@ -1072,14 +1150,19 @@ close_folders (CamelFilterDriver *driver)
#if 0
static void
-free_key (gpointer key, gpointer value, gpointer user_data)
+free_key (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
g_free (key);
}
#endif
static void
-camel_filter_driver_log (CamelFilterDriver *driver, enum filter_log_t status, const gchar *desc, ...)
+camel_filter_driver_log (CamelFilterDriver *driver,
+ enum filter_log_t status,
+ const gchar *desc,
+ ...)
{
CamelFilterDriverPrivate *p = driver->priv;
@@ -1134,7 +1217,9 @@ struct _run_only_once {
};
static gboolean
-run_only_once (gpointer key, gchar *action, struct _run_only_once *data)
+run_only_once (gpointer key,
+ gchar *action,
+ struct _run_only_once *data)
{
CamelFilterDriverPrivate *p = data->driver->priv;
ESExpResult *r;
@@ -1200,7 +1285,8 @@ camel_filter_driver_flush (CamelFilterDriver *driver,
}
static gint
-decode_flags_from_xev (const gchar *xev, CamelMessageInfoBase *mi)
+decode_flags_from_xev (const gchar *xev,
+ CamelMessageInfoBase *mi)
{
guint32 uid, flags = 0;
gchar *header;
@@ -1251,7 +1337,7 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver,
goffset last = 0;
gint ret = -1;
- fd = g_open (mbox, O_RDONLY|O_BINARY, 0);
+ fd = g_open (mbox, O_RDONLY | O_BINARY, 0);
if (fd == -1) {
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
@@ -1390,7 +1476,7 @@ camel_filter_driver_filter_folder (CamelFilterDriver *driver,
}
for (i = 0; i < uids->len; i++) {
- gint pc = (100 * i)/uids->len;
+ gint pc = (100 * i) / uids->len;
GError *local_error = NULL;
report_status (driver, CAMEL_FILTER_STATUS_START, pc, _("Getting message %d of %d"), i+1,
@@ -1412,7 +1498,7 @@ camel_filter_driver_filter_folder (CamelFilterDriver *driver,
report_status (
driver, CAMEL_FILTER_STATUS_END, 100,
_("Failed at message %d of %d"),
- i+1, uids->len);
+ i + 1, uids->len);
g_propagate_error (error, local_error);
status = -1;
break;
@@ -1449,7 +1535,8 @@ struct _get_message {
};
static CamelMimeMessage *
-get_message_cb (gpointer data, GError **error)
+get_message_cb (gpointer data,
+ GError **error)
{
struct _get_message *msgdata = data;
CamelMimeMessage *message;
diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c
index 5c32882..856a67d 100644
--- a/camel/camel-filter-search.c
+++ b/camel/camel-filter-search.c
@@ -126,7 +126,8 @@ static struct {
};
static CamelMimeMessage *
-camel_filter_search_get_message (FilterMessageSearch *fms, struct _ESExp *sexp)
+camel_filter_search_get_message (FilterMessageSearch *fms,
+ struct _ESExp *sexp)
{
if (fms->message)
return fms->message;
@@ -140,7 +141,11 @@ camel_filter_search_get_message (FilterMessageSearch *fms, struct _ESExp *sexp)
}
static ESExpResult *
-check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms, camel_search_match_t how)
+check_header (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms,
+ camel_search_match_t how)
{
gboolean matched = FALSE;
ESExpResult *r;
@@ -150,14 +155,14 @@ check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMes
gchar *name = argv[0]->value.string;
/* shortcut: a match for "" against any header always matches */
- for (i=1; i<argc && !matched; i++)
+ for (i = 1; i < argc && !matched; i++)
matched = argv[i]->type == ESEXP_RES_STRING && argv[i]->value.string[0] == 0;
if (g_ascii_strcasecmp(name, "x-camel-mlist") == 0) {
const gchar *list = camel_message_info_mlist (fms->info);
if (list) {
- for (i=1; i<argc && !matched; i++) {
+ for (i = 1; i < argc && !matched; i++) {
if (argv[i]->type == ESEXP_RES_STRING)
matched = camel_search_header_match (list, argv[i]->value.string, how, CAMEL_SEARCH_TYPE_MLIST, NULL);
}
@@ -186,7 +191,7 @@ check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMes
for (header = mime_part->headers; header && !matched; header = header->next) {
if (!g_ascii_strcasecmp (header->name, name)) {
- for (i=1; i<argc && !matched; i++) {
+ for (i = 1; i < argc && !matched; i++) {
if (argv[i]->type == ESEXP_RES_STRING)
matched = camel_search_header_match (header->value, argv[i]->value.string, how, type, charset);
}
@@ -202,37 +207,55 @@ check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMes
}
static ESExpResult *
-header_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+header_contains (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
return check_header (f, argc, argv, fms, CAMEL_SEARCH_MATCH_CONTAINS);
}
static ESExpResult *
-header_matches (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+header_matches (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
return check_header (f, argc, argv, fms, CAMEL_SEARCH_MATCH_EXACT);
}
static ESExpResult *
-header_starts_with (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+header_starts_with (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
return check_header (f, argc, argv, fms, CAMEL_SEARCH_MATCH_STARTS);
}
static ESExpResult *
-header_ends_with (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+header_ends_with (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
return check_header (f, argc, argv, fms, CAMEL_SEARCH_MATCH_ENDS);
}
static ESExpResult *
-header_soundex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+header_soundex (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
return check_header (f, argc, argv, fms, CAMEL_SEARCH_MATCH_SOUNDEX);
}
static ESExpResult *
-header_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+header_exists (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
CamelMimeMessage *message;
gboolean matched = FALSE;
@@ -253,7 +276,10 @@ header_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMe
}
static ESExpResult *
-header_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+header_regex (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
ESExpResult *r = e_sexp_result_new (f, ESEXP_RES_BOOL);
CamelMimeMessage *message;
@@ -264,7 +290,7 @@ header_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMes
if (argc > 1 && argv[0]->type == ESEXP_RES_STRING
&& (contents = camel_medium_get_header (CAMEL_MEDIUM (message), argv[0]->value.string))
- && camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE, argc-1, argv+1, fms->error) == 0) {
+ && camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_REGEX | CAMEL_SEARCH_MATCH_ICASE, argc - 1, argv + 1, fms->error) == 0) {
r->value.boolean = regexec (&pattern, contents, 0, NULL, 0) == 0;
regfree (&pattern);
} else
@@ -302,14 +328,17 @@ get_full_header (CamelMimeMessage *message)
}
static ESExpResult *
-header_full_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+header_full_regex (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
ESExpResult *r = e_sexp_result_new (f, ESEXP_RES_BOOL);
CamelMimeMessage *message;
regex_t pattern;
gchar *contents;
- if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_NEWLINE,
+ if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_REGEX | CAMEL_SEARCH_MATCH_ICASE | CAMEL_SEARCH_MATCH_NEWLINE,
argc, argv, fms->error) == 0) {
message = camel_filter_search_get_message (fms, f);
contents = get_full_header (message);
@@ -323,7 +352,10 @@ header_full_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Filt
}
static ESExpResult *
-match_all (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, FilterMessageSearch *fms)
+match_all (struct _ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ FilterMessageSearch *fms)
{
/* match-all: when dealing with single messages is a no-op */
ESExpResult *r;
@@ -338,7 +370,10 @@ match_all (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, FilterMessageS
}
static ESExpResult *
-body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+body_contains (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
ESExpResult *r = e_sexp_result_new (f, ESEXP_RES_BOOL);
CamelMimeMessage *message;
@@ -355,13 +390,16 @@ body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMe
}
static ESExpResult *
-body_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+body_regex (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
ESExpResult *r = e_sexp_result_new (f, ESEXP_RES_BOOL);
CamelMimeMessage *message;
regex_t pattern;
- if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_NEWLINE,
+ if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_ICASE | CAMEL_SEARCH_MATCH_REGEX | CAMEL_SEARCH_MATCH_NEWLINE,
argc, argv, fms->error) == 0) {
message = camel_filter_search_get_message (fms, f);
r->value.boolean = camel_search_message_body_contains ((CamelDataWrapper *) message, &pattern);
@@ -373,7 +411,10 @@ body_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessa
}
static ESExpResult *
-user_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+user_flag (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
ESExpResult *r;
gboolean truth = FALSE;
@@ -395,7 +436,10 @@ user_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessag
}
static ESExpResult *
-system_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+system_flag (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
ESExpResult *r;
@@ -409,7 +453,10 @@ system_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMess
}
static ESExpResult *
-user_tag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+user_tag (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
ESExpResult *r;
const gchar *tag;
@@ -426,7 +473,10 @@ user_tag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessage
}
static ESExpResult *
-get_sent_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+get_sent_date (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
CamelMimeMessage *message;
ESExpResult *r;
@@ -439,7 +489,10 @@ get_sent_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMe
}
static ESExpResult *
-get_received_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+get_received_date (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
CamelMimeMessage *message;
ESExpResult *r;
@@ -452,7 +505,10 @@ get_received_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Filt
}
static ESExpResult *
-get_current_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+get_current_date (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
ESExpResult *r;
@@ -463,7 +519,10 @@ get_current_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Filte
}
static ESExpResult *
-get_relative_months (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+get_relative_months (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
ESExpResult *r;
@@ -481,7 +540,8 @@ get_relative_months (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Fi
}
static CamelService *
-get_service_for_source (CamelSession *session, const gchar *src)
+get_service_for_source (CamelSession *session,
+ const gchar *src)
{
CamelService *service = NULL;
@@ -511,7 +571,10 @@ get_service_for_source (CamelSession *session, const gchar *src)
}
static ESExpResult *
-header_source (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+header_source (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
CamelMimeMessage *message;
ESExpResult *r;
@@ -547,7 +610,10 @@ header_source (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMe
/* remember, the size comparisons are done at Kbytes */
static ESExpResult *
-get_size (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+get_size (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
ESExpResult *r;
@@ -573,9 +639,9 @@ typedef struct {
} child_watch_data_t;
static void
-child_watch (GPid pid,
- gint status,
- gpointer data)
+child_watch (GPid pid,
+ gint status,
+ gpointer data)
{
child_watch_data_t *child_watch_data = data;
@@ -586,7 +652,10 @@ child_watch (GPid pid,
}
static gint
-run_command (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+run_command (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
CamelMimeMessage *message;
CamelStream *stream;
@@ -664,7 +733,10 @@ run_command (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMess
}
static ESExpResult *
-pipe_message (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+pipe_message (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
ESExpResult *r;
gint retval, i;
@@ -687,7 +759,10 @@ pipe_message (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMes
}
static ESExpResult *
-junk_test (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
+junk_test (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ FilterMessageSearch *fms)
{
ESExpResult *r;
gboolean retval = FALSE;
@@ -718,7 +793,7 @@ junk_test (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessag
if (camel_debug ("junk"))
printf("Sender '%s' in book? %d\n", camel_message_info_from (info), !retval);
- if (retval) /* Not in book. Could be spam. So check for it*/ {
+ if (retval) /* Not in book. Could be spam. So check for it */ {
CamelMimeMessage *message;
CamelJunkStatus status;
gboolean success;
diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c
index 65f79d8..aa90c2e 100644
--- a/camel/camel-folder-search.c
+++ b/camel/camel-folder-search.c
@@ -20,8 +20,8 @@
*/
/* This is a helper class for folders to implement the search function.
- It implements enough to do basic searches on folders that can provide
- an in-memory summary and a body index. */
+ * It implements enough to do basic searches on folders that can provide
+ * an in-memory summary and a body index. */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -215,7 +215,7 @@ camel_folder_search_construct (CamelFolderSearch *search)
for (i = 0; i < G_N_ELEMENTS (builtins); i++) {
gpointer func;
/* c is sure messy sometimes */
- func = *((gpointer *)(((gchar *) class)+builtins[i].offset));
+ func = *((gpointer *)(((gchar *) class) + builtins[i].offset));
if (func == NULL && builtins[i].flags&1) {
g_warning("Search class doesn't implement '%s' method: %s", builtins[i].name, G_OBJECT_TYPE_NAME (search));
func = (gpointer) search_dummy;
@@ -263,7 +263,8 @@ camel_folder_search_new (void)
* available. Or for use by subclasses.
**/
void
-camel_folder_search_set_folder (CamelFolderSearch *search, CamelFolder *folder)
+camel_folder_search_set_folder (CamelFolderSearch *search,
+ CamelFolder *folder)
{
search->folder = folder;
}
@@ -279,7 +280,8 @@ camel_folder_search_set_folder (CamelFolderSearch *search, CamelFolder *folder)
* for searching headers and for the match-all operator.
**/
void
-camel_folder_search_set_summary (CamelFolderSearch *search, GPtrArray *summary)
+camel_folder_search_set_summary (CamelFolderSearch *search,
+ GPtrArray *summary)
{
search->summary = summary;
}
@@ -295,7 +297,8 @@ camel_folder_search_set_summary (CamelFolderSearch *search, GPtrArray *summary)
* body-contains function.
**/
void
-camel_folder_search_set_body_index (CamelFolderSearch *search, CamelIndex *index)
+camel_folder_search_set_body_index (CamelFolderSearch *search,
+ CamelIndex *index)
{
if (search->body_index)
g_object_unref (search->body_index);
@@ -367,11 +370,11 @@ camel_folder_search_execute_expression (CamelFolderSearch *search,
if (search->summary) {
/* reorder result in summary order */
results = g_hash_table_new (g_str_hash, g_str_equal);
- for (i=0;i<r->value.ptrarray->len;i++) {
+ for (i = 0; i < r->value.ptrarray->len; i++) {
d(printf("adding match: %s\n", (gchar *)g_ptr_array_index(r->value.ptrarray, i)));
g_hash_table_insert (results, g_ptr_array_index (r->value.ptrarray, i), GINT_TO_POINTER (1));
}
- for (i=0;i<search->summary->len;i++) {
+ for (i = 0; i < search->summary->len; i++) {
gchar *uid = g_ptr_array_index (search->summary, i);
if (g_hash_table_lookup (results, uid)) {
g_ptr_array_add (matches, (gpointer) camel_pstring_strdup (uid));
@@ -379,7 +382,7 @@ camel_folder_search_execute_expression (CamelFolderSearch *search,
}
g_hash_table_destroy (results);
} else {
- for (i=0;i<r->value.ptrarray->len;i++) {
+ for (i = 0; i < r->value.ptrarray->len; i++) {
d(printf("adding match: %s\n", (gchar *)g_ptr_array_index(r->value.ptrarray, i)));
g_ptr_array_add (matches, (gpointer) camel_pstring_strdup (g_ptr_array_index (r->value.ptrarray, i)));
}
@@ -476,12 +479,12 @@ camel_folder_search_count (CamelFolderSearch *search,
/* reorder result in summary order */
results = g_hash_table_new (g_str_hash, g_str_equal);
- for (i=0;i<r->value.ptrarray->len;i++) {
+ for (i = 0; i < r->value.ptrarray->len; i++) {
d(printf("adding match: %s\n", (gchar *)g_ptr_array_index(r->value.ptrarray, i)));
g_hash_table_insert (results, g_ptr_array_index (r->value.ptrarray, i), GINT_TO_POINTER (1));
}
- for (i=0;i<summary_set->len;i++) {
+ for (i = 0; i < summary_set->len; i++) {
gchar *uid = g_ptr_array_index (summary_set, i);
if (g_hash_table_lookup (results, uid))
count++;
@@ -607,9 +610,9 @@ camel_folder_search_search (CamelFolderSearch *search,
GHashTable *uids_hash = g_hash_table_new (g_str_hash, g_str_equal);
summary_set = search->summary_set = g_ptr_array_new ();
- for (i=0;i<uids->len;i++)
+ for (i = 0; i < uids->len; i++)
g_hash_table_insert (uids_hash, uids->pdata[i], uids->pdata[i]);
- for (i=0;i<search->summary->len;i++)
+ for (i = 0; i < search->summary->len; i++)
if (g_hash_table_lookup (uids_hash, search->summary->pdata[i]))
g_ptr_array_add (search->summary_set, search->summary->pdata[i]);
g_hash_table_destroy (uids_hash);
@@ -649,12 +652,12 @@ camel_folder_search_search (CamelFolderSearch *search,
/* reorder result in summary order */
results = g_hash_table_new (g_str_hash, g_str_equal);
- for (i=0;i<r->value.ptrarray->len;i++) {
+ for (i = 0; i < r->value.ptrarray->len; i++) {
d(printf("adding match: %s\n", (gchar *)g_ptr_array_index(r->value.ptrarray, i)));
g_hash_table_insert (results, g_ptr_array_index (r->value.ptrarray, i), GINT_TO_POINTER (1));
}
- for (i=0;i<summary_set->len;i++) {
+ for (i = 0; i < summary_set->len; i++) {
gchar *uid = g_ptr_array_index (summary_set, i);
if (g_hash_table_lookup (results, uid))
g_ptr_array_add (matches, (gpointer) camel_pstring_strdup (uid));
@@ -734,7 +737,10 @@ void camel_folder_search_free_result (CamelFolderSearch *search, GPtrArray *resu
/* dummy function, returns false always, or an empty match array */
static ESExpResult *
-search_dummy (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_dummy (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search)
{
ESExpResult *r;
@@ -751,12 +757,15 @@ search_dummy (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFold
/* impelemnt an 'array not', i.e. everything in the summary, not in the supplied array */
static ESExpResult *
-search_not (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_not (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search)
{
ESExpResult *r;
gint i;
- if (argc>0) {
+ if (argc > 0) {
if (argv[0]->type == ESEXP_RES_ARRAY_PTR) {
GPtrArray *v = argv[0]->value.ptrarray;
const gchar *uid;
@@ -769,7 +778,7 @@ search_not (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolder
gint found = FALSE;
uid = camel_message_info_uid (search->current);
- for (i=0;!found && i<v->len;i++) {
+ for (i = 0; !found && i < v->len; i++) {
if (strcmp (uid, v->pdata[i]) == 0)
found = TRUE;
}
@@ -785,12 +794,12 @@ search_not (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolder
gchar **m;
s = (gchar **) v->pdata;
- for (i=0;i<v->len;i++)
+ for (i = 0; i < v->len; i++)
g_hash_table_insert (have, s[i], s[i]);
- v = search->summary_set?search->summary_set:search->summary;
+ v = search->summary_set ? search->summary_set : search->summary;
m = (gchar **) v->pdata;
- for (i=0;i<v->len;i++) {
+ for (i = 0; i < v->len; i++) {
gchar *uid = m[i];
if (g_hash_table_lookup (have, uid) == NULL)
@@ -816,14 +825,17 @@ search_not (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolder
}
static ESExpResult *
-search_match_all (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, CamelFolderSearch *search)
+search_match_all (struct _ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ CamelFolderSearch *search)
{
gint i;
ESExpResult *r, *r1;
gchar *error_msg;
GPtrArray *v;
- if (argc>1) {
+ if (argc > 1) {
g_warning("match-all only takes a single argument, other arguments ignored");
}
@@ -834,7 +846,7 @@ search_match_all (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, CamelFo
r = e_sexp_result_new (f, ESEXP_RES_BOOL);
r->value.boolean = FALSE;
- if (argc>0) {
+ if (argc > 0) {
r1 = e_sexp_term_eval (f, argv[0]);
if (r1->type == ESEXP_RES_BOOL) {
r->value.boolean = r1->value.boolean;
@@ -862,13 +874,13 @@ search_match_all (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, CamelFo
return r;
}
- v = search->summary_set?search->summary_set:search->summary;
+ v = search->summary_set ? search->summary_set : search->summary;
if (!CAMEL_IS_VEE_FOLDER (search->folder)) {
camel_folder_summary_prepare_fetch_all (search->folder->summary, search->priv->error);
}
- for (i=0;i<v->len;i++) {
+ for (i = 0; i < v->len; i++) {
const gchar *uid;
search->current = camel_folder_summary_uid (search->folder->summary, v->pdata[i]);
@@ -876,7 +888,7 @@ search_match_all (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, CamelFo
continue;
uid = camel_message_info_uid (search->current);
- if (argc>0) {
+ if (argc > 0) {
r1 = e_sexp_term_eval (f, argv[0]);
if (r1->type == ESEXP_RES_BOOL) {
if (r1->value.boolean)
@@ -899,7 +911,8 @@ search_match_all (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, CamelFo
}
static void
-fill_thread_table (struct _CamelFolderThreadNode *root, GHashTable *id_hash)
+fill_thread_table (struct _CamelFolderThreadNode *root,
+ GHashTable *id_hash)
{
while (root) {
g_hash_table_insert (id_hash, (gchar *) camel_message_info_uid (root->message), root);
@@ -910,7 +923,8 @@ fill_thread_table (struct _CamelFolderThreadNode *root, GHashTable *id_hash)
}
static void
-add_thread_results (struct _CamelFolderThreadNode *root, GHashTable *result_hash)
+add_thread_results (struct _CamelFolderThreadNode *root,
+ GHashTable *result_hash)
{
while (root) {
g_hash_table_insert (result_hash, (gchar *) camel_message_info_uid (root->message), GINT_TO_POINTER (1));
@@ -921,13 +935,18 @@ add_thread_results (struct _CamelFolderThreadNode *root, GHashTable *result_hash
}
static void
-add_results (gchar *uid, gpointer dummy, GPtrArray *result)
+add_results (gchar *uid,
+ gpointer dummy,
+ GPtrArray *result)
{
g_ptr_array_add (result, uid);
}
static ESExpResult *
-search_match_threads (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, CamelFolderSearch *search)
+search_match_threads (struct _ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ CamelFolderSearch *search)
{
ESExpResult *r;
CamelFolderSearchPrivate *p = search->priv;
@@ -973,7 +992,7 @@ search_match_threads (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, Cam
/* behave as (begin does */
r = NULL;
- for (i=1;i<argc;i++) {
+ for (i = 1; i < argc; i++) {
if (r)
e_sexp_result_free (f, r);
r = e_sexp_term_eval (f, argv[i]);
@@ -1005,7 +1024,7 @@ search_match_threads (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, Cam
}
results = g_hash_table_new (g_str_hash, g_str_equal);
- for (i=0;i<r->value.ptrarray->len;i++) {
+ for (i = 0; i < r->value.ptrarray->len; i++) {
struct _CamelFolderThreadNode *node, *scan;
if (type != 4)
@@ -1058,7 +1077,11 @@ get_current_message (CamelFolderSearch *search)
}
static ESExpResult *
-check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search, camel_search_match_t how)
+check_header (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search,
+ camel_search_match_t how)
{
ESExpResult *r;
gint truth = FALSE;
@@ -1066,7 +1089,7 @@ check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFold
r(printf("executing check-header %d\n", how));
/* are we inside a match-all? */
- if (search->current && argc>1
+ if (search->current && argc > 1
&& argv[0]->type == ESEXP_RES_STRING) {
gchar *headername;
const gchar *header = NULL, *charset = NULL;
@@ -1113,7 +1136,7 @@ check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFold
header = "";
/* performs an OR of all words */
- for (i=1;i<argc && !truth;i++) {
+ for (i = 1; i < argc && !truth; i++) {
if (argv[i]->type == ESEXP_RES_STRING) {
if (argv[i]->value.string[0] == 0) {
truth = TRUE;
@@ -1121,7 +1144,7 @@ check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFold
/* doesn't make sense to split words on anything but contains i.e. we can't have an ending match different words */
words = camel_search_words_split ((const guchar *) argv[i]->value.string);
truth = TRUE;
- for (j=0;j<words->len && truth;j++) {
+ for (j = 0; j < words->len && truth; j++) {
if (message) {
for (raw_header = ((CamelMimePart *) message)->headers; raw_header; raw_header = raw_header->next) {
if (!g_ascii_strcasecmp (raw_header->name, headername)) {
@@ -1168,31 +1191,46 @@ printf("%s\t", node);
*/
static ESExpResult *
-search_header_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_header_contains (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search)
{
return check_header (f, argc, argv, search, CAMEL_SEARCH_MATCH_CONTAINS);
}
static ESExpResult *
-search_header_matches (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_header_matches (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search)
{
return check_header (f, argc, argv, search, CAMEL_SEARCH_MATCH_EXACT);
}
static ESExpResult *
-search_header_starts_with (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_header_starts_with (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search)
{
return check_header (f, argc, argv, search, CAMEL_SEARCH_MATCH_STARTS);
}
static ESExpResult *
-search_header_ends_with (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_header_ends_with (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search)
{
return check_header (f, argc, argv, search, CAMEL_SEARCH_MATCH_ENDS);
}
static ESExpResult *
-search_header_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_header_exists (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search)
{
ESExpResult *r;
@@ -1212,13 +1250,19 @@ search_header_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, C
}
static ESExpResult *
-search_header_soundex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_header_soundex (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search)
{
return check_header (f, argc, argv, search, CAMEL_SEARCH_MATCH_SOUNDEX);
}
static ESExpResult *
-search_header_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_header_regex (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search)
{
ESExpResult *r;
CamelMimeMessage *msg;
@@ -1233,7 +1277,7 @@ search_header_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Ca
if (argc > 1 && argv[0]->type == ESEXP_RES_STRING
&& (contents = camel_medium_get_header (CAMEL_MEDIUM (msg), argv[0]->value.string))
- && camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE, argc-1, argv+1, search->priv->error) == 0) {
+ && camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_REGEX | CAMEL_SEARCH_MATCH_ICASE, argc - 1, argv + 1, search->priv->error) == 0) {
r->value.boolean = regexec (&pattern, contents, 0, NULL, 0) == 0;
regfree (&pattern);
} else
@@ -1271,7 +1315,10 @@ get_full_header (CamelMimeMessage *message)
}
static ESExpResult *
-search_header_full_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_header_full_regex (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search)
{
ESExpResult *r;
CamelMimeMessage *msg;
@@ -1283,7 +1330,7 @@ search_header_full_regex (struct _ESExp *f, gint argc, struct _ESExpResult **arg
r = e_sexp_result_new (f, ESEXP_RES_BOOL);
- if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_NEWLINE, argc, argv, search->priv->error) == 0) {
+ if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_REGEX | CAMEL_SEARCH_MATCH_ICASE | CAMEL_SEARCH_MATCH_NEWLINE, argc, argv, search->priv->error) == 0) {
gchar *contents;
contents = get_full_header (msg);
@@ -1311,14 +1358,18 @@ struct IterData {
/* or, store all unique values */
static void
-htor (gchar *key, gint value, struct IterData *iter_data)
+htor (gchar *key,
+ gint value,
+ struct IterData *iter_data)
{
g_ptr_array_add (iter_data->uids, key);
}
/* and, only store duplicates */
static void
-htand (gchar *key, gint value, struct IterData *iter_data)
+htand (gchar *key,
+ gint value,
+ struct IterData *iter_data)
{
if (value == iter_data->count)
g_ptr_array_add (iter_data->uids, key);
@@ -1355,13 +1406,13 @@ match_message_index (CamelIndex *idx,
/*
"one two" "three" "four five"
-
- one and two
-or
- three
-or
- four and five
-*/
+ *
+ * one and two
+ * or
+ * three
+ * or
+ * four and five
+ */
/* returns messages which contain all words listed in words */
static GPtrArray *
@@ -1381,7 +1432,7 @@ match_words_index (CamelFolderSearch *search,
wc = camel_index_words (search->body_index);
if (wc) {
while ((word = camel_index_cursor_next (wc))) {
- for (i=0;i<words->len;i++) {
+ for (i = 0; i < words->len; i++) {
if (camel_ustrstrcase (word, words->words[i]->word) != NULL) {
/* perf: could have the wc cursor return the name cursor */
nc = camel_index_find (search->body_index, word);
@@ -1409,7 +1460,9 @@ match_words_index (CamelFolderSearch *search,
}
static gboolean
-match_words_1message (CamelDataWrapper *object, struct _camel_search_words *words, guint32 *mask)
+match_words_1message (CamelDataWrapper *object,
+ struct _camel_search_words *words,
+ guint32 *mask)
{
CamelDataWrapper *containee;
gint truth = FALSE;
@@ -1444,12 +1497,12 @@ match_words_1message (CamelDataWrapper *object, struct _camel_search_words *word
camel_data_wrapper_decode_to_stream_sync (
containee, stream, NULL, NULL);
camel_stream_write (stream, "", 1, NULL, NULL);
- for (i=0;i<words->len;i++) {
+ for (i = 0; i < words->len; i++) {
/* FIXME: This is horridly slow, and should use a real search algorithm */
if (camel_ustrstrcase ((const gchar *) byte_array->data, words->words[i]->word) != NULL) {
*mask |= (1 << i);
/* shortcut a match */
- if (*mask == (1 << (words->len))-1)
+ if (*mask == (1 << (words->len)) - 1)
return TRUE;
}
}
@@ -1498,7 +1551,7 @@ match_words_messages (CamelFolderSearch *search,
indexed = match_words_index (search, simple, error);
camel_search_words_free (simple);
- for (i=0;i<indexed->len;i++) {
+ for (i = 0; i < indexed->len; i++) {
const gchar *uid = g_ptr_array_index (indexed, i);
if (match_words_message (
@@ -1509,9 +1562,9 @@ match_words_messages (CamelFolderSearch *search,
g_ptr_array_free (indexed, TRUE);
} else {
- GPtrArray *v = search->summary_set?search->summary_set:search->summary;
+ GPtrArray *v = search->summary_set ? search->summary_set : search->summary;
- for (i=0;i<v->len;i++) {
+ for (i = 0; i < v->len; i++) {
gchar *uid = g_ptr_array_index (v, i);
if (match_words_message (
@@ -1525,7 +1578,10 @@ match_words_messages (CamelFolderSearch *search,
}
static ESExpResult *
-search_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_body_contains (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search)
{
gint i, j;
GError **error = search->priv->error;
@@ -1539,12 +1595,12 @@ search_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, C
if (argc == 1 && argv[0]->value.string[0] == 0) {
truth = TRUE;
} else {
- for (i=0;i<argc && !truth;i++) {
+ for (i = 0; i < argc && !truth; i++) {
if (argv[i]->type == ESEXP_RES_STRING) {
words = camel_search_words_split ((const guchar *) argv[i]->value.string);
truth = TRUE;
if ((words->type & CAMEL_SEARCH_WORD_COMPLEX) == 0 && search->body_index) {
- for (j=0;j<words->len && truth;j++)
+ for (j = 0; j < words->len && truth; j++)
truth = match_message_index (search->body_index, camel_message_info_uid (search->current), words->words[j]->word, error);
} else {
/* TODO: cache current message incase of multiple body search terms */
@@ -1562,9 +1618,9 @@ search_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, C
r->value.ptrarray = g_ptr_array_new ();
if (argc == 1 && argv[0]->value.string[0] == 0) {
- GPtrArray *v = search->summary_set?search->summary_set:search->summary;
+ GPtrArray *v = search->summary_set ? search->summary_set : search->summary;
- for (i=0;i<v->len;i++) {
+ for (i = 0; i < v->len; i++) {
gchar *uid = g_ptr_array_index (v, i);
g_ptr_array_add (r->value.ptrarray, uid);
@@ -1573,7 +1629,7 @@ search_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, C
GHashTable *ht = g_hash_table_new (g_str_hash, g_str_equal);
GPtrArray *matches;
- for (i=0;i<argc;i++) {
+ for (i = 0; i < argc; i++) {
if (argv[i]->type == ESEXP_RES_STRING) {
words = camel_search_words_split ((const guchar *) argv[i]->value.string);
if ((words->type & CAMEL_SEARCH_WORD_COMPLEX) == 0 && search->body_index) {
@@ -1582,7 +1638,7 @@ search_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, C
/* FIXME Pass a GCancellable */
matches = match_words_messages (search, words, NULL, error);
}
- for (j=0;j<matches->len;j++) {
+ for (j = 0; j < matches->len; j++) {
g_hash_table_insert (ht, matches->pdata[j], matches->pdata[j]);
}
g_ptr_array_free (matches, TRUE);
@@ -1599,7 +1655,10 @@ search_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, C
}
static ESExpResult *
-search_body_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_body_regex (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search)
{
ESExpResult *r;
CamelMimeMessage *msg = get_current_message (search);
@@ -1609,7 +1668,7 @@ search_body_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Came
r = e_sexp_result_new (f, ESEXP_RES_BOOL);
- if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_NEWLINE, argc, argv, search->priv->error) == 0) {
+ if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_ICASE | CAMEL_SEARCH_MATCH_REGEX | CAMEL_SEARCH_MATCH_NEWLINE, argc, argv, search->priv->error) == 0) {
r->value.boolean = camel_search_message_body_contains ((CamelDataWrapper *) msg, &pattern);
regfree (&pattern);
} else
@@ -1622,9 +1681,9 @@ search_body_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Came
r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
r->value.ptrarray = g_ptr_array_new ();
- if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_NEWLINE, argc, argv, search->priv->error) == 0) {
+ if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_ICASE | CAMEL_SEARCH_MATCH_REGEX | CAMEL_SEARCH_MATCH_NEWLINE, argc, argv, search->priv->error) == 0) {
gint i;
- GPtrArray *v = search->summary_set?search->summary_set:search->summary;
+ GPtrArray *v = search->summary_set ? search->summary_set : search->summary;
CamelMimeMessage *message;
for (i = 0; i < v->len; i++) {
@@ -1650,7 +1709,10 @@ search_body_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Came
}
static ESExpResult *
-search_user_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_user_flag (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search)
{
ESExpResult *r;
gint i;
@@ -1661,7 +1723,7 @@ search_user_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Camel
if (search->current) {
gint truth = FALSE;
/* performs an OR of all words */
- for (i=0;i<argc && !truth;i++) {
+ for (i = 0; i < argc && !truth; i++) {
if (argv[i]->type == ESEXP_RES_STRING
&& camel_message_info_user_flag (search->current, argv[i]->value.string)) {
truth = TRUE;
@@ -1679,7 +1741,10 @@ search_user_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Camel
}
static ESExpResult *
-search_system_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_system_flag (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search)
{
ESExpResult *r;
@@ -1702,7 +1767,10 @@ search_system_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Cam
}
static ESExpResult *
-search_user_tag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_user_tag (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search)
{
const gchar *value = NULL;
ESExpResult *r;
@@ -1719,7 +1787,10 @@ search_user_tag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelF
}
static ESExpResult *
-search_get_sent_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s)
+search_get_sent_date (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *s)
{
ESExpResult *r;
@@ -1739,7 +1810,10 @@ search_get_sent_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, C
}
static ESExpResult *
-search_get_received_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s)
+search_get_received_date (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *s)
{
ESExpResult *r;
@@ -1759,7 +1833,10 @@ search_get_received_date (struct _ESExp *f, gint argc, struct _ESExpResult **arg
}
static ESExpResult *
-search_get_current_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s)
+search_get_current_date (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *s)
{
ESExpResult *r;
@@ -1771,7 +1848,10 @@ search_get_current_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv
}
static ESExpResult *
-search_get_relative_months (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s)
+search_get_relative_months (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *s)
{
ESExpResult *r;
@@ -1791,7 +1871,10 @@ search_get_relative_months (struct _ESExp *f, gint argc, struct _ESExpResult **a
}
static ESExpResult *
-search_get_size (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s)
+search_get_size (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *s)
{
ESExpResult *r;
@@ -1810,7 +1893,10 @@ search_get_size (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelF
}
static ESExpResult *
-search_uid (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_uid (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search)
{
ESExpResult *r;
gint i;
@@ -1823,7 +1909,7 @@ search_uid (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolder
const gchar *uid = camel_message_info_uid (search->current);
/* performs an OR of all words */
- for (i=0;i<argc && !truth;i++) {
+ for (i = 0; i < argc && !truth; i++) {
if (argv[i]->type == ESEXP_RES_STRING
&& !strcmp (uid, argv[i]->value.string)) {
truth = TRUE;
@@ -1835,7 +1921,7 @@ search_uid (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolder
} else {
r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
r->value.ptrarray = g_ptr_array_new ();
- for (i=0;i<argc;i++) {
+ for (i = 0; i < argc; i++) {
if (argv[i]->type == ESEXP_RES_STRING)
g_ptr_array_add (r->value.ptrarray, argv[i]->value.string);
}
@@ -1845,7 +1931,10 @@ search_uid (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolder
}
static gint
-read_uid_callback (gpointer ref, gint ncol, gchar ** cols, gchar **name)
+read_uid_callback (gpointer ref,
+ gint ncol,
+ gchar **cols,
+ gchar **name)
{
GPtrArray *matches;
@@ -1856,7 +1945,10 @@ read_uid_callback (gpointer ref, gint ncol, gchar ** cols, gchar **name)
}
static ESExpResult *
-search_message_location (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_message_location (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *search)
{
ESExpResult *r;
gboolean same = FALSE;
@@ -1905,7 +1997,8 @@ search_message_location (struct _ESExp *f, gint argc, struct _ESExpResult **argv
/* add or subtract given number of months to given time */
time_t
-camel_folder_search_util_add_months (time_t t, gint months)
+camel_folder_search_util_add_months (time_t t,
+ gint months)
{
GDateTime *dt, *dt2;
time_t res;
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index c586940..d303ff7 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -141,7 +141,9 @@ static CamelMessageInfo * message_info_from_uid (CamelFolderSummary *s, const gc
G_DEFINE_TYPE (CamelFolderSummary, camel_folder_summary, CAMEL_TYPE_OBJECT)
static void
-free_o_name (gpointer key, gpointer value, gpointer data)
+free_o_name (gpointer key,
+ gpointer value,
+ gpointer data)
{
g_object_unref (value);
g_free (key);
@@ -232,7 +234,8 @@ folder_summary_finalize (GObject *object)
}
static gint
-summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *record)
+summary_header_from_db (CamelFolderSummary *s,
+ CamelFIRecord *record)
{
io(printf("Loading header from db \n"));
@@ -316,7 +319,8 @@ summary_header_to_db (CamelFolderSummary *s,
}
static CamelMessageInfo *
-message_info_from_db (CamelFolderSummary *s, CamelMIRecord *record)
+message_info_from_db (CamelFolderSummary *s,
+ CamelMIRecord *record)
{
CamelMessageInfoBase *mi;
gint i;
@@ -351,9 +355,9 @@ message_info_from_db (CamelFolderSummary *s, CamelMIRecord *record)
count = bdata_extract_digit (&part);
if (count > 0) {
- mi->references = g_malloc (sizeof (*mi->references) + ((count-1) * sizeof (mi->references->references[0])));
+ mi->references = g_malloc (sizeof (*mi->references) + ((count - 1) * sizeof (mi->references->references[0])));
mi->references->size = count;
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
mi->references->references[i].id.part.hi = bdata_extract_digit (&part);
mi->references->references[i].id.part.lo = bdata_extract_digit (&part);
}
@@ -366,12 +370,12 @@ message_info_from_db (CamelFolderSummary *s, CamelMIRecord *record)
part = record->labels;
if (part) {
label = part;
- for (i=0;part[i];i++) {
+ for (i = 0; part[i]; i++) {
if (part[i] == ' ') {
part[i] = 0;
camel_flag_set (&mi->user_flags, label, TRUE);
- label = &(part[i+1]);
+ label = &(part[i + 1]);
}
}
camel_flag_set (&mi->user_flags, label, TRUE);
@@ -380,7 +384,7 @@ message_info_from_db (CamelFolderSummary *s, CamelMIRecord *record)
/* Extract User tags */
part = record->usertags;
count = bdata_extract_digit (&part);
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
gchar *name, *value;
name = bdata_extract_string (&part);
@@ -395,7 +399,8 @@ message_info_from_db (CamelFolderSummary *s, CamelMIRecord *record)
}
static CamelMIRecord *
-message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info)
+message_info_to_db (CamelFolderSummary *s,
+ CamelMessageInfo *info)
{
CamelMIRecord *record = g_new0 (CamelMIRecord, 1);
CamelMessageInfoBase *mi = (CamelMessageInfoBase *) info;
@@ -408,7 +413,7 @@ message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info)
record->uid = (gchar *) camel_pstring_strdup (camel_message_info_uid (mi));
record->flags = mi->flags;
- record->read = ((mi->flags & (CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_JUNK))) ? 1 : 0;
+ record->read = ((mi->flags & (CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_JUNK))) ? 1 : 0;
record->deleted = mi->flags & CAMEL_MESSAGE_DELETED ? 1 : 0;
record->replied = mi->flags & CAMEL_MESSAGE_ANSWERED ? 1 : 0;
record->important = mi->flags & CAMEL_MESSAGE_FLAGGED ? 1 : 0;
@@ -435,7 +440,7 @@ message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info)
tmp = g_string_new (NULL);
if (mi->references) {
g_string_append_printf (tmp, "%lu %lu %lu", (gulong)mi->message_id.id.part.hi, (gulong)mi->message_id.id.part.lo, (gulong)mi->references->size);
- for (i=0;i<mi->references->size;i++)
+ for (i = 0; i < mi->references->size; i++)
g_string_append_printf (tmp, " %lu %lu", (gulong)mi->references->references[i].id.part.hi, (gulong)mi->references->references[i].id.part.lo);
} else {
g_string_append_printf (tmp, "%lu %lu %lu", (gulong)mi->message_id.id.part.hi, (gulong)mi->message_id.id.part.lo, (gulong) 0);
@@ -473,7 +478,8 @@ message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info)
}
static CamelMessageContentInfo *
-content_info_from_db (CamelFolderSummary *s, CamelMIRecord *record)
+content_info_from_db (CamelFolderSummary *s,
+ CamelMIRecord *record)
{
CamelMessageContentInfo *ci;
gchar *type, *subtype;
@@ -487,7 +493,7 @@ content_info_from_db (CamelFolderSummary *s, CamelMIRecord *record)
return NULL;
ci = camel_folder_summary_content_info_new (s);
- if (*part == ' ') part++; /* Move off the space in the record*/
+ if (*part == ' ') part++; /* Move off the space in the record */
type = bdata_extract_string (&part);
subtype = bdata_extract_string (&part);
@@ -522,7 +528,9 @@ content_info_from_db (CamelFolderSummary *s, CamelMIRecord *record)
}
static gint
-content_info_to_db (CamelFolderSummary *s, CamelMessageContentInfo *ci, CamelMIRecord *record)
+content_info_to_db (CamelFolderSummary *s,
+ CamelMessageContentInfo *ci,
+ CamelMIRecord *record)
{
CamelContentType *ct;
struct _camel_header_param *hp;
@@ -587,7 +595,8 @@ content_info_to_db (CamelFolderSummary *s, CamelMessageContentInfo *ci, CamelMIR
}
static gint
-summary_header_save (CamelFolderSummary *s, FILE *out)
+summary_header_save (CamelFolderSummary *s,
+ FILE *out)
{
gint unread = 0, deleted = 0, junk = 0, count, i;
@@ -602,7 +611,7 @@ summary_header_save (CamelFolderSummary *s, FILE *out)
camel_file_util_encode_time_t (out, s->time);
count = camel_folder_summary_count (s);
- for (i=0; i<count; i++) {
+ for (i = 0; i < count; i++) {
CamelMessageInfo *info = camel_folder_summary_index (s, i);
guint32 flags;
@@ -628,7 +637,8 @@ summary_header_save (CamelFolderSummary *s, FILE *out)
}
static CamelMessageInfo *
-message_info_clone (CamelFolderSummary *s, const CamelMessageInfo *mi)
+message_info_clone (CamelFolderSummary *s,
+ const CamelMessageInfo *mi)
{
CamelMessageInfoBase *to, *from = (CamelMessageInfoBase *) mi;
CamelFlag *flag;
@@ -652,7 +662,7 @@ message_info_clone (CamelFolderSummary *s, const CamelMessageInfo *mi)
memcpy (&to->message_id, &from->message_id, sizeof (to->message_id));
to->preview = g_strdup (from->preview);
if (from->references) {
- gint len = sizeof (*from->references) + ((from->references->size-1) * sizeof (from->references->references[0]));
+ gint len = sizeof (*from->references) + ((from->references->size - 1) * sizeof (from->references->references[0]));
to->references = g_malloc (len);
memcpy (to->references, from->references, len);
@@ -678,7 +688,8 @@ message_info_clone (CamelFolderSummary *s, const CamelMessageInfo *mi)
}
static gconstpointer
-info_ptr (const CamelMessageInfo *mi, gint id)
+info_ptr (const CamelMessageInfo *mi,
+ gint id)
{
switch (id) {
case CAMEL_MESSAGE_INFO_SUBJECT:
@@ -711,7 +722,8 @@ info_ptr (const CamelMessageInfo *mi, gint id)
}
static guint32
-info_uint32 (const CamelMessageInfo *mi, gint id)
+info_uint32 (const CamelMessageInfo *mi,
+ gint id)
{
switch (id) {
case CAMEL_MESSAGE_INFO_FLAGS:
@@ -724,7 +736,8 @@ info_uint32 (const CamelMessageInfo *mi, gint id)
}
static time_t
-info_time (const CamelMessageInfo *mi, gint id)
+info_time (const CamelMessageInfo *mi,
+ gint id)
{
switch (id) {
case CAMEL_MESSAGE_INFO_DATE_SENT:
@@ -737,19 +750,23 @@ info_time (const CamelMessageInfo *mi, gint id)
}
static gboolean
-info_user_flag (const CamelMessageInfo *mi, const gchar *id)
+info_user_flag (const CamelMessageInfo *mi,
+ const gchar *id)
{
return camel_flag_get (&((CamelMessageInfoBase *) mi)->user_flags, id);
}
static const gchar *
-info_user_tag (const CamelMessageInfo *mi, const gchar *id)
+info_user_tag (const CamelMessageInfo *mi,
+ const gchar *id)
{
return camel_tag_get (&((CamelMessageInfoBase *) mi)->user_tags, id);
}
static gboolean
-info_set_user_flag (CamelMessageInfo *info, const gchar *name, gboolean value)
+info_set_user_flag (CamelMessageInfo *info,
+ const gchar *name,
+ gboolean value)
{
CamelMessageInfoBase *mi = (CamelMessageInfoBase *) info;
gint res;
@@ -772,7 +789,9 @@ info_set_user_flag (CamelMessageInfo *info, const gchar *name, gboolean value)
}
static gboolean
-info_set_user_tag (CamelMessageInfo *info, const gchar *name, const gchar *value)
+info_set_user_tag (CamelMessageInfo *info,
+ const gchar *name,
+ const gchar *value)
{
CamelMessageInfoBase *mi = (CamelMessageInfoBase *) info;
gint res;
@@ -794,11 +813,13 @@ info_set_user_tag (CamelMessageInfo *info, const gchar *name, const gchar *value
}
static gboolean
-info_set_flags (CamelMessageInfo *info, guint32 flags, guint32 set)
+info_set_flags (CamelMessageInfo *info,
+ guint32 flags,
+ guint32 set)
{
guint32 old;
CamelMessageInfoBase *mi = (CamelMessageInfoBase *) info;
- gint read=0, deleted=0, junk=0;
+ gint read = 0, deleted = 0, junk = 0;
/* TODO: locking? */
if (flags & CAMEL_MESSAGE_SEEN && ((set & CAMEL_MESSAGE_SEEN) != (mi->flags & CAMEL_MESSAGE_SEEN)))
@@ -941,7 +962,7 @@ camel_folder_summary_init (CamelFolderSummary *summary)
summary->meta_summary = g_malloc0 (sizeof (CamelFolderMetaSummary));
/* Default is 20, any implementor having UIDs that has length
- exceeding 20, has to override this value
+ * exceeding 20, has to override this value
*/
summary->meta_summary->uid_len = 20;
summary->cache_load_time = 0;
@@ -975,7 +996,8 @@ camel_folder_summary_new (struct _CamelFolder *folder)
* Set the filename where the summary will be loaded to/saved from.
**/
void
-camel_folder_summary_set_filename (CamelFolderSummary *s, const gchar *name)
+camel_folder_summary_set_filename (CamelFolderSummary *s,
+ const gchar *name)
{
camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
@@ -999,7 +1021,8 @@ camel_folder_summary_set_filename (CamelFolderSummary *s, const gchar *name)
* Unlike earlier behaviour, build_content need not be set to perform indexing.
**/
void
-camel_folder_summary_set_index (CamelFolderSummary *s, CamelIndex *index)
+camel_folder_summary_set_index (CamelFolderSummary *s,
+ CamelIndex *index)
{
struct _CamelFolderSummaryPrivate *p = s->priv;
@@ -1021,7 +1044,8 @@ camel_folder_summary_set_index (CamelFolderSummary *s, CamelIndex *index)
* info summaries.
**/
void
-camel_folder_summary_set_build_content (CamelFolderSummary *s, gboolean state)
+camel_folder_summary_set_build_content (CamelFolderSummary *s,
+ gboolean state)
{
s->build_content = state;
}
@@ -1053,7 +1077,8 @@ camel_folder_summary_count (CamelFolderSummary *s)
* Returns: the summary item, or %NULL if @index is out of range
**/
CamelMessageInfo *
-camel_folder_summary_index (CamelFolderSummary *s, gint i)
+camel_folder_summary_index (CamelFolderSummary *s,
+ gint i)
{
CamelMessageInfo *info = NULL;
@@ -1097,12 +1122,13 @@ camel_folder_summary_index (CamelFolderSummary *s, gint i)
* Since: 2.24
**/
gchar *
-camel_folder_summary_uid_from_index (CamelFolderSummary *s, gint i)
+camel_folder_summary_uid_from_index (CamelFolderSummary *s,
+ gint i)
{
- gchar *uid=NULL;
+ gchar *uid = NULL;
camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
- if (i<s->uids->len)
+ if (i < s->uids->len)
uid = g_strdup (g_ptr_array_index (s->uids, i));
camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
@@ -1124,14 +1150,15 @@ camel_folder_summary_uid_from_index (CamelFolderSummary *s, gint i)
* Since: 2.24
**/
gboolean
-camel_folder_summary_check_uid (CamelFolderSummary *s, const gchar *uid)
+camel_folder_summary_check_uid (CamelFolderSummary *s,
+ const gchar *uid)
{
gboolean ret = FALSE;
gint i;
camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
- for (i=0; i<s->uids->len; i++) {
+ for (i = 0; i < s->uids->len; i++) {
if (strcmp (s->uids->pdata[i], uid) == 0) {
camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
return TRUE;
@@ -1163,7 +1190,7 @@ camel_folder_summary_array (CamelFolderSummary *s)
camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
g_ptr_array_set_size (res, s->uids->len);
- for (i=0;i<s->uids->len;i++)
+ for (i = 0; i < s->uids->len; i++)
res->pdata[i] = (gpointer) camel_pstring_strdup ((gchar *) g_ptr_array_index (s->uids, i));
camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
@@ -1192,7 +1219,7 @@ camel_folder_summary_get_hashtable (CamelFolderSummary *s)
camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
- for (i=0;i<s->uids->len;i++)
+ for (i = 0; i < s->uids->len; i++)
g_hash_table_insert (hash, (gpointer) camel_pstring_strdup ((gchar *) g_ptr_array_index (s->uids, i)), GINT_TO_POINTER (1));
camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
@@ -1218,7 +1245,8 @@ camel_folder_summary_free_hashtable (GHashTable *ht)
* Since: 2.26
**/
CamelMessageInfo *
-camel_folder_summary_peek_info (CamelFolderSummary *s, const gchar *uid)
+camel_folder_summary_peek_info (CamelFolderSummary *s,
+ const gchar *uid)
{
CamelMessageInfo *info = g_hash_table_lookup (s->loaded_infos, uid);
@@ -1233,7 +1261,8 @@ struct _db_pass_data {
};
static CamelMessageInfo *
-message_info_from_uid (CamelFolderSummary *s, const gchar *uid)
+message_info_from_uid (CamelFolderSummary *s,
+ const gchar *uid)
{
CamelMessageInfo *info;
gint ret;
@@ -1341,7 +1370,8 @@ camel_folder_summary_next_uid (CamelFolderSummary *s)
* ensure new uid's do not clash with existing uid's.
**/
void
-camel_folder_summary_set_uid (CamelFolderSummary *s, guint32 uid)
+camel_folder_summary_set_uid (CamelFolderSummary *s,
+ guint32 uid)
{
/* TODO: sync to disk? */
camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
@@ -1374,7 +1404,8 @@ camel_folder_summary_next_uid_string (CamelFolderSummary *summary)
}
static CamelMessageContentInfo *
-perform_content_info_load_from_db (CamelFolderSummary *s, CamelMIRecord *mir)
+perform_content_info_load_from_db (CamelFolderSummary *s,
+ CamelMIRecord *mir)
{
gint i;
guint32 count;
@@ -1391,10 +1422,10 @@ perform_content_info_load_from_db (CamelFolderSummary *s, CamelMIRecord *mir)
count = bdata_extract_digit (&part);
mir->cinfo = part;
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
pci = perform_content_info_load_from_db (s, mir);
if (pci ) {
- my_list_append ((struct _node **)&ci->childs, (struct _node *) pci);
+ my_list_append ((struct _node **) &ci->childs, (struct _node *) pci);
pci->parent = ci;
} else {
d(fprintf (stderr, "Summary file format messed up?"));
@@ -1407,7 +1438,8 @@ perform_content_info_load_from_db (CamelFolderSummary *s, CamelMIRecord *mir)
/* loads the content descriptions, recursively */
static CamelMessageContentInfo *
-perform_content_info_migrate (CamelFolderSummary *s, FILE *in)
+perform_content_info_migrate (CamelFolderSummary *s,
+ FILE *in)
{
gint i;
guint32 count;
@@ -1422,10 +1454,10 @@ perform_content_info_migrate (CamelFolderSummary *s, FILE *in)
return NULL;
}
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
part = perform_content_info_migrate (s, in);
if (part) {
- my_list_append ((struct _node **)&ci->childs, (struct _node *) part);
+ my_list_append ((struct _node **) &ci->childs, (struct _node *) part);
part->parent = ci;
} else {
d(fprintf (stderr, "Summary file format messed up?"));
@@ -1437,7 +1469,9 @@ perform_content_info_migrate (CamelFolderSummary *s, FILE *in)
}
static void
-append_changed_uids (gchar *key, CamelMessageInfoBase *info, GPtrArray *array)
+append_changed_uids (gchar *key,
+ CamelMessageInfoBase *info,
+ GPtrArray *array)
{
if (info->dirty || info->flags & CAMEL_MESSAGE_FOLDER_FLAGGED)
g_ptr_array_add (array, (gpointer) camel_pstring_strdup ((camel_message_info_uid (info))));
@@ -1465,7 +1499,9 @@ camel_folder_summary_get_changed (CamelFolderSummary *s)
}
static void
-count_changed_uids (gchar *key, CamelMessageInfoBase *info, gint *count)
+count_changed_uids (gchar *key,
+ CamelMessageInfoBase *info,
+ gint *count)
{
if (info->dirty)
(*count)++;
@@ -1485,7 +1521,9 @@ cfs_count_dirty (CamelFolderSummary *s)
/* FIXME[disk-summary] I should have a better LRU algorithm */
static gboolean
-remove_item (gchar *key, CamelMessageInfoBase *info, GSList **to_free_list)
+remove_item (gchar *key,
+ CamelMessageInfoBase *info,
+ GSList **to_free_list)
{
d(printf("%d(%d)\t", info->refcount, info->dirty)); /* camel_message_info_dump (info); */
if (info->refcount == 1 && !info->dirty && !(info->flags & CAMEL_MESSAGE_FOLDER_FLAGGED)) {
@@ -1518,7 +1556,7 @@ remove_cache (CamelSession *session,
camel_folder_summary_unlock (summary, CAMEL_FOLDER_SUMMARY_REF_LOCK);
/* Deferred freeing as _free function will try to remove
- entries from the hash_table in foreach_remove otherwise */
+ * entries from the hash_table in foreach_remove otherwise */
for (l = to_free_list; l; l = l->next)
camel_message_info_free (l->data);
g_slist_free (to_free_list);
@@ -1592,7 +1630,9 @@ cfs_cache_size (CamelFolderSummary *s)
/* Update preview of cached messages */
static void
-msg_update_preview (const gchar *uid, gpointer value, CamelFolder *folder)
+msg_update_preview (const gchar *uid,
+ gpointer value,
+ CamelFolder *folder)
{
CamelMessageInfoBase *info = (CamelMessageInfoBase *) camel_folder_summary_uid (folder->summary, uid);
CamelMimeMessage *msg;
@@ -1612,14 +1652,18 @@ msg_update_preview (const gchar *uid, gpointer value, CamelFolder *folder)
}
static void
-pick_uids (const gchar *uid, CamelMessageInfoBase *mi, GPtrArray *array)
+pick_uids (const gchar *uid,
+ CamelMessageInfoBase *mi,
+ GPtrArray *array)
{
if (mi->preview)
g_ptr_array_add (array, (gchar *) camel_pstring_strdup (uid));
}
static gboolean
-fill_mi (const gchar *uid, const gchar *msg, CamelFolder *folder)
+fill_mi (const gchar *uid,
+ const gchar *msg,
+ CamelFolder *folder)
{
CamelMessageInfoBase *info;
@@ -1657,7 +1701,7 @@ preview_update (CamelSession *session,
g_hash_table_foreach (folder->summary->loaded_infos, (GHFunc) pick_uids, uids_uncached);
camel_folder_summary_unlock (folder->summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
- for (i=0; i < uids_uncached->len; i++) {
+ for (i = 0; i < uids_uncached->len; i++) {
g_hash_table_remove (hash, uids_uncached->pdata[i]);
camel_pstring_free (uids_uncached->pdata[i]); /* unref the hash table key */
}
@@ -1674,7 +1718,8 @@ preview_update (CamelSession *session,
/* end */
static gint
-cfs_reload_from_db (CamelFolderSummary *s, GError **error)
+cfs_reload_from_db (CamelFolderSummary *s,
+ GError **error)
{
CamelDB *cdb;
CamelSession *session;
@@ -1717,7 +1762,8 @@ cfs_reload_from_db (CamelFolderSummary *s, GError **error)
* Since: 2.28
**/
void
-camel_folder_summary_add_preview (CamelFolderSummary *s, CamelMessageInfo *info)
+camel_folder_summary_add_preview (CamelFolderSummary *s,
+ CamelMessageInfo *info)
{
camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
g_hash_table_insert (s->priv->preview_updates, (gchar *) info->uid, ((CamelMessageInfoBase *) info)->preview);
@@ -1801,7 +1847,11 @@ camel_folder_summary_load_from_db (CamelFolderSummary *s,
}
static void
-mir_from_cols (CamelMIRecord *mir, CamelFolderSummary *s, gint ncol, gchar ** cols, gchar ** name)
+mir_from_cols (CamelMIRecord *mir,
+ CamelFolderSummary *s,
+ gint ncol,
+ gchar **cols,
+ gchar **name)
{
gint i;
@@ -1865,7 +1915,10 @@ mir_from_cols (CamelMIRecord *mir, CamelFolderSummary *s, gint ncol, gchar ** co
}
static gint
-camel_read_mir_callback (gpointer ref, gint ncol, gchar ** cols, gchar ** name)
+camel_read_mir_callback (gpointer ref,
+ gint ncol,
+ gchar **cols,
+ gchar **name)
{
struct _db_pass_data *data = (struct _db_pass_data *) ref;
CamelFolderSummary *s = data->summary;
@@ -1963,7 +2016,7 @@ camel_folder_summary_migrate_infos (CamelFolderSummary *s)
goto error;
/* now read in each message ... */
- for (i=0;i<s->saved_count;i++) {
+ for (i = 0; i < s->saved_count; i++) {
CamelTag *tag;
mi = CAMEL_FOLDER_SUMMARY_GET_CLASS (s)->message_info_migrate (s, in);
@@ -2036,7 +2089,9 @@ error:
/* saves the content descriptions, recursively */
static gint
-perform_content_info_save_to_db (CamelFolderSummary *s, CamelMessageContentInfo *ci, CamelMIRecord *record)
+perform_content_info_save_to_db (CamelFolderSummary *s,
+ CamelMessageContentInfo *ci,
+ CamelMIRecord *record)
{
CamelMessageContentInfo *part;
gchar *oldr;
@@ -2065,7 +2120,9 @@ typedef struct {
} SaveToDBArgs;
static void
-save_to_db_cb (gpointer key, gpointer value, gpointer data)
+save_to_db_cb (gpointer key,
+ gpointer value,
+ gpointer data)
{
SaveToDBArgs *args = (SaveToDBArgs *) data;
GError **error = args->error;
@@ -2159,7 +2216,9 @@ save_message_infos_to_db (CamelFolderSummary *s,
}
static void
-msg_save_preview (const gchar *uid, gpointer value, CamelFolder *folder)
+msg_save_preview (const gchar *uid,
+ gpointer value,
+ CamelFolder *folder)
{
CamelStore *parent_store;
const gchar *full_name;
@@ -2339,7 +2398,8 @@ camel_folder_summary_header_load_from_db (CamelFolderSummary *s,
}
static gint
-summary_assign_uid (CamelFolderSummary *s, CamelMessageInfo *info)
+summary_assign_uid (CamelFolderSummary *s,
+ CamelMessageInfo *info)
{
const gchar *uid;
CamelMessageInfo *mi;
@@ -2387,7 +2447,8 @@ summary_assign_uid (CamelFolderSummary *s, CamelMessageInfo *info)
* class. And MUST NOT be allocated directly using malloc.
**/
void
-camel_folder_summary_add (CamelFolderSummary *s, CamelMessageInfo *info)
+camel_folder_summary_add (CamelFolderSummary *s,
+ CamelMessageInfo *info)
{
if (info == NULL)
return;
@@ -2415,7 +2476,9 @@ camel_folder_summary_add (CamelFolderSummary *s, CamelMessageInfo *info)
* Since: 2.24
**/
void
-camel_folder_summary_insert (CamelFolderSummary *s, CamelMessageInfo *info, gboolean load)
+camel_folder_summary_insert (CamelFolderSummary *s,
+ CamelMessageInfo *info,
+ gboolean load)
{
if (info == NULL)
return;
@@ -2443,9 +2506,11 @@ camel_folder_summary_insert (CamelFolderSummary *s, CamelMessageInfo *info, gboo
* Since: 3.0
**/
void
-camel_folder_summary_update_counts_by_flags (CamelFolderSummary *summary, guint32 flags, gboolean subtract)
+camel_folder_summary_update_counts_by_flags (CamelFolderSummary *summary,
+ guint32 flags,
+ gboolean subtract)
{
- gint unread=0, deleted=0, junk=0;
+ gint unread = 0, deleted = 0, junk = 0;
gboolean is_junk_folder = FALSE, is_trash_folder = FALSE;
g_return_if_fail (summary != NULL);
@@ -2492,7 +2557,8 @@ camel_folder_summary_update_counts_by_flags (CamelFolderSummary *summary, guint3
}
static void
-update_summary (CamelFolderSummary *summary, CamelMessageInfoBase *info)
+update_summary (CamelFolderSummary *summary,
+ CamelMessageInfoBase *info)
{
g_return_if_fail (summary != NULL);
g_return_if_fail (info != NULL);
@@ -2545,7 +2611,8 @@ camel_folder_summary_add_from_header (CamelFolderSummary *summary,
* Returns: the newly added record
**/
CamelMessageInfo *
-camel_folder_summary_add_from_parser (CamelFolderSummary *s, CamelMimeParser *mp)
+camel_folder_summary_add_from_parser (CamelFolderSummary *s,
+ CamelMimeParser *mp)
{
CamelMessageInfo *info;
@@ -2569,7 +2636,8 @@ camel_folder_summary_add_from_parser (CamelFolderSummary *s, CamelMimeParser *mp
* Returns: the newly added record
**/
CamelMessageInfo *
-camel_folder_summary_add_from_message (CamelFolderSummary *s, CamelMimeMessage *msg)
+camel_folder_summary_add_from_message (CamelFolderSummary *s,
+ CamelMimeMessage *msg)
{
CamelMessageInfo *info = camel_folder_summary_info_new_from_message (s, msg, NULL);
@@ -2624,7 +2692,8 @@ camel_folder_summary_info_new_from_header (CamelFolderSummary *summary,
* camel_message_info_free()
**/
CamelMessageInfo *
-camel_folder_summary_info_new_from_parser (CamelFolderSummary *s, CamelMimeParser *mp)
+camel_folder_summary_info_new_from_parser (CamelFolderSummary *s,
+ CamelMimeParser *mp)
{
CamelMessageInfo *info = NULL;
gchar *buffer;
@@ -2685,7 +2754,9 @@ camel_folder_summary_info_new_from_parser (CamelFolderSummary *s, CamelMimeParse
* camel_message_info_free()
**/
CamelMessageInfo *
-camel_folder_summary_info_new_from_message (CamelFolderSummary *s, CamelMimeMessage *msg, const gchar *bodystructure)
+camel_folder_summary_info_new_from_message (CamelFolderSummary *s,
+ CamelMimeMessage *msg,
+ const gchar *bodystructure)
{
CamelMessageInfo *info;
CamelFolderSummaryPrivate *p = s->priv;
@@ -2738,7 +2809,8 @@ camel_folder_summary_info_new_from_message (CamelFolderSummary *s, CamelMimeMess
* Free the content info @ci, and all associated memory.
**/
void
-camel_folder_summary_content_info_free (CamelFolderSummary *s, CamelMessageContentInfo *ci)
+camel_folder_summary_content_info_free (CamelFolderSummary *s,
+ CamelMessageContentInfo *ci)
{
CamelMessageContentInfo *pw, *pn;
@@ -2848,16 +2920,17 @@ camel_folder_summary_clear_db (CamelFolderSummary *s)
}
/* This function returns 0 on success. So the caller should not bother,
-deleting the uid from db when the return value is non-zero */
+ * deleting the uid from db when the return value is non-zero */
static gint
-summary_remove_uid (CamelFolderSummary *s, const gchar *uid)
+summary_remove_uid (CamelFolderSummary *s,
+ const gchar *uid)
{
gint i;
d(printf ("\nsummary_remove_uid called \n"));
/* This could be slower, but no otherway really. FIXME: Callers have to effective and shouldn't call it recursively. */
- for (i=0; i<s->uids->len; i++) {
+ for (i = 0; i < s->uids->len; i++) {
if (strcmp (s->uids->pdata[i], uid) == 0) {
/* FIXME: Does using fast remove affect anything ? */
g_ptr_array_remove_index (s->uids, i);
@@ -2878,7 +2951,8 @@ summary_remove_uid (CamelFolderSummary *s, const gchar *uid)
* Remove a specific @info record from the summary.
**/
void
-camel_folder_summary_remove (CamelFolderSummary *s, CamelMessageInfo *info)
+camel_folder_summary_remove (CamelFolderSummary *s,
+ CamelMessageInfo *info)
{
CamelStore *parent_store;
const gchar *full_name;
@@ -2913,14 +2987,15 @@ camel_folder_summary_remove (CamelFolderSummary *s, CamelMessageInfo *info)
* Remove a specific info record from the summary, by @uid.
**/
void
-camel_folder_summary_remove_uid (CamelFolderSummary *s, const gchar *uid)
+camel_folder_summary_remove_uid (CamelFolderSummary *s,
+ const gchar *uid)
{
CamelMessageInfo *oldinfo;
gchar *olduid;
camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_REF_LOCK);
- if (g_hash_table_lookup_extended (s->loaded_infos, uid, (gpointer)&olduid, (gpointer)&oldinfo)) {
+ if (g_hash_table_lookup_extended (s->loaded_infos, uid, (gpointer) &olduid, (gpointer) &oldinfo)) {
/* make sure it doesn't vanish while we're removing it */
camel_message_info_ref (oldinfo);
camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_REF_LOCK);
@@ -2955,14 +3030,15 @@ camel_folder_summary_remove_uid (CamelFolderSummary *s, const gchar *uid)
* Since: 2.24
**/
void
-camel_folder_summary_remove_uid_fast (CamelFolderSummary *s, const gchar *uid)
+camel_folder_summary_remove_uid_fast (CamelFolderSummary *s,
+ const gchar *uid)
{
CamelMessageInfo *oldinfo;
gchar *olduid;
camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_REF_LOCK);
- if (g_hash_table_lookup_extended (s->loaded_infos, uid, (gpointer)&olduid, (gpointer)&oldinfo)) {
+ if (g_hash_table_lookup_extended (s->loaded_infos, uid, (gpointer) &olduid, (gpointer) &oldinfo)) {
/* make sure it doesn't vanish while we're removing it */
camel_message_info_ref (oldinfo);
camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_REF_LOCK);
@@ -2989,7 +3065,8 @@ camel_folder_summary_remove_uid_fast (CamelFolderSummary *s, const gchar *uid)
* Since: 2.24
**/
void
-camel_folder_summary_remove_index_fast (CamelFolderSummary *s, gint index)
+camel_folder_summary_remove_index_fast (CamelFolderSummary *s,
+ gint index)
{
const gchar *uid = s->uids->pdata[index];
CamelMessageInfo *oldinfo;
@@ -2998,7 +3075,7 @@ camel_folder_summary_remove_index_fast (CamelFolderSummary *s, gint index)
camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_REF_LOCK);
- if (g_hash_table_lookup_extended (s->loaded_infos, uid, (gpointer)&olduid, (gpointer)&oldinfo)) {
+ if (g_hash_table_lookup_extended (s->loaded_infos, uid, (gpointer) &olduid, (gpointer) &oldinfo)) {
/* make sure it doesn't vanish while we're removing it */
g_hash_table_remove (s->loaded_infos, uid);
camel_pstring_free (uid);
@@ -3023,7 +3100,8 @@ camel_folder_summary_remove_index_fast (CamelFolderSummary *s, gint index)
* Remove a specific info record from the summary, by index.
**/
void
-camel_folder_summary_remove_index (CamelFolderSummary *s, gint index)
+camel_folder_summary_remove_index (CamelFolderSummary *s,
+ gint index)
{
const gchar *uid = s->uids->pdata[index];
@@ -3039,7 +3117,9 @@ camel_folder_summary_remove_index (CamelFolderSummary *s, gint index)
* Removes an indexed range of info records.
**/
void
-camel_folder_summary_remove_range (CamelFolderSummary *s, gint start, gint end)
+camel_folder_summary_remove_range (CamelFolderSummary *s,
+ gint start,
+ gint end)
{
d(g_print ("\ncamel_folder_summary_remove_range called \n"));
if (end < start)
@@ -3055,7 +3135,7 @@ camel_folder_summary_remove_range (CamelFolderSummary *s, gint start, gint end)
const gchar *folder_name;
GSList *uids = NULL;
- end = MIN (end+1, s->uids->len);
+ end = MIN (end + 1, s->uids->len);
for (i = start; i < end; i++) {
const gchar *uid = s->uids->pdata[i];
@@ -3083,7 +3163,7 @@ camel_folder_summary_remove_range (CamelFolderSummary *s, gint start, gint end)
g_slist_foreach (uids, (GFunc) camel_pstring_free, NULL);
g_slist_free (uids);
- memmove (s->uids->pdata+start, s->uids->pdata+end, (s->uids->len-end)*sizeof (s->uids->pdata[0]));
+ memmove (s->uids->pdata + start, s->uids->pdata + end, (s->uids->len - end) * sizeof (s->uids->pdata[0]));
g_ptr_array_set_size (s->uids, s->uids->len - (end - start));
s->flags |= CAMEL_SUMMARY_DIRTY;
@@ -3096,8 +3176,8 @@ camel_folder_summary_remove_range (CamelFolderSummary *s, gint start, gint end)
/* should be sorted, for binary search */
/* This is a tokenisation mechanism for strings written to the
- summary - to save space.
- This list can have at most 31 words. */
+ * summary - to save space.
+ * This list can have at most 31 words. */
static const gchar * tokens[] = {
"7bit",
"8bit",
@@ -3127,14 +3207,15 @@ static const gchar * tokens[] = {
};
/* baiscally ...
- 0 = null
- 1-len (tokens) == tokens[id-1]
- >=32 string, length = n-32
-*/
+ * 0 = null
+ * 1-len (tokens) == tokens[id-1]
+ * >=32 string, length = n-32
+ */
#ifdef USE_BSEARCH
static gint
-token_search_cmp (gchar *key, gchar **index)
+token_search_cmp (gchar *key,
+ gchar **index)
{
d(printf("comparing '%s' to '%s'\n", key, *index));
return strcmp (key, *index);
@@ -3153,7 +3234,8 @@ token_search_cmp (gchar *key, gchar **index)
* Returns: %0 on success or %-1 on fail
**/
gint
-camel_folder_summary_encode_token (FILE *out, const gchar *str)
+camel_folder_summary_encode_token (FILE *out,
+ const gchar *str)
{
io(printf("Encoding token: '%s'\n", str));
@@ -3167,13 +3249,13 @@ camel_folder_summary_encode_token (FILE *out, const gchar *str)
gchar lower[32];
const gchar **match;
- for (i=0;i<len;i++)
+ for (i = 0; i < len; i++)
lower[i] = tolower (str[i]);
lower[i] = 0;
#ifdef USE_BSEARCH
match = bsearch (lower, tokens, G_N_ELEMENTS (tokens), sizeof (gchar *), (gint (*)(gconstpointer , gconstpointer )) token_search_cmp);
if (match)
- token = match-tokens;
+ token = match - tokens;
#else
for (i = 0; i < G_N_ELEMENTS (tokens); i++) {
if (!strcmp (tokens[i], lower)) {
@@ -3184,9 +3266,9 @@ camel_folder_summary_encode_token (FILE *out, const gchar *str)
#endif
}
if (token != -1) {
- return camel_file_util_encode_uint32 (out, token+1);
+ return camel_file_util_encode_uint32 (out, token + 1);
} else {
- if (camel_file_util_encode_uint32 (out, len+32) == -1)
+ if (camel_file_util_encode_uint32 (out, len + 32) == -1)
return -1;
if (fwrite (str, len, 1, out) != 1)
return -1;
@@ -3205,7 +3287,8 @@ camel_folder_summary_encode_token (FILE *out, const gchar *str)
* Returns: %0 on success or %-1 on fail
**/
gint
-camel_folder_summary_decode_token (FILE *in, gchar **str)
+camel_folder_summary_decode_token (FILE *in,
+ gchar **str)
{
gchar *ret;
guint32 len;
@@ -3218,11 +3301,11 @@ camel_folder_summary_decode_token (FILE *in, gchar **str)
return -1;
}
- if (len<32) {
+ if (len < 32) {
if (len <= 0) {
ret = NULL;
} else if (len<= G_N_ELEMENTS (tokens)) {
- ret = g_strdup (tokens[len-1]);
+ ret = g_strdup (tokens[len - 1]);
} else {
io(printf ("Invalid token encountered: %d", len));
*str = NULL;
@@ -3234,7 +3317,7 @@ camel_folder_summary_decode_token (FILE *in, gchar **str)
return -1;
} else {
len -= 32;
- ret = g_malloc (len+1);
+ ret = g_malloc (len + 1);
if (len > 0 && fread (ret, len, 1, in) != 1) {
g_free (ret);
*str = NULL;
@@ -3250,7 +3333,8 @@ camel_folder_summary_decode_token (FILE *in, gchar **str)
}
static struct _node *
-my_list_append (struct _node **list, struct _node *n)
+my_list_append (struct _node **list,
+ struct _node *n)
{
struct _node *ln = *list;
n->next = NULL;
@@ -3279,7 +3363,8 @@ my_list_size (struct _node **list)
}
static gint
-summary_header_load (CamelFolderSummary *s, FILE *in)
+summary_header_load (CamelFolderSummary *s,
+ FILE *in)
{
if (!s->summary_path)
return -1;
@@ -3325,7 +3410,8 @@ summary_header_load (CamelFolderSummary *s, FILE *in)
/* are these even useful for anything??? */
static CamelMessageInfo *
-message_info_new_from_parser (CamelFolderSummary *s, CamelMimeParser *mp)
+message_info_new_from_parser (CamelFolderSummary *s,
+ CamelMimeParser *mp)
{
CamelMessageInfo *mi = NULL;
gint state;
@@ -3345,7 +3431,8 @@ message_info_new_from_parser (CamelFolderSummary *s, CamelMimeParser *mp)
}
static CamelMessageContentInfo *
-content_info_new_from_parser (CamelFolderSummary *s, CamelMimeParser *mp)
+content_info_new_from_parser (CamelFolderSummary *s,
+ CamelMimeParser *mp)
{
CamelMessageContentInfo *ci = NULL;
@@ -3367,7 +3454,9 @@ content_info_new_from_parser (CamelFolderSummary *s, CamelMimeParser *mp)
}
static CamelMessageInfo *
-message_info_new_from_message (CamelFolderSummary *s, CamelMimeMessage *msg, const gchar *bodystructure)
+message_info_new_from_message (CamelFolderSummary *s,
+ CamelMimeMessage *msg,
+ const gchar *bodystructure)
{
CamelMessageInfo *mi;
@@ -3378,7 +3467,8 @@ message_info_new_from_message (CamelFolderSummary *s, CamelMimeMessage *msg, con
}
static CamelMessageContentInfo *
-content_info_new_from_message (CamelFolderSummary *s, CamelMimePart *mp)
+content_info_new_from_message (CamelFolderSummary *s,
+ CamelMimePart *mp)
{
CamelMessageContentInfo *ci;
@@ -3388,7 +3478,9 @@ content_info_new_from_message (CamelFolderSummary *s, CamelMimePart *mp)
}
static gchar *
-summary_format_address (struct _camel_header_raw *h, const gchar *name, const gchar *charset)
+summary_format_address (struct _camel_header_raw *h,
+ const gchar *name,
+ const gchar *charset)
{
struct _camel_header_address *addr;
gchar *text, *str;
@@ -3413,7 +3505,9 @@ summary_format_address (struct _camel_header_raw *h, const gchar *name, const gc
}
static gchar *
-summary_format_string (struct _camel_header_raw *h, const gchar *name, const gchar *charset)
+summary_format_string (struct _camel_header_raw *h,
+ const gchar *name,
+ const gchar *charset)
{
gchar *text, *str;
@@ -3455,7 +3549,8 @@ camel_folder_summary_content_info_new (CamelFolderSummary *s)
}
static CamelMessageInfo *
-message_info_new_from_header (CamelFolderSummary *s, struct _camel_header_raw *h)
+message_info_new_from_header (CamelFolderSummary *s,
+ struct _camel_header_raw *h)
{
const gchar *received, *date, *content, *charset = NULL;
struct _camel_header_references *refs, *irt, *scan;
@@ -3530,8 +3625,8 @@ message_info_new_from_header (CamelFolderSummary *s, struct _camel_header_raw *h
if (refs || irt) {
if (irt) {
/* The References field is populated from the "References" and/or "In-Reply-To"
- headers. If both headers exist, take the first thing in the In-Reply-To header
- that looks like a Message-ID, and append it to the References header. */
+ * headers. If both headers exist, take the first thing in the In-Reply-To header
+ * that looks like a Message-ID, and append it to the References header. */
if (refs)
irt->next = refs;
@@ -3540,7 +3635,7 @@ message_info_new_from_header (CamelFolderSummary *s, struct _camel_header_raw *h
}
count = camel_header_references_list_size (&refs);
- mi->references = g_malloc (sizeof (*mi->references) + ((count-1) * sizeof (mi->references->references[0])));
+ mi->references = g_malloc (sizeof (*mi->references) + ((count - 1) * sizeof (mi->references->references[0])));
count = 0;
scan = refs;
while (scan) {
@@ -3563,7 +3658,8 @@ message_info_new_from_header (CamelFolderSummary *s, struct _camel_header_raw *h
}
static CamelMessageInfo *
-message_info_migrate (CamelFolderSummary *s, FILE *in)
+message_info_migrate (CamelFolderSummary *s,
+ FILE *in)
{
CamelMessageInfoBase *mi;
guint32 count;
@@ -3601,9 +3697,9 @@ message_info_migrate (CamelFolderSummary *s, FILE *in)
goto error;
if (count > 0) {
- mi->references = g_malloc (sizeof (*mi->references) + ((count-1) * sizeof (mi->references->references[0])));
+ mi->references = g_malloc (sizeof (*mi->references) + ((count - 1) * sizeof (mi->references->references[0])));
mi->references->size = count;
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
camel_file_util_decode_fixed_int32 (in, (gint32 *) &mi->references->references[i].id.part.hi);
camel_file_util_decode_fixed_int32 (in, (gint32 *) &mi->references->references[i].id.part.lo);
}
@@ -3612,7 +3708,7 @@ message_info_migrate (CamelFolderSummary *s, FILE *in)
if (camel_file_util_decode_uint32 (in, &count) == -1)
goto error;
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
gchar *name;
if (camel_file_util_decode_string (in, &name) == -1 || name == NULL)
goto error;
@@ -3623,7 +3719,7 @@ message_info_migrate (CamelFolderSummary *s, FILE *in)
if (camel_file_util_decode_uint32 (in, &count) == -1)
goto error;
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
gchar *name, *value;
if (camel_file_util_decode_string (in, &name) == -1 || name == NULL
|| camel_file_util_decode_string (in, &value) == -1)
@@ -3643,7 +3739,8 @@ error:
}
static void
-message_info_free (CamelFolderSummary *s, CamelMessageInfo *info)
+message_info_free (CamelFolderSummary *s,
+ CamelMessageInfo *info)
{
CamelFolderSummaryClass *class;
CamelMessageInfoBase *mi = (CamelMessageInfoBase *) info;
@@ -3675,7 +3772,8 @@ message_info_free (CamelFolderSummary *s, CamelMessageInfo *info)
}
static CamelMessageContentInfo *
-content_info_new_from_header (CamelFolderSummary *s, struct _camel_header_raw *h)
+content_info_new_from_header (CamelFolderSummary *s,
+ struct _camel_header_raw *h)
{
CamelMessageContentInfo *ci;
const gchar *charset;
@@ -3692,7 +3790,8 @@ content_info_new_from_header (CamelFolderSummary *s, struct _camel_header_raw *h
}
static CamelMessageContentInfo *
-content_info_migrate (CamelFolderSummary *s, FILE *in)
+content_info_migrate (CamelFolderSummary *s,
+ FILE *in)
{
CamelMessageContentInfo *ci;
gchar *type, *subtype;
@@ -3743,7 +3842,8 @@ content_info_migrate (CamelFolderSummary *s, FILE *in)
}
static void
-content_info_free (CamelFolderSummary *s, CamelMessageContentInfo *ci)
+content_info_free (CamelFolderSummary *s,
+ CamelMessageContentInfo *ci)
{
CamelFolderSummaryClass *class;
@@ -3770,7 +3870,9 @@ next_uid_string (CamelFolderSummary *s)
/* must have filter_lock before calling this function */
static CamelMessageContentInfo *
-summary_build_content_info (CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimeParser *mp)
+summary_build_content_info (CamelFolderSummary *s,
+ CamelMessageInfo *msginfo,
+ CamelMimeParser *mp)
{
gint state;
gsize len;
@@ -3850,7 +3952,7 @@ summary_build_content_info (CamelFolderSummary *s, CamelMessageInfo *msginfo, Ca
}
charset = camel_content_type_param(ct, "charset");
- if (charset!=NULL
+ if (charset != NULL
&& !(g_ascii_strcasecmp(charset, "us-ascii")==0
|| g_ascii_strcasecmp(charset, "utf-8")==0)) {
d(printf(" Adding conversion filter from %s to UTF-8\n", charset));
@@ -3870,7 +3972,7 @@ summary_build_content_info (CamelFolderSummary *s, CamelMessageInfo *msginfo, Ca
}
/* we do charset conversions before this filter, which isn't strictly correct,
- but works in most cases */
+ * but works in most cases */
if (camel_content_type_is(ct, "text", "html")) {
if (p->filter_html == NULL)
p->filter_html = camel_mime_filter_html_new ();
@@ -3906,7 +4008,7 @@ summary_build_content_info (CamelFolderSummary *s, CamelMessageInfo *msginfo, Ca
part = summary_build_content_info (s, msginfo, mp);
if (part) {
part->parent = info;
- my_list_append ((struct _node **)&info->childs, (struct _node *) part);
+ my_list_append ((struct _node **) &info->childs, (struct _node *) part);
}
}
break;
@@ -3918,7 +4020,7 @@ summary_build_content_info (CamelFolderSummary *s, CamelMessageInfo *msginfo, Ca
part = summary_build_content_info (s, msginfo, mp);
if (part) {
part->parent = info;
- my_list_append ((struct _node **)&info->childs, (struct _node *) part);
+ my_list_append ((struct _node **) &info->childs, (struct _node *) part);
}
state = camel_mime_parser_step (mp, &buffer, &len);
if (state != CAMEL_MIME_PARSER_STATE_MESSAGE_END) {
@@ -3936,7 +4038,9 @@ summary_build_content_info (CamelFolderSummary *s, CamelMessageInfo *msginfo, Ca
/* build the content-info, from a message */
/* this needs the filter lock since it uses filters to perform indexing */
static CamelMessageContentInfo *
-summary_build_content_info_message (CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimePart *object)
+summary_build_content_info_message (CamelFolderSummary *s,
+ CamelMessageInfo *msginfo,
+ CamelMimePart *object)
{
CamelDataWrapper *containee;
gint parts, i;
@@ -3954,7 +4058,7 @@ summary_build_content_info_message (CamelFolderSummary *s, CamelMessageInfo *msg
return info;
/* TODO: I find it odd that get_part and get_content do not
- add a reference, probably need fixing for multithreading */
+ * add a reference, probably need fixing for multithreading */
/* check for attachments */
ct = ((CamelDataWrapper *) containee)->mime_type;
@@ -3993,13 +4097,13 @@ summary_build_content_info_message (CamelFolderSummary *s, CamelMessageInfo *msg
if (CAMEL_IS_MULTIPART (containee)) {
parts = camel_multipart_get_number (CAMEL_MULTIPART (containee));
- for (i=0;i<parts;i++) {
+ for (i = 0; i < parts; i++) {
CamelMimePart *part = camel_multipart_get_part (CAMEL_MULTIPART (containee), i);
g_assert (part);
child = summary_build_content_info_message (s, msginfo, part);
if (child) {
child->parent = info;
- my_list_append ((struct _node **)&info->childs, (struct _node *) child);
+ my_list_append ((struct _node **) &info->childs, (struct _node *) child);
}
}
} else if (CAMEL_IS_MIME_MESSAGE (containee)) {
@@ -4007,7 +4111,7 @@ summary_build_content_info_message (CamelFolderSummary *s, CamelMessageInfo *msg
child = summary_build_content_info_message (s, msginfo, (CamelMimePart *) containee);
if (child) {
child->parent = info;
- my_list_append ((struct _node **)&info->childs, (struct _node *) child);
+ my_list_append ((struct _node **) &info->childs, (struct _node *) child);
}
} else if (p->filter_stream
&& camel_content_type_is(ct, "text", "*")) {
@@ -4051,7 +4155,8 @@ summary_build_content_info_message (CamelFolderSummary *s, CamelMessageInfo *msg
* Returns: the state of the flag (%TRUE or %FALSE)
**/
gboolean
-camel_flag_get (CamelFlag **list, const gchar *name)
+camel_flag_get (CamelFlag **list,
+ const gchar *name)
{
CamelFlag *flag;
flag = *list;
@@ -4075,7 +4180,9 @@ camel_flag_get (CamelFlag **list, const gchar *name)
* otherwise
**/
gboolean
-camel_flag_set (CamelFlag **list, const gchar *name, gboolean value)
+camel_flag_set (CamelFlag **list,
+ const gchar *name,
+ gboolean value)
{
CamelFlag *flag, *tmp;
@@ -4116,7 +4223,7 @@ camel_flag_set (CamelFlag **list, const gchar *name, gboolean value)
gint
camel_flag_list_size (CamelFlag **list)
{
- gint count=0;
+ gint count = 0;
CamelFlag *flag;
flag = *list;
@@ -4156,7 +4263,8 @@ camel_flag_list_free (CamelFlag **list)
* Returns: %TRUE if @to is changed or %FALSE otherwise
**/
gboolean
-camel_flag_list_copy (CamelFlag **to, CamelFlag **from)
+camel_flag_list_copy (CamelFlag **to,
+ CamelFlag **from)
{
CamelFlag *flag, *tmp;
gint changed = FALSE;
@@ -4197,7 +4305,8 @@ camel_flag_list_copy (CamelFlag **to, CamelFlag **from)
* Returns: the value of the flag or %NULL if unset
**/
const gchar *
-camel_tag_get (CamelTag **list, const gchar *name)
+camel_tag_get (CamelTag **list,
+ const gchar *name)
{
CamelTag *tag;
@@ -4221,7 +4330,9 @@ camel_tag_get (CamelTag **list, const gchar *name)
* Returns: %TRUE if the value on the tag changed or %FALSE otherwise
**/
gboolean
-camel_tag_set (CamelTag **list, const gchar *name, const gchar *value)
+camel_tag_set (CamelTag **list,
+ const gchar *name,
+ const gchar *value)
{
CamelTag *tag, *tmp;
@@ -4246,7 +4357,7 @@ camel_tag_set (CamelTag **list, const gchar *name, const gchar *value)
}
if (value) {
- tmp = g_malloc (sizeof (*tmp)+strlen (name));
+ tmp = g_malloc (sizeof (*tmp) + strlen (name));
strcpy (tmp->name, name);
tmp->value = g_strdup (value);
tmp->next = NULL;
@@ -4267,7 +4378,7 @@ camel_tag_set (CamelTag **list, const gchar *name, const gchar *value)
gint
camel_tag_list_size (CamelTag **list)
{
- gint count=0;
+ gint count = 0;
CamelTag *tag;
tag = *list;
@@ -4279,7 +4390,9 @@ camel_tag_list_size (CamelTag **list)
}
static void
-rem_tag (gchar *key, gchar *value, CamelTag **to)
+rem_tag (gchar *key,
+ gchar *value,
+ CamelTag **to)
{
camel_tag_set (to, key, NULL);
}
@@ -4294,7 +4407,8 @@ rem_tag (gchar *key, gchar *value, CamelTag **to)
* Returns: %TRUE if @to is changed or %FALSE otherwise
**/
gboolean
-camel_tag_list_copy (CamelTag **to, CamelTag **from)
+camel_tag_list_copy (CamelTag **to,
+ CamelTag **from)
{
gint changed = FALSE;
CamelTag *tag;
@@ -4317,7 +4431,7 @@ camel_tag_list_copy (CamelTag **to, CamelTag **from)
tag = tag->next;
}
- if (g_hash_table_size (left)>0) {
+ if (g_hash_table_size (left) > 0) {
g_hash_table_foreach (left, (GHFunc) rem_tag, to);
changed = TRUE;
}
@@ -4392,7 +4506,8 @@ camel_system_flag (const gchar *name)
* Returns: %TRUE if the named flag is set or %FALSE otherwise
**/
gboolean
-camel_system_flag_get (CamelMessageFlags flags, const gchar *name)
+camel_system_flag_get (CamelMessageFlags flags,
+ const gchar *name)
{
g_return_val_if_fail (name != NULL, FALSE);
@@ -4552,7 +4667,8 @@ camel_message_info_clone (gconstpointer o)
* Returns: the pointer data
**/
gconstpointer
-camel_message_info_ptr (const CamelMessageInfo *mi, gint id)
+camel_message_info_ptr (const CamelMessageInfo *mi,
+ gint id)
{
if (mi->summary)
return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->info_ptr (mi, id);
@@ -4570,7 +4686,8 @@ camel_message_info_ptr (const CamelMessageInfo *mi, gint id)
* Returns: the gint data
**/
guint32
-camel_message_info_uint32 (const CamelMessageInfo *mi, gint id)
+camel_message_info_uint32 (const CamelMessageInfo *mi,
+ gint id)
{
if (mi->summary)
return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->info_uint32 (mi, id);
@@ -4588,7 +4705,8 @@ camel_message_info_uint32 (const CamelMessageInfo *mi, gint id)
* Returns: the time_t data
**/
time_t
-camel_message_info_time (const CamelMessageInfo *mi, gint id)
+camel_message_info_time (const CamelMessageInfo *mi,
+ gint id)
{
if (mi->summary)
return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->info_time (mi, id);
@@ -4606,7 +4724,8 @@ camel_message_info_time (const CamelMessageInfo *mi, gint id)
* Returns: the state of the user flag
**/
gboolean
-camel_message_info_user_flag (const CamelMessageInfo *mi, const gchar *id)
+camel_message_info_user_flag (const CamelMessageInfo *mi,
+ const gchar *id)
{
if (mi->summary)
return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->info_user_flag (mi, id);
@@ -4624,7 +4743,8 @@ camel_message_info_user_flag (const CamelMessageInfo *mi, const gchar *id)
* Returns: the value of the user tag
**/
const gchar *
-camel_message_info_user_tag (const CamelMessageInfo *mi, const gchar *id)
+camel_message_info_user_tag (const CamelMessageInfo *mi,
+ const gchar *id)
{
if (mi->summary)
return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->info_user_tag (mi, id);
@@ -4643,7 +4763,9 @@ camel_message_info_user_tag (const CamelMessageInfo *mi, const gchar *id)
* Returns: %TRUE if any of the flags changed or %FALSE otherwise
**/
gboolean
-camel_message_info_set_flags (CamelMessageInfo *mi, CamelMessageFlags flags, guint32 set)
+camel_message_info_set_flags (CamelMessageInfo *mi,
+ CamelMessageFlags flags,
+ guint32 set)
{
if (mi->summary)
return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->info_set_flags (mi, flags, set);
@@ -4662,7 +4784,9 @@ camel_message_info_set_flags (CamelMessageInfo *mi, CamelMessageFlags flags, gui
* Returns: %TRUE if the state changed or %FALSE otherwise
**/
gboolean
-camel_message_info_set_user_flag (CamelMessageInfo *mi, const gchar *id, gboolean state)
+camel_message_info_set_user_flag (CamelMessageInfo *mi,
+ const gchar *id,
+ gboolean state)
{
if (mi->summary)
return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->info_set_user_flag (mi, id, state);
@@ -4681,7 +4805,9 @@ camel_message_info_set_user_flag (CamelMessageInfo *mi, const gchar *id, gboolea
* Returns: %TRUE if the value changed or %FALSE otherwise
**/
gboolean
-camel_message_info_set_user_tag (CamelMessageInfo *mi, const gchar *id, const gchar *val)
+camel_message_info_set_user_tag (CamelMessageInfo *mi,
+ const gchar *id,
+ const gchar *val)
{
if (mi->summary)
return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->info_set_user_tag (mi, id, val);
@@ -4690,7 +4816,8 @@ camel_message_info_set_user_tag (CamelMessageInfo *mi, const gchar *id, const gc
}
void
-camel_content_info_dump (CamelMessageContentInfo *ci, gint depth)
+camel_content_info_dump (CamelMessageContentInfo *ci,
+ gint depth)
{
gchar *p;
@@ -4742,7 +4869,8 @@ camel_message_info_dump (CamelMessageInfo *mi)
* Since: 2.28
**/
void
-camel_folder_summary_set_need_preview (CamelFolderSummary *summary, gboolean preview)
+camel_folder_summary_set_need_preview (CamelFolderSummary *summary,
+ gboolean preview)
{
summary->priv->need_preview = preview;
}
@@ -4759,7 +4887,8 @@ camel_folder_summary_get_need_preview (CamelFolderSummary *summary)
}
static gboolean
-compare_strings (const gchar *str1, const gchar *str2)
+compare_strings (const gchar *str1,
+ const gchar *str2)
{
if (str1 && str2 && !g_ascii_strcasecmp (str1, str2))
return TRUE;
@@ -4770,7 +4899,8 @@ compare_strings (const gchar *str1, const gchar *str2)
}
static gboolean
-match_content_type (CamelContentType *info_ctype, CamelContentType *ctype)
+match_content_type (CamelContentType *info_ctype,
+ CamelContentType *ctype)
{
const gchar *name1, *name2;
@@ -4797,7 +4927,8 @@ match_content_type (CamelContentType *info_ctype, CamelContentType *ctype)
* Since: 2.30
**/
const CamelMessageContentInfo *
-camel_folder_summary_guess_content_info (CamelMessageInfo *mi, CamelContentType *ctype)
+camel_folder_summary_guess_content_info (CamelMessageInfo *mi,
+ CamelContentType *ctype)
{
const CamelMessageContentInfo *ci = camel_message_info_content (mi);
diff --git a/camel/camel-folder-summary.h b/camel/camel-folder-summary.h
index 2ffc281..9423643 100644
--- a/camel/camel-folder-summary.h
+++ b/camel/camel-folder-summary.h
@@ -69,7 +69,7 @@ typedef struct _CamelFolderMetaSummary CamelFolderMetaSummary;
typedef struct _CamelMessageContentInfo CamelMessageContentInfo;
/* A tree of message content info structures
- describe the content structure of the message (if it has any) */
+ * describe the content structure of the message (if it has any) */
struct _CamelMessageContentInfo {
CamelMessageContentInfo *next;
@@ -104,11 +104,11 @@ typedef enum _CamelMessageFlags {
/* following flags are for the folder, and are not really permanent flags */
CAMEL_MESSAGE_FOLDER_FLAGGED = 1 << 16, /* for use by the folder implementation */
/* flags after 1 << 16 are used by camel providers,
- if adding non permanent flags, add them to the end */
+ * if adding non permanent flags, add them to the end */
CAMEL_MESSAGE_JUNK_LEARN = 1 << 30, /* used when setting CAMEL_MESSAGE_JUNK flag
- to say that we request junk plugin
- to learn that message as junk/non junk */
+ * to say that we request junk plugin
+ * to learn that message as junk/non junk */
CAMEL_MESSAGE_USER = 1 << 31 /* supports user flags */
} CamelMessageFlags;
@@ -176,7 +176,7 @@ struct _CamelMessageInfo {
guint32 refcount; /* ??? */
const gchar *uid;
/*FIXME: Make it work with the CAMEL_MESSADE_DB_DIRTY flag instead of another 4 bytes*/
- guint dirty:1;
+ guint dirty : 1;
};
/* For classes wishing to do the provided i/o, or for anonymous users,
@@ -188,7 +188,7 @@ struct _CamelMessageInfoBase {
guint32 refcount; /* ??? */
const gchar *uid;
/*FIXME: Make it work with the CAMEL_MESSADE_DB_DIRTY flag instead of another 4 bytes*/
- guint dirty:1;
+ guint dirty : 1;
const gchar *subject;
const gchar *from;
@@ -288,7 +288,7 @@ struct _CamelFolderSummaryClass {
/* Load/Save folder summary from DB*/
gint (*summary_header_from_db)(CamelFolderSummary *, struct _CamelFIRecord *);
struct _CamelFIRecord * (*summary_header_to_db)(CamelFolderSummary *, GError **error);
- CamelMessageInfo * (*message_info_from_db) (CamelFolderSummary *, struct _CamelMIRecord*);
+ CamelMessageInfo * (*message_info_from_db) (CamelFolderSummary *, struct _CamelMIRecord *);
struct _CamelMIRecord * (*message_info_to_db) (CamelFolderSummary *, CamelMessageInfo *);
CamelMessageContentInfo * (*content_info_from_db) (CamelFolderSummary *, struct _CamelMIRecord *);
gint (*content_info_to_db) (CamelFolderSummary *, CamelMessageContentInfo *, struct _CamelMIRecord *);
diff --git a/camel/camel-folder-thread.c b/camel/camel-folder-thread.c
index 316e3ca..e00c623 100644
--- a/camel/camel-folder-thread.c
+++ b/camel/camel-folder-thread.c
@@ -47,7 +47,8 @@
#endif
static void
-container_add_child (CamelFolderThreadNode *node, CamelFolderThreadNode *child)
+container_add_child (CamelFolderThreadNode *node,
+ CamelFolderThreadNode *child)
{
d(printf("\nAdding child %p to parent %p \n", child, node));
child->next = node->child;
@@ -56,7 +57,8 @@ container_add_child (CamelFolderThreadNode *node, CamelFolderThreadNode *child)
}
static void
-container_parent_child (CamelFolderThreadNode *parent, CamelFolderThreadNode *child)
+container_parent_child (CamelFolderThreadNode *parent,
+ CamelFolderThreadNode *child)
{
CamelFolderThreadNode *c, *node;
@@ -80,11 +82,11 @@ container_parent_child (CamelFolderThreadNode *parent, CamelFolderThreadNode *ch
/* else remove child from its existing parent, and reparent */
node = child->parent;
- c = (CamelFolderThreadNode *)&node->child;
+ c = (CamelFolderThreadNode *) &node->child;
d(printf("scanning children:\n"));
while (c->next) {
d(printf(" %p\n", c));
- if (c->next==child) {
+ if (c->next == child) {
d(printf("found node %p\n", child));
c->next = c->next->next;
child->parent = NULL;
@@ -98,7 +100,8 @@ container_parent_child (CamelFolderThreadNode *parent, CamelFolderThreadNode *ch
}
static void
-prune_empty (CamelFolderThread *thread, CamelFolderThreadNode **cp)
+prune_empty (CamelFolderThread *thread,
+ CamelFolderThreadNode **cp)
{
CamelFolderThreadNode *child, *next, *c, *lastc;
@@ -109,8 +112,8 @@ prune_empty (CamelFolderThread *thread, CamelFolderThreadNode **cp)
prune_empty (thread, &c->child);
d(printf("checking message %p %p (%08x%08x)\n", c,
- c->message, c->message?c->message->message_id.id.part.hi:0,
- c->message?c->message->message_id.id.part.lo:0));
+ c->message, c->message ? c->message->message_id.id.part.hi : 0,
+ c->message ? c->message->message_id.id.part.lo : 0));
if (c->message == NULL) {
if (c->child == NULL) {
d(printf("removing empty node\n"));
@@ -140,7 +143,9 @@ prune_empty (CamelFolderThread *thread, CamelFolderThreadNode **cp)
}
static void
-hashloop (gpointer key, gpointer value, gpointer data)
+hashloop (gpointer key,
+ gpointer value,
+ gpointer data)
{
CamelFolderThreadNode *c = value;
CamelFolderThreadNode *tail = data;
@@ -180,12 +185,12 @@ get_root_subject (CamelFolderThreadNode *c)
break;
if ((s[0] == 'r' || s[0]=='R')
&& (s[1] == 'e' || s[1]=='E')) {
- p = s+2;
+ p = s + 2;
while (isdigit (*p) || (ispunct (*p) && (*p != ':')))
p++;
- if (*p==':') {
+ if (*p == ':') {
c->re = TRUE;
- s = p+1;
+ s = p + 1;
} else
break;
} else
@@ -200,15 +205,17 @@ get_root_subject (CamelFolderThreadNode *c)
/* this can be pretty slow, but not used often */
/* clast cannot be null */
static void
-remove_node (CamelFolderThreadNode **list, CamelFolderThreadNode *node, CamelFolderThreadNode **clast)
+remove_node (CamelFolderThreadNode **list,
+ CamelFolderThreadNode *node,
+ CamelFolderThreadNode **clast)
{
CamelFolderThreadNode *c;
/* this is intentional, even if it looks funny */
/* if we have a parent, then we should remove it from the parent list,
- otherwise we remove it from the root list */
+ * otherwise we remove it from the root list */
if (node->parent) {
- c = (CamelFolderThreadNode *)&node->parent->child;
+ c = (CamelFolderThreadNode *) &node->parent->child;
} else {
c = (CamelFolderThreadNode *) list;
}
@@ -226,7 +233,8 @@ remove_node (CamelFolderThreadNode **list, CamelFolderThreadNode *node, CamelFol
}
static void
-group_root_set (CamelFolderThread *thread, CamelFolderThreadNode **cp)
+group_root_set (CamelFolderThread *thread,
+ CamelFolderThreadNode **cp)
{
GHashTable *subject_table = g_hash_table_new (g_str_hash, g_str_equal);
CamelFolderThreadNode *c, *clast, *scan, *container;
@@ -260,7 +268,7 @@ group_root_set (CamelFolderThread *thread, CamelFolderThreadNode **cp)
if (c->message == NULL && container->message == NULL) {
d(printf("merge containers children\n"));
/* steal the children from c onto container, and unlink c */
- scan = (CamelFolderThreadNode *)&container->child;
+ scan = (CamelFolderThreadNode *) &container->child;
while (scan->next)
scan = scan->next;
scan->next = c->child;
@@ -316,14 +324,16 @@ struct _tree_info {
};
static gint
-dump_tree_rec (struct _tree_info *info, CamelFolderThreadNode *c, gint depth)
+dump_tree_rec (struct _tree_info *info,
+ CamelFolderThreadNode *c,
+ gint depth)
{
gchar *p;
- gint count=0;
+ gint count = 0;
- p = alloca (depth*2+1);
- memset (p, ' ', depth*2);
- p[depth*2] = 0;
+ p = alloca (depth * 2 + 1);
+ memset (p, ' ', depth * 2);
+ p[depth * 2] = 0;
while (c) {
if (g_hash_table_lookup (info->visited, c)) {
@@ -339,7 +349,7 @@ dump_tree_rec (struct _tree_info *info, CamelFolderThreadNode *c, gint depth)
printf("%s %p <empty>\n", p, (gpointer) c);
}
if (c->child)
- count += dump_tree_rec (info, c->child, depth+1);
+ count += dump_tree_rec (info, c->child, depth + 1);
c = c->next;
}
return count;
@@ -358,14 +368,15 @@ camel_folder_threaded_messages_dump (CamelFolderThreadNode *c)
}
static gint
-sort_node (gconstpointer a, gconstpointer b)
+sort_node (gconstpointer a,
+ gconstpointer b)
{
const CamelFolderThreadNode *a1 = ((CamelFolderThreadNode **) a)[0];
const CamelFolderThreadNode *b1 = ((CamelFolderThreadNode **) b)[0];
/* if we have no message, it must be a dummy node, which
- also means it must have a child, just use that as the
- sort data (close enough?) */
+ * also means it must have a child, just use that as the
+ * sort data (close enough?) */
if (a1->message == NULL)
a1 = a1->child;
if (b1->message == NULL)
@@ -382,7 +393,7 @@ static void
sort_thread (CamelFolderThreadNode **cp)
{
CamelFolderThreadNode *c, *head, **carray;
- gint size=0;
+ gint size = 0;
c = *cp;
while (c) {
@@ -392,11 +403,11 @@ sort_thread (CamelFolderThreadNode **cp)
size++;
c = c->next;
}
- if (size<2)
+ if (size < 2)
return;
- carray = alloca (size*sizeof (CamelFolderThreadNode *));
+ carray = alloca (size * sizeof (CamelFolderThreadNode *));
c = *cp;
- size=0;
+ size = 0;
while (c) {
carray[size] = c;
c = c->next;
@@ -412,25 +423,29 @@ sort_thread (CamelFolderThreadNode **cp)
c->next = head;
head = c;
size--;
- } while (size>=0);
+ } while (size >= 0);
*cp = head;
}
-static guint id_hash (gpointer key)
+static guint
+id_hash (gpointer key)
{
CamelSummaryMessageID *id = (CamelSummaryMessageID *) key;
return id->id.part.lo;
}
-static gint id_equal (gpointer a, gpointer b)
+static gint
+id_equal (gpointer a,
+ gpointer b)
{
return ((CamelSummaryMessageID *) a)->id.id == ((CamelSummaryMessageID *) b)->id.id;
}
/* perform actual threading */
static void
-thread_summary (CamelFolderThread *thread, GPtrArray *summary)
+thread_summary (CamelFolderThread *thread,
+ GPtrArray *summary)
{
GHashTable *id_table, *no_id_table;
gint i;
@@ -444,7 +459,7 @@ thread_summary (CamelFolderThread *thread, GPtrArray *summary)
id_table = g_hash_table_new ((GHashFunc) id_hash, (GCompareFunc) id_equal);
no_id_table = g_hash_table_new (NULL, NULL);
- for (i=0;i<summary->len;i++) {
+ for (i = 0; i < summary->len; i++) {
CamelMessageInfo *mi = summary->pdata[i];
const CamelSummaryMessageID *mid = camel_message_info_message_id (mi);
const CamelSummaryReferences *references = camel_message_info_references (mi);
@@ -454,7 +469,7 @@ thread_summary (CamelFolderThread *thread, GPtrArray *summary)
/* check for duplicate messages */
if (c && c->order) {
/* if duplicate, just make out it is a no-id message, but try and insert it
- into the right spot in the tree */
+ * into the right spot in the tree */
d(printf("doing: (duplicate message id)\n"));
c = e_memchunk_alloc0 (thread->node_chunks);
g_hash_table_insert (no_id_table, (gpointer) mi, c);
@@ -470,13 +485,13 @@ thread_summary (CamelFolderThread *thread, GPtrArray *summary)
}
c->message = mi;
- c->order = i+1;
+ c->order = i + 1;
child = c;
if (references) {
gint j;
d(printf("%s (%s) references:\n", G_STRLOC, G_STRFUNC); )
- for (j=0;j<references->size;j++) {
+ for (j = 0; j < references->size; j++) {
gboolean found = FALSE;
/* should never be empty, but just incase */
@@ -487,14 +502,14 @@ thread_summary (CamelFolderThread *thread, GPtrArray *summary)
if (c == NULL) {
d(printf("%s (%s) not found\n", G_STRLOC, G_STRFUNC));
c = e_memchunk_alloc0 (thread->node_chunks);
- g_hash_table_insert (id_table, (gpointer)&references->references[j], c);
+ g_hash_table_insert (id_table, (gpointer) &references->references[j], c);
} else
found = TRUE;
if (c != child) {
container_parent_child (c, child);
/* Stop on the first parent found, no need to reparent
- it once it's placed in. Also, references are from
- parent to root, thus this should do the right thing. */
+ * it once it's placed in. Also, references are from
+ * parent to root, thus this should do the right thing. */
if (found)
break;
}
@@ -528,7 +543,7 @@ thread_summary (CamelFolderThread *thread, GPtrArray *summary)
sort_thread (&head);
/* remove any phantom nodes, this could possibly be put in group_root_set()? */
- c = (CamelFolderThreadNode *)&head;
+ c = (CamelFolderThreadNode *) &head;
while (c && c->next) {
CamelFolderThreadNode *scan, *newtop;
@@ -540,7 +555,7 @@ thread_summary (CamelFolderThread *thread, GPtrArray *summary)
c->next = newtop;
/* link its siblings onto the end of its children, fix all parent pointers */
- scan = (CamelFolderThreadNode *)&newtop->child;
+ scan = (CamelFolderThreadNode *) &newtop->child;
while (scan->next) {
scan = scan->next;
}
@@ -561,7 +576,7 @@ thread_summary (CamelFolderThread *thread, GPtrArray *summary)
}
/* this is only debug assertion stuff */
- c = (CamelFolderThreadNode *)&head;
+ c = (CamelFolderThreadNode *) &head;
while (c->next) {
c = c->next;
if (c->message == NULL)
@@ -574,8 +589,8 @@ thread_summary (CamelFolderThread *thread, GPtrArray *summary)
#ifdef TIMEIT
gettimeofday (&end, NULL);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
+ diff = end.tv_sec * 1000 + end.tv_usec / 1000;
+ diff -= start.tv_sec * 1000 + start.tv_usec / 1000;
printf("Message threading %d messages took %ld.%03ld seconds\n",
summary->len, diff / 1000, diff % 1000);
#endif
@@ -601,7 +616,9 @@ thread_summary (CamelFolderThread *thread, GPtrArray *summary)
* which represent the threaded structure of the messages.
**/
CamelFolderThread *
-camel_folder_thread_messages_new (CamelFolder *folder, GPtrArray *uids, gboolean thread_subject)
+camel_folder_thread_messages_new (CamelFolder *folder,
+ GPtrArray *uids,
+ gboolean thread_subject)
{
CamelFolderThread *thread;
GPtrArray *summary;
@@ -642,7 +659,10 @@ camel_folder_thread_messages_new (CamelFolder *folder, GPtrArray *uids, gboolean
/* add any still there, in the existing order */
static void
-add_present_rec (CamelFolderThread *thread, GHashTable *have, GPtrArray *summary, CamelFolderThreadNode *node)
+add_present_rec (CamelFolderThread *thread,
+ GHashTable *have,
+ GPtrArray *summary,
+ CamelFolderThreadNode *node)
{
while (node) {
const gchar *uid = camel_message_info_uid (node->message);
@@ -661,7 +681,8 @@ add_present_rec (CamelFolderThread *thread, GHashTable *have, GPtrArray *summary
}
void
-camel_folder_thread_messages_apply (CamelFolderThread *thread, GPtrArray *uids)
+camel_folder_thread_messages_apply (CamelFolderThread *thread,
+ GPtrArray *uids)
{
gint i;
GPtrArray *all;
@@ -670,13 +691,13 @@ camel_folder_thread_messages_apply (CamelFolderThread *thread, GPtrArray *uids)
all = g_ptr_array_new ();
table = g_hash_table_new (g_str_hash, g_str_equal);
- for (i=0;i<uids->len;i++)
+ for (i = 0; i < uids->len; i++)
g_hash_table_insert (table, uids->pdata[i], uids->pdata[i]);
add_present_rec (thread, table, all, thread->tree);
/* add any new ones, in supplied order */
- for (i=0;i<uids->len;i++)
+ for (i = 0; i < uids->len; i++)
if (g_hash_table_lookup (table, uids->pdata[i]) && (info = camel_folder_get_message_info (thread->folder, uids->pdata[i])))
g_ptr_array_add (all, info);
@@ -714,7 +735,7 @@ camel_folder_thread_messages_unref (CamelFolderThread *thread)
if (thread->folder) {
gint i;
- for (i=0;i<thread->summary->len;i++)
+ 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);
g_object_unref (thread->folder);
@@ -761,7 +782,9 @@ camel_folder_thread_messages_new_summary (GPtrArray *summary)
/* scan the list in depth-first fashion */
static void
-build_summary_rec (GHashTable *have, GPtrArray *summary, CamelFolderThreadNode *node)
+build_summary_rec (GHashTable *have,
+ GPtrArray *summary,
+ CamelFolderThreadNode *node)
{
while (node) {
if (node->message)
@@ -774,21 +797,22 @@ build_summary_rec (GHashTable *have, GPtrArray *summary, CamelFolderThreadNode *
}
void
-camel_folder_thread_messages_add (CamelFolderThread *thread, GPtrArray *summary)
+camel_folder_thread_messages_add (CamelFolderThread *thread,
+ GPtrArray *summary)
{
GPtrArray *all;
gint i;
GHashTable *table;
/* Instead of working out all the complex in's and out's of
- trying to do an incremental summary generation, just redo the whole
- thing with the summary in the current order - so it comes out
- in the same order */
+ * trying to do an incremental summary generation, just redo the whole
+ * thing with the summary in the current order - so it comes out
+ * in the same order */
all = g_ptr_array_new ();
table = g_hash_table_new (g_str_hash, g_str_equal);
build_summary_rec (table, all, thread->tree);
- for (i=0;i<summary->len;i++) {
+ for (i = 0; i < summary->len; i++) {
CamelMessageInfo *info = summary->pdata[i];
/* check its not already there, we dont want duplicates */
@@ -804,7 +828,10 @@ camel_folder_thread_messages_add (CamelFolderThread *thread, GPtrArray *summary)
}
static void
-remove_uid_node_rec (CamelFolderThread *thread, GHashTable *table, CamelFolderThreadNode **list, CamelFolderThreadNode *parent)
+remove_uid_node_rec (CamelFolderThread *thread,
+ GHashTable *table,
+ CamelFolderThreadNode **list,
+ CamelFolderThreadNode *parent)
{
CamelFolderThreadNode *prev = NULL;
CamelFolderThreadNode *node, *next, *child, *rest;
@@ -821,18 +848,18 @@ remove_uid_node_rec (CamelFolderThread *thread, GHashTable *table, CamelFolderTh
child = next->child;
if (child) {
/*
- node
- next
- child
- lchild
- rest
-
- becomes:
- node
- child
- lchild
- rest
- */
+ * node
+ * next
+ * child
+ * lchild
+ * rest
+ *
+ * becomes:
+ * node
+ * child
+ * lchild
+ * rest
+ */
rest = next->next;
node->next = child;
@@ -846,12 +873,12 @@ remove_uid_node_rec (CamelFolderThread *thread, GHashTable *table, CamelFolderTh
lchild->next = rest;
} else {
/*
- node
- next
- rest
- becomes:
- node
- rest */
+ * node
+ * next
+ * rest
+ * becomes:
+ * node
+ * rest */
node->next = next->next;
e_memchunk_free (thread->node_chunks, next);
next = node->next;
@@ -864,13 +891,14 @@ remove_uid_node_rec (CamelFolderThread *thread, GHashTable *table, CamelFolderTh
}
void
-camel_folder_thread_messages_remove (CamelFolderThread *thread, GPtrArray *uids)
+camel_folder_thread_messages_remove (CamelFolderThread *thread,
+ GPtrArray *uids)
{
GHashTable *table;
gint i;
table = g_hash_table_new (g_str_hash, g_str_equal);
- for (i=0;i<uids->len;i++)
+ for (i = 0; i < uids->len; i++)
g_hash_table_insert (table, uids->pdata[i], uids->pdata[i]);
remove_uid_node_rec (thread, table, &thread->tree, NULL);
diff --git a/camel/camel-folder-thread.h b/camel/camel-folder-thread.h
index 3ec1a42..850c918 100644
--- a/camel/camel-folder-thread.h
+++ b/camel/camel-folder-thread.h
@@ -35,7 +35,7 @@ typedef struct _CamelFolderThreadNode {
struct _CamelFolderThreadNode *next, *parent, *child;
const CamelMessageInfo *message;
gchar *root_subject; /* cached root equivalent subject */
- guint32 order:31;
+ guint32 order : 31;
guint32 re:1; /* re version of subject? */
} CamelFolderThreadNode;
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index 7785144..dc02610 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -697,7 +697,7 @@ folder_get_uids (CamelFolder *folder)
static GPtrArray *
folder_get_uncached_uids (CamelFolder *folder,
- GPtrArray * uids,
+ GPtrArray *uids,
GError **error)
{
GPtrArray *result;
@@ -719,7 +719,7 @@ folder_free_uids (CamelFolder *folder,
{
gint i;
- for (i=0; i<array->len; i++)
+ for (i = 0; i < array->len; i++)
camel_pstring_free (array->pdata[i]);
g_ptr_array_free (array, TRUE);
}
@@ -912,7 +912,7 @@ folder_transfer_messages_to_sync (CamelFolder *source,
for (i = 0; i < uids->len && local_error == NULL; i++) {
if (transferred_uids)
- ret_uid = (gchar **)&((*transferred_uids)->pdata[i]);
+ ret_uid = (gchar **) &((*transferred_uids)->pdata[i]);
folder_transfer_message_to (
source, uids->pdata[i], dest, ret_uid,
delete_originals, local_cancellable, &local_error);
@@ -1532,7 +1532,7 @@ folder_changed (CamelFolder *folder,
}
}
- if ((folder->folder_flags & (CAMEL_FOLDER_FILTER_RECENT|CAMEL_FOLDER_FILTER_JUNK))
+ if ((folder->folder_flags & (CAMEL_FOLDER_FILTER_RECENT | CAMEL_FOLDER_FILTER_JUNK))
&& p->uid_filter->len > 0)
driver = camel_session_get_filter_driver (session,
(folder->folder_flags & CAMEL_FOLDER_FILTER_RECENT)
@@ -2071,7 +2071,7 @@ camel_folder_set_message_flags (CamelFolder *folder,
class = CAMEL_FOLDER_GET_CLASS (folder);
g_return_val_if_fail (class->set_message_flags != NULL, FALSE);
- if ((flags & (CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_JUNK_LEARN)) == CAMEL_MESSAGE_JUNK) {
+ if ((flags & (CAMEL_MESSAGE_JUNK | CAMEL_MESSAGE_JUNK_LEARN)) == CAMEL_MESSAGE_JUNK) {
flags |= CAMEL_MESSAGE_JUNK_LEARN;
set &= ~CAMEL_MESSAGE_JUNK_LEARN;
}
@@ -2725,7 +2725,7 @@ camel_folder_changed (CamelFolder *folder,
if (camel_folder_is_frozen (folder)) {
/* folder_changed() will catch this case and pile
- the changes into folder->changed_frozen */
+ * the changes into folder->changed_frozen */
g_signal_emit (folder, signals[CHANGED], 0, changes);
return;
}
@@ -3963,7 +3963,7 @@ camel_folder_change_info_add_source_list (CamelFolderChangeInfo *info,
if (p->uid_source == NULL)
p->uid_source = g_hash_table_new (g_str_hash, g_str_equal);
- for (i=0;i<list->len;i++) {
+ for (i = 0; i < list->len; i++) {
gchar *uid = list->pdata[i];
if (g_hash_table_lookup (p->uid_source, uid) == NULL)
@@ -4019,12 +4019,14 @@ camel_folder_change_info_add_update_list (CamelFolderChangeInfo *info,
g_return_if_fail (info != NULL);
g_return_if_fail (list != NULL);
- for (i=0;i<list->len;i++)
+ for (i = 0; i < list->len; i++)
camel_folder_change_info_add_update (info, list->pdata[i]);
}
static void
-change_info_remove (gchar *key, gpointer value, CamelFolderChangeInfo *info)
+change_info_remove (gchar *key,
+ gpointer value,
+ CamelFolderChangeInfo *info)
{
struct _CamelFolderChangeInfoPrivate *p = info->priv;
GPtrArray *olduids;
@@ -4069,7 +4071,8 @@ camel_folder_change_info_build_diff (CamelFolderChangeInfo *info)
}
static void
-change_info_recent_uid (CamelFolderChangeInfo *info, const gchar *uid)
+change_info_recent_uid (CamelFolderChangeInfo *info,
+ const gchar *uid)
{
struct _CamelFolderChangeInfoPrivate *p;
GPtrArray *olduids;
@@ -4078,14 +4081,15 @@ change_info_recent_uid (CamelFolderChangeInfo *info, const gchar *uid)
p = info->priv;
/* always add to recent, but dont let anyone else know */
- if (!g_hash_table_lookup_extended (p->uid_stored, uid, (gpointer *)&olduid, (gpointer *)&olduids)) {
+ if (!g_hash_table_lookup_extended (p->uid_stored, uid, (gpointer *) &olduid, (gpointer *) &olduids)) {
olduid = camel_mempool_strdup (p->uid_pool, uid);
}
g_ptr_array_add (info->uid_recent, olduid);
}
static void
-change_info_filter_uid (CamelFolderChangeInfo *info, const gchar *uid)
+change_info_filter_uid (CamelFolderChangeInfo *info,
+ const gchar *uid)
{
struct _CamelFolderChangeInfoPrivate *p;
GPtrArray *olduids;
@@ -4094,18 +4098,21 @@ change_info_filter_uid (CamelFolderChangeInfo *info, const gchar *uid)
p = info->priv;
/* always add to filter, but dont let anyone else know */
- if (!g_hash_table_lookup_extended (p->uid_stored, uid, (gpointer *)&olduid, (gpointer *)&olduids)) {
+ if (!g_hash_table_lookup_extended (p->uid_stored, uid, (gpointer *) &olduid, (gpointer *) &olduids)) {
olduid = camel_mempool_strdup (p->uid_pool, uid);
}
g_ptr_array_add (p->uid_filter, olduid);
}
static void
-change_info_cat (CamelFolderChangeInfo *info, GPtrArray *source, void (*add)(CamelFolderChangeInfo *info, const gchar *uid))
+change_info_cat (CamelFolderChangeInfo *info,
+ GPtrArray *source,
+ void (*add)(CamelFolderChangeInfo *info,
+ const gchar *uid))
{
gint i;
- for (i=0;i<source->len;i++)
+ for (i = 0; i < source->len; i++)
add (info, source->pdata[i]);
}
diff --git a/camel/camel-gpg-context.c b/camel/camel-gpg-context.c
index 86a33d2..837c61a 100644
--- a/camel/camel-gpg-context.c
+++ b/camel/camel-gpg-context.c
@@ -21,10 +21,10 @@
*/
/* Debug states:
- gpg:sign dump canonicalised to-be-signed data to a file
- gpg:verify dump canonicalised verification and signature data to file
- gpg:status print gpg status-fd output to stdout
-*/
+ * gpg:sign dump canonicalised to-be-signed data to a file
+ * gpg:verify dump canonicalised verification and signature data to file
+ * gpg:status print gpg status-fd output to stdout
+ */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -135,33 +135,33 @@ struct _GpgCtx {
gint exit_status;
- guint exited:1;
- guint complete:1;
- guint seen_eof1:1;
- guint seen_eof2:1;
- guint always_trust:1;
- guint armor:1;
- guint need_passwd:1;
- guint send_passwd:1;
-
- guint bad_passwds:2;
-
- guint hadsig:1;
- guint badsig:1;
- guint errsig:1;
- guint goodsig:1;
- guint validsig:1;
- guint nopubkey:1;
- guint nodata:1;
- guint trust:3;
- guint processing:1;
+ guint exited : 1;
+ guint complete : 1;
+ guint seen_eof1 : 1;
+ guint seen_eof2 : 1;
+ guint always_trust : 1;
+ guint armor : 1;
+ guint need_passwd : 1;
+ guint send_passwd : 1;
+
+ guint bad_passwds : 2;
+
+ guint hadsig : 1;
+ guint badsig : 1;
+ guint errsig : 1;
+ guint goodsig : 1;
+ guint validsig : 1;
+ guint nopubkey : 1;
+ guint nodata : 1;
+ guint trust : 3;
+ guint processing : 1;
GString *signers;
- guint diagflushed:1;
+ guint diagflushed : 1;
- guint utf8:1;
+ guint utf8 : 1;
- guint padding:10;
+ guint padding : 10;
};
static struct _GpgCtx *
@@ -252,33 +252,38 @@ gpg_ctx_new (CamelCipherContext *context)
}
static void
-gpg_ctx_set_mode (struct _GpgCtx *gpg, enum _GpgCtxMode mode)
+gpg_ctx_set_mode (struct _GpgCtx *gpg,
+ enum _GpgCtxMode mode)
{
gpg->mode = mode;
gpg->need_passwd = ((gpg->mode == GPG_CTX_MODE_SIGN) || (gpg->mode == GPG_CTX_MODE_DECRYPT));
}
static void
-gpg_ctx_set_hash (struct _GpgCtx *gpg, CamelCipherHash hash)
+gpg_ctx_set_hash (struct _GpgCtx *gpg,
+ CamelCipherHash hash)
{
gpg->hash = hash;
}
static void
-gpg_ctx_set_always_trust (struct _GpgCtx *gpg, gboolean trust)
+gpg_ctx_set_always_trust (struct _GpgCtx *gpg,
+ gboolean trust)
{
gpg->always_trust = trust;
}
static void
-gpg_ctx_set_userid (struct _GpgCtx *gpg, const gchar *userid)
+gpg_ctx_set_userid (struct _GpgCtx *gpg,
+ const gchar *userid)
{
g_free (gpg->userid);
gpg->userid = g_strdup (userid);
}
static void
-gpg_ctx_add_recipient (struct _GpgCtx *gpg, const gchar *keyid)
+gpg_ctx_add_recipient (struct _GpgCtx *gpg,
+ const gchar *keyid)
{
if (gpg->mode != GPG_CTX_MODE_ENCRYPT && gpg->mode != GPG_CTX_MODE_EXPORT)
return;
@@ -290,20 +295,23 @@ gpg_ctx_add_recipient (struct _GpgCtx *gpg, const gchar *keyid)
}
static void
-gpg_ctx_set_sigfile (struct _GpgCtx *gpg, const gchar *sigfile)
+gpg_ctx_set_sigfile (struct _GpgCtx *gpg,
+ const gchar *sigfile)
{
g_free (gpg->sigfile);
gpg->sigfile = g_strdup (sigfile);
}
static void
-gpg_ctx_set_armor (struct _GpgCtx *gpg, gboolean armor)
+gpg_ctx_set_armor (struct _GpgCtx *gpg,
+ gboolean armor)
{
gpg->armor = armor;
}
static void
-gpg_ctx_set_istream (struct _GpgCtx *gpg, CamelStream *istream)
+gpg_ctx_set_istream (struct _GpgCtx *gpg,
+ CamelStream *istream)
{
g_object_ref (istream);
if (gpg->istream)
@@ -312,7 +320,8 @@ gpg_ctx_set_istream (struct _GpgCtx *gpg, CamelStream *istream)
}
static void
-gpg_ctx_set_ostream (struct _GpgCtx *gpg, CamelStream *ostream)
+gpg_ctx_set_ostream (struct _GpgCtx *gpg,
+ CamelStream *ostream)
{
g_object_ref (ostream);
if (gpg->ostream)
@@ -337,7 +346,9 @@ gpg_ctx_get_diagnostics (struct _GpgCtx *gpg)
}
static void
-userid_hint_free (gpointer key, gpointer value, gpointer user_data)
+userid_hint_free (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
g_free (key);
g_free (value);
@@ -428,7 +439,11 @@ gpg_hash_str (CamelCipherHash hash)
}
static GPtrArray *
-gpg_ctx_get_argv (struct _GpgCtx *gpg, gint status_fd, gchar **sfd, gint passwd_fd, gchar **pfd)
+gpg_ctx_get_argv (struct _GpgCtx *gpg,
+ gint status_fd,
+ gchar **sfd,
+ gint passwd_fd,
+ gchar **pfd)
{
const gchar *hash_str;
GPtrArray *argv;
@@ -445,7 +460,7 @@ gpg_ctx_get_argv (struct _GpgCtx *gpg, gint status_fd, gchar **sfd, gint passwd_
if (passwd_fd == -1) {
/* only use batch mode if we don't intend on using the
- interactive --command-fd option */
+ * interactive --command-fd option */
g_ptr_array_add (argv, (guint8 *) "--batch");
g_ptr_array_add (argv, (guint8 *) "--yes");
}
@@ -652,7 +667,8 @@ exception:
#ifndef G_OS_WIN32
static const gchar *
-next_token (const gchar *in, gchar **token)
+next_token (const gchar *in,
+ gchar **token)
{
const gchar *start, *inptr = in;
@@ -852,7 +868,7 @@ gpg_ctx_parse_status (struct _GpgCtx *gpg,
gchar *message;
message = g_locale_to_utf8 (
- (const gchar *) status+11, -1, NULL, NULL, NULL);
+ (const gchar *) status + 11, -1, NULL, NULL, NULL);
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Unexpected response from GnuPG: %s"), message);
@@ -1071,7 +1087,7 @@ gpg_ctx_op_step (struct _GpgCtx *gpg,
gint status, i;
gboolean read_data = FALSE, wrote_data = FALSE;
- for (i=0;i<6;i++) {
+ for (i = 0; i < 6; i++) {
polls[i].fd = -1;
polls[i].events = 0;
}
@@ -1099,9 +1115,9 @@ gpg_ctx_op_step (struct _GpgCtx *gpg,
polls[5].events = G_IO_IN;
do {
- for (i=0;i<6;i++)
+ for (i = 0; i < 6; i++)
polls[i].revents = 0;
- status = g_poll (polls, 6, 30*1000);
+ status = g_poll (polls, 6, 30 * 1000);
} while (status == -1 && errno == EINTR);
if (status == 0)
@@ -1117,12 +1133,12 @@ gpg_ctx_op_step (struct _GpgCtx *gpg,
}
/* Test each and every file descriptor to see if it's 'ready',
- and if so - do what we can with it and then drop through to
- the next file descriptor and so on until we've done what we
- can to all of them. If one fails along the way, return
- -1. */
+ * and if so - do what we can with it and then drop through to
+ * the next file descriptor and so on until we've done what we
+ * can to all of them. If one fails along the way, return
+ * -1. */
- if (polls[2].revents & (G_IO_IN|G_IO_HUP)) {
+ if (polls[2].revents & (G_IO_IN | G_IO_HUP)) {
/* read the status message and decide what to do... */
gchar buffer[4096];
gssize nread;
@@ -1145,7 +1161,7 @@ gpg_ctx_op_step (struct _GpgCtx *gpg,
}
}
- if ((polls[0].revents & (G_IO_IN|G_IO_HUP)) && gpg->ostream) {
+ if ((polls[0].revents & (G_IO_IN | G_IO_HUP)) && gpg->ostream) {
gchar buffer[4096];
gssize nread;
@@ -1170,7 +1186,7 @@ gpg_ctx_op_step (struct _GpgCtx *gpg,
read_data = TRUE;
}
- if (polls[1].revents & (G_IO_IN|G_IO_HUP)) {
+ if (polls[1].revents & (G_IO_IN | G_IO_HUP)) {
gchar buffer[4096];
gssize nread;
@@ -1191,7 +1207,7 @@ gpg_ctx_op_step (struct _GpgCtx *gpg,
}
}
- if ((polls[4].revents & (G_IO_OUT|G_IO_HUP)) && gpg->need_passwd && gpg->send_passwd) {
+ if ((polls[4].revents & (G_IO_OUT | G_IO_HUP)) && gpg->need_passwd && gpg->send_passwd) {
gssize w, nwritten = 0;
gsize n;
@@ -1219,7 +1235,7 @@ gpg_ctx_op_step (struct _GpgCtx *gpg,
gpg->send_passwd = FALSE;
}
- if ((polls[3].revents & (G_IO_OUT|G_IO_HUP)) && gpg->istream) {
+ if ((polls[3].revents & (G_IO_OUT | G_IO_HUP)) && gpg->istream) {
gchar buffer[4096];
gssize nread;
@@ -1257,8 +1273,8 @@ gpg_ctx_op_step (struct _GpgCtx *gpg,
if (gpg->need_id && !gpg->processing && !read_data && !wrote_data) {
/* do not ask more than hundred times per second when looking for a pass phrase,
- in case user has the use-agent set, it'll not use the all CPU when
- agent is asking for a pass phrase, instead of us */
+ * in case user has the use-agent set, it'll not use the all CPU when
+ * agent is asking for a pass phrase, instead of us */
g_usleep (G_USEC_PER_SEC / 100);
}
@@ -1382,7 +1398,8 @@ swrite (CamelMimePart *sigpart,
}
static void
-add_signers (CamelCipherValidity *validity, const GString *signers)
+add_signers (CamelCipherValidity *validity,
+ const GString *signers)
{
CamelInternetAddress *address;
gint i, count;
@@ -1542,7 +1559,7 @@ gpg_sign_sync (CamelCipherContext *context,
CamelStream *out;
name = g_strdup_printf("camel-gpg.%d.sign-data", logid++);
- out = camel_stream_fs_new_with_name (name, O_CREAT|O_TRUNC|O_WRONLY, 0666);
+ out = camel_stream_fs_new_with_name (name, O_CREAT | O_TRUNC | O_WRONLY, 0666);
if (out) {
printf("Writing gpg signing data to '%s'\n", name);
camel_stream_write_to_stream (istream, out);
@@ -1708,7 +1725,7 @@ gpg_verify_sync (CamelCipherContext *context,
CamelStream *out;
name = g_strdup_printf("camel-gpg.%d.verify.data", logid);
- out = camel_stream_fs_new_with_name (name, O_CREAT|O_TRUNC|O_WRONLY, 0666);
+ out = camel_stream_fs_new_with_name (name, O_CREAT | O_TRUNC | O_WRONLY, 0666);
if (out) {
printf("Writing gpg verify data to '%s'\n", name);
camel_stream_write_to_stream (istream, out);
@@ -1722,7 +1739,7 @@ gpg_verify_sync (CamelCipherContext *context,
if (sigpart) {
name = g_strdup_printf("camel-gpg.%d.verify.signature", logid++);
- out = camel_stream_fs_new_with_name (name, O_CREAT|O_TRUNC|O_WRONLY, 0666);
+ out = camel_stream_fs_new_with_name (name, O_CREAT | O_TRUNC | O_WRONLY, 0666);
if (out) {
printf("Writing gpg verify signature to '%s'\n", name);
camel_data_wrapper_write_to_stream ((CamelDataWrapper *) sigpart, out);
@@ -2061,8 +2078,8 @@ gpg_decrypt_sync (CamelCipherContext *context,
if (!camel_data_wrapper_decode_to_stream_sync (
dw, null, cancellable, NULL)) {
/* nothing had been decoded from the stream, it doesn't
- contain any header, like Content-Type or such, thus
- write it as a message body */
+ * contain any header, like Content-Type or such, thus
+ * write it as a message body */
success = camel_data_wrapper_construct_from_stream_sync (
dw, ostream, cancellable, error);
}
diff --git a/camel/camel-html-parser.c b/camel/camel-html-parser.c
index 3acb1e3..c222d4e 100644
--- a/camel/camel-html-parser.c
+++ b/camel/camel-html-parser.c
@@ -108,7 +108,7 @@ void camel_html_parser_set_data (CamelHTMLParser *hp, const gchar *start, gint l
CamelHTMLParserPrivate *p = hp->priv;
p->inptr = p->inbuf = (gchar *) start;
- p->inend = (gchar *) start+len;
+ p->inend = (gchar *) start + len;
p->eof = last;
}
@@ -137,7 +137,7 @@ const gchar *camel_html_parser_attr (CamelHTMLParser *hp, const gchar *name)
gint i;
CamelHTMLParserPrivate *p = hp->priv;
- for (i=0;i<p->attrs->len;i++) {
+ for (i = 0; i < p->attrs->len; i++) {
if (!g_ascii_strcasecmp (((GString *) p->attrs->pdata[i])->str, name)) {
return ((GString *) p->values->pdata[i])->str;
}
@@ -477,10 +477,10 @@ static void tokenize_free (CamelHTMLParserPrivate *p)
g_string_free (p->ent, TRUE);
g_free (p->charset);
- for (i=0;i<p->attrs->len;i++)
+ for (i = 0; i < p->attrs->len; i++)
g_string_free (p->attrs->pdata[i], TRUE);
- for (i=0;i<p->values->len;i++)
+ for (i = 0; i < p->values->len; i++)
g_string_free (p->values->pdata[i], TRUE);
g_free (p);
@@ -491,7 +491,7 @@ static gint convert_entity (const gchar *e, gchar *ent)
guint val;
if (e[0] == '#')
- return g_unichar_to_utf8 (atoi (e+1), ent);
+ return g_unichar_to_utf8 (atoi (e + 1), ent);
val = GPOINTER_TO_UINT (g_hash_table_lookup (entities, e));
if (ent)
@@ -507,7 +507,7 @@ static void dump_tag (CamelHTMLParserPrivate *p)
printf("got tag: %s\n", p->tag->str);
printf("%d attributes:\n", p->attr);
- for (i=0;i<p->attr;i++) {
+ for (i = 0; i < p->attr; i++) {
printf(" %s = '%s'\n", ((GString *)p->attrs->pdata[i])->str, ((GString *)p->values->pdata[i])->str);
}
}
@@ -536,7 +536,7 @@ static gint tokenize_step (CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
*datap = start;
*lenp = in-start-1;
goto done;
- } else if (c=='&') {
+ } else if (c == '&') {
ret = state;
state = CAMEL_HTML_PARSER_ENT;
g_string_truncate (p->ent, 0);
@@ -548,8 +548,8 @@ static gint tokenize_step (CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
}
break;
case CAMEL_HTML_PARSER_ENT:
- if (c==';') {
- len = convert_entity (p->ent->str+1, p->ent_utf8);
+ if (c == ';') {
+ len = convert_entity (p->ent->str + 1, p->ent_utf8);
if (len == 0) {
/* handle broken entity */
g_string_append_c (p->ent, c);
@@ -585,7 +585,7 @@ static gint tokenize_step (CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
ret = CAMEL_HTML_PARSER_ELEMENT;
state = CAMEL_HTML_PARSER_DATA;
goto done;
- } else if (c == ' ' || c=='\n' || c=='\t') {
+ } else if (c == ' ' || c == '\n' || c == '\t') {
state = CAMEL_HTML_PARSER_ATTR0;
} else {
g_string_append_c (p->tag, c);
@@ -620,7 +620,7 @@ static gint tokenize_step (CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
*datap = start;
*lenp = in-start-1;
goto done;
- } else if (c=='-') {
+ } else if (c == '-') {
/* we dont care if we get 'n' --'s before the > */
if (p->tag->len < 2)
g_string_append_c (p->tag, c);
@@ -634,7 +634,7 @@ static gint tokenize_step (CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
ret = CAMEL_HTML_PARSER_ELEMENT;
state = CAMEL_HTML_PARSER_DATA;
goto done;
- } else if (c == ' ' || c=='\n' || c=='\t') {
+ } else if (c == ' ' || c == '\n' || c == '\t') {
} else {
if (p->attrs->len <= p->attr) {
g_ptr_array_add(p->attrs, g_string_new(""));
@@ -655,7 +655,7 @@ static gint tokenize_step (CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
goto done;
} else if (c == '=') {
state = CAMEL_HTML_PARSER_VAL0;
- } else if (c == ' ' || c=='\n' || c=='\t') {
+ } else if (c == ' ' || c == '\n' || c == '\t') {
state = CAMEL_HTML_PARSER_ATTR0;
p->attr++;
} else {
@@ -672,7 +672,7 @@ static gint tokenize_step (CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
} else if (c == '\'' || c == '\"') {
p->quote = c;
state = CAMEL_HTML_PARSER_VAL;
- } else if (c == ' ' || c=='\n' || c=='\t') {
+ } else if (c == ' ' || c == '\n' || c == '\t') {
} else {
g_string_append_c (p->values->pdata[p->attr], c);
p->quote = 0;
@@ -692,7 +692,7 @@ static gint tokenize_step (CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
} else if (c == p->quote) {
state = CAMEL_HTML_PARSER_ATTR0;
p->attr++;
- } else if (c=='&') {
+ } else if (c == '&') {
state = CAMEL_HTML_PARSER_VAL_ENT;
g_string_truncate (p->ent, 0);
} else {
@@ -704,10 +704,10 @@ static gint tokenize_step (CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
state = CAMEL_HTML_PARSER_DATA;
p->attr++;
goto done;
- } else if (c == ' ' || c=='\n' || c=='\t') {
+ } else if (c == ' ' || c == '\n' || c == '\t') {
state = CAMEL_HTML_PARSER_ATTR0;
p->attr++;
- } else if (c=='&') {
+ } else if (c == '&') {
state = CAMEL_HTML_PARSER_VAL_ENT;
g_string_truncate (p->ent, 0);
} else {
@@ -715,9 +715,9 @@ static gint tokenize_step (CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
}
break;
case CAMEL_HTML_PARSER_VAL_ENT:
- if (c==';') {
+ if (c == ';') {
state = CAMEL_HTML_PARSER_VAL;
- len = convert_entity (p->ent->str+1, p->ent_utf8);
+ len = convert_entity (p->ent->str + 1, p->ent_utf8);
if (len == 0) {
/* fallback; broken entity, just output it and see why we ended */
g_string_append (p->values->pdata[p->attr], p->ent->str);
diff --git a/camel/camel-http-stream.c b/camel/camel-http-stream.c
index 10a2206..1e4da03 100644
--- a/camel/camel-http-stream.c
+++ b/camel/camel-http-stream.c
@@ -531,10 +531,10 @@ http_stream_can_seek (GSeekable *seekable)
static gboolean
http_stream_seek (GSeekable *seekable,
- goffset offset,
- GSeekType type,
- GCancellable *cancellable,
- GError **error)
+ goffset offset,
+ GSeekType type,
+ GCancellable *cancellable,
+ GError **error)
{
CamelHttpStream *http;
@@ -561,9 +561,9 @@ http_stream_can_truncate (GSeekable *seekable)
static gboolean
http_stream_truncate_fn (GSeekable *seekable,
- goffset offset,
- GCancellable *cancellable,
- GError **error)
+ goffset offset,
+ GCancellable *cancellable,
+ GError **error)
{
/* XXX Don't bother translating this. Camel never calls it. */
g_set_error_literal (
@@ -614,7 +614,9 @@ camel_http_stream_init (CamelHttpStream *http)
* Returns: a http stream
**/
CamelStream *
-camel_http_stream_new (CamelHttpMethod method, struct _CamelSession *session, CamelURL *url)
+camel_http_stream_new (CamelHttpMethod method,
+ CamelSession *session,
+ CamelURL *url)
{
CamelHttpStream *stream;
gchar *str;
@@ -653,7 +655,8 @@ camel_http_stream_get_content_type (CamelHttpStream *http_stream)
}
void
-camel_http_stream_set_user_agent (CamelHttpStream *http_stream, const gchar *user_agent)
+camel_http_stream_set_user_agent (CamelHttpStream *http_stream,
+ const gchar *user_agent)
{
g_return_if_fail (CAMEL_IS_HTTP_STREAM (http_stream));
@@ -662,7 +665,8 @@ camel_http_stream_set_user_agent (CamelHttpStream *http_stream, const gchar *use
}
void
-camel_http_stream_set_proxy (CamelHttpStream *http_stream, const gchar *proxy_url)
+camel_http_stream_set_proxy (CamelHttpStream *http_stream,
+ const gchar *proxy_url)
{
g_return_if_fail (CAMEL_IS_HTTP_STREAM (http_stream));
@@ -691,7 +695,8 @@ camel_http_stream_set_proxy (CamelHttpStream *http_stream, const gchar *proxy_ur
}
void
-camel_http_stream_set_proxy_authrealm (CamelHttpStream *http_stream, const gchar *proxy_authrealm)
+camel_http_stream_set_proxy_authrealm (CamelHttpStream *http_stream,
+ const gchar *proxy_authrealm)
{
g_return_if_fail (CAMEL_IS_HTTP_STREAM (http_stream));
@@ -700,7 +705,8 @@ camel_http_stream_set_proxy_authrealm (CamelHttpStream *http_stream, const gchar
}
void
-camel_http_stream_set_proxy_authpass (CamelHttpStream *http_stream, const gchar *proxy_authpass)
+camel_http_stream_set_proxy_authpass (CamelHttpStream *http_stream,
+ const gchar *proxy_authpass)
{
g_return_if_fail (CAMEL_IS_HTTP_STREAM (http_stream));
diff --git a/camel/camel-iconv.c b/camel/camel-iconv.c
index 95126a4..15dc45d 100644
--- a/camel/camel-iconv.c
+++ b/camel/camel-iconv.c
@@ -103,17 +103,17 @@ struct {
{ "iso-8859-1", "iso-8859-1" },
{ "iso8859-1", "iso-8859-1" },
/* the above mostly serves as an example for iso-style charsets,
- but we have code that will populate the iso-*'s if/when they
- show up in camel_iconv_charset_name () so I'm
- not going to bother putting them all in here... */
+ * but we have code that will populate the iso-*'s if/when they
+ * show up in camel_iconv_charset_name () so I'm
+ * not going to bother putting them all in here... */
{ "windows-cp1251", "cp1251" },
{ "windows-1251", "cp1251" },
{ "cp1251", "cp1251" },
/* the above mostly serves as an example for windows-style
- charsets, but we have code that will parse and convert them
- to their cp#### equivalents if/when they show up in
- camel_iconv_charset_name () so I'm not going to bother
- putting them all in here either... */
+ * charsets, but we have code that will parse and convert them
+ * to their cp#### equivalents if/when they show up in
+ * camel_iconv_charset_name () so I'm not going to bother
+ * putting them all in here either... */
#endif
/* charset name (lowercase!), iconv-friendly name (sometimes case sensitive) */
{ "utf-8", "UTF-8" },
@@ -154,19 +154,19 @@ struct {
};
/* Another copy of this trivial list implementation
- Why? This stuff gets called a lot (potentially), should run fast,
- and g_list's are f@@#$ed up to make this a hassle */
+ * Why? This stuff gets called a lot (potentially), should run fast,
+ * and g_list's are f@@#$ed up to make this a hassle */
static void camel_dlist_init (CamelDList *v)
{
- v->head = (CamelDListNode *)&v->tail;
+ v->head = (CamelDListNode *) &v->tail;
v->tail = NULL;
- v->tailpred = (CamelDListNode *)&v->head;
+ v->tailpred = (CamelDListNode *) &v->head;
}
static CamelDListNode *camel_dlist_addhead (CamelDList *l, CamelDListNode *n)
{
n->next = l->head;
- n->prev = (CamelDListNode *)&l->head;
+ n->prev = (CamelDListNode *) &l->head;
l->head->prev = n;
l->head = n;
return n;
@@ -174,7 +174,7 @@ static CamelDListNode *camel_dlist_addhead (CamelDList *l, CamelDListNode *n)
static CamelDListNode *camel_dlist_addtail (CamelDList *l, CamelDListNode *n)
{
- n->next = (CamelDListNode *)&l->tail;
+ n->next = (CamelDListNode *) &l->tail;
n->prev = l->tailpred;
l->tailpred->next = n;
l->tailpred = n;
@@ -397,13 +397,13 @@ camel_iconv_charset_name (const gchar *charset)
}
} else if (strncmp(name, "windows-", 8) == 0) {
/* Convert windows-nnnnn or windows-cpnnnnn to cpnnnn */
- tmp = name+8;
+ tmp = name + 8;
if (!strncmp(tmp, "cp", 2))
tmp+=2;
ret = g_strdup_printf("CP%s", tmp);
} else if (strncmp(name, "microsoft-", 10) == 0) {
/* Convert microsoft-nnnnn or microsoft-cpnnnnn to cpnnnn */
- tmp = name+10;
+ tmp = name + 10;
if (!strncmp(tmp, "cp", 2))
tmp+=2;
ret = g_strdup_printf("CP%s", tmp);
@@ -426,7 +426,7 @@ flush_entry (struct _iconv_cache *ic)
in = (struct _iconv_cache_node *) ic->open.head;
nn = in->next;
while (nn) {
- if (in->ip != (iconv_t)-1) {
+ if (in->ip != (iconv_t) - 1) {
g_hash_table_remove (iconv_cache_open, in->ip);
iconv_close (in->ip);
}
@@ -440,7 +440,8 @@ flush_entry (struct _iconv_cache *ic)
/* This should run pretty quick, its called a lot */
iconv_t
-camel_iconv_open (const gchar *oto, const gchar *ofrom)
+camel_iconv_open (const gchar *oto,
+ const gchar *ofrom)
{
const gchar *to, *from;
gchar *tofrom;
@@ -498,7 +499,7 @@ camel_iconv_open (const gchar *oto, const gchar *ofrom)
if (in->prev && !in->busy) {
cd(printf("using existing iconv converter '%s'\n", ic->conv));
ip = in->ip;
- if (ip != (iconv_t)-1) {
+ if (ip != (iconv_t) - 1) {
/* work around some broken iconv implementations
* that die if the length arguments are NULL
*/
@@ -518,7 +519,7 @@ camel_iconv_open (const gchar *oto, const gchar *ofrom)
in->ip = ip;
in->parent = ic;
camel_dlist_addhead (&ic->open, (CamelDListNode *) in);
- if (ip != (iconv_t)-1) {
+ if (ip != (iconv_t) - 1) {
g_hash_table_insert (iconv_cache_open, ip, in);
in->busy = TRUE;
} else {
@@ -535,8 +536,11 @@ camel_iconv_open (const gchar *oto, const gchar *ofrom)
}
gsize
-camel_iconv (iconv_t cd, const gchar **inbuf, gsize *inbytesleft,
- gchar ** outbuf, gsize *outbytesleft)
+camel_iconv (iconv_t cd,
+ const gchar **inbuf,
+ gsize *inbytesleft,
+ gchar **outbuf,
+ gsize *outbytesleft)
{
return iconv (cd, (gchar **) inbuf, inbytesleft, outbuf, outbytesleft);
}
@@ -546,7 +550,7 @@ camel_iconv_close (iconv_t ip)
{
struct _iconv_cache_node *in;
- if (ip == (iconv_t)-1)
+ if (ip == (iconv_t) - 1)
return;
LOCK ();
diff --git a/camel/camel-index-control.c b/camel/camel-index-control.c
index 53384b6..87ae760 100644
--- a/camel/camel-index-control.c
+++ b/camel/camel-index-control.c
@@ -32,12 +32,13 @@ do_usage (gchar *argv0)
}
static gint
-do_compress (gint argc, gchar **argv)
+do_compress (gint argc,
+ gchar **argv)
{
gint i;
CamelIndex *idx;
- for (i=2;i<argc;i++) {
+ for (i = 2; i < argc; i++) {
printf("Opening index file: %s\n", argv[i]);
idx = (CamelIndex *) camel_text_index_new (argv[i], O_RDWR);
if (idx) {
@@ -56,12 +57,13 @@ do_compress (gint argc, gchar **argv)
}
static gint
-do_dump (gint argc, gchar **argv)
+do_dump (gint argc,
+ gchar **argv)
{
gint i;
CamelIndex *idx;
- for (i=2;i<argc;i++) {
+ for (i = 2; i < argc; i++) {
printf("Opening index file: %s\n", argv[i]);
idx = (CamelIndex *) camel_text_index_new (argv[i], O_RDONLY);
if (idx) {
@@ -77,12 +79,13 @@ do_dump (gint argc, gchar **argv)
}
static gint
-do_info (gint argc, gchar **argv)
+do_info (gint argc,
+ gchar **argv)
{
gint i;
CamelIndex *idx;
- for (i=2;i<argc;i++) {
+ for (i = 2; i < argc; i++) {
printf("Opening index file: %s\n", argv[i]);
idx = (CamelIndex *) camel_text_index_new (argv[i], O_RDONLY);
if (idx) {
@@ -97,12 +100,13 @@ do_info (gint argc, gchar **argv)
}
static gint
-do_check (gint argc, gchar **argv)
+do_check (gint argc,
+ gchar **argv)
{
gint i;
CamelIndex *idx;
- for (i=2;i<argc;i++) {
+ for (i = 2; i < argc; i++) {
printf("Opening index file: %s\n", argv[i]);
idx = (CamelIndex *) camel_text_index_new (argv[i], O_RDONLY);
if (idx) {
@@ -120,7 +124,7 @@ static gint do_perf (gint argc, gchar **argv);
gint main (gint argc, gchar **argv)
{
- if (argc<2)
+ if (argc < 2)
do_usage (argv[0]);
g_thread_init (NULL);
@@ -148,7 +152,8 @@ gint main (gint argc, gchar **argv)
#include "camel-stream-fs.h"
static gint
-do_perf (gint argc, gchar **argv)
+do_perf (gint argc,
+ gchar **argv)
{
CamelIndex *idx;
DIR *dir;
diff --git a/camel/camel-index.c b/camel/camel-index.c
index 70971fe..4bf4079 100644
--- a/camel/camel-index.c
+++ b/camel/camel-index.c
@@ -80,7 +80,8 @@ camel_index_init (CamelIndex *index)
}
CamelIndex *
-camel_index_new (const gchar *path, gint flags)
+camel_index_new (const gchar *path,
+ gint flags)
{
CamelIndex *idx;
@@ -91,7 +92,9 @@ camel_index_new (const gchar *path, gint flags)
}
void
-camel_index_construct (CamelIndex *idx, const gchar *path, gint flags)
+camel_index_construct (CamelIndex *idx,
+ const gchar *path,
+ gint flags)
{
g_free (idx->path);
idx->path = g_strdup_printf ("%s.index", path);
@@ -99,7 +102,8 @@ camel_index_construct (CamelIndex *idx, const gchar *path, gint flags)
}
gint
-camel_index_rename (CamelIndex *idx, const gchar *path)
+camel_index_rename (CamelIndex *idx,
+ const gchar *path)
{
CamelIndexClass *class;
@@ -125,7 +129,9 @@ camel_index_rename (CamelIndex *idx, const gchar *path)
* Since: 2.32
**/
void
-camel_index_set_normalize (CamelIndex *idx, CamelIndexNorm func, gpointer data)
+camel_index_set_normalize (CamelIndex *idx,
+ CamelIndexNorm func,
+ gpointer data)
{
g_return_if_fail (CAMEL_IS_INDEX (idx));
@@ -192,7 +198,8 @@ camel_index_delete (CamelIndex *idx)
}
gint
-camel_index_has_name (CamelIndex *idx, const gchar *name)
+camel_index_has_name (CamelIndex *idx,
+ const gchar *name)
{
CamelIndexClass *class;
@@ -208,7 +215,8 @@ camel_index_has_name (CamelIndex *idx, const gchar *name)
}
CamelIndexName *
-camel_index_add_name (CamelIndex *idx, const gchar *name)
+camel_index_add_name (CamelIndex *idx,
+ const gchar *name)
{
CamelIndexClass *class;
@@ -224,7 +232,8 @@ camel_index_add_name (CamelIndex *idx, const gchar *name)
}
gint
-camel_index_write_name (CamelIndex *idx, CamelIndexName *idn)
+camel_index_write_name (CamelIndex *idx,
+ CamelIndexName *idn)
{
CamelIndexClass *class;
@@ -242,7 +251,8 @@ camel_index_write_name (CamelIndex *idx, CamelIndexName *idn)
}
CamelIndexCursor *
-camel_index_find_name (CamelIndex *idx, const gchar *name)
+camel_index_find_name (CamelIndex *idx,
+ const gchar *name)
{
CamelIndexClass *class;
@@ -258,7 +268,8 @@ camel_index_find_name (CamelIndex *idx, const gchar *name)
}
void
-camel_index_delete_name (CamelIndex *idx, const gchar *name)
+camel_index_delete_name (CamelIndex *idx,
+ const gchar *name)
{
CamelIndexClass *class;
@@ -272,7 +283,8 @@ camel_index_delete_name (CamelIndex *idx, const gchar *name)
}
CamelIndexCursor *
-camel_index_find (CamelIndex *idx, const gchar *word)
+camel_index_find (CamelIndex *idx,
+ const gchar *word)
{
CamelIndexClass *class;
CamelIndexCursor *ret;
@@ -364,7 +376,8 @@ camel_index_name_init (CamelIndexName *index_name)
}
CamelIndexName *
-camel_index_name_new (CamelIndex *idx, const gchar *name)
+camel_index_name_new (CamelIndex *idx,
+ const gchar *name)
{
CamelIndexName *idn;
@@ -445,7 +458,8 @@ camel_index_cursor_init (CamelIndexCursor *index_cursor)
}
CamelIndexCursor *
-camel_index_cursor_new (CamelIndex *idx, const gchar *name)
+camel_index_cursor_new (CamelIndex *idx,
+ const gchar *name)
{
CamelIndexCursor *idc;
diff --git a/camel/camel-internet-address.c b/camel/camel-internet-address.c
index 90073d2..3d02d0a 100644
--- a/camel/camel-internet-address.c
+++ b/camel/camel-internet-address.c
@@ -34,7 +34,8 @@ struct _address {
G_DEFINE_TYPE (CamelInternetAddress, camel_internet_address, CAMEL_TYPE_ADDRESS)
static gint
-internet_address_decode (CamelAddress *a, const gchar *raw)
+internet_address_decode (CamelAddress *a,
+ const gchar *raw)
{
struct _camel_header_address *ha, *n;
gint count = a->addresses->len;
@@ -76,7 +77,7 @@ internet_address_encode (CamelAddress *a)
out = g_string_new("");
- for (i = 0;i < a->addresses->len; i++) {
+ for (i = 0; i < a->addresses->len; i++) {
struct _address *addr = g_ptr_array_index (a->addresses, i);
gchar *enc;
@@ -95,7 +96,8 @@ internet_address_encode (CamelAddress *a)
}
static gint
-internet_address_unformat (CamelAddress *a, const gchar *raw)
+internet_address_unformat (CamelAddress *a,
+ const gchar *raw)
{
gchar *buffer, *p, *name, *addr;
gint c;
@@ -114,7 +116,7 @@ internet_address_unformat (CamelAddress *a, const gchar *raw)
name = NULL;
addr = p;
do {
- c = (guchar)*p++;
+ c = (guchar) * p++;
switch (c) {
/* removes quotes, they should only be around the total name anyway */
case '"':
@@ -172,7 +174,7 @@ internet_address_format (CamelAddress *a)
out = g_string_new("");
- for (i = 0;i < a->addresses->len; i++) {
+ for (i = 0; i < a->addresses->len; i++) {
struct _address *addr = g_ptr_array_index (a->addresses, i);
gchar *enc;
@@ -191,7 +193,8 @@ internet_address_format (CamelAddress *a)
}
static void
-internet_address_remove (CamelAddress *a, gint index)
+internet_address_remove (CamelAddress *a,
+ gint index)
{
struct _address *addr;
@@ -206,13 +209,14 @@ internet_address_remove (CamelAddress *a, gint index)
}
static gint
-internet_address_cat (CamelAddress *dest, CamelAddress *source)
+internet_address_cat (CamelAddress *dest,
+ CamelAddress *source)
{
gint i;
g_assert (CAMEL_IS_INTERNET_ADDRESS (source));
- for (i=0;i<source->addresses->len;i++) {
+ for (i = 0; i < source->addresses->len; i++) {
struct _address *addr = g_ptr_array_index (source->addresses, i);
camel_internet_address_add ((CamelInternetAddress *) dest, addr->name, addr->address);
}
@@ -263,7 +267,9 @@ camel_internet_address_new (void)
* Returns: the index of added entry
**/
gint
-camel_internet_address_add (CamelInternetAddress *addr, const gchar *name, const gchar *address)
+camel_internet_address_add (CamelInternetAddress *addr,
+ const gchar *name,
+ const gchar *address)
{
struct _address *new;
gint index;
@@ -291,7 +297,10 @@ camel_internet_address_add (CamelInternetAddress *addr, const gchar *name, const
* Returns: %TRUE if such an address exists, or %FALSE otherwise
**/
gboolean
-camel_internet_address_get (CamelInternetAddress *addr, gint index, const gchar **namep, const gchar **addressp)
+camel_internet_address_get (CamelInternetAddress *addr,
+ gint index,
+ const gchar **namep,
+ const gchar **addressp)
{
struct _address *a;
@@ -320,7 +329,9 @@ camel_internet_address_get (CamelInternetAddress *addr, gint index, const gchar
* match was found
**/
gint
-camel_internet_address_find_name (CamelInternetAddress *addr, const gchar *name, const gchar **addressp)
+camel_internet_address_find_name (CamelInternetAddress *addr,
+ const gchar *name,
+ const gchar **addressp)
{
struct _address *a;
gint i, len;
@@ -328,7 +339,7 @@ camel_internet_address_find_name (CamelInternetAddress *addr, const gchar *name,
g_assert (CAMEL_IS_INTERNET_ADDRESS (addr));
len = ((CamelAddress *) addr)->addresses->len;
- for (i=0;i<len;i++) {
+ for (i = 0; i < len; i++) {
a = g_ptr_array_index (((CamelAddress *) addr)->addresses, i);
if (a->name && !strcmp (a->name, name)) {
if (addressp)
@@ -350,7 +361,9 @@ camel_internet_address_find_name (CamelInternetAddress *addr, const gchar *name,
* Returns: the index of the address, or %-1 if not found
**/
gint
-camel_internet_address_find_address (CamelInternetAddress *addr, const gchar *address, const gchar **namep)
+camel_internet_address_find_address (CamelInternetAddress *addr,
+ const gchar *address,
+ const gchar **namep)
{
struct _address *a;
gint i, len;
@@ -358,7 +371,7 @@ camel_internet_address_find_address (CamelInternetAddress *addr, const gchar *ad
g_assert (CAMEL_IS_INTERNET_ADDRESS (addr));
len = ((CamelAddress *) addr)->addresses->len;
- for (i=0;i<len;i++) {
+ for (i = 0; i < len; i++) {
a = g_ptr_array_index (((CamelAddress *) addr)->addresses, i);
if (!strcmp (a->address, address)) {
if (namep)
@@ -370,7 +383,8 @@ camel_internet_address_find_address (CamelInternetAddress *addr, const gchar *ad
}
static void
-cia_encode_addrspec (GString *out, const gchar *addr)
+cia_encode_addrspec (GString *out,
+ const gchar *addr)
{
const gchar *at, *p;
@@ -383,9 +397,9 @@ cia_encode_addrspec (GString *out, const gchar *addr)
gchar c = *p++;
/* strictly by rfc, we should split local parts on dots.
- however i think 2822 changes this, and not many clients grok it, so
- just quote the whole local part if need be */
- if (!(camel_mime_is_atom (c) || c=='.')) {
+ * however i think 2822 changes this, and not many clients grok it, so
+ * just quote the whole local part if need be */
+ if (!(camel_mime_is_atom (c) || c == '.')) {
g_string_append_c (out, '"');
p = addr;
@@ -421,7 +435,9 @@ append:
* Returns: the encoded address
**/
gchar *
-camel_internet_address_encode_address (gint *inlen, const gchar *real, const gchar *addr)
+camel_internet_address_encode_address (gint *inlen,
+ const gchar *real,
+ const gchar *addr)
{
gchar *name = camel_header_encode_phrase ((const guchar *) real);
gchar *ret = NULL;
@@ -441,7 +457,7 @@ camel_internet_address_encode_address (gint *inlen, const gchar *real, const gch
g_free (folded);
last = strrchr (out->str, '\n');
if (last)
- len = last-(out->str+out->len);
+ len = last - (out->str + out->len);
else
len = out->len;
} else {
@@ -491,7 +507,8 @@ camel_internet_address_encode_address (gint *inlen, const gchar *real, const gch
* Returns: a nicely formatted string containing the rfc822 address
**/
gchar *
-camel_internet_address_format_address (const gchar *name, const gchar *addr)
+camel_internet_address_format_address (const gchar *name,
+ const gchar *addr)
{
gchar *ret = NULL;
@@ -503,7 +520,7 @@ camel_internet_address_format_address (const gchar *name, const gchar *addr)
while ((c = *p++)) {
if (c == '\"' || c == ',') {
- o = ret = g_malloc (strlen (name)+3+strlen (addr)+3 + 1);
+ o = ret = g_malloc (strlen (name) + 3 + strlen (addr) + 3 + 1);
p = name;
*o++ = '\"';
while ((c = *p++))
diff --git a/camel/camel-list-utils.c b/camel/camel-list-utils.c
index 9ad4085..d3e62df 100644
--- a/camel/camel-list-utils.c
+++ b/camel/camel-list-utils.c
@@ -36,9 +36,9 @@
void
camel_dlist_init (CamelDList *v)
{
- v->head = (CamelDListNode *)&v->tail;
+ v->head = (CamelDListNode *) &v->tail;
v->tail = NULL;
- v->tailpred = (CamelDListNode *)&v->head;
+ v->tailpred = (CamelDListNode *) &v->head;
}
/**
@@ -51,10 +51,11 @@ camel_dlist_init (CamelDList *v)
* Returns: @n.
**/
CamelDListNode *
-camel_dlist_addhead (CamelDList *l, CamelDListNode *n)
+camel_dlist_addhead (CamelDList *l,
+ CamelDListNode *n)
{
n->next = l->head;
- n->prev = (CamelDListNode *)&l->head;
+ n->prev = (CamelDListNode *) &l->head;
l->head->prev = n;
l->head = n;
return n;
@@ -70,9 +71,10 @@ camel_dlist_addhead (CamelDList *l, CamelDListNode *n)
* Returns: @n.
**/
CamelDListNode *
-camel_dlist_addtail (CamelDList *l, CamelDListNode *n)
+camel_dlist_addtail (CamelDList *l,
+ CamelDListNode *n)
{
- n->next = (CamelDListNode *)&l->tail;
+ n->next = (CamelDListNode *) &l->tail;
n->prev = l->tailpred;
l->tailpred->next = n;
l->tailpred = n;
@@ -154,7 +156,7 @@ camel_dlist_remtail (CamelDList *l)
gint
camel_dlist_empty (CamelDList *l)
{
- return (l->head == (CamelDListNode *)&l->tail);
+ return (l->head == (CamelDListNode *) &l->tail);
}
/**
@@ -191,7 +193,8 @@ camel_slist_init (CamelSList *v)
}
CamelSListNode *
-camel_slist_addhead (CamelSList *l, CamelSListNode *n)
+camel_slist_addhead (CamelSList *l,
+ CamelSListNode *n)
{
n->next = l->head;
l->head = n;
@@ -200,7 +203,8 @@ camel_slist_addhead (CamelSList *l, CamelSListNode *n)
}
CamelSListNode *
-camel_slist_addtail (CamelSList *l, CamelSListNode *n)
+camel_slist_addtail (CamelSList *l,
+ CamelSListNode *n)
{
CamelSListNode *p;
@@ -214,7 +218,8 @@ camel_slist_addtail (CamelSList *l, CamelSListNode *n)
}
CamelSListNode *
-camel_slist_remove (CamelSList *l, CamelSListNode *n)
+camel_slist_remove (CamelSList *l,
+ CamelSListNode *n)
{
CamelSListNode *p, *q;
diff --git a/camel/camel-lock-client.c b/camel/camel-lock-client.c
index 538776c..07c230f 100644
--- a/camel/camel-lock-client.c
+++ b/camel/camel-lock-client.c
@@ -139,7 +139,7 @@ lock_helper_init (GError **error)
close (lock_stdin_pipe[1]);
close (lock_stdout_pipe[0]);
close (lock_stdout_pipe[1]);
- for (i=3;i<255;i++)
+ for (i = 3; i < 255; i++)
close (i);
execl(CAMEL_LIBEXECDIR "/camel-lock-helper-" API_VERSION, "camel-lock-helper", NULL);
/* it'll pick this up when it tries to use us */
@@ -180,9 +180,9 @@ again:
msg->seq = lock_sequence;
msg->id = CAMEL_LOCK_HELPER_LOCK;
msg->data = len;
- memcpy (msg+1, path, len);
+ memcpy (msg + 1, path, len);
- write_n (lock_stdin_pipe[1], msg, len+sizeof (*msg));
+ write_n (lock_stdin_pipe[1], msg, len + sizeof (*msg));
do {
/* should also have a timeout here? cancellation? */
diff --git a/camel/camel-lock-helper.c b/camel/camel-lock-helper.c
index 5744dc6..f151e05 100644
--- a/camel/camel-lock-helper.c
+++ b/camel/camel-lock-helper.c
@@ -198,7 +198,7 @@ static gint unlock_id (guint32 lockid)
d(fprintf(stderr, "unlocking id '%d'\n", lockid));
- p = (struct _lock_info *)&lock_info_list;
+ p = (struct _lock_info *) &lock_info_list;
info = p->next;
while (info) {
if (info->id == lockid) {
@@ -263,7 +263,7 @@ static void setup_process (void)
#ifdef SETEUID_SAVES
/* here we change to the real user id, this is probably not particularly
- portable so may need configure checks */
+ * portable so may need configure checks */
lock_real_uid = getuid ();
lock_root_uid = geteuid ();
if (lock_real_uid != lock_root_uid)
@@ -307,7 +307,7 @@ gint main (gint argc, gchar **argv)
}
d(fprintf(stderr, "lock helper waiting for input\n"));
- if (select (STDIN_FILENO+1, &rset, NULL, NULL, lock_info_list?&tv:NULL) == -1) {
+ if (select (STDIN_FILENO + 1, &rset, NULL, NULL, lock_info_list ? &tv : NULL) == -1) {
if (errno == EINTR)
break;
@@ -345,7 +345,7 @@ gint main (gint argc, gchar **argv)
res = CAMEL_LOCK_HELPER_STATUS_NOMEM;
if (msg.data > 0xffff) {
res = CAMEL_LOCK_HELPER_STATUS_PROTOCOL;
- } else if ((path = malloc (msg.data+1)) != NULL) {
+ } else if ((path = malloc (msg.data + 1)) != NULL) {
res = CAMEL_LOCK_HELPER_STATUS_PROTOCOL;
len = read_n (STDIN_FILENO, path, msg.data);
if (len == msg.data) {
diff --git a/camel/camel-lock.c b/camel/camel-lock.c
index 8b9a7fb..c64b116 100644
--- a/camel/camel-lock.c
+++ b/camel/camel-lock.c
@@ -79,7 +79,7 @@ camel_lock_dot (const gchar *path,
struct stat st;
/* TODO: Is there a reliable way to refresh the lock, if we're still busy with it?
- Does it matter? We will normally also use fcntl too ... */
+ * Does it matter? We will normally also use fcntl too ... */
/* use alloca, save cleaning up afterwards */
lock = alloca(strlen(path) + strlen(".lock") + 1);
@@ -193,10 +193,10 @@ camel_lock_fcntl (gint fd,
d(printf("fcntl locking %d\n", fd));
memset (&lock, 0, sizeof (lock));
- lock.l_type = type==CAMEL_LOCK_READ?F_RDLCK:F_WRLCK;
+ lock.l_type = type == CAMEL_LOCK_READ ? F_RDLCK : F_WRLCK;
if (fcntl (fd, F_SETLK, &lock) == -1) {
/* If we get a 'locking not vailable' type error,
- we assume the filesystem doesn't support fcntl () locking */
+ * we assume the filesystem doesn't support fcntl () locking */
/* this is somewhat system-dependent */
if (errno != EINVAL && errno != ENOLCK) {
g_set_error (
@@ -261,9 +261,9 @@ camel_lock_flock (gint fd,
d(printf("flock locking %d\n", fd));
if (type == CAMEL_LOCK_READ)
- op = LOCK_SH|LOCK_NB;
+ op = LOCK_SH | LOCK_NB;
else
- op = LOCK_EX|LOCK_NB;
+ op = LOCK_EX | LOCK_NB;
if (flock (fd, op) == -1) {
g_set_error (
@@ -315,7 +315,7 @@ camel_lock_folder (const gchar *path,
while (retry < CAMEL_LOCK_RETRY) {
if (retry > 0)
- g_usleep (CAMEL_LOCK_DELAY*1000000);
+ g_usleep (CAMEL_LOCK_DELAY * 1000000);
if (camel_lock_fcntl (fd, type, error) == 0) {
if (camel_lock_flock (fd, type, error) == 0) {
@@ -339,7 +339,8 @@ camel_lock_folder (const gchar *path,
* Free a lock on a folder.
**/
void
-camel_unlock_folder (const gchar *path, gint fd)
+camel_unlock_folder (const gchar *path,
+ gint fd)
{
camel_unlock_dot (path);
camel_unlock_flock (fd);
@@ -347,7 +348,9 @@ camel_unlock_folder (const gchar *path, gint fd)
}
#if 0
-gint main (gint argc, gchar **argv)
+gint
+main (gint argc,
+ gchar **argv)
{
GError *error = NULL;
gint fd1, fd2;
diff --git a/camel/camel-mempool.c b/camel/camel-mempool.c
index 55ea53d..e1b6f2f 100644
--- a/camel/camel-mempool.c
+++ b/camel/camel-mempool.c
@@ -84,13 +84,13 @@ camel_mempool_new (gint blocksize,
switch (flags & CAMEL_MEMPOOL_ALIGN_MASK) {
case CAMEL_MEMPOOL_ALIGN_STRUCT:
default:
- pool->align = G_MEM_ALIGN-1;
+ pool->align = G_MEM_ALIGN - 1;
break;
case CAMEL_MEMPOOL_ALIGN_WORD:
- pool->align = 2-1;
+ pool->align = 2 - 1;
break;
case CAMEL_MEMPOOL_ALIGN_BYTE:
- pool->align = 1-1;
+ pool->align = 1 - 1;
}
return pool;
}
@@ -111,7 +111,7 @@ camel_mempool_alloc (CamelMemPool *pool,
register gint size)
{
size = (size + pool->align) & (~(pool->align));
- if (size>=pool->threshold) {
+ if (size >= pool->threshold) {
MemPoolThresholdNode *n;
n = g_malloc (ALIGNED_SIZEOF (*n) + size);
@@ -128,7 +128,7 @@ camel_mempool_alloc (CamelMemPool *pool,
}
/* maybe we could do some sort of the free blocks based on size, but
- it doubt its worth it at all */
+ * it doubt its worth it at all */
n = g_malloc (ALIGNED_SIZEOF (*n) + pool->blocksize);
n->next = pool->blocks;
diff --git a/camel/camel-mime-filter-basic.c b/camel/camel-mime-filter-basic.c
index 3986632..b6d7136 100644
--- a/camel/camel-mime-filter-basic.c
+++ b/camel/camel-mime-filter-basic.c
@@ -51,15 +51,15 @@ mime_filter_basic_filter (CamelMimeFilter *mime_filter,
switch (priv->type) {
case CAMEL_MIME_FILTER_BASIC_BASE64_ENC:
/* wont go to more than 2x size (overly conservative) */
- camel_mime_filter_set_size (mime_filter, len*2+6, FALSE);
+ camel_mime_filter_set_size (mime_filter, len * 2 + 6, FALSE);
newlen = g_base64_encode_step ((const guchar *) in, len, TRUE, mime_filter->outbuf, &priv->state, &priv->save);
- g_assert (newlen <= len*2+6);
+ g_assert (newlen <= len * 2 + 6);
break;
case CAMEL_MIME_FILTER_BASIC_QP_ENC:
/* *4 is overly conservative, but will do */
- camel_mime_filter_set_size (mime_filter, len*4+4, FALSE);
+ camel_mime_filter_set_size (mime_filter, len * 4 + 4, FALSE);
newlen = camel_quoted_encode_step ((guchar *) in, len, (guchar *) mime_filter->outbuf, &priv->state, (gint *) &priv->save);
- g_assert (newlen <= len*4+4);
+ g_assert (newlen <= len * 4 + 4);
break;
case CAMEL_MIME_FILTER_BASIC_UU_ENC:
/* won't go to more than 2 * (x + 2) + 62 */
@@ -69,9 +69,9 @@ mime_filter_basic_filter (CamelMimeFilter *mime_filter,
break;
case CAMEL_MIME_FILTER_BASIC_BASE64_DEC:
/* output can't possibly exceed the input size */
- camel_mime_filter_set_size (mime_filter, len+3, FALSE);
+ camel_mime_filter_set_size (mime_filter, len + 3, FALSE);
newlen = g_base64_decode_step (in, len, (guchar *) mime_filter->outbuf, &priv->state, (guint *) &priv->save);
- g_assert (newlen <= len+3);
+ g_assert (newlen <= len + 3);
break;
case CAMEL_MIME_FILTER_BASIC_QP_DEC:
/* output can't possibly exceed the input size */
@@ -156,17 +156,17 @@ mime_filter_basic_complete (CamelMimeFilter *mime_filter,
switch (priv->type) {
case CAMEL_MIME_FILTER_BASIC_BASE64_ENC:
/* wont go to more than 2x size (overly conservative) */
- camel_mime_filter_set_size (mime_filter, len*2+6, FALSE);
+ camel_mime_filter_set_size (mime_filter, len * 2 + 6, FALSE);
if (len > 0)
newlen += g_base64_encode_step ((const guchar *) in, len, TRUE, mime_filter->outbuf, &priv->state, &priv->save);
newlen += g_base64_encode_close (TRUE, mime_filter->outbuf, &priv->state, &priv->save);
- g_assert (newlen <= len*2+6);
+ g_assert (newlen <= len * 2 + 6);
break;
case CAMEL_MIME_FILTER_BASIC_QP_ENC:
/* *4 is definetly more than needed ... */
- camel_mime_filter_set_size (mime_filter, len*4+4, FALSE);
+ camel_mime_filter_set_size (mime_filter, len * 4 + 4, FALSE);
newlen = camel_quoted_encode_close ((guchar *) in, len, (guchar *) mime_filter->outbuf, &priv->state, &priv->save);
- g_assert (newlen <= len*4+4);
+ g_assert (newlen <= len * 4 + 4);
break;
case CAMEL_MIME_FILTER_BASIC_UU_ENC:
/* won't go to more than 2 * (x + 2) + 62 */
@@ -182,9 +182,9 @@ mime_filter_basic_complete (CamelMimeFilter *mime_filter,
break;
case CAMEL_MIME_FILTER_BASIC_QP_DEC:
/* output can't possibly exceed the input size, well unless its not really qp, then +2 max */
- camel_mime_filter_set_size (mime_filter, len+2, FALSE);
+ camel_mime_filter_set_size (mime_filter, len + 2, FALSE);
newlen = camel_quoted_decode_step ((guchar *) in, len, (guchar *) mime_filter->outbuf, &priv->state, (gint *) &priv->save);
- g_assert (newlen <= len+2);
+ g_assert (newlen <= len + 2);
break;
case CAMEL_MIME_FILTER_BASIC_UU_DEC:
if ((priv->state & CAMEL_UUDECODE_STATE_BEGIN) && !(priv->state & CAMEL_UUDECODE_STATE_END)) {
diff --git a/camel/camel-mime-filter-bestenc.c b/camel/camel-mime-filter-bestenc.c
index 570660c..d6c1cdf 100644
--- a/camel/camel-mime-filter-bestenc.c
+++ b/camel/camel-mime-filter-bestenc.c
@@ -72,16 +72,16 @@ mime_filter_bestenc_filter (CamelMimeFilter *mime_filter,
if (priv->flags & CAMEL_BESTENC_GET_ENCODING) {
register guint /* hopefully reg's are assinged in the order they appear? */
c,
- lastc=priv->lastc,
- countline=priv->countline,
- count0=priv->count0,
+ lastc = priv->lastc,
+ countline = priv->countline,
+ count0 = priv->count0,
count8 = priv->count8;
/* Check ^From lines first call, or have the start of a new line waiting? */
if ((priv->flags & CAMEL_BESTENC_NO_FROM) && !priv->hadfrom
&& (priv->fromcount > 0 || priv->startofline)) {
if (priv->fromcount + len >=5) {
- memcpy (&priv->fromsave[priv->fromcount], in, 5-priv->fromcount);
+ memcpy (&priv->fromsave[priv->fromcount], in, 5 - priv->fromcount);
priv->hadfrom = strncmp(priv->fromsave, "From ", 5) == 0;
priv->fromcount = 0;
} else {
@@ -95,7 +95,7 @@ mime_filter_bestenc_filter (CamelMimeFilter *mime_filter,
/* See rfc2045 section 2 for definitions of 7bit/8bit/binary */
p = (guchar *) in;
pend = p + len;
- while (p<pend) {
+ while (p < pend) {
c = *p++;
/* check for 8 bit characters */
if (c & 0x80)
@@ -120,13 +120,13 @@ mime_filter_bestenc_filter (CamelMimeFilter *mime_filter,
/* Check for "^From " lines */
if ((priv->flags & CAMEL_BESTENC_NO_FROM) && !priv->hadfrom) {
- if (pend-p >= 5) {
+ if (pend - p >= 5) {
priv->hadfrom = strncmp((gchar *) p, (gchar *) "From ", 5) == 0;
- } else if (pend-p == 0) {
+ } else if (pend - p == 0) {
priv->startofline = TRUE;
} else {
- priv->fromcount = pend-p;
- memcpy (priv->fromsave, p, pend-p);
+ priv->fromcount = pend - p;
+ memcpy (priv->fromsave, p, pend - p);
}
}
} else {
@@ -267,8 +267,8 @@ camel_mime_filter_bestenc_get_best_encoding (CamelMimeFilterBestenc *filter,
#endif
/* if we're not allowed to have From lines and we had one, use an encoding
- that will never let it show. Unfortunately only base64 can at present,
- although qp could be modified to allow it too */
+ * that will never let it show. Unfortunately only base64 can at present,
+ * although qp could be modified to allow it too */
if ((priv->flags & CAMEL_BESTENC_NO_FROM) && priv->hadfrom)
return CAMEL_TRANSFER_ENCODING_BASE64;
diff --git a/camel/camel-mime-filter-canon.c b/camel/camel-mime-filter-canon.c
index aa074f1..8da3f5c 100644
--- a/camel/camel-mime-filter-canon.c
+++ b/camel/camel-mime-filter-canon.c
@@ -58,16 +58,16 @@ mime_filter_canon_run (CamelMimeFilter *mime_filter,
/* first, work out how much space we need */
inptr = (guchar *) in;
- inend = (const guchar *) (in+len);
+ inend = (const guchar *) (in + len);
while (inptr < inend)
if (*inptr++ == '\n')
lf++;
/* worst case, extra 3 chars per line
- "From \n" -> "=46rom \r\n"
- We add 1 extra incase we're called from complete, when we didn't end in \n */
+ * "From \n" -> "=46rom \r\n"
+ * We add 1 extra incase we're called from complete, when we didn't end in \n */
- camel_mime_filter_set_size (mime_filter, len+lf*3+4, FALSE);
+ camel_mime_filter_set_size (mime_filter, len + lf * 3 + 4, FALSE);
o = mime_filter->outbuf;
inptr = (guchar *) in;
@@ -78,7 +78,7 @@ mime_filter_canon_run (CamelMimeFilter *mime_filter,
c = *inptr;
if (priv->flags & CAMEL_MIME_FILTER_CANON_FROM && c == 'F') {
inptr++;
- if (inptr < inend-4) {
+ if (inptr < inend - 4) {
if (strncmp((gchar *)inptr, "rom ", 4) == 0) {
strcpy(o, "=46rom ");
inptr+=4;
@@ -97,11 +97,11 @@ mime_filter_canon_run (CamelMimeFilter *mime_filter,
if (c == '\n') {
/* check to strip trailing space */
if (priv->flags & CAMEL_MIME_FILTER_CANON_STRIP) {
- while (o>starto && (o[-1] == ' ' || o[-1] == '\t' || o[-1]=='\r'))
+ while (o > starto && (o[-1] == ' ' || o[-1] == '\t' || o[-1]=='\r'))
o--;
}
/* check end of line canonicalisation */
- if (o>starto) {
+ if (o > starto) {
if (priv->flags & CAMEL_MIME_FILTER_CANON_CRLF) {
if (o[-1] != '\r')
*o++ = '\r';
@@ -124,7 +124,7 @@ mime_filter_canon_run (CamelMimeFilter *mime_filter,
}
/* TODO: We should probably track if we end somewhere in the middle of a line,
- otherwise we potentially backup a full line, which could be large */
+ * otherwise we potentially backup a full line, which could be large */
/* we got to the end of the data without finding anything, backup to start and re-process next time around */
if (last) {
diff --git a/camel/camel-mime-filter-charset.c b/camel/camel-mime-filter-charset.c
index de5cd30..ec5daa5 100644
--- a/camel/camel-mime-filter-charset.c
+++ b/camel/camel-mime-filter-charset.c
@@ -194,8 +194,8 @@ mime_filter_charset_filter (CamelMimeFilter *mime_filter,
if (((gint) inleft) > 0) {
/* We've either got an E2BIG or EINVAL. Save the
- remainder of the buffer as we'll process this next
- time through */
+ * remainder of the buffer as we'll process this next
+ * time through */
camel_mime_filter_backup (mime_filter, inbuf, inleft);
}
diff --git a/camel/camel-mime-filter-enriched.c b/camel/camel-mime-filter-enriched.c
index aa827eb..6edfdd0 100644
--- a/camel/camel-mime-filter-enriched.c
+++ b/camel/camel-mime-filter-enriched.c
@@ -47,7 +47,7 @@ static struct {
const gchar *enriched;
const gchar *html;
gboolean needs_param;
- EnrichedParamParser parse_param; /* parses *and* validates the input */
+ EnrichedParamParser parse_param; /* parses *and * validates the input */
} enriched_tags[] = {
{ "bold", "<b>", FALSE, NULL },
{ "/bold", "</b>", FALSE, NULL },
@@ -122,7 +122,8 @@ static const gchar *valid_colors[] = {
};
static gchar *
-param_parse_color (const gchar *inptr, gint inlen)
+param_parse_color (const gchar *inptr,
+ gint inlen)
{
const gchar *inend, *end;
guint32 rgb = 0;
@@ -167,7 +168,8 @@ param_parse_color (const gchar *inptr, gint inlen)
}
static gchar *
-param_parse_font (const gchar *fontfamily, gint inlen)
+param_parse_font (const gchar *fontfamily,
+ gint inlen)
{
register const gchar *inptr = fontfamily;
const gchar *inend = inptr + inlen;
@@ -180,7 +182,8 @@ param_parse_font (const gchar *fontfamily, gint inlen)
}
static gchar *
-param_parse_lang (const gchar *lang, gint inlen)
+param_parse_lang (const gchar *lang,
+ gint inlen)
{
register const gchar *inptr = lang;
const gchar *inend = inptr + inlen;
@@ -193,7 +196,9 @@ param_parse_lang (const gchar *lang, gint inlen)
}
static gchar *
-param_parse (const gchar *enriched, const gchar *inptr, gint inlen)
+param_parse (const gchar *enriched,
+ const gchar *inptr,
+ gint inlen)
{
gint i;
@@ -449,8 +454,8 @@ enriched_to_html (CamelMimeFilter *mime_filter,
need_input:
/* the reason we ignore @flush here is because if there isn't
- enough input to parse a tag, then there's nothing we can
- do. */
+ * enough input to parse a tag, then there's nothing we can
+ * do. */
if (inptr < inend)
camel_mime_filter_backup (mime_filter, inptr, (unsigned) (inend - inptr));
@@ -585,7 +590,8 @@ camel_mime_filter_enriched_new (guint32 flags)
* richtext version of @in.
**/
gchar *
-camel_enriched_to_html (const gchar *in, guint32 flags)
+camel_enriched_to_html (const gchar *in,
+ guint32 flags)
{
CamelMimeFilter *filter;
gsize outlen, outpre;
diff --git a/camel/camel-mime-filter-from.c b/camel/camel-mime-filter-from.c
index 6784a4e..1b4060a 100644
--- a/camel/camel-mime-filter-from.c
+++ b/camel/camel-mime-filter-from.c
@@ -54,18 +54,18 @@ mime_filter_from_filter (CamelMimeFilter *mime_filter,
const gchar *inptr, *inend;
gint left;
gint fromcount = 0;
- struct fromnode *head = NULL, *tail = (struct fromnode *)&head, *node;
+ struct fromnode *head = NULL, *tail = (struct fromnode *) &head, *node;
gchar *outptr;
priv = CAMEL_MIME_FILTER_FROM (mime_filter)->priv;
inptr = in;
- inend = inptr+len;
+ inend = inptr + len;
d(printf("Filtering '%.*s'\n", len, in));
/* first, see if we need to escape any from's */
- while (inptr<inend) {
+ while (inptr < inend) {
register gint c = -1;
if (priv->midline)
@@ -73,7 +73,7 @@ mime_filter_from_filter (CamelMimeFilter *mime_filter,
;
if (c == '\n' || !priv->midline) {
- left = inend-inptr;
+ left = inend - inptr;
if (left > 0) {
priv->midline = TRUE;
if (left < 5) {
@@ -87,7 +87,7 @@ mime_filter_from_filter (CamelMimeFilter *mime_filter,
if (!strncmp(inptr, "From ", 5)) {
fromcount++;
/* yes, we do alloc them on the stack ... at most we're going to get
- len / 7 of them anyway */
+ * len / 7 of them anyway */
node = alloca (sizeof (*node));
node->pointer = inptr;
node->next = NULL;
diff --git a/camel/camel-mime-filter-gzip.c b/camel/camel-mime-filter-gzip.c
index 7926b8f..3fb1a0b 100644
--- a/camel/camel-mime-filter-gzip.c
+++ b/camel/camel-mime-filter-gzip.c
@@ -65,15 +65,15 @@ typedef union {
guint16 xlen_nread;
guint16 crc16;
- guint8 got_hdr:1;
- guint8 is_valid:1;
- guint8 got_xlen:1;
- guint8 got_fname:1;
- guint8 got_fcomment:1;
- guint8 got_crc16:1;
+ guint8 got_hdr : 1;
+ guint8 is_valid : 1;
+ guint8 got_xlen : 1;
+ guint8 got_fname : 1;
+ guint8 got_fcomment : 1;
+ guint8 got_crc16 : 1;
} unzip;
struct {
- guint32 wrote_hdr:1;
+ guint32 wrote_hdr : 1;
} zip;
} gzip_state_t;
@@ -458,7 +458,8 @@ camel_mime_filter_gzip_init (CamelMimeFilterGZip *mime_filter)
* Returns: a new gzip (or gunzip) filter.
**/
CamelMimeFilter *
-camel_mime_filter_gzip_new (CamelMimeFilterGZipMode mode, gint level)
+camel_mime_filter_gzip_new (CamelMimeFilterGZipMode mode,
+ gint level)
{
CamelMimeFilter *new;
CamelMimeFilterGZipPrivate *priv;
diff --git a/camel/camel-mime-filter-index.c b/camel/camel-mime-filter-index.c
index 5385188..cd5f654 100644
--- a/camel/camel-mime-filter-index.c
+++ b/camel/camel-mime-filter-index.c
@@ -62,7 +62,7 @@ mime_filter_index_filter (CamelMimeFilter *mime_filter,
priv = CAMEL_MIME_FILTER_INDEX (mime_filter)->priv;
- if (priv->index == NULL || priv->name==NULL) {
+ if (priv->index == NULL || priv->name == NULL) {
goto donothing;
}
@@ -87,7 +87,7 @@ mime_filter_index_complete (CamelMimeFilter *mime_filter,
priv = CAMEL_MIME_FILTER_INDEX (mime_filter)->priv;
- if (priv->index == NULL || priv->name==NULL) {
+ if (priv->index == NULL || priv->name == NULL) {
goto donothing;
}
diff --git a/camel/camel-mime-filter-pgp.c b/camel/camel-mime-filter-pgp.c
index 521ab49..6468585 100644
--- a/camel/camel-mime-filter-pgp.c
+++ b/camel/camel-mime-filter-pgp.c
@@ -114,7 +114,7 @@ mime_filter_pgp_run (CamelMimeFilter *mime_filter,
break;
case PGP_HEADER:
/* pgp headers (Hash: SHA1, etc) end with a blank (zero-length,
- or containing only whitespace) line; see RFC2440 */
+ * or containing only whitespace) line; see RFC2440 */
if (blank)
priv->state++;
break;
diff --git a/camel/camel-mime-filter-tohtml.c b/camel/camel-mime-filter-tohtml.c
index 1db6c54..bd38d20 100644
--- a/camel/camel-mime-filter-tohtml.c
+++ b/camel/camel-mime-filter-tohtml.c
@@ -118,7 +118,8 @@ append_string_verbatim (CamelMimeFilter *mime_filter,
}
static gint
-citation_depth (const gchar *in, const gchar *inend)
+citation_depth (const gchar *in,
+ const gchar *inend)
{
register const gchar *inptr = in;
gint depth = 1;
@@ -477,7 +478,8 @@ camel_mime_filter_tohtml_init (CamelMimeFilterToHTML *filter)
* Returns: a new #CamelMimeFilterToHTML object
**/
CamelMimeFilter *
-camel_mime_filter_tohtml_new (guint32 flags, guint32 color)
+camel_mime_filter_tohtml_new (guint32 flags,
+ guint32 color)
{
CamelMimeFilter *filter;
CamelMimeFilterToHTMLPrivate *priv;
@@ -510,7 +512,9 @@ camel_mime_filter_tohtml_new (guint32 flags, guint32 color)
* of @in
**/
gchar *
-camel_text_to_html (const gchar *in, guint32 flags, guint32 color)
+camel_text_to_html (const gchar *in,
+ guint32 flags,
+ guint32 color)
{
CamelMimeFilter *filter;
gsize outlen, outpre;
diff --git a/camel/camel-mime-filter-yenc.c b/camel/camel-mime-filter-yenc.c
index 375d19e..5e2be48 100644
--- a/camel/camel-mime-filter-yenc.c
+++ b/camel/camel-mime-filter-yenc.c
@@ -89,7 +89,7 @@ mime_filter_yenc_filter (CamelMimeFilter *mime_filter,
inptr++;
priv->state |= CAMEL_MIME_YDECODE_STATE_BEGIN;
/* we can start ydecoding if the next line isn't
- a ypart... */
+ * a ypart... */
in = inptr;
len = inend - in;
} else {
@@ -111,7 +111,7 @@ mime_filter_yenc_filter (CamelMimeFilter *mime_filter,
left = inend - inptr;
if ((priv->state & CAMEL_MIME_YDECODE_STATE_BEGIN) && left > 0) {
/* we have found an '=ybegin' line but we may yet have an "=ypart" line to
- yield before decoding the content */
+ * yield before decoding the content */
if (left < 7 && !strncmp (inptr, "=ypart ", left)) {
camel_mime_filter_backup (mime_filter, inptr, left);
} else if (!strncmp (inptr, "=ypart ", 7)) {
@@ -286,7 +286,8 @@ camel_mime_filter_yenc_new (CamelMimeFilterYencDirection direction)
* Sets the current state of the yencoder/ydecoder
**/
void
-camel_mime_filter_yenc_set_state (CamelMimeFilterYenc *yenc, gint state)
+camel_mime_filter_yenc_set_state (CamelMimeFilterYenc *yenc,
+ gint state)
{
g_return_if_fail (CAMEL_IS_MIME_FILTER_YENC (yenc));
@@ -301,7 +302,8 @@ camel_mime_filter_yenc_set_state (CamelMimeFilterYenc *yenc, gint state)
* Sets the current crc32 value on the yEnc filter @yenc to @crc.
**/
void
-camel_mime_filter_yenc_set_crc (CamelMimeFilterYenc *yenc, guint32 crc)
+camel_mime_filter_yenc_set_crc (CamelMimeFilterYenc *yenc,
+ guint32 crc)
{
g_return_if_fail (CAMEL_IS_MIME_FILTER_YENC (yenc));
@@ -401,8 +403,12 @@ static const gint yenc_crc_table[256] = {
* Returns: the number of bytes decoded
**/
gsize
-camel_ydecode_step (const guchar *in, gsize inlen, guchar *out,
- gint *state, guint32 *pcrc, guint32 *crc)
+camel_ydecode_step (const guchar *in,
+ gsize inlen,
+ guchar *out,
+ gint *state,
+ guint32 *pcrc,
+ guint32 *crc)
{
register const guchar *inptr;
register guchar *outptr;
@@ -480,8 +486,12 @@ camel_ydecode_step (const guchar *in, gsize inlen, guchar *out,
* Returns: the number of bytes encoded
**/
gsize
-camel_yencode_step (const guchar *in, gsize inlen, guchar *out,
- gint *state, guint32 *pcrc, guint32 *crc)
+camel_yencode_step (const guchar *in,
+ gsize inlen,
+ guchar *out,
+ gint *state,
+ guint32 *pcrc,
+ guint32 *crc)
{
register const guchar *inptr;
register guchar *outptr;
@@ -544,8 +554,12 @@ camel_yencode_step (const guchar *in, gsize inlen, guchar *out,
* Returns: the number of bytes encoded.
**/
gsize
-camel_yencode_close (const guchar *in, gsize inlen, guchar *out,
- gint *state, guint32 *pcrc, guint32 *crc)
+camel_yencode_close (const guchar *in,
+ gsize inlen,
+ guchar *out,
+ gint *state,
+ guint32 *pcrc,
+ guint32 *crc)
{
register guchar *outptr;
diff --git a/camel/camel-mime-filter.c b/camel/camel-mime-filter.c
index b912ade..93cd464 100644
--- a/camel/camel-mime-filter.c
+++ b/camel/camel-mime-filter.c
@@ -141,8 +141,8 @@ static void filter_run (CamelMimeFilter *f,
checkmem (f->backbuf);
#endif
/*
- here we take a performance hit, if the input buffer doesn't
- have the pre-space required. We make a buffer that does ...
+ * here we take a performance hit, if the input buffer doesn't
+ * have the pre-space required. We make a buffer that does ...
*/
if (f->backlen > 0) {
struct _CamelMimeFilterPrivate *p;
@@ -154,8 +154,8 @@ static void filter_run (CamelMimeFilter *f,
if (p->inlen < newlen) {
/* NOTE: g_realloc copies data, we dont need that (slower) */
g_free (p->inbuf);
- p->inbuf = g_malloc (newlen+PRE_HEAD);
- p->inlen = newlen+PRE_HEAD;
+ p->inbuf = g_malloc (newlen + PRE_HEAD);
+ p->inlen = newlen + PRE_HEAD;
}
/* copy to end of structure */
@@ -292,13 +292,15 @@ camel_mime_filter_reset (CamelMimeFilter *filter)
* Note: New calls replace old data.
**/
void
-camel_mime_filter_backup (CamelMimeFilter *filter, const gchar *data, gsize length)
+camel_mime_filter_backup (CamelMimeFilter *filter,
+ const gchar *data,
+ gsize length)
{
if (filter->backsize < length) {
/* g_realloc copies data, unnecessary overhead */
g_free (filter->backbuf);
- filter->backbuf = g_malloc (length+BACK_HEAD);
- filter->backsize = length+BACK_HEAD;
+ filter->backbuf = g_malloc (length + BACK_HEAD);
+ filter->backsize = length + BACK_HEAD;
}
filter->backlen = length;
memcpy (filter->backbuf, data, length);
@@ -314,21 +316,23 @@ camel_mime_filter_backup (CamelMimeFilter *filter, const gchar *data, gsize leng
* for filter output.
**/
void
-camel_mime_filter_set_size (CamelMimeFilter *filter, gsize size, gint keep)
+camel_mime_filter_set_size (CamelMimeFilter *filter,
+ gsize size,
+ gint keep)
{
if (filter->outsize < size) {
gint offset = filter->outptr - filter->outreal;
if (keep) {
- filter->outreal = g_realloc (filter->outreal, size + PRE_HEAD*4);
+ filter->outreal = g_realloc (filter->outreal, size + PRE_HEAD * 4);
} else {
g_free (filter->outreal);
- filter->outreal = g_malloc (size + PRE_HEAD*4);
+ filter->outreal = g_malloc (size + PRE_HEAD * 4);
}
filter->outptr = filter->outreal + offset;
- filter->outbuf = filter->outreal + PRE_HEAD*4;
+ filter->outbuf = filter->outreal + PRE_HEAD * 4;
filter->outsize = size;
/* this could be offset from the end of the structure, but
- this should be good enough */
- filter->outpre = PRE_HEAD*4;
+ * this should be good enough */
+ filter->outpre = PRE_HEAD * 4;
}
}
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
index 82fa7f4..2cf3f7d 100644
--- a/camel/camel-mime-message.c
+++ b/camel/camel-mime-message.c
@@ -175,7 +175,9 @@ process_header (CamelMedium *medium,
}
static void
-unref_recipient (gpointer key, gpointer value, gpointer user_data)
+unref_recipient (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
g_object_unref (value);
}
@@ -419,7 +421,9 @@ camel_mime_message_new (void)
* Set the date on a message.
**/
void
-camel_mime_message_set_date (CamelMimeMessage *message, time_t date, gint offset)
+camel_mime_message_set_date (CamelMimeMessage *message,
+ time_t date,
+ gint offset)
{
gchar *datestr;
@@ -431,7 +435,7 @@ camel_mime_message_set_date (CamelMimeMessage *message, time_t date, gint offse
date = time (NULL);
e_localtime_with_offset (date, &local, &tz);
- offset = (((tz/60/60) * 100) + (tz/60 % 60));
+ offset = (((tz / 60 / 60) * 100) + (tz / 60 % 60));
}
message->date = date;
message->date_offset = offset;
@@ -451,7 +455,8 @@ camel_mime_message_set_date (CamelMimeMessage *message, time_t date, gint offse
* Returns: the date of the message
**/
time_t
-camel_mime_message_get_date (CamelMimeMessage *msg, gint *offset)
+camel_mime_message_get_date (CamelMimeMessage *msg,
+ gint *offset)
{
if (offset)
*offset = msg->date_offset;
@@ -469,7 +474,8 @@ camel_mime_message_get_date (CamelMimeMessage *msg, gint *offset)
* Returns: the received date of the message
**/
time_t
-camel_mime_message_get_date_received (CamelMimeMessage *msg, gint *offset)
+camel_mime_message_get_date_received (CamelMimeMessage *msg,
+ gint *offset)
{
if (msg->date_received == CAMEL_MESSAGE_DATE_CURRENT) {
const gchar *received;
@@ -497,7 +503,8 @@ camel_mime_message_get_date_received (CamelMimeMessage *msg, gint *offset)
* Set the message-id on a message.
**/
void
-camel_mime_message_set_message_id (CamelMimeMessage *mime_message, const gchar *message_id)
+camel_mime_message_set_message_id (CamelMimeMessage *mime_message,
+ const gchar *message_id)
{
gchar *id;
@@ -543,7 +550,8 @@ camel_mime_message_get_message_id (CamelMimeMessage *mime_message)
* Set the Reply-To of a message.
**/
void
-camel_mime_message_set_reply_to (CamelMimeMessage *msg, CamelInternetAddress *reply_to)
+camel_mime_message_set_reply_to (CamelMimeMessage *msg,
+ CamelInternetAddress *reply_to)
{
gchar *addr;
@@ -593,7 +601,8 @@ camel_mime_message_get_reply_to (CamelMimeMessage *mime_message)
* Set the subject text of a message.
**/
void
-camel_mime_message_set_subject (CamelMimeMessage *message, const gchar *subject)
+camel_mime_message_set_subject (CamelMimeMessage *message,
+ const gchar *subject)
{
gchar *text;
@@ -632,8 +641,8 @@ camel_mime_message_get_subject (CamelMimeMessage *mime_message)
/* *** From: */
/* Thought: Since get_from/set_from are so rarely called, it is probably not useful
- to cache the from (and reply_to) addresses as InternetAddresses internally, we
- could just get it from the headers and reprocess every time. */
+ * to cache the from (and reply_to) addresses as InternetAddresses internally, we
+ * could just get it from the headers and reprocess every time. */
/**
* camel_mime_message_set_from:
@@ -643,7 +652,8 @@ camel_mime_message_get_subject (CamelMimeMessage *mime_message)
* Set the from address of a message.
**/
void
-camel_mime_message_set_from (CamelMimeMessage *msg, CamelInternetAddress *from)
+camel_mime_message_set_from (CamelMimeMessage *msg,
+ CamelInternetAddress *from)
{
gchar *addr;
@@ -694,7 +704,9 @@ camel_mime_message_get_from (CamelMimeMessage *mime_message)
* Set the recipients of a message.
**/
void
-camel_mime_message_set_recipients (CamelMimeMessage *mime_message, const gchar *type, CamelInternetAddress *r)
+camel_mime_message_set_recipients (CamelMimeMessage *mime_message,
+ const gchar *type,
+ CamelInternetAddress *r)
{
gchar *text;
CamelInternetAddress *addr;
@@ -732,7 +744,8 @@ camel_mime_message_set_recipients (CamelMimeMessage *mime_message, const gchar *
* Returns: the requested recipients
**/
CamelInternetAddress *
-camel_mime_message_get_recipients (CamelMimeMessage *mime_message, const gchar *type)
+camel_mime_message_get_recipients (CamelMimeMessage *mime_message,
+ const gchar *type)
{
g_assert (mime_message);
@@ -789,7 +802,10 @@ camel_mime_message_get_source (CamelMimeMessage *mime_message)
typedef gboolean (*CamelPartFunc)(CamelMimeMessage *, CamelMimePart *, gpointer data);
static gboolean
-message_foreach_part_rec (CamelMimeMessage *msg, CamelMimePart *part, CamelPartFunc callback, gpointer data)
+message_foreach_part_rec (CamelMimeMessage *msg,
+ CamelMimePart *part,
+ CamelPartFunc callback,
+ gpointer data)
{
CamelDataWrapper *containee;
gint parts, i;
@@ -821,13 +837,17 @@ message_foreach_part_rec (CamelMimeMessage *msg, CamelMimePart *part, CamelPartF
/* dont make this public yet, it might need some more thinking ... */
/* MPZ */
static void
-camel_mime_message_foreach_part (CamelMimeMessage *msg, CamelPartFunc callback, gpointer data)
+camel_mime_message_foreach_part (CamelMimeMessage *msg,
+ CamelPartFunc callback,
+ gpointer data)
{
message_foreach_part_rec (msg, (CamelMimePart *) msg, callback, data);
}
static gboolean
-check_8bit (CamelMimeMessage *msg, CamelMimePart *part, gpointer data)
+check_8bit (CamelMimeMessage *msg,
+ CamelMimePart *part,
+ gpointer data)
{
CamelTransferEncoding encoding;
gint *has8bit = data;
@@ -878,15 +898,15 @@ find_best_encoding (CamelMimePart *part,
gboolean istext;
/* we use all these weird stream things so we can do it with streams, and
- not have to read the whole lot into memory - although i have a feeling
- it would make things a fair bit simpler to do so ... */
+ * not have to read the whole lot into memory - although i have a feeling
+ * it would make things a fair bit simpler to do so ... */
d(printf("starting to check part\n"));
content = camel_medium_get_content ((CamelMedium *) part);
if (content == NULL) {
/* charset might not be right here, but it'll get the right stuff
- if it is ever set */
+ * if it is ever set */
*charsetp = NULL;
return CAMEL_TRANSFER_ENCODING_DEFAULT;
}
@@ -947,8 +967,8 @@ find_best_encoding (CamelMimePart *part,
d(printf("have charset, trying conversion/etc\n"));
/* now that 'bestenc' has told us what the best encoding is, we can use that to create
- a charset conversion filter as well, and then re-add the bestenc to filter the
- result to find the best encoding to use as well */
+ * a charset conversion filter as well, and then re-add the bestenc to filter the
+ * result to find the best encoding to use as well */
charenc = camel_mime_filter_charset_new (charsetin, charset);
if (charenc != NULL) {
@@ -996,7 +1016,9 @@ struct _enc_data {
};
static gboolean
-best_encoding (CamelMimeMessage *msg, CamelMimePart *part, gpointer datap)
+best_encoding (CamelMimeMessage *msg,
+ CamelMimePart *part,
+ gpointer datap)
{
struct _enc_data *data = datap;
CamelTransferEncoding encoding;
@@ -1011,7 +1033,7 @@ best_encoding (CamelMimeMessage *msg, CamelMimePart *part, gpointer datap)
if (!CAMEL_IS_MULTIPART (wrapper) && !CAMEL_IS_MIME_MESSAGE (wrapper)) {
encoding = find_best_encoding (part, data->required, data->enctype, &charset);
/* we always set the encoding, if we got this far. GET_CHARSET implies
- also GET_ENCODING */
+ * also GET_ENCODING */
camel_mime_part_set_encoding (part, encoding);
if ((data->required & CAMEL_BESTENC_GET_CHARSET) != 0) {
@@ -1058,7 +1080,7 @@ camel_mime_message_set_best_encoding (CamelMimeMessage *msg,
{
struct _enc_data data;
- if ((required & (CAMEL_BESTENC_GET_ENCODING|CAMEL_BESTENC_GET_CHARSET)) == 0)
+ if ((required & (CAMEL_BESTENC_GET_ENCODING | CAMEL_BESTENC_GET_CHARSET)) == 0)
return;
data.required = required;
@@ -1085,7 +1107,9 @@ struct _check_content_id {
};
static gboolean
-check_content_id (CamelMimeMessage *message, CamelMimePart *part, gpointer data)
+check_content_id (CamelMimeMessage *message,
+ CamelMimePart *part,
+ gpointer data)
{
struct _check_content_id *check = (struct _check_content_id *) data;
const gchar *content_id;
@@ -1110,7 +1134,8 @@ check_content_id (CamelMimeMessage *message, CamelMimePart *part, gpointer data)
* Returns: the MIME part with the requested id or %NULL if not found
**/
CamelMimePart *
-camel_mime_message_get_part_by_content_id (CamelMimeMessage *message, const gchar *id)
+camel_mime_message_get_part_by_content_id (CamelMimeMessage *message,
+ const gchar *id)
{
struct _check_content_id check;
@@ -1201,7 +1226,9 @@ camel_mime_message_build_mbox_from (CamelMimeMessage *message)
}
static gboolean
-find_attachment (CamelMimeMessage *msg, CamelMimePart *part, gpointer data)
+find_attachment (CamelMimeMessage *msg,
+ CamelMimePart *part,
+ gpointer data)
{
const CamelContentDisposition *cd;
gboolean *found = (gboolean *) data;
@@ -1245,14 +1272,17 @@ camel_mime_message_has_attachment (CamelMimeMessage *message)
}
static void
-cmm_dump_rec (CamelMimeMessage *msg, CamelMimePart *part, gint body, gint depth)
+cmm_dump_rec (CamelMimeMessage *msg,
+ CamelMimePart *part,
+ gint body,
+ gint depth)
{
CamelDataWrapper *containee;
gint parts, i;
gint go = TRUE;
gchar *s;
- s = alloca (depth+1);
+ s = alloca (depth + 1);
memset (s, ' ', depth);
s[depth] = 0;
/* yes this leaks, so what its only debug stuff */
@@ -1273,10 +1303,10 @@ cmm_dump_rec (CamelMimeMessage *msg, CamelMimePart *part, gint body, gint depth)
for (i = 0; go && i < parts; i++) {
CamelMimePart *mpart = camel_multipart_get_part ((CamelMultipart *) containee, i);
- cmm_dump_rec (msg, mpart, body, depth+2);
+ cmm_dump_rec (msg, mpart, body, depth + 2);
}
} else if (CAMEL_IS_MIME_MESSAGE (containee)) {
- cmm_dump_rec (msg, (CamelMimePart *) containee, body, depth+2);
+ cmm_dump_rec (msg, (CamelMimePart *) containee, body, depth + 2);
}
}
@@ -1290,7 +1320,8 @@ cmm_dump_rec (CamelMimeMessage *msg, CamelMimePart *part, gint body, gint depth)
* If body is TRUE, then dump body content of the message as well (currently unimplemented).
**/
void
-camel_mime_message_dump (CamelMimeMessage *msg, gint body)
+camel_mime_message_dump (CamelMimeMessage *msg,
+ gint body)
{
cmm_dump_rec (msg, (CamelMimePart *) msg, body, 0);
}
diff --git a/camel/camel-mime-parser.c b/camel/camel-mime-parser.c
index b93b215..655c39d 100644
--- a/camel/camel-mime-parser.c
+++ b/camel/camel-mime-parser.c
@@ -22,8 +22,8 @@
/* What should hopefully be a fast mail parser */
/* Do not change this code without asking me (Michael Zucchi) first
-
- There is almost always a reason something was done a certain way.
+ *
+ * There is almost always a reason something was done a certain way.
*/
#include <errno.h>
@@ -79,7 +79,7 @@ struct _header_scan_state {
gint ioerrno; /* io error state */
/* for scanning input buffers */
- gchar *realbuf; /* the real buffer, SCAN_HEAD*2 + SCAN_BUF bytes */
+ gchar *realbuf; /* the real buffer, SCAN_HEAD *2 + SCAN_BUF bytes */
gchar *inbuf; /* points to a subset of the allocated memory, the underflow */
gchar *inptr; /* (upto SCAN_HEAD) is for use by filters so they dont copy all data */
gchar *inend;
@@ -244,7 +244,8 @@ camel_mime_parser_new (void)
* Since: 2.22
**/
gint
-camel_mime_parser_filter_add (CamelMimeParser *m, CamelMimeFilter *mf)
+camel_mime_parser_filter_add (CamelMimeParser *m,
+ CamelMimeFilter *mf)
{
struct _header_scan_state *s = _PRIVATE (m);
struct _header_scan_filter *f, *new;
@@ -258,7 +259,7 @@ camel_mime_parser_filter_add (CamelMimeParser *m, CamelMimeFilter *mf)
g_object_ref (G_OBJECT (mf));
/* yes, this is correct, since 'next' is the first element of the struct */
- f = (struct _header_scan_filter *)&s->filters;
+ f = (struct _header_scan_filter *) &s->filters;
while (f->next)
f = f->next;
f->next = new;
@@ -276,12 +277,13 @@ camel_mime_parser_filter_add (CamelMimeParser *m, CamelMimeFilter *mf)
* Since: 2.22
**/
void
-camel_mime_parser_filter_remove (CamelMimeParser *m, gint id)
+camel_mime_parser_filter_remove (CamelMimeParser *m,
+ gint id)
{
struct _header_scan_state *s = _PRIVATE (m);
struct _header_scan_filter *f, *old;
- f = (struct _header_scan_filter *)&s->filters;
+ f = (struct _header_scan_filter *) &s->filters;
while (f && f->next) {
old = f->next;
if (old->id == id) {
@@ -289,7 +291,7 @@ camel_mime_parser_filter_remove (CamelMimeParser *m, gint id)
f->next = old->next;
g_free (old);
/* there should only be a single matching id, but
- scan the whole lot anyway */
+ * scan the whole lot anyway */
}
f = f->next;
}
@@ -308,7 +310,9 @@ camel_mime_parser_filter_remove (CamelMimeParser *m, gint id)
* defined.
**/
const gchar *
-camel_mime_parser_header (CamelMimeParser *m, const gchar *name, gint *offset)
+camel_mime_parser_header (CamelMimeParser *m,
+ const gchar *name,
+ gint *offset)
{
struct _header_scan_state *s = _PRIVATE (m);
@@ -347,7 +351,7 @@ byte_array_to_string (GByteArray *array)
if (array == NULL)
return NULL;
- if (array->len == 0 || array->data[array->len-1] != '\0')
+ if (array->len == 0 || array->data[array->len - 1] != '\0')
g_byte_array_append(array, (guint8 *) "", 1);
return (const gchar *) array->data;
@@ -437,7 +441,8 @@ camel_mime_parser_from_line (CamelMimeParser *m)
* Returns: Returns -1 on error.
**/
gint
-camel_mime_parser_init_with_fd (CamelMimeParser *m, gint fd)
+camel_mime_parser_init_with_fd (CamelMimeParser *m,
+ gint fd)
{
struct _header_scan_state *s = _PRIVATE (m);
@@ -484,7 +489,8 @@ camel_mime_parser_init_with_stream (CamelMimeParser *parser,
* scan_pre_from().
**/
void
-camel_mime_parser_scan_from (CamelMimeParser *parser, gboolean scan_from)
+camel_mime_parser_scan_from (CamelMimeParser *parser,
+ gboolean scan_from)
{
struct _header_scan_state *s = _PRIVATE (parser);
@@ -501,7 +507,8 @@ camel_mime_parser_scan_from (CamelMimeParser *parser, gboolean scan_from)
* state CAMEL_MIME_PARSER_STATE_PRE_FROM which returns the specified data.
**/
void
-camel_mime_parser_scan_pre_from (CamelMimeParser *parser, gboolean scan_pre_from)
+camel_mime_parser_scan_pre_from (CamelMimeParser *parser,
+ gboolean scan_pre_from)
{
struct _header_scan_state *s = _PRIVATE (parser);
@@ -524,7 +531,7 @@ camel_mime_parser_content_type (CamelMimeParser *parser)
struct _header_scan_state *s = _PRIVATE (parser);
/* FIXME: should this search up until it's found the 'right'
- content-type? can it? */
+ * content-type? can it? */
if (s->parts)
return s->parts->content_type;
@@ -596,7 +603,9 @@ camel_mime_parser_drop_step (CamelMimeParser *parser)
* is returned.
**/
camel_mime_parser_state_t
-camel_mime_parser_step (CamelMimeParser *parser, gchar **databuffer, gsize *datalength)
+camel_mime_parser_step (CamelMimeParser *parser,
+ gchar **databuffer,
+ gsize *datalength)
{
struct _header_scan_state *s = _PRIVATE (parser);
@@ -793,7 +802,9 @@ camel_mime_parser_tell_start_boundary (CamelMimeParser *parser)
* Since: 2.22
**/
goffset
-camel_mime_parser_seek (CamelMimeParser *parser, goffset offset, gint whence)
+camel_mime_parser_seek (CamelMimeParser *parser,
+ goffset offset,
+ gint whence)
{
struct _header_scan_state *s = _PRIVATE (parser);
@@ -826,15 +837,17 @@ camel_mime_parser_state (CamelMimeParser *parser)
* without headers.
**/
void
-camel_mime_parser_push_state (CamelMimeParser *mp, camel_mime_parser_state_t newstate, const gchar *boundary)
+camel_mime_parser_push_state (CamelMimeParser *mp,
+ camel_mime_parser_state_t newstate,
+ const gchar *boundary)
{
struct _header_scan_stack *h;
struct _header_scan_state *s = _PRIVATE (mp);
h = g_malloc0 (sizeof (*h));
- h->boundarylen = strlen (boundary)+2;
- h->boundarylenfinal = h->boundarylen+2;
- h->boundary = g_malloc (h->boundarylen+3);
+ h->boundarylen = strlen (boundary) + 2;
+ h->boundarylenfinal = h->boundarylen + 2;
+ h->boundary = g_malloc (h->boundarylen + 3);
sprintf(h->boundary, "--%s--", boundary);
folder_push_part (s, h);
s->state = newstate;
@@ -903,36 +916,36 @@ folder_read (struct _header_scan_state *s)
gint len;
gint inoffset;
- if (s->inptr<s->inend-s->atleast || s->eof)
- return s->inend-s->inptr;
+ if (s->inptr < s->inend - s->atleast || s->eof)
+ return s->inend - s->inptr;
#ifdef PURIFY
purify_watch_remove (inend_id);
purify_watch_remove (inbuffer_id);
#endif
/* check for any remaning bytes (under the atleast limit( */
inoffset = s->inend - s->inptr;
- if (inoffset>0) {
+ if (inoffset > 0) {
memmove (s->inbuf, s->inptr, inoffset);
}
if (s->stream) {
len = camel_stream_read (
- s->stream, s->inbuf+inoffset, SCAN_BUF-inoffset, NULL, NULL);
+ s->stream, s->inbuf + inoffset, SCAN_BUF - inoffset, NULL, NULL);
} else {
- len = read (s->fd, s->inbuf+inoffset, SCAN_BUF-inoffset);
+ len = read (s->fd, s->inbuf + inoffset, SCAN_BUF - inoffset);
}
r(printf("read %d bytes, offset = %d\n", len, inoffset));
- if (len>=0) {
+ if (len >= 0) {
/* add on the last read block */
s->seek += s->inptr - s->inbuf;
s->inptr = s->inbuf;
- s->inend = s->inbuf+len+inoffset;
+ s->inend = s->inbuf + len + inoffset;
s->eof = (len == 0);
r(printf("content = %d '%.*s'\n",s->inend - s->inptr, s->inend - s->inptr, s->inptr));
} else {
- s->ioerrno = errno?errno:EIO;
+ s->ioerrno = errno ? errno : EIO;
}
- g_assert (s->inptr<=s->inend);
+ g_assert (s->inptr <= s->inend);
#ifdef PURIFY
inend_id = purify_watch (&s->inend);
inbuffer_id = purify_watch_n(s->inend+1, SCAN_HEAD-1, "rw");
@@ -940,7 +953,7 @@ folder_read (struct _header_scan_state *s)
r(printf("content = %d '%.*s'\n", s->inend - s->inptr, s->inend - s->inptr, s->inptr));
/* set a sentinal, for the inner loops to check against */
s->inend[0] = '\n';
- return s->inend-s->inptr;
+ return s->inend - s->inptr;
}
/* return the current absolute position of the data pointer */
@@ -951,18 +964,20 @@ folder_tell (struct _header_scan_state *s)
}
/*
- need some way to prime the parser state, so this actually works for
- other than top-level messages
-*/
+ * need some way to prime the parser state, so this actually works for
+ * other than top-level messages
+ */
static goffset
-folder_seek (struct _header_scan_state *s, goffset offset, gint whence)
+folder_seek (struct _header_scan_state *s,
+ goffset offset,
+ gint whence)
{
goffset newoffset;
if (s->stream) {
if (G_IS_SEEKABLE (s->stream)) {
/* NOTE: assumes whence seekable stream == whence libc, which is probably
- the case (or bloody well should've been) */
+ * the case (or bloody well should've been) */
g_seekable_seek (
G_SEEKABLE (s->stream),
offset, whence, NULL, NULL);
@@ -984,7 +999,7 @@ folder_seek (struct _header_scan_state *s, goffset offset, gint whence)
s->inend = s->inbuf;
s->eof = FALSE;
} else {
- s->ioerrno = errno?errno:EIO;
+ s->ioerrno = errno ? errno : EIO;
}
#ifdef PURIFY
inend_id = purify_watch (&s->inend);
@@ -994,7 +1009,8 @@ folder_seek (struct _header_scan_state *s, goffset offset, gint whence)
}
static void
-folder_push_part (struct _header_scan_state *s, struct _header_scan_stack *h)
+folder_push_part (struct _header_scan_state *s,
+ struct _header_scan_stack *h)
{
if (s->parts && s->parts->atleast > h->boundarylenfinal)
h->atleast = s->parts->atleast;
@@ -1033,7 +1049,8 @@ folder_pull_part (struct _header_scan_state *s)
}
static gint
-folder_scan_skip_line (struct _header_scan_state *s, GByteArray *save)
+folder_scan_skip_line (struct _header_scan_state *s,
+ GByteArray *save)
{
gint atleast = s->atleast;
register gchar *inptr, *inend, c;
@@ -1048,18 +1065,18 @@ folder_scan_skip_line (struct _header_scan_state *s, GByteArray *save)
inend = s->inend;
c = -1;
- while (inptr<inend
- && (c = *inptr++)!='\n') {
+ while (inptr < inend
+ && (c = *inptr++) != '\n') {
d(printf("(%2x,%c)", c, isprint(c)?c:'.'));
;
}
if (save)
- g_byte_array_append (save, (guint8 *) s->inptr, inptr-s->inptr);
+ g_byte_array_append (save, (guint8 *) s->inptr, inptr - s->inptr);
s->inptr = inptr;
- if (c=='\n') {
+ if (c == '\n') {
s->atleast = atleast;
return 0;
}
@@ -1074,7 +1091,9 @@ folder_scan_skip_line (struct _header_scan_state *s, GByteArray *save)
/* TODO: Is there any way to make this run faster? It gets called a lot ... */
static struct _header_scan_stack *
-folder_boundary_check (struct _header_scan_state *s, const gchar *boundary, gint *lastone)
+folder_boundary_check (struct _header_scan_state *s,
+ const gchar *boundary,
+ gint *lastone)
{
struct _header_scan_stack *part;
gint len = s->inend - boundary; /* make sure we dont access past the buffer */
@@ -1086,14 +1105,14 @@ folder_boundary_check (struct _header_scan_state *s, const gchar *boundary, gint
h(printf(" against: '%.*s'\n", part->boundarylen, boundary));
if (part->boundary
&& part->boundarylen <= len
- && memcmp (boundary, part->boundary, part->boundarylen)==0) {
+ && memcmp (boundary, part->boundary, part->boundarylen) == 0) {
h(printf("matched boundary: %s\n", part->boundary));
/* again, make sure we're in range */
if (part->boundarylenfinal <= len) {
gint extra = part->boundarylenfinal - part->boundarylen;
/* check the extra stuff on an final boundary, normally -- for mime parts */
- if (extra>0) {
+ if (extra > 0) {
*lastone = memcmp(&boundary[part->boundarylen],
&part->boundary[part->boundarylen],
extra) == 0;
@@ -1115,7 +1134,10 @@ folder_boundary_check (struct _header_scan_state *s, const gchar *boundary, gint
#ifdef MEMPOOL
static void
-header_append_mempool (struct _header_scan_state *s, struct _header_scan_stack *h, gchar *header, gint offset)
+header_append_mempool (struct _header_scan_state *s,
+ struct _header_scan_stack *h,
+ gchar *header,
+ gint offset)
{
struct _camel_header_raw *l, *n;
gchar *content;
@@ -1126,21 +1148,21 @@ header_append_mempool (struct _header_scan_state *s, struct _header_scan_stack *
n = camel_mempool_alloc (h->pool, sizeof (*n));
n->next = NULL;
- len = content-header;
- n->name = camel_mempool_alloc (h->pool, len+1);
+ len = content - header;
+ n->name = camel_mempool_alloc (h->pool, len + 1);
memcpy (n->name, header, len);
n->name[len] = 0;
content++;
len = s->outptr - content;
- n->value = camel_mempool_alloc (h->pool, len+1);
+ n->value = camel_mempool_alloc (h->pool, len + 1);
memcpy (n->value, content, len);
n->value[len] = 0;
n->offset = offset;
- l = (struct _camel_header_raw *)&h->headers;
+ l = (struct _camel_header_raw *) &h->headers;
while (l->next) {
l = l->next;
}
@@ -1154,13 +1176,13 @@ header_append_mempool (struct _header_scan_state *s, struct _header_scan_stack *
#endif
/* Copy the string start->inptr into the header buffer (s->outbuf),
- grow if necessary
- remove trailing \r chars (\n's assumed already removed)
- and track the start offset of the header */
+ * grow if necessary
+ * remove trailing \r chars (\n's assumed already removed)
+ * and track the start offset of the header */
/* Basically an optimised version of g_byte_array_append() */
#define header_append(s, start, inptr) \
{ \
- register gint headerlen = inptr-start; \
+ register gint headerlen = inptr - start; \
\
if (headerlen > 0) { \
if (headerlen >= (s->outend - s->outptr)) { \
@@ -1171,17 +1193,18 @@ header_append_mempool (struct _header_scan_state *s, struct _header_scan_stack *
s->outbuf = outnew; \
s->outend = outnew + olen; \
} \
- if (start[headerlen-1] == '\r') \
+ if (start[headerlen - 1] == '\r') \
headerlen--; \
memcpy (s->outptr, start, headerlen); \
s->outptr += headerlen; \
} \
if (s->header_start == -1) \
- s->header_start = (start-s->inbuf) + s->seek; \
+ s->header_start = (start - s->inbuf) + s->seek; \
}
static struct _header_scan_stack *
-folder_scan_header (struct _header_scan_state *s, gint *lastone)
+folder_scan_header (struct _header_scan_state *s,
+ gint *lastone)
{
gint atleast = s->atleast, newatleast;
gchar *start = NULL;
@@ -1210,13 +1233,13 @@ folder_scan_header (struct _header_scan_state *s, gint *lastone)
while ((len = folder_read (s))>0 && len >= s->atleast) { /* ensure we have at least enough room here */
inptr = s->inptr;
- inend = s->inend-s->atleast+1;
+ inend = s->inend - s->atleast + 1;
- while (inptr<inend) {
+ while (inptr < inend) {
start = inptr;
if (!s->midline) {
if (folder_boundary_check (s, inptr, lastone)) {
- if ((s->outptr>s->outbuf))
+ if ((s->outptr > s->outbuf))
goto header_truncated; /* may not actually be truncated */
goto header_done;
@@ -1224,10 +1247,10 @@ folder_scan_header (struct _header_scan_state *s, gint *lastone)
}
/* goto next line/sentinal */
- while ((*inptr++)!='\n')
+ while ((*inptr++) != '\n')
;
- g_assert (inptr<=s->inend+1);
+ g_assert (inptr <= s->inend + 1);
/* check for sentinal or real end of line */
if (inptr > inend) {
@@ -1240,7 +1263,7 @@ folder_scan_header (struct _header_scan_state *s, gint *lastone)
h(printf("got line part: '%.*s'\n", inptr-1-start, start));
/* got a line, strip and add it, process it */
s->midline = FALSE;
- header_append (s, start, inptr-1);
+ header_append (s, start, inptr - 1);
/* check for end of headers */
if (s->outbuf == s->outptr)
@@ -1251,14 +1274,14 @@ folder_scan_header (struct _header_scan_state *s, gint *lastone)
h(printf("continuation\n"));
#ifdef PRESERVE_HEADERS
- if (inptr-1 >= start) {
- start=inptr-1;
+ if (inptr - 1 >= start) {
+ start = inptr - 1;
header_append (s, start, inptr);
}
#endif
#ifndef PRESERVE_HEADERS
/* TODO: this wont catch multiple space continuation across a read boundary, but
- that is assumed rare, and not fatal anyway */
+ * that is assumed rare, and not fatal anyway */
do
inptr++;
while (*inptr == ' ' || *inptr == '\t');
@@ -1315,7 +1338,10 @@ header_done:
}
static struct _header_scan_stack *
-folder_scan_content (struct _header_scan_state *s, gint *lastone, gchar **data, gsize *length)
+folder_scan_content (struct _header_scan_state *s,
+ gint *lastone,
+ gchar **data,
+ gsize *length)
{
gint atleast = s->atleast, newatleast;
register gchar *inptr;
@@ -1344,19 +1370,19 @@ folder_scan_content (struct _header_scan_state *s, gint *lastone, gchar **data,
if (s->eof)
inend = s->inend;
else
- inend = s->inend-s->atleast+1;
+ inend = s->inend - s->atleast + 1;
start = inptr;
c(printf("inptr = %p, inend = %p\n", inptr, inend));
- while (inptr<inend) {
+ while (inptr < inend) {
if (!s->midline
&& (part = folder_boundary_check (s, inptr, lastone))) {
onboundary = TRUE;
/* since we truncate the boundary data, we need at least 1 gchar here spare,
- to remain in the same state */
- if ( (inptr-start) > 1)
+ * to remain in the same state */
+ if ( (inptr - start) > 1)
goto content;
/* otherwise, jump to the state of the boundary we actually found */
@@ -1364,7 +1390,7 @@ folder_scan_content (struct _header_scan_state *s, gint *lastone, gchar **data,
}
/* goto the next line */
- while ((*inptr++)!='\n')
+ while ((*inptr++) != '\n')
;
/* check the sentinal, if we went past the atleast limit, and reset it to there */
@@ -1410,7 +1436,7 @@ normal_exit:
*data = start;
/* if we hit a boundary, we should not include the closing \n */
- if (onboundary && (inptr-start)>0)
+ if (onboundary && (inptr - start) > 0)
*length = inptr-start-1;
else
*length = inptr-start;
@@ -1448,9 +1474,9 @@ folder_scan_init (void)
s->outbuf = g_malloc (1024);
s->outptr = s->outbuf;
- s->outend = s->outbuf+1024;
+ s->outend = s->outbuf + 1024;
- s->realbuf = g_malloc0 (SCAN_BUF + SCAN_HEAD*2);
+ s->realbuf = g_malloc0 (SCAN_BUF + SCAN_HEAD * 2);
s->inbuf = s->realbuf + SCAN_HEAD;
s->inptr = s->inbuf;
s->inend = s->inbuf;
@@ -1509,7 +1535,8 @@ folder_scan_reset (struct _header_scan_state *s)
}
static gint
-folder_scan_init_with_fd (struct _header_scan_state *s, gint fd)
+folder_scan_init_with_fd (struct _header_scan_state *s,
+ gint fd)
{
folder_scan_reset (s);
s->fd = fd;
@@ -1531,7 +1558,9 @@ folder_scan_init_with_stream (struct _header_scan_state *s,
#define USE_FROM
static void
-folder_scan_step (struct _header_scan_state *s, gchar **databuffer, gsize *datalength)
+folder_scan_step (struct _header_scan_state *s,
+ gchar **databuffer,
+ gsize *datalength)
{
struct _header_scan_stack *h, *hb;
const gchar *content;
@@ -1587,9 +1616,9 @@ tail_recurse:
d(printf("got pre-from content %d bytes\n", *datalength));
return;
}
- } while (hb==h && *datalength>0);
+ } while (hb == h && *datalength > 0);
- if (*datalength==0 && hb==h) {
+ if (*datalength == 0 && hb == h) {
d(printf("found 'From '\n"));
s->start_of_from = folder_tell (s);
folder_scan_skip_line (s, h->from_line);
@@ -1625,9 +1654,9 @@ tail_recurse:
if (!camel_content_type_is(ct, "multipart", "signed")
&& (bound = camel_content_type_param(ct, "boundary"))) {
d(printf("multipart, boundary = %s\n", bound));
- h->boundarylen = strlen (bound)+2;
- h->boundarylenfinal = h->boundarylen+2;
- h->boundary = g_malloc (h->boundarylen+3);
+ h->boundarylen = strlen (bound) + 2;
+ h->boundarylenfinal = h->boundarylen + 2;
+ h->boundary = g_malloc (h->boundarylen + 3);
sprintf(h->boundary, "--%s--", bound);
type = CAMEL_MIME_PARSER_STATE_MULTIPART;
} else {
@@ -1652,7 +1681,7 @@ tail_recurse:
type = CAMEL_MIME_PARSER_STATE_MESSAGE;
d(printf("parent was multipart/digest, autoupgrading to message/rfc822?\n"));
/* maybe we should do this too?
- header_raw_append_parse(&h->headers, "Content-Type: message/rfc822", -1);*/
+ * header_raw_append_parse(&h->headers, "Content-Type: message/rfc822", -1);*/
} else {
ct = camel_content_type_decode("text/plain");
}
@@ -1707,19 +1736,19 @@ tail_recurse:
case CAMEL_MIME_PARSER_STATE_MULTIPART:
h = s->parts;
/* This mess looks for the next boundary on this
- level. Once it finds the last one, it keeps going,
- looking for post-multipart content ('postface').
- Because messages might have duplicate boundaries for
- different parts, it makes sure it stops if its already
- found an end boundary for this part. It handles
- truncated and missing boundaries appropriately too. */
+ * level. Once it finds the last one, it keeps going,
+ * looking for post-multipart content ('postface').
+ * Because messages might have duplicate boundaries for
+ * different parts, it makes sure it stops if its already
+ * found an end boundary for this part. It handles
+ * truncated and missing boundaries appropriately too. */
seenlast = FALSE;
do {
do {
hb = folder_scan_content (s, &state, databuffer, datalength);
- if (*datalength>0) {
+ if (*datalength > 0) {
/* instead of a new state, we'll just store it locally and provide
- an accessor function */
+ * an accessor function */
d(printf("Multipart %s Content %p: '%.*s'\n",
h->prestage>0?"post":"pre", h, *datalength, *databuffer));
if (h->prestage > 0) {
@@ -1732,9 +1761,9 @@ tail_recurse:
g_byte_array_append (h->pretext, (guint8 *) *databuffer, *datalength);
}
}
- } while (hb==h && *datalength>0);
+ } while (hb == h && *datalength > 0);
h->prestage++;
- if (*datalength==0 && hb==h && !seenlast) {
+ if (*datalength == 0 && hb == h && !seenlast) {
d(printf("got boundary: %s last=%d\n", hb->boundary, state));
s->start_of_boundary = folder_tell (s);
folder_scan_skip_line (s, NULL);
@@ -1830,19 +1859,19 @@ gint main (gint argc, gchar **argv)
gint i;
gint attach = 0;
- if (argc==2)
+ if (argc == 2)
name = argv[1];
printf("opening: %s", name);
- for (i=1;i<argc;i++) {
+ for (i = 1; i < argc; i++) {
const gchar *encoding = NULL, *charset = NULL;
gchar *attachname;
name = argv[i];
printf("opening: %s", name);
- fd = g_open (name, O_RDONLY|O_BINARY, 0);
+ fd = g_open (name, O_RDONLY | O_BINARY, 0);
if (fd==-1) {
perror("Cannot open mailbox");
exit (1);
diff --git a/camel/camel-mime-parser.h b/camel/camel-mime-parser.h
index cce09fa..98897a6 100644
--- a/camel/camel-mime-parser.h
+++ b/camel/camel-mime-parser.h
@@ -58,8 +58,8 @@ typedef struct _CamelMimeParserClass CamelMimeParserClass;
typedef struct _CamelMimeParserPrivate CamelMimeParserPrivate;
/* NOTE: if you add more states, you may need to bump the
- start of the END tags to 16 or 32, etc - so they are
- the same as the matching start tag, with a bit difference */
+ * start of the END tags to 16 or 32, etc - so they are
+ * the same as the matching start tag, with a bit difference */
typedef enum _camel_mime_parser_state_t {
CAMEL_MIME_PARSER_STATE_INITIAL,
CAMEL_MIME_PARSER_STATE_PRE_FROM, /* data before a 'From' line */
@@ -148,7 +148,7 @@ gint camel_mime_parser_filter_add (CamelMimeParser *m, CamelMimeFilter *mf);
void camel_mime_parser_filter_remove (CamelMimeParser *m, gint id);
/* these should be used with caution, because the state will not
- track the seeked position */
+ * track the seeked position */
/* FIXME: something to bootstrap the state? */
goffset camel_mime_parser_tell (CamelMimeParser *parser);
goffset camel_mime_parser_seek (CamelMimeParser *parser, goffset offset, gint whence);
diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c
index 47ccf25..2829bd9 100644
--- a/camel/camel-mime-part-utils.c
+++ b/camel/camel-mime-part-utils.c
@@ -201,7 +201,7 @@ camel_mime_message_build_preview (CamelMimePart *msg,
G_SEEKABLE (mstream), 0,
G_SEEK_SET, NULL, NULL);
- bstream = camel_stream_buffer_new (mstream, CAMEL_STREAM_BUFFER_READ|CAMEL_STREAM_BUFFER_BUFFER);
+ bstream = camel_stream_buffer_new (mstream, CAMEL_STREAM_BUFFER_READ | CAMEL_STREAM_BUFFER_BUFFER);
/* We should fetch just 200 unquoted lines. */
while ((line = camel_stream_buffer_read_line ((CamelStreamBuffer *) bstream, NULL, NULL)) && str->len < 200) {
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index b4ceaac..d81a29f 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -153,11 +153,11 @@ write_references (CamelStream *stream,
while (*value) {
ids = value;
- ide = strchr (ids+1, '>');
+ ide = strchr (ids + 1, '>');
if (ide)
value = ++ide;
else
- ide = value = strlen (ids)+ids;
+ ide = value = strlen (ids) + ids;
if (len > 0 && len + (ide - ids) >= CAMEL_FOLD_SIZE) {
g_string_append_len (buffer, "\n\t", 2);
@@ -542,7 +542,7 @@ mime_part_write_to_stream_sync (CamelDataWrapper *dw,
GError **error);
/* fold/write the headers. But dont fold headers that are already formatted
- (e.g. ones with parameter-lists, that we know about, and have created) */
+ * (e.g. ones with parameter-lists, that we know about, and have created) */
while (h) {
val = h->value;
if (val == NULL) {
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 989ccda..63b6677 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -94,7 +94,12 @@ static const guchar tohex[16] = {
* Returns: the number of bytes encoded
**/
gsize
-camel_uuencode_close (guchar *in, gsize len, guchar *out, guchar *uubuf, gint *state, guint32 *save)
+camel_uuencode_close (guchar *in,
+ gsize len,
+ guchar *out,
+ guchar *uubuf,
+ gint *state,
+ guint32 *save)
{
register guchar *outptr, *bufptr;
register guint32 saved;
@@ -175,7 +180,12 @@ camel_uuencode_close (guchar *in, gsize len, guchar *out, guchar *uubuf, gint *s
* Returns: the number of bytes encoded
**/
gsize
-camel_uuencode_step (guchar *in, gsize len, guchar *out, guchar *uubuf, gint *state, guint32 *save)
+camel_uuencode_step (guchar *in,
+ gsize len,
+ guchar *out,
+ guchar *uubuf,
+ gint *state,
+ guint32 *save)
{
register guchar *inptr, *outptr, *bufptr;
guchar b0, b1, b2, *inend;
@@ -286,7 +296,11 @@ camel_uuencode_step (guchar *in, gsize len, guchar *out, guchar *uubuf, gint *st
* Returns: the number of bytes decoded
**/
gsize
-camel_uudecode_step (guchar *in, gsize len, guchar *out, gint *state, guint32 *save)
+camel_uudecode_step (guchar *in,
+ gsize len,
+ guchar *out,
+ gint *state,
+ guint32 *save)
{
register guchar *inptr, *outptr;
guchar *inend, ch;
@@ -389,19 +403,23 @@ camel_uudecode_step (guchar *in, gsize len, guchar *out, gint *state, guint32 *s
* Returns: the number of bytes encoded
**/
gsize
-camel_quoted_encode_close (guchar *in, gsize len, guchar *out, gint *state, gint *save)
+camel_quoted_encode_close (guchar *in,
+ gsize len,
+ guchar *out,
+ gint *state,
+ gint *save)
{
register guchar *outptr = out;
gint last;
- if (len>0)
+ if (len > 0)
outptr += camel_quoted_encode_step (in, len, outptr, state, save);
last = *state;
if (last != -1) {
/* space/tab must be encoded if it's the last character on
- the line */
- if (camel_mime_is_qpsafe (last) && last!=' ' && last!=9) {
+ * the line */
+ if (camel_mime_is_qpsafe (last) && last != ' ' && last != 9) {
*outptr++ = last;
} else {
*outptr++ = '=';
@@ -413,7 +431,7 @@ camel_quoted_encode_close (guchar *in, gsize len, guchar *out, gint *state, gint
*save = 0;
*state = -1;
- return outptr-out;
+ return outptr - out;
}
/**
@@ -431,7 +449,11 @@ camel_quoted_encode_close (guchar *in, gsize len, guchar *out, gint *state, gint
* Returns: the number of bytes encoded
**/
gsize
-camel_quoted_encode_step (guchar *in, gsize len, guchar *out, gint *statep, gint *save)
+camel_quoted_encode_step (guchar *in,
+ gsize len,
+ guchar *out,
+ gint *statep,
+ gint *save)
{
register guchar *inptr, *outptr, *inend;
guchar c;
@@ -484,7 +506,7 @@ camel_quoted_encode_step (guchar *in, gsize len, guchar *out, gint *statep, gint
}
/* delay output of space gchar */
- if (c==' ' || c=='\t') {
+ if (c == ' ' || c == '\t') {
last = c;
} else {
*outptr++ = c;
@@ -515,11 +537,11 @@ camel_quoted_encode_step (guchar *in, gsize len, guchar *out, gint *statep, gint
}
/*
- FIXME: this does not strip trailing spaces from lines (as it should, rfc 2045, section 6.7)
- Should it also canonicalise the end of line to CR LF??
-
- Note: Trailing rubbish (at the end of input), like = or =x or =\r will be lost.
-*/
+ * FIXME: this does not strip trailing spaces from lines (as it should, rfc 2045, section 6.7)
+ * Should it also canonicalise the end of line to CR LF??
+ *
+ * Note: Trailing rubbish (at the end of input), like = or =x or =\r will be lost.
+ */
/**
* camel_quoted_decode_step:
@@ -535,13 +557,17 @@ camel_quoted_encode_step (guchar *in, gsize len, guchar *out, gint *statep, gint
* Returns: the number of bytes decoded
**/
gsize
-camel_quoted_decode_step (guchar *in, gsize len, guchar *out, gint *savestate, gint *saveme)
+camel_quoted_decode_step (guchar *in,
+ gsize len,
+ guchar *out,
+ gint *savestate,
+ gint *saveme)
{
register guchar *inptr, *outptr;
guchar *inend, c;
gint state, save;
- inend = in+len;
+ inend = in + len;
outptr = out;
d(printf("quoted-printable, decoding text '%.*s'\n", len, in));
@@ -549,19 +575,19 @@ camel_quoted_decode_step (guchar *in, gsize len, guchar *out, gint *savestate, g
state = *savestate;
save = *saveme;
inptr = in;
- while (inptr<inend) {
+ while (inptr < inend) {
switch (state) {
case 0:
- while (inptr<inend) {
+ while (inptr < inend) {
c = *inptr++;
- if (c=='=') {
+ if (c == '=') {
state = 1;
break;
}
#ifdef CANONICALISE_EOL
/*else if (c=='\r') {
state = 3;
- } else if (c=='\n') {
+ } else if (c == '\n') {
*outptr++ = '\r';
*outptr++ = c;
} */
@@ -573,7 +599,7 @@ camel_quoted_decode_step (guchar *in, gsize len, guchar *out, gint *savestate, g
break;
case 1:
c = *inptr++;
- if (c=='\n') {
+ if (c == '\n') {
/* soft break ... unix end of line */
state = 0;
} else {
@@ -587,8 +613,8 @@ camel_quoted_decode_step (guchar *in, gsize len, guchar *out, gint *savestate, g
c = toupper (c);
save = toupper (save);
*outptr++ = (((save>='A'?save-'A'+10:save-'0')&0x0f) << 4)
- | ((c>='A'?c-'A'+10:c-'0')&0x0f);
- } else if (c=='\n' && save == '\r') {
+ | ((c >= 'A' ? c - 'A' + 10 : c - '0') &0x0f);
+ } else if (c == '\n' && save == '\r') {
/* soft break ... canonical end of line */
} else {
/* just output the data */
@@ -602,7 +628,7 @@ camel_quoted_decode_step (guchar *in, gsize len, guchar *out, gint *savestate, g
case 3:
/* convert \r -> to \r\n, leaves \r\n alone */
c = *inptr++;
- if (c=='\n') {
+ if (c == '\n') {
*outptr++ = '\r';
*outptr++ = c;
} else {
@@ -619,15 +645,17 @@ camel_quoted_decode_step (guchar *in, gsize len, guchar *out, gint *savestate, g
*savestate = state;
*saveme = save;
- return outptr-out;
+ return outptr - out;
}
/*
- this is for the "Q" encoding of international words,
- which is slightly different than plain quoted-printable (mainly by allowing 0x20 <> _)
+ * this is for the "Q" encoding of international words,
+ * which is slightly different than plain quoted-printable (mainly by allowing 0x20 <> _)
*/
static gsize
-quoted_decode (const guchar *in, gsize len, guchar *out)
+quoted_decode (const guchar *in,
+ gsize len,
+ guchar *out)
{
register const guchar *inptr;
register guchar *outptr;
@@ -635,42 +663,45 @@ quoted_decode (const guchar *in, gsize len, guchar *out)
guchar c, c1;
gint ret = 0;
- inend = in+len;
+ inend = in + len;
outptr = out;
d(printf("decoding text '%.*s'\n", len, in));
inptr = in;
- while (inptr<inend) {
+ while (inptr < inend) {
c = *inptr++;
- if (c=='=') {
+ if (c == '=') {
/* silently ignore truncated data? */
- if (inend-in>=2) {
+ if (inend - in >= 2) {
c = toupper (*inptr++);
c1 = toupper (*inptr++);
*outptr++ = (((c>='A'?c-'A'+10:c-'0')&0x0f) << 4)
- | ((c1>='A'?c1-'A'+10:c1-'0')&0x0f);
+ | ((c1 >= 'A' ? c1 - 'A' + 10 : c1 - '0') &0x0f);
} else {
ret = -1;
break;
}
- } else if (c=='_') {
+ } else if (c == '_') {
*outptr++ = 0x20;
} else {
*outptr++ = c;
}
}
- if (ret==0) {
- return outptr-out;
+ if (ret == 0) {
+ return outptr - out;
}
return 0;
}
/* rfc2047 version of quoted-printable */
/* safemask is the mask to apply to the camel_mime_special_table to determine what
- characters can safely be included without encoding */
+ * characters can safely be included without encoding */
static gsize
-quoted_encode (const guchar *in, gsize len, guchar *out, gushort safemask)
+quoted_encode (const guchar *in,
+ gsize len,
+ guchar *out,
+ gushort safemask)
{
register const guchar *inptr, *inend;
guchar *outptr;
@@ -681,7 +712,7 @@ quoted_encode (const guchar *in, gsize len, guchar *out, gushort safemask)
outptr = out;
while (inptr < inend) {
c = *inptr++;
- if (c==' ') {
+ if (c == ' ') {
*outptr++ = '_';
} else if (camel_mime_special_table[c] & safemask) {
*outptr++ = c;
@@ -717,11 +748,11 @@ header_decode_lwsp (const gchar **in)
gint depth = 1;
inptr++;
while (depth && (c=*inptr) && *inptr != '\0') {
- if (c=='\\' && inptr[1]) {
+ if (c == '\\' && inptr[1]) {
inptr++;
- } else if (c=='(') {
+ } else if (c == '(') {
depth++;
- } else if (c==')') {
+ } else if (c == ')') {
depth--;
}
inptr++;
@@ -732,7 +763,9 @@ header_decode_lwsp (const gchar **in)
}
static gchar *
-camel_iconv_strndup (iconv_t cd, const gchar *string, gsize n)
+camel_iconv_strndup (iconv_t cd,
+ const gchar *string,
+ gsize n)
{
gsize inleft, outleft, converted = 0;
gchar *out, *outbuf;
@@ -785,9 +818,9 @@ camel_iconv_strndup (iconv_t cd, const gchar *string, gsize n)
iconv (cd, NULL, NULL, &outbuf, &outleft);
/* Note: not all charsets can be nul-terminated with a single
- nul byte. UCS2, for example, needs 2 nul bytes and UCS4
- needs 4. I hope that 4 nul bytes is enough to terminate all
- multibyte charsets? */
+ * nul byte. UCS2, for example, needs 2 nul bytes and UCS4
+ * needs 4. I hope that 4 nul bytes is enough to terminate all
+ * multibyte charsets? */
/* nul-terminate the string */
memset (outbuf, 0, 4);
@@ -816,7 +849,9 @@ camel_iconv_strndup (iconv_t cd, const gchar *string, gsize n)
#define is_ascii(c) isascii ((gint) ((guchar) (c)))
static gchar *
-decode_8bit (const gchar *text, gsize len, const gchar *default_charset)
+decode_8bit (const gchar *text,
+ gsize len,
+ const gchar *default_charset)
{
const gchar *charsets[4] = { "UTF-8", NULL, NULL, NULL };
gsize inleft, outleft, outlen, rc, min, n;
@@ -951,7 +986,9 @@ decode_8bit (const gchar *text, gsize len, const gchar *default_charset)
/* decode an rfc2047 encoded-word token */
static gchar *
-rfc2047_decode_word (const gchar *in, gsize inlen, const gchar *default_charset)
+rfc2047_decode_word (const gchar *in,
+ gsize inlen,
+ const gchar *default_charset)
{
const guchar *instart = (const guchar *) in;
const guchar *inptr = instart + 2;
@@ -1053,16 +1090,18 @@ rfc2047_decode_word (const gchar *in, gsize inlen, const gchar *default_charset)
}
/* ok, a lot of mailers are BROKEN, and send iso-latin1 encoded
- headers, when they should just be sticking to US-ASCII
- according to the rfc's. Anyway, since the conversion to utf-8
- is trivial, just do it here without iconv */
+ * headers, when they should just be sticking to US-ASCII
+ * according to the rfc's. Anyway, since the conversion to utf-8
+ * is trivial, just do it here without iconv */
static GString *
-append_latin1 (GString *out, const gchar *in, gsize len)
+append_latin1 (GString *out,
+ const gchar *in,
+ gsize len)
{
guint c;
while (len) {
- c = (guint)*in++;
+ c = (guint) * in++;
len--;
if (c & 0x80) {
out = g_string_append_c (out, 0xc0 | ((c >> 6) & 0x3)); /* 110000xx */
@@ -1075,7 +1114,10 @@ append_latin1 (GString *out, const gchar *in, gsize len)
}
static gint
-append_8bit (GString *out, const gchar *inbuf, gsize inlen, const gchar *charset)
+append_8bit (GString *out,
+ const gchar *inbuf,
+ gsize inlen,
+ const gchar *charset)
{
gchar *outbase, *outbuf;
gsize outlen;
@@ -1107,7 +1149,9 @@ append_8bit (GString *out, const gchar *inbuf, gsize inlen, const gchar *charset
}
static GString *
-append_quoted_pair (GString *str, const gchar *in, gsize inlen)
+append_quoted_pair (GString *str,
+ const gchar *in,
+ gsize inlen)
{
register const gchar *inptr = in;
const gchar *inend = in + inlen;
@@ -1126,7 +1170,9 @@ append_quoted_pair (GString *str, const gchar *in, gsize inlen)
/* decodes a simple text, rfc822 + rfc2047 */
static gchar *
-header_decode_text (const gchar *in, gint ctext, const gchar *default_charset)
+header_decode_text (const gchar *in,
+ gint ctext,
+ const gchar *default_charset)
{
register const gchar *inptr = in;
gboolean encoded = FALSE;
@@ -1250,7 +1296,8 @@ header_decode_text (const gchar *in, gint ctext, const gchar *default_charset)
* value
**/
gchar *
-camel_header_decode_string (const gchar *in, const gchar *default_charset)
+camel_header_decode_string (const gchar *in,
+ const gchar *default_charset)
{
if (in == NULL)
return NULL;
@@ -1270,7 +1317,8 @@ camel_header_decode_string (const gchar *in, const gchar *default_charset)
* value
**/
gchar *
-camel_header_format_ctext (const gchar *in, const gchar *default_charset)
+camel_header_format_ctext (const gchar *in,
+ const gchar *default_charset)
{
if (in == NULL)
return NULL;
@@ -1279,12 +1327,16 @@ camel_header_format_ctext (const gchar *in, const gchar *default_charset)
}
/* how long a sequence of pre-encoded words should be less than, to attempt to
- fit into a properly folded word. Only a guide. */
+ * fit into a properly folded word. Only a guide. */
#define CAMEL_FOLD_PREENCODED (24)
/* FIXME: needs a way to cache iconv opens for different charsets? */
static void
-rfc2047_encode_word (GString *outstring, const gchar *in, gsize len, const gchar *type, gushort safemask)
+rfc2047_encode_word (GString *outstring,
+ const gchar *in,
+ gsize len,
+ const gchar *type,
+ gushort safemask)
{
iconv_t ic = (iconv_t) -1;
gchar *buffer, *out, *ascii;
@@ -1310,7 +1362,7 @@ rfc2047_encode_word (GString *outstring, const gchar *in, gsize len, const gchar
gint i;
/* break up words into smaller bits, what we really want is encoded + overhead < 75,
- but we'll just guess what that means in terms of input chars, and assume its good enough */
+ * but we'll just guess what that means in terms of input chars, and assume its good enough */
out = buffer;
outlen = bufflen;
@@ -1319,7 +1371,7 @@ rfc2047_encode_word (GString *outstring, const gchar *in, gsize len, const gchar
/* native encoding case, the easy one (?) */
/* we work out how much we can convert, and still be in length */
/* proclen will be the result of input characters that we can convert, to the nearest
- (approximated) valid utf8 gchar */
+ * (approximated) valid utf8 gchar */
convlen = 0;
proclen = -1;
p = inptr;
@@ -1353,7 +1405,7 @@ rfc2047_encode_word (GString *outstring, const gchar *in, gsize len, const gchar
out += proclen;
} else {
/* well we could do similar, but we can't (without undue effort), we'll just break it up into
- hopefully-small-enough chunks, and leave it at that */
+ * hopefully-small-enough chunks, and leave it at that */
convlen = MIN (inlen, CAMEL_FOLD_PREENCODED);
p = inptr;
if (camel_iconv (ic, &inptr, (gsize *) &convlen, &out, &outlen) == (gsize) -1 && errno != EINVAL) {
@@ -1367,7 +1419,7 @@ rfc2047_encode_word (GString *outstring, const gchar *in, gsize len, const gchar
inlen -= (inptr - p);
}
- enclen = out-buffer;
+ enclen = out - buffer;
if (enclen) {
/* create token */
@@ -1425,7 +1477,7 @@ camel_header_encode_string (const guchar *in)
return g_strdup ((gchar *) in);
/* This gets each word out of the input, and checks to see what charset
- can be used to encode it. */
+ * can be used to encode it. */
/* TODO: Work out when to merge subsequent words, or across word-parts */
out = g_string_new ("");
inptr = in;
@@ -1440,7 +1492,7 @@ camel_header_encode_string (const guchar *in)
c = g_utf8_get_char ((gchar *) inptr);
if (newinptr == NULL || !g_unichar_validate (c)) {
w(g_warning ("Invalid UTF-8 sequence encountered (pos %d, gchar '%c'): %s",
- (inptr-in), inptr[0], in));
+ (inptr - in), inptr[0], in));
inptr++;
continue;
}
@@ -1531,16 +1583,19 @@ camel_header_encode_string (const guchar *in)
/* apply quoted-string rules to a string */
static void
-quote_word (GString *out, gboolean do_quotes, const gchar *start, gsize len)
+quote_word (GString *out,
+ gboolean do_quotes,
+ const gchar *start,
+ gsize len)
{
gint i, c;
/* TODO: What about folding on long lines? */
if (do_quotes)
g_string_append_c (out, '"');
- for (i=0;i<len;i++) {
+ for (i = 0; i < len; i++) {
c = *start++;
- if (c == '\"' || c=='\\' || c=='\r')
+ if (c == '\"' || c == '\\' || c == '\r')
g_string_append_c (out, '\\');
g_string_append_c (out, c);
}
@@ -1562,7 +1617,8 @@ struct _phrase_word {
};
static gboolean
-word_types_compatable (enum _phrase_word_t type1, enum _phrase_word_t type2)
+word_types_compatable (enum _phrase_word_t type1,
+ enum _phrase_word_t type2)
{
switch (type1) {
case WORD_ATOM:
@@ -1683,7 +1739,7 @@ header_encode_phrase_merge_words (GList **wordsp)
merged = TRUE;
} else {
/* if it is going to be too long, make sure we include the
- separating whitespace */
+ * separating whitespace */
word->end = next->start;
break;
}
@@ -1755,7 +1811,7 @@ camel_header_encode_phrase (const guchar *in)
case WORD_2047:
if (last_word && last_word->type == WORD_2047) {
/* include the whitespace chars between these 2 words in the
- resulting rfc2047 encoded word. */
+ * resulting rfc2047 encoded word. */
len = word->end - last_word->end;
start = (const gchar *) last_word->end;
@@ -1831,7 +1887,7 @@ camel_header_token_decode (const gchar *in)
}
/*
- <"> * ( <any gchar except <"> \, cr / \ <any char> ) <">
+ * <"> * ( <any gchar except <"> \, cr / \ <any char> ) <">
*/
static gchar *
header_decode_quoted_string (const gchar **in)
@@ -1850,16 +1906,16 @@ header_decode_quoted_string (const gchar **in)
inptr++;
intmp = inptr;
while ( (c = *intmp++) && c!= '"') {
- if (c=='\\' && *intmp) {
+ if (c == '\\' && *intmp) {
intmp++;
skip++;
}
}
- outlen = intmp-inptr-skip;
- out = outptr = g_malloc (outlen+1);
+ outlen = intmp - inptr - skip;
+ out = outptr = g_malloc (outlen + 1);
while ( (c = *inptr) && c!= '"') {
inptr++;
- if (c=='\\' && *inptr) {
+ if (c == '\\' && *inptr) {
c = *inptr++;
}
*outptr++ = c;
@@ -1883,7 +1939,7 @@ header_decode_atom (const gchar **in)
inptr++;
*in = inptr;
if (inptr > start)
- return g_strndup (start, inptr-start);
+ return g_strndup (start, inptr - start);
else
return NULL;
}
@@ -1935,12 +1991,12 @@ gint
camel_header_decode_int (const gchar **in)
{
const gchar *inptr = *in;
- gint c, v=0;
+ gint c, v = 0;
header_decode_lwsp (&inptr);
while ( (c=*inptr++ & 0xff)
&& isdigit (c) ) {
- v = v*10+(c-'0');
+ v = v * 10 + (c - '0');
}
*in = inptr-1;
return v;
@@ -1949,7 +2005,8 @@ camel_header_decode_int (const gchar **in)
#define HEXVAL(c) (isdigit (c) ? (c) - '0' : tolower (c) - 'a' + 10)
static gchar *
-hex_decode (const gchar *in, gsize len)
+hex_decode (const gchar *in,
+ gsize len)
{
const guchar *inend = (const guchar *) (in + len);
guchar *inptr, *outptr;
@@ -1977,7 +2034,10 @@ hex_decode (const gchar *in, gsize len)
/* Tries to convert @in @from charset @to charset. Any failure, we get no data out rather than partial conversion */
static gchar *
-header_convert (const gchar *to, const gchar *from, const gchar *in, gsize inlen)
+header_convert (const gchar *to,
+ const gchar *from,
+ const gchar *in,
+ gsize inlen)
{
iconv_t ic;
gsize outlen, ret;
@@ -2007,7 +2067,8 @@ header_convert (const gchar *to, const gchar *from, const gchar *in, gsize inlen
*/
static gchar *
-rfc2184_decode (const gchar *in, gsize len)
+rfc2184_decode (const gchar *in,
+ gsize len)
{
const gchar *inptr = in;
const gchar *inend = in + len;
@@ -2018,9 +2079,9 @@ rfc2184_decode (const gchar *in, gsize len)
if (!inptr)
return NULL;
- encoding = g_alloca (inptr-in+1);
- memcpy (encoding, in, inptr-in);
- encoding[inptr-in] = 0;
+ encoding = g_alloca (inptr - in + 1);
+ memcpy (encoding, in, inptr - in);
+ encoding[inptr - in] = 0;
charset = camel_iconv_charset_name (encoding);
inptr = memchr (inptr + 1, '\'', inend - inptr - 1);
@@ -2047,7 +2108,8 @@ rfc2184_decode (const gchar *in, gsize len)
* Returns: the value of the @name param
**/
gchar *
-camel_header_param (struct _camel_header_param *p, const gchar *name)
+camel_header_param (struct _camel_header_param *p,
+ const gchar *name)
{
while (p && p->name && g_ascii_strcasecmp (p->name, name) != 0)
p = p->next;
@@ -2067,7 +2129,9 @@ camel_header_param (struct _camel_header_param *p, const gchar *name)
* Returns: the set param
**/
struct _camel_header_param *
-camel_header_set_param (struct _camel_header_param **l, const gchar *name, const gchar *value)
+camel_header_set_param (struct _camel_header_param **l,
+ const gchar *name,
+ const gchar *value)
{
struct _camel_header_param *p = (struct _camel_header_param *) l, *pn;
@@ -2114,9 +2178,10 @@ camel_header_set_param (struct _camel_header_param **l, const gchar *name, const
* Returns: the value of the @name param
**/
const gchar *
-camel_content_type_param (CamelContentType *t, const gchar *name)
+camel_content_type_param (CamelContentType *t,
+ const gchar *name)
{
- if (t==NULL)
+ if (t == NULL)
return NULL;
return camel_header_param (t->params, name);
}
@@ -2130,7 +2195,9 @@ camel_content_type_param (CamelContentType *t, const gchar *name)
* Set a parameter on @content_type.
**/
void
-camel_content_type_set_param (CamelContentType *t, const gchar *name, const gchar *value)
+camel_content_type_set_param (CamelContentType *t,
+ const gchar *name,
+ const gchar *value)
{
camel_header_set_param (&t->params, name, value);
}
@@ -2148,10 +2215,12 @@ camel_content_type_set_param (CamelContentType *t, const gchar *name, const gcha
* %FALSE otherwise
**/
gint
-camel_content_type_is (CamelContentType *ct, const gchar *type, const gchar *subtype)
+camel_content_type_is (CamelContentType *ct,
+ const gchar *type,
+ const gchar *subtype)
{
/* no type == text/plain or text/"*" */
- if (ct==NULL || (ct->type == NULL && ct->subtype == NULL)) {
+ if (ct == NULL || (ct->type == NULL && ct->subtype == NULL)) {
return (!g_ascii_strcasecmp(type, "text")
&& (!g_ascii_strcasecmp(subtype, "plain")
|| !strcmp(subtype, "*")));
@@ -2194,7 +2263,8 @@ camel_header_param_list_free (struct _camel_header_param *p)
* Returns: the new #CamelContentType
**/
CamelContentType *
-camel_content_type_new (const gchar *type, const gchar *subtype)
+camel_content_type_new (const gchar *type,
+ const gchar *subtype)
{
CamelContentType *t;
@@ -2350,20 +2420,21 @@ header_decode_addrspec (const gchar **in)
}
/*
- address:
- word *('.' word) @ domain |
- *(word) '<' [ *('@' domain ) ':' ] word *( '.' word) @ domain |
-
- 1*word ':'[ word ... etc (mailbox, as above) ] ';'
+ * address:
+ * word *('.' word) @ domain |
+ * *(word) '<' [ *('@' domain ) ':' ] word *( '.' word) @ domain |
+ *
+ * 1 * word ':'[ word ... etc (mailbox, as above) ] ';'
*/
/* mailbox:
- word *( '.' word ) '@' domain
- *(word) '<' [ *('@' domain ) ':' ] word *( '.' word) @ domain
- */
+ * word *( '.' word ) '@' domain
+ * *(word) '<' [ *('@' domain ) ':' ] word *( '.' word) @ domain
+ * */
static struct _camel_header_address *
-header_decode_mailbox (const gchar **in, const gchar *charset)
+header_decode_mailbox (const gchar **in,
+ const gchar *charset)
{
const gchar *inptr = *in;
gchar *pre;
@@ -2378,7 +2449,7 @@ header_decode_mailbox (const gchar **in, const gchar *charset)
/* for each address */
pre = header_decode_word (&inptr);
header_decode_lwsp (&inptr);
- if (!(*inptr == '.' || *inptr == '@' || *inptr==',' || *inptr=='\0')) {
+ if (!(*inptr == '.' || *inptr == '@' || *inptr == ',' || *inptr == '\0')) {
/* ',' and '\0' required incase it is a simple address, no @ domain part (buggy writer) */
name = g_string_new ("");
while (pre) {
@@ -2396,8 +2467,8 @@ header_decode_mailbox (const gchar **in, const gchar *charset)
gsize p = strlen (pre);
/* dont append ' ' between sucsessive encoded words */
- if ((l>6 && last[l-2] == '?' && last[l-1] == '=')
- && (p>6 && pre[0] == '=' && pre[1] == '?')) {
+ if ((l > 6 && last[l - 2] == '?' && last[l - 1] == '=')
+ && (p > 6 && pre[0] == '=' && pre[1] == '?')) {
/* dont append ' ' */
} else {
name = g_string_append_c (name, ' ');
@@ -2521,7 +2592,7 @@ header_decode_mailbox (const gchar **in, const gchar *charset)
g_string_append (name, text);
}
}/* else {
- g_string_append (name, text?text:addr->str);
+ g_string_append (name, text ? text : addr->str);
g_string_truncate (addr, 0);
}*/
g_free (text);
@@ -2550,9 +2621,9 @@ header_decode_mailbox (const gchar **in, const gchar *charset)
const gchar *comstart, *comend;
/* this is a bit messy, we go from the last known position, because
- decode_domain/etc skip over any comments on the way */
+ * decode_domain/etc skip over any comments on the way */
/* FIXME: This wont detect comments inside the domain itself,
- but nobody seems to use that feature anyway ... */
+ * but nobody seems to use that feature anyway ... */
d(printf("checking for comment from '%s'\n", comment));
@@ -2560,13 +2631,13 @@ header_decode_mailbox (const gchar **in, const gchar *charset)
if (comstart) {
comstart++;
header_decode_lwsp (&inptr);
- comend = inptr-1;
+ comend = inptr - 1;
while (comend > comstart && comend[0] != ')')
comend--;
if (comend > comstart) {
d(printf(" looking at subset '%.*s'\n", comend-comstart, comstart));
- tmp = g_strndup (comstart, comend-comstart);
+ tmp = g_strndup (comstart, comend - comstart);
text = camel_header_decode_string (tmp, charset);
name = g_string_new (text);
g_free (tmp);
@@ -2608,7 +2679,8 @@ header_decode_mailbox (const gchar **in, const gchar *charset)
}
static struct _camel_header_address *
-header_decode_address (const gchar **in, const gchar *charset)
+header_decode_address (const gchar **in,
+ const gchar *charset)
{
const gchar *inptr = *in;
gchar *pre;
@@ -2784,7 +2856,8 @@ camel_header_contentid_decode (const gchar *in)
}
void
-camel_header_references_list_append_asis (struct _camel_header_references **list, gchar *ref)
+camel_header_references_list_append_asis (struct _camel_header_references **list,
+ gchar *ref)
{
struct _camel_header_references *w = (struct _camel_header_references *) list, *n;
while (w->next)
@@ -2821,7 +2894,8 @@ camel_header_references_list_clear (struct _camel_header_references **list)
}
static void
-header_references_decode_single (const gchar **in, struct _camel_header_references **head)
+header_references_decode_single (const gchar **in,
+ struct _camel_header_references **head)
{
struct _camel_header_references *ref;
const gchar *inptr = *in;
@@ -2895,7 +2969,8 @@ camel_header_references_dup (const struct _camel_header_references *list)
}
struct _camel_header_address *
-camel_header_mailbox_decode (const gchar *in, const gchar *charset)
+camel_header_mailbox_decode (const gchar *in,
+ const gchar *charset)
{
if (in == NULL)
return NULL;
@@ -2904,7 +2979,8 @@ camel_header_mailbox_decode (const gchar *in, const gchar *charset)
}
struct _camel_header_address *
-camel_header_address_decode (const gchar *in, const gchar *charset)
+camel_header_address_decode (const gchar *in,
+ const gchar *charset)
{
const gchar *inptr = in, *last;
struct _camel_header_address *list = NULL, *addr;
@@ -2950,16 +3026,16 @@ camel_header_newsgroups_decode (const gchar *in)
const gchar *start;
head = NULL;
- last = (struct _camel_header_newsgroup *)&head;
+ last = (struct _camel_header_newsgroup *) &head;
do {
header_decode_lwsp (&inptr);
start = inptr;
while ((c = *inptr++) && !camel_mime_is_lwsp (c) && c != ',')
;
- if (start != inptr-1) {
+ if (start != inptr - 1) {
ng = g_malloc (sizeof (*ng));
- ng->newsgroup = g_strndup (start, inptr-start-1);
+ ng->newsgroup = g_strndup (start, inptr - start - 1);
ng->next = NULL;
last->next = ng;
last = ng;
@@ -3016,7 +3092,9 @@ camel_transfer_encoding_from_string (const gchar *string)
}
void
-camel_header_mime_decode (const gchar *in, gint *maj, gint *min)
+camel_header_mime_decode (const gchar *in,
+ gint *maj,
+ gint *min)
{
const gchar *inptr = in;
gint major=-1, minor=-1;
@@ -3051,7 +3129,8 @@ struct _rfc2184_param {
};
static gint
-rfc2184_param_cmp (gconstpointer ap, gconstpointer bp)
+rfc2184_param_cmp (gconstpointer ap,
+ gconstpointer bp)
{
const struct _rfc2184_param *a = *(gpointer *) ap;
const struct _rfc2184_param *b = *(gpointer *) bp;
@@ -3070,13 +3149,15 @@ rfc2184_param_cmp (gconstpointer ap, gconstpointer bp)
/* NB: Steals name and value */
static struct _camel_header_param *
-header_append_param (struct _camel_header_param *last, gchar *name, gchar *value)
+header_append_param (struct _camel_header_param *last,
+ gchar *name,
+ gchar *value)
{
struct _camel_header_param *node;
/* This handles -
- 8 bit data in parameters, illegal, tries to convert using locale, or just safens it up.
- rfc2047 ecoded parameters, illegal, decodes them anyway. Some Outlook & Mozilla do this?
+ * 8 bit data in parameters, illegal, tries to convert using locale, or just safens it up.
+ * rfc2047 ecoded parameters, illegal, decodes them anyway. Some Outlook & Mozilla do this?
*/
node = g_malloc (sizeof (*node));
last->next = node;
@@ -3092,8 +3173,8 @@ header_append_param (struct _camel_header_param *last, gchar *name, gchar *value
g_free (value);
} else {
node->value = value;
- for (;*value;value++)
- if (!isascii ((guchar)*value))
+ for (;*value; value++)
+ if (!isascii ((guchar) * value))
*value = '_';
}
} else
@@ -3105,7 +3186,7 @@ header_append_param (struct _camel_header_param *last, gchar *name, gchar *value
static struct _camel_header_param *
header_decode_param_list (const gchar **in)
{
- struct _camel_header_param *head = NULL, *last = (struct _camel_header_param *)&head;
+ struct _camel_header_param *head = NULL, *last = (struct _camel_header_param *) &head;
GPtrArray *split = NULL;
const gchar *inptr = *in;
struct _rfc2184_param *work;
@@ -3169,11 +3250,11 @@ header_decode_param_list (const gchar **in)
qsort (split->pdata, split->len, sizeof (split->pdata[0]), rfc2184_param_cmp);
first = split->pdata[0];
- for (i=0;i<split->len;i++) {
+ for (i = 0; i < split->len; i++) {
work = split->pdata[i];
- if (split->len-1 == i)
+ if (split->len - 1 == i)
g_string_append (value, work->param.value);
- if (split->len-1 == i || strcmp (work->param.name, first->param.name) != 0) {
+ if (split->len - 1 == i || strcmp (work->param.name, first->param.name) != 0) {
tmp = rfc2184_decode (value->str, value->len);
if (tmp == NULL)
tmp = g_strdup (value->str);
@@ -3182,11 +3263,11 @@ header_decode_param_list (const gchar **in)
g_string_truncate (value, 0);
first = work;
}
- if (split->len-1 != i)
+ if (split->len - 1 != i)
g_string_append (value, work->param.value);
}
g_string_free (value, TRUE);
- for (i=0;i<split->len;i++) {
+ for (i = 0; i < split->len; i++) {
work = split->pdata[i];
g_free (work->param.name);
g_free (work->param.value);
@@ -3210,7 +3291,9 @@ camel_header_param_list_decode (const gchar *in)
}
static gchar *
-header_encode_param (const guchar *in, gboolean *encoded, gboolean is_filename)
+header_encode_param (const guchar *in,
+ gboolean *encoded,
+ gboolean is_filename)
{
const guchar *inptr = in;
guchar *outbuf = NULL;
@@ -3279,14 +3362,15 @@ header_encode_param (const guchar *in, gboolean *encoded, gboolean is_filename)
}
/* HACK: Set to non-zero when you want the 'filename' and 'name' headers encoded in RFC 2047 way,
- otherwise they will be encoded in the correct RFC 2231 way. It's because Outlook and GMail
- do not understand the correct standard and refuse attachments with localized name sent
- from evolution. This seems to have been fixed in Exchange 2007 at least - not sure about
- standalone Outlook. */
+ * otherwise they will be encoded in the correct RFC 2231 way. It's because Outlook and GMail
+ * do not understand the correct standard and refuse attachments with localized name sent
+ * from evolution. This seems to have been fixed in Exchange 2007 at least - not sure about
+ * standalone Outlook. */
gint camel_header_param_encode_filenames_in_rfc_2047 = 0;
void
-camel_header_param_list_format_append (GString *out, struct _camel_header_param *p)
+camel_header_param_list_format_append (GString *out,
+ struct _camel_header_param *p)
{
gint used = out->len;
@@ -3378,7 +3462,7 @@ camel_header_param_list_format_append (GString *out, struct _camel_header_param
/* Quote even if we don't need to in order to
* work around broken mail software like the
* Jive Forums' NNTP gateway */
- if (encoded /*|| !quote*/)
+ if (encoded /*|| !quote */)
g_string_append (out, value);
else
quote_word (out, TRUE, value, vlen);
@@ -3411,7 +3495,7 @@ camel_content_type_decode (const gchar *in)
gchar *type, *subtype = NULL;
CamelContentType *t = NULL;
- if (in==NULL)
+ if (in == NULL)
return NULL;
type = decode_token (&inptr);
@@ -3446,7 +3530,7 @@ camel_content_type_dump (CamelContentType *ct)
struct _camel_header_param *p;
printf("Content-Type: ");
- if (ct==NULL) {
+ if (ct == NULL) {
printf("<NULL>\n");
return;
}
@@ -3546,7 +3630,7 @@ void
camel_content_disposition_unref (CamelContentDisposition *d)
{
if (d) {
- if (d->refcount<=1) {
+ if (d->refcount <= 1) {
camel_header_param_list_free (d->params);
g_free (d->disposition);
g_free (d);
@@ -3562,7 +3646,7 @@ camel_content_disposition_format (CamelContentDisposition *d)
GString *out;
gchar *ret;
- if (d==NULL)
+ if (d == NULL)
return NULL;
out = g_string_new("");
@@ -3654,7 +3738,8 @@ static const gchar tm_days[][4] = {
* Returns: a valid string representation of the date.
**/
gchar *
-camel_header_format_date (time_t date, gint tz_offset)
+camel_header_format_date (time_t date,
+ gint tz_offset)
{
struct tm tm;
@@ -3729,7 +3814,8 @@ datetok (const gchar *date)
}
static gint
-decode_int (const gchar *in, gsize inlen)
+decode_int (const gchar *in,
+ gsize inlen)
{
register const gchar *inptr;
gint sign = 1, val = 0;
@@ -3758,7 +3844,8 @@ decode_int (const gchar *in, gsize inlen)
#if 0
static gint
-get_days_in_month (gint month, gint year)
+get_days_in_month (gint month,
+ gint year)
{
switch (month) {
case 1:
@@ -3786,7 +3873,8 @@ get_days_in_month (gint month, gint year)
#endif
static gint
-get_wday (const gchar *in, gsize inlen)
+get_wday (const gchar *in,
+ gsize inlen)
{
gint wday;
@@ -3804,7 +3892,8 @@ get_wday (const gchar *in, gsize inlen)
}
static gint
-get_mday (const gchar *in, gsize inlen)
+get_mday (const gchar *in,
+ gsize inlen)
{
gint mday;
@@ -3819,7 +3908,8 @@ get_mday (const gchar *in, gsize inlen)
}
static gint
-get_month (const gchar *in, gsize inlen)
+get_month (const gchar *in,
+ gsize inlen)
{
gint i;
@@ -3837,7 +3927,8 @@ get_month (const gchar *in, gsize inlen)
}
static gint
-get_year (const gchar *in, gsize inlen)
+get_year (const gchar *in,
+ gsize inlen)
{
gint year;
@@ -3856,7 +3947,11 @@ get_year (const gchar *in, gsize inlen)
}
static gboolean
-get_time (const gchar *in, gsize inlen, gint *hour, gint *min, gint *sec)
+get_time (const gchar *in,
+ gsize inlen,
+ gint *hour,
+ gint *min,
+ gint *sec)
{
register const gchar *inptr;
gint *val, colons = 0;
@@ -3927,7 +4022,8 @@ get_tzone (struct _date_token **token)
}
static time_t
-parse_rfc822_date (struct _date_token *tokens, gint *tzone)
+parse_rfc822_date (struct _date_token *tokens,
+ gint *tzone)
{
gint hour, min, sec, offset, n;
struct _date_token *token;
@@ -4014,7 +4110,8 @@ parse_rfc822_date (struct _date_token *tokens, gint *tzone)
#define is_tzone(t) (is_tzone_alpha (t) || is_tzone_numeric (t))
static time_t
-parse_broken_date (struct _date_token *tokens, gint *tzone)
+parse_broken_date (struct _date_token *tokens,
+ gint *tzone)
{
gboolean got_wday, got_month, got_tzone, is_pm;
gint hour, min, sec, offset, n;
@@ -4147,7 +4244,8 @@ parse_broken_date (struct _date_token *tokens, gint *tzone)
* of the timezone offset will be stored.
**/
time_t
-camel_header_decode_date (const gchar *str, gint *tz_offset)
+camel_header_decode_date (const gchar *str,
+ gint *tz_offset)
{
struct _date_token *token, *tokens;
time_t date;
@@ -4203,7 +4301,7 @@ camel_header_location_decode (const gchar *in)
}
while ((c = *in++)) {
- if (quote && c=='"')
+ if (quote && c == '"')
break;
if (!camel_mime_is_lwsp (c))
g_string_append_c (out, c);
@@ -4236,16 +4334,18 @@ check_header (struct _camel_header_raw *header)
#endif
void
-camel_header_raw_append_parse (struct _camel_header_raw **list, const gchar *header, gint offset)
+camel_header_raw_append_parse (struct _camel_header_raw **list,
+ const gchar *header,
+ gint offset)
{
register const gchar *in;
gsize fieldlen;
gchar *name;
in = header;
- while (camel_mime_is_fieldname (*in) || *in==':')
+ while (camel_mime_is_fieldname (*in) || *in == ':')
in++;
- fieldlen = in-header-1;
+ fieldlen = in - header - 1;
while (camel_mime_is_lwsp (*in))
in++;
if (fieldlen == 0 || header[fieldlen] != ':') {
@@ -4260,7 +4360,10 @@ camel_header_raw_append_parse (struct _camel_header_raw **list, const gchar *hea
}
void
-camel_header_raw_append (struct _camel_header_raw **list, const gchar *name, const gchar *value, gint offset)
+camel_header_raw_append (struct _camel_header_raw **list,
+ const gchar *name,
+ const gchar *value,
+ gint offset)
{
struct _camel_header_raw *l, *n;
@@ -4296,7 +4399,8 @@ camel_header_raw_append (struct _camel_header_raw **list, const gchar *name, con
}
static struct _camel_header_raw *
-header_raw_find_node (struct _camel_header_raw **list, const gchar *name)
+header_raw_find_node (struct _camel_header_raw **list,
+ const gchar *name)
{
struct _camel_header_raw *l;
@@ -4310,7 +4414,9 @@ header_raw_find_node (struct _camel_header_raw **list, const gchar *name)
}
const gchar *
-camel_header_raw_find (struct _camel_header_raw **list, const gchar *name, gint *offset)
+camel_header_raw_find (struct _camel_header_raw **list,
+ const gchar *name,
+ gint *offset)
{
struct _camel_header_raw *l;
@@ -4324,7 +4430,10 @@ camel_header_raw_find (struct _camel_header_raw **list, const gchar *name, gint
}
const gchar *
-camel_header_raw_find_next (struct _camel_header_raw **list, const gchar *name, gint *offset, const gchar *last)
+camel_header_raw_find_next (struct _camel_header_raw **list,
+ const gchar *name,
+ gint *offset,
+ const gchar *last)
{
struct _camel_header_raw *l;
@@ -4346,7 +4455,8 @@ header_raw_free (struct _camel_header_raw *l)
}
void
-camel_header_raw_remove (struct _camel_header_raw **list, const gchar *name)
+camel_header_raw_remove (struct _camel_header_raw **list,
+ const gchar *name)
{
struct _camel_header_raw *l, *p;
@@ -4366,7 +4476,10 @@ camel_header_raw_remove (struct _camel_header_raw **list, const gchar *name)
}
void
-camel_header_raw_replace (struct _camel_header_raw **list, const gchar *name, const gchar *value, gint offset)
+camel_header_raw_replace (struct _camel_header_raw **list,
+ const gchar *name,
+ const gchar *value,
+ gint offset)
{
camel_header_raw_remove (list, name);
camel_header_raw_append (list, name, value, offset);
@@ -4476,11 +4589,11 @@ static struct {
static gpointer
mailing_list_init (gpointer param)
{
- gint i, errcode, failed=0;
+ gint i, errcode, failed = 0;
/* precompile regex's for speed at runtime */
for (i = 0; i < G_N_ELEMENTS (mail_list_magic); i++) {
- errcode = regcomp (&mail_list_magic[i].regex, mail_list_magic[i].pattern, REG_EXTENDED|REG_ICASE);
+ errcode = regcomp (&mail_list_magic[i].regex, mail_list_magic[i].pattern, REG_EXTENDED | REG_ICASE);
if (errcode != 0) {
gchar *errstr;
gsize len;
@@ -4512,7 +4625,7 @@ camel_header_raw_check_mailing_list (struct _camel_header_raw **list)
for (i = 0; i < G_N_ELEMENTS (mail_list_magic); i++) {
v = camel_header_raw_find (list, mail_list_magic[i].name, NULL);
- for (j=0;j<3;j++) {
+ for (j = 0; j < 3; j++) {
match[j].rm_so = -1;
match[j].rm_eo = -1;
}
@@ -4552,7 +4665,8 @@ camel_header_address_new (void)
}
struct _camel_header_address *
-camel_header_address_new_name (const gchar *name, const gchar *addr)
+camel_header_address_new_name (const gchar *name,
+ const gchar *addr)
{
struct _camel_header_address *h;
h = camel_header_address_new ();
@@ -4599,7 +4713,8 @@ camel_header_address_unref (struct _camel_header_address *h)
}
void
-camel_header_address_set_name (struct _camel_header_address *h, const gchar *name)
+camel_header_address_set_name (struct _camel_header_address *h,
+ const gchar *name)
{
if (h) {
g_free (h->name);
@@ -4608,7 +4723,8 @@ camel_header_address_set_name (struct _camel_header_address *h, const gchar *nam
}
void
-camel_header_address_set_addr (struct _camel_header_address *h, const gchar *addr)
+camel_header_address_set_addr (struct _camel_header_address *h,
+ const gchar *addr)
{
if (h) {
if (h->type == CAMEL_HEADER_ADDRESS_NAME
@@ -4623,7 +4739,8 @@ camel_header_address_set_addr (struct _camel_header_address *h, const gchar *add
}
void
-camel_header_address_set_members (struct _camel_header_address *h, struct _camel_header_address *group)
+camel_header_address_set_members (struct _camel_header_address *h,
+ struct _camel_header_address *group)
{
if (h) {
if (h->type == CAMEL_HEADER_ADDRESS_GROUP
@@ -4639,7 +4756,8 @@ camel_header_address_set_members (struct _camel_header_address *h, struct _camel
}
void
-camel_header_address_add_member (struct _camel_header_address *h, struct _camel_header_address *member)
+camel_header_address_add_member (struct _camel_header_address *h,
+ struct _camel_header_address *member)
{
if (h) {
if (h->type == CAMEL_HEADER_ADDRESS_GROUP
@@ -4651,7 +4769,8 @@ camel_header_address_add_member (struct _camel_header_address *h, struct _camel_
}
void
-camel_header_address_list_append_list (struct _camel_header_address **l, struct _camel_header_address **h)
+camel_header_address_list_append_list (struct _camel_header_address **l,
+ struct _camel_header_address **h)
{
if (l) {
struct _camel_header_address *n = (struct _camel_header_address *) l;
@@ -4663,7 +4782,8 @@ camel_header_address_list_append_list (struct _camel_header_address **l, struct
}
void
-camel_header_address_list_append (struct _camel_header_address **l, struct _camel_header_address *h)
+camel_header_address_list_append (struct _camel_header_address **l,
+ struct _camel_header_address *h)
{
if (h) {
camel_header_address_list_append_list (l, &h);
@@ -4685,9 +4805,11 @@ camel_header_address_list_clear (struct _camel_header_address **l)
}
/* if encode is true, then the result is suitable for mailing, otherwise
- the result is suitable for display only (and may not even be re-parsable) */
+ * the result is suitable for display only (and may not even be re-parsable) */
static void
-header_address_list_encode_append (GString *out, gint encode, struct _camel_header_address *a)
+header_address_list_encode_append (GString *out,
+ gint encode,
+ struct _camel_header_address *a)
{
gchar *text;
@@ -4762,7 +4884,8 @@ camel_header_address_list_format (struct _camel_header_address *a)
}
gchar *
-camel_header_address_fold (const gchar *in, gsize headerlen)
+camel_header_address_fold (const gchar *in,
+ gsize headerlen)
{
gsize len, outlen;
const gchar *inptr = in, *space, *p, *n;
@@ -4784,7 +4907,7 @@ camel_header_address_fold (const gchar *in, gsize headerlen)
}
needunfold = TRUE;
- len += n-p;
+ len += n - p;
if (len >= CAMEL_FOLD_SIZE)
break;
@@ -4813,8 +4936,8 @@ camel_header_address_fold (const gchar *in, gsize headerlen)
if (outlen + len > CAMEL_FOLD_SIZE) {
d(printf("outlen = %d wordlen = %d\n", outlen, len));
/* strip trailing space */
- if (out->len > 0 && out->str[out->len-1] == ' ')
- g_string_truncate (out, out->len-1);
+ if (out->len > 0 && out->str[out->len - 1] == ' ')
+ g_string_truncate (out, out->len - 1);
g_string_append (out, "\n\t");
outlen = 1;
}
@@ -4838,7 +4961,8 @@ camel_header_address_fold (const gchar *in, gsize headerlen)
/* simple header folding */
/* will work even if the header is already folded */
gchar *
-camel_header_fold (const gchar *in, gsize headerlen)
+camel_header_fold (const gchar *in,
+ gsize headerlen)
{
gsize len, outlen, tmplen;
const gchar *inptr = in, *space, *p, *n;
@@ -4861,7 +4985,7 @@ camel_header_fold (const gchar *in, gsize headerlen)
}
needunfold = TRUE;
- len += n-p;
+ len += n - p;
if (len >= CAMEL_FOLD_SIZE)
break;
@@ -4876,7 +5000,7 @@ camel_header_fold (const gchar *in, gsize headerlen)
inptr = in = camel_header_unfold (in);
out = g_string_new("");
- outlen = headerlen+2;
+ outlen = headerlen + 2;
while (*inptr) {
space = inptr;
while (*space && *space != ' ' && *space != '\t')
@@ -4935,7 +5059,7 @@ camel_header_unfold (const gchar *in)
if (in == NULL)
return NULL;
- out = g_malloc (strlen (in)+1);
+ out = g_malloc (strlen (in) + 1);
o = out;
while ((c = *inptr++)) {
diff --git a/camel/camel-mime-utils.h b/camel/camel-mime-utils.h
index 96ff158..392dc9c 100644
--- a/camel/camel-mime-utils.h
+++ b/camel/camel-mime-utils.h
@@ -186,7 +186,7 @@ gchar *camel_header_format_ctext (const gchar *in, const gchar *default_charset)
gchar *camel_header_encode_phrase (const guchar *in);
/* FIXME: these are the only 2 functions in this header which are ch_(action)_type
- rather than ch_type_(action) */
+ * rather than ch_type_(action) */
/* decode an email date field into a GMT time, + optional offset */
time_t camel_header_decode_date (const gchar *str, gint *tz_offset);
diff --git a/camel/camel-movemail.c b/camel/camel-movemail.c
index 14e25f9..bec2874 100644
--- a/camel/camel-movemail.c
+++ b/camel/camel-movemail.c
@@ -298,7 +298,10 @@ camel_movemail_copy_file (gint sfd,
#if 0
static gint
-camel_movemail_copy (gint fromfd, gint tofd, goffset start, gsize bytes)
+camel_movemail_copy (gint fromfd,
+ gint tofd,
+ goffset start,
+ gsize bytes)
{
gchar buffer[4096];
gint written = 0;
@@ -308,11 +311,11 @@ camel_movemail_copy (gint fromfd, gint tofd, goffset start, gsize bytes)
if (lseek (fromfd, start, SEEK_SET) != start)
return -1;
- while (bytes>0) {
+ while (bytes > 0) {
gint toread, towrite;
toread = bytes;
- if (bytes>4096)
+ if (bytes > 4096)
toread = 4096;
else
toread = bytes;
@@ -350,9 +353,13 @@ camel_movemail_copy (gint fromfd, gint tofd, goffset start, gsize bytes)
#ifdef HAVE_BROKEN_SPOOL
static gint
-camel_movemail_copy_filter (gint fromfd, gint tofd, goffset start, gsize bytes, CamelMimeFilter *filter)
+camel_movemail_copy_filter (gint fromfd,
+ gint tofd,
+ goffset start,
+ gsize bytes,
+ CamelMimeFilter *filter)
{
- gchar buffer[4096+PRE_SIZE];
+ gchar buffer[4096 + PRE_SIZE];
gint written = 0;
gchar *filterbuffer;
gint filterlen, filterpre;
@@ -364,16 +371,16 @@ camel_movemail_copy_filter (gint fromfd, gint tofd, goffset start, gsize bytes,
if (lseek (fromfd, start, SEEK_SET) != start)
return -1;
- while (bytes>0) {
+ while (bytes > 0) {
gint toread, towrite;
toread = bytes;
- if (bytes>4096)
+ if (bytes > 4096)
toread = 4096;
else
toread = bytes;
do {
- towrite = read (fromfd, buffer+PRE_SIZE, toread);
+ towrite = read (fromfd, buffer + PRE_SIZE, toread);
} while (towrite == -1 && errno == EINTR);
if (towrite == -1)
@@ -384,13 +391,13 @@ camel_movemail_copy_filter (gint fromfd, gint tofd, goffset start, gsize bytes,
/* check for 'end of file' */
if (towrite == 0) {
d(printf("end of file?\n"));
- camel_mime_filter_complete (filter, buffer+PRE_SIZE, towrite, PRE_SIZE,
+ camel_mime_filter_complete (filter, buffer + PRE_SIZE, towrite, PRE_SIZE,
&filterbuffer, &filterlen, &filterpre);
towrite = filterlen;
if (towrite == 0)
break;
} else {
- camel_mime_filter_filter (filter, buffer+PRE_SIZE, towrite, PRE_SIZE,
+ camel_mime_filter_filter (filter, buffer + PRE_SIZE, towrite, PRE_SIZE,
&filterbuffer, &filterlen, &filterpre);
towrite = filterlen;
}
@@ -414,9 +421,10 @@ camel_movemail_copy_filter (gint fromfd, gint tofd, goffset start, gsize bytes,
}
/* write the headers back out again, but not he Content-Length header, because we dont
- want to maintain it! */
+ * want to maintain it! */
static gint
-solaris_header_write (gint fd, struct _camel_header_raw *header)
+solaris_header_write (gint fd,
+ struct _camel_header_raw *header)
{
struct iovec iv[4];
gint outlen = 0, len;
@@ -459,8 +467,8 @@ solaris_header_write (gint fd, struct _camel_header_raw *header)
}
/* Well, since Solaris is a tad broken wrt its 'mbox' folder format,
- we must convert it to a real mbox format. Thankfully this is
- mostly pretty easy */
+ * we must convert it to a real mbox format. Thankfully this is
+ * mostly pretty easy */
static gint
camel_movemail_solaris (gint oldsfd,
gint dfd,
@@ -525,7 +533,7 @@ camel_movemail_solaris (gint oldsfd,
length = atoi (cl);
camel_mime_parser_drop_step (mp);
camel_mime_parser_drop_step (mp);
- newpos = length+body;
+ newpos = length + body;
}
/* copy body->length converting From lines */
if (camel_movemail_copy_filter (sfd, dfd, body, length, ffrom) == -1)
diff --git a/camel/camel-msgport.c b/camel/camel-msgport.c
index 773d883..1344c10 100644
--- a/camel/camel-msgport.c
+++ b/camel/camel-msgport.c
@@ -97,7 +97,7 @@ msgport_pipe (gint *fds)
saddr.sin_port = 0;
saddr.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
- if (bind (temp, (struct sockaddr *)&saddr, sizeof (saddr))) {
+ if (bind (temp, (struct sockaddr *) &saddr, sizeof (saddr))) {
goto out0;
}
@@ -106,7 +106,7 @@ msgport_pipe (gint *fds)
}
len = sizeof (saddr);
- if (getsockname (temp, (struct sockaddr *)&saddr, &len)) {
+ if (getsockname (temp, (struct sockaddr *) &saddr, &len)) {
goto out0;
}
@@ -121,7 +121,7 @@ msgport_pipe (gint *fds)
goto out1;
}
- if (connect (socket1, (struct sockaddr *)&saddr, len) != SOCKET_ERROR ||
+ if (connect (socket1, (struct sockaddr *) &saddr, len) != SOCKET_ERROR ||
WSAGetLastError () != WSAEWOULDBLOCK) {
goto out1;
}
@@ -344,7 +344,8 @@ camel_msgport_prfd (CamelMsgPort *msgport)
* Since: 2.24
**/
void
-camel_msgport_push (CamelMsgPort *msgport, CamelMsg *msg)
+camel_msgport_push (CamelMsgPort *msgport,
+ CamelMsg *msg)
{
gint fd;
#ifdef CAMEL_HAVE_NSS
@@ -456,7 +457,8 @@ camel_msgport_try_pop (CamelMsgPort *msgport)
* Since: 2.30
**/
CamelMsg *
-camel_msgport_timed_pop (CamelMsgPort *msgport, GTimeVal *end_time)
+camel_msgport_timed_pop (CamelMsgPort *msgport,
+ GTimeVal *end_time)
{
CamelMsg *msg;
diff --git a/camel/camel-multipart-signed.c b/camel/camel-multipart-signed.c
index f05043b..57c8a76 100644
--- a/camel/camel-multipart-signed.c
+++ b/camel/camel-multipart-signed.c
@@ -142,8 +142,8 @@ multipart_signed_parse_content (CamelMultipartSigned *mps)
CAMEL_STREAM_MEM (stream), byte_array);
/* This is all seriously complex.
- This is so we can parse all cases properly, without altering the content.
- All we are doing is finding part offsets. */
+ * This is so we can parse all cases properly, without altering the content.
+ * All we are doing is finding part offsets. */
cmp = camel_mime_parser_new ();
camel_mime_parser_init_with_stream (cmp, stream, NULL);
@@ -160,9 +160,9 @@ multipart_signed_parse_content (CamelMultipartSigned *mps)
} else if (mps->start2 == -1) {
mps->start2 = camel_mime_parser_tell_start_headers (cmp);
mps->end1 = camel_mime_parser_tell_start_boundary (cmp);
- if (mps->end1 > mps->start1 && byte_array->data[mps->end1-1] == '\n')
+ if (mps->end1 > mps->start1 && byte_array->data[mps->end1 - 1] == '\n')
mps->end1--;
- if (mps->end1 > mps->start1 && byte_array->data[mps->end1-1] == '\r')
+ if (mps->end1 > mps->start1 && byte_array->data[mps->end1 - 1] == '\r')
mps->end1--;
} else {
g_warning("multipart/signed has more than 2 parts, remaining parts ignored");
@@ -277,9 +277,9 @@ multipart_signed_write_to_stream_sync (CamelDataWrapper *data_wrapper,
byte_array = camel_data_wrapper_get_byte_array (data_wrapper);
/* we have 3 basic cases:
- 1. constructed, we write out the data wrapper stream we got
- 2. signed content, we create and write out a new stream
- 3. invalid
+ * 1. constructed, we write out the data wrapper stream we got
+ * 2. signed content, we create and write out a new stream
+ * 3. invalid
*/
/* 1 */
@@ -549,7 +549,7 @@ multipart_signed_construct_from_parser (CamelMultipart *multipart,
gsize len;
/* we *must not* be in multipart state, otherwise the mime parser will
- parse the headers which is a no no @#$ # stupid multipart/signed spec */
+ * parse the headers which is a no no @#$ # stupid multipart/signed spec */
g_assert (camel_mime_parser_state (mp) == CAMEL_MIME_PARSER_STATE_HEADER);
/* All we do is copy it to a memstream */
diff --git a/camel/camel-multipart-signed.h b/camel/camel-multipart-signed.h
index 3e85d73..b765ec4 100644
--- a/camel/camel-multipart-signed.h
+++ b/camel/camel-multipart-signed.h
@@ -21,8 +21,8 @@
*/
/* Should this be a subclass of multipart?
- No, because we dont have different parts?
- I'm not really sure yet ... ? */
+ * No, because we dont have different parts?
+ * I'm not really sure yet ... ? */
#if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
#error "Only <camel/camel.h> can be included directly."
@@ -72,7 +72,7 @@ struct _CamelMultipartSigned
/* the raw content which must go over the wire, if we have generated it */
/* perhaps this should jsut set data_wrapper->stream and update start1/end1 accordingly, as it is done
- for other parts, or visa versa? */
+ * for other parts, or visa versa? */
CamelStream *contentraw;
/*int state;*/
diff --git a/camel/camel-net-utils.c b/camel/camel-net-utils.c
index ab8aaf8..efb9aa1 100644
--- a/camel/camel-net-utils.c
+++ b/camel/camel-net-utils.c
@@ -80,8 +80,8 @@ gai_strerror (gint error_code)
#endif
/* gethostbyname emulation code for emulating getaddrinfo code ...
-
-This should probably go away */
+ *
+ * This should probably go away */
#ifdef NEED_ADDRINFO
@@ -204,8 +204,11 @@ ai_to_herr (gint error)
#endif /* ENABLE_IPv6 */
static gint
-camel_gethostbyname_r (const gchar *name, struct hostent *host,
- gchar *buf, gsize buflen, gint *herr)
+camel_gethostbyname_r (const gchar *name,
+ struct hostent *host,
+ gchar *buf,
+ gsize buflen,
+ gint *herr)
{
#ifdef ENABLE_IPv6
struct addrinfo hints, *res;
@@ -315,8 +318,13 @@ camel_gethostbyname_r (const gchar *name, struct hostent *host,
}
static gint
-camel_gethostbyaddr_r (const gchar *addr, gint addrlen, gint type, struct hostent *host,
- gchar *buf, gsize buflen, gint *herr)
+camel_gethostbyaddr_r (const gchar *addr,
+ gint addrlen,
+ gint type,
+ struct hostent *host,
+ gchar *buf,
+ gsize buflen,
+ gint *herr)
{
#ifdef ENABLE_IPv6
gint retval, len;
@@ -407,7 +415,7 @@ camel_gethostbyaddr_r (const gchar *addr, gint addrlen, gint type, struct hosten
/* ********************************************************************** */
struct _addrinfo_msg {
CamelMsg msg;
- guint cancelled:1;
+ guint cancelled : 1;
/* for host lookup */
const gchar *name;
@@ -515,7 +523,7 @@ cs_waitinfo (gpointer (worker)(gpointer),
_("Cancelled"));
/* We cancel so if the thread impl is decent it causes immediate exit.
- We check the reply port incase we had a reply in the mean time, which we free later */
+ * We check the reply port incase we had a reply in the mean time, which we free later */
d(printf("Canceling lookup thread and leaving it\n"));
msg->cancelled = 1;
g_thread_join (thread);
@@ -654,7 +662,7 @@ cs_getaddrinfo (gpointer data)
info->result = getaddrinfo (info->name, info->service, info->hints, info->res);
/* On Solaris, the service name 'http' or 'https' is not defined.
- Use the port as the service name directly. */
+ * Use the port as the service name directly. */
if (info->result && info->service) {
if (strcmp (info->service, "http") == 0)
info->result = getaddrinfo(info->name, "80", info->hints, info->res);
@@ -773,7 +781,7 @@ cs_getnameinfo (gpointer data)
/* FIXME: honour getnameinfo flags: do we care, not really */
- while ((msg->result = camel_gethostbyaddr_r ((const gchar *)&sin->sin_addr, sizeof (sin->sin_addr), AF_INET, &h,
+ while ((msg->result = camel_gethostbyaddr_r ((const gchar *) &sin->sin_addr, sizeof (sin->sin_addr), AF_INET, &h,
msg->hostbufmem, msg->hostbuflen, &herr)) == ERANGE) {
if (msg->cancelled)
break;
@@ -789,7 +797,7 @@ cs_getnameinfo (gpointer data)
if (msg->result == 0 && h.h_name && h.h_name[0]) {
msg->host = g_strdup (h.h_name);
} else {
- guchar *in = (guchar *)&sin->sin_addr;
+ guchar *in = (guchar *) &sin->sin_addr;
/* sin_addr is always network order which is big-endian */
msg->host = g_strdup_printf("%u.%u.%u.%u", in[0], in[1], in[2], in[3]);
diff --git a/camel/camel-net-utils.h b/camel/camel-net-utils.h
index 655e1b4..dd544dc 100644
--- a/camel/camel-net-utils.h
+++ b/camel/camel-net-utils.h
@@ -44,15 +44,15 @@ G_BEGIN_DECLS
#ifndef _WIN32
#ifdef NEED_ADDRINFO
/* Some of this is copied from GNU's netdb.h
-
- Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-*/
+ *
+ * Copyright (C) 1996 - 2002, 2003, 2004 Free Software Foundation, Inc.
+ * This file is part of the GNU C Library.
+ *
+ * The GNU C Library is free software; you can redistribute it and / or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ */
struct addrinfo {
gint ai_flags;
gint ai_family;
diff --git a/camel/camel-nntp-address.c b/camel/camel-nntp-address.c
index 9e34fbb..ab09fde 100644
--- a/camel/camel-nntp-address.c
+++ b/camel/camel-nntp-address.c
@@ -43,7 +43,7 @@ nntp_address_decode (CamelAddress *address,
ha = camel_header_newsgroups_decode (raw);
if (ha) {
- for (n = ha;n;n=n->next)
+ for (n = ha; n; n = n->next)
camel_nntp_address_add (
CAMEL_NNTP_ADDRESS (address), n->newsgroup);
camel_header_newsgroups_free (ha);
@@ -65,7 +65,7 @@ nntp_address_encode (CamelAddress *address)
out = g_string_new("");
- for (i = 0;i < address->addresses->len; i++) {
+ for (i = 0; i < address->addresses->len; i++) {
if (i != 0)
g_string_append(out, ", ");
@@ -147,14 +147,15 @@ camel_nntp_address_new (void)
* Returns: Index of added entry, or existing matching entry.
**/
gint
-camel_nntp_address_add (CamelNNTPAddress *a, const gchar *name)
+camel_nntp_address_add (CamelNNTPAddress *a,
+ const gchar *name)
{
gint index, i;
g_assert (CAMEL_IS_NNTP_ADDRESS (a));
index = ((CamelAddress *) a)->addresses->len;
- for (i=0;i<index;i++)
+ for (i = 0; i < index; i++)
if (!strcmp (g_ptr_array_index (((CamelAddress *) a)->addresses, i), name))
return i;
@@ -174,7 +175,9 @@ camel_nntp_address_add (CamelNNTPAddress *a, const gchar *name)
* Returns: TRUE if such an address exists, or FALSE otherwise.
**/
gboolean
-camel_nntp_address_get (CamelNNTPAddress *a, gint index, const gchar **namep)
+camel_nntp_address_get (CamelNNTPAddress *a,
+ gint index,
+ const gchar **namep)
{
g_assert (CAMEL_IS_NNTP_ADDRESS (a));
diff --git a/camel/camel-object.c b/camel/camel-object.c
index b6267c2..f58a6f5 100644
--- a/camel/camel-object.c
+++ b/camel/camel-object.c
@@ -47,21 +47,20 @@ enum {
G_DEFINE_ABSTRACT_TYPE (CamelObject, camel_object, G_TYPE_OBJECT)
/* State file for CamelObject data.
- Any later versions should only append data.
-
- version:uint32
-
- Version 0 of the file:
-
- version:uint32 = 0
- count:uint32 -- count of meta-data items
- ( name:string value:string ) *count -- meta-data items
-
- Version 1 of the file adds:
- count:uint32 -- count of persistent properties
- ( tag:uing32 value:tagtype ) *count -- persistent properties
-
-*/
+ * Any later versions should only append data.
+ *
+ * version:uint32
+ *
+ * Version 0 of the file:
+ *
+ * version:uint32 = 0
+ * count:uint32 -- count of meta-data items
+ * ( name:string value:string ) *count -- meta-data items
+ *
+ * Version 1 of the file adds:
+ * count:uint32 -- count of persistent properties
+ * ( tag:uing32 value:tagtype ) *count -- persistent properties
+ */
#define CAMEL_OBJECT_STATE_FILE_MAGIC "CLMD"
diff --git a/camel/camel-offline-journal.c b/camel/camel-offline-journal.c
index 09ff304..8c55fa6 100644
--- a/camel/camel-offline-journal.c
+++ b/camel/camel-offline-journal.c
@@ -88,7 +88,9 @@ camel_offline_journal_init (CamelOfflineJournal *journal)
* Constructs a journal object.
**/
void
-camel_offline_journal_construct (CamelOfflineJournal *journal, CamelFolder *folder, const gchar *filename)
+camel_offline_journal_construct (CamelOfflineJournal *journal,
+ CamelFolder *folder,
+ const gchar *filename)
{
CamelDListNode *entry;
FILE *fp;
@@ -112,7 +114,8 @@ camel_offline_journal_construct (CamelOfflineJournal *journal, CamelFolder *fold
* Set the filename where the journal should load/save from.
**/
void
-camel_offline_journal_set_filename (CamelOfflineJournal *journal, const gchar *filename)
+camel_offline_journal_set_filename (CamelOfflineJournal *journal,
+ const gchar *filename)
{
g_return_if_fail (CAMEL_IS_OFFLINE_JOURNAL (journal));
diff --git a/camel/camel-partition-table.c b/camel/camel-partition-table.c
index fecbbe5..1fad6d9 100644
--- a/camel/camel-partition-table.c
+++ b/camel/camel-partition-table.c
@@ -36,7 +36,7 @@
#include "camel-partition-table.h"
/* Do we synchronously write table updates - makes the
- tables consistent after program crash without sync */
+ * tables consistent after program crash without sync */
/*#define SYNC_UPDATES*/
#define d(x) /*(printf ("%s (%d):%s: ", __FILE__, __LINE__, __PRETTY_FUNCTION__),(x))*/
@@ -98,17 +98,18 @@ camel_partition_table_init (CamelPartitionTable *cpi)
/* ********************************************************************** */
/*
- Have 2 hashes:
- Name -> nameid
- Word -> wordid
-
-nameid is pointer to name file, includes a bit to say if name is deleted
-wordid is a pointer to word file, includes pointer to start of word entries
-
-delete a name -> set it as deleted, do nothing else though
-
-lookup word, if nameid is deleted, mark it in wordlist as unused and mark for write (?)
-*/
+ * Have 2 hashes:
+ * Name -> nameid
+ * Word -> wordid
+ *
+ * nameid is pointer to name file, includes a bit to say if name is deleted
+ * wordid is a pointer to word file, includes pointer to start of word entries
+ *
+ * delete a name -> set it as deleted, do nothing else though
+ *
+ * lookup word, if nameid is deleted, mark it in wordlist as unused and mark
+ * for write (?)
+ */
/* ********************************************************************** */
@@ -136,26 +137,26 @@ static CamelBlock *find_partition (CamelPartitionTable *cpi, camel_hash_t id, gi
/* first, find the block this key might be in, then binary search the block */
bl = (CamelBlock *) cpi->partition.head;
while (bl->next) {
- ptb = (CamelPartitionMapBlock *)&bl->data;
+ ptb = (CamelPartitionMapBlock *) &bl->data;
part = ptb->partition;
- if (ptb->used > 0 && id <= part[ptb->used-1].hashid) {
- index = ptb->used/2;
- jump = ptb->used/4;
+ if (ptb->used > 0 && id <= part[ptb->used - 1].hashid) {
+ index = ptb->used / 2;
+ jump = ptb->used / 4;
if (jump == 0)
jump = 1;
while (1) {
if (id <= part[index].hashid) {
- if (index == 0 || id > part[index-1].hashid)
+ if (index == 0 || id > part[index - 1].hashid)
break;
index -= jump;
} else {
- if (index >= ptb->used-1)
+ if (index >= ptb->used - 1)
break;
index += jump;
}
- jump = jump/2;
+ jump = jump / 2;
if (jump == 0)
jump = 1;
}
@@ -194,7 +195,7 @@ camel_partition_table_new (CamelBlockFile *bs,
if (block == NULL)
goto fail;
- ptb = (CamelPartitionMapBlock *)&block->data;
+ ptb = (CamelPartitionMapBlock *) &block->data;
d (printf ("Adding partition block, used = %d, hashid = %08x\n", ptb->used, ptb->partition[0].hashid));
@@ -205,7 +206,7 @@ camel_partition_table_new (CamelBlockFile *bs,
camel_block_file_unref_block (bs, block);
goto fail;
}
- kb = (CamelPartitionKeyBlock *)&pblock->data;
+ kb = (CamelPartitionKeyBlock *) &pblock->data;
kb->used = 0;
ptb->used = 1;
ptb->partition[0].hashid = 0xffffffff;
@@ -281,7 +282,7 @@ camel_partition_table_lookup (CamelPartitionTable *cpi,
CAMEL_PARTITION_TABLE_UNLOCK (cpi, lock);
return 0;
}
- ptb = (CamelPartitionMapBlock *)&ptblock->data;
+ ptb = (CamelPartitionMapBlock *) &ptblock->data;
block = camel_block_file_get_block (
cpi->blocks, ptb->partition[index].blockid);
if (block == NULL) {
@@ -289,10 +290,10 @@ camel_partition_table_lookup (CamelPartitionTable *cpi,
return 0;
}
- pkb = (CamelPartitionKeyBlock *)&block->data;
+ pkb = (CamelPartitionKeyBlock *) &block->data;
/* What to do about duplicate hash's? */
- for (i=0;i<pkb->used;i++) {
+ for (i = 0; i < pkb->used; i++) {
if (pkb->keys[i].hashid == hashid) {
/* !! need to: lookup and compare string value */
/* get_key() if key == key ... */
@@ -330,26 +331,26 @@ camel_partition_table_remove (CamelPartitionTable *cpi,
CAMEL_PARTITION_TABLE_UNLOCK (cpi, lock);
return TRUE;
}
- ptb = (CamelPartitionMapBlock *)&ptblock->data;
+ ptb = (CamelPartitionMapBlock *) &ptblock->data;
block = camel_block_file_get_block (
cpi->blocks, ptb->partition[index].blockid);
if (block == NULL) {
CAMEL_PARTITION_TABLE_UNLOCK (cpi, lock);
return FALSE;
}
- pkb = (CamelPartitionKeyBlock *)&block->data;
+ pkb = (CamelPartitionKeyBlock *) &block->data;
/* What to do about duplicate hash's? */
- for (i=0;i<pkb->used;i++) {
+ for (i = 0; i < pkb->used; i++) {
if (pkb->keys[i].hashid == hashid) {
/* !! need to: lookup and compare string value */
/* get_key() if key == key ... */
/* remove this key */
pkb->used--;
- for (;i<pkb->used;i++) {
- pkb->keys[i].keyid = pkb->keys[i+1].keyid;
- pkb->keys[i].hashid = pkb->keys[i+1].hashid;
+ for (; i < pkb->used; i++) {
+ pkb->keys[i].keyid = pkb->keys[i + 1].keyid;
+ pkb->keys[i].hashid = pkb->keys[i + 1].hashid;
}
camel_block_file_touch_block (cpi->blocks, block);
break;
@@ -364,7 +365,8 @@ camel_partition_table_remove (CamelPartitionTable *cpi,
}
static gint
-keys_cmp (gconstpointer ap, gconstpointer bp)
+keys_cmp (gconstpointer ap,
+ gconstpointer bp)
{
const CamelPartitionKey *a = ap;
const CamelPartitionKey *b = bp;
@@ -388,7 +390,7 @@ camel_partition_table_add (CamelPartitionTable *cpi,
CamelPartitionKeyBlock *kb, *newkb, *nkb = NULL, *pkb = NULL;
CamelBlock *block, *ptblock, *ptnblock;
gint i, half, len;
- CamelPartitionKey keys[CAMEL_BLOCK_SIZE/4];
+ CamelPartitionKey keys[CAMEL_BLOCK_SIZE / 4];
gint ret = -1;
g_return_val_if_fail (CAMEL_IS_PARTITION_TABLE (cpi), -1);
@@ -402,14 +404,14 @@ camel_partition_table_add (CamelPartitionTable *cpi,
CAMEL_PARTITION_TABLE_UNLOCK (cpi, lock);
return -1;
}
- ptb = (CamelPartitionMapBlock *)&ptblock->data;
+ ptb = (CamelPartitionMapBlock *) &ptblock->data;
block = camel_block_file_get_block (
cpi->blocks, ptb->partition[index].blockid);
if (block == NULL) {
CAMEL_PARTITION_TABLE_UNLOCK (cpi, lock);
return -1;
}
- kb = (CamelPartitionKeyBlock *)&block->data;
+ kb = (CamelPartitionKeyBlock *) &block->data;
/* TODO: Keep the key array in sorted order, cheaper lookups and split operation */
@@ -427,38 +429,38 @@ camel_partition_table_add (CamelPartitionTable *cpi,
if (index > 0) {
pblock = camel_block_file_get_block (
- cpi->blocks, ptb->partition[index-1].blockid);
+ cpi->blocks, ptb->partition[index - 1].blockid);
if (pblock == NULL)
goto fail;
- pkb = (CamelPartitionKeyBlock *)&pblock->data;
+ pkb = (CamelPartitionKeyBlock *) &pblock->data;
}
- if (index < (ptb->used-1)) {
+ if (index < (ptb->used - 1)) {
nblock = camel_block_file_get_block (
- cpi->blocks, ptb->partition[index+1].blockid);
+ cpi->blocks, ptb->partition[index + 1].blockid);
if (nblock == NULL) {
if (pblock)
camel_block_file_unref_block (cpi->blocks, pblock);
goto fail;
}
- nkb = (CamelPartitionKeyBlock *)&nblock->data;
+ nkb = (CamelPartitionKeyBlock *) &nblock->data;
}
if (pblock && pkb->used < G_N_ELEMENTS (kb->keys)) {
if (nblock && nkb->used < G_N_ELEMENTS (kb->keys)) {
if (pkb->used < nkb->used) {
- newindex = index+1;
+ newindex = index + 1;
newblock = nblock;
} else {
- newindex = index-1;
+ newindex = index - 1;
newblock = pblock;
}
} else {
- newindex = index-1;
+ newindex = index - 1;
newblock = pblock;
}
} else {
if (nblock && nkb->used < G_N_ELEMENTS (kb->keys)) {
- newindex = index+1;
+ newindex = index + 1;
newblock = nblock;
}
}
@@ -479,7 +481,7 @@ camel_partition_table_add (CamelPartitionTable *cpi,
camel_block_file_detach_block (cpi->blocks, ptnblock);
/* split block and link on-disk, always sorted */
- ptn = (CamelPartitionMapBlock *)&ptnblock->data;
+ ptn = (CamelPartitionMapBlock *) &ptnblock->data;
ptn->next = ptb->next;
ptb->next = ptnblock->id;
len = ptb->used / 2;
@@ -519,15 +521,15 @@ camel_partition_table_add (CamelPartitionTable *cpi,
goto fail;
}
- for (i=ptb->used-1;i>index;i--) {
- ptb->partition[i+1].hashid = ptb->partition[i].hashid;
- ptb->partition[i+1].blockid = ptb->partition[i].blockid;
+ for (i = ptb->used - 1; i > index; i--) {
+ ptb->partition[i + 1].hashid = ptb->partition[i].hashid;
+ ptb->partition[i + 1].blockid = ptb->partition[i].blockid;
}
ptb->used++;
- newkb = (CamelPartitionKeyBlock *)&newblock->data;
+ newkb = (CamelPartitionKeyBlock *) &newblock->data;
newkb->used = 0;
- newindex = index+1;
+ newindex = index + 1;
ptb->partition[newindex].hashid = ptb->partition[index].hashid;
ptb->partition[newindex].blockid = newblock->id;
@@ -537,7 +539,7 @@ camel_partition_table_add (CamelPartitionTable *cpi,
if (pblock)
camel_block_file_unref_block (cpi->blocks, pblock);
} else {
- newkb = (CamelPartitionKeyBlock *)&newblock->data;
+ newkb = (CamelPartitionKeyBlock *) &newblock->data;
if (newblock == pblock) {
if (nblock)
@@ -550,8 +552,8 @@ camel_partition_table_add (CamelPartitionTable *cpi,
/* sort keys to find midpoint */
len = kb->used;
- memcpy (keys, kb->keys, sizeof (kb->keys[0])*len);
- memcpy (keys+len, newkb->keys, sizeof (newkb->keys[0])*newkb->used);
+ memcpy (keys, kb->keys, sizeof (kb->keys[0]) * len);
+ memcpy (keys + len, newkb->keys, sizeof (newkb->keys[0]) * newkb->used);
len += newkb->used;
keys[len].hashid = hashid;
keys[len].keyid = keyid;
@@ -559,20 +561,20 @@ camel_partition_table_add (CamelPartitionTable *cpi,
qsort (keys, len, sizeof (keys[0]), keys_cmp);
/* Split keys, fix partition table */
- half = len/2;
- partid = keys[half-1].hashid;
+ half = len / 2;
+ partid = keys[half - 1].hashid;
if (index < newindex) {
- memcpy (kb->keys, keys, sizeof (keys[0])*half);
+ memcpy (kb->keys, keys, sizeof (keys[0]) * half);
kb->used = half;
- memcpy (newkb->keys, keys+half, sizeof (keys[0])*(len-half));
- newkb->used = len-half;
+ memcpy (newkb->keys, keys + half, sizeof (keys[0]) * (len - half));
+ newkb->used = len - half;
ptb->partition[index].hashid = partid;
} else {
- memcpy (newkb->keys, keys, sizeof (keys[0])*half);
+ memcpy (newkb->keys, keys, sizeof (keys[0]) * half);
newkb->used = half;
- memcpy (kb->keys, keys+half, sizeof (keys[0])*(len-half));
- kb->used = len-half;
+ memcpy (kb->keys, keys + half, sizeof (keys[0]) * (len - half));
+ kb->used = len - half;
ptb->partition[newindex].hashid = partid;
}
@@ -663,7 +665,7 @@ camel_key_table_new (CamelBlockFile *bs,
ki = NULL;
} else {
camel_block_file_detach_block (bs, ki->root_block);
- ki->root = (CamelKeyRootBlock *)&ki->root_block->data;
+ ki->root = (CamelKeyRootBlock *) &ki->root_block->data;
k (printf ("Opening key index\n"));
k (printf (" first %u\n last %u\n free %u\n", ki->root->first, ki->root->last, ki->root->free));
@@ -720,17 +722,17 @@ camel_key_table_add (CamelKeyTable *ki,
goto fail;
}
- kblast = (CamelKeyBlock *)&last->data;
+ kblast = (CamelKeyBlock *) &last->data;
if (kblast->used >= 127)
goto fail;
if (kblast->used > 0) {
/*left = &kblast->u.keydata[kblast->u.keys[kblast->used-1].offset] - (gchar *)(&kblast->u.keys[kblast->used+1]);*/
- left = kblast->u.keys[kblast->used-1].offset - sizeof (kblast->u.keys[0])*(kblast->used+1);
+ left = kblast->u.keys[kblast->used - 1].offset - sizeof (kblast->u.keys[0]) * (kblast->used + 1);
d (printf ("key '%s' used = %d (%d), filled = %d, left = %d len = %d?\n",
key, kblast->used, kblast->used * sizeof (kblast->u.keys[0]),
- sizeof (kblast->u.keydata) - kblast->u.keys[kblast->used-1].offset,
+ sizeof (kblast->u.keydata) - kblast->u.keys[kblast->used - 1].offset,
left, len));
if (left < len) {
next = camel_block_file_new_block (ki->blocks);
@@ -738,7 +740,7 @@ camel_key_table_add (CamelKeyTable *ki,
camel_block_file_unref_block (ki->blocks, last);
goto fail;
}
- kbnext = (CamelKeyBlock *)&next->data;
+ kbnext = (CamelKeyBlock *) &next->data;
kblast->next = next->id;
ki->root->last = next->id;
d (printf ("adding new block, first = %u, last = %u\n", ki->root->first, ki->root->last));
@@ -751,16 +753,16 @@ camel_key_table_add (CamelKeyTable *ki,
}
if (kblast->used > 0)
- offset = kblast->u.keys[kblast->used-1].offset - len;
+ offset = kblast->u.keys[kblast->used - 1].offset - len;
else
- offset = sizeof (kblast->u.keydata)-len;
+ offset = sizeof (kblast->u.keydata) - len;
kblast->u.keys[kblast->used].flags = flags;
kblast->u.keys[kblast->used].data = data;
kblast->u.keys[kblast->used].offset = offset;
memcpy (kblast->u.keydata + offset, key, len);
- keyid = (last->id & (~(CAMEL_BLOCK_SIZE-1))) | kblast->used;
+ keyid = (last->id & (~(CAMEL_BLOCK_SIZE - 1))) | kblast->used;
kblast->used++;
@@ -798,13 +800,13 @@ camel_key_table_set_data (CamelKeyTable *ki,
g_return_val_if_fail (CAMEL_IS_KEY_TABLE (ki), FALSE);
g_return_val_if_fail (keyid != 0, FALSE);
- blockid = keyid & (~(CAMEL_BLOCK_SIZE-1));
- index = keyid & (CAMEL_BLOCK_SIZE-1);
+ blockid = keyid & (~(CAMEL_BLOCK_SIZE - 1));
+ index = keyid & (CAMEL_BLOCK_SIZE - 1);
bl = camel_block_file_get_block (ki->blocks, blockid);
if (bl == NULL)
return FALSE;
- kb = (CamelKeyBlock *)&bl->data;
+ kb = (CamelKeyBlock *) &bl->data;
CAMEL_KEY_TABLE_LOCK (ki, lock);
@@ -835,13 +837,13 @@ camel_key_table_set_flags (CamelKeyTable *ki,
g_return_val_if_fail (CAMEL_IS_KEY_TABLE (ki), FALSE);
g_return_val_if_fail (keyid != 0, FALSE);
- blockid = keyid & (~(CAMEL_BLOCK_SIZE-1));
- index = keyid & (CAMEL_BLOCK_SIZE-1);
+ blockid = keyid & (~(CAMEL_BLOCK_SIZE - 1));
+ index = keyid & (CAMEL_BLOCK_SIZE - 1);
bl = camel_block_file_get_block (ki->blocks, blockid);
if (bl == NULL)
return FALSE;
- kb = (CamelKeyBlock *)&bl->data;
+ kb = (CamelKeyBlock *) &bl->data;
if (kb->used >=127 || index >= kb->used) {
g_warning("Block %x: Invalid index or content: index %d used %d\n", blockid, index, kb->used);
@@ -883,14 +885,14 @@ camel_key_table_lookup (CamelKeyTable *ki,
if (flags)
*flags = 0;
- blockid = keyid & (~(CAMEL_BLOCK_SIZE-1));
- index = keyid & (CAMEL_BLOCK_SIZE-1);
+ blockid = keyid & (~(CAMEL_BLOCK_SIZE - 1));
+ index = keyid & (CAMEL_BLOCK_SIZE - 1);
bl = camel_block_file_get_block (ki->blocks, blockid);
if (bl == NULL)
return 0;
- kb = (CamelKeyBlock *)&bl->data;
+ kb = (CamelKeyBlock *) &bl->data;
if (kb->used >=127 || index >= kb->used) {
g_warning("Block %x: Invalid index or content: index %d used %d\n", blockid, index, kb->used);
@@ -908,7 +910,7 @@ camel_key_table_lookup (CamelKeyTable *ki,
if (index == 0)
len = sizeof (kb->u.keydata) - off;
else
- len = kb->u.keys[index-1].offset - off;
+ len = kb->u.keys[index - 1].offset - off;
*keyp = key = g_malloc (len+1);
memcpy (key, kb->u.keydata + off, len);
key[len] = 0;
@@ -923,7 +925,11 @@ camel_key_table_lookup (CamelKeyTable *ki,
/* iterate through all keys */
camel_key_t
-camel_key_table_next (CamelKeyTable *ki, camel_key_t next, gchar **keyp, guint *flagsp, camel_block_t *datap)
+camel_key_table_next (CamelKeyTable *ki,
+ camel_key_t next,
+ gchar **keyp,
+ guint *flagsp,
+ camel_block_t *datap)
{
CamelBlock *bl;
CamelKeyBlock *kb;
@@ -951,8 +957,8 @@ camel_key_table_next (CamelKeyTable *ki, camel_key_t next, gchar **keyp, guint *
next++;
do {
- blockid = next & (~(CAMEL_BLOCK_SIZE-1));
- index = next & (CAMEL_BLOCK_SIZE-1);
+ blockid = next & (~(CAMEL_BLOCK_SIZE - 1));
+ index = next & (CAMEL_BLOCK_SIZE - 1);
bl = camel_block_file_get_block (ki->blocks, blockid);
if (bl == NULL) {
@@ -960,7 +966,7 @@ camel_key_table_next (CamelKeyTable *ki, camel_key_t next, gchar **keyp, guint *
return 0;
}
- kb = (CamelKeyBlock *)&bl->data;
+ kb = (CamelKeyBlock *) &bl->data;
/* see if we need to goto the next block */
if (index >= kb->used) {
@@ -976,9 +982,9 @@ camel_key_table_next (CamelKeyTable *ki, camel_key_t next, gchar **keyp, guint *
/*|| kb->u.keys[index].offset < kb->u.keydata - (gchar *)&kb->u.keys[kb->used])*/
|| kb->u.keys[index].offset < sizeof (kb->u.keys[0]) * kb->used
|| (index > 0 &&
- (kb->u.keys[index-1].offset >= sizeof (kb->u.keydata)
+ (kb->u.keys[index - 1].offset >= sizeof (kb->u.keydata)
/*|| kb->u.keys[index-1].offset < kb->u.keydata - (gchar *)&kb->u.keys[kb->used]))) {*/
- || kb->u.keys[index-1].offset < sizeof (kb->u.keys[0]) * kb->used)))) {
+ || kb->u.keys[index - 1].offset < sizeof (kb->u.keys[0]) * kb->used)))) {
g_warning ("Block %u invalid scanning keys", bl->id);
camel_block_file_unref_block (ki->blocks, bl);
CAMEL_KEY_TABLE_UNLOCK (ki, lock);
@@ -998,7 +1004,7 @@ camel_key_table_next (CamelKeyTable *ki, camel_key_t next, gchar **keyp, guint *
if (index == 0)
len = sizeof (kb->u.keydata) - off;
else
- len = kb->u.keys[index-1].offset - off;
+ len = kb->u.keys[index - 1].offset - off;
*keyp = key = g_malloc (len+1);
memcpy (key, kb->u.keydata + off, len);
key[len] = 0;
diff --git a/camel/camel-partition-table.h b/camel/camel-partition-table.h
index 7fe39a7..e577c43 100644
--- a/camel/camel-partition-table.h
+++ b/camel/camel-partition-table.h
@@ -91,7 +91,7 @@ struct _CamelPartitionKey {
struct _CamelPartitionKeyBlock {
guint32 used;
- struct _CamelPartitionKey keys[(CAMEL_BLOCK_SIZE-4)/sizeof (struct _CamelPartitionKey)];
+ struct _CamelPartitionKey keys[(CAMEL_BLOCK_SIZE - 4) / sizeof (struct _CamelPartitionKey)];
};
struct _CamelPartitionMap {
@@ -102,7 +102,7 @@ struct _CamelPartitionMap {
struct _CamelPartitionMapBlock {
camel_block_t next;
guint32 used;
- struct _CamelPartitionMap partition[(CAMEL_BLOCK_SIZE-8)/sizeof (struct _CamelPartitionMap)];
+ struct _CamelPartitionMap partition[(CAMEL_BLOCK_SIZE - 8) / sizeof (struct _CamelPartitionMap)];
};
struct _CamelPartitionTable {
@@ -155,16 +155,16 @@ struct _CamelKeyRootBlock {
struct _CamelKeyKey {
camel_block_t data;
- guint offset:10;
- guint flags:22;
+ guint offset : 10;
+ guint flags : 22;
};
struct _CamelKeyBlock {
camel_block_t next;
guint32 used;
union {
- struct _CamelKeyKey keys[(CAMEL_BLOCK_SIZE-8)/sizeof (struct _CamelKeyKey)];
- gchar keydata[CAMEL_BLOCK_SIZE-8];
+ struct _CamelKeyKey keys[(CAMEL_BLOCK_SIZE - 8) / sizeof (struct _CamelKeyKey)];
+ gchar keydata[CAMEL_BLOCK_SIZE - 8];
} u;
};
diff --git a/camel/camel-provider.c b/camel/camel-provider.c
index 8243c09..751cf02 100644
--- a/camel/camel-provider.c
+++ b/camel/camel-provider.c
@@ -204,7 +204,7 @@ camel_provider_load (const gchar *path,
}
if (!g_module_symbol (module, "camel_provider_module_init",
- (gpointer *)&provider_module_init)) {
+ (gpointer *) &provider_module_init)) {
g_set_error (
error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Could not load %s: No initialization "
@@ -250,7 +250,7 @@ camel_provider_register (CamelProvider *provider)
provider->description = P_(provider->description);
conf = provider->extra_conf;
if (conf) {
- for (i=0;conf[i].type != CAMEL_PROVIDER_CONF_END;i++) {
+ for (i = 0; conf[i].type != CAMEL_PROVIDER_CONF_END; i++) {
if (conf[i].text)
conf[i].text = P_(conf[i].text);
}
@@ -278,7 +278,8 @@ camel_provider_register (CamelProvider *provider)
}
static gint
-provider_compare (gconstpointer a, gconstpointer b)
+provider_compare (gconstpointer a,
+ gconstpointer b)
{
const CamelProvider *cpa = (const CamelProvider *) a;
const CamelProvider *cpb = (const CamelProvider *) b;
@@ -287,7 +288,9 @@ provider_compare (gconstpointer a, gconstpointer b)
}
static void
-add_to_list (gpointer key, gpointer value, gpointer user_data)
+add_to_list (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
GList **list = user_data;
@@ -322,7 +325,7 @@ camel_provider_list (gboolean load)
GList *w;
g_hash_table_foreach (module_table, add_to_list, &list);
- for (w = list;w;w = w->next) {
+ for (w = list; w; w = w->next) {
CamelProviderModule *m = w->data;
if (!m->loaded) {
@@ -365,7 +368,7 @@ camel_provider_get (const gchar *url_string,
g_return_val_if_fail (provider_table != NULL, NULL);
len = strcspn(url_string, ":");
- protocol = g_alloca (len+1);
+ protocol = g_alloca (len + 1);
memcpy (protocol, url_string, len);
protocol[len] = 0;
diff --git a/camel/camel-provider.h b/camel/camel-provider.h
index 68653a1..6e23995 100644
--- a/camel/camel-provider.h
+++ b/camel/camel-provider.h
@@ -199,7 +199,7 @@ typedef struct _CamelProviderModule CamelProviderModule;
struct _CamelProviderModule {
gchar *path;
GSList *types;
- guint loaded:1;
+ guint loaded : 1;
};
void camel_provider_init (void);
diff --git a/camel/camel-sasl-anonymous.c b/camel/camel-sasl-anonymous.c
index b26ee25..0b41f4f 100644
--- a/camel/camel-sasl-anonymous.c
+++ b/camel/camel-sasl-anonymous.c
@@ -144,7 +144,8 @@ camel_sasl_anonymous_init (CamelSaslAnonymous *sasl_anonymous)
* Returns: a new #CamelSasl object
**/
CamelSasl *
-camel_sasl_anonymous_new (CamelSaslAnonTraceType type, const gchar *trace_info)
+camel_sasl_anonymous_new (CamelSaslAnonTraceType type,
+ const gchar *trace_info)
{
CamelSaslAnonymous *sasl_anon;
diff --git a/camel/camel-sasl-digest-md5.c b/camel/camel-sasl-digest-md5.c
index d1c1379..84e5389 100644
--- a/camel/camel-sasl-digest-md5.c
+++ b/camel/camel-sasl-digest-md5.c
@@ -280,7 +280,8 @@ parse_param_list (const gchar *tokens)
}
static guint
-decode_data_type (DataType *dtype, const gchar *name)
+decode_data_type (DataType *dtype,
+ const gchar *name)
{
gint i;
@@ -297,7 +298,8 @@ decode_data_type (DataType *dtype, const gchar *name)
#define decode_cipher(name) decode_data_type (cipher_types, name)
static const gchar *
-type_to_string (DataType *dtype, guint type)
+type_to_string (DataType *dtype,
+ guint type)
{
gint i;
@@ -313,7 +315,8 @@ type_to_string (DataType *dtype, guint type)
#define cipher_to_string(type) type_to_string (cipher_types, type)
static void
-digest_abort (gboolean *have_type, gboolean *abort)
+digest_abort (gboolean *have_type,
+ gboolean *abort)
{
if (*have_type)
*abort = TRUE;
@@ -321,7 +324,8 @@ digest_abort (gboolean *have_type, gboolean *abort)
}
static struct _DigestChallenge *
-parse_server_challenge (const gchar *tokens, gboolean *abort)
+parse_server_challenge (const gchar *tokens,
+ gboolean *abort)
{
struct _DigestChallenge *challenge = NULL;
GList *params, *p;
@@ -462,7 +466,10 @@ digest_uri_to_string (struct _DigestURI *uri)
}
static void
-compute_response (struct _DigestResponse *resp, const gchar *passwd, gboolean client, guchar out[33])
+compute_response (struct _DigestResponse *resp,
+ const gchar *passwd,
+ gboolean client,
+ guchar out[33])
{
GString *buffer;
GChecksum *checksum;
@@ -560,8 +567,11 @@ compute_response (struct _DigestResponse *resp, const gchar *passwd, gboolean cl
}
static struct _DigestResponse *
-generate_response (struct _DigestChallenge *challenge, const gchar *host,
- const gchar *protocol, const gchar *user, const gchar *passwd)
+generate_response (struct _DigestChallenge *challenge,
+ const gchar *host,
+ const gchar *protocol,
+ const gchar *user,
+ const gchar *passwd)
{
struct _DigestResponse *resp;
struct _DigestURI *uri;
diff --git a/camel/camel-sasl-ntlm.c b/camel/camel-sasl-ntlm.c
index 17b1ee5..aa412e1 100644
--- a/camel/camel-sasl-ntlm.c
+++ b/camel/camel-sasl-ntlm.c
@@ -81,7 +81,8 @@ typedef struct {
} SecurityBuffer;
static GString *
-ntlm_get_string (GByteArray *ba, gint offset)
+ntlm_get_string (GByteArray *ba,
+ gint offset)
{
SecurityBuffer *secbuf;
GString *string;
@@ -104,7 +105,10 @@ ntlm_get_string (GByteArray *ba, gint offset)
}
static void
-ntlm_set_string (GByteArray *ba, gint offset, const gchar *data, gint len)
+ntlm_set_string (GByteArray *ba,
+ gint offset,
+ const gchar *data,
+ gint len)
{
SecurityBuffer *secbuf;
@@ -135,7 +139,8 @@ static void setup_schedule (const guchar *key_56, DES_KS ks);
"\x00\x00\x00\x00\x00"
static void
-ntlm_lanmanager_hash (const gchar *password, gchar hash[21])
+ntlm_lanmanager_hash (const gchar *password,
+ gchar hash[21])
{
guchar lm_password[15];
DES_KS ks;
@@ -157,7 +162,8 @@ ntlm_lanmanager_hash (const gchar *password, gchar hash[21])
}
static void
-ntlm_nt_hash (const gchar *password, gchar hash[21])
+ntlm_nt_hash (const gchar *password,
+ gchar hash[21])
{
guchar *buf, *p;
@@ -175,12 +181,13 @@ ntlm_nt_hash (const gchar *password, gchar hash[21])
}
#define KEYBITS(k,s) \
- (((k[(s)/8] << ((s)%8)) & 0xFF) | (k[(s)/8+1] >> (8-(s)%8)))
+ (((k[(s) / 8] << ((s) % 8)) & 0xFF) | (k[(s) / 8 + 1] >> (8 - (s) % 8)))
/* DES utils */
/* Set up a key schedule based on a 56bit key */
static void
-setup_schedule (const guchar *key_56, DES_KS ks)
+setup_schedule (const guchar *key_56,
+ DES_KS ks)
{
guchar key[8];
gint i, c, bit;
@@ -200,8 +207,9 @@ setup_schedule (const guchar *key_56, DES_KS ks)
}
static void
-ntlm_calc_response (const guchar key[21], const guchar plaintext[8],
- guchar results[24])
+ntlm_calc_response (const guchar key[21],
+ const guchar plaintext[8],
+ guchar results[24])
{
DES_KS ks;
@@ -232,7 +240,9 @@ ntlm_calc_response (const guchar key[21], const guchar plaintext[8],
#define ROT(val, n) ( ((val) << (n)) | ((val) >> (32 - (n))) )
static void
-md4sum (const guchar *in, gint nbytes, guchar digest[16])
+md4sum (const guchar *in,
+ gint nbytes,
+ guchar digest[16])
{
guchar *M;
guint32 A, B, C, D, AA, BB, CC, DD, X[16];
@@ -255,10 +265,10 @@ md4sum (const guchar *in, gint nbytes, guchar digest[16])
for (i = 0; i < nbytes + pbytes + 8; i += 64) {
for (j = 0; j < 16; j++) {
- X[j] = (M[i + j*4]) |
- (M[i + j*4 + 1] << 8) |
- (M[i + j*4 + 2] << 16) |
- (M[i + j*4 + 3] << 24);
+ X[j] = (M[i + j * 4]) |
+ (M[i + j * 4 + 1] << 8) |
+ (M[i + j * 4 + 2] << 16) |
+ (M[i + j * 4 + 3] << 24);
}
AA = A;
@@ -489,7 +499,8 @@ static guint32 Spbox[8][64] = {
/* Encrypt or decrypt a block of data in ECB mode */
static void
-des (guint32 ks[16][2], guchar block[8])
+des (guint32 ks[16][2],
+ guchar block[8])
{
guint32 left, right, work;
@@ -622,7 +633,9 @@ static gint bytebit[] = {
* depending on the value of "decrypt"
*/
static void
-deskey (DES_KS k, guchar *key, gint decrypt)
+deskey (DES_KS k,
+ guchar *key,
+ gint decrypt)
{
guchar pc1m[56]; /* place to modify pc1 into */
guchar pcr[56]; /* place to rotate pc1 into */
@@ -640,14 +653,14 @@ deskey (DES_KS k, guchar *key, gint decrypt)
for (i=0; i<16; i++) { /* key chunk for each iteration */
memset (ks,0,sizeof (ks)); /* Clear key schedule */
for (j=0; j<56; j++) /* rotate pc1 the right amount */
- pcr[j] = pc1m[(l=j+totrot[decrypt? 15-i : i])<(j<28? 28 : 56) ? l: l-28];
+ pcr[j] = pc1m[(l = j + totrot[decrypt? 15 - i : i]) < (j < 28? 28 : 56) ? l: l - 28];
/* rotate left and right halves independently */
for (j=0; j<48; j++){ /* select bits individually */
/* check bit that goes to ks[j] */
if (pcr[pc2[j]-1]) {
/* mask it in if it's there */
l= j % 6;
- ks[j/6] |= bytebit[l] >> 2;
+ ks[j / 6] |= bytebit[l] >> 2;
}
}
/* Now convert to packed odd/even interleaved form */
@@ -712,8 +725,8 @@ sasl_ntlm_challenge_sync (CamelSasl *sasl,
(s = camel_stream_read (priv->helper_stream, buf,
sizeof (buf), cancellable, NULL)) > 4 &&
buf[0] == 'K' && buf[1] == 'K' && buf[2] == ' ' &&
- buf[s-1] == '\n') {
- buf[s-1] = 0;
+ buf[s - 1] == '\n') {
+ buf[s - 1] = 0;
data = g_base64_decode (buf + 3, &length);
g_byte_array_append (ret, data, length);
g_free (data);
@@ -724,9 +737,9 @@ sasl_ntlm_challenge_sync (CamelSasl *sasl,
g_free (type2);
}
/* On failure, we just return an empty string. Setting the
- GError would cause the providers to abort the whole
- connection, and we want them to ask the user for a password
- and continue. */
+ * GError would cause the providers to abort the whole
+ * connection, and we want them to ask the user for a password
+ * and continue. */
g_object_unref (priv->helper_stream);
priv->helper_stream = NULL;
return ret;
@@ -760,8 +773,8 @@ sasl_ntlm_challenge_sync (CamelSasl *sasl,
/* Take MD5 of session nonce */
md5 = g_checksum_new (G_CHECKSUM_MD5);
- g_checksum_update (md5, (gpointer)&sess_nonce, 16);
- g_checksum_get_digest (md5, (gpointer)&digest, &digest_len);
+ g_checksum_update (md5, (gpointer) &sess_nonce, 16);
+ g_checksum_get_digest (md5, (gpointer) &digest, &digest_len);
g_checksum_get_digest (md5, digest, &digest_len);
g_checksum_free (md5);
@@ -882,12 +895,12 @@ sasl_ntlm_try_empty_password_sync (CamelSasl *sasl,
g_object_unref (stream);
return FALSE;
}
- if (buf[0] != 'Y' || buf[1] != 'R' || buf[2] != ' ' || buf[s-1] != '\n') {
+ if (buf[0] != 'Y' || buf[1] != 'R' || buf[2] != ' ' || buf[s - 1] != '\n') {
g_object_unref (stream);
return FALSE;
}
- buf[s-1] = 0;
+ buf[s - 1] = 0;
priv->helper_stream = stream;
priv->type1_msg = g_strdup (buf + 3);
diff --git a/camel/camel-search-private.c b/camel/camel-search-private.c
index 36617ce..9b19f86 100644
--- a/camel/camel-search-private.c
+++ b/camel/camel-search-private.c
@@ -45,11 +45,11 @@
/* builds the regex into pattern */
/* taken from camel-folder-search, with added isregex & exception parameter */
/* Basically, we build a new regex, either based on subset regex's, or substrings,
- that can be executed once over the whoel body, to match anything suitable.
- This is more efficient than multiple searches, and probably most (naive) strstr
- implementations, over long content.
-
- A small issue is that case-insenstivity wont work entirely correct for utf8 strings. */
+ * that can be executed once over the whoel body, to match anything suitable.
+ * This is more efficient than multiple searches, and probably most (naive) strstr
+ * implementations, over long content.
+ *
+ * A small issue is that case-insenstivity wont work entirely correct for utf8 strings. */
gint
camel_search_build_match_regex (regex_t *pattern,
camel_search_flags_t type,
@@ -58,12 +58,12 @@ camel_search_build_match_regex (regex_t *pattern,
GError **error)
{
GString *match = g_string_new("");
- gint c, i, count=0, err;
+ gint c, i, count = 0, err;
gchar *word;
gint flags;
/* build a regex pattern we can use to match the words, we OR them together */
- if (argc>1)
+ if (argc > 1)
g_string_append_c (match, '(');
for (i = 0; i < argc; i++) {
if (argv[i]->type == ESEXP_RES_STRING) {
@@ -94,7 +94,7 @@ camel_search_build_match_regex (regex_t *pattern,
}
if (argc > 1)
g_string_append_c (match, ')');
- flags = REG_EXTENDED|REG_NOSUB;
+ flags = REG_EXTENDED | REG_NOSUB;
if (type & CAMEL_SEARCH_MATCH_ICASE)
flags |= REG_ICASE;
if (type & CAMEL_SEARCH_MATCH_NEWLINE)
@@ -102,7 +102,7 @@ camel_search_build_match_regex (regex_t *pattern,
err = regcomp (pattern, match->str, flags);
if (err != 0) {
/* regerror gets called twice to get the full error string
- length to do proper posix error reporting */
+ * length to do proper posix error reporting */
gint len = regerror (err, pattern, NULL, 0);
gchar *buffer = g_malloc0 (len + 1);
@@ -140,7 +140,8 @@ static guchar soundex_table[256] = {
};
static void
-soundexify (const gchar *sound, gchar code[5])
+soundexify (const gchar *sound,
+ gchar code[5])
{
guchar *c, last = '\0';
gint n;
@@ -160,7 +161,8 @@ soundexify (const gchar *sound, gchar code[5])
}
static gboolean
-header_soundex (const gchar *header, const gchar *match)
+header_soundex (const gchar *header,
+ const gchar *match)
{
gchar mcode[5], hcode[5];
const gchar *p;
@@ -172,7 +174,7 @@ header_soundex (const gchar *header, const gchar *match)
/* split the header into words, and soundexify and compare each one */
/* FIXME: Should this convert to utf8, and split based on that, and what not?
- soundex only makes sense for us-ascii though ... */
+ * soundex only makes sense for us-ascii though ... */
word = g_string_new("");
p = header;
@@ -194,7 +196,8 @@ header_soundex (const gchar *header, const gchar *match)
}
const gchar *
-camel_ustrstrcase (const gchar *haystack, const gchar *needle)
+camel_ustrstrcase (const gchar *haystack,
+ const gchar *needle)
{
gunichar *nuni, *puni;
gunichar u;
@@ -259,7 +262,8 @@ camel_ustrstrcase (const gchar *haystack, const gchar *needle)
} G_STMT_END
static gint
-camel_ustrcasecmp (const gchar *ps1, const gchar *ps2)
+camel_ustrcasecmp (const gchar *ps1,
+ const gchar *ps2)
{
gunichar u1, u2 = 0;
const guchar *s1 = (const guchar *) ps1;
@@ -291,7 +295,9 @@ camel_ustrcasecmp (const gchar *ps1, const gchar *ps2)
}
static gint
-camel_ustrncasecmp (const gchar *ps1, const gchar *ps2, gsize len)
+camel_ustrncasecmp (const gchar *ps1,
+ const gchar *ps2,
+ gsize len)
{
gunichar u1, u2 = 0;
const guchar *s1 = (const guchar *) ps1;
@@ -328,7 +334,9 @@ camel_ustrncasecmp (const gchar *ps1, const gchar *ps2, gsize len)
/* value is the match value suitable for exact match if required */
static gint
-header_match (const gchar *value, const gchar *match, camel_search_match_t how)
+header_match (const gchar *value,
+ const gchar *match,
+ camel_search_match_t how)
{
const guchar *p;
gint vlen, mlen;
@@ -343,7 +351,7 @@ header_match (const gchar *value, const gchar *match, camel_search_match_t how)
return FALSE;
/* from dan the man, if we have mixed case, perform a case-sensitive match,
- otherwise not */
+ * otherwise not */
p = (const guchar *) match;
while ((c = camel_utf8_getc (&p))) {
if (g_unichar_isupper (c)) {
@@ -380,9 +388,13 @@ header_match (const gchar *value, const gchar *match, camel_search_match_t how)
}
/* searhces for match inside value, if match is mixed case, hten use case-sensitive,
- else insensitive */
+ * else insensitive */
gboolean
-camel_search_header_match (const gchar *value, const gchar *match, camel_search_match_t how, camel_search_t type, const gchar *default_charset)
+camel_search_header_match (const gchar *value,
+ const gchar *match,
+ camel_search_match_t how,
+ camel_search_t type,
+ const gchar *default_charset)
{
const gchar *name, *addr;
const guchar *ptr;
@@ -403,20 +415,20 @@ camel_search_header_match (const gchar *value, const gchar *match, camel_search_
break;
case CAMEL_SEARCH_TYPE_MLIST:
/* Special mailing list old-version domain hack
- If one of the mailing list names doesn't have an @ in it, its old-style, so
- only match against the pre-domain part, which should be common */
+ * If one of the mailing list names doesn't have an @ in it, its old-style, so
+ * only match against the pre-domain part, which should be common */
vdom = strchr (value, '@');
mdom = strchr (match, '@');
if (mdom == NULL && vdom != NULL) {
- v = g_alloca (vdom-value+1);
- memcpy (v, value, vdom-value);
- v[vdom-value] = 0;
+ v = g_alloca (vdom - value + 1);
+ memcpy (v, value, vdom - value);
+ v[vdom - value] = 0;
value = (gchar *) v;
} else if (mdom != NULL && vdom == NULL) {
- v = g_alloca (mdom-match+1);
- memcpy (v, match, mdom-match);
- v[mdom-match] = 0;
+ v = g_alloca (mdom - match + 1);
+ memcpy (v, match, mdom - match);
+ v[mdom - match] = 0;
match = (gchar *) v;
}
/* Falls through */
@@ -436,7 +448,7 @@ camel_search_header_match (const gchar *value, const gchar *match, camel_search_
else
camel_address_unformat ((CamelAddress *) cia, value);
- for (i=0; !truth && camel_internet_address_get (cia, i, &name, &addr);i++)
+ 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));
g_object_unref (cia);
@@ -449,7 +461,8 @@ camel_search_header_match (const gchar *value, const gchar *match, camel_search_
/* performs a 'slow' content-based match */
/* there is also an identical copy of this in camel-filter-search.c */
gboolean
-camel_search_message_body_contains (CamelDataWrapper *object, regex_t *pattern)
+camel_search_message_body_contains (CamelDataWrapper *object,
+ regex_t *pattern)
{
CamelDataWrapper *containee;
gint truth = FALSE;
@@ -490,7 +503,9 @@ camel_search_message_body_contains (CamelDataWrapper *object, regex_t *pattern)
}
static void
-output_c (GString *w, guint32 c, gint *type)
+output_c (GString *w,
+ guint32 c,
+ gint *type)
{
gint utf8len;
gchar utf8[8];
@@ -510,7 +525,9 @@ output_c (GString *w, guint32 c, gint *type)
}
static void
-output_w (GString *w, GPtrArray *list, gint type)
+output_w (GString *w,
+ GPtrArray *list,
+ gint type)
{
struct _camel_search_word *word;
@@ -573,7 +590,7 @@ camel_search_words_split (const guchar *in)
}
/* takes an existing 'words' list, and converts it to another consisting of
- only simple words, with any punctuation etc stripped */
+ * only simple words, with any punctuation etc stripped */
struct _camel_search_words *
camel_search_words_simple (struct _camel_search_words *wordin)
{
@@ -587,7 +604,7 @@ camel_search_words_simple (struct _camel_search_words *wordin)
words = g_malloc0 (sizeof (*words));
- for (i=0;i<wordin->len;i++) {
+ for (i = 0; i < wordin->len; i++) {
if ((wordin->words[i]->type & CAMEL_SEARCH_WORD_COMPLEX) == 0) {
word = g_malloc0 (sizeof (*word));
word->type = wordin->words[i]->type;
@@ -601,7 +618,7 @@ camel_search_words_simple (struct _camel_search_words *wordin)
if (c == 0 || !g_unichar_isalnum (c)) {
if (last > start) {
word = g_malloc0 (sizeof (*word));
- word->word = g_strndup ((gchar *) start, last-start);
+ word->word = g_strndup ((gchar *) start, last - start);
word->type = type;
g_ptr_array_add (list, word);
all |= type;
@@ -629,7 +646,7 @@ camel_search_words_free (struct _camel_search_words *words)
{
gint i;
- for (i=0;i<words->len;i++) {
+ for (i = 0; i < words->len; i++) {
struct _camel_search_word *word = words->words[i];
g_free (word->word);
diff --git a/camel/camel-search-sql-sexp.c b/camel/camel-search-sql-sexp.c
index 128ddb4..f5fb023 100644
--- a/camel/camel-search-sql-sexp.c
+++ b/camel/camel-search-sql-sexp.c
@@ -20,8 +20,8 @@
*/
/* This is a helper class for folders to implement the search function.
- It implements enough to do basic searches on folders that can provide
- an in-memory summary and a body index. */
+ * It implements enough to do basic searches on folders that can provide
+ * an in-memory summary and a body index. */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -78,7 +78,10 @@ get_db_safe_string (const gchar *str)
/* Configuration of your sexp expression */
static ESExpResult *
-func_and (ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+func_and (ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ gpointer data)
{
ESExpResult *r, *r1;
GString *string;
@@ -111,7 +114,10 @@ func_and (ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
}
static ESExpResult *
-func_or (ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+func_or (ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ gpointer data)
{
ESExpResult *r, *r1;
GString *string;
@@ -139,9 +145,12 @@ func_or (ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
}
static ESExpResult *
-func_not (ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+func_not (ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ gpointer data)
{
- ESExpResult *r=NULL, *r1;
+ ESExpResult *r = NULL, *r1;
d(printf("executing not: %d", argc));
r1 = e_sexp_term_eval (f, argv[0]);
@@ -162,7 +171,10 @@ func_not (ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
/* this should support all arguments ...? */
static ESExpResult *
-eval_eq (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+eval_eq (struct _ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ gpointer data)
{
struct _ESExpResult *r, *r1, *r2;
@@ -215,7 +227,10 @@ eval_eq (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
}
static ESExpResult *
-eval_lt (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+eval_lt (struct _ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ gpointer data)
{
struct _ESExpResult *r, *r1, *r2;
@@ -254,7 +269,10 @@ eval_lt (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
/* this should support all arguments ...? */
static ESExpResult *
-eval_gt (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+eval_gt (struct _ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ gpointer data)
{
struct _ESExpResult *r, *r1, *r2;
@@ -292,7 +310,10 @@ eval_gt (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
}
static ESExpResult *
-match_all (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+match_all (struct _ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ gpointer data)
{
ESExpResult *r;
@@ -312,7 +333,10 @@ match_all (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
}
static ESExpResult *
-match_threads (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+match_threads (struct _ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ gpointer data)
{
ESExpResult *r;
gint i;
@@ -320,7 +344,7 @@ match_threads (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer d
d(printf("executing match-threads: %d", argc));
- for (i=1;i<argc;i++) {
+ for (i = 1; i < argc; i++) {
r = e_sexp_term_eval (f, argv[i]);
g_string_append_printf(str, "%s%s", r->value.string, ((argc>1) && (i != argc-1)) ? " AND ":"");
e_sexp_result_free (f, r);
@@ -335,15 +359,19 @@ match_threads (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer d
}
static ESExpResult *
-check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data, camel_search_match_t how)
+check_header (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data,
+ camel_search_match_t how)
{
ESExpResult *r;
- gchar *str=NULL;
+ gchar *str = NULL;
d(printf("executing check-header %d\n", how));
/* are we inside a match-all? */
- if (argc>1 && argv[0]->type == ESEXP_RES_STRING) {
+ if (argc > 1 && argv[0]->type == ESEXP_RES_STRING) {
gchar *headername;
gint i;
@@ -351,9 +379,9 @@ check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
headername = camel_db_get_column_name (argv[0]->value.string);
/* performs an OR of all words */
- for (i=1;i<argc;i++) {
+ for (i = 1; i < argc; i++) {
if (argv[i]->type == ESEXP_RES_STRING) {
- gchar *value=NULL, *tstr=NULL;
+ gchar *value = NULL, *tstr = NULL;
if (argv[i]->value.string[0] == 0)
continue;
if (how == CAMEL_SEARCH_MATCH_CONTAINS) {
@@ -388,7 +416,10 @@ check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
}
static ESExpResult *
-header_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+header_contains (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
d(printf("executing header-contains: %d", argc));
@@ -396,7 +427,10 @@ header_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpoint
}
static ESExpResult *
-header_matches (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+header_matches (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
d(printf("executing header-matches: %d", argc));
@@ -404,7 +438,10 @@ header_matches (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointe
}
static ESExpResult *
-header_starts_with (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+header_starts_with (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
d(printf("executing header-starts-with: %d", argc));
@@ -412,7 +449,10 @@ header_starts_with (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpo
}
static ESExpResult *
-header_ends_with (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+header_ends_with (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
d(printf("executing header-ends-with: %d", argc));
@@ -420,7 +460,10 @@ header_ends_with (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpoin
}
static ESExpResult *
-header_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+header_exists (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
ESExpResult *r;
gchar *headername;
@@ -435,7 +478,10 @@ header_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
}
static ESExpResult *
-user_tag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+user_tag (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
ESExpResult *r;
@@ -454,7 +500,10 @@ user_tag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data
}
static ESExpResult *
-user_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+user_flag (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
ESExpResult *r;
gchar *tstr, *qstr;
@@ -477,7 +526,10 @@ user_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer dat
}
static ESExpResult *
-system_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+system_flag (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
ESExpResult *r;
gchar *tstr;
@@ -498,7 +550,10 @@ system_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer d
}
static ESExpResult *
-get_sent_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+get_sent_date (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
ESExpResult *r;
@@ -511,7 +566,10 @@ get_sent_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
}
static ESExpResult *
-get_received_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+get_received_date (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
ESExpResult *r;
@@ -524,7 +582,10 @@ get_received_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpoi
}
static ESExpResult *
-get_current_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+get_current_date (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
ESExpResult *r;
@@ -536,7 +597,10 @@ get_current_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpoin
}
static ESExpResult *
-get_relative_months (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+get_relative_months (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
ESExpResult *r;
@@ -556,7 +620,10 @@ get_relative_months (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gp
}
static ESExpResult *
-get_size (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+get_size (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
ESExpResult *r;
@@ -569,7 +636,10 @@ get_size (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data
}
static ESExpResult *
-sql_exp (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+sql_exp (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
ESExpResult *r;
gint i;
@@ -578,7 +648,7 @@ sql_exp (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
d(printf("executing sql-exp\n"));
r = e_sexp_result_new (f, ESEXP_RES_STRING);
- for (i=0;i<argc;i++) {
+ for (i = 0; i < argc; i++) {
if (argv[i]->type == ESEXP_RES_STRING && argv[i]->value.string)
g_string_append (str, argv[i]->value.string);
}
@@ -668,26 +738,26 @@ camel_sexp_to_sql_sexp (const gchar *sql)
#ifdef TEST_MAIN
/*
-
-(and (match-all (and (not (system-flag "deleted")) (not (system-flag "junk"))))
- (and (or
-
- (match-all (not (system-flag "Attachments")))
-
- )
- ))
-
-"
-replied INTEGER , (match-all (system-flag "Answered"))
-size INTEGER , (match-all (< (get-size) 100))
-dsent NUMERIC , (match-all (< (get-sent-date) (- (get-current-date) 10)))
-dreceived NUMERIC , (match-all (< (get-received-date) (- (get-current-date) 10)))
-//mlist TEXT , x-camel-mlist (match-all (header-matches "x-camel-mlist" "gnome.org"))
-//attachment, system-flag "Attachments" (match-all (system-flag "Attachments"))
-//followup_flag TEXT , (match-all (not (= (user-tag "follow-up") "")))
-//followup_completed_on TEXT , (match-all (not (= (user-tag "completed-on") "")))
-//followup_due_by TEXT ," //NOTREQD
-*/
+ *
+ * (and (match-all (and (not (system-flag "deleted")) (not (system-flag "junk"))))
+ * (and (or
+ *
+ * (match-all (not (system-flag "Attachments")))
+ *
+ * )
+ * ))
+ *
+ *"
+ * replied INTEGER , (match-all (system-flag "Answered"))
+ * size INTEGER , (match-all (< (get-size) 100))
+ * dsent NUMERIC , (match-all (< (get-sent-date) (- (get-current-date) 10)))
+ * dreceived NUMERIC , (match-all (< (get-received-date) (- (get-current-date) 10)))
+ * //mlist TEXT , x-camel-mlist (match-all (header-matches "x-camel-mlist" "gnome.org"))
+ * //attachment, system-flag "Attachments" (match-all (system-flag "Attachments"))
+ * //followup_flag TEXT , (match-all (not (= (user-tag "follow-up") "")))
+ * //followup_completed_on TEXT , (match-all (not (= (user-tag "completed-on") "")))
+ * //followup_due_by TEXT ," //NOTREQD
+ */
gchar * camel_db_get_column_name (const gchar *raw_name)
{
@@ -720,9 +790,9 @@ gchar * camel_db_get_column_name (const gchar *raw_name)
return g_strdup ("mlist");
else {
/* Let it crash for all unknown columns for now.
- We need to load the messages into memory and search etc.
- We should extend this for camel-folder-search system flags search as well
- otherwise, search-for-signed-messages will not work etc.*/
+ * We need to load the messages into memory and search etc.
+ * We should extend this for camel-folder-search system flags search as well
+ * otherwise, search-for-signed-messages will not work etc.*/
return g_strdup (raw_name);
}
@@ -732,7 +802,7 @@ gchar * camel_db_get_column_name (const gchar *raw_name)
gint main ()
{
- gint i=0;
+ gint i = 0;
gchar *txt[] = {
#if 0
"(match-all (header-contains \"From\" \"org\"))",
@@ -781,7 +851,7 @@ gint main ()
"(and (match-all (and (not (system-flag \"deleted\")) (not (system-flag \"junk\")))) (and (or (match-all list-post.*zypp-devel) ) ))"
};
- for (i=0; i < G_N_ELEMENTS (txt); i++) {
+ for (i = 0; i < G_N_ELEMENTS (txt); i++) {
gchar *sql = NULL;
printf("Q: %s\n\"%c\"\n", txt[i], 40);
sql = camel_sexp_to_sql_sexp (txt[i]);
diff --git a/camel/camel-search-sql.c b/camel/camel-search-sql.c
index 96d20ba..131096b 100644
--- a/camel/camel-search-sql.c
+++ b/camel/camel-search-sql.c
@@ -20,8 +20,8 @@
*/
/* This is a helper class for folders to implement the search function.
- It implements enough to do basic searches on folders that can provide
- an in-memory summary and a body index. */
+ * It implements enough to do basic searches on folders that can provide
+ * an in-memory summary and a body index. */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -95,10 +95,10 @@ static GScannerConfig config =
};
typedef struct Node {
- gchar *token; /* Token to search*/
+ gchar *token; /* Token to search */
gchar *exact_token; /* Token to substitute */
gint nodes; /* Number of nodes to process */
- gchar pre_token; /* Pre token to prepend with value substitute*/
+ gchar pre_token; /* Pre token to prepend with value substitute */
gchar post_token; /* post token to apppend with substitute */
gchar rval; /* rhs value for binary ops */
gint level; /* depth in the hier */
@@ -107,8 +107,8 @@ typedef struct Node {
guint ignore_lhs:1; /* ignore lhs value ?*/
guint swap :1;
guint prenode :1;
- guint operator:1;
- guint execute:1;
+ guint operator : 1;
+ guint execute : 1;
gint ref;
}Node;
@@ -210,13 +210,13 @@ gchar *
camel_sexp_to_sql (const gchar *txt)
{
GScanner *scanner = g_scanner_new (&config);
- gchar *sql=NULL;
+ gchar *sql = NULL;
gint level = 0;
GList *tlist;
- GList *operators=NULL, *operands=NULL, *all=NULL, *preserve=NULL;
+ GList *operators = NULL, *operands = NULL, *all = NULL, *preserve = NULL;
GList *tmp;
- Node *n1=NULL, *n2=NULL, *n3=NULL, *last, *lastoper=NULL;
- GList *res=NULL;
+ Node *n1 = NULL, *n2 = NULL, *n3 = NULL, *last, *lastoper = NULL;
+ GList *res = NULL;
gboolean last_sysnode = FALSE;
d(printf("len = %d\n", strlen (txt)));
@@ -253,7 +253,7 @@ camel_sexp_to_sql (const gchar *txt)
gint i;
Node *node;
- for (i=0; i < G_N_ELEMENTS (elements); i++) {
+ for (i = 0; i < G_N_ELEMENTS (elements); i++) {
if (g_ascii_strcasecmp (elements[i].token, token) == 0) {
if (!*elements[i].exact_token) /* Skip match-all */ {
@@ -263,7 +263,7 @@ camel_sexp_to_sql (const gchar *txt)
/* remove next node also. We dont support it*/
g_scanner_get_next_token (scanner);
/* Put a 'or' so that everything comes up. It hardly matter. It is just to start loading
- operator */
+ * operator */
node = g_new0 (Node, 1);
node->token = g_strdup ("or");
@@ -322,7 +322,7 @@ camel_sexp_to_sql (const gchar *txt)
} else
node->exact_token = g_strdup (token);
- node->nodes = pnode->nodes > 0 ? pnode->nodes - 1:0;
+ node->nodes = pnode->nodes > 0 ? pnode->nodes - 1 : 0;
node->prefix = 0;
node->rval = ' ';
node->level = level;
@@ -351,9 +351,9 @@ camel_sexp_to_sql (const gchar *txt)
operators = g_list_prepend (operators, node);
all = g_list_prepend (all, node);
} else if (token == '+') {
- gchar *astr=NULL, *bstr=NULL;
+ gchar *astr = NULL, *bstr = NULL;
Node *node, *pnode = operands->data;
- gint lvl=0, lval=0;
+ gint lvl = 0, lval = 0;
if (g_ascii_strcasecmp (pnode->token, "user-flag") == 0) {
/* Colloct all after '+' and append them to one token. Go till you find ')' */
@@ -400,7 +400,7 @@ camel_sexp_to_sql (const gchar *txt)
node = g_new0 (Node, 1);
node->token = bstr;
node->exact_token = g_strdup (bstr);
- node->nodes = pnode->nodes > 0 ? pnode->nodes - 1:0;
+ node->nodes = pnode->nodes > 0 ? pnode->nodes - 1 : 0;
node->prefix = 0;
node->rval = ' ';
node->level = new_level == -1 ? level : new_level;
@@ -411,9 +411,9 @@ camel_sexp_to_sql (const gchar *txt)
new_level = -1;
level--;
} else if (token == '-') {
- gchar *bstr=NULL;
+ gchar *bstr = NULL;
Node *node, *pnode = operands->data;
- gint lvl=0, lval=0;
+ gint lvl = 0, lval = 0;
/* Colloct all after '+' and append them to one token. Go till you find ')' */
token = g_scanner_get_next_token (scanner);
@@ -444,7 +444,7 @@ camel_sexp_to_sql (const gchar *txt)
node = g_new0 (Node, 1);
node->token = bstr;
node->exact_token = g_strdup_printf("%ld", (glong)lval);
- node->nodes = pnode->nodes > 0 ? pnode->nodes - 1:0;
+ node->nodes = pnode->nodes > 0 ? pnode->nodes - 1 : 0;
node->prefix = 0;
node->rval = ' ';
node->level = level;
@@ -475,7 +475,7 @@ camel_sexp_to_sql (const gchar *txt)
node = g_new0 (Node, 1);
node->token = g_strdup_printf ("%ld", scanner->value.v_int);
node->exact_token = g_strdup_printf ("%ld", scanner->value.v_int);
- node->nodes = pnode->nodes > 0 ? pnode->nodes - 1:0;
+ node->nodes = pnode->nodes > 0 ? pnode->nodes - 1 : 0;
node->prefix = 0;
node->rval = ' ';
node->level = level;
@@ -501,7 +501,7 @@ camel_sexp_to_sql (const gchar *txt)
gint len = 2;
Node *pnode;
- n1=NULL; n2=NULL; n3=NULL;
+ n1 = NULL; n2 = NULL; n3 = NULL;
tmp = operands;
n1 = operands->data;
operands = g_list_delete_link (operands, operands);
@@ -650,7 +650,7 @@ camel_sexp_to_sql (const gchar *txt)
}
if (n2->execute) {
- Node *popnode=NULL;
+ Node *popnode = NULL;
gboolean dbl = FALSE;
/* g_node_dump (operators); */
@@ -728,9 +728,9 @@ camel_sexp_to_sql (const gchar *txt)
d (g_node_dump (all));
d(printf("\n\n\n"));
- res=NULL;
+ res = NULL;
tmp = all;
- n1=NULL;
+ n1 = NULL;
/* Time to operate on the stack. */
tmp = all;
@@ -754,7 +754,7 @@ camel_sexp_to_sql (const gchar *txt)
if (!res)
break;
if (res->next) {
- GList *ts=res;
+ GList *ts = res;
Node *n = ts->data;
GString *s = g_string_new (NULL);
@@ -875,28 +875,29 @@ camel_sexp_to_sql (const gchar *txt)
#ifdef TEST_MAIN
/*
+ *
+ * (and (match-all (and (not (system-flag "deleted")) (not (system-flag "junk"))))
+ * (and (or
+ *
+ * (match-all (not (system-flag "Attachments")))
+ *
+ * )
+ * ))
+ *
+ * "
+ * replied INTEGER , (match-all (system-flag "Answered"))
+ * size INTEGER , (match-all (< (get-size) 100))
+ * dsent NUMERIC , (match-all (< (get-sent-date) (- (get-current-date) 10)))
+ * dreceived NUMERIC , (match-all (< (get-received-date) (- (get-current-date) 10)))
+ * //mlist TEXT , x-camel-mlist (match-all (header-matches "x-camel-mlist" "gnome.org"))
+ * //attachment, system-flag "Attachments" (match-all (system-flag "Attachments"))
+ * //followup_flag TEXT , (match-all (not (= (user-tag "follow-up") "")))
+ * //followup_completed_on TEXT , (match-all (not (= (user-tag "completed-on") "")))
+ * //followup_due_by TEXT ," //NOTREQD
+ */
-(and (match-all (and (not (system-flag "deleted")) (not (system-flag "junk"))))
- (and (or
-
- (match-all (not (system-flag "Attachments")))
-
- )
- ))
-
-"
-replied INTEGER , (match-all (system-flag "Answered"))
-size INTEGER , (match-all (< (get-size) 100))
-dsent NUMERIC , (match-all (< (get-sent-date) (- (get-current-date) 10)))
-dreceived NUMERIC , (match-all (< (get-received-date) (- (get-current-date) 10)))
-//mlist TEXT , x-camel-mlist (match-all (header-matches "x-camel-mlist" "gnome.org"))
-//attachment, system-flag "Attachments" (match-all (system-flag "Attachments"))
-//followup_flag TEXT , (match-all (not (= (user-tag "follow-up") "")))
-//followup_completed_on TEXT , (match-all (not (= (user-tag "completed-on") "")))
-//followup_due_by TEXT ," //NOTREQD
-*/
-
-gchar * camel_db_get_column_name (const gchar *raw_name)
+gchar *
+camel_db_get_column_name (const gchar *raw_name)
{
d(g_print ("\n\aRAW name is : [%s] \n\a", raw_name));
if (!g_ascii_strcasecmp (raw_name, "Subject"))
@@ -927,9 +928,9 @@ gchar * camel_db_get_column_name (const gchar *raw_name)
return g_strdup ("mlist");
else {
/* Let it crash for all unknown columns for now.
- We need to load the messages into memory and search etc.
- We should extend this for camel-folder-search system flags search as well
- otherwise, search-for-signed-messages will not work etc.*/
+ * We need to load the messages into memory and search etc.
+ * We should extend this for camel-folder-search system flags search as well
+ * otherwise, search-for-signed-messages will not work etc.*/
return g_strdup (raw_name);
}
@@ -939,7 +940,7 @@ gchar * camel_db_get_column_name (const gchar *raw_name)
gint main ()
{
- gint i=0;
+ gint i = 0;
gchar *txt[] = {
"(and (and (match-all (header-contains \"From\" \"org\")) ) (match-all (not (system-flag \"junk\"))))",
"(and (and (match-all (header-contains \"From\" \"org\"))) (and (match-all (not (system-flag \"junk\"))) (and (or (match-all (header-contains \"Subject\" \"test\")) (match-all (header-contains \"From\" \"test\"))))))",
@@ -979,7 +980,7 @@ gint main ()
};
- for (i=0; i < G_N_ELEMENTS (txt); i++) {
+ for (i = 0; i < G_N_ELEMENTS (txt); i++) {
gchar *sql;
printf("Q: %s\n\n", txt[i]);
sql = camel_sexp_to_sql (txt[i]);
diff --git a/camel/camel-session.c b/camel/camel-session.c
index 893fa12..e73e7c7 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -590,7 +590,8 @@ camel_session_add_service (CamelSession *session,
* Since: 3.2
**/
gboolean
-camel_session_remove_service (CamelSession *session, const gchar *uid)
+camel_session_remove_service (CamelSession *session,
+ const gchar *uid)
{
gboolean removed;
@@ -1203,7 +1204,7 @@ camel_session_set_junk_headers (CamelSession *session,
session->priv->junk_headers = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
- for (i=0; i<len; i++) {
+ for (i = 0; i < len; i++) {
g_hash_table_insert (session->priv->junk_headers, g_strdup (headers[i]), g_strdup (values[i]));
}
}
@@ -1322,7 +1323,9 @@ camel_session_unlock (CamelSession *session,
* Since: 2.32
*/
void
-camel_session_set_socks_proxy (CamelSession *session, const gchar *socks_host, gint socks_port)
+camel_session_set_socks_proxy (CamelSession *session,
+ const gchar *socks_host,
+ gint socks_port)
{
g_return_if_fail (CAMEL_IS_SESSION (session));
@@ -1350,7 +1353,9 @@ camel_session_set_socks_proxy (CamelSession *session, const gchar *socks_host, g
* Since: 2.32
*/
void
-camel_session_get_socks_proxy (CamelSession *session, gchar **host_ret, gint *port_ret)
+camel_session_get_socks_proxy (CamelSession *session,
+ gchar **host_ret,
+ gint *port_ret)
{
g_return_if_fail (CAMEL_IS_SESSION (session));
g_return_if_fail (host_ret != NULL);
diff --git a/camel/camel-smime-context.c b/camel/camel-smime-context.c
index efdbc34..772d5e9 100644
--- a/camel/camel-smime-context.c
+++ b/camel/camel-smime-context.c
@@ -68,7 +68,7 @@ struct _CamelSMIMEContextPrivate {
camel_smime_sign_t sign_mode;
gint password_tries;
- guint send_encrypt_key_prefs:1;
+ guint send_encrypt_key_prefs : 1;
};
G_DEFINE_TYPE (CamelSMIMEContext, camel_smime_context, CAMEL_TYPE_CIPHER_CONTEXT)
@@ -91,13 +91,16 @@ smime_cert_data_clone (gpointer cert_data)
/* used for decode content callback, for streaming decode */
static void
-sm_write_stream (gpointer arg, const gchar *buf, gulong len)
+sm_write_stream (gpointer arg,
+ const gchar *buf,
+ gulong len)
{
camel_stream_write ((CamelStream *) arg, buf, len, NULL, NULL);
}
static PK11SymKey *
-sm_decrypt_key (gpointer arg, SECAlgorithmID *algid)
+sm_decrypt_key (gpointer arg,
+ SECAlgorithmID *algid)
{
printf ("Decrypt key called\n");
return (PK11SymKey *) arg;
@@ -551,7 +554,7 @@ sm_verify_cmsg (CamelCipherContext *context,
status = NSSCMSVS_Unverified;
/* NB: this probably needs to go into a decoding routine that can be used for processing
- enveloped data too */
+ * enveloped data too */
count = NSS_CMSMessage_ContentLevelCount (cmsg);
for (i = 0; i < count; i++) {
NSSCMSContentInfo *cinfo = NSS_CMSMessage_ContentLevel (cmsg, i);
@@ -1036,13 +1039,13 @@ smime_context_encrypt_sync (CamelCipherContext *context,
}
/* Lookup all recipients certs, for later working */
- recipient_certs = (CERTCertificate **) PORT_ArenaZAlloc (poolp, sizeof (*recipient_certs[0])*(recipients->len + 1));
+ recipient_certs = (CERTCertificate **) PORT_ArenaZAlloc (poolp, sizeof (*recipient_certs[0]) * (recipients->len + 1));
if (recipient_certs == NULL) {
set_nss_error (error, g_strerror (ENOMEM));
goto fail;
}
- for (i=0;i<recipients->len;i++) {
+ for (i = 0; i < recipients->len; i++) {
recipient_certs[i] = CERT_FindCertByNicknameOrEmailAddr (p->certdb, recipients->pdata[i]);
if (recipient_certs[i] == NULL) {
g_set_error (
@@ -1067,7 +1070,7 @@ smime_context_encrypt_sync (CamelCipherContext *context,
goto fail;
}
- bulkkey = PK11_KeyGen (slot, type, NULL, bulkkeysize/8, context);
+ bulkkey = PK11_KeyGen (slot, type, NULL, bulkkeysize / 8, context);
PK11_FreeSlot (slot);
/* Now we can start building the message */
@@ -1097,7 +1100,7 @@ smime_context_encrypt_sync (CamelCipherContext *context,
}
/* add recipient certs */
- for (i=0;recipient_certs[i];i++) {
+ for (i = 0; recipient_certs[i]; i++) {
NSSCMSRecipientInfo *ri = NSS_CMSRecipientInfo_Create (cmsg, recipient_certs[i]);
if (ri == NULL) {
@@ -1143,7 +1146,7 @@ smime_context_encrypt_sync (CamelCipherContext *context,
PK11_FreeSymKey (bulkkey);
NSS_CMSMessage_Destroy (cmsg);
- for (i=0;recipient_certs[i];i++)
+ for (i = 0; recipient_certs[i]; i++)
CERT_DestroyCertificate (recipient_certs[i]);
PORT_FreeArena (poolp, PR_FALSE);
@@ -1178,7 +1181,7 @@ fail:
PK11_FreeSymKey (bulkkey);
if (recipient_certs) {
- for (i=0;recipient_certs[i];i++)
+ for (i = 0; recipient_certs[i]; i++)
CERT_DestroyCertificate (recipient_certs[i]);
}
@@ -1202,7 +1205,7 @@ smime_context_decrypt_sync (CamelCipherContext *context,
GByteArray *buffer;
/* FIXME: This assumes the content is only encrypted. Perhaps its ok for
- this api to do this ... */
+ * this api to do this ... */
ostream = camel_stream_mem_new ();
camel_stream_mem_set_secure (CAMEL_STREAM_MEM (ostream));
@@ -1318,7 +1321,9 @@ camel_smime_context_new (CamelSession *session)
}
void
-camel_smime_context_set_encrypt_key (CamelSMIMEContext *context, gboolean use, const gchar *key)
+camel_smime_context_set_encrypt_key (CamelSMIMEContext *context,
+ gboolean use,
+ const gchar *key)
{
context->priv->send_encrypt_key_prefs = use;
g_free (context->priv->encrypt_key);
@@ -1327,14 +1332,16 @@ camel_smime_context_set_encrypt_key (CamelSMIMEContext *context, gboolean use, c
/* set signing mode, clearsigned multipart/signed or enveloped */
void
-camel_smime_context_set_sign_mode (CamelSMIMEContext *context, camel_smime_sign_t type)
+camel_smime_context_set_sign_mode (CamelSMIMEContext *context,
+ camel_smime_sign_t type)
{
context->priv->sign_mode = type;
}
/* TODO: This is suboptimal, but the only other solution is to pass around NSSCMSMessages */
guint32
-camel_smime_context_describe_part (CamelSMIMEContext *context, CamelMimePart *part)
+camel_smime_context_describe_part (CamelSMIMEContext *context,
+ CamelMimePart *part)
{
CamelCipherContextClass *class;
guint32 flags = 0;
diff --git a/camel/camel-store-summary.c b/camel/camel-store-summary.c
index 63bd94c..3a1da2d 100644
--- a/camel/camel-store-summary.c
+++ b/camel/camel-store-summary.c
@@ -160,7 +160,7 @@ store_summary_store_info_load (CamelStoreSummary *summary,
camel_file_util_decode_uint32 (in, &info->total);
/* Ok, brown paper bag bug - prior to version 2 of the file, flags are
- stored using the bit number, not the bit. Try to recover as best we can */
+ * stored using the bit number, not the bit. Try to recover as best we can */
if (summary->version < CAMEL_STORE_SUMMARY_VERSION_2) {
guint32 flags = 0;
@@ -226,7 +226,7 @@ store_summary_store_info_string (CamelStoreSummary *summary,
case CAMEL_STORE_INFO_NAME:
p = strrchr (info->path, '/');
if (p)
- return p+1;
+ return p + 1;
else
return info->path;
case CAMEL_STORE_INFO_URI:
@@ -272,10 +272,10 @@ store_summary_store_info_set_string (CamelStoreSummary *summary,
g_hash_table_remove (summary->folders_path, (gchar *) camel_store_info_path (summary, info));
p = strrchr (info->path, '/');
if (p) {
- len = p-info->path+1;
- v = g_malloc (len+strlen (str)+1);
+ len = p - info->path + 1;
+ v = g_malloc (len + strlen (str) + 1);
memcpy (v, info->path, len);
- strcpy (v+len, str);
+ strcpy (v + len, str);
} else {
v = g_strdup (str);
}
@@ -470,7 +470,7 @@ camel_store_summary_array (CamelStoreSummary *summary)
res = g_ptr_array_new ();
g_ptr_array_set_size (res, summary->folders->len);
- for (i=0; i < summary->folders->len; i++) {
+ for (i = 0; i < summary->folders->len; i++) {
info = res->pdata[i] = g_ptr_array_index (summary->folders, i);
info->refcount++;
}
@@ -497,7 +497,7 @@ camel_store_summary_array_free (CamelStoreSummary *summary,
g_return_if_fail (CAMEL_IS_STORE_SUMMARY (summary));
g_return_if_fail (array != NULL);
- for (i=0; i < array->len; i++)
+ for (i = 0; i < array->len; i++)
camel_store_summary_info_free (summary, array->pdata[i]);
g_ptr_array_free (array, TRUE);
@@ -634,7 +634,7 @@ camel_store_summary_save (CamelStoreSummary *summary)
return 0;
}
- fd = g_open (summary->summary_path, O_RDWR|O_CREAT|O_TRUNC|O_BINARY, 0600);
+ fd = g_open (summary->summary_path, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0600);
if (fd == -1) {
io (printf ("** open error: %s\n", g_strerror (errno)));
return -1;
@@ -666,7 +666,7 @@ camel_store_summary_save (CamelStoreSummary *summary)
/* FIXME: Locking? */
count = summary->folders->len;
- for (i=0; i < count; i++) {
+ for (i = 0; i < count; i++) {
info = summary->folders->pdata[i];
class->store_info_save (summary, out, info);
}
@@ -909,7 +909,7 @@ camel_store_summary_clear (CamelStoreSummary *summary)
return;
}
- for (i=0; i < summary->folders->len; i++)
+ for (i = 0; i < summary->folders->len; i++)
camel_store_summary_info_free (summary, summary->folders->pdata[i]);
g_ptr_array_set_size (summary->folders, 0);
@@ -961,7 +961,7 @@ camel_store_summary_remove_path (CamelStoreSummary *summary,
camel_store_summary_lock (summary, CAMEL_STORE_SUMMARY_REF_LOCK);
camel_store_summary_lock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
- if (g_hash_table_lookup_extended (summary->folders_path, path, (gpointer)&oldpath, (gpointer)&oldinfo)) {
+ if (g_hash_table_lookup_extended (summary->folders_path, path, (gpointer) &oldpath, (gpointer) &oldinfo)) {
/* make sure it doesn't vanish while we're removing it */
oldinfo->refcount++;
camel_store_summary_unlock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
diff --git a/camel/camel-store.c b/camel/camel-store.c
index d06bc18..8705e07 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -235,7 +235,7 @@ store_get_special (CamelStore *store,
folder = camel_vtrash_folder_new (store, type);
folders = camel_object_bag_list (store->folders);
- for (i=0;i<folders->len;i++) {
+ 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]);
g_object_unref (folders->pdata[i]);
@@ -385,7 +385,7 @@ store_synchronize_sync (CamelStore *store,
/* We don't sync any vFolders, that is used to update certain
* vfolder queries mainly, and we're really only interested in
* storing/expunging the physical mails. */
- for (i=0;i<folders->len;i++) {
+ for (i = 0; i < folders->len; i++) {
folder = folders->pdata[i];
if (!CAMEL_IS_VEE_FOLDER (folder)
&& local_error == NULL) {
@@ -1425,18 +1425,19 @@ add_special_info (CamelStore *store,
}
static void
-dump_fi (CamelFolderInfo *fi, gint depth)
+dump_fi (CamelFolderInfo *fi,
+ gint depth)
{
gchar *s;
- s = g_alloca (depth+1);
+ s = g_alloca (depth + 1);
memset (s, ' ', depth);
s[depth] = 0;
while (fi) {
printf("%sfull_name: %s\n", s, fi->full_name);
printf("%sflags: %08x\n", s, fi->flags);
- dump_fi (fi->child, depth+2);
+ dump_fi (fi->child, depth + 2);
fi = fi->next;
}
}
@@ -1589,14 +1590,14 @@ camel_folder_info_build (GPtrArray *folders,
for (i = 0; i < folders->len; i++) {
fi = folders->pdata[i];
if (!strncmp (namespace, fi->full_name, nlen)
- && (p = strrchr (fi->full_name+nlen, separator))) {
+ && (p = strrchr (fi->full_name + nlen, separator))) {
pname = g_strndup (fi->full_name, p - fi->full_name);
pfi = g_hash_table_lookup (hash, pname);
if (pfi) {
g_free (pname);
} else {
/* we are missing a folder in the heirarchy so
- create a fake folder node */
+ * create a fake folder node */
pfi = camel_folder_info_new ();
@@ -1618,7 +1619,7 @@ camel_folder_info_build (GPtrArray *folders,
g_hash_table_insert (hash, pname, pfi);
g_ptr_array_add (folders, pfi);
}
- tail = (CamelFolderInfo *)&pfi->child;
+ tail = (CamelFolderInfo *) &pfi->child;
while (tail->next)
tail = tail->next;
tail->next = fi;
@@ -2812,7 +2813,7 @@ camel_store_rename_folder_sync (CamelStore *store,
* We need to rename them atomically with renaming the actual
* folder path. */
folders = camel_object_bag_list (store->folders);
- for (i=0;i<folders->len;i++) {
+ for (i = 0; i < folders->len; i++) {
const gchar *full_name;
folder = folders->pdata[i];
@@ -2845,7 +2846,7 @@ camel_store_rename_folder_sync (CamelStore *store,
flags = CAMEL_STORE_FOLDER_INFO_RECURSIVE;
- for (i=0;i<folders->len;i++) {
+ for (i = 0; i < folders->len; i++) {
const gchar *full_name;
gchar *new;
@@ -2875,7 +2876,7 @@ camel_store_rename_folder_sync (CamelStore *store,
}
} else {
/* Failed, just unlock our folders for re-use */
- for (i=0;i<folders->len;i++) {
+ for (i = 0; i < folders->len; i++) {
folder = folders->pdata[i];
camel_folder_unlock (folder, CAMEL_FOLDER_REC_LOCK);
g_object_unref (folder);
diff --git a/camel/camel-stream-buffer.c b/camel/camel-stream-buffer.c
index 9fd7e3e..b082c30 100644
--- a/camel/camel-stream-buffer.c
+++ b/camel/camel-stream-buffer.c
@@ -165,11 +165,11 @@ stream_buffer_read (CamelStream *stream,
priv->ptr += bytes_left;
}
/* if we are reading a lot, then read directly to the destination buffer */
- if (n >= priv->size/3) {
+ if (n >= priv->size / 3) {
bytes_read = camel_stream_read (
priv->stream, bptr, n,
cancellable, &local_error);
- if (bytes_read>0) {
+ if (bytes_read > 0) {
n -= bytes_read;
bptr += bytes_read;
}
@@ -177,10 +177,10 @@ stream_buffer_read (CamelStream *stream,
bytes_read = camel_stream_read (
priv->stream, (gchar *) priv->buf,
priv->size, cancellable, &local_error);
- if (bytes_read>0) {
+ if (bytes_read > 0) {
gsize bytes_used = bytes_read > n ? n : bytes_read;
priv->ptr = priv->buf;
- priv->end = priv->buf+bytes_read;
+ priv->end = priv->buf + bytes_read;
memcpy (bptr, priv->ptr, bytes_used);
priv->ptr += bytes_used;
bptr += bytes_used;
@@ -248,7 +248,7 @@ stream_buffer_write (CamelStream *stream,
/* if we still have more, write directly, or copy to buffer */
if (n > 0) {
- if (n >= priv->size/3) {
+ if (n >= priv->size / 3) {
if (stream_write_all (
priv->stream, buffer, n,
cancellable, error) == -1)
@@ -500,16 +500,16 @@ camel_stream_buffer_gets (CamelStreamBuffer *sbf,
outptr = buf;
inptr = (gchar *) sbf->priv->ptr;
inend = (gchar *) sbf->priv->end;
- outend = buf+max-1; /* room for NUL */
+ outend = buf + max-1; /* room for NUL */
do {
- while (inptr<inend && outptr<outend) {
+ while (inptr < inend && outptr < outend) {
c = *inptr++;
*outptr++ = c;
if (c == '\n') {
*outptr = 0;
sbf->priv->ptr = (guchar *) inptr;
- return outptr-buf;
+ return outptr - buf;
}
}
if (outptr == outend)
@@ -528,7 +528,7 @@ camel_stream_buffer_gets (CamelStreamBuffer *sbf,
sbf->priv->end = sbf->priv->buf + bytes_read;
inptr = (gchar *) sbf->priv->ptr;
inend = (gchar *) sbf->priv->end;
- } while (bytes_read>0);
+ } while (bytes_read > 0);
sbf->priv->ptr = (guchar *) inptr;
*outptr = 0;
diff --git a/camel/camel-stream-filter.c b/camel/camel-stream-filter.c
index ace197e..8d380f8 100644
--- a/camel/camel-stream-filter.c
+++ b/camel/camel-stream-filter.c
@@ -106,7 +106,7 @@ stream_filter_read (CamelStream *stream,
g_check (priv->realbuffer);
- if (priv->filteredlen<=0) {
+ if (priv->filteredlen <= 0) {
gsize presize = READ_PAD;
size = camel_stream_read (
@@ -165,8 +165,8 @@ stream_filter_read (CamelStream *stream,
}
/* Note: Since the caller expects to write out as much as they asked us to
- write (for 'success'), we return what they asked us to write (for 'success')
- rather than the true number of written bytes */
+ * write (for 'success'), we return what they asked us to write (for 'success')
+ * rather than the true number of written bytes */
static gssize
stream_filter_write (CamelStream *stream,
const gchar *buf,
@@ -177,7 +177,7 @@ stream_filter_write (CamelStream *stream,
CamelStreamFilterPrivate *priv;
struct _filter *f;
gsize presize, len, left = n;
- gchar *buffer, realbuffer[READ_SIZE+READ_PAD];
+ gchar *buffer, realbuffer[READ_SIZE + READ_PAD];
priv = CAMEL_STREAM_FILTER (stream)->priv;
@@ -311,10 +311,10 @@ stream_filter_can_seek (GSeekable *seekable)
static gboolean
stream_filter_seek (GSeekable *seekable,
- goffset offset,
- GSeekType type,
- GCancellable *cancellable,
- GError **error)
+ goffset offset,
+ GSeekType type,
+ GCancellable *cancellable,
+ GError **error)
{
CamelStreamFilterPrivate *priv;
struct _filter *f;
@@ -350,9 +350,9 @@ stream_filter_can_truncate (GSeekable *seekable)
static gboolean
stream_filter_truncate_fn (GSeekable *seekable,
- goffset offset,
- GCancellable *cancellable,
- GError **error)
+ goffset offset,
+ GCancellable *cancellable,
+ GError **error)
{
/* XXX Don't bother translating this. Camel never calls it. */
g_set_error_literal (
@@ -471,7 +471,7 @@ camel_stream_filter_add (CamelStreamFilter *stream,
fn->filter = g_object_ref (filter);
/* sure, we could use a GList, but we wouldn't save much */
- f = (struct _filter *)&priv->filters;
+ f = (struct _filter *) &priv->filters;
while (f->next)
f = f->next;
f->next = fn;
@@ -497,7 +497,7 @@ camel_stream_filter_remove (CamelStreamFilter *stream,
priv = stream->priv;
- f = (struct _filter *)&priv->filters;
+ f = (struct _filter *) &priv->filters;
while (f && f->next) {
fn = f->next;
if (fn->id == id) {
diff --git a/camel/camel-stream-fs.c b/camel/camel-stream-fs.c
index 976bb3a..907892d 100644
--- a/camel/camel-stream-fs.c
+++ b/camel/camel-stream-fs.c
@@ -310,7 +310,7 @@ camel_stream_fs_new_with_name (const gchar *name,
{
gint fd;
- fd = g_open (name, flags|O_BINARY, mode);
+ fd = g_open (name, flags | O_BINARY, mode);
if (fd == -1) {
g_set_error (
error, G_IO_ERROR,
diff --git a/camel/camel-stream-mem.c b/camel/camel-stream-mem.c
index 362237e..4a1752e 100644
--- a/camel/camel-stream-mem.c
+++ b/camel/camel-stream-mem.c
@@ -52,7 +52,8 @@ G_DEFINE_TYPE_WITH_CODE (
/* could probably be a util method */
static void
-clear_mem (gpointer p, gsize len)
+clear_mem (gpointer p,
+ gsize len)
{
gchar *s = p;
@@ -77,7 +78,7 @@ stream_mem_finalize (GObject *object)
if (priv->buffer && priv->owner) {
/* TODO: we need our own bytearray type since we don't know
- the real size of the underlying buffer :-/ */
+ * the real size of the underlying buffer :-/ */
if (priv->secure && priv->buffer->len)
clear_mem (priv->buffer->data, priv->buffer->len);
g_byte_array_free (priv->buffer, TRUE);
diff --git a/camel/camel-stream-null.c b/camel/camel-stream-null.c
index 1d25ea0..7bf8d3b 100644
--- a/camel/camel-stream-null.c
+++ b/camel/camel-stream-null.c
@@ -67,10 +67,10 @@ stream_null_can_seek (GSeekable *seekable)
static gboolean
stream_null_seek (GSeekable *seekable,
- goffset offset,
- GSeekType type,
- GCancellable *cancellable,
- GError **error)
+ goffset offset,
+ GSeekType type,
+ GCancellable *cancellable,
+ GError **error)
{
if (type != G_SEEK_SET || offset != 0) {
g_set_error_literal (
@@ -92,9 +92,9 @@ stream_null_can_truncate (GSeekable *seekable)
static gboolean
stream_null_truncate_fn (GSeekable *seekable,
- goffset offset,
- GCancellable *cancellable,
- GError **error)
+ goffset offset,
+ GCancellable *cancellable,
+ GError **error)
{
/* XXX Don't bother translating this. Camel never calls it. */
g_set_error_literal (
diff --git a/camel/camel-stream-process.c b/camel/camel-stream-process.c
index be710a3..f3842a7 100644
--- a/camel/camel-stream-process.c
+++ b/camel/camel-stream-process.c
@@ -52,7 +52,7 @@ static void
stream_process_finalize (GObject *object)
{
/* Ensure we clean up after ourselves -- kill
- the child process and reap it. */
+ * the child process and reap it. */
camel_stream_close (CAMEL_STREAM (object), NULL, NULL);
/* Chain up to parent's finalize() method. */
@@ -181,7 +181,9 @@ camel_stream_process_new (void)
}
G_GNUC_NORETURN static void
-do_exec_command (gint fd, const gchar *command, gchar **env)
+do_exec_command (gint fd,
+ const gchar *command,
+ gchar **env)
{
gint i, maxopen;
@@ -192,10 +194,10 @@ do_exec_command (gint fd, const gchar *command, gchar **env)
exit (1);
/* What to do with stderr? Possibly put it through a separate pipe
- and bring up a dialog box with its output if anything does get
- spewed to it? It'd help the user understand what was going wrong
- with their command, but it's hard to do cleanly. For now we just
- leave it as it is. Perhaps we should close it and reopen /dev/null? */
+ * and bring up a dialog box with its output if anything does get
+ * spewed to it? It'd help the user understand what was going wrong
+ * with their command, but it's hard to do cleanly. For now we just
+ * leave it as it is. Perhaps we should close it and reopen /dev/null? */
maxopen = sysconf (_SC_OPEN_MAX);
for (i = 3; i < maxopen; i++)
@@ -204,8 +206,8 @@ do_exec_command (gint fd, const gchar *command, gchar **env)
setsid ();
#ifdef TIOCNOTTY
/* Detach from the controlling tty if we have one. Otherwise,
- SSH might do something stupid like trying to use it instead
- of running $SSH_ASKPASS. Doh. */
+ * SSH might do something stupid like trying to use it instead
+ * of running $SSH_ASKPASS. Doh. */
if ((fd = open ("/dev/tty", O_RDONLY)) != -1) {
ioctl (fd, TIOCNOTTY, NULL);
close (fd);
@@ -213,7 +215,7 @@ do_exec_command (gint fd, const gchar *command, gchar **env)
#endif /* TIOCNOTTY */
/* Set up child's environment. We _add_ to it, don't use execle,
- because otherwise we'd destroy stuff like SSH_AUTH_SOCK etc. */
+ * because otherwise we'd destroy stuff like SSH_AUTH_SOCK etc. */
for (; env && *env; env++)
putenv (*env);
diff --git a/camel/camel-stream-vfs.c b/camel/camel-stream-vfs.c
index 0c2dc69..19eaaf0 100644
--- a/camel/camel-stream-vfs.c
+++ b/camel/camel-stream-vfs.c
@@ -194,7 +194,8 @@ camel_stream_vfs_new_with_stream (GObject *stream)
* Returns: the new stream, or %NULL on error.
**/
CamelStream *
-camel_stream_vfs_new_with_uri (const gchar *uri, CamelStreamVFSOpenMethod mode)
+camel_stream_vfs_new_with_uri (const gchar *uri,
+ CamelStreamVFSOpenMethod mode)
{
GFile *file;
GObject *stream;
diff --git a/camel/camel-string-utils.c b/camel/camel-string-utils.c
index 7416c71..817c1d0 100644
--- a/camel/camel-string-utils.c
+++ b/camel/camel-string-utils.c
@@ -29,7 +29,8 @@
#include "camel-string-utils.h"
gint
-camel_strcase_equal (gconstpointer a, gconstpointer b)
+camel_strcase_equal (gconstpointer a,
+ gconstpointer b)
{
return (g_ascii_strcasecmp ((const gchar *) a, (const gchar *) b) == 0);
}
@@ -52,7 +53,8 @@ camel_strcase_hash (gconstpointer v)
}
static void
-free_string (gpointer string, gpointer user_data)
+free_string (gpointer string,
+ gpointer user_data)
{
g_free (string);
}
@@ -68,7 +70,8 @@ camel_string_list_free (GList *string_list)
}
gchar *
-camel_strstrcase (const gchar *haystack, const gchar *needle)
+camel_strstrcase (const gchar *haystack,
+ const gchar *needle)
{
/* find the needle in the haystack neglecting case */
const gchar *ptr;
@@ -154,7 +157,8 @@ static GHashTable *pstring_table = NULL;
* camel_pstring_free() when it is no longer needed.
**/
const gchar *
-camel_pstring_add (gchar *str, gboolean own)
+camel_pstring_add (gchar *str,
+ gboolean own)
{
gpointer pcount;
gchar *pstr;
@@ -268,8 +272,8 @@ camel_pstring_free (const gchar *s)
return;
g_static_mutex_lock (&pstring_lock);
- if (g_hash_table_lookup_extended (pstring_table, s, (gpointer *)&p, &pcount)) {
- count = GPOINTER_TO_INT (pcount)-1;
+ if (g_hash_table_lookup_extended (pstring_table, s, (gpointer *) &p, &pcount)) {
+ count = GPOINTER_TO_INT (pcount) - 1;
if (count == 0) {
g_hash_table_remove (pstring_table, p);
g_free (p);
diff --git a/camel/camel-tcp-stream-raw.c b/camel/camel-tcp-stream-raw.c
index 1456bda..4fd0161 100644
--- a/camel/camel-tcp-stream-raw.c
+++ b/camel/camel-tcp-stream-raw.c
@@ -63,7 +63,9 @@ G_DEFINE_TYPE (CamelTcpStreamRaw, camel_tcp_stream_raw, CAMEL_TYPE_TCP_STREAM)
#ifdef SIMULATE_FLAKY_NETWORK
static gssize
-flaky_tcp_write (gint fd, const gchar *buffer, gsize buflen)
+flaky_tcp_write (gint fd,
+ const gchar *buffer,
+ gsize buflen)
{
gsize len = buflen;
gssize nwritten;
@@ -110,7 +112,9 @@ flaky_tcp_write (gint fd, const gchar *buffer, gsize buflen)
#define write(fd, buffer, buflen) flaky_tcp_write (fd, buffer, buflen)
static gssize
-flaky_tcp_read (gint fd, gchar *buffer, gsize buflen)
+flaky_tcp_read (gint fd,
+ gchar *buffer,
+ gsize buflen)
{
gsize len = buflen;
gssize nread;
@@ -240,7 +244,8 @@ _set_errno_from_pr_error (gint pr_code)
}
void
-_set_g_error_from_errno (GError **error, gboolean eintr_means_cancelled)
+_set_g_error_from_errno (GError **error,
+ gboolean eintr_means_cancelled)
{
gint errn = errno;
@@ -526,10 +531,12 @@ tcp_stream_raw_close (CamelStream *stream,
}
static gint
-sockaddr_to_praddr (struct sockaddr *s, gint len, PRNetAddr *addr)
+sockaddr_to_praddr (struct sockaddr *s,
+ gint len,
+ PRNetAddr *addr)
{
/* We assume the ip addresses are the same size - they have to be anyway.
- We could probably just use memcpy *shrug* */
+ * We could probably just use memcpy *shrug* */
memset (addr, 0, sizeof (*addr));
@@ -590,7 +597,7 @@ socket_connect (struct addrinfo *host,
cancel_fd = camel_operation_cancel_prfd (
CAMEL_OPERATION (cancellable));
- if (PR_Connect (fd, &netaddr, cancel_fd?0:CONNECT_TIMEOUT) == PR_FAILURE) {
+ if (PR_Connect (fd, &netaddr, cancel_fd ? 0 : CONNECT_TIMEOUT) == PR_FAILURE) {
gint errnosave;
_set_errno_from_pr_error (PR_GetError ());
@@ -609,7 +616,7 @@ socket_connect (struct addrinfo *host,
poll[0].out_flags = 0;
poll[1].out_flags = 0;
- if (PR_Poll (poll, cancel_fd?2:1, CONNECT_TIMEOUT) == PR_FAILURE) {
+ if (PR_Poll (poll, cancel_fd ? 2 : 1, CONNECT_TIMEOUT) == PR_FAILURE) {
_set_errno_from_pr_error (PR_GetError ());
goto exception;
}
@@ -1204,7 +1211,8 @@ tcp_stream_raw_setsockopt (CamelTcpStream *stream,
}
static struct sockaddr *
-sockaddr_from_praddr (PRNetAddr *addr, socklen_t *len)
+sockaddr_from_praddr (PRNetAddr *addr,
+ socklen_t *len)
{
/* We assume the ip addresses are the same size - they have to be anyway */
@@ -1274,7 +1282,8 @@ tcp_stream_raw_get_file_desc (CamelTcpStream *stream)
}
void
-_camel_tcp_stream_raw_replace_file_desc (CamelTcpStreamRaw *raw, PRFileDesc *new_file_desc)
+_camel_tcp_stream_raw_replace_file_desc (CamelTcpStreamRaw *raw,
+ PRFileDesc *new_file_desc)
{
CamelTcpStreamRawPrivate *priv = raw->priv;
diff --git a/camel/camel-tcp-stream-ssl.c b/camel/camel-tcp-stream-ssl.c
index bc943bd..957774d 100644
--- a/camel/camel-tcp-stream-ssl.c
+++ b/camel/camel-tcp-stream-ssl.c
@@ -111,10 +111,11 @@ tcp_stream_ssl_finalize (GObject *object)
#if 0
/* Since this is default implementation, let NSS handle it. */
static SECStatus
-ssl_get_client_auth (gpointer data, PRFileDesc *sockfd,
- struct CERTDistNamesStr *caNames,
- struct CERTCertificateStr **pRetCert,
- struct SECKEYPrivateKeyStr **pRetKey)
+ssl_get_client_auth (gpointer data,
+ PRFileDesc *sockfd,
+ struct CERTDistNamesStr *caNames,
+ struct CERTCertificateStr **pRetCert,
+ struct SECKEYPrivateKeyStr **pRetKey)
{
SECStatus status = SECFailure;
SECKEYPrivateKey *privkey;
@@ -182,7 +183,10 @@ ssl_get_client_auth (gpointer data, PRFileDesc *sockfd,
#if 0
/* Since this is the default NSS implementation, no need for us to use this. */
static SECStatus
-ssl_auth_cert (gpointer data, PRFileDesc *sockfd, PRBool checksig, PRBool is_server)
+ssl_auth_cert (gpointer data,
+ PRFileDesc *sockfd,
+ PRBool checksig,
+ PRBool is_server)
{
CERTCertificate *cert;
SECStatus status;
@@ -242,7 +246,7 @@ cert_fingerprint (CERTCertificate *cert)
g_checksum_get_digest (checksum, digest, &length);
g_checksum_free (checksum);
- for (i=0,f = fingerprint; i < length; i++) {
+ for (i = 0,f = fingerprint; i < length; i++) {
guint c = digest[i];
*f++ = tohex[(c >> 4) & 0xf];
@@ -264,7 +268,8 @@ cert_fingerprint (CERTCertificate *cert)
/* lookup a cert uses fingerprint to index an on-disk file */
CamelCert *
-camel_certdb_nss_cert_get (CamelCertDB *certdb, CERTCertificate *cert)
+camel_certdb_nss_cert_get (CamelCertDB *certdb,
+ CERTCertificate *cert)
{
gchar *fingerprint;
CamelCert *ccert;
@@ -322,7 +327,8 @@ camel_certdb_nss_cert_get (CamelCertDB *certdb, CERTCertificate *cert)
/* add a cert to the certdb */
CamelCert *
-camel_certdb_nss_cert_add (CamelCertDB *certdb, CERTCertificate *cert)
+camel_certdb_nss_cert_add (CamelCertDB *certdb,
+ CERTCertificate *cert)
{
CamelCert *ccert;
gchar *fingerprint;
@@ -347,7 +353,9 @@ camel_certdb_nss_cert_add (CamelCertDB *certdb, CERTCertificate *cert)
/* set the 'raw' cert (& save it) */
void
-camel_certdb_nss_cert_set (CamelCertDB *certdb, CamelCert *ccert, CERTCertificate *cert)
+camel_certdb_nss_cert_set (CamelCertDB *certdb,
+ CamelCert *ccert,
+ CERTCertificate *cert)
{
gchar *dir, *path, *fingerprint;
CamelStream *stream;
@@ -406,7 +414,7 @@ get_nickname (CERTCertificate *cert)
if (server == NULL)
return NULL;
- for (i=1;status == PR_TRUE;i++) {
+ for (i = 1; status == PR_TRUE; i++) {
if (nick) {
g_free (nick);
nick = g_strdup_printf("%s #%d", server, i);
@@ -421,7 +429,8 @@ get_nickname (CERTCertificate *cert)
#endif
static SECStatus
-ssl_bad_cert (gpointer data, PRFileDesc *sockfd)
+ssl_bad_cert (gpointer data,
+ PRFileDesc *sockfd)
{
gboolean accept;
CamelCertDB *certdb = NULL;
@@ -491,7 +500,7 @@ ssl_bad_cert (gpointer data, PRFileDesc *sockfd)
error = PR_GetError ();
/* This code is basically what mozilla does - however it doesn't seem to work here
- very reliably :-/ */
+ * very reliably :-/ */
while (go && status != SECSuccess) {
gchar *prompt = NULL;
@@ -518,7 +527,7 @@ ssl_bad_cert (gpointer data, PRFileDesc *sockfd)
printf("adding cert '%s'\n", nick);
if (!cert->trust) {
- cert->trust = (CERTCertTrust*) PORT_ArenaZAlloc (cert->arena, sizeof (CERTCertTrust));
+ cert->trust = (CERTCertTrust *) PORT_ArenaZAlloc (cert->arena, sizeof (CERTCertTrust));
CERT_DecodeTrustString(cert->trust, "P");
}
@@ -529,7 +538,7 @@ ssl_bad_cert (gpointer data, PRFileDesc *sockfd)
printf(" cert type %08x\n", cert->nsCertType);
- memset ((gpointer)&trust, 0, sizeof (trust));
+ memset ((gpointer) &trust, 0, sizeof (trust));
if (CERT_GetCertTrust (cert, &trust) != SECSuccess) {
CERT_DecodeTrustString(&trust, "P");
}
@@ -617,7 +626,8 @@ ssl_bad_cert (gpointer data, PRFileDesc *sockfd)
}
static PRFileDesc *
-enable_ssl (CamelTcpStreamSSL *ssl, PRFileDesc *fd)
+enable_ssl (CamelTcpStreamSSL *ssl,
+ PRFileDesc *fd)
{
PRFileDesc *ssl_fd;
@@ -652,7 +662,7 @@ enable_ssl (CamelTcpStreamSSL *ssl, PRFileDesc *fd)
/* NSS provides a default implementation for the SSL_GetClientAuthDataHook callback
* but does not enable it by default. It must be explicltly requested by the application.
* See: http://www.mozilla.org/projects/security/pki/nss/ref/ssl/sslfnc.html#1126622 */
- SSL_GetClientAuthDataHook (ssl_fd, (SSLGetClientAuthData)&NSS_GetClientAuthData, NULL );
+ SSL_GetClientAuthDataHook (ssl_fd, (SSLGetClientAuthData) &NSS_GetClientAuthData, NULL );
/* NSS provides _and_ installs a default implementation for the
* SSL_AuthCertificateHook callback so we _don't_ need to install one. */
@@ -662,7 +672,9 @@ enable_ssl (CamelTcpStreamSSL *ssl, PRFileDesc *fd)
}
static PRFileDesc *
-enable_ssl_or_close_fd (CamelTcpStreamSSL *ssl, PRFileDesc *fd, GError **error)
+enable_ssl_or_close_fd (CamelTcpStreamSSL *ssl,
+ PRFileDesc *fd,
+ GError **error)
{
PRFileDesc *ssl_fd;
@@ -684,7 +696,8 @@ enable_ssl_or_close_fd (CamelTcpStreamSSL *ssl, PRFileDesc *fd, GError **error)
}
static gboolean
-rehandshake_ssl (PRFileDesc *fd, GError **error)
+rehandshake_ssl (PRFileDesc *fd,
+ GError **error)
{
if (SSL_ResetHandshake (fd, FALSE) == SECFailure) {
_set_errno_from_pr_error (PR_GetError ());
diff --git a/camel/camel-text-index.c b/camel/camel-text-index.c
index 911f3a5..563a332 100644
--- a/camel/camel-text-index.c
+++ b/camel/camel-text-index.c
@@ -380,9 +380,9 @@ static void tmp_name (const gchar *in, gchar *o)
s = strrchr (in, '/');
if (s) {
- memcpy (o, in, s-in+1);
+ memcpy (o, in, s - in + 1);
memcpy (o+(s-in+1), ".#", 2);
- strcpy (o+(s-in+3), s+1);
+ strcpy (o + (s - in + 3), s + 1);
} else {
sprintf (o, ".#%s", in);
}
@@ -422,7 +422,7 @@ text_index_compress_nosync (CamelIndex *idx)
camel_key_t *records, newrecords[256];
struct _CamelTextIndexRoot *rb;
- i = strlen (idx->path)+16;
+ i = strlen (idx->path) + 16;
oldpath = alloca (i);
newpath = alloca (i);
savepath = alloca (i);
@@ -438,7 +438,7 @@ text_index_compress_nosync (CamelIndex *idx)
d (printf ("New: %s\n", newpath));
d (printf ("Save: %s\n", savepath));
- newidx = camel_text_index_new (newpath, O_RDWR|O_CREAT);
+ newidx = camel_text_index_new (newpath, O_RDWR | O_CREAT);
if (newidx == NULL)
return -1;
@@ -455,12 +455,12 @@ text_index_compress_nosync (CamelIndex *idx)
rb->keys = 0;
/* Process:
- For each name we still have:
- Add it to the new index & setup remap table
-
- For each word:
- Copy word's data to a new file
- Add new word to index (*) (can we just copy blocks?) */
+ * For each name we still have:
+ * Add it to the new index & setup remap table
+ *
+ * For each word:
+ * Copy word's data to a new file
+ * Add new word to index (*) (can we just copy blocks?) */
/* Copy undeleted names to new index file, creating new indices */
io (printf ("Copying undeleted names to new file\n"));
@@ -488,7 +488,7 @@ text_index_compress_nosync (CamelIndex *idx)
/* Copy word data across, remapping/deleting and create new index for it */
/* We re-block the data into 256 entry lots while we're at it, since we only
- have to do 1 at a time and its cheap */
+ * have to do 1 at a time and its cheap */
oldkeyid = 0;
while ((oldkeyid = camel_key_table_next (oldp->word_index, oldkeyid, &name, &flags, &data))) {
io(printf ("copying word '%s'\n", name));
@@ -503,7 +503,7 @@ text_index_compress_nosync (CamelIndex *idx)
io (printf ("could not read from old keys at %d for word '%s'\n", (gint)data, name));
goto fail;
}
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
newkeyid = (camel_key_t) GPOINTER_TO_INT (g_hash_table_lookup (remap, GINT_TO_POINTER (records[i])));
if (newkeyid) {
newrecords[newcount++] = newkeyid;
@@ -596,7 +596,8 @@ text_index_delete (CamelIndex *idx)
}
static gint
-text_index_rename (CamelIndex *idx, const gchar *path)
+text_index_rename (CamelIndex *idx,
+ const gchar *path)
{
CamelTextIndexPrivate *p = CAMEL_TEXT_INDEX (idx)->priv;
gchar *newlink, *newblock;
@@ -604,7 +605,7 @@ text_index_rename (CamelIndex *idx, const gchar *path)
CAMEL_TEXT_INDEX_LOCK (idx, lock);
- newblock = alloca (strlen (path)+8);
+ newblock = alloca (strlen (path) + 8);
sprintf (newblock, "%s.index", path);
ret = camel_block_file_rename (p->blocks, newblock);
if (ret == -1) {
@@ -612,7 +613,7 @@ text_index_rename (CamelIndex *idx, const gchar *path)
return -1;
}
- newlink = alloca (strlen (path)+16);
+ newlink = alloca (strlen (path) + 16);
sprintf (newlink, "%s.index.data", path);
ret = camel_key_file_rename (p->links, newlink);
if (ret == -1) {
@@ -632,7 +633,8 @@ text_index_rename (CamelIndex *idx, const gchar *path)
}
static gint
-text_index_has_name (CamelIndex *idx, const gchar *name)
+text_index_has_name (CamelIndex *idx,
+ const gchar *name)
{
CamelTextIndexPrivate *p = CAMEL_TEXT_INDEX (idx)->priv;
@@ -640,7 +642,8 @@ text_index_has_name (CamelIndex *idx, const gchar *name)
}
static CamelIndexName *
-text_index_add_name (CamelIndex *idx, const gchar *name)
+text_index_add_name (CamelIndex *idx,
+ const gchar *name)
{
CamelTextIndexPrivate *p = CAMEL_TEXT_INDEX (idx)->priv;
camel_key_t keyid;
@@ -659,7 +662,7 @@ text_index_add_name (CamelIndex *idx, const gchar *name)
keyid = camel_partition_table_lookup (p->name_hash, name);
if (keyid != 0) {
/* TODO: We could just update the partition table's
- key pointer rather than having to delete it */
+ * key pointer rather than having to delete it */
rb->deleted++;
camel_key_table_set_flags (p->name_index, keyid, 1, 1);
camel_partition_table_remove (p->name_hash, name);
@@ -674,7 +677,7 @@ text_index_add_name (CamelIndex *idx, const gchar *name)
camel_block_file_touch_block (p->blocks, p->blocks->root_block);
/* TODO: if keyid == 0, we had a failure, we should somehow flag that, but for
- now just return a valid object but discard its results, see text_index_write_name */
+ * now just return a valid object but discard its results, see text_index_write_name */
CAMEL_TEXT_INDEX_UNLOCK (idx, lock);
@@ -685,7 +688,9 @@ text_index_add_name (CamelIndex *idx, const gchar *name)
/* call locked */
static void
-hash_write_word (gchar *word, gpointer data, CamelIndexName *idn)
+hash_write_word (gchar *word,
+ gpointer data,
+ CamelIndexName *idn)
{
CamelTextIndexName *tin = (CamelTextIndexName *) idn;
@@ -693,7 +698,8 @@ hash_write_word (gchar *word, gpointer data, CamelIndexName *idn)
}
static gint
-text_index_write_name (CamelIndex *idx, CamelIndexName *idn)
+text_index_write_name (CamelIndex *idx,
+ CamelIndexName *idn)
{
/* force 'flush' of any outstanding data */
camel_index_name_add_buffer (idn, NULL, 0);
@@ -711,14 +717,16 @@ text_index_write_name (CamelIndex *idx, CamelIndexName *idn)
}
static CamelIndexCursor *
-text_index_find_name (CamelIndex *idx, const gchar *name)
+text_index_find_name (CamelIndex *idx,
+ const gchar *name)
{
/* what was this for, umm */
return NULL;
}
static void
-text_index_delete_name (CamelIndex *idx, const gchar *name)
+text_index_delete_name (CamelIndex *idx,
+ const gchar *name)
{
CamelTextIndexPrivate *p = CAMEL_TEXT_INDEX (idx)->priv;
camel_key_t keyid;
@@ -742,7 +750,8 @@ text_index_delete_name (CamelIndex *idx, const gchar *name)
}
static CamelIndexCursor *
-text_index_find (CamelIndex *idx, const gchar *word)
+text_index_find (CamelIndex *idx,
+ const gchar *word)
{
CamelTextIndexPrivate *p = CAMEL_TEXT_INDEX (idx)->priv;
camel_key_t keyid;
@@ -829,7 +838,9 @@ camel_text_index_init (CamelTextIndex *text_index)
}
static gchar *
-text_index_normalize (CamelIndex *idx, const gchar *in, gpointer data)
+text_index_normalize (CamelIndex *idx,
+ const gchar *in,
+ gpointer data)
{
gchar *word;
@@ -841,7 +852,8 @@ text_index_normalize (CamelIndex *idx, const gchar *in, gpointer data)
}
CamelTextIndex *
-camel_text_index_new (const gchar *path, gint flags)
+camel_text_index_new (const gchar *path,
+ gint flags)
{
CamelTextIndex *idx = g_object_new (CAMEL_TYPE_TEXT_INDEX, NULL);
CamelTextIndexPrivate *p = idx->priv;
@@ -857,7 +869,7 @@ camel_text_index_new (const gchar *path, gint flags)
if (p->blocks == NULL)
goto fail;
- link = alloca (strlen (idx->parent.path)+7);
+ link = alloca (strlen (idx->parent.path) + 7);
sprintf (link, "%s.data", idx->parent.path);
p->links = camel_key_file_new (link, flags, CAMEL_TEXT_INDEX_KEY_VERSION);
@@ -936,14 +948,14 @@ camel_text_index_check (const gchar *path)
CamelBlockFile *blocks;
CamelKeyFile *keys;
- block = alloca (strlen (path)+7);
+ block = alloca (strlen (path) + 7);
sprintf (block, "%s.index", path);
blocks = camel_block_file_new (block, O_RDONLY, CAMEL_TEXT_INDEX_VERSION, CAMEL_BLOCK_SIZE);
if (blocks == NULL) {
io (printf ("Check failed: No block file: %s\n", g_strerror (errno)));
return -1;
}
- key = alloca (strlen (path)+12);
+ key = alloca (strlen (path) + 12);
sprintf (key, "%s.index.data", path);
keys = camel_key_file_new (key, O_RDONLY, CAMEL_TEXT_INDEX_KEY_VERSION);
if (keys == NULL) {
@@ -959,15 +971,16 @@ camel_text_index_check (const gchar *path)
}
gint
-camel_text_index_rename (const gchar *old, const gchar *new)
+camel_text_index_rename (const gchar *old,
+ const gchar *new)
{
gchar *oldname, *newname;
gint err;
/* TODO: camel_text_index_rename should find out if we have an active index and use that instead */
- oldname = alloca (strlen (old)+12);
- newname = alloca (strlen (new)+12);
+ oldname = alloca (strlen (old) + 12);
+ newname = alloca (strlen (new) + 12);
sprintf (oldname, "%s.index", old);
sprintf (newname, "%s.index", new);
@@ -997,8 +1010,8 @@ camel_text_index_remove (const gchar *old)
/* TODO: needs to poke any active indices to remain unlinked */
- block = alloca (strlen (old)+12);
- key = alloca (strlen (old)+12);
+ block = alloca (strlen (old) + 12);
+ key = alloca (strlen (old) + 12);
sprintf (block, "%s.index", old);
sprintf (key, "%s.index.data", old);
@@ -1046,7 +1059,9 @@ camel_text_index_info (CamelTextIndex *idx)
enum { KEY_ROOT = 1, KEY_DATA = 2, PARTITION_MAP = 4, PARTITION_DATA = 8 };
static void
-add_type (GHashTable *map, camel_block_t id, gint type)
+add_type (GHashTable *map,
+ camel_block_t id,
+ gint type)
{
camel_block_t old;
@@ -1056,11 +1071,13 @@ add_type (GHashTable *map, camel_block_t id, gint type)
if (old != 0 && old != type)
g_warning ("block %x redefined as type %d, already type %d\n", id, type, old);
- g_hash_table_insert (map, id, GINT_TO_POINTER (type|old));
+ g_hash_table_insert (map, id, GINT_TO_POINTER (type | old));
}
static void
-add_partition (GHashTable *map, CamelBlockFile *blocks, camel_block_t id)
+add_partition (GHashTable *map,
+ CamelBlockFile *blocks,
+ camel_block_t id)
{
CamelBlock *bl;
CamelPartitionMapBlock *pm;
@@ -1074,14 +1091,14 @@ add_partition (GHashTable *map, CamelBlockFile *blocks, camel_block_t id)
return;
}
- pm = (CamelPartitionMapBlock *)&bl->data;
+ pm = (CamelPartitionMapBlock *) &bl->data;
if (pm->used > G_N_ELEMENTS (pm->partition)) {
g_warning ("Partition block %x invalid\n", id);
camel_block_file_unref_block (blocks, bl);
return;
}
- for (i=0;i<pm->used;i++)
+ for (i = 0; i < pm->used; i++)
add_type (map, pm->partition[i].blockid, PARTITION_DATA);
id = pm->next;
@@ -1090,7 +1107,9 @@ add_partition (GHashTable *map, CamelBlockFile *blocks, camel_block_t id)
}
static void
-add_keys (GHashTable *map, CamelBlockFile *blocks, camel_block_t id)
+add_keys (GHashTable *map,
+ CamelBlockFile *blocks,
+ camel_block_t id)
{
CamelBlock *rbl, *bl;
CamelKeyRootBlock *root;
@@ -1102,7 +1121,7 @@ add_keys (GHashTable *map, CamelBlockFile *blocks, camel_block_t id)
g_warning ("couldn't get key root: %x\n", id);
return;
}
- root = (CamelKeyRootBlock *)&rbl->data;
+ root = (CamelKeyRootBlock *) &rbl->data;
id = root->first;
while (id) {
@@ -1113,7 +1132,7 @@ add_keys (GHashTable *map, CamelBlockFile *blocks, camel_block_t id)
break;
}
- kb = (CamelKeyBlock *)&bl->data;
+ kb = (CamelKeyBlock *) &bl->data;
id = kb->next;
camel_block_file_unref_block (blocks, bl);
}
@@ -1122,7 +1141,8 @@ add_keys (GHashTable *map, CamelBlockFile *blocks, camel_block_t id)
}
static void
-dump_raw (GHashTable *map, gchar *path)
+dump_raw (GHashTable *map,
+ gchar *path)
{
gchar buf[1024];
gchar line[256];
@@ -1132,7 +1152,7 @@ dump_raw (GHashTable *map, gchar *path)
gint fd;
camel_block_t id, total;
- fd = g_open (path, O_RDONLY|O_BINARY, 0);
+ fd = g_open (path, O_RDONLY | O_BINARY, 0);
if (fd == -1)
return;
@@ -1157,22 +1177,22 @@ dump_raw (GHashTable *map, gchar *path)
CamelKeyBlock *k = (CamelKeyBlock *) buf;
printf ("Key data:\n");
printf ("Next: %08x Used: %u\n", k->next, k->used);
- for (i=0;i<k->used;i++) {
+ for (i = 0; i < k->used; i++) {
if (i == 0)
len = sizeof (k->u.keydata);
else
- len = k->u.keys[i-1].offset;
+ len = k->u.keys[i - 1].offset;
len -= k->u.keys[i].offset;
printf ("[%03d]: %08x %5d %06x %3d '%.*s'\n", i,
k->u.keys[i].data, k->u.keys[i].offset, k->u.keys[i].flags,
- len, len, k->u.keydata+k->u.keys[i].offset);
+ len, len, k->u.keydata + k->u.keys[i].offset);
}
} break;
case PARTITION_MAP: {
CamelPartitionMapBlock *m = (CamelPartitionMapBlock *) buf;
printf ("Partition map\n");
printf ("Next: %08x Used: %u\n", m->next, m->used);
- for (i=0;i<m->used;i++) {
+ for (i = 0; i < m->used; i++) {
printf ("[%03d]: %08x -> %08x\n", i, m->partition[i].hashid, m->partition[i].blockid);
}
} break;
@@ -1190,16 +1210,16 @@ dump_raw (GHashTable *map, gchar *path)
do {
sprintf (line, "%08x: ", total);
total += 16;
- o = line+10;
- a = o+16*2+2;
+ o = line + 10;
+ a = o + 16 * 2 + 2;
i = 0;
- while (len && i<16) {
+ while (len && i < 16) {
c = *p++;
*a++ = isprint (c)?c:'.';
*o++ = hex[(c>>4)&0x0f];
*o++ = hex[c&0x0f];
i++;
- if (i==8)
+ if (i == 8)
*o++ = ' ';
len--;
}
@@ -1335,7 +1355,7 @@ camel_text_index_validate (CamelTextIndex *idx)
if (data == 0) {
/* This may not be an issue if things have been removed over time,
- though it is a problem if its a fresh index */
+ * though it is a problem if its a fresh index */
printf ("Word '%s' has no data associated with it\n", word);
} else {
if ((oldword = g_hash_table_lookup (keys, GUINT_TO_POINTER (data))) != NULL) {
@@ -1418,7 +1438,8 @@ text_index_name_finalize (GObject *object)
}
static void
-text_index_name_add_word (CamelIndexName *idn, const gchar *word)
+text_index_name_add_word (CamelIndexName *idn,
+ const gchar *word)
{
CamelTextIndexNamePrivate *p = ((CamelTextIndexName *) idn)->priv;
@@ -1430,13 +1451,14 @@ text_index_name_add_word (CamelIndexName *idn, const gchar *word)
}
/* Why?
- Because it doesn't hang/loop forever on bad data
- Used to clean up utf8 before it gets further */
+ * Because it doesn't hang/loop forever on bad data
+ * Used to clean up utf8 before it gets further */
static inline guint32
-camel_utf8_next (const guchar **ptr, const guchar *ptrend)
+camel_utf8_next (const guchar **ptr,
+ const guchar *ptrend)
{
- register guchar *p = (guchar *)*ptr;
+ register guchar *p = (guchar *) * ptr;
register guint c;
register guint32 v;
gint l;
@@ -1494,7 +1516,9 @@ camel_utf8_next (const guchar **ptr, const guchar *ptrend)
}
static gsize
-text_index_name_add_buffer (CamelIndexName *idn, const gchar *buffer, gsize len)
+text_index_name_add_buffer (CamelIndexName *idn,
+ const gchar *buffer,
+ gsize len)
{
CamelTextIndexNamePrivate *p = CAMEL_TEXT_INDEX_NAME (idn)->priv;
const guchar *ptr, *ptrend;
@@ -1511,7 +1535,7 @@ text_index_name_add_buffer (CamelIndexName *idn, const gchar *buffer, gsize len)
}
ptr = (const guchar *) buffer;
- ptrend = (const guchar *) buffer+len;
+ ptrend = (const guchar *) buffer + len;
while ((c = camel_utf8_next (&ptr, ptrend))) {
if (g_unichar_isalnum (c)) {
c = g_unichar_tolower (c);
@@ -1561,7 +1585,9 @@ camel_text_index_name_init (CamelTextIndexName *text_index_name)
}
CamelTextIndexName *
-camel_text_index_name_new (CamelTextIndex *idx, const gchar *name, camel_key_t nameid)
+camel_text_index_name_new (CamelTextIndex *idx,
+ const gchar *name,
+ camel_key_t nameid)
{
CamelTextIndexName *idn = g_object_new (CAMEL_TYPE_TEXT_INDEX_NAME, NULL);
CamelIndexName *cin = &idn->parent;
@@ -1666,7 +1692,8 @@ camel_text_index_cursor_init (CamelTextIndexCursor *text_index_cursor)
}
CamelTextIndexCursor *
-camel_text_index_cursor_new (CamelTextIndex *idx, camel_block_t data)
+camel_text_index_cursor_new (CamelTextIndex *idx,
+ camel_block_t data)
{
CamelTextIndexCursor *idc = g_object_new (CAMEL_TYPE_TEXT_INDEX_CURSOR, NULL);
CamelIndexCursor *cic = &idc->parent;
@@ -1778,7 +1805,8 @@ camel_text_index_key_cursor_init (CamelTextIndexKeyCursor *text_index_key_cursor
}
CamelTextIndexKeyCursor *
-camel_text_index_key_cursor_new (CamelTextIndex *idx, CamelKeyTable *table)
+camel_text_index_key_cursor_new (CamelTextIndex *idx,
+ CamelKeyTable *table)
{
CamelTextIndexKeyCursor *idc = g_object_new (CAMEL_TYPE_TEXT_INDEX_KEY_CURSOR, NULL);
CamelIndexCursor *cic = &idc->parent;
@@ -1811,7 +1839,9 @@ gchar wordbuffer[] = "This is a buffer of multiple words. Some of the words are
" with,with:with;with-with'with\"'\"various punctuation as well. So much for those Words. and 10"
" numbers in a row too 1,2,3,4,5,6,7,8,9,10! Yay!.";
-gint main (gint argc, gchar **argv)
+gint
+main (gint argc,
+ gchar **argv)
{
#if 0
CamelBlockFile *bs;
@@ -1843,13 +1873,13 @@ gint main (gint argc, gchar **argv)
return 0;
#endif
- for (i=0;i<100;i++) {
+ for (i = 0; i < 100; i++) {
gchar name[16];
sprintf (name, "%d", i);
printf ("Adding words to name '%s'\n", name);
idn = camel_index_add_name (idx, name);
- camel_index_name_add_buffer (idn, wordbuffer, sizeof (wordbuffer)-1);
+ camel_index_name_add_buffer (idn, wordbuffer, sizeof (wordbuffer) - 1);
camel_index_write_name (idx, idn);
g_object_unref (idn);
}
@@ -1898,7 +1928,7 @@ gint main (gint argc, gchar **argv)
}
while (fgets (line, sizeof (line), fp) != NULL) {
- line[strlen (line)-1] = 0;
+ line[strlen (line) - 1] = 0;
/* see if its already there */
keyid = camel_partition_table_lookup (cpi, line);
@@ -1933,7 +1963,7 @@ gint main (gint argc, gchar **argv)
fseek (fp, SEEK_SET, 0);
index = 0;
while (fgets (line, sizeof (line), fp) != NULL) {
- line[strlen (line)-1] = 0;
+ line[strlen (line) - 1] = 0;
m (printf ("Lookup word '%s' %d\n", line, index));
keyid = camel_partition_table_lookup (cpi, line);
m (printf (" key = %08d\n", keyid));
diff --git a/camel/camel-trie.c b/camel/camel-trie.c
index 18d8d40..acac762 100644
--- a/camel/camel-trie.c
+++ b/camel/camel-trie.c
@@ -62,7 +62,8 @@ struct _CamelTrie {
};
static inline gunichar
-trie_utf8_getc (const guchar **in, gsize inlen)
+trie_utf8_getc (const guchar **in,
+ gsize inlen)
{
register const guchar *inptr = *in;
const guchar *inend = inptr + inlen;
@@ -153,7 +154,8 @@ camel_trie_free (CamelTrie *trie)
}
static struct _trie_match *
-g (struct _trie_state *s, gunichar c)
+g (struct _trie_state *s,
+ gunichar c)
{
struct _trie_match *m = s->match;
@@ -164,7 +166,10 @@ g (struct _trie_state *s, gunichar c)
}
static struct _trie_state *
-trie_insert (CamelTrie *trie, gint depth, struct _trie_state *q, gunichar c)
+trie_insert (CamelTrie *trie,
+ gint depth,
+ struct _trie_state *q,
+ gunichar c)
{
struct _trie_match *m;
@@ -194,7 +199,8 @@ trie_insert (CamelTrie *trie, gint depth, struct _trie_state *q, gunichar c)
#if d(!)0
static void
-dump_trie (struct _trie_state *s, gint depth)
+dump_trie (struct _trie_state *s,
+ gint depth)
{
gchar *p = g_alloca ((depth * 2) + 1);
struct _trie_match *m;
@@ -240,7 +246,9 @@ dump_trie (struct _trie_state *s, gint depth)
* Since: 2.24
**/
void
-camel_trie_add (CamelTrie *trie, const gchar *pattern, gint pattern_id)
+camel_trie_add (CamelTrie *trie,
+ const gchar *pattern,
+ gint pattern_id)
{
const guchar *inptr = (const guchar *) pattern;
struct _trie_state *q, *q1, *r;
@@ -338,7 +346,9 @@ camel_trie_add (CamelTrie *trie, const gchar *pattern, gint pattern_id)
* Since: 2.24
**/
const gchar *
-camel_trie_search (CamelTrie *trie, const gchar *buffer, gsize buflen,
+camel_trie_search (CamelTrie *trie,
+ const gchar *buffer,
+ gsize buflen,
gint *matched_id)
{
const guchar *inptr, *inend, *prev, *pat;
diff --git a/camel/camel-uid-cache.c b/camel/camel-uid-cache.c
index 5a79c37..dfb80f7 100644
--- a/camel/camel-uid-cache.c
+++ b/camel/camel-uid-cache.c
@@ -115,7 +115,9 @@ camel_uid_cache_new (const gchar *filename)
}
static void
-maybe_write_uid (gpointer key, gpointer value, gpointer data)
+maybe_write_uid (gpointer key,
+ gpointer value,
+ gpointer data)
{
CamelUIDCache *cache = data;
struct _uid_state *state = value;
@@ -228,7 +230,9 @@ camel_uid_cache_save (CamelUIDCache *cache)
}
static void
-free_uid (gpointer key, gpointer value, gpointer data)
+free_uid (gpointer key,
+ gpointer value,
+ gpointer data)
{
g_free (key);
g_free (value);
@@ -261,7 +265,8 @@ camel_uid_cache_destroy (CamelUIDCache *cache)
* camel_uid_cache_free_uids().
**/
GPtrArray *
-camel_uid_cache_get_new_uids (CamelUIDCache *cache, GPtrArray *uids)
+camel_uid_cache_get_new_uids (CamelUIDCache *cache,
+ GPtrArray *uids)
{
GPtrArray *new_uids;
gpointer old_uid;
@@ -275,7 +280,7 @@ camel_uid_cache_get_new_uids (CamelUIDCache *cache, GPtrArray *uids)
struct _uid_state *state;
uid = uids->pdata[i];
- if (g_hash_table_lookup_extended (cache->uids, uid, (gpointer *)&old_uid, (gpointer *)&state)) {
+ if (g_hash_table_lookup_extended (cache->uids, uid, (gpointer *) &old_uid, (gpointer *) &state)) {
g_hash_table_remove (cache->uids, uid);
g_free (old_uid);
} else {
@@ -299,14 +304,15 @@ camel_uid_cache_get_new_uids (CamelUIDCache *cache, GPtrArray *uids)
* Marks a uid for saving.
**/
void
-camel_uid_cache_save_uid (CamelUIDCache *cache, const gchar *uid)
+camel_uid_cache_save_uid (CamelUIDCache *cache,
+ const gchar *uid)
{
struct _uid_state *state;
gpointer old_uid;
g_return_if_fail (uid != NULL);
- if (g_hash_table_lookup_extended (cache->uids, uid, (gpointer *)&old_uid, (gpointer *)&state)) {
+ if (g_hash_table_lookup_extended (cache->uids, uid, (gpointer *) &old_uid, (gpointer *) &state)) {
state->save = TRUE;
state->level = cache->level;
} else {
diff --git a/camel/camel-url-scanner.c b/camel/camel-url-scanner.c
index 4f97cae..191166f 100644
--- a/camel/camel-url-scanner.c
+++ b/camel/camel-url-scanner.c
@@ -60,7 +60,8 @@ camel_url_scanner_free (CamelUrlScanner *scanner)
}
void
-camel_url_scanner_add (CamelUrlScanner *scanner, urlpattern_t *pattern)
+camel_url_scanner_add (CamelUrlScanner *scanner,
+ urlpattern_t *pattern)
{
g_return_if_fail (scanner != NULL);
@@ -69,7 +70,10 @@ camel_url_scanner_add (CamelUrlScanner *scanner, urlpattern_t *pattern)
}
gboolean
-camel_url_scanner_scan (CamelUrlScanner *scanner, const gchar *in, gsize inlen, urlmatch_t *match)
+camel_url_scanner_scan (CamelUrlScanner *scanner,
+ const gchar *in,
+ gsize inlen,
+ urlmatch_t *match)
{
const gchar *pos;
const guchar *inptr, *inend;
@@ -172,7 +176,9 @@ is_open_brace (gchar c)
}
static char
-url_stop_at_brace (const gchar *in, gsize so, gchar *open_brace)
+url_stop_at_brace (const gchar *in,
+ gsize so,
+ gchar *open_brace)
{
gint i;
@@ -193,7 +199,10 @@ url_stop_at_brace (const gchar *in, gsize so, gchar *open_brace)
}
gboolean
-camel_url_addrspec_start (const gchar *in, const gchar *pos, const gchar *inend, urlmatch_t *match)
+camel_url_addrspec_start (const gchar *in,
+ const gchar *pos,
+ const gchar *inend,
+ urlmatch_t *match)
{
register const gchar *inptr = pos;
@@ -227,7 +236,10 @@ camel_url_addrspec_start (const gchar *in, const gchar *pos, const gchar *inend,
}
gboolean
-camel_url_addrspec_end (const gchar *in, const gchar *pos, const gchar *inend, urlmatch_t *match)
+camel_url_addrspec_end (const gchar *in,
+ const gchar *pos,
+ const gchar *inend,
+ urlmatch_t *match)
{
const gchar *inptr = pos;
gint parts = 0, digits;
@@ -288,7 +300,10 @@ camel_url_addrspec_end (const gchar *in, const gchar *pos, const gchar *inend, u
}
gboolean
-camel_url_file_start (const gchar *in, const gchar *pos, const gchar *inend, urlmatch_t *match)
+camel_url_file_start (const gchar *in,
+ const gchar *pos,
+ const gchar *inend,
+ urlmatch_t *match)
{
match->um_so = (pos - in);
@@ -296,7 +311,10 @@ camel_url_file_start (const gchar *in, const gchar *pos, const gchar *inend, url
}
gboolean
-camel_url_file_end (const gchar *in, const gchar *pos, const gchar *inend, urlmatch_t *match)
+camel_url_file_end (const gchar *in,
+ const gchar *pos,
+ const gchar *inend,
+ urlmatch_t *match)
{
register const gchar *inptr = pos;
gchar close_brace;
@@ -320,7 +338,10 @@ camel_url_file_end (const gchar *in, const gchar *pos, const gchar *inend, urlma
}
gboolean
-camel_url_web_start (const gchar *in, const gchar *pos, const gchar *inend, urlmatch_t *match)
+camel_url_web_start (const gchar *in,
+ const gchar *pos,
+ const gchar *inend,
+ urlmatch_t *match)
{
if (pos > in && !strncmp (pos, "www", 3)) {
/* make sure we aren't actually part of another word */
@@ -334,7 +355,10 @@ camel_url_web_start (const gchar *in, const gchar *pos, const gchar *inend, urlm
}
gboolean
-camel_url_web_end (const gchar *in, const gchar *pos, const gchar *inend, urlmatch_t *match)
+camel_url_web_end (const gchar *in,
+ const gchar *pos,
+ const gchar *inend,
+ urlmatch_t *match)
{
register const gchar *inptr = pos;
gboolean passwd = FALSE;
@@ -472,7 +496,8 @@ camel_url_web_end (const gchar *in, const gchar *pos, const gchar *inend, urlmat
#define CHARS_URLSAFE "$-_.+!*'(),{}|\\^~[]`#%\";/?:@&="
static void
-table_init_bits (guint mask, const guchar *vals)
+table_init_bits (guint mask,
+ const guchar *vals)
{
gint i;
@@ -501,9 +526,9 @@ url_scanner_table_init (void)
url_scanner_table['-'] |= IS_DOMAIN;
/* not defined to be special in rfc0822, but when scanning
- backwards to find the beginning of the email address we do
- not want to include this gchar if we come accross it - so
- this is kind of a hack */
+ * backwards to find the beginning of the email address we do
+ * not want to include this gchar if we come accross it - so
+ * this is kind of a hack */
url_scanner_table['/'] |= IS_SPECIAL;
table_init_bits (IS_LWSP, CHARS_LWSP);
diff --git a/camel/camel-url.c b/camel/camel-url.c
index 27be37b..119544d 100644
--- a/camel/camel-url.c
+++ b/camel/camel-url.c
@@ -69,7 +69,8 @@ camel_url_get_type (void)
* Returns: a parsed #CamelURL
**/
CamelURL *
-camel_url_new_with_base (CamelURL *base, const gchar *url_string)
+camel_url_new_with_base (CamelURL *base,
+ const gchar *url_string)
{
CamelURL *url;
const gchar *end, *hash, *colon, *semi, *at, *slash, *question;
@@ -99,7 +100,7 @@ camel_url_new_with_base (CamelURL *base, const gchar *url_string)
/* Find protocol: initial [a-z+.-]* substring until ":" */
p = url_string;
- while (p < end && (isalnum ((guchar)*p) ||
+ while (p < end && (isalnum ((guchar) * p) ||
*p == '.' || *p == '+' || *p == '-'))
p++;
@@ -240,7 +241,7 @@ camel_url_new_with_base (CamelURL *base, const gchar *url_string)
gchar *newpath, *last, *p, *q;
/* the base->path is NULL if given Content-Base url was without last slash,
- i.e. like "http://example.com" (this expected only "http://example.com/") */
+ * i.e. like "http://example.com" (this expected only "http://example.com/") */
last = base->path ? strrchr (base->path, '/') : NULL;
if (last) {
newpath = g_strdup_printf ("%.*s/%s",
@@ -296,7 +297,9 @@ camel_url_new_with_base (CamelURL *base, const gchar *url_string)
}
static void
-copy_param (GQuark key_id, gpointer data, gpointer user_data)
+copy_param (GQuark key_id,
+ gpointer data,
+ gpointer user_data)
{
GData **copy = user_data;
@@ -343,7 +346,8 @@ camel_url_new (const gchar *url_string,
* Returns: a string representing @url, which the caller must free
**/
gchar *
-camel_url_to_string (CamelURL *url, CamelURLFlags flags)
+camel_url_to_string (CamelURL *url,
+ CamelURLFlags flags)
{
GString *str;
gchar *return_result;
@@ -405,7 +409,9 @@ camel_url_to_string (CamelURL *url, CamelURLFlags flags)
}
static void
-output_param (GQuark key_id, gpointer data, gpointer user_data)
+output_param (GQuark key_id,
+ gpointer data,
+ gpointer user_data)
{
GString *str = user_data;
@@ -591,7 +597,8 @@ camel_url_set_fragment (CamelURL *url,
* Set the port on a #CamelURL.
**/
void
-camel_url_set_port (CamelURL *url, gint port)
+camel_url_set_port (CamelURL *url,
+ gint port)
{
g_return_if_fail (url != NULL);
@@ -607,7 +614,9 @@ camel_url_set_port (CamelURL *url, gint port)
* Set a param on the #CamelURL.
**/
void
-camel_url_set_param (CamelURL *url, const gchar *name, const gchar *value)
+camel_url_set_param (CamelURL *url,
+ const gchar *name,
+ const gchar *value)
{
g_return_if_fail (url != NULL);
@@ -627,7 +636,8 @@ camel_url_set_param (CamelURL *url, const gchar *name, const gchar *value)
* Returns: the value of a param if found or %NULL otherwise
**/
const gchar *
-camel_url_get_param (CamelURL *url, const gchar *name)
+camel_url_get_param (CamelURL *url,
+ const gchar *name)
{
g_return_val_if_fail (url != NULL, NULL);
@@ -655,7 +665,9 @@ static const gchar url_encoded_char[] = {
};
static void
-append_url_encoded (GString *str, const gchar *in, const gchar *extra_enc_chars)
+append_url_encoded (GString *str,
+ const gchar *in,
+ const gchar *extra_enc_chars)
{
const guchar *s = (const guchar *) in;
@@ -680,7 +692,8 @@ append_url_encoded (GString *str, const gchar *in, const gchar *extra_enc_chars)
* Returns: the encoded string
**/
gchar *
-camel_url_encode (const gchar *part, const gchar *escape_extra)
+camel_url_encode (const gchar *part,
+ const gchar *escape_extra)
{
GString *str;
gchar *encoded;
@@ -742,7 +755,8 @@ camel_url_hash (gconstpointer v)
}
static gint
-check_equal (gchar *s1, gchar *s2)
+check_equal (gchar *s1,
+ gchar *s2)
{
if (s1 == NULL) {
if (s2 == NULL)
@@ -758,7 +772,8 @@ check_equal (gchar *s1, gchar *s2)
}
gint
-camel_url_equal (gconstpointer v, gconstpointer v2)
+camel_url_equal (gconstpointer v,
+ gconstpointer v2)
{
const CamelURL *u1 = v, *u2 = v2;
@@ -825,7 +840,7 @@ camel_url_decode_path (const gchar *path)
}
/* Strip-off the trailing "/" */
- new_path = g_strndup (str->str, str->len-1);
+ new_path = g_strndup (str->str, str->len - 1);
g_strfreev (comps);
g_string_free (str, TRUE);
diff --git a/camel/camel-utf8.c b/camel/camel-utf8.c
index 4ef5f11..36ac2b5 100644
--- a/camel/camel-utf8.c
+++ b/camel/camel-utf8.c
@@ -38,7 +38,8 @@
* be written to @ptr. @ptr will be advanced to the next character position.
**/
void
-camel_utf8_putc (guchar **ptr, guint32 c)
+camel_utf8_putc (guchar **ptr,
+ guint32 c)
{
register guchar *p = *ptr;
@@ -76,7 +77,7 @@ camel_utf8_putc (guchar **ptr, guint32 c)
guint32
camel_utf8_getc (const guchar **ptr)
{
- register guchar *p = (guchar *)*ptr;
+ register guchar *p = (guchar *) * ptr;
register guchar c, r;
register guint32 v, m;
@@ -124,9 +125,10 @@ loop:
* Returns: The next utf8 char, or 0xffff.
**/
guint32
-camel_utf8_getc_limit (const guchar **ptr, const guchar *end)
+camel_utf8_getc_limit (const guchar **ptr,
+ const guchar *end)
{
- register guchar *p = (guchar *)*ptr;
+ register guchar *p = (guchar *) * ptr;
register guchar c, r;
register guint32 v = 0xffff, m;
@@ -167,7 +169,8 @@ loop:
}
void
-g_string_append_u (GString *out, guint32 c)
+g_string_append_u (GString *out,
+ guint32 c)
{
guchar buffer[8];
guchar *p = buffer;
@@ -215,9 +218,9 @@ camel_utf7_utf8 (const gchar *ptr)
{
const guchar *p = (guchar *) ptr;
guint c;
- guint32 v=0, x;
+ guint32 v = 0, x;
GString *out;
- gint i=0;
+ gint i = 0;
gint state = 0;
gchar *ret;
@@ -252,7 +255,7 @@ camel_utf7_utf8 (const gchar *ptr)
v = (v << 6) | utf7_rank[c];
i+=6;
if (i >= 16) {
- x = (v >> (i-16)) & 0xffff;
+ x = (v >> (i - 16)) & 0xffff;
g_string_append_u (out, x);
i-=16;
}
@@ -274,8 +277,8 @@ static void utf7_closeb64 (GString *out, guint32 v, guint32 i)
{
guint32 x;
- if (i>0) {
- x = (v << (6-i)) & 0x3f;
+ if (i > 0) {
+ x = (v << (6 - i)) & 0x3f;
g_string_append_c (out, utf7_alphabet[x]);
}
g_string_append_c (out, '-');
@@ -323,7 +326,7 @@ camel_utf8_utf7 (const gchar *ptr)
v = (v << 16) | c;
i += 16;
while (i >= 6) {
- x = (v >> (i-6)) & 0x3f;
+ x = (v >> (i - 6)) & 0x3f;
g_string_append_c (out, utf7_alphabet[x]);
i -= 6;
}
diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c
index 3fdb807..3da3f19 100644
--- a/camel/camel-vee-folder.c
+++ b/camel/camel-vee-folder.c
@@ -66,7 +66,7 @@ struct _update_data {
gboolean rebuilt, correlating;
/* used for uids that needs to be updated in db later by unmatched_check_uid and
- folder_added_uid */
+ * folder_added_uid */
GQueue *message_uids;
};
@@ -137,12 +137,12 @@ expression_is_correlating (const gchar *expr)
/* Hold all these with summary lock and unmatched summary lock held */
static void
folder_changed_add_uid (CamelFolder *sub,
- const gchar *uid,
- const gchar hash[8],
- CamelVeeFolder *vf,
- gboolean use_db,
- GSList **m_added_l,
- GSList **unm_added_l)
+ const gchar *uid,
+ const gchar hash[8],
+ CamelVeeFolder *vf,
+ gboolean use_db,
+ GSList **m_added_l,
+ GSList **unm_added_l)
{
CamelVeeMessageInfo *vinfo;
const gchar *vuid;
@@ -164,9 +164,9 @@ folder_changed_add_uid (CamelFolder *sub,
camel_folder_change_info_add_uid (vf->changes, vuid);
if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0 && !CAMEL_IS_VEE_FOLDER (sub) && folder_unmatched != NULL) {
- if (g_hash_table_lookup_extended (unmatched_uids, vuid, (gpointer *)&oldkey, &oldval)) {
+ if (g_hash_table_lookup_extended (unmatched_uids, vuid, (gpointer *) &oldkey, &oldval)) {
n = GPOINTER_TO_INT (oldval);
- g_hash_table_insert (unmatched_uids, oldkey, GINT_TO_POINTER (n+1));
+ g_hash_table_insert (unmatched_uids, oldkey, GINT_TO_POINTER (n + 1));
} else {
g_hash_table_insert (unmatched_uids, g_strdup (vuid), GINT_TO_POINTER (1));
}
@@ -190,14 +190,14 @@ folder_changed_add_uid (CamelFolder *sub,
}
static void
-folder_changed_remove_uid (CamelFolder *sub,
- const gchar *uid,
- const gchar hash[8],
- gint keep,
- CamelVeeFolder *vf,
- gboolean use_db,
- GSList **m_removed_l,
- GSList **unm_removed_l)
+folder_changed_remove_uid (CamelFolder *sub,
+ const gchar *uid,
+ const gchar hash[8],
+ gint keep,
+ CamelVeeFolder *vf,
+ gboolean use_db,
+ GSList **m_removed_l,
+ GSList **unm_removed_l)
{
CamelFolder *folder = (CamelFolder *) vf;
gchar *vuid, *oldkey;
@@ -207,9 +207,9 @@ folder_changed_remove_uid (CamelFolder *sub,
CamelVeeFolder *folder_unmatched = vf->parent_vee_store ? vf->parent_vee_store->folder_unmatched : NULL;
GHashTable *unmatched_uids = vf->parent_vee_store ? vf->parent_vee_store->unmatched_uids : NULL;
- vuid = alloca (strlen (uid)+9);
+ vuid = alloca (strlen (uid) + 9);
memcpy (vuid, hash, 8);
- strcpy (vuid+8, uid);
+ strcpy (vuid + 8, uid);
vinfo = (CamelVeeMessageInfo *) camel_folder_summary_uid (folder->summary, vuid);
if (vinfo) {
@@ -225,7 +225,7 @@ folder_changed_remove_uid (CamelFolder *sub,
if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0 && !CAMEL_IS_VEE_FOLDER (sub) && folder_unmatched != NULL) {
if (keep) {
- if (g_hash_table_lookup_extended (unmatched_uids, vuid, (gpointer *)&oldkey, &oldval)) {
+ if (g_hash_table_lookup_extended (unmatched_uids, vuid, (gpointer *) &oldkey, &oldval)) {
n = GPOINTER_TO_INT (oldval);
if (n == 1) {
g_hash_table_remove (unmatched_uids, oldkey);
@@ -233,14 +233,14 @@ folder_changed_remove_uid (CamelFolder *sub,
camel_folder_change_info_add_uid (folder_unmatched->changes, oldkey);
g_free (oldkey);
} else {
- g_hash_table_insert (unmatched_uids, oldkey, GINT_TO_POINTER (n-1));
+ g_hash_table_insert (unmatched_uids, oldkey, GINT_TO_POINTER (n - 1));
}
} else {
if (vee_folder_add_uid_test (folder_unmatched, sub, uid, hash))
camel_folder_change_info_add_uid (folder_unmatched->changes, vuid);
}
} else {
- if (g_hash_table_lookup_extended (unmatched_uids, vuid, (gpointer *)&oldkey, &oldval)) {
+ if (g_hash_table_lookup_extended (unmatched_uids, vuid, (gpointer *) &oldkey, &oldval)) {
g_hash_table_remove (unmatched_uids, oldkey);
g_free (oldkey);
}
@@ -264,7 +264,8 @@ folder_changed_remove_uid (CamelFolder *sub,
}
static void
-update_old_flags (CamelFolderSummary *summary, CamelVeeMessageInfo *vinfo)
+update_old_flags (CamelFolderSummary *summary,
+ CamelVeeMessageInfo *vinfo)
{
g_return_if_fail (summary != NULL);
g_return_if_fail (vinfo != NULL);
@@ -275,13 +276,13 @@ update_old_flags (CamelFolderSummary *summary, CamelVeeMessageInfo *vinfo)
}
static void
-folder_changed_change_uid (CamelFolder *sub,
- const gchar *uid,
- const gchar hash[8],
- CamelVeeFolder *vf,
- gboolean use_db,
- GSList **m_removed_l,
- GSList **unm_removed_l)
+folder_changed_change_uid (CamelFolder *sub,
+ const gchar *uid,
+ const gchar hash[8],
+ CamelVeeFolder *vf,
+ gboolean use_db,
+ GSList **m_removed_l,
+ GSList **unm_removed_l)
{
gchar *vuid;
CamelVeeMessageInfo *vinfo, *uinfo = NULL;
@@ -289,9 +290,9 @@ folder_changed_change_uid (CamelFolder *sub,
CamelFolder *folder = (CamelFolder *) vf;
CamelVeeFolder *folder_unmatched = vf->parent_vee_store ? vf->parent_vee_store->folder_unmatched : NULL;
- vuid = alloca (strlen (uid)+9);
+ vuid = alloca (strlen (uid) + 9);
memcpy (vuid, hash, 8);
- strcpy (vuid+8, uid);
+ strcpy (vuid + 8, uid);
vinfo = (CamelVeeMessageInfo *) camel_folder_summary_uid (folder->summary, vuid);
if (folder_unmatched != NULL)
@@ -324,7 +325,11 @@ folder_changed_change_uid (CamelFolder *sub,
}
static void
-vfolder_add_remove_transaction (CamelStore *parent_store, const gchar *full_name, GSList **uids, gboolean add, GError **error)
+vfolder_add_remove_transaction (CamelStore *parent_store,
+ const gchar *full_name,
+ GSList **uids,
+ gboolean add,
+ GError **error)
{
GSList *l;
@@ -390,8 +395,8 @@ folder_changed_change (CamelSession *session,
}
/* TODO:
- In this code around here, we can work out if the search will affect the changes
- we had, and only re-search against them if they might have */
+ * In this code around here, we can work out if the search will affect the changes
+ * we had, and only re-search against them if they might have */
/* Search for changed items that newly match, but only if we dont have them */
changed = changes->uid_changed;
@@ -401,14 +406,14 @@ folder_changed_change (CamelSession *session,
if ((vf->flags & CAMEL_STORE_VEE_FOLDER_AUTO) == 0) {
newchanged = g_ptr_array_new ();
always_changed = g_ptr_array_new ();
- for (i=0;i<changed->len;i++) {
+ for (i = 0; i < changed->len; i++) {
uid = changed->pdata[i];
- if (strlen (uid)+9 > vuidlen) {
- vuidlen = strlen (uid)+64;
+ if (strlen (uid) + 9 > vuidlen) {
+ vuidlen = strlen (uid) + 64;
vuid = g_realloc (vuid, vuidlen);
}
memcpy (vuid, hash, 8);
- strcpy (vuid+8, uid);
+ strcpy (vuid + 8, uid);
vinfo = (CamelVeeMessageInfo *) camel_folder_summary_uid (folder->summary, vuid);
if (vinfo == NULL) {
g_ptr_array_add (newchanged, (gchar *) uid);
@@ -432,7 +437,7 @@ folder_changed_change (CamelSession *session,
camel_vee_folder_lock (folder_unmatched, CAMEL_VEE_FOLDER_SUMMARY_LOCK);
/* Always remove removed uid's, in any case */
- for (i=0;i<changes->uid_removed->len;i++) {
+ for (i = 0; i < changes->uid_removed->len; i++) {
dd (printf (" removing uid '%s'\n", (gchar *)changes->uid_removed->pdata[i]));
folder_changed_remove_uid (sub, changes->uid_removed->pdata[i], hash, FALSE, vf, !correlating, &m_removed_l, &unm_removed_l);
}
@@ -440,22 +445,22 @@ folder_changed_change (CamelSession *session,
/* Add any newly matched or to unmatched folder if they dont */
if (matches_added) {
matches_hash = g_hash_table_new (g_str_hash, g_str_equal);
- for (i=0;i<matches_added->len;i++) {
+ for (i = 0; i < matches_added->len; i++) {
dd (printf (" %s", (gchar *)matches_added->pdata[i]));
g_hash_table_insert (matches_hash, matches_added->pdata[i], matches_added->pdata[i]);
}
- for (i=0;i<changes->uid_added->len;i++) {
+ for (i = 0; i < changes->uid_added->len; i++) {
uid = changes->uid_added->pdata[i];
if (g_hash_table_lookup (matches_hash, uid)) {
dd (printf (" adding uid '%s' [newly matched]\n", (gchar *)uid));
folder_changed_add_uid (sub, uid, hash, vf, !correlating, &m_added_l, &unm_added_l);
} else if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0) {
- if (strlen (uid)+9 > vuidlen) {
- vuidlen = strlen (uid)+64;
+ if (strlen (uid) + 9 > vuidlen) {
+ vuidlen = strlen (uid) + 64;
vuid = g_realloc (vuid, vuidlen);
}
memcpy (vuid, hash, 8);
- strcpy (vuid+8, uid);
+ strcpy (vuid + 8, uid);
if (!CAMEL_IS_VEE_FOLDER (sub) && folder_unmatched != NULL && g_hash_table_lookup (unmatched_uids, vuid) == NULL) {
dd (printf (" adding uid '%s' to Unmatched [newly unmatched]\n", (gchar *)uid));
@@ -480,17 +485,17 @@ folder_changed_change (CamelSession *session,
* would be wrong to preemptively remove anything here.
* vee_folder_rebuild_folder will make any necessary removals
* when it re-queries the entire source folder. */
- for (i=0;i<always_changed->len;i++)
+ for (i = 0; i < always_changed->len; i++)
folder_changed_change_uid (sub, always_changed->pdata[i], hash, vf, !correlating, &m_removed_l, &unm_removed_l);
} else {
GHashTable *ht_present = g_hash_table_new (g_str_hash, g_str_equal);
- for (i=0;present && i<present->len;i++) {
+ for (i = 0; present && i < present->len; i++) {
folder_changed_change_uid (sub, present->pdata[i], hash, vf, !correlating, &m_removed_l, &unm_removed_l);
g_hash_table_insert (ht_present, present->pdata[i], present->pdata[i]);
}
- for (i=0; i<always_changed->len; i++) {
+ for (i = 0; i < always_changed->len; i++) {
if (!present || !g_hash_table_lookup (ht_present, always_changed->pdata[i]))
/* XXX: IIUC, these messages haven't been deleted from the
* source folder, so shouldn't "keep" be set to TRUE? */
@@ -507,20 +512,20 @@ folder_changed_change (CamelSession *session,
/* If we are auto-updating, then re-check changed uids still match */
dd (printf (" Vfolder %supdate\nuids match:", (vf->flags & CAMEL_STORE_VEE_FOLDER_AUTO)?"auto-":""));
matches_hash = g_hash_table_new (g_str_hash, g_str_equal);
- for (i=0;matches_changed && i<matches_changed->len;i++) {
+ for (i = 0; matches_changed && i < matches_changed->len; i++) {
dd (printf (" %s", (gchar *)matches_changed->pdata[i]));
g_hash_table_insert (matches_hash, matches_changed->pdata[i], matches_changed->pdata[i]);
}
dd (printf ("\n"));
- for (i=0;i<changed->len;i++) {
+ for (i = 0; i < changed->len; i++) {
uid = changed->pdata[i];
- if (strlen (uid)+9 > vuidlen) {
- vuidlen = strlen (uid)+64;
+ if (strlen (uid) + 9 > vuidlen) {
+ vuidlen = strlen (uid) + 64;
vuid = g_realloc (vuid, vuidlen);
}
memcpy (vuid, hash, 8);
- strcpy (vuid+8, uid);
+ strcpy (vuid + 8, uid);
vinfo = (CamelVeeMessageInfo *) camel_folder_summary_uid (folder->summary, vuid);
if (vinfo == NULL) {
if (g_hash_table_lookup (matches_hash, uid)) {
@@ -548,7 +553,7 @@ folder_changed_change (CamelSession *session,
g_hash_table_destroy (matches_hash);
} else {
/* stuff didn't match but it changed - check unmatched folder for changes */
- for (i=0;i<changed->len;i++)
+ for (i = 0; i < changed->len; i++)
folder_changed_change_uid (sub, changed->pdata[i], hash, vf, !correlating, &m_removed_l, &unm_removed_l);
}
@@ -640,7 +645,9 @@ folder_changed_change (CamelSession *session,
}
static void
-subfolder_renamed_update (CamelVeeFolder *vf, CamelFolder *sub, gchar hash[8])
+subfolder_renamed_update (CamelVeeFolder *vf,
+ CamelFolder *sub,
+ gchar hash[8])
{
gint count, i;
CamelFolderChangeInfo *changes = NULL;
@@ -653,7 +660,7 @@ subfolder_renamed_update (CamelVeeFolder *vf, CamelFolder *sub, gchar hash[8])
camel_folder_summary_prepare_fetch_all (((CamelFolder *) vf)->summary, NULL);
count = camel_folder_summary_count (((CamelFolder *) vf)->summary);
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
CamelVeeMessageInfo *mi = (CamelVeeMessageInfo *) camel_folder_summary_index (((CamelFolder *) vf)->summary, i);
CamelVeeMessageInfo *vinfo;
@@ -673,13 +680,13 @@ subfolder_renamed_update (CamelVeeFolder *vf, CamelFolder *sub, gchar hash[8])
i--;
count--;
- vinfo = vee_folder_add_uid (vf, sub, uid+8, hash);
+ vinfo = vee_folder_add_uid (vf, sub, uid + 8, hash);
if (vinfo) {
camel_folder_change_info_add_uid (vf->changes, camel_message_info_uid (vinfo));
/* check unmatched uid's table for any matches */
if (vf == folder_unmatched
- && g_hash_table_lookup_extended (unmatched_uids, uid, (gpointer *)&oldkey, &oldval)) {
+ && g_hash_table_lookup_extended (unmatched_uids, uid, (gpointer *) &oldkey, &oldval)) {
g_hash_table_remove (unmatched_uids, oldkey);
g_hash_table_insert (unmatched_uids, g_strdup (camel_message_info_uid (vinfo)), oldval);
g_free (oldkey);
@@ -711,14 +718,16 @@ vee_folder_rebuild_folder (CamelVeeFolder *vee_folder,
GError **error);
static void
-unmatched_check_uid (gchar *uidin, gpointer value, struct _update_data *u)
+unmatched_check_uid (gchar *uidin,
+ gpointer value,
+ struct _update_data *u)
{
gchar *uid;
gint n;
- uid = alloca (strlen (uidin)+9);
+ uid = alloca (strlen (uidin) + 9);
memcpy (uid, u->hash, 8);
- strcpy (uid+8, uidin);
+ strcpy (uid + 8, uidin);
n = GPOINTER_TO_INT (g_hash_table_lookup (u->unmatched_uids, uid));
if (n == 0) {
if (vee_folder_add_uid_test (u->folder_unmatched, u->source, uidin, u->hash))
@@ -741,7 +750,9 @@ unmatched_check_uid (gchar *uidin, gpointer value, struct _update_data *u)
}
static void
-folder_added_uid (gchar *uidin, gpointer value, struct _update_data *u)
+folder_added_uid (gchar *uidin,
+ gpointer value,
+ struct _update_data *u)
{
CamelVeeMessageInfo *mi;
gchar *oldkey;
@@ -967,7 +978,7 @@ vee_folder_dispose (GObject *object)
/* This may invoke sub-classes with partially destroyed state, they must deal with this */
if (vf == folder_unmatched) {
- for (node = vf->priv->folders;node;node = g_list_next (node))
+ for (node = vf->priv->folders; node; node = g_list_next (node))
g_object_unref (node->data);
} else {
/* FIXME[disk-summary] See if it is really reqd */
@@ -985,7 +996,9 @@ vee_folder_dispose (GObject *object)
}
static void
-free_change_info_cb (gpointer folder, gpointer change_info, gpointer user_data)
+free_change_info_cb (gpointer folder,
+ gpointer change_info,
+ gpointer user_data)
{
camel_folder_change_info_free (change_info);
}
@@ -1086,9 +1099,9 @@ vee_folder_search_by_expression (CamelFolder *folder,
for (i = 0; i < matches->len; i++) {
gchar *uid = matches->pdata[i], *vuid;
- vuid = g_malloc (strlen (uid)+9);
+ vuid = g_malloc (strlen (uid) + 9);
memcpy (vuid, hash, 8);
- strcpy (vuid+8, uid);
+ strcpy (vuid + 8, uid);
if (!is_folder_unmatched || g_hash_table_lookup (folder_unmatched_hash, vuid) != NULL)
g_ptr_array_add (result, (gpointer) camel_pstring_strdup (vuid));
@@ -1141,11 +1154,11 @@ vee_folder_search_by_uids (CamelFolder *folder,
/* map the vfolder uid's to the source folder uid's first */
g_ptr_array_set_size (folder_uids, 0);
- for (i=0;i<uids->len;i++) {
+ for (i = 0; i < uids->len; i++) {
gchar *uid = uids->pdata[i];
if (strlen (uid) >= 8 && strncmp (uid, hash, 8) == 0)
- g_ptr_array_add (folder_uids, uid+8);
+ g_ptr_array_add (folder_uids, uid + 8);
}
if (folder_uids->len > 0) {
matches = camel_folder_search_by_uids (f, expr, folder_uids, error);
@@ -1153,9 +1166,9 @@ vee_folder_search_by_uids (CamelFolder *folder,
for (i = 0; i < matches->len; i++) {
gchar *uid = matches->pdata[i], *vuid;
- vuid = g_malloc (strlen (uid)+9);
+ vuid = g_malloc (strlen (uid) + 9);
memcpy (vuid, hash, 8);
- strcpy (vuid+8, uid);
+ strcpy (vuid + 8, uid);
g_ptr_array_add (result, (gpointer) camel_pstring_strdup (vuid));
g_free (vuid);
}
@@ -1320,7 +1333,7 @@ vee_folder_get_message_sync (CamelFolder *folder,
mi = (CamelVeeMessageInfo *) camel_folder_summary_uid (folder->summary, uid);
if (mi) {
msg = camel_folder_get_message_sync (
- mi->summary->folder, camel_message_info_uid (mi)+8,
+ mi->summary->folder, camel_message_info_uid (mi) + 8,
cancellable, error);
camel_message_info_free ((CamelMessageInfo *) mi);
} else {
@@ -1417,7 +1430,7 @@ vee_folder_synchronize_sync (CamelFolder *folder,
camel_folder_summary_prepare_fetch_all (folder->summary, NULL);
count = camel_folder_summary_count (folder->summary);
- for (i=0; i < count; i++) {
+ for (i = 0; i < count; i++) {
CamelVeeMessageInfo *mi = (CamelVeeMessageInfo *) camel_folder_summary_index (folder->summary, i);
if (mi->old_flags & CAMEL_MESSAGE_DELETED) {
del = g_slist_prepend (del, (gpointer) camel_pstring_strdup (((CamelMessageInfo *) mi)->uid));
@@ -1521,7 +1534,8 @@ vee_folder_add_folder (CamelVeeFolder *vee_folder,
}
static void
-vee_folder_remove_folder_helper (CamelVeeFolder *vf, CamelFolder *source)
+vee_folder_remove_folder_helper (CamelVeeFolder *vf,
+ CamelFolder *source)
{
gint i, count, n, still = FALSE, start, last;
gchar *oldkey;
@@ -1559,7 +1573,7 @@ vee_folder_remove_folder_helper (CamelVeeFolder *vf, CamelFolder *source)
last = -1;
camel_folder_summary_prepare_fetch_all (((CamelFolder *) folder_unmatched)->summary, NULL);
count = camel_folder_summary_count (((CamelFolder *) folder_unmatched)->summary);
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
CamelVeeMessageInfo *mi = (CamelVeeMessageInfo *) camel_folder_summary_index (((CamelFolder *) folder_unmatched)->summary, i);
if (mi) {
@@ -1568,11 +1582,11 @@ vee_folder_remove_folder_helper (CamelVeeFolder *vf, CamelFolder *source)
camel_folder_summary_update_counts_by_flags (CAMEL_FOLDER (folder_unmatched)->summary, mi->old_flags, TRUE);
if (last == -1) {
last = start = i;
- } else if (last+1 == i) {
+ } else if (last + 1 == i) {
last = i;
} else {
camel_folder_summary_remove_range (((CamelFolder *) folder_unmatched)->summary, start, last);
- i -= (last-start)+1;
+ i -= (last - start) + 1;
start = last = i;
}
}
@@ -1589,7 +1603,7 @@ vee_folder_remove_folder_helper (CamelVeeFolder *vf, CamelFolder *source)
last = -1;
camel_folder_summary_prepare_fetch_all (folder->summary, NULL);
count = camel_folder_summary_count (folder->summary);
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
CamelVeeMessageInfo *mi = (CamelVeeMessageInfo *) camel_folder_summary_index (folder->summary, i);
if (mi) {
if (mi->summary == ssummary) {
@@ -1600,29 +1614,29 @@ vee_folder_remove_folder_helper (CamelVeeFolder *vf, CamelFolder *source)
if (last == -1) {
last = start = i;
- } else if (last+1 == i) {
+ } else if (last + 1 == i) {
last = i;
} else {
camel_folder_summary_remove_range (folder->summary, start, last);
- i -= (last-start)+1;
+ i -= (last - start) + 1;
start = last = i;
}
if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0 && folder_unmatched != NULL) {
if (still) {
- if (g_hash_table_lookup_extended (unmatched_uids, uid, (gpointer *)&oldkey, &oldval)) {
+ if (g_hash_table_lookup_extended (unmatched_uids, uid, (gpointer *) &oldkey, &oldval)) {
n = GPOINTER_TO_INT (oldval);
if (n == 1) {
g_hash_table_remove (unmatched_uids, oldkey);
- if (vee_folder_add_uid_test (folder_unmatched, source, oldkey+8, hash)) {
+ if (vee_folder_add_uid_test (folder_unmatched, source, oldkey + 8, hash)) {
camel_folder_change_info_add_uid (folder_unmatched->changes, oldkey);
}
g_free (oldkey);
} else {
- g_hash_table_insert (unmatched_uids, oldkey, GINT_TO_POINTER (n-1));
+ g_hash_table_insert (unmatched_uids, oldkey, GINT_TO_POINTER (n - 1));
}
}
} else {
- if (g_hash_table_lookup_extended (unmatched_uids, camel_message_info_uid (mi), (gpointer *)&oldkey, &oldval)) {
+ if (g_hash_table_lookup_extended (unmatched_uids, camel_message_info_uid (mi), (gpointer *) &oldkey, &oldval)) {
g_hash_table_remove (unmatched_uids, oldkey);
g_free (oldkey);
}
@@ -1753,15 +1767,15 @@ vee_folder_rebuild_folder (CamelVeeFolder *vee_folder,
camel_vee_folder_lock (vee_folder, CAMEL_VEE_FOLDER_SUMMARY_LOCK);
/* we build 2 hash tables, one for all uid's not matched, the
- other for all matched uid's, we just ref the real memory */
+ * other for all matched uid's, we just ref the real memory */
matchhash = g_hash_table_new (g_str_hash, g_str_equal);
- for (i=0;i<match->len;i++)
+ for (i = 0; i < match->len; i++)
g_hash_table_insert (matchhash, match->pdata[i], GINT_TO_POINTER (1));
allhash = g_hash_table_new (g_str_hash, g_str_equal);
fullhash = g_hash_table_new (g_str_hash, g_str_equal);
all = camel_folder_summary_array (source->summary);
- for (i=0;i<all->len;i++) {
+ for (i = 0; i < all->len; i++) {
if (g_hash_table_lookup (matchhash, all->pdata[i]) == NULL)
g_hash_table_insert (allhash, all->pdata[i], GINT_TO_POINTER (1));
g_hash_table_insert (fullhash, all->pdata[i], GINT_TO_POINTER (1));
@@ -1769,7 +1783,7 @@ vee_folder_rebuild_folder (CamelVeeFolder *vee_folder,
}
/* remove uids that can't be found in the source folder */
count = match->len;
- for (i=0; i<count; i++) {
+ for (i = 0; i < count; i++) {
if (!g_hash_table_lookup (fullhash, match->pdata[i])) {
g_hash_table_remove (matchhash, match->pdata[i]);
del_list = g_slist_prepend (del_list, match->pdata[i]); /* Free the original */
@@ -1784,13 +1798,13 @@ vee_folder_rebuild_folder (CamelVeeFolder *vee_folder,
camel_vee_folder_lock (folder_unmatched, CAMEL_VEE_FOLDER_SUMMARY_LOCK);
/* scan, looking for "old" uid's to be removed. "old" uid's
- are those that are from previous added sources (not in
- current source) */
+ * are those that are from previous added sources (not in
+ * current source) */
start = -1;
last = -1;
camel_folder_summary_prepare_fetch_all (folder->summary, NULL);
count = camel_folder_summary_count (folder->summary);
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
CamelVeeMessageInfo *mi = (CamelVeeMessageInfo *) camel_folder_summary_index (folder->summary, i);
if (mi) {
@@ -1798,14 +1812,14 @@ vee_folder_rebuild_folder (CamelVeeFolder *vee_folder,
gchar *uid = (gchar *) camel_message_info_uid (mi), *oldkey;
gpointer oldval;
- if (g_hash_table_lookup (matchhash, uid+8) == NULL) {
+ if (g_hash_table_lookup (matchhash, uid + 8) == NULL) {
if (last == -1) {
last = start = i;
- } else if (last+1 == i) {
+ } else if (last + 1 == i) {
last = i;
} else {
camel_folder_summary_remove_range (folder->summary, start, last);
- i -= (last-start)+1;
+ i -= (last - start) + 1;
count -= (last - start) + 1;
start = last = i;
}
@@ -1813,17 +1827,17 @@ vee_folder_rebuild_folder (CamelVeeFolder *vee_folder,
camel_folder_summary_update_counts_by_flags (folder->summary, mi->old_flags, TRUE);
if (!CAMEL_IS_VEE_FOLDER (source)
&& unmatched_uids != NULL
- && g_hash_table_lookup_extended (unmatched_uids, uid, (gpointer *)&oldkey, &oldval)) {
+ && g_hash_table_lookup_extended (unmatched_uids, uid, (gpointer *) &oldkey, &oldval)) {
n = GPOINTER_TO_INT (oldval);
if (n == 1) {
g_hash_table_remove (unmatched_uids, oldkey);
g_free (oldkey);
} else {
- g_hash_table_insert (unmatched_uids, oldkey, GINT_TO_POINTER (n-1));
+ g_hash_table_insert (unmatched_uids, oldkey, GINT_TO_POINTER (n - 1));
}
}
} else {
- g_hash_table_remove (matchhash, uid+8);
+ g_hash_table_remove (matchhash, uid + 8);
}
}
camel_message_info_free ((CamelMessageInfo *) mi);
@@ -1865,12 +1879,12 @@ vee_folder_rebuild_folder (CamelVeeFolder *vee_folder,
if (folder_unmatched != NULL) {
/* scan unmatched, remove any that have vanished, etc */
count = camel_folder_summary_count (((CamelFolder *) folder_unmatched)->summary);
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
gchar *uid = camel_folder_summary_uid_from_index (((CamelFolder *) folder_unmatched)->summary, i);
if (uid) {
if (strncmp (uid, u.hash, 8) == 0) {
- if (g_hash_table_lookup (allhash, uid+8) == NULL) {
+ if (g_hash_table_lookup (allhash, uid + 8) == NULL) {
CamelVeeMessageInfo *vinfo = (CamelVeeMessageInfo *) camel_folder_summary_index (CAMEL_FOLDER (folder_unmatched)->summary, i);
if (vinfo) {
camel_folder_summary_update_counts_by_flags (CAMEL_FOLDER (folder_unmatched)->summary, vinfo->old_flags, TRUE);
@@ -1882,7 +1896,7 @@ vee_folder_rebuild_folder (CamelVeeFolder *vee_folder,
i--;
count--;
} else {
- g_hash_table_remove (allhash, uid+8);
+ g_hash_table_remove (allhash, uid + 8);
}
}
g_free (uid);
@@ -2018,7 +2032,7 @@ vee_folder_folder_renamed (CamelVeeFolder *vee_folder,
/* TODO: This could probably be done in another thread, tho it is pretty quick/memory bound */
/* Life just got that little bit harder, if the folder is renamed, it means it breaks all of our uid's.
- We need to remove the old uid's, fix them up, then release the new uid's, for the uid's that match this folder */
+ * We need to remove the old uid's, fix them up, then release the new uid's, for the uid's that match this folder */
camel_vee_folder_hash_folder (f, hash);
@@ -2095,7 +2109,8 @@ camel_vee_folder_init (CamelVeeFolder *vee_folder)
}
void
-camel_vee_folder_construct (CamelVeeFolder *vf, guint32 flags)
+camel_vee_folder_construct (CamelVeeFolder *vf,
+ guint32 flags)
{
CamelFolder *folder = (CamelFolder *) vf;
CamelStore *parent_store;
@@ -2121,7 +2136,9 @@ camel_vee_folder_construct (CamelVeeFolder *vf, guint32 flags)
* Returns: A new CamelVeeFolder widget.
**/
CamelFolder *
-camel_vee_folder_new (CamelStore *parent_store, const gchar *full, guint32 flags)
+camel_vee_folder_new (CamelStore *parent_store,
+ const gchar *full,
+ guint32 flags)
{
CamelVeeFolder *vf;
gchar *tmp;
@@ -2164,7 +2181,8 @@ camel_vee_folder_new (CamelStore *parent_store, const gchar *full, guint32 flags
}
void
-camel_vee_folder_set_expression (CamelVeeFolder *vf, const gchar *query)
+camel_vee_folder_set_expression (CamelVeeFolder *vf,
+ const gchar *query)
{
CAMEL_VEE_FOLDER_GET_CLASS (vf)->set_expression (vf, query);
}
@@ -2177,7 +2195,8 @@ camel_vee_folder_set_expression (CamelVeeFolder *vf, const gchar *query)
* Adds @sub as a source folder to @vf.
**/
void
-camel_vee_folder_add_folder (CamelVeeFolder *vf, CamelFolder *sub)
+camel_vee_folder_add_folder (CamelVeeFolder *vf,
+ CamelFolder *sub)
{
CamelVeeFolderPrivate *p = vf->priv;
gint i;
@@ -2348,7 +2367,8 @@ remove_folders (CamelFolder *folder,
* Set the whole list of folder sources on a vee folder.
**/
void
-camel_vee_folder_set_folders (CamelVeeFolder *vf, GList *folders)
+camel_vee_folder_set_folders (CamelVeeFolder *vf,
+ GList *folders)
{
CamelVeeFolderPrivate *p = vf->priv;
GHashTable *remove = g_hash_table_new (NULL, NULL);
@@ -2391,7 +2411,8 @@ camel_vee_folder_set_folders (CamelVeeFolder *vf, GList *folders)
* unique, and remain static for a given folder.
**/
void
-camel_vee_folder_hash_folder (CamelFolder *folder, gchar buffer[8])
+camel_vee_folder_hash_folder (CamelFolder *folder,
+ gchar buffer[8])
{
CamelStore *parent_store;
GChecksum *checksum;
@@ -2419,7 +2440,7 @@ camel_vee_folder_hash_folder (CamelFolder *folder, gchar buffer[8])
g_base64_encode_step (digest, 6, FALSE, buffer, &state, &save);
g_base64_encode_close (FALSE, buffer, &state, &save);
- for (i=0;i<8;i++) {
+ for (i = 0; i < 8; i++) {
if (buffer[i] == '+')
buffer[i] = '.';
if (buffer[i] == '/')
@@ -2439,19 +2460,21 @@ camel_vee_folder_hash_folder (CamelFolder *folder, gchar buffer[8])
* Returns:
**/
CamelFolder *
-camel_vee_folder_get_location (CamelVeeFolder *vf, const CamelVeeMessageInfo *vinfo, gchar **realuid)
+camel_vee_folder_get_location (CamelVeeFolder *vf,
+ const CamelVeeMessageInfo *vinfo,
+ gchar **realuid)
{
CamelFolder *folder;
folder = vinfo->summary->folder;
/* locking? yes? no? although the vfolderinfo is valid when obtained
- the folder in it might not necessarily be so ...? */
+ * the folder in it might not necessarily be so ...? */
if (CAMEL_IS_VEE_FOLDER (folder)) {
CamelFolder *res;
const CamelVeeMessageInfo *vfinfo;
- vfinfo = (CamelVeeMessageInfo *) camel_folder_get_message_info (folder, camel_message_info_uid (vinfo)+8);
+ vfinfo = (CamelVeeMessageInfo *) camel_folder_get_message_info (folder, camel_message_info_uid (vinfo) + 8);
res = camel_vee_folder_get_location ((CamelVeeFolder *) folder, vfinfo, realuid);
camel_folder_free_message_info (folder, (CamelMessageInfo *) vfinfo);
return res;
@@ -2478,7 +2501,8 @@ camel_vee_folder_get_location (CamelVeeFolder *vf, const CamelVeeMessageInfo *vi
* Since: 3.2
**/
void
-camel_vee_folder_ignore_next_changed_event (CamelVeeFolder *vf, CamelFolder *sub)
+camel_vee_folder_ignore_next_changed_event (CamelVeeFolder *vf,
+ CamelFolder *sub)
{
g_return_if_fail (vf != NULL);
g_return_if_fail (CAMEL_IS_VEE_FOLDER (vf));
diff --git a/camel/camel-vee-store.c b/camel/camel-vee-store.c
index 1d5a039..7e30e99 100644
--- a/camel/camel-vee-store.c
+++ b/camel/camel-vee-store.c
@@ -33,14 +33,14 @@
#include "camel-vee-store.h"
/* Translators: 'Unmatched' is a folder name under Search folders where are shown
- all messages not belonging into any other configured search folder */
+ * all messages not belonging into any other configured search folder */
#define PRETTY_UNMATCHED_FOLDER_NAME _("Unmatched")
#define d(x)
/* flags
- 1 = delete (0 = add)
- 2 = noselect
+ * 1 = delete (0 = add)
+ * 2 = noselect
*/
#define CHANGE_ADD (0)
#define CHANGE_DELETE (1)
@@ -92,7 +92,9 @@ change_folder (CamelStore *store,
}
static void
-cvs_free_unmatched (gpointer key, gpointer value, gpointer data)
+cvs_free_unmatched (gpointer key,
+ gpointer value,
+ gpointer data)
{
g_free (key);
}
@@ -172,7 +174,7 @@ vee_store_get_folder_sync (CamelStore *store,
/* create a dummy vFolder for this, makes get_folder_info simpler */
folder = camel_vee_folder_new (store, name, flags);
camel_object_bag_add (store->folders, name, folder);
- change_folder (store, name, CHANGE_ADD|CHANGE_NOSELECT, 0);
+ change_folder (store, name, CHANGE_ADD | CHANGE_NOSELECT, 0);
/* FIXME: this sort of leaks folder, nobody owns a ref to it but us */
} else {
g_object_unref (folder);
@@ -203,7 +205,7 @@ vee_store_get_folder_info_sync (CamelStore *store,
infos_hash = g_hash_table_new (g_str_hash, g_str_equal);
folders = camel_object_bag_list (store->folders);
qsort (folders->pdata, folders->len, sizeof (folders->pdata[0]), vee_folder_cmp);
- for (i=0;i<folders->len;i++) {
+ for (i = 0; i < folders->len; i++) {
CamelVeeFolder *folder = folders->pdata[i];
const gchar *full_name;
const gchar *display_name;
@@ -225,7 +227,7 @@ vee_store_get_folder_info_sync (CamelStore *store,
&& strncmp (full_name, top, toplen) == 0
&& full_name[toplen] == '/'
&& ((flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE)
- || strchr (full_name+toplen+1, '/') == NULL)));
+ || strchr (full_name + toplen + 1, '/') == NULL)));
} else {
add = (flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE)
|| strchr (full_name, '/') == NULL;
@@ -269,7 +271,7 @@ vee_store_get_folder_info_sync (CamelStore *store,
pinfo = NULL;
if (pinfo) {
- pinfo->flags = (pinfo->flags & ~(CAMEL_FOLDER_CHILDREN|CAMEL_FOLDER_NOCHILDREN))|CAMEL_FOLDER_CHILDREN;
+ pinfo->flags = (pinfo->flags & ~(CAMEL_FOLDER_CHILDREN | CAMEL_FOLDER_NOCHILDREN)) | CAMEL_FOLDER_CHILDREN;
d (printf ("updating parent flags for children '%s' %08x\n", pinfo->full_name, pinfo->flags));
tail = pinfo->child;
if (tail == NULL)
@@ -412,7 +414,7 @@ vee_store_rename_folder_sync (CamelStore *store,
}
/* Check that new parents exist, if not, create dummy ones */
- name = alloca (strlen (new)+1);
+ name = alloca (strlen (new) + 1);
strcpy (name, new);
p = name;
while ( (p = strchr (p, '/'))) {
@@ -423,7 +425,7 @@ vee_store_rename_folder_sync (CamelStore *store,
/* create a dummy vFolder for this, makes get_folder_info simpler */
folder = camel_vee_folder_new (store, name, ((CamelVeeFolder *) oldfolder)->flags);
camel_object_bag_add (store->folders, name, folder);
- change_folder (store, name, CHANGE_ADD|CHANGE_NOSELECT, 0);
+ change_folder (store, name, CHANGE_ADD | CHANGE_NOSELECT, 0);
/* FIXME: this sort of leaks folder, nobody owns a ref to it but us */
} else {
g_object_unref (folder);
diff --git a/camel/camel-vee-summary.c b/camel/camel-vee-summary.c
index 060928a..612874c 100644
--- a/camel/camel-vee-summary.c
+++ b/camel/camel-vee-summary.c
@@ -44,7 +44,8 @@
G_DEFINE_TYPE (CamelVeeSummary, camel_vee_summary, CAMEL_TYPE_FOLDER_SUMMARY)
static void
-vee_message_info_free (CamelFolderSummary *s, CamelMessageInfo *info)
+vee_message_info_free (CamelFolderSummary *s,
+ CamelMessageInfo *info)
{
CamelVeeMessageInfo *mi = (CamelVeeMessageInfo *) info;
@@ -53,7 +54,8 @@ vee_message_info_free (CamelFolderSummary *s, CamelMessageInfo *info)
}
static CamelMessageInfo *
-vee_message_info_clone (CamelFolderSummary *s, const CamelMessageInfo *mi)
+vee_message_info_clone (CamelFolderSummary *s,
+ const CamelMessageInfo *mi)
{
CamelVeeMessageInfo *to;
const CamelVeeMessageInfo *from = (const CamelVeeMessageInfo *) mi;
@@ -70,13 +72,14 @@ vee_message_info_clone (CamelFolderSummary *s, const CamelMessageInfo *mi)
#define HANDLE_NULL_INFO(value) if (!rmi) { d(g_warning (G_STRLOC ": real info is NULL for %s, safeguarding\n", mi->uid)); return value; }
static gconstpointer
-vee_info_ptr (const CamelMessageInfo *mi, gint id)
+vee_info_ptr (const CamelMessageInfo *mi,
+ gint id)
{
CamelVeeMessageInfo *vmi = (CamelVeeMessageInfo *) mi;
CamelMessageInfo *rmi;
gpointer p;
- rmi = camel_folder_summary_uid (vmi->summary, mi->uid+8);
+ rmi = camel_folder_summary_uid (vmi->summary, mi->uid + 8);
HANDLE_NULL_INFO (NULL);
p = (gpointer) camel_message_info_ptr (rmi, id);
camel_message_info_free (rmi);
@@ -85,9 +88,10 @@ vee_info_ptr (const CamelMessageInfo *mi, gint id)
}
static guint32
-vee_info_uint32 (const CamelMessageInfo *mi, gint id)
+vee_info_uint32 (const CamelMessageInfo *mi,
+ gint id)
{
- CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *) mi)->summary, mi->uid+8);
+ CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *) mi)->summary, mi->uid + 8);
guint32 ret;
HANDLE_NULL_INFO (0);
@@ -99,9 +103,10 @@ vee_info_uint32 (const CamelMessageInfo *mi, gint id)
}
static time_t
-vee_info_time (const CamelMessageInfo *mi, gint id)
+vee_info_time (const CamelMessageInfo *mi,
+ gint id)
{
- CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *) mi)->summary, mi->uid+8);
+ CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *) mi)->summary, mi->uid + 8);
time_t ret;
HANDLE_NULL_INFO (0);
@@ -112,9 +117,10 @@ vee_info_time (const CamelMessageInfo *mi, gint id)
}
static gboolean
-vee_info_user_flag (const CamelMessageInfo *mi, const gchar *id)
+vee_info_user_flag (const CamelMessageInfo *mi,
+ const gchar *id)
{
- CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *) mi)->summary, mi->uid+8);
+ CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *) mi)->summary, mi->uid + 8);
gboolean ret;
HANDLE_NULL_INFO (FALSE);
@@ -125,9 +131,10 @@ vee_info_user_flag (const CamelMessageInfo *mi, const gchar *id)
}
static const gchar *
-vee_info_user_tag (const CamelMessageInfo *mi, const gchar *id)
+vee_info_user_tag (const CamelMessageInfo *mi,
+ const gchar *id)
{
- CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *) mi)->summary, mi->uid+8);
+ CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *) mi)->summary, mi->uid + 8);
const gchar *ret;
HANDLE_NULL_INFO("");
@@ -138,7 +145,9 @@ vee_info_user_tag (const CamelMessageInfo *mi, const gchar *id)
}
static gboolean
-vee_info_set_user_flag (CamelMessageInfo *mi, const gchar *name, gboolean value)
+vee_info_set_user_flag (CamelMessageInfo *mi,
+ const gchar *name,
+ gboolean value)
{
gint res = FALSE;
CamelVeeFolder *vf = (CamelVeeFolder *) mi->summary->folder;
@@ -150,11 +159,11 @@ vee_info_set_user_flag (CamelMessageInfo *mi, const gchar *name, gboolean value)
g_strescape (vf->expression, ""));
if (mi->uid) {
- CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *) mi)->summary, mi->uid+8);
+ CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *) mi)->summary, mi->uid + 8);
HANDLE_NULL_INFO (FALSE);
/* ignore changes done in the folder itself,
- unless it's a vTrash or vJunk folder */
+ * unless it's a vTrash or vJunk folder */
if (!CAMEL_IS_VTRASH_FOLDER (vf))
camel_vee_folder_ignore_next_changed_event (vf, rmi->summary->folder);
@@ -167,16 +176,18 @@ vee_info_set_user_flag (CamelMessageInfo *mi, const gchar *name, gboolean value)
}
static gboolean
-vee_info_set_user_tag (CamelMessageInfo *mi, const gchar *name, const gchar *value)
+vee_info_set_user_tag (CamelMessageInfo *mi,
+ const gchar *name,
+ const gchar *value)
{
gint res = FALSE;
if (mi->uid) {
- CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *) mi)->summary, mi->uid+8);
+ CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *) mi)->summary, mi->uid + 8);
HANDLE_NULL_INFO (FALSE);
/* ignore changes done in the folder itself,
- unless it's a vTrash or vJunk folder */
+ * unless it's a vTrash or vJunk folder */
if (!CAMEL_IS_VTRASH_FOLDER (mi->summary->folder))
camel_vee_folder_ignore_next_changed_event ((CamelVeeFolder *) mi->summary->folder, rmi->summary->folder);
@@ -202,14 +213,14 @@ vee_info_set_flags (CamelMessageInfo *mi,
g_strescape (vf->expression, ""));
if (mi->uid) {
- CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *) mi)->summary, mi->uid+8);
+ CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *) mi)->summary, mi->uid + 8);
HANDLE_NULL_INFO (FALSE);
camel_folder_summary_update_counts_by_flags (mi->summary, camel_message_info_flags (rmi), TRUE);
/* ignore changes done in the folder itself,
- unless it's a vTrash or vJunk folder */
+ * unless it's a vTrash or vJunk folder */
if (!CAMEL_IS_VTRASH_FOLDER (vf))
camel_vee_folder_ignore_next_changed_event (vf, rmi->summary->folder);
@@ -238,7 +249,8 @@ vee_info_set_flags (CamelMessageInfo *mi,
}
static CamelMessageInfo *
-message_info_from_uid (CamelFolderSummary *s, const gchar *uid)
+message_info_from_uid (CamelFolderSummary *s,
+ const gchar *uid)
{
CamelMessageInfo *info;
@@ -343,7 +355,8 @@ camel_vee_summary_new (CamelFolder *parent)
* Since: 2.24
**/
GPtrArray *
-camel_vee_summary_get_ids (CamelVeeSummary *summary, gchar hash[8])
+camel_vee_summary_get_ids (CamelVeeSummary *summary,
+ gchar hash[8])
{
gchar *shash = g_strdup_printf("%c%c%c%c%c%c%c%c", hash[0], hash[1], hash[2], hash[3], hash[4], hash[5], hash[6], hash[7]);
CamelFolderSummary *cfs = (CamelFolderSummary *) summary;
@@ -362,14 +375,17 @@ camel_vee_summary_get_ids (CamelVeeSummary *summary, gchar hash[8])
}
CamelVeeMessageInfo *
-camel_vee_summary_add (CamelVeeSummary *s, CamelFolderSummary *summary, const gchar *uid, const gchar hash[8])
+camel_vee_summary_add (CamelVeeSummary *s,
+ CamelFolderSummary *summary,
+ const gchar *uid,
+ const gchar hash[8])
{
CamelVeeMessageInfo *mi;
CamelMessageInfo *rmi;
gchar *vuid;
- vuid = g_malloc (strlen (uid)+9);
+ vuid = g_malloc (strlen (uid) + 9);
memcpy (vuid, hash, 8);
- strcpy (vuid+8, uid);
+ strcpy (vuid + 8, uid);
camel_folder_summary_lock (CAMEL_FOLDER_SUMMARY (s), CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
mi = (CamelVeeMessageInfo *) g_hash_table_lookup (((CamelFolderSummary *) s)->loaded_infos, vuid);
diff --git a/camel/camel-vtrash-folder.c b/camel/camel-vtrash-folder.c
index 088fa1a..f3a5038 100644
--- a/camel/camel-vtrash-folder.c
+++ b/camel/camel-vtrash-folder.c
@@ -90,7 +90,7 @@ transfer_messages (CamelFolder *folder,
camel_folder_thaw (md->folder);
- for (i=0;i<md->uids->len;i++)
+ for (i = 0; i < md->uids->len; i++)
g_free (md->uids->pdata[i]);
g_ptr_array_free (md->uids, TRUE);
@@ -199,7 +199,7 @@ vtrash_folder_transfer_messages_to_sync (CamelFolder *source,
camel_message_info_set_flags ((CamelMessageInfo *) mi, sbit, 0);
tuid = uids->pdata[i];
- if (strlen (tuid)>8)
+ if (strlen (tuid) > 8)
tuid += 8;
g_ptr_array_add (md->uids, g_strdup (tuid));
g_ptr_array_add (md->source_uids, uids->pdata[i]);
@@ -244,7 +244,8 @@ camel_vtrash_folder_init (CamelVTrashFolder *vtrash_folder)
* Returns: a new #CamelVTrashFolder object
**/
CamelFolder *
-camel_vtrash_folder_new (CamelStore *parent_store, camel_vtrash_folder_t type)
+camel_vtrash_folder_new (CamelStore *parent_store,
+ camel_vtrash_folder_t type)
{
CamelVTrashFolder *vtrash;
diff --git a/camel/camel.c b/camel/camel.c
index fc9f415..ce26323 100644
--- a/camel/camel.c
+++ b/camel/camel.c
@@ -45,13 +45,13 @@
#ifdef CAMEL_HAVE_NSS
/* To protect NSS initialization and shutdown. This prevents
- concurrent calls to shutdown () and init () by different threads */
+ * concurrent calls to shutdown () and init () by different threads */
PRLock *nss_initlock = NULL;
/* Whether or not Camel has initialized the NSS library. We cannot
- unconditionally call NSS_Shutdown () if NSS was initialized by other
- library before. This boolean ensures that we only perform a cleanup
- if and only if Camel is the one that previously initialized NSS */
+ * unconditionally call NSS_Shutdown () if NSS was initialized by other
+ * library before. This boolean ensures that we only perform a cleanup
+ * if and only if Camel is the one that previously initialized NSS */
volatile gboolean nss_initialized = FALSE;
#endif
@@ -84,7 +84,8 @@ nss_has_system_db (void)
}
gint
-camel_init (const gchar *configdir, gboolean nss_init)
+camel_init (const gchar *configdir,
+ gboolean nss_init)
{
CamelCertDB *certdb;
gchar *path;
diff --git a/camel/db-scrap-tools/db.c b/camel/db-scrap-tools/db.c
index 8af52f5..06bc208 100644
--- a/camel/db-scrap-tools/db.c
+++ b/camel/db-scrap-tools/db.c
@@ -6,10 +6,13 @@
sqlite3 *db;
static gint
-callback (gpointer data, gint argc, gchar **argv, gchar **azColName)
+callback (gpointer data,
+ gint argc,
+ gchar **argv,
+ gchar **azColName)
{
gint i;
- for (i=0; i<argc; i++) {
+ for (i = 0; i < argc; i++) {
printf("%s = %s\n", azColName[i], argv[i] ? argv[i] : "NULL");
}
printf("--DONE \n");
@@ -18,14 +21,15 @@ callback (gpointer data, gint argc, gchar **argv, gchar **azColName)
}
static gint
-select_stmt (const gchar * stmt) {
+select_stmt (const gchar *stmt)
+{
gchar *errmsg;
- gint ret;
- gint nrecs = 0;
+ gint ret;
+ gint nrecs = 0;
ret = sqlite3_exec (db, stmt, callback, &nrecs, &errmsg);
- if (ret!=SQLITE_OK) {
+ if (ret != SQLITE_OK) {
printf("Error in select statement %s [%s].\n", stmt, errmsg);
} else {
printf("\n %d records returned.\n", nrecs);
@@ -35,9 +39,10 @@ select_stmt (const gchar * stmt) {
}
static gint
-sql_stmt (const gchar * stmt) {
+sql_stmt (const gchar *stmt)
+{
gchar *errmsg;
- gint ret;
+ gint ret;
ret = sqlite3_exec (db, stmt, 0, 0, &errmsg);
@@ -54,7 +59,7 @@ sql_stmt (const gchar * stmt) {
static gint
create_table (const gchar *tablename)
{
- gchar *cmd = malloc (sizeof (CREATE_STMT)+20);
+ gchar *cmd = malloc (sizeof (CREATE_STMT) + 20);
sprintf (cmd, CREATE_STMT, tablename);
sql_stmt (cmd);
}
diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c
index 3aa0059..fe16972 100644
--- a/camel/providers/imap/camel-imap-command.c
+++ b/camel/providers/imap/camel-imap-command.c
@@ -519,11 +519,11 @@ imap_read_untagged (CamelImapStore *store,
break;
/* HACK ALERT: We scan the non-literal part of the string, looking for possible s expression braces.
- This assumes we're getting s-expressions, which we should be.
- This is so if we get a blank line after a literal, in an s-expression, we can keep going, since
- we do no other parsing at this level.
- TODO: handle quoted strings? */
- for (s=str->str; s<p; s++) {
+ * This assumes we're getting s-expressions, which we should be.
+ * This is so if we get a blank line after a literal, in an s-expression, we can keep going, since
+ * we do no other parsing at this level.
+ * TODO: handle quoted strings? */
+ for (s = str->str; s < p; s++) {
if (*s == '(')
sexp++;
else if (*s == ')')
@@ -570,7 +570,7 @@ imap_read_untagged (CamelImapStore *store,
if (camel_debug("imap")) {
printf("Literal: -->");
- fwrite (str->str+1, 1, length, stdout);
+ fwrite (str->str + 1, 1, length, stdout);
printf("<--\n");
}
@@ -619,7 +619,7 @@ imap_read_untagged (CamelImapStore *store,
goto lose;
/* MAJOR HACK ALERT, gropuwise sometimes sends an extra blank line after literals, check that here
- But only do it if we're inside an sexpression */
+ * But only do it if we're inside an sexpression */
if (line[0] == 0 && sexp > 0)
g_warning("Server sent empty line after a literal, assuming in error");
} while (line[0] == 0 && sexp > 0);
@@ -653,7 +653,8 @@ imap_read_untagged (CamelImapStore *store,
* EXPUNGE and EXISTS responses in it. Releases @store's connect_lock.
**/
void
-camel_imap_response_free (CamelImapStore *store, CamelImapResponse *response)
+camel_imap_response_free (CamelImapStore *store,
+ CamelImapResponse *response)
{
gint i, number, exists = 0;
GArray *expunged = NULL;
@@ -714,7 +715,7 @@ camel_imap_response_free (CamelImapStore *store, CamelImapResponse *response)
**/
void
camel_imap_response_free_without_processing (CamelImapStore *store,
- CamelImapResponse *response)
+ CamelImapResponse *response)
{
if (!response)
return;
@@ -743,9 +744,9 @@ camel_imap_response_free_without_processing (CamelImapStore *store,
**/
gchar *
camel_imap_response_extract (CamelImapStore *store,
- CamelImapResponse *response,
- const gchar *type,
- GError **error)
+ CamelImapResponse *response,
+ const gchar *type,
+ GError **error)
{
gint len, i;
gchar *resp;
@@ -794,8 +795,8 @@ camel_imap_response_extract (CamelImapStore *store,
**/
gchar *
camel_imap_response_extract_continuation (CamelImapStore *store,
- CamelImapResponse *response,
- GError **error)
+ CamelImapResponse *response,
+ GError **error)
{
gchar *status;
@@ -817,8 +818,9 @@ camel_imap_response_extract_continuation (CamelImapStore *store,
}
static gchar *
-imap_command_strdup_vprintf (CamelImapStore *store, const gchar *fmt,
- va_list ap)
+imap_command_strdup_vprintf (CamelImapStore *store,
+ const gchar *fmt,
+ va_list ap)
{
GPtrArray *args;
const gchar *p, *start;
@@ -947,7 +949,9 @@ imap_command_strdup_vprintf (CamelImapStore *store, const gchar *fmt,
}
static gchar *
-imap_command_strdup_printf (CamelImapStore *store, const gchar *fmt, ...)
+imap_command_strdup_printf (CamelImapStore *store,
+ const gchar *fmt,
+ ...)
{
va_list ap;
gchar *result;
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index b32969b..7bad463 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -355,8 +355,10 @@ replay_offline_journal (CamelImapStore *imap_store,
}
CamelFolder *
-camel_imap_folder_new (CamelStore *parent, const gchar *folder_name,
- const gchar *folder_dir, GError **error)
+camel_imap_folder_new (CamelStore *parent,
+ const gchar *folder_name,
+ const gchar *folder_dir,
+ GError **error)
{
CamelFolder *folder;
CamelImapFolder *imap_folder;
@@ -475,7 +477,7 @@ camel_imap_folder_new (CamelStore *parent, const gchar *folder_name,
folder_is_junk =
(parent->flags & CAMEL_STORE_VJUNK) == 0 &&
- g_ascii_strcasecmp (junk_path, folder_name) == 0;
+ g_ascii_strcasecmp (junk_path, folder_name) == 0;
if (folder_is_junk)
folder->folder_flags |= CAMEL_FOLDER_IS_JUNK;
@@ -573,7 +575,7 @@ camel_imap_folder_selected (CamelFolder *folder,
folder->permanent_flags = perm_flags;
} else if (!g_ascii_strncasecmp (resp, "OK [UIDVALIDITY ", 16)) {
validity = strtoul (resp + 16, NULL, 10);
- } else if (isdigit ((guchar)*resp)) {
+ } else if (isdigit ((guchar) * resp)) {
gulong num = strtoul (resp, &resp, 10);
if (!g_ascii_strncasecmp (resp, " EXISTS", 7)) {
@@ -674,13 +676,14 @@ imap_get_filename (CamelFolder *folder,
const gchar *uid,
GError **error)
{
- CamelImapFolder *imap_folder = (CamelImapFolder*) folder;
+ CamelImapFolder *imap_folder = (CamelImapFolder *) folder;
return camel_imap_message_cache_get_filename (imap_folder->cache, uid, "", error);
}
static void
-imap_rename (CamelFolder *folder, const gchar *new)
+imap_rename (CamelFolder *folder,
+ const gchar *new)
{
CamelService *service;
CamelStore *parent_store;
@@ -895,7 +898,7 @@ imap_refresh_info_sync (CamelFolder *folder,
check_rescan = 0;
/* Check whether there are changes in total/unread messages in the folders
- and if so, then rescan whole summary */
+ * and if so, then rescan whole summary */
if (get_folder_status (folder, &server_total, &server_unread, cancellable, &local_error)) {
total = camel_folder_summary_count (folder->summary);
@@ -926,7 +929,8 @@ done:
}
static void
-fillup_custom_flags (CamelMessageInfo *mi, gchar *custom_flags)
+fillup_custom_flags (CamelMessageInfo *mi,
+ gchar *custom_flags)
{
gchar **array_str;
gint index = 0;
@@ -943,7 +947,8 @@ fillup_custom_flags (CamelMessageInfo *mi, gchar *custom_flags)
/* This will merge custom flags with those in message info. Returns whether was some change. */
static gboolean
-merge_custom_flags (CamelMessageInfo *mi, const gchar *custom_flags)
+merge_custom_flags (CamelMessageInfo *mi,
+ const gchar *custom_flags)
{
GSList *list, *p;
GHashTable *server;
@@ -981,11 +986,11 @@ merge_custom_flags (CamelMessageInfo *mi, const gchar *custom_flags)
for (p = list; p; p = p->next) {
if (p->next && strcmp (p->data, p->next->data) == 0) {
/* This flag is there twice, which means it was on the server and
- in our local summary too; thus skip these two elements. */
+ * in our local summary too; thus skip these two elements. */
p = p->next;
} else {
/* If this value came from the server, then add it to our local summary,
- otherwise it was in local summary, but isn't on the server, thus remove it. */
+ * otherwise it was in local summary, but isn't on the server, thus remove it. */
changed = TRUE;
mi->dirty = TRUE;
if (mi->summary)
@@ -1019,7 +1024,7 @@ imap_rescan (CamelFolder *folder,
} *new;
gchar *resp, *uid;
CamelImapResponseType type;
- gint i, j, seq, summary_got, del=0;
+ gint i, j, seq, summary_got, del = 0;
guint summary_len;
CamelMessageInfo *info;
CamelImapMessageInfo *iinfo;
@@ -1161,7 +1166,7 @@ imap_rescan (CamelFolder *folder,
/* these will be deleted from db in a moment. So adjust the counts please */
if (info) {
CamelMessageInfoBase *dinfo = (CamelMessageInfoBase *) info;
- gint unread=0, deleted=0, junk=0;
+ gint unread = 0, deleted = 0, junk = 0;
guint32 flags;
flags = dinfo->flags;
@@ -1190,7 +1195,7 @@ imap_rescan (CamelFolder *folder,
folder->summary->saved_count--;
}
- seq = i + 1-del;
+ seq = i + 1 - del;
del++;
g_array_append_val (removed, seq);
camel_message_info_free (info);
@@ -1203,7 +1208,7 @@ imap_rescan (CamelFolder *folder,
if (new[j].flags != iinfo->server_flags) {
guint32 server_set, server_cleared;
- gint read=0, deleted=0, junk=0;
+ gint read = 0, deleted = 0, junk = 0;
server_set = new[j].flags & ~iinfo->server_flags;
server_cleared = iinfo->server_flags & ~new[j].flags;
@@ -1247,8 +1252,8 @@ imap_rescan (CamelFolder *folder,
}
/* Do not merge custom flags when server doesn't support it.
- Because server always reports NULL, which means none, which
- will remove user's flags from local machine, which is bad.
+ * Because server always reports NULL, which means none, which
+ * will remove user's flags from local machine, which is bad.
*/
if ((folder->permanent_flags & CAMEL_MESSAGE_USER) != 0 && merge_custom_flags (info, new[j].custom_flags))
changed = TRUE;
@@ -1291,10 +1296,10 @@ imap_rescan (CamelFolder *folder,
for (i = seq; i <= summary_len; i++) {
CamelMessageInfoBase *dinfo;
gint j;
- dinfo = (CamelMessageInfoBase *) camel_folder_summary_index (folder->summary, i-1);
+ dinfo = (CamelMessageInfoBase *) camel_folder_summary_index (folder->summary, i - 1);
if (dinfo) {
/* these will be deleted from db in a moment. So adjust the counts please */
- gint unread=0, deleted=0, junk=0;
+ gint unread = 0, deleted = 0, junk = 0;
guint32 flags;
flags = dinfo->flags;
@@ -1337,7 +1342,8 @@ imap_rescan (CamelFolder *folder,
}
static const gchar *
-get_message_uid (CamelFolder *folder, CamelImapMessageInfo *info)
+get_message_uid (CamelFolder *folder,
+ CamelImapMessageInfo *info)
{
const gchar *uid;
@@ -1347,7 +1353,7 @@ get_message_uid (CamelFolder *folder, CamelImapMessageInfo *info)
uid = camel_message_info_uid (info);
g_return_val_if_fail (uid != NULL, NULL);
- if (!isdigit ((guchar)*uid)) {
+ if (!isdigit ((guchar) * uid)) {
uid = camel_imap_journal_uidmap_lookup ((CamelIMAPJournal *) CAMEL_IMAP_FOLDER (folder)->journal, uid);
g_return_val_if_fail (uid != NULL, NULL);
}
@@ -1365,7 +1371,14 @@ get_message_uid (CamelFolder *folder, CamelImapMessageInfo *info)
* caller must free the infos, the array, and the set string.
*/
static GPtrArray *
-get_matching (CamelFolder *folder, guint32 flags, guint32 mask, CamelMessageInfo *master_info, gchar **set, GPtrArray *summary, GPtrArray *deleted_uids, GPtrArray *junked_uids)
+get_matching (CamelFolder *folder,
+ guint32 flags,
+ guint32 mask,
+ CamelMessageInfo *master_info,
+ gchar **set,
+ GPtrArray *summary,
+ GPtrArray *deleted_uids,
+ GPtrArray *junked_uids)
{
GPtrArray *matches;
CamelImapMessageInfo *info;
@@ -1405,8 +1418,8 @@ get_matching (CamelFolder *folder, guint32 flags, guint32 mask, CamelMessageInfo
continue;
/* if the resulting flag list is empty, then "concat" other message
- only when server_flags are same, because there will be a flag removal
- command for this type of situation */
+ * only when server_flags are same, because there will be a flag removal
+ * command for this type of situation */
if ((info->info.flags & mask) != flags || (flags == 0 && info->server_flags != ((CamelImapMessageInfo *) master_info)->server_flags)) {
camel_message_info_free ((CamelMessageInfo *) info);
close_range ();
@@ -1416,7 +1429,7 @@ get_matching (CamelFolder *folder, guint32 flags, guint32 mask, CamelMessageInfo
uid_num = atoi (uid);
/* we got only changes, thus the uid's can be mixed up, not the consecutive list,
- thus close range if we are not in it */
+ * thus close range if we are not in it */
if (last_range_uid != -1 && uid_num != last_range_uid + 1) {
close_range ();
}
@@ -1542,7 +1555,8 @@ imap_sync_offline (CamelFolder *folder,
}
static gboolean
-host_ends_with (const gchar *host, const gchar *ends)
+host_ends_with (const gchar *host,
+ const gchar *ends)
{
gint host_len, ends_len;
@@ -1713,10 +1727,10 @@ imap_synchronize_sync (CamelFolder *folder,
}
/* Note: get_matching() uses UID_SET_LIMIT to limit
- the size of the uid-set string. We don't have to
- loop here to flush all the matching uids because
- they will be scooped up later by our parent loop (I
- think?). -- Jeff */
+ * the size of the uid-set string. We don't have to
+ * loop here to flush all the matching uids because
+ * they will be scooped up later by our parent loop (I
+ * think?). -- Jeff */
matches = get_matching (folder, info->info.flags & (folder->permanent_flags | CAMEL_MESSAGE_FOLDER_FLAGGED),
folder->permanent_flags | CAMEL_MESSAGE_FOLDER_FLAGGED, (CamelMessageInfo *) info, &set, summary,
deleted_uids, junked_uids);
@@ -1741,9 +1755,9 @@ imap_synchronize_sync (CamelFolder *folder,
if (strcmp (flaglist, "()") == 0) {
/* Note: Cyrus is broken and will not accept an
- empty-set of flags so... if this is true then we
- set and unset \Seen flag. It's necessary because
- we do not know the previously set user flags. */
+ * empty-set of flags so... if this is true then we
+ * set and unset \Seen flag. It's necessary because
+ * we do not know the previously set user flags. */
unset = TRUE;
g_free (flaglist);
@@ -1869,7 +1883,8 @@ imap_synchronize_sync (CamelFolder *folder,
}
static gint
-uid_compar (gconstpointer va, gconstpointer vb)
+uid_compar (gconstpointer va,
+ gconstpointer vb)
{
const gchar **sa = (const gchar **) va, **sb = (const gchar **) vb;
gulong a, b;
@@ -1940,7 +1955,7 @@ imap_expunge_uids_online (CamelFolder *folder,
CamelStore *parent_store;
const gchar *full_name;
gint i;
- GSList *list=NULL;
+ GSList *list = NULL;
full_name = camel_folder_get_full_name (folder);
parent_store = camel_folder_get_parent_store (folder);
@@ -1986,10 +2001,10 @@ imap_expunge_uids_online (CamelFolder *folder,
g_clear_error (&local_error);
/* UID EXPUNGE failed, something is broken on the server probably,
- thus fall back to the full expunge. It's not so good, especially
- when resyncing, it will remove already marked messages on the
- server too. I guess that's fine anyway, isn't it?
- For failed command see Gnome's bug #536486 */
+ * thus fall back to the full expunge. It's not so good, especially
+ * when resyncing, it will remove already marked messages on the
+ * server too. I guess that's fine anyway, isn't it?
+ * For failed command see Gnome's bug #536486 */
full_expunge = TRUE;
}
}
@@ -2324,7 +2339,8 @@ imap_append_offline (CamelFolder *folder,
}
static void
-imap_folder_add_ignore_recent (CamelImapFolder *imap_folder, const gchar *uid)
+imap_folder_add_ignore_recent (CamelImapFolder *imap_folder,
+ const gchar *uid)
{
g_return_if_fail (imap_folder != NULL);
g_return_if_fail (uid != NULL);
@@ -2336,7 +2352,8 @@ imap_folder_add_ignore_recent (CamelImapFolder *imap_folder, const gchar *uid)
}
static gboolean
-imap_folder_uid_in_ignore_recent (CamelImapFolder *imap_folder, const gchar *uid)
+imap_folder_uid_in_ignore_recent (CamelImapFolder *imap_folder,
+ const gchar *uid)
{
g_return_val_if_fail (imap_folder != NULL, FALSE);
g_return_val_if_fail (uid != NULL, FALSE);
@@ -2388,7 +2405,7 @@ do_append (CamelFolder *folder,
g_object_unref (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 */
+ * whatever reason, assume this is the case and save the state and try again */
retry:
if (info) {
flags = camel_message_info_flags (info);
@@ -2643,8 +2660,9 @@ imap_transfer_offline (CamelFolder *source,
}
static void
-handle_copyuid (CamelImapResponse *response, CamelFolder *source,
- CamelFolder *destination)
+handle_copyuid (CamelImapResponse *response,
+ CamelFolder *source,
+ CamelFolder *destination)
{
CamelImapMessageCache *scache = CAMEL_IMAP_FOLDER (source)->cache;
CamelImapMessageCache *dcache = CAMEL_IMAP_FOLDER (destination)->cache;
@@ -2732,7 +2750,7 @@ handle_copyuid_copy_user_tags (CamelImapResponse *response,
CAMEL_IMAP_STORE (parent_store), destination, cancellable, NULL, "NOOP"));
/* refresh folder's summary first, we copied messages there on the server,
- but do not know about it in a local summary */
+ * but do not know about it in a local summary */
if (!imap_refresh_info_sync (destination, cancellable, NULL))
goto lose;
@@ -2778,7 +2796,8 @@ handle_copyuid_copy_user_tags (CamelImapResponse *response,
/* returns whether any of messages from uidset has set any user tag or not */
static gboolean
-any_has_user_tag (CamelFolder *source, gchar *uidset)
+any_has_user_tag (CamelFolder *source,
+ gchar *uidset)
{
GPtrArray *src;
@@ -2825,7 +2844,7 @@ do_copy (CamelFolder *source,
const gchar *trash_path;
const gchar *full_name;
gchar *uidset;
- gint uid = 0, last=0, i;
+ gint uid = 0, last = 0, i;
GError *local_error = NULL;
gboolean mark_moved;
@@ -2887,9 +2906,9 @@ do_copy (CamelFolder *source,
}
/* There is a real trash folder set, which is not on a google account
- and copied messages should be deleted, thus do not move them into
- a trash folder, but just expunge them, because the copy part of
- the operation was successful.
+ * and copied messages should be deleted, thus do not move them into
+ * a trash folder, but just expunge them, because the copy part of
+ * the operation was successful.
*/
if (trash_path && !mark_moved && delete_originals)
camel_imap_expunge_uids_only (source, uids, cancellable, NULL);
@@ -2991,7 +3010,7 @@ camel_imap_transfer_resyncing (CamelFolder *source,
for (first = i; i < uids->len; i++) {
uid = uids->pdata[i];
- if (!isdigit ((guchar)*uid)) {
+ if (!isdigit ((guchar) * uid)) {
uid = camel_imap_journal_uidmap_lookup ((CamelIMAPJournal *) CAMEL_IMAP_FOLDER (source)->journal, uid);
if (!uid)
break;
@@ -3058,8 +3077,8 @@ imap_search_by_expression (CamelFolder *folder,
GPtrArray *matches;
/* we could get around this by creating a new search object each time,
- but i doubt its worth it since any long operation would lock the
- command channel too */
+ * but i doubt its worth it since any long operation would lock the
+ * command channel too */
CAMEL_IMAP_FOLDER_LOCK (folder, search_lock);
camel_folder_search_set_folder (imap_folder->search, folder);
@@ -3079,8 +3098,8 @@ imap_count_by_expression (CamelFolder *folder,
guint32 matches;
/* we could get around this by creating a new search object each time,
- but i doubt its worth it since any long operation would lock the
- command channel too */
+ * but i doubt its worth it since any long operation would lock the
+ * command channel too */
CAMEL_IMAP_FOLDER_LOCK (folder, search_lock);
camel_folder_search_set_folder (imap_folder->search, folder);
@@ -3114,7 +3133,8 @@ imap_search_by_uids (CamelFolder *folder,
}
static void
-imap_search_free (CamelFolder *folder, GPtrArray *uids)
+imap_search_free (CamelFolder *folder,
+ GPtrArray *uids)
{
CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
@@ -3139,7 +3159,8 @@ struct _part_spec_stack {
};
static void
-part_spec_push (struct _part_spec_stack **stack, gint part)
+part_spec_push (struct _part_spec_stack **stack,
+ gint part)
{
struct _part_spec_stack *node;
@@ -3243,7 +3264,7 @@ get_content (CamelImapFolder *imap_folder,
gboolean success;
/* Note: because we get the content parts uninterpreted anyway, we could potentially
- just use the normalmultipart code, except that multipart/signed wont let you yet! */
+ * just use the normalmultipart code, except that multipart/signed wont let you yet! */
body_mp = camel_multipart_signed_new ();
/* need to set this so it grabs the boundary and other info about the signed type */
@@ -3329,7 +3350,7 @@ get_content (CamelImapFolder *imap_folder,
}
/* if we had no content-type header on a multipart/digest sub-part, then we need to
- treat it as message/rfc822 instead */
+ * treat it as message/rfc822 instead */
if (isdigest && camel_medium_get_header((CamelMedium *)part, "content-type") == NULL) {
CamelContentType *ct = camel_content_type_new("message", "rfc822");
@@ -3366,7 +3387,7 @@ get_content (CamelImapFolder *imap_folder,
else
strcpy(spec, part_spec[0]?part_spec:"1");
- enc = ci->encoding?camel_transfer_encoding_from_string (ci->encoding):CAMEL_TRANSFER_ENCODING_DEFAULT;
+ enc = ci->encoding ? camel_transfer_encoding_from_string (ci->encoding) : CAMEL_TRANSFER_ENCODING_DEFAULT;
content = camel_imap_wrapper_new (imap_folder, ci->type, enc, uid, spec, part);
g_free (part_spec);
return content;
@@ -3477,7 +3498,7 @@ content_info_incomplete (CamelMessageContentInfo *ci)
|| camel_content_type_is (ci->type, "message", "rfc822")) {
if (!ci->childs)
return TRUE;
- for (ci = ci->childs;ci;ci=ci->next)
+ for (ci = ci->childs; ci; ci = ci->next)
if (content_info_incomplete (ci))
return TRUE;
}
@@ -3486,7 +3507,9 @@ content_info_incomplete (CamelMessageContentInfo *ci)
}
static CamelImapMessageInfo *
-imap_folder_summary_uid_or_error (CamelFolderSummary *summary, const gchar * uid, GError **error)
+imap_folder_summary_uid_or_error (CamelFolderSummary *summary,
+ const gchar *uid,
+ GError **error)
{
CamelImapMessageInfo *mi;
mi = (CamelImapMessageInfo *) camel_folder_summary_uid (summary, uid);
@@ -3533,7 +3556,7 @@ imap_get_message_sync (CamelFolder *folder,
}
/* All this mess is so we silently retry a fetch if we fail with
- service_unavailable, without an (equivalent) mess of gotos */
+ * service_unavailable, without an (equivalent) mess of gotos */
retry = 0;
do {
retry++;
@@ -3714,7 +3737,7 @@ imap_synchronize_message_sync (CamelFolder *folder,
* available locally or not,
*/
/* If its cached in full, just get it as is, this is only a shortcut,
- since we get stuff from the cache anyway. It affects a busted connection though. */
+ * since we get stuff from the cache anyway. It affects a busted connection though. */
if ((stream = camel_imap_folder_fetch_data(imap_folder, uid, "", TRUE, cancellable, NULL))) {
g_object_unref (stream);
return TRUE;
@@ -3728,20 +3751,6 @@ imap_synchronize_message_sync (CamelFolder *folder,
return success;
}
-/* FIXME Remove it after confirming
-static void
-imap_cache_message (CamelDiscoFolder *disco_folder, const gchar *uid,
- GError **error)
-{
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (disco_folder);
- CamelStream *stream;
-
- stream = camel_imap_folder_fetch_data (imap_folder, uid, "", FALSE, ex);
- if (stream)
- g_object_unref (stream);
-}
-*/
-
/* We pretend that a FLAGS or RFC822.SIZE response is always exactly
* 20 bytes long, and a BODY[HEADERS] response is always 2000 bytes
* long. Since we know how many of each kind of response we're
@@ -3759,7 +3768,10 @@ static const gchar *tm_months[] = {
};
static gboolean
-decode_time (const guchar **in, gint *hour, gint *min, gint *sec)
+decode_time (const guchar **in,
+ gint *hour,
+ gint *min,
+ gint *sec)
{
register const guchar *inptr;
gint *val, colons = 0;
@@ -3901,9 +3913,11 @@ struct _junk_data {
};
static void
-construct_junk_headers (gchar *header, gchar *value, struct _junk_data *jdata)
+construct_junk_headers (gchar *header,
+ gchar *value,
+ struct _junk_data *jdata)
{
- gchar *bs, *es, *flag=NULL;
+ gchar *bs, *es, *flag = NULL;
gchar *bdata = g_datalist_get_data (&(jdata->data), "BODY_PART_DATA");
struct _camel_header_param *node;
@@ -3920,7 +3934,7 @@ construct_junk_headers (gchar *header, gchar *value, struct _junk_data *jdata)
bs++;
es = strchr (bs, '\n');
if (es)
- flag = g_strndup (bs, es-bs);
+ flag = g_strndup (bs, es - bs);
else
bs = NULL;
}
@@ -3937,9 +3951,10 @@ construct_junk_headers (gchar *header, gchar *value, struct _junk_data *jdata)
}
static void
-update_summary (CamelFolderSummary *summary, CamelMessageInfoBase *info)
+update_summary (CamelFolderSummary *summary,
+ CamelMessageInfoBase *info)
{
- gint unread=0, deleted=0, junk=0;
+ gint unread = 0, deleted = 0, junk = 0;
guint32 flags = info->flags;
if (!(flags & CAMEL_MESSAGE_SEEN))
@@ -3973,8 +3988,8 @@ update_summary (CamelFolderSummary *summary, CamelMessageInfoBase *info)
#define CAMEL_MESSAGE_INFO_HEADERS "DATE FROM TO CC SUBJECT REFERENCES IN-REPLY-TO MESSAGE-ID MIME-VERSION CONTENT-TYPE CONTENT-CLASS X-CALENDAR-ATTACHMENT "
/* FIXME: this needs to be kept in sync with camel-mime-utils.c's list
- of mailing-list headers and so might be best if this were
- auto-generated? */
+ * of mailing-list headers and so might be best if this were
+ * auto-generated? */
#define MAILING_LIST_HEADERS "X-MAILING-LIST X-LOOP LIST-ID LIST-POST MAILING-LIST ORIGINATOR X-LIST SENDER RETURN-PATH X-BEENTHERE "
static gboolean
@@ -4322,8 +4337,8 @@ imap_update_summary (CamelFolder *folder,
camel_folder_change_info_add_uid (changes, camel_message_info_uid (mi));
/* Report all new messages as recent, even without that flag, thus new
- messages will be filtered even after saw by other software earlier.
- Only skip those which we added ourself, like after drag&drop to this folder. */
+ * messages will be filtered even after saw by other software earlier.
+ * Only skip those which we added ourself, like after drag&drop to this folder. */
if (!imap_folder_uid_in_ignore_recent (imap_folder, camel_message_info_uid (mi))
&& ((mi->info.flags & CAMEL_IMAP_MESSAGE_RECENT) != 0 || getenv ("FILTER_RECENT") == NULL))
camel_folder_change_info_recent_uid (changes, camel_message_info_uid (mi));
@@ -4398,7 +4413,7 @@ camel_imap_folder_changed (CamelFolder *folder,
CAMEL_IMAP_FOLDER_REC_LOCK (imap_folder, cache_lock);
camel_imap_message_cache_remove (imap_folder->cache, uid);
CAMEL_IMAP_FOLDER_REC_UNLOCK (imap_folder, cache_lock);
- camel_folder_summary_remove_index_fast (folder->summary, id-1);
+ camel_folder_summary_remove_index_fast (folder->summary, id - 1);
}
/* Delete all in one transaction */
@@ -4464,7 +4479,7 @@ camel_imap_folder_fetch_data (CamelImapFolder *imap_folder,
/* EXPUNGE responses have to modify the cache, which means
* they have to grab the cache_lock while holding the
* connect_lock.
-
+ *
* Because getting the service lock may cause MUCH unecessary
* delay when we already have the data locally, we do the
* locking separately. This could cause a race
@@ -4538,7 +4553,8 @@ camel_imap_folder_fetch_data (CamelImapFolder *imap_folder,
}
static GData *
-parse_fetch_response (CamelImapFolder *imap_folder, gchar *response)
+parse_fetch_response (CamelImapFolder *imap_folder,
+ gchar *response)
{
GData *data = NULL;
gchar *start, *part_spec = NULL, *body = NULL, *uid = NULL, *idate = NULL;
diff --git a/camel/providers/imap/camel-imap-folder.h b/camel/providers/imap/camel-imap-folder.h
index 7ea9711..6f45243 100644
--- a/camel/providers/imap/camel-imap-folder.h
+++ b/camel/providers/imap/camel-imap-folder.h
@@ -66,9 +66,9 @@ struct _CamelImapFolder {
CamelImapMessageCache *cache;
CamelOfflineJournal *journal;
- guint need_rescan:1;
- guint need_refresh:1;
- guint read_only:1;
+ guint need_rescan : 1;
+ guint need_refresh : 1;
+ guint read_only : 1;
};
struct _CamelImapFolderClass {
diff --git a/camel/providers/imap/camel-imap-journal.c b/camel/providers/imap/camel-imap-journal.c
index bbb58a2..d486197 100644
--- a/camel/providers/imap/camel-imap-journal.c
+++ b/camel/providers/imap/camel-imap-journal.c
@@ -51,7 +51,9 @@ static void free_uids (GPtrArray *array);
G_DEFINE_TYPE (CamelIMAPJournal, camel_imap_journal, CAMEL_TYPE_OFFLINE_JOURNAL)
static void
-free_uid (gpointer key, gpointer value, gpointer data)
+free_uid (gpointer key,
+ gpointer value,
+ gpointer data)
{
g_free (key);
g_free (value);
@@ -101,13 +103,16 @@ camel_imap_journal_init (CamelIMAPJournal *journal)
}
static void
-unref_folder (gpointer key, gpointer value, gpointer data)
+unref_folder (gpointer key,
+ gpointer value,
+ gpointer data)
{
g_object_unref (value);
}
static void
-imap_entry_free (CamelOfflineJournal *journal, CamelDListNode *entry)
+imap_entry_free (CamelOfflineJournal *journal,
+ CamelDListNode *entry)
{
CamelIMAPJournalEntry *imap_entry = (CamelIMAPJournalEntry *) entry;
@@ -175,7 +180,8 @@ decode_uids (FILE *file)
}
static CamelDListNode *
-imap_entry_load (CamelOfflineJournal *journal, FILE *in)
+imap_entry_load (CamelOfflineJournal *journal,
+ FILE *in)
{
CamelIMAPJournalEntry *entry;
@@ -226,7 +232,8 @@ imap_entry_load (CamelOfflineJournal *journal, FILE *in)
}
static gint
-encode_uids (FILE *file, GPtrArray *uids)
+encode_uids (FILE *file,
+ GPtrArray *uids)
{
gint i, status;
@@ -237,7 +244,9 @@ encode_uids (FILE *file, GPtrArray *uids)
}
static gint
-imap_entry_write (CamelOfflineJournal *journal, CamelDListNode *entry, FILE *out)
+imap_entry_write (CamelOfflineJournal *journal,
+ CamelDListNode *entry,
+ FILE *out)
{
CamelIMAPJournalEntry *imap_entry = (CamelIMAPJournalEntry *) entry;
GPtrArray *uids = NULL;
@@ -337,7 +346,7 @@ imap_entry_play (CamelOfflineJournal *journal,
cancellable, error);
if (!message) {
/* it seems message gone, just ignore the error and continue;
- otherwise the entry would not be removed from the list */
+ * otherwise the entry would not be removed from the list */
g_clear_error (error);
return 0;
}
@@ -392,7 +401,8 @@ imap_entry_play (CamelOfflineJournal *journal,
}
CamelOfflineJournal *
-camel_imap_journal_new (CamelImapFolder *folder, const gchar *filename)
+camel_imap_journal_new (CamelImapFolder *folder,
+ const gchar *filename)
{
CamelOfflineJournal *journal;
@@ -406,7 +416,9 @@ camel_imap_journal_new (CamelImapFolder *folder, const gchar *filename)
}
void
-camel_imap_journal_log (CamelOfflineJournal *journal, CamelOfflineAction action, ...)
+camel_imap_journal_log (CamelOfflineJournal *journal,
+ CamelOfflineAction action,
+ ...)
{
CamelIMAPJournalEntry *entry;
va_list ap;
@@ -475,15 +487,17 @@ camel_imap_journal_close_folders (CamelIMAPJournal *journal)
}
void
-camel_imap_journal_uidmap_add (CamelIMAPJournal *journal, const gchar *old_uid,
- const gchar *new_uid)
+camel_imap_journal_uidmap_add (CamelIMAPJournal *journal,
+ const gchar *old_uid,
+ const gchar *new_uid)
{
g_hash_table_insert (journal->uidmap, g_strdup (old_uid),
g_strdup (new_uid));
}
const gchar *
-camel_imap_journal_uidmap_lookup (CamelIMAPJournal *journal, const gchar *uid)
+camel_imap_journal_uidmap_lookup (CamelIMAPJournal *journal,
+ const gchar *uid)
{
return g_hash_table_lookup (journal->uidmap, uid);
}
diff --git a/camel/providers/imap/camel-imap-message-cache.c b/camel/providers/imap/camel-imap-message-cache.c
index 20a55e5..8a121a4 100644
--- a/camel/providers/imap/camel-imap-message-cache.c
+++ b/camel/providers/imap/camel-imap-message-cache.c
@@ -72,7 +72,9 @@ stream_finalize (CamelImapMessageCache *cache,
}
static void
-free_part (gpointer key, gpointer value, gpointer data)
+free_part (gpointer key,
+ gpointer value,
+ gpointer data)
{
if (value) {
if (strchr (key, '.')) {
@@ -122,8 +124,10 @@ camel_imap_message_cache_init (CamelImapMessageCache *imap_message_cache)
}
static void
-cache_put (CamelImapMessageCache *cache, const gchar *uid, const gchar *key,
- CamelStream *stream)
+cache_put (CamelImapMessageCache *cache,
+ const gchar *uid,
+ const gchar *key,
+ CamelStream *stream)
{
gchar *hash_key;
GPtrArray *subparts;
@@ -290,15 +294,20 @@ camel_imap_message_cache_max_uid (CamelImapMessageCache *cache)
* Set the path used for the message cache.
**/
void
-camel_imap_message_cache_set_path (CamelImapMessageCache *cache, const gchar *path)
+camel_imap_message_cache_set_path (CamelImapMessageCache *cache,
+ const gchar *path)
{
g_free (cache->path);
cache->path = g_strdup (path);
}
static CamelStream *
-insert_setup (CamelImapMessageCache *cache, const gchar *uid, const gchar *part_spec,
- gchar **path, gchar **key, GError **error)
+insert_setup (CamelImapMessageCache *cache,
+ const gchar *uid,
+ const gchar *part_spec,
+ gchar **path,
+ gchar **key,
+ GError **error)
{
CamelStream *stream;
gint fd;
@@ -333,7 +342,8 @@ insert_setup (CamelImapMessageCache *cache, const gchar *uid, const gchar *part_
}
static CamelStream *
-insert_abort (gchar *path, CamelStream *stream)
+insert_abort (gchar *path,
+ CamelStream *stream)
{
g_unlink (path);
g_free (path);
@@ -467,9 +477,9 @@ camel_imap_message_cache_insert_wrapper (CamelImapMessageCache *cache,
**/
gchar *
camel_imap_message_cache_get_filename (CamelImapMessageCache *cache,
- const gchar *uid,
- const gchar *part_spec,
- GError **error)
+ const gchar *uid,
+ const gchar *part_spec,
+ GError **error)
{
gchar *path;
@@ -497,8 +507,10 @@ camel_imap_message_cache_get_filename (CamelImapMessageCache *cache,
* caller must unref), or %NULL if that data is not cached.
**/
CamelStream *
-camel_imap_message_cache_get (CamelImapMessageCache *cache, const gchar *uid,
- const gchar *part_spec, GError **error)
+camel_imap_message_cache_get (CamelImapMessageCache *cache,
+ const gchar *uid,
+ const gchar *part_spec,
+ GError **error)
{
CamelStream *stream;
gchar *path, *key;
@@ -543,7 +555,8 @@ camel_imap_message_cache_get (CamelImapMessageCache *cache, const gchar *uid,
* Removes all data associated with @uid from @cache.
**/
void
-camel_imap_message_cache_remove (CamelImapMessageCache *cache, const gchar *uid)
+camel_imap_message_cache_remove (CamelImapMessageCache *cache,
+ const gchar *uid)
{
GPtrArray *subparts;
gchar *key, *path;
@@ -574,7 +587,9 @@ camel_imap_message_cache_remove (CamelImapMessageCache *cache, const gchar *uid)
}
static void
-add_uids (gpointer key, gpointer value, gpointer data)
+add_uids (gpointer key,
+ gpointer value,
+ gpointer data)
{
if (!strchr (key, '.'))
g_ptr_array_add (data, key);
@@ -612,9 +627,9 @@ camel_imap_message_cache_clear (CamelImapMessageCache *cache)
**/
void
camel_imap_message_cache_copy (CamelImapMessageCache *source,
- const gchar *source_uid,
- CamelImapMessageCache *dest,
- const gchar *dest_uid)
+ const gchar *source_uid,
+ CamelImapMessageCache *dest,
+ const gchar *dest_uid)
{
GPtrArray *subparts;
CamelStream *stream;
@@ -638,7 +653,8 @@ camel_imap_message_cache_copy (CamelImapMessageCache *source,
}
static void
-_match_part (gpointer part_name, gpointer user_data)
+_match_part (gpointer part_name,
+ gpointer user_data)
{
struct _part_find *part_find = (struct _part_find *) user_data;
if (g_str_equal (part_name, part_find->disk_part_name))
@@ -667,7 +683,9 @@ _match_part (gpointer part_name, gpointer user_data)
* needed.
*/
GPtrArray *
-camel_imap_message_cache_filter_cached (CamelImapMessageCache *cache, GPtrArray *uids, GError **error)
+camel_imap_message_cache_filter_cached (CamelImapMessageCache *cache,
+ GPtrArray *uids,
+ GError **error)
{
GPtrArray *result, *parts_list;
gint i;
diff --git a/camel/providers/imap/camel-imap-private.h b/camel/providers/imap/camel-imap-private.h
index bfa929c..8b485c3 100644
--- a/camel/providers/imap/camel-imap-private.h
+++ b/camel/providers/imap/camel-imap-private.h
@@ -2,7 +2,7 @@
#define CAMEL_IMAP_PRIVATE_H
/* need a way to configure and save this data, if this header is to
- be installed. For now, dont install it */
+ * be installed. For now, dont install it */
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/camel/providers/imap/camel-imap-provider.c b/camel/providers/imap/camel-imap-provider.c
index 4cf6ca9..cb8278c 100644
--- a/camel/providers/imap/camel-imap-provider.c
+++ b/camel/providers/imap/camel-imap-provider.c
@@ -126,7 +126,8 @@ camel_provider_module_init (void)
}
static void
-add_hash (guint *hash, gchar *s)
+add_hash (guint *hash,
+ gchar *s)
{
if (s)
*hash ^= g_str_hash(s);
@@ -146,7 +147,8 @@ imap_url_hash (gconstpointer key)
}
static gint
-check_equal (gchar *s1, gchar *s2)
+check_equal (gchar *s1,
+ gchar *s2)
{
if (s1 == NULL) {
if (s2 == NULL)
@@ -162,7 +164,8 @@ check_equal (gchar *s1, gchar *s2)
}
static gint
-imap_url_equal (gconstpointer a, gconstpointer b)
+imap_url_equal (gconstpointer a,
+ gconstpointer b)
{
const CamelURL *u1 = a, *u2 = b;
diff --git a/camel/providers/imap/camel-imap-search.c b/camel/providers/imap/camel-imap-search.c
index 3e90ddd..9cf2754 100644
--- a/camel/providers/imap/camel-imap-search.c
+++ b/camel/providers/imap/camel-imap-search.c
@@ -51,12 +51,12 @@
/*
File is:
- BODY (as in body search)
- Last uid when search performed
- termcount: number of search terms
- matchcount: number of matches
- term0, term1 ...
- match0, match1, match2, ...
+ * BODY (as in body search)
+ * Last uid when search performed
+ * termcount: number of search terms
+ * matchcount: number of matches
+ * term0, term1 ...
+ * match0, match1, match2, ...
*/
/* size of in-memory cache */
@@ -94,11 +94,12 @@ static ESExpResult *imap_body_contains (struct _ESExp *f, gint argc, struct _ESE
G_DEFINE_TYPE (CamelImapSearch, camel_imap_search, CAMEL_TYPE_FOLDER_SEARCH)
static void
-free_match (CamelImapSearch *is, struct _match_record *mr)
+free_match (CamelImapSearch *is,
+ struct _match_record *mr)
{
gint i;
- for (i=0;i<mr->termcount;i++)
+ for (i = 0; i < mr->termcount; i++)
g_free (mr->terms[i]);
g_free (mr->terms);
g_array_free (mr->matches, TRUE);
@@ -177,14 +178,16 @@ camel_imap_search_new (const gchar *cachedir)
is->cache = camel_data_cache_new (cachedir, NULL);
if (is->cache) {
/* Expire entries after 14 days of inactivity */
- camel_data_cache_set_expire_access (is->cache, 60*60*24*14);
+ camel_data_cache_set_expire_access (is->cache, 60 * 60 * 24 * 14);
}
return new;
}
static void
-hash_match (gchar hash[17], gint argc, struct _ESExpResult **argv)
+hash_match (gchar hash[17],
+ gint argc,
+ struct _ESExpResult **argv)
{
GChecksum *checksum;
guint8 *digest;
@@ -196,7 +199,7 @@ hash_match (gchar hash[17], gint argc, struct _ESExpResult **argv)
digest = g_alloca (length);
checksum = g_checksum_new (G_CHECKSUM_MD5);
- for (i=0;i<argc;i++) {
+ for (i = 0; i < argc; i++) {
if (argv[i]->type == ESEXP_RES_STRING)
g_checksum_update (
checksum, (guchar *) argv[i]->value.string, -1);
@@ -207,7 +210,7 @@ hash_match (gchar hash[17], gint argc, struct _ESExpResult **argv)
g_base64_encode_step ((guchar *) digest, 12, FALSE, hash, &state, &save);
g_base64_encode_close (FALSE, hash, &state, &save);
- for (i=0;i<16;i++) {
+ for (i = 0; i < 16; i++) {
if (hash[i] == '+')
hash[i] = ',';
if (hash[i] == '/')
@@ -218,7 +221,8 @@ hash_match (gchar hash[17], gint argc, struct _ESExpResult **argv)
}
static gint
-save_match (CamelImapSearch *is, struct _match_record *mr)
+save_match (CamelImapSearch *is,
+ struct _match_record *mr)
{
guint32 mark = MATCH_MARK;
gint ret = 0;
@@ -226,7 +230,7 @@ save_match (CamelImapSearch *is, struct _match_record *mr)
CamelStream *stream;
/* since its a cache, doesn't matter if it doesn't save, at least we have the in-memory cache
- for this session */
+ * for this session */
if (is->cache == NULL)
return -1;
@@ -243,10 +247,10 @@ save_match (CamelImapSearch *is, struct _match_record *mr)
header.lastuid = mr->lastuid;
header.validity = mr->validity;
- if (camel_stream_write (stream, (gchar *)&header, sizeof (header), NULL, NULL) != sizeof (header)
- || camel_stream_write (stream, mr->matches->data, mr->matches->len*sizeof (guint32), NULL, NULL) != mr->matches->len*sizeof (guint32)
+ if (camel_stream_write (stream, (gchar *) &header, sizeof (header), NULL, NULL) != sizeof (header)
+ || camel_stream_write (stream, mr->matches->data, mr->matches->len * sizeof (guint32), NULL, NULL) != mr->matches->len * sizeof (guint32)
|| !g_seekable_seek (G_SEEKABLE (stream), 0, G_SEEK_SET, NULL, NULL)
- || camel_stream_write (stream, (gchar *)&mark, sizeof (mark), NULL, NULL) != sizeof (mark)) {
+ || camel_stream_write (stream, (gchar *) &mark, sizeof (mark), NULL, NULL) != sizeof (mark)) {
d(printf(" saving failed, removing cache entry\n"));
camel_data_cache_remove(is->cache, "search/body-contains", mr->hash, NULL);
ret = -1;
@@ -257,7 +261,10 @@ save_match (CamelImapSearch *is, struct _match_record *mr)
}
static struct _match_record *
-load_match (CamelImapSearch *is, gchar hash[17], gint argc, struct _ESExpResult **argv)
+load_match (CamelImapSearch *is,
+ gchar hash[17],
+ gint argc,
+ struct _ESExpResult **argv)
{
struct _match_record *mr;
CamelStream *stream = NULL;
@@ -269,7 +276,7 @@ load_match (CamelImapSearch *is, gchar hash[17], gint argc, struct _ESExpResult
g_assert (strlen (hash) == 16);
strcpy (mr->hash, hash);
mr->terms = g_malloc0 (sizeof (mr->terms[0]) * argc);
- for (i=0;i<argc;i++) {
+ for (i = 0; i < argc; i++) {
if (argv[i]->type == ESEXP_RES_STRING) {
mr->termcount++;
mr->terms[i] = g_strdup (argv[i]->value.string);
@@ -283,17 +290,17 @@ load_match (CamelImapSearch *is, gchar hash[17], gint argc, struct _ESExpResult
stream = camel_data_cache_get(is->cache, "search/body-contains", mr->hash, NULL);
if (stream != NULL) {
/* 'cause i'm gonna be lazy, i'm going to have the termcount == 0 for now,
- and not load or save them since i can't think of a nice way to do it, the hash
- should be sufficient to key it */
+ * and not load or save them since i can't think of a nice way to do it, the hash
+ * should be sufficient to key it */
/* This check should also handle endianness changes, we just throw away
- the data (its only a cache) */
- if (camel_stream_read (stream, (gchar *)&header, sizeof (header), NULL, NULL) == sizeof (header)
+ * the data (its only a cache) */
+ if (camel_stream_read (stream, (gchar *) &header, sizeof (header), NULL, NULL) == sizeof (header)
&& header.validity == is->validity
&& header.mark == MATCH_MARK
&& header.termcount == 0) {
d(printf(" found %d matches\n", header.matchcount));
g_array_set_size (mr->matches, header.matchcount);
- camel_stream_read (stream, mr->matches->data, sizeof (guint32)*header.matchcount, NULL, NULL);
+ camel_stream_read (stream, mr->matches->data, sizeof (guint32) * header.matchcount, NULL, NULL);
} else {
d(printf(" file format invalid/validity changed\n"));
memset (&header, 0, sizeof (header));
@@ -313,7 +320,8 @@ load_match (CamelImapSearch *is, gchar hash[17], gint argc, struct _ESExpResult
}
static gint
-sync_match (CamelImapSearch *is, struct _match_record *mr)
+sync_match (CamelImapSearch *is,
+ struct _match_record *mr)
{
gchar *p, *result, *lasts = NULL;
CamelImapResponse *response = NULL;
@@ -386,7 +394,9 @@ sync_match (CamelImapSearch *is, struct _match_record *mr)
}
static struct _match_record *
-get_match (CamelImapSearch *is, gint argc, struct _ESExpResult **argv)
+get_match (CamelImapSearch *is,
+ gint argc,
+ struct _ESExpResult **argv)
{
gchar hash[17];
struct _match_record *mr;
@@ -423,7 +433,10 @@ get_match (CamelImapSearch *is, gint argc, struct _ESExpResult **argv)
}
static ESExpResult *
-imap_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s)
+imap_body_contains (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ CamelFolderSearch *s)
{
CamelStore *parent_store;
CamelImapStore *store;
@@ -472,7 +485,7 @@ imap_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Cam
gint truth = FALSE;
/* setup lastuid/validity for synchronising */
- is->lastuid = strtoul ((gchar *) g_ptr_array_index (s->summary, s->summary->len-1), NULL, 10);
+ is->lastuid = strtoul ((gchar *) g_ptr_array_index (s->summary, s->summary->len - 1), NULL, 10);
is->validity = ((CamelImapSummary *)(s->folder->summary))->validity;
mr = get_match (is, argc, argv);
@@ -481,7 +494,7 @@ imap_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Cam
uidn = strtoul (camel_message_info_uid (s->current), NULL, 10);
uidp = (guint32 *) mr->matches->data;
j = mr->matches->len;
- for (i=0;i<j && !truth;i++)
+ for (i = 0; i < j && !truth; i++)
truth = *uidp++ == uidn;
r = e_sexp_result_new (f, ESEXP_RES_BOOL);
r->value.boolean = truth;
@@ -500,7 +513,7 @@ imap_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Cam
uidp = (guint32 *) mr->matches->data;
j = mr->matches->len;
- for (i=0;i<j && !truth;i++) {
+ for (i = 0; i < j && !truth; i++) {
uid = g_hash_table_lookup (uid_hash, GUINT_TO_POINTER (*uidp++));
if (uid)
g_ptr_array_add (array, uid);
diff --git a/camel/providers/imap/camel-imap-store-summary.c b/camel/providers/imap/camel-imap-store-summary.c
index 88ef06f..9a8064d 100644
--- a/camel/providers/imap/camel-imap-store-summary.c
+++ b/camel/providers/imap/camel-imap-store-summary.c
@@ -105,13 +105,14 @@ camel_imap_store_summary_new (void)
* It must be freed using camel_store_summary_info_free().
**/
CamelImapStoreInfo *
-camel_imap_store_summary_full_name (CamelImapStoreSummary *s, const gchar *full_name)
+camel_imap_store_summary_full_name (CamelImapStoreSummary *s,
+ const gchar *full_name)
{
gint count, i;
CamelImapStoreInfo *info;
count = camel_store_summary_count ((CamelStoreSummary *) s);
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
info = (CamelImapStoreInfo *) camel_store_summary_index ((CamelStoreSummary *) s, i);
if (info) {
if (strcmp (info->full_name, full_name) == 0)
@@ -124,14 +125,16 @@ camel_imap_store_summary_full_name (CamelImapStoreSummary *s, const gchar *full_
}
gchar *
-camel_imap_store_summary_full_to_path (CamelImapStoreSummary *s, const gchar *full_name, gchar dir_sep)
+camel_imap_store_summary_full_to_path (CamelImapStoreSummary *s,
+ const gchar *full_name,
+ gchar dir_sep)
{
gchar *path, *p;
gint c;
const gchar *f;
if (dir_sep != '/') {
- p = path = alloca (strlen (full_name)*3+1);
+ p = path = alloca (strlen (full_name) * 3 + 1);
f = full_name;
while ((c = *f++ & 0xff)) {
if (c == dir_sep)
@@ -151,26 +154,28 @@ camel_imap_store_summary_full_to_path (CamelImapStoreSummary *s, const gchar *fu
static guint32 hexnib (guint32 c)
{
if (c >= '0' && c <= '9')
- return c-'0';
- else if (c>='A' && c <= 'Z')
- return c-'A'+10;
+ return c - '0';
+ else if (c >= 'A' && c <= 'Z')
+ return c - 'A' + 10;
else
return 0;
}
gchar *
-camel_imap_store_summary_path_to_full (CamelImapStoreSummary *s, const gchar *path, gchar dir_sep)
+camel_imap_store_summary_path_to_full (CamelImapStoreSummary *s,
+ const gchar *path,
+ gchar dir_sep)
{
gchar *full, *f;
guint32 c, v = 0;
const gchar *p;
- gint state=0;
+ gint state = 0;
gchar *subpath, *last = NULL;
CamelStoreInfo *si;
CamelImapStoreNamespace *ns;
/* check to see if we have a subpath of path already defined */
- subpath = alloca (strlen (path)+1);
+ subpath = alloca (strlen (path) + 1);
strcpy (subpath, path);
do {
si = camel_store_summary_path ((CamelStoreSummary *) s, subpath);
@@ -190,7 +195,7 @@ camel_imap_store_summary_path_to_full (CamelImapStoreSummary *s, const gchar *pa
ns = camel_imap_store_summary_namespace_find_path (s, path);
- f = full = alloca (strlen (path)*2+1);
+ f = full = alloca (strlen (path) * 2 + 1);
if (si)
p = path + strlen (subpath);
else if (ns)
@@ -198,7 +203,7 @@ camel_imap_store_summary_path_to_full (CamelImapStoreSummary *s, const gchar *pa
else
p = path;
- while ((c = camel_utf8_getc ((const guchar **)&p))) {
+ while ((c = camel_utf8_getc ((const guchar **) &p))) {
switch (state) {
case 0:
if (c == '%')
@@ -239,7 +244,9 @@ camel_imap_store_summary_path_to_full (CamelImapStoreSummary *s, const gchar *pa
}
CamelImapStoreInfo *
-camel_imap_store_summary_add_from_full (CamelImapStoreSummary *s, const gchar *full, gchar dir_sep)
+camel_imap_store_summary_add_from_full (CamelImapStoreSummary *s,
+ const gchar *full,
+ gchar dir_sep)
{
CamelImapStoreInfo *info;
gchar *pathu8, *prefix;
@@ -250,10 +257,10 @@ camel_imap_store_summary_add_from_full (CamelImapStoreSummary *s, const gchar *f
d(printf("adding full name '%s' '%c'\n", full, dir_sep));
len = strlen (full);
- full_name = alloca (len+1);
+ full_name = alloca (len + 1);
strcpy (full_name, full);
- if (full_name[len-1] == dir_sep)
- full_name[len-1] = 0;
+ if (full_name[len - 1] == dir_sep)
+ full_name[len - 1] = 0;
info = camel_imap_store_summary_full_name (s, full_name);
if (info) {
@@ -272,7 +279,7 @@ camel_imap_store_summary_add_from_full (CamelImapStoreSummary *s, const gchar *f
if (full_name[len] == ns->sep)
len++;
- prefix = camel_imap_store_summary_full_to_path (s, full_name+len, ns->sep);
+ prefix = camel_imap_store_summary_full_to_path (s, full_name + len, ns->sep);
if (*ns->path) {
pathu8 = g_strdup_printf ("%s/%s", ns->path, prefix);
g_free (prefix);
@@ -292,7 +299,7 @@ camel_imap_store_summary_add_from_full (CamelImapStoreSummary *s, const gchar *f
camel_store_info_set_string ((CamelStoreSummary *) s, (CamelStoreInfo *) info, CAMEL_IMAP_STORE_INFO_FULL_NAME, full_name);
if (!g_ascii_strcasecmp(full_name, "inbox"))
- info->info.flags |= CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_TYPE_INBOX;
+ info->info.flags |= CAMEL_FOLDER_SYSTEM | CAMEL_FOLDER_TYPE_INBOX;
} else {
d(printf(" failed\n"));
}
@@ -303,7 +310,8 @@ camel_imap_store_summary_add_from_full (CamelImapStoreSummary *s, const gchar *f
/* should this be const? */
/* TODO: deprecate/merge this function with path_to_full */
gchar *
-camel_imap_store_summary_full_from_path (CamelImapStoreSummary *s, const gchar *path)
+camel_imap_store_summary_full_from_path (CamelImapStoreSummary *s,
+ const gchar *path)
{
CamelImapStoreNamespace *ns;
gchar *name = NULL;
@@ -318,7 +326,9 @@ camel_imap_store_summary_full_from_path (CamelImapStoreSummary *s, const gchar *
}
static CamelImapStoreNamespace *
-namespace_new (CamelImapStoreSummary *s, const gchar *full_name, gchar dir_sep)
+namespace_new (CamelImapStoreSummary *s,
+ const gchar *full_name,
+ gchar dir_sep)
{
CamelImapStoreNamespace *ns;
gchar *p, *o, c;
@@ -326,7 +336,7 @@ namespace_new (CamelImapStoreSummary *s, const gchar *full_name, gchar dir_sep)
ns = g_malloc0 (sizeof (*ns));
ns->full_name = g_strdup (full_name);
- len = strlen (ns->full_name)-1;
+ len = strlen (ns->full_name) - 1;
if (len >= 0 && ns->full_name[len] == dir_sep)
ns->full_name[len] = 0;
ns->sep = dir_sep;
@@ -345,7 +355,9 @@ namespace_new (CamelImapStoreSummary *s, const gchar *full_name, gchar dir_sep)
}
static CamelImapStoreNamespace *
-namespace_find (CamelImapStoreNamespace *ns, const gchar *full_name, gchar dir_sep)
+namespace_find (CamelImapStoreNamespace *ns,
+ const gchar *full_name,
+ gchar dir_sep)
{
if (!ns || !full_name)
return NULL;
@@ -355,7 +367,7 @@ namespace_find (CamelImapStoreNamespace *ns, const gchar *full_name, gchar dir_s
if ((g_ascii_strcasecmp (ns->full_name, full_name) == 0 ||
(g_ascii_strncasecmp (ns->full_name, full_name, len) == 0
- && len + 1 == strlen (full_name) && full_name[len] == ns->sep))&& (!dir_sep || ns->sep == dir_sep)) {
+ && len + 1 == strlen (full_name) && full_name[len] == ns->sep)) && (!dir_sep || ns->sep == dir_sep)) {
break;
}
ns = ns->next;
@@ -365,7 +377,9 @@ namespace_find (CamelImapStoreNamespace *ns, const gchar *full_name, gchar dir_s
}
void
-camel_imap_store_summary_namespace_set_main (CamelImapStoreSummary *s, const gchar *full_name, gchar dir_sep)
+camel_imap_store_summary_namespace_set_main (CamelImapStoreSummary *s,
+ const gchar *full_name,
+ gchar dir_sep)
{
CamelImapStoreNamespace *ns;
@@ -413,7 +427,9 @@ camel_imap_store_summary_namespace_set_main (CamelImapStoreSummary *s, const gch
}
void
-camel_imap_store_summary_namespace_add_secondary (CamelImapStoreSummary *s, const gchar *full_name, gchar dir_sep)
+camel_imap_store_summary_namespace_add_secondary (CamelImapStoreSummary *s,
+ const gchar *full_name,
+ gchar dir_sep)
{
CamelImapStoreNamespace **tail;
@@ -439,7 +455,8 @@ camel_imap_store_summary_get_main_namespace (CamelImapStoreSummary *s)
}
CamelImapStoreNamespace *
-camel_imap_store_summary_namespace_find_path (CamelImapStoreSummary *s, const gchar *path)
+camel_imap_store_summary_namespace_find_path (CamelImapStoreSummary *s,
+ const gchar *path)
{
gint len;
CamelImapStoreNamespace *ns;
@@ -459,7 +476,8 @@ camel_imap_store_summary_namespace_find_path (CamelImapStoreSummary *s, const gc
}
CamelImapStoreNamespace *
-camel_imap_store_summary_namespace_find_full (CamelImapStoreSummary *s, const gchar *full)
+camel_imap_store_summary_namespace_find_full (CamelImapStoreSummary *s,
+ const gchar *full)
{
gint len;
CamelImapStoreNamespace *ns;
@@ -480,7 +498,8 @@ camel_imap_store_summary_namespace_find_full (CamelImapStoreSummary *s, const gc
}
static void
-namespace_free (CamelImapStoreSummary *is, CamelImapStoreNamespace *ns)
+namespace_free (CamelImapStoreSummary *is,
+ CamelImapStoreNamespace *ns)
{
g_free (ns->path);
g_free (ns->full_name);
@@ -499,7 +518,9 @@ namespace_clear (CamelImapStoreSummary *is)
}
static gboolean
-namespaces_load (CamelImapStoreSummary *s, FILE *in, guint count)
+namespaces_load (CamelImapStoreSummary *s,
+ FILE *in,
+ guint count)
{
CamelImapStoreNamespace *ns, **tail;
guint32 sep = '/';
@@ -529,7 +550,9 @@ namespaces_load (CamelImapStoreSummary *s, FILE *in, guint count)
}
static gboolean
-namespaces_save (CamelImapStoreSummary *s, FILE *in, CamelImapStoreNamespace *ns)
+namespaces_save (CamelImapStoreSummary *s,
+ FILE *in,
+ CamelImapStoreNamespace *ns)
{
while (ns) {
if (camel_file_util_encode_string (in, ns->path) == -1
@@ -544,7 +567,8 @@ namespaces_save (CamelImapStoreSummary *s, FILE *in, CamelImapStoreNamespace *ns
}
static gint
-summary_header_load (CamelStoreSummary *s, FILE *in)
+summary_header_load (CamelStoreSummary *s,
+ FILE *in)
{
CamelImapStoreSummary *is = (CamelImapStoreSummary *) s;
gint32 version, capabilities, count;
@@ -576,7 +600,8 @@ summary_header_load (CamelStoreSummary *s, FILE *in)
}
static gint
-summary_header_save (CamelStoreSummary *s, FILE *out)
+summary_header_save (CamelStoreSummary *s,
+ FILE *out)
{
CamelImapStoreSummary *is = (CamelImapStoreSummary *) s;
guint32 count = 0;
@@ -600,7 +625,8 @@ summary_header_save (CamelStoreSummary *s, FILE *out)
}
static CamelStoreInfo *
-store_info_load (CamelStoreSummary *s, FILE *in)
+store_info_load (CamelStoreSummary *s,
+ FILE *in)
{
CamelImapStoreInfo *mi;
@@ -612,7 +638,7 @@ store_info_load (CamelStoreSummary *s, FILE *in)
} else {
/* NB: this is done again for compatability */
if (g_ascii_strcasecmp(mi->full_name, "inbox") == 0)
- mi->info.flags |= CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_TYPE_INBOX;
+ mi->info.flags |= CAMEL_FOLDER_SYSTEM | CAMEL_FOLDER_TYPE_INBOX;
}
}
@@ -620,7 +646,9 @@ store_info_load (CamelStoreSummary *s, FILE *in)
}
static gint
-store_info_save (CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi)
+store_info_save (CamelStoreSummary *s,
+ FILE *out,
+ CamelStoreInfo *mi)
{
CamelImapStoreInfo *isi = (CamelImapStoreInfo *) mi;
@@ -632,7 +660,8 @@ store_info_save (CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi)
}
static void
-store_info_free (CamelStoreSummary *s, CamelStoreInfo *mi)
+store_info_free (CamelStoreSummary *s,
+ CamelStoreInfo *mi)
{
CamelImapStoreInfo *isi = (CamelImapStoreInfo *) mi;
@@ -641,7 +670,9 @@ store_info_free (CamelStoreSummary *s, CamelStoreInfo *mi)
}
static const gchar *
-store_info_string (CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
+store_info_string (CamelStoreSummary *s,
+ const CamelStoreInfo *mi,
+ gint type)
{
CamelImapStoreInfo *isi = (CamelImapStoreInfo *) mi;
@@ -658,7 +689,10 @@ store_info_string (CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
}
static void
-store_info_set_string (CamelStoreSummary *s, CamelStoreInfo *mi, gint type, const gchar *str)
+store_info_set_string (CamelStoreSummary *s,
+ CamelStoreInfo *mi,
+ gint type,
+ const gchar *str)
{
CamelImapStoreInfo *isi = (CamelImapStoreInfo *) mi;
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 3e59038..c46e575 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -135,7 +135,8 @@ G_DEFINE_TYPE_WITH_CODE (
camel_subscribable_init))
static void
-parse_capability (CamelImapStore *store, gchar *capa)
+parse_capability (CamelImapStore *store,
+ gchar *capa)
{
gchar *lasts = NULL;
gint i;
@@ -177,7 +178,7 @@ imap_get_capability (CamelService *service,
return FALSE;
/* Skip over "* CAPABILITY ". */
- parse_capability (store, result+13);
+ parse_capability (store, result + 13);
g_free (result);
/* dunno why the groupwise guys didn't just list this in capabilities */
@@ -185,7 +186,7 @@ imap_get_capability (CamelService *service,
/* not critical if this fails */
response = camel_imap_command (store, NULL, cancellable, NULL, "XGWEXTENSIONS");
if (response && (result = camel_imap_response_extract (store, response, "XGWEXTENSIONS ", NULL))) {
- parse_capability (store, result+16);
+ parse_capability (store, result + 16);
g_free (result);
}
}
@@ -203,7 +204,8 @@ imap_get_capability (CamelService *service,
/* folder_name is path name */
static CamelFolderInfo *
-imap_build_folder_info (CamelImapStore *imap_store, const gchar *folder_name)
+imap_build_folder_info (CamelImapStore *imap_store,
+ const gchar *folder_name)
{
const gchar *name;
CamelFolderInfo *fi;
@@ -384,7 +386,7 @@ connect_to_server (CamelService *service,
#endif /* CAMEL_HAVE_SSL */
/* rfc2595, section 4 states that after a successful STLS
- command, the client MUST discard prior CAPA responses */
+ * command, the client MUST discard prior CAPA responses */
if (!imap_get_capability (service, cancellable, error)) {
if (store->istream) {
g_object_unref (store->istream);
@@ -458,7 +460,7 @@ connect_to_server_process (CamelService *service,
url = camel_service_get_camel_url (service);
/* Put full details in the environment, in case the connection
- program needs them */
+ * program needs them */
buf = camel_url_to_string (url, 0);
child_env[i++] = g_strdup_printf("URL=%s", buf);
g_free (buf);
@@ -508,7 +510,7 @@ connect_to_server_process (CamelService *service,
}
if (!var) {
/* If there wasn't a valid %-code, with an actual
- variable to insert, pretend we didn't see the % */
+ * variable to insert, pretend we didn't see the % */
pc = strchr (pc + 1, '%');
goto ignore;
}
@@ -825,7 +827,9 @@ imap_auth_loop (CamelService *service,
}
static gboolean
-free_key (gpointer key, gpointer value, gpointer user_data)
+free_key (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
g_free (key);
return TRUE;
@@ -1365,8 +1369,8 @@ imap_store_subscribe_folder_sync (CamelSubscribable *subscribable,
if (imap_store->renaming) {
/* we don't need to emit a "folder_subscribed" signal
- if we are in the process of renaming folders, so we
- are done here... */
+ * if we are in the process of renaming folders, so we
+ * are done here... */
goto done;
}
@@ -1525,8 +1529,8 @@ imap_folder_effectively_unsubscribed (CamelImapStore *imap_store,
if (imap_store->renaming) {
/* we don't need to emit a "folder_unsubscribed" signal
- if we are in the process of renaming folders, so we
- are done here... */
+ * if we are in the process of renaming folders, so we
+ * are done here... */
return TRUE;
}
@@ -1540,7 +1544,9 @@ imap_folder_effectively_unsubscribed (CamelImapStore *imap_store,
}
static void
-imap_forget_folder (CamelImapStore *imap_store, const gchar *folder_name, GError **error)
+imap_forget_folder (CamelImapStore *imap_store,
+ const gchar *folder_name,
+ GError **error)
{
CamelService *service;
const gchar *user_data_dir;
@@ -1597,8 +1603,9 @@ imap_forget_folder (CamelImapStore *imap_store, const gchar *folder_name, GError
}
static gboolean
-imap_check_folder_still_extant (CamelImapStore *imap_store, const gchar *full_name,
- GError **error)
+imap_check_folder_still_extant (CamelImapStore *imap_store,
+ const gchar *full_name,
+ GError **error)
{
CamelImapResponse *response;
@@ -1614,7 +1621,7 @@ imap_check_folder_still_extant (CamelImapStore *imap_store, const gchar *full_na
}
/* if the command was rejected, there must be some other error,
- assume it worked so we dont blow away the folder unecessarily */
+ * assume it worked so we dont blow away the folder unecessarily */
return TRUE;
}
@@ -1776,7 +1783,8 @@ hash_folder_name (gconstpointer key)
}
static gint
-compare_folder_name (gconstpointer a, gconstpointer b)
+compare_folder_name (gconstpointer a,
+ gconstpointer b)
{
gconstpointer aname = a, bname = b;
@@ -1807,7 +1815,9 @@ imap_status_item_free (struct imap_status_item *items)
}
static struct imap_status_item *
-get_folder_status (CamelImapStore *imap_store, const gchar *folder_name, const gchar *type)
+get_folder_status (CamelImapStore *imap_store,
+ const gchar *folder_name,
+ const gchar *type)
{
struct imap_status_item *items, *item, *tail;
CamelImapResponse *response;
@@ -1911,7 +1921,7 @@ imap_store_get_folder_sync (CamelStore *store,
user_data_dir = camel_service_get_user_data_dir (service);
/* Try to get it locally first, if it is, then the client will
- force a select when necessary */
+ * force a select when necessary */
new_folder = get_folder_offline (store, folder_name, flags, &local_error);
if (new_folder)
return new_folder;
@@ -1964,7 +1974,7 @@ imap_store_get_folder_sync (CamelStore *store,
}
parent_name = strrchr (folder_name, '/');
- c = parent_name ? parent_name+1 : folder_name;
+ c = parent_name ? parent_name + 1 : folder_name;
while (*c && *c != imap_store->dir_sep && !strchr ("#%*", *c))
c++;
@@ -2124,8 +2134,10 @@ imap_store_get_folder_sync (CamelStore *store,
}
static CamelFolder *
-get_folder_offline (CamelStore *store, const gchar *folder_name,
- guint32 flags, GError **error)
+get_folder_offline (CamelStore *store,
+ const gchar *folder_name,
+ guint32 flags,
+ GError **error)
{
CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
CamelFolder *new_folder = NULL;
@@ -2223,7 +2235,7 @@ manage_subscriptions (CamelStore *store,
gint i, count;
count = camel_store_summary_count ((CamelStoreSummary *) imap_store->summary);
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
si = camel_store_summary_index ((CamelStoreSummary *) imap_store->summary, i);
if (si) {
path = camel_store_info_path (imap_store->summary, si);
@@ -2243,7 +2255,9 @@ manage_subscriptions (CamelStore *store,
}
static void
-rename_folder_info (CamelImapStore *imap_store, const gchar *old_name, const gchar *new_name)
+rename_folder_info (CamelImapStore *imap_store,
+ const gchar *old_name,
+ const gchar *new_name)
{
gint i, count;
CamelStoreInfo *si;
@@ -2252,7 +2266,7 @@ rename_folder_info (CamelImapStore *imap_store, const gchar *old_name, const gch
gchar *npath, *nfull;
count = camel_store_summary_count ((CamelStoreSummary *) imap_store->summary);
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
si = camel_store_summary_index ((CamelStoreSummary *) imap_store->summary, i);
if (si == NULL)
continue;
@@ -2265,7 +2279,7 @@ rename_folder_info (CamelImapStore *imap_store, const gchar *old_name, const gch
nfull = camel_imap_store_summary_path_to_full (imap_store->summary, npath, imap_store->dir_sep);
/* workaround for broken server (courier uses '.') that doesn't rename
- subordinate folders as required by rfc 2060 */
+ * subordinate folders as required by rfc 2060 */
if (imap_store->dir_sep == '.') {
CamelImapResponse *response;
@@ -2316,8 +2330,8 @@ imap_store_rename_folder_sync (CamelStore *store,
}
/* make sure this folder isn't currently SELECTed - it's
- actually possible to rename INBOX but if you do another
- INBOX will immediately be created by the server */
+ * actually possible to rename INBOX but if you do another
+ * INBOX will immediately be created by the server */
response = camel_imap_command (imap_store, NULL, cancellable, error, "SELECT INBOX");
if (!response) {
success = FALSE;
@@ -2554,7 +2568,7 @@ imap_store_create_folder_sync (CamelStore *store,
static CamelFolderInfo *
parse_list_response_as_folder_info (CamelImapStore *imap_store,
- const gchar *response)
+ const gchar *response)
{
CamelFolderInfo *fi;
gint flags;
@@ -2567,7 +2581,7 @@ parse_list_response_as_folder_info (CamelImapStore *imap_store,
/* FIXME: should use imap_build_folder_info, note the differences with param setting tho */
- si = camel_imap_store_summary_add_from_full (imap_store->summary, dir, sep?sep:'/');
+ si = camel_imap_store_summary_add_from_full (imap_store->summary, dir, sep ? sep : '/');
g_free (dir);
if (si == NULL)
return NULL;
@@ -2583,14 +2597,14 @@ parse_list_response_as_folder_info (CamelImapStore *imap_store,
fi = camel_folder_info_new ();
fi->full_name = g_strdup (camel_store_info_path (imap_store->summary, si));
if (!g_ascii_strcasecmp(fi->full_name, "inbox")) {
- flags |= CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_TYPE_INBOX;
+ flags |= CAMEL_FOLDER_SYSTEM | CAMEL_FOLDER_TYPE_INBOX;
fi->display_name = g_strdup (_("Inbox"));
} else
fi->display_name = g_strdup (camel_store_info_name (imap_store->summary, si));
/* HACK: some servers report noinferiors for all folders (uw-imapd)
- We just translate this into nochildren, and let the imap layer enforce
- it. See create folder */
+ * We just translate this into nochildren, and let the imap layer enforce
+ * it. See create folder */
if (flags & CAMEL_FOLDER_NOINFERIORS)
flags = (flags & ~CAMEL_FOLDER_NOINFERIORS) | CAMEL_FOLDER_NOCHILDREN;
fi->flags = flags;
@@ -2657,7 +2671,9 @@ static gint folder_eq (gconstpointer ap, gconstpointer bp)
}
static void
-get_folders_free (gpointer k, gpointer v, gpointer d)
+get_folders_free (gpointer k,
+ gpointer v,
+ gpointer d)
{
camel_folder_info_free (v);
}
@@ -2679,7 +2695,7 @@ get_folders_sync (CamelImapStore *imap_store,
gboolean success = TRUE, first_namespace = TRUE;
/* We do a LIST followed by LSUB, and merge the results. LSUB may not be a strict
- subset of LIST for some servers, so we can't use either or separately */
+ * subset of LIST for some servers, so we can't use either or separately */
present = g_hash_table_new (folder_hash, folder_eq);
if (!pattern)
@@ -2749,7 +2765,7 @@ get_folders_sync (CamelImapStore *imap_store,
/* FIXME: we need to emit folder_create/subscribed/etc events for any new folders */
count = camel_store_summary_count ((CamelStoreSummary *) imap_store->summary);
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
const gchar *full_name;
si = camel_store_summary_index ((CamelStoreSummary *) imap_store->summary, i);
@@ -2822,7 +2838,9 @@ dumpfi (CamelFolderInfo *fi)
#endif
static void
-fill_fi (CamelStore *store, CamelFolderInfo *fi, guint32 flags)
+fill_fi (CamelStore *store,
+ CamelFolderInfo *fi,
+ guint32 flags)
{
CamelFolder *folder;
@@ -2900,8 +2918,8 @@ imap_store_get_folder_info_sync (CamelStore *store,
session = camel_service_get_session (service);
/* If we have a list of folders already, use that, but if we haven't
- updated for a while, then trigger an asynchronous rescan. Otherwise
- we update the list first, and then build it from that */
+ * updated for a while, then trigger an asynchronous rescan. Otherwise
+ * we update the list first, and then build it from that */
if (top == NULL)
top = "";
@@ -2920,11 +2938,11 @@ imap_store_get_folder_info_sync (CamelStore *store,
gint ref;
now = time (NULL);
- ref = now > imap_store->refresh_stamp+60*60*1;
+ ref = now > imap_store->refresh_stamp + 60 * 60 * 1;
if (ref) {
camel_service_lock (
service, CAMEL_SERVICE_REC_CONNECT_LOCK);
- ref = now > imap_store->refresh_stamp+60*60*1;
+ ref = now > imap_store->refresh_stamp + 60 * 60 * 1;
if (ref) {
imap_store->refresh_stamp = now;
@@ -2960,7 +2978,7 @@ imap_store_get_folder_info_sync (CamelStore *store,
name = camel_imap_store_summary_path_to_full (imap_store->summary, top, imap_store->dir_sep);
i = strlen (name);
- pattern = g_alloca (i+5);
+ pattern = g_alloca (i + 5);
strcpy (pattern, name);
g_free (name);
}
@@ -2970,8 +2988,8 @@ imap_store_get_folder_info_sync (CamelStore *store,
goto fail;
if (pattern[0] != '*' && ns) {
pattern[i] = ns->sep;
- pattern[i+1] = (flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE)?'*':'%';
- pattern[i+2] = 0;
+ pattern[i + 1] = (flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) ? '*':'%';
+ pattern[i + 2] = 0;
get_folders_sync (imap_store, pattern, cancellable, NULL);
}
camel_store_summary_save ((CamelStoreSummary *) imap_store->summary);
@@ -2987,8 +3005,10 @@ fail:
}
static CamelFolderInfo *
-get_folder_info_offline (CamelStore *store, const gchar *top,
- guint32 flags, GError **error)
+get_folder_info_offline (CamelStore *store,
+ const gchar *top,
+ guint32 flags,
+ GError **error)
{
CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
gboolean include_inbox = FALSE;
@@ -3052,7 +3072,7 @@ get_folder_info_offline (CamelStore *store, const gchar *top,
* the moment. So let it do the right thing by bailing out if it's
* not a folder we're explicitly interested in. */
- for (i=0;i<camel_store_summary_count ((CamelStoreSummary *) imap_store->summary);i++) {
+ for (i = 0; i < camel_store_summary_count ((CamelStoreSummary *) imap_store->summary); i++) {
CamelStoreInfo *si = camel_store_summary_index ((CamelStoreSummary *) imap_store->summary, i);
const gchar *full_name;
gboolean folder_is_junk;
@@ -3083,8 +3103,8 @@ get_folder_info_offline (CamelStore *store, const gchar *top,
fi->total = si->total;
fi->flags = si->flags;
/* HACK: some servers report noinferiors for all folders (uw-imapd)
- We just translate this into nochildren, and let the imap layer enforce
- it. See create folder */
+ * We just translate this into nochildren, and let the imap layer enforce
+ * it. See create folder */
if (fi->flags & CAMEL_FOLDER_NOINFERIORS)
fi->flags = (fi->flags & ~CAMEL_FOLDER_NOINFERIORS) | CAMEL_FOLDER_NOCHILDREN;
@@ -3149,15 +3169,16 @@ folder_flags_have_changed (CamelFolder *folder)
#endif
/* Use this whenever you need to ensure you're both connected and
- online. */
+ * online. */
gboolean
-camel_imap_store_connected (CamelImapStore *store, GError **error)
+camel_imap_store_connected (CamelImapStore *store,
+ GError **error)
{
/* This looks stupid ... because it is.
-
- camel-service-connect will return OK if we connect in 'offline mode',
- which isn't what we want at all. So we have to recheck we actually
- did connect anyway ... */
+ *
+ * camel-service-connect will return OK if we connect in 'offline mode',
+ * which isn't what we want at all. So we have to recheck we actually
+ * did connect anyway ... */
if (store->istream != NULL
|| (((camel_offline_store_get_online (CAMEL_OFFLINE_STORE (store)))
@@ -3228,7 +3249,7 @@ camel_imap_store_readline (CamelImapStore *store,
}
/* camel-imap-command.c:imap_read_untagged expects the CRLFs
- to be stripped off and be nul-terminated *sigh* */
+ * to be stripped off and be nul-terminated *sigh* */
nread = ba->len - 1;
ba->data[nread] = '\0';
if (ba->data[nread - 1] == '\r') {
diff --git a/camel/providers/imap/camel-imap-store.h b/camel/providers/imap/camel-imap-store.h
index 98ba492..918e5c3 100644
--- a/camel/providers/imap/camel-imap-store.h
+++ b/camel/providers/imap/camel-imap-store.h
@@ -86,14 +86,14 @@ struct _CamelImapStore {
struct _CamelImapStoreSummary *summary;
/* Information about the command channel / connection status */
- guint connected:1;
- guint preauthed:1;
+ guint connected : 1;
+ guint preauthed : 1;
/* broken server - don't use BODY, dont use partial fetches for message retrival */
- guint braindamaged:1;
- guint renaming:1;
+ guint braindamaged : 1;
+ guint renaming : 1;
/* broken server - wont let us append with custom flags even if the folder allows them */
- guint nocustomappend:1;
+ guint nocustomappend : 1;
gchar tag_prefix;
guint32 command;
diff --git a/camel/providers/imap/camel-imap-summary.c b/camel/providers/imap/camel-imap-summary.c
index 6839934..c1098dc 100644
--- a/camel/providers/imap/camel-imap-summary.c
+++ b/camel/providers/imap/camel-imap-summary.c
@@ -53,7 +53,8 @@ static CamelMessageContentInfo * content_info_from_db (CamelFolderSummary *s, Ca
G_DEFINE_TYPE (CamelImapSummary, camel_imap_summary, CAMEL_TYPE_FOLDER_SUMMARY)
static CamelMessageInfo *
-imap_message_info_clone (CamelFolderSummary *s, const CamelMessageInfo *mi)
+imap_message_info_clone (CamelFolderSummary *s,
+ const CamelMessageInfo *mi)
{
CamelImapMessageInfo *to;
const CamelImapMessageInfo *from = (const CamelImapMessageInfo *) mi;
@@ -95,22 +96,26 @@ camel_imap_summary_init (CamelImapSummary *imap_summary)
}
static gint
-sort_uid_cmp (gpointer enc, gint len1, gpointer data1, gint len2, gpointer data2)
+sort_uid_cmp (gpointer enc,
+ gint len1,
+ gpointer data1,
+ gint len2,
+ gpointer data2)
{
- static gchar *sa1=NULL, *sa2=NULL;
- static gint l1=0, l2=0;
+ static gchar *sa1 = NULL, *sa2 = NULL;
+ static gint l1 = 0, l2 = 0;
gint a1, a2;
- if (l1 < len1+1) {
- sa1 = g_realloc (sa1, len1+1);
- l1 = len1+1;
+ if (l1 < len1 + 1) {
+ sa1 = g_realloc (sa1, len1 + 1);
+ l1 = len1 + 1;
}
- if (l2 < len2+1) {
- sa2 = g_realloc (sa2, len2+1);
- l2 = len2+1;
+ if (l2 < len2 + 1) {
+ sa2 = g_realloc (sa2, len2 + 1);
+ l2 = len2 + 1;
}
- strncpy (sa1, data1, len1);sa1[len1] = 0;
- strncpy (sa2, data2, len2);sa2[len2] = 0;
+ strncpy (sa1, data1, len1); sa1[len1] = 0;
+ strncpy (sa2, data2, len2); sa2[len2] = 0;
a1 = strtoul (sa1, NULL, 10);
a2 = strtoul (sa2, NULL, 10);
@@ -119,7 +124,8 @@ sort_uid_cmp (gpointer enc, gint len1, gpointer data1, gint len2, gpointer data
}
static gint
-uid_compare (gconstpointer va, gconstpointer vb)
+uid_compare (gconstpointer va,
+ gconstpointer vb)
{
const gchar **sa = (const gchar **) va, **sb = (const gchar **) vb;
gulong a, b;
@@ -145,7 +151,8 @@ uid_compare (gconstpointer va, gconstpointer vb)
* Returns: A new CamelImapSummary object.
**/
CamelFolderSummary *
-camel_imap_summary_new (CamelFolder *folder, const gchar *filename)
+camel_imap_summary_new (CamelFolder *folder,
+ const gchar *filename)
{
CamelStore *parent_store;
CamelFolderSummary *summary;
@@ -179,7 +186,8 @@ camel_imap_summary_new (CamelFolder *folder, const gchar *filename)
}
static gint
-summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *mir)
+summary_header_from_db (CamelFolderSummary *s,
+ CamelFIRecord *mir)
{
CamelImapSummary *ims = CAMEL_IMAP_SUMMARY (s);
gchar *part;
@@ -202,7 +210,8 @@ summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *mir)
}
static gint
-summary_header_load (CamelFolderSummary *s, FILE *in)
+summary_header_load (CamelFolderSummary *s,
+ FILE *in)
{
CamelImapSummary *ims = CAMEL_IMAP_SUMMARY (s);
@@ -238,7 +247,8 @@ summary_header_load (CamelFolderSummary *s, FILE *in)
}
static CamelFIRecord *
-summary_header_to_db (CamelFolderSummary *s, GError **error)
+summary_header_to_db (CamelFolderSummary *s,
+ GError **error)
{
CamelImapSummary *ims = CAMEL_IMAP_SUMMARY (s);
struct _CamelFIRecord *fir;
@@ -252,7 +262,8 @@ summary_header_to_db (CamelFolderSummary *s, GError **error)
}
static gint
-summary_header_save (CamelFolderSummary *s, FILE *out)
+summary_header_save (CamelFolderSummary *s,
+ FILE *out)
{
CamelImapSummary *ims = CAMEL_IMAP_SUMMARY (s);
@@ -265,7 +276,8 @@ summary_header_save (CamelFolderSummary *s, FILE *out)
}
static CamelMessageInfo *
-message_info_from_db (CamelFolderSummary *s, CamelMIRecord *mir)
+message_info_from_db (CamelFolderSummary *s,
+ CamelMIRecord *mir)
{
CamelMessageInfo *info;
CamelImapMessageInfo *iinfo;
@@ -282,7 +294,8 @@ message_info_from_db (CamelFolderSummary *s, CamelMIRecord *mir)
}
static CamelMessageInfo *
-message_info_migrate (CamelFolderSummary *s, FILE *in)
+message_info_migrate (CamelFolderSummary *s,
+ FILE *in)
{
CamelMessageInfo *info;
CamelImapMessageInfo *iinfo;
@@ -302,7 +315,8 @@ error:
}
static CamelMIRecord *
-message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info)
+message_info_to_db (CamelFolderSummary *s,
+ CamelMessageInfo *info)
{
CamelImapMessageInfo *iinfo = (CamelImapMessageInfo *) info;
struct _CamelMIRecord *mir;
@@ -315,7 +329,9 @@ message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info)
}
static gboolean
-info_set_user_flag (CamelMessageInfo *info, const gchar *id, gboolean state)
+info_set_user_flag (CamelMessageInfo *info,
+ const gchar *id,
+ gboolean state)
{
gboolean res;
@@ -329,10 +345,11 @@ info_set_user_flag (CamelMessageInfo *info, const gchar *id, gboolean state)
}
static CamelMessageContentInfo *
-content_info_from_db (CamelFolderSummary *s, CamelMIRecord *mir)
+content_info_from_db (CamelFolderSummary *s,
+ CamelMIRecord *mir)
{
gchar *part = mir->cinfo;
- guint32 type=0;
+ guint32 type = 0;
if (part) {
if (*part == ' ')
@@ -349,7 +366,8 @@ content_info_from_db (CamelFolderSummary *s, CamelMIRecord *mir)
}
static CamelMessageContentInfo *
-content_info_migrate (CamelFolderSummary *s, FILE *in)
+content_info_migrate (CamelFolderSummary *s,
+ FILE *in)
{
if (fgetc (in))
return CAMEL_FOLDER_SUMMARY_CLASS (camel_imap_summary_parent_class)->content_info_migrate (s, in);
@@ -358,7 +376,9 @@ content_info_migrate (CamelFolderSummary *s, FILE *in)
}
static gint
-content_info_to_db (CamelFolderSummary *s, CamelMessageContentInfo *info, CamelMIRecord *mir)
+content_info_to_db (CamelFolderSummary *s,
+ CamelMessageContentInfo *info,
+ CamelMIRecord *mir)
{
gchar *oldr;
if (info->type) {
diff --git a/camel/providers/imap/camel-imap-utils.c b/camel/providers/imap/camel-imap-utils.c
index 06a2cd0..5c47f3a 100644
--- a/camel/providers/imap/camel-imap-utils.c
+++ b/camel/providers/imap/camel-imap-utils.c
@@ -88,7 +88,8 @@ imap_namespaces_destroy (struct _namespaces *namespaces)
}
static gboolean
-imap_namespace_decode (const gchar **in, struct _namespace **namespace)
+imap_namespace_decode (const gchar **in,
+ struct _namespace **namespace)
{
struct _namespace *list, *tail, *node;
const gchar *inptr;
@@ -148,8 +149,8 @@ imap_namespace_decode (const gchar **in, struct _namespace **namespace)
if (*inptr == ' ') {
/* parse extra flags... for now we
- don't save them, but in the future
- we may want to? */
+ * don't save them, but in the future
+ * we may want to? */
while (*inptr == ' ')
inptr++;
@@ -170,8 +171,8 @@ imap_namespace_decode (const gchar **in, struct _namespace **namespace)
goto exception;
/* there shouldn't be spaces according to the
- ABNF grammar, but we all know how closely
- people follow specs */
+ * ABNF grammar, but we all know how closely
+ * people follow specs */
while (*inptr == ' ')
inptr++;
}
@@ -303,7 +304,11 @@ imap_parse_namespace_response (const gchar *response)
* Returns: whether or not the response was successfully parsed.
**/
gboolean
-imap_parse_list_response (CamelImapStore *store, const gchar *buf, gint *flags, gchar *sep, gchar **folder)
+imap_parse_list_response (CamelImapStore *store,
+ const gchar *buf,
+ gint *flags,
+ gchar *sep,
+ gchar **folder)
{
gboolean is_lsub = FALSE;
const gchar *word;
@@ -418,7 +423,8 @@ imap_parse_list_response (CamelImapStore *store, const gchar *buf, gint *flags,
* Full, Full/Path, Full/Path/"to / from", Full/Path/"to / from"/Folder
**/
gchar **
-imap_parse_folder_name (CamelImapStore *store, const gchar *folder_name)
+imap_parse_folder_name (CamelImapStore *store,
+ const gchar *folder_name)
{
GPtrArray *heirarchy;
gchar **paths;
@@ -465,7 +471,9 @@ imap_parse_folder_name (CamelImapStore *store, const gchar *folder_name)
* @server_to_evo: if TRUE, then converting server names to evo's names, if FALSE then opposite.
*/
static const gchar *
-rename_label_flag (const gchar *flag, gint len, gboolean server_to_evo)
+rename_label_flag (const gchar *flag,
+ gint len,
+ gboolean server_to_evo)
{
gint i;
const gchar *labels[] = {
@@ -477,7 +485,7 @@ rename_label_flag (const gchar *flag, gint len, gboolean server_to_evo)
NULL, NULL };
/* It really can pass zero-length flags inside, in that case it was able
- to always add first label, which is definitely wrong. */
+ * to always add first label, which is definitely wrong. */
if (!len || !flag || !*flag)
return "";
@@ -490,7 +498,9 @@ rename_label_flag (const gchar *flag, gint len, gboolean server_to_evo)
}
gchar *
-imap_create_flag_list (guint32 flags, CamelMessageInfo *info, guint32 permanent_flags)
+imap_create_flag_list (guint32 flags,
+ CamelMessageInfo *info,
+ guint32 permanent_flags)
{
GString *gstr = g_string_new ("(");
@@ -541,7 +551,9 @@ imap_create_flag_list (guint32 flags, CamelMessageInfo *info, guint32 permanent_
}
gboolean
-imap_parse_flag_list (gchar **flag_list_p, CamelMessageFlags *flags_out, gchar **custom_flags_out)
+imap_parse_flag_list (gchar **flag_list_p,
+ CamelMessageFlags *flags_out,
+ gchar **custom_flags_out)
{
gchar *flag_list = *flag_list_p;
guint32 flags = 0;
@@ -574,7 +586,7 @@ imap_parse_flag_list (gchar **flag_list_p, CamelMessageFlags *flags_out, gchar *
else if (!g_ascii_strncasecmp (flag_list, "\\Recent", len))
flags |= CAMEL_IMAP_MESSAGE_RECENT;
else if (!g_ascii_strncasecmp(flag_list, "\\*", len))
- flags |= CAMEL_MESSAGE_USER|CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_NOTJUNK;
+ flags |= CAMEL_MESSAGE_USER | CAMEL_MESSAGE_JUNK | CAMEL_MESSAGE_NOTJUNK;
else if (!g_ascii_strncasecmp(flag_list, "Junk", len))
flags |= CAMEL_MESSAGE_JUNK;
else if (!g_ascii_strncasecmp(flag_list, "NotJunk", len))
@@ -626,27 +638,27 @@ imap_parse_flag_list (gchar **flag_list_p, CamelMessageFlags *flags_out, gchar *
}
/*
- From RFC3501, which adds resp_specials over RFC2060
-
-ATOM_CHAR ::= <any CHAR except atom_specials>
-
-atom_specials ::= "(" / ")" / "{" / SPACE / CTL / list_wildcards /
- quoted_specials / resp_secials
-
-CHAR ::= <any 7-bit US-ASCII character except NUL,
- 0x01 - 0x7f>
-
-CTL ::= <any ASCII control character and DEL,
- 0x00 - 0x1f, 0x7f>
-
-SPACE ::= <ASCII SP, space, 0x20>
-
-list_wildcards ::= "%" / "*"
-
-quoted_specials ::= <"> / "\"
-
-resp_specials ::= "]"
-*/
+ * From RFC3501, which adds resp_specials over RFC2060
+ *
+ * ATOM_CHAR ::= <any CHAR except atom_specials>
+ *
+ * atom_specials ::= "(" / ")" / "{" / SPACE / CTL / list_wildcards /
+ * quoted_specials / resp_secials
+ *
+ * CHAR ::= <any 7-bit US-ASCII character except NUL,
+ * 0x01 - 0x7f>
+ *
+ * CTL ::= <any ASCII control character and DEL,
+ * 0x00 - 0x1f, 0x7f>
+ *
+ * SPACE ::= <ASCII SP, space, 0x20>
+ *
+ * list_wildcards ::= "%" / "*"
+ *
+ * quoted_specials ::= <"> / "\"
+ *
+ * resp_specials ::= "]"
+ */
static guchar imap_atom_specials[256] = {
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
@@ -676,14 +688,14 @@ imap_is_atom (const gchar *in)
register guchar c;
register const gchar *p = in;
- while ((c = (guchar)*p)) {
+ while ((c = (guchar) * p)) {
if (!imap_is_atom_char (c))
return FALSE;
p++;
}
/* check for empty string */
- return p!=in;
+ return p != in;
}
/**
@@ -708,7 +720,9 @@ imap_is_atom (const gchar *in)
* latter, it will point to the character after the NIL.)
**/
gchar *
-imap_parse_string_generic (const gchar **str_p, gsize *len, gint type)
+imap_parse_string_generic (const gchar **str_p,
+ gsize *len,
+ gint type)
{
const gchar *str = *str_p;
gchar *out;
@@ -757,7 +771,7 @@ imap_parse_string_generic (const gchar **str_p, gsize *len, gint type)
*str_p += 3;
*len = 0;
return NULL;
- } else if (type == IMAP_ASTRING && imap_is_atom_char ((guchar)*str)) {
+ } else if (type == IMAP_ASTRING && imap_is_atom_char ((guchar) * str)) {
while (imap_is_atom_char ((guchar) *str))
str++;
@@ -772,7 +786,8 @@ imap_parse_string_generic (const gchar **str_p, gsize *len, gint type)
}
static inline void
-skip_char (const gchar **in, gchar ch)
+skip_char (const gchar **in,
+ gchar ch)
{
if (*in && **in == ch)
*in = *in + 1;
@@ -836,7 +851,8 @@ imap_skip_list (const gchar **str_p)
}
static gint
-parse_params (const gchar **parms_p, CamelContentType *type)
+parse_params (const gchar **parms_p,
+ CamelContentType *type)
{
const gchar *parms = *parms_p;
gchar *name, *value;
@@ -873,7 +889,10 @@ parse_params (const gchar **parms_p, CamelContentType *type)
}
static CamelMessageContentInfo *
-imap_body_decode (const gchar **in, CamelMessageContentInfo *ci, CamelFolder *folder, GPtrArray *cis)
+imap_body_decode (const gchar **in,
+ CamelMessageContentInfo *ci,
+ CamelFolder *folder,
+ GPtrArray *cis)
{
const gchar *inptr = *in;
CamelMessageContentInfo *child = NULL;
@@ -1095,8 +1114,9 @@ imap_body_decode (const gchar **in, CamelMessageContentInfo *ci, CamelFolder *fo
* set to %NULL and @ci will be unchanged.
**/
void
-imap_parse_body (const gchar **body_p, CamelFolder *folder,
- CamelMessageContentInfo *ci)
+imap_parse_body (const gchar **body_p,
+ CamelFolder *folder,
+ CamelMessageContentInfo *ci)
{
const gchar *inptr = *body_p;
CamelMessageContentInfo *child;
@@ -1167,7 +1187,8 @@ imap_quote_string (const gchar *str)
}
static inline gulong
-get_summary_uid_numeric (CamelFolderSummary *summary, gint index)
+get_summary_uid_numeric (CamelFolderSummary *summary,
+ gint index)
{
gulong uid;
gchar *suid;
@@ -1203,7 +1224,11 @@ get_summary_uid_numeric (CamelFolderSummary *summary, gint index)
* Returns: the set, which the caller must free with g_free()
**/
gchar *
-imap_uid_array_to_set (CamelFolderSummary *summary, GPtrArray *uids, gint uid, gssize maxlen, gint *lastuid)
+imap_uid_array_to_set (CamelFolderSummary *summary,
+ GPtrArray *uids,
+ gint uid,
+ gssize maxlen,
+ gint *lastuid)
{
gulong last_uid, next_summary_uid, this_uid;
gboolean range = FALSE;
@@ -1270,7 +1295,8 @@ imap_uid_array_to_set (CamelFolderSummary *summary, GPtrArray *uids, gint uid, g
* imap_uid_array_free(). (Or %NULL if the uid set can't be parsed.)
**/
GPtrArray *
-imap_uid_set_to_array (CamelFolderSummary *summary, const gchar *uids)
+imap_uid_set_to_array (CamelFolderSummary *summary,
+ const gchar *uids)
{
GPtrArray *arr;
gchar *p, *q;
@@ -1343,7 +1369,9 @@ imap_uid_array_free (GPtrArray *arr)
}
gchar *
-imap_concat (CamelImapStore *imap_store, const gchar *prefix, const gchar *suffix)
+imap_concat (CamelImapStore *imap_store,
+ const gchar *prefix,
+ const gchar *suffix)
{
gsize len;
CamelImapStoreNamespace *ns = camel_imap_store_summary_get_main_namespace (imap_store->summary);
@@ -1356,7 +1384,8 @@ imap_concat (CamelImapStore *imap_store, const gchar *prefix, const gchar *suffi
}
gchar *
-imap_mailbox_encode (const guchar *in, gsize inlen)
+imap_mailbox_encode (const guchar *in,
+ gsize inlen)
{
gchar *buf;
@@ -1368,7 +1397,8 @@ imap_mailbox_encode (const guchar *in, gsize inlen)
}
gchar *
-imap_mailbox_decode (const guchar *in, gsize inlen)
+imap_mailbox_decode (const guchar *in,
+ gsize inlen)
{
gchar *buf;
@@ -1380,7 +1410,8 @@ imap_mailbox_decode (const guchar *in, gsize inlen)
}
gchar *
-imap_path_to_physical (const gchar *prefix, const gchar *vpath)
+imap_path_to_physical (const gchar *prefix,
+ const gchar *vpath)
{
GString *out = g_string_new (prefix);
const gchar *p = vpath;
@@ -1404,8 +1435,10 @@ imap_path_to_physical (const gchar *prefix, const gchar *vpath)
}
static gboolean
-find_folders_recursive (const gchar *physical_path, const gchar *path,
- IMAPPathFindFoldersCallback callback, gpointer data)
+find_folders_recursive (const gchar *physical_path,
+ const gchar *path,
+ IMAPPathFindFoldersCallback callback,
+ gpointer data)
{
GDir *dir;
gchar *subfolder_directory_path;
@@ -1477,7 +1510,9 @@ find_folders_recursive (const gchar *physical_path, const gchar *path,
* Returns: %TRUE on success, %FALSE if an error occurs at any point
**/
gboolean
-imap_path_find_folders (const gchar *prefix, IMAPPathFindFoldersCallback callback, gpointer data)
+imap_path_find_folders (const gchar *prefix,
+ IMAPPathFindFoldersCallback callback,
+ gpointer data)
{
return find_folders_recursive (prefix, "", callback, data);
}
diff --git a/camel/providers/imapx/camel-imapx-conn-manager.c b/camel/providers/imapx/camel-imapx-conn-manager.c
index f874e12..0d24e8b 100644
--- a/camel/providers/imapx/camel-imapx-conn-manager.c
+++ b/camel/providers/imapx/camel-imapx-conn-manager.c
@@ -56,7 +56,8 @@ enum {
};
static void
-free_connection (gpointer data, gpointer user_data)
+free_connection (gpointer data,
+ gpointer user_data)
{
ConnectionInfo *cinfo = (ConnectionInfo *) data;
CamelIMAPXServer *conn = cinfo->conn;
@@ -203,16 +204,17 @@ camel_imapx_conn_manager_init (CamelIMAPXConnManager *con_man)
/* TODO destroy unused connections in a time-out loop */
static void
-imapx_conn_shutdown (CamelIMAPXServer *conn, CamelIMAPXConnManager *con_man)
+imapx_conn_shutdown (CamelIMAPXServer *conn,
+ CamelIMAPXConnManager *con_man)
{
GSList *l;
ConnectionInfo *cinfo;
gboolean found = FALSE;
/* when clearing connections then other thread than a parser thread,
- in which this function is called, holds the CON_LOCK, thus skip
- this all, because otherwise a deadlock will happen.
- The connection will be freed later anyway. */
+ * in which this function is called, holds the CON_LOCK, thus skip
+ * this all, because otherwise a deadlock will happen.
+ * The connection will be freed later anyway. */
if (con_man->priv->clearing_connections) {
c(conn->tagprefix, "%s: called on %p when clearing connections, skipping it...\n", G_STRFUNC, conn);
return;
@@ -237,7 +239,9 @@ imapx_conn_shutdown (CamelIMAPXServer *conn, CamelIMAPXConnManager *con_man)
}
static void
-imapx_conn_update_select (CamelIMAPXServer *conn, const gchar *selected_folder, CamelIMAPXConnManager *con_man)
+imapx_conn_update_select (CamelIMAPXServer *conn,
+ const gchar *selected_folder,
+ CamelIMAPXConnManager *con_man)
{
GSList *l;
ConnectionInfo *cinfo;
@@ -274,7 +278,8 @@ imapx_conn_update_select (CamelIMAPXServer *conn, const gchar *selected_folder,
/* This should find a connection if the slots are full, returns NULL if there are slots available for a new connection for a folder */
static CamelIMAPXServer *
-imapx_find_connection (CamelIMAPXConnManager *con_man, const gchar *folder_name)
+imapx_find_connection (CamelIMAPXConnManager *con_man,
+ const gchar *folder_name)
{
guint i = 0, prev_len = -1, n = -1;
GSList *l;
@@ -450,8 +455,9 @@ camel_imapx_conn_manager_get_connections (CamelIMAPXConnManager *con_man)
/* Used for handling operations that fails to execute and that needs to removed from folder list */
void
-camel_imapx_conn_manager_update_con_info (CamelIMAPXConnManager *con_man, CamelIMAPXServer *conn,
- const gchar *folder_name)
+camel_imapx_conn_manager_update_con_info (CamelIMAPXConnManager *con_man,
+ CamelIMAPXServer *conn,
+ const gchar *folder_name)
{
GSList *l;
ConnectionInfo *cinfo;
diff --git a/camel/providers/imapx/camel-imapx-folder.c b/camel/providers/imapx/camel-imapx-folder.c
index 2bf683d..a125261 100644
--- a/camel/providers/imapx/camel-imapx-folder.c
+++ b/camel/providers/imapx/camel-imapx-folder.c
@@ -41,7 +41,10 @@
G_DEFINE_TYPE (CamelIMAPXFolder, camel_imapx_folder, CAMEL_TYPE_OFFLINE_FOLDER)
CamelFolder *
-camel_imapx_folder_new (CamelStore *store, const gchar *folder_dir, const gchar *folder_name, GError **error)
+camel_imapx_folder_new (CamelStore *store,
+ const gchar *folder_dir,
+ const gchar *folder_name,
+ GError **error)
{
CamelFolder *folder;
CamelService *service;
@@ -160,7 +163,9 @@ imapx_folder_finalize (GObject *object)
}
gchar *
-imapx_get_filename (CamelFolder *folder, const gchar *uid, GError **error)
+imapx_get_filename (CamelFolder *folder,
+ const gchar *uid,
+ GError **error)
{
CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *) folder;
@@ -168,63 +173,64 @@ imapx_get_filename (CamelFolder *folder, const gchar *uid, GError **error)
}
/* Algorithm for selecting a folder:
-
- - If uidvalidity == old uidvalidity
- and exsists == old exists
- and recent == old recent
- and unseen == old unseen
- Assume our summary is correct
- for each summary item
- mark the summary item as 'old/not updated'
- rof
- fetch flags from 1:*
- for each fetch response
- info = summary[index]
- if info.uid != uid
- info = summary_by_uid[uid]
- fi
- if info == NULL
- create new info @ index
- fi
- if got.flags
- update flags
- fi
- if got.header
- update based on header
- mark as retrieved
- else if got.body
- update based on imap body
- mark as retrieved
- fi
-
- Async fetch response:
- info = summary[index]
- if info == null
- if uid == null
- force resync/select?
- info = empty @ index
- else if uid && info.uid != uid
- force a resync?
- return
- fi
-
- if got.flags {
- info.flags = flags
- }
- if got.header {
- info.init (header)
- info.empty = false
- }
-
-info.state - 2 bit field in flags
- 0 = empty, nothing set
- 1 = uid & flags set
- 2 = update required
- 3 = up to date
-*/
+ *
+ * - If uidvalidity == old uidvalidity
+ * and exsists == old exists
+ * and recent == old recent
+ * and unseen == old unseen
+ * Assume our summary is correct
+ * for each summary item
+ * mark the summary item as 'old/not updated'
+ * rof
+ * fetch flags from 1:*
+ * for each fetch response
+ * info = summary[index]
+ * if info.uid != uid
+ * info = summary_by_uid[uid]
+ * fi
+ * if info == NULL
+ * create new info @ index
+ * fi
+ * if got.flags
+ * update flags
+ * fi
+ * if got.header
+ * update based on header
+ * mark as retrieved
+ * else if got.body
+ * update based on imap body
+ * mark as retrieved
+ * fi
+ *
+ * Async fetch response:
+ * info = summary[index]
+ * if info == null
+ * if uid == null
+ * force resync/select?
+ * info = empty @ index
+ * else if uid && info.uid != uid
+ * force a resync?
+ * return
+ * fi
+ *
+ * if got.flags {
+ * info.flags = flags
+ * }
+ * if got.header {
+ * info.init (header)
+ * info.empty = false
+ * }
+ *
+ * info.state - 2 bit field in flags
+ * 0 = empty, nothing set
+ * 1 = uid & flags set
+ * 2 = update required
+ * 3 = up to date
+ */
static void
-imapx_search_free (CamelFolder *folder, GPtrArray *uids)
+imapx_search_free (CamelFolder *folder,
+ GPtrArray *uids)
{
CamelIMAPXFolder *ifolder = CAMEL_IMAPX_FOLDER (folder);
@@ -238,7 +244,10 @@ imapx_search_free (CamelFolder *folder, GPtrArray *uids)
}
static GPtrArray *
-imapx_search_by_uids (CamelFolder *folder, const gchar *expression, GPtrArray *uids, GError **error)
+imapx_search_by_uids (CamelFolder *folder,
+ const gchar *expression,
+ GPtrArray *uids,
+ GError **error)
{
CamelIMAPXFolder *ifolder = CAMEL_IMAPX_FOLDER (folder);
GPtrArray *matches;
@@ -257,7 +266,9 @@ imapx_search_by_uids (CamelFolder *folder, const gchar *expression, GPtrArray *u
}
static guint32
-imapx_count_by_expression (CamelFolder *folder, const gchar *expression, GError **error)
+imapx_count_by_expression (CamelFolder *folder,
+ const gchar *expression,
+ GError **error)
{
CamelIMAPXFolder *ifolder = CAMEL_IMAPX_FOLDER (folder);
guint32 matches;
@@ -273,7 +284,9 @@ imapx_count_by_expression (CamelFolder *folder, const gchar *expression, GError
}
static GPtrArray *
-imapx_search_by_expression (CamelFolder *folder, const gchar *expression, GError **error)
+imapx_search_by_expression (CamelFolder *folder,
+ const gchar *expression,
+ GError **error)
{
CamelIMAPXFolder *ifolder = CAMEL_IMAPX_FOLDER (folder);
GPtrArray *matches;
@@ -486,7 +499,7 @@ imapx_synchronize_sync (CamelFolder *folder,
camel_imapx_server_sync_changes (server, folder, cancellable, NULL);
/* Sync twice - make sure deleted flags are written out,
- then sync again incase expunge changed anything */
+ * then sync again incase expunge changed anything */
if (expunge)
camel_imapx_server_expunge (server, folder, cancellable, NULL);
diff --git a/camel/providers/imapx/camel-imapx-provider.c b/camel/providers/imapx/camel-imapx-provider.c
index d5a7fce..32c84db 100644
--- a/camel/providers/imapx/camel-imapx-provider.c
+++ b/camel/providers/imapx/camel-imapx-provider.c
@@ -146,7 +146,8 @@ camel_provider_module_init (void)
}
static void
-imapx_add_hash (guint *hash, gchar *s)
+imapx_add_hash (guint *hash,
+ gchar *s)
{
if (s)
*hash ^= g_str_hash(s);
@@ -166,7 +167,8 @@ imapx_url_hash (gconstpointer key)
}
static gint
-imapx_check_equal (gchar *s1, gchar *s2)
+imapx_check_equal (gchar *s1,
+ gchar *s2)
{
if (s1 == NULL) {
if (s2 == NULL)
@@ -182,7 +184,8 @@ imapx_check_equal (gchar *s1, gchar *s2)
}
static gint
-imapx_url_equal (gconstpointer a, gconstpointer b)
+imapx_url_equal (gconstpointer a,
+ gconstpointer b)
{
const CamelURL *u1 = a, *u2 = b;
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 15ca8ef..4b7aed9 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -142,7 +142,7 @@ struct _CamelIMAPXCommand {
struct _status_info *status; /* status for command, indicates it is complete if != NULL */
/* If exception is set, it means we were not able to parse above status, it might be
- because user cancelled the operation or io error */
+ * because user cancelled the operation or io error */
GCancellable *cancellable;
GError *error;
@@ -201,7 +201,7 @@ enum {
};
/* Operations on the store (folder_tree) will have highest priority as we know for sure they are sync
- and user triggered. */
+ * and user triggered. */
enum {
IMAPX_PRIORITY_CREATE_FOLDER = 200,
IMAPX_PRIORITY_DELETE_FOLDER = 200,
@@ -366,7 +366,9 @@ G_DEFINE_TYPE (CamelIMAPXServer, camel_imapx_server, CAMEL_TYPE_OBJECT)
if limit is set, then we break it up into limit entries (i.e. command length)
*/
void
-imapx_uidset_init (struct _uidset_state *ss, gint total, gint limit)
+imapx_uidset_init (struct _uidset_state *ss,
+ gint total,
+ gint limit)
{
ss->uids = 0;
ss->entries = 0;
@@ -377,7 +379,8 @@ imapx_uidset_init (struct _uidset_state *ss, gint total, gint limit)
}
gint
-imapx_uidset_done (struct _uidset_state *ss, CamelIMAPXCommand *ic)
+imapx_uidset_done (struct _uidset_state *ss,
+ CamelIMAPXCommand *ic)
{
gint ret = 0;
@@ -396,7 +399,9 @@ imapx_uidset_done (struct _uidset_state *ss, CamelIMAPXCommand *ic)
}
gint
-imapx_uidset_add (struct _uidset_state *ss, CamelIMAPXCommand *ic, const gchar *uid)
+imapx_uidset_add (struct _uidset_state *ss,
+ CamelIMAPXCommand *ic,
+ const gchar *uid)
{
guint32 uidn;
@@ -414,7 +419,7 @@ imapx_uidset_add (struct _uidset_state *ss, CamelIMAPXCommand *ic, const gchar *
ss->entries++;
ss->start = uidn;
} else {
- if (ss->last != uidn-1) {
+ if (ss->last != uidn - 1) {
if (ss->last == ss->start) {
e(ic->is->tagprefix, " ,next\n");
camel_imapx_command_add(ic, ",%d", uidn);
@@ -441,7 +446,9 @@ imapx_uidset_add (struct _uidset_state *ss, CamelIMAPXCommand *ic, const gchar *
}
static void
-imapx_command_add_part (CamelIMAPXCommand *ic, camel_imapx_command_part_t type, gpointer o)
+imapx_command_add_part (CamelIMAPXCommand *ic,
+ camel_imapx_command_part_t type,
+ gpointer o)
{
CamelIMAPXCommandPart *cp;
CamelStreamNull *null;
@@ -528,7 +535,7 @@ imapx_command_add_part (CamelIMAPXCommand *ic, camel_imapx_command_part_t type,
cp->ob_size = ob_size;
cp->ob = o;
cp->data_size = byte_array->len;
- cp->data = g_malloc (cp->data_size+1);
+ cp->data = g_malloc (cp->data_size + 1);
memcpy (cp->data, byte_array->data, cp->data_size);
cp->data[cp->data_size] = 0;
@@ -541,7 +548,9 @@ imapx_command_add_part (CamelIMAPXCommand *ic, camel_imapx_command_part_t type,
}
static void
-imapx_command_addv (CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
+imapx_command_addv (CamelIMAPXCommand *ic,
+ const gchar *fmt,
+ va_list ap)
{
const gchar *p, *ps, *start;
guchar c;
@@ -571,12 +580,12 @@ imapx_command_addv (CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
switch (c) {
case '%':
if (*p == '%') {
- camel_stream_write ((CamelStream *) ic->mem, ps, p-ps, ic->cancellable, NULL);
+ camel_stream_write ((CamelStream *) ic->mem, ps, p - ps, ic->cancellable, NULL);
p++;
ps = p;
} else {
- camel_stream_write ((CamelStream *) ic->mem, ps, p-ps-1, ic->cancellable, NULL);
- start = p-1;
+ camel_stream_write ((CamelStream *) ic->mem, ps, p - ps - 1, ic->cancellable, NULL);
+ start = p - 1;
width = 0;
llong = 0;
@@ -593,7 +602,7 @@ imapx_command_addv (CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
do {
// FIXME: ascii isdigit
if (isdigit (c))
- width = width * 10 + (c-'0');
+ width = width * 10 + (c - '0');
else
break;
} while ((c = *p++));
@@ -643,7 +652,7 @@ imapx_command_addv (CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
while (*s && imapx_is_quoted_char (*s))
s++;
- camel_stream_write ((CamelStream *) ic->mem, start, s-start, ic->cancellable, NULL);
+ camel_stream_write ((CamelStream *) ic->mem, start, s - start, ic->cancellable, NULL);
if (*s) {
camel_stream_write((CamelStream *)ic->mem, "\\", 1, ic->cancellable, NULL);
camel_stream_write ((CamelStream *) ic->mem, s, 1, ic->cancellable, NULL);
@@ -697,8 +706,8 @@ imapx_command_addv (CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
gchar *string;
l = va_arg (ap, glong);
c(ic->is->tagprefix, "got glong '%d'\n", (gint)l);
- memcpy (buffer, start, p-start);
- buffer[p-start] = 0;
+ memcpy (buffer, start, p - start);
+ buffer[p - start] = 0;
string = g_strdup_printf (buffer, l);
camel_stream_write_string ((CamelStream *) ic->mem, string, ic->cancellable, NULL);
g_free (string);
@@ -706,8 +715,8 @@ imapx_command_addv (CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
gchar *string;
guint64 i64 = va_arg (ap, guint64);
c(ic->is->tagprefix, "got guint64 '%d'\n", (gint)i64);
- memcpy (buffer, start, p-start);
- buffer[p-start] = 0;
+ memcpy (buffer, start, p - start);
+ buffer[p - start] = 0;
string = g_strdup_printf (buffer, i64);
camel_stream_write_string ((CamelStream *) ic->mem, string, ic->cancellable, NULL);
g_free (string);
@@ -715,8 +724,8 @@ imapx_command_addv (CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
gchar *string;
d = va_arg (ap, gint);
c(ic->is->tagprefix, "got gint '%d'\n", d);
- memcpy (buffer, start, p-start);
- buffer[p-start] = 0;
+ memcpy (buffer, start, p - start);
+ buffer[p - start] = 0;
string = g_strdup_printf (buffer, d);
camel_stream_write_string ((CamelStream *) ic->mem, string, ic->cancellable, NULL);
g_free (string);
@@ -731,14 +740,14 @@ imapx_command_addv (CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
c = *p;
if (c) {
g_assert (c == '\\');
- camel_stream_write ((CamelStream *) ic->mem, ps, p-ps, ic->cancellable, NULL);
+ camel_stream_write ((CamelStream *) ic->mem, ps, p - ps, ic->cancellable, NULL);
p++;
ps = p;
}
}
}
- camel_stream_write ((CamelStream *) ic->mem, ps, p-ps-1, ic->cancellable, NULL);
+ camel_stream_write ((CamelStream *) ic->mem, ps, p - ps - 1, ic->cancellable, NULL);
}
CamelIMAPXCommand *
@@ -774,7 +783,9 @@ camel_imapx_command_new (CamelIMAPXServer *is,
}
void
-camel_imapx_command_add (CamelIMAPXCommand *ic, const gchar *fmt, ...)
+camel_imapx_command_add (CamelIMAPXCommand *ic,
+ const gchar *fmt,
+ ...)
{
va_list ap;
@@ -847,7 +858,8 @@ camel_imapx_command_close (CamelIMAPXCommand *ic)
/* Must hold QUEUE_LOCK */
static gboolean
-imapx_command_start (CamelIMAPXServer *imap, CamelIMAPXCommand *ic)
+imapx_command_start (CamelIMAPXServer *imap,
+ CamelIMAPXCommand *ic)
{
CamelIMAPXCommandPart *cp;
gint retval;
@@ -858,9 +870,9 @@ imapx_command_start (CamelIMAPXServer *imap, CamelIMAPXCommand *ic)
ic->current = cp;
/* TODO: If we support literal+ we should be able to write the whole command out
- at this point .... >here< */
+ * at this point .... >here< */
- if (cp->type & (CAMEL_IMAPX_COMMAND_CONTINUATION|CAMEL_IMAPX_COMMAND_LITERAL_PLUS))
+ if (cp->type & (CAMEL_IMAPX_COMMAND_CONTINUATION | CAMEL_IMAPX_COMMAND_LITERAL_PLUS))
imap->literal = ic;
camel_dlist_addtail (&imap->active, (CamelDListNode *) ic);
@@ -905,10 +917,10 @@ static gboolean duplicate_fetch_or_refresh (CamelIMAPXServer *is, CamelIMAPXComm
if (!ic->job)
return FALSE;
- if (!(ic->job->type & (IMAPX_JOB_FETCH_NEW_MESSAGES|IMAPX_JOB_REFRESH_INFO)))
+ if (!(ic->job->type & (IMAPX_JOB_FETCH_NEW_MESSAGES | IMAPX_JOB_REFRESH_INFO)))
return FALSE;
- if (imapx_match_active_job (is, IMAPX_JOB_FETCH_NEW_MESSAGES|IMAPX_JOB_REFRESH_INFO, NULL)) {
+ if (imapx_match_active_job (is, IMAPX_JOB_FETCH_NEW_MESSAGES | IMAPX_JOB_REFRESH_INFO, NULL)) {
c(is->tagprefix, "Not yet sending duplicate fetch/refresh %s command\n", ic->name);
return TRUE;
}
@@ -916,22 +928,22 @@ static gboolean duplicate_fetch_or_refresh (CamelIMAPXServer *is, CamelIMAPXComm
return FALSE;
}
/* See if we can start another task yet.
-
- If we're waiting for a literal, we cannot proceed.
-
- If we're about to change the folder we're
- looking at from user-direction, we dont proceed.
-
- If we have a folder selected, first see if any
- jobs are waiting on it, but only if they are
- at least as high priority as anything we
- have running.
-
- If we dont, select the first folder required,
- then queue all the outstanding jobs on it, that
- are at least as high priority as the first.
-
- must have QUEUE lock */
+ *
+ * If we're waiting for a literal, we cannot proceed.
+ *
+ * If we're about to change the folder we're
+ * looking at from user-direction, we dont proceed.
+ *
+ * If we have a folder selected, first see if any
+ * jobs are waiting on it, but only if they are
+ * at least as high priority as anything we
+ * have running.
+ *
+ * If we dont, select the first folder required,
+ * then queue all the outstanding jobs on it, that
+ * are at least as high priority as the first.
+ *
+ * must have QUEUE lock */
static void
imapx_command_start_next (CamelIMAPXServer *is,
@@ -977,10 +989,10 @@ imapx_command_start_next (CamelIMAPXServer *is,
if (imapx_in_idle (is) && !camel_dlist_empty (&is->queue)) {
/* if imapx_stop_idle() returns FALSE, it was only
- pending and we can go ahead and send a new command
- immediately. If it returns TRUE, either it sent the
- DONE to exit IDLE mode, or there was an error.
- Either way, we do nothing more right now. */
+ * pending and we can go ahead and send a new command
+ * immediately. If it returns TRUE, either it sent the
+ * DONE to exit IDLE mode, or there was an error.
+ * Either way, we do nothing more right now. */
if (imapx_stop_idle (is, error)) {
c(is->tagprefix, "waiting for idle to stop \n");
return;
@@ -1003,7 +1015,7 @@ imapx_command_start_next (CamelIMAPXServer *is,
if (is->select_folder) {
c(is->tagprefix, "- we're selected on '%s', current jobs?\n",
camel_folder_get_full_name (is->select_folder));
- for (ic = (CamelIMAPXCommand *) is->active.head;ic->next;ic=ic->next) {
+ for (ic = (CamelIMAPXCommand *) is->active.head; ic->next; ic = ic->next) {
c(is->tagprefix, "- %3d '%s'\n", (gint)ic->pri, ic->name);
if (ic->pri > pri)
pri = ic->pri;
@@ -1029,8 +1041,8 @@ imapx_command_start_next (CamelIMAPXServer *is,
count++;
} else {
/* This job isn't for the selected folder, but we don't want to
- consider jobs with _lower_ priority than this, even if they
- are for the selected folder. */
+ * consider jobs with _lower_ priority than this, even if they
+ * are for the selected folder. */
pri = ic->pri;
}
ic = nc;
@@ -1044,7 +1056,7 @@ imapx_command_start_next (CamelIMAPXServer *is,
}
/* If we need to select a folder for the first command, do it now, once
- it is complete it will re-call us if it succeeded */
+ * it is complete it will re-call us if it succeeded */
if (ic->select) {
c(is->tagprefix, "Selecting folder '%s' for command '%s'(%p)\n",
camel_folder_get_full_name (ic->select), ic->name, ic);
@@ -1086,7 +1098,7 @@ imapx_command_queue (CamelIMAPXServer *is,
CamelIMAPXCommand *scan;
/* We enqueue in priority order, new messages have
- higher priority than older messages with the same priority */
+ * higher priority than older messages with the same priority */
camel_imapx_command_close (ic);
@@ -1130,7 +1142,8 @@ imapx_command_queue (CamelIMAPXServer *is,
/* Must have QUEUE lock */
static CamelIMAPXCommand *
-imapx_find_command_tag (CamelIMAPXServer *imap, guint tag)
+imapx_find_command_tag (CamelIMAPXServer *imap,
+ guint tag)
{
CamelIMAPXCommand *ic = NULL;
@@ -1140,7 +1153,7 @@ imapx_find_command_tag (CamelIMAPXServer *imap, guint tag)
if (ic && ic->tag == tag)
goto found;
- for (ic = (CamelIMAPXCommand *) imap->active.head;ic->next;ic=ic->next)
+ for (ic = (CamelIMAPXCommand *) imap->active.head; ic->next; ic = ic->next)
if (ic->tag == tag)
goto found;
@@ -1154,7 +1167,10 @@ found:
}
static gboolean
-imapx_job_matches (CamelFolder *folder, CamelIMAPXJob *job, guint32 type, const gchar *uid)
+imapx_job_matches (CamelFolder *folder,
+ CamelIMAPXJob *job,
+ guint32 type,
+ const gchar *uid)
{
switch (job->type) {
case IMAPX_JOB_GET_MESSAGE:
@@ -1178,14 +1194,16 @@ imapx_job_matches (CamelFolder *folder, CamelIMAPXJob *job, guint32 type, const
/* Must not have QUEUE lock */
static CamelIMAPXJob *
-imapx_match_active_job (CamelIMAPXServer *is, guint32 type, const gchar *uid)
+imapx_match_active_job (CamelIMAPXServer *is,
+ guint32 type,
+ const gchar *uid)
{
CamelIMAPXJob *job = NULL;
CamelIMAPXCommand *ic;
QUEUE_LOCK (is);
- for (ic = (CamelIMAPXCommand *) is->active.head;ic->next;ic=ic->next) {
+ for (ic = (CamelIMAPXCommand *) is->active.head; ic->next; ic = ic->next) {
job = ic->job;
if (!job || !(job->type & type))
continue;
@@ -1200,7 +1218,10 @@ found:
}
static CamelIMAPXJob *
-imapx_is_job_in_queue (CamelIMAPXServer *is, CamelFolder *folder, guint32 type, const gchar *uid)
+imapx_is_job_in_queue (CamelIMAPXServer *is,
+ CamelFolder *folder,
+ guint32 type,
+ const gchar *uid)
{
CamelDListNode *node;
CamelIMAPXJob *job = NULL;
@@ -1208,7 +1229,7 @@ imapx_is_job_in_queue (CamelIMAPXServer *is, CamelFolder *folder, guint32 type,
QUEUE_LOCK (is);
- for (node = is->jobs.head;node->next;node = job->msg.ln.next) {
+ for (node = is->jobs.head; node->next; node = job->msg.ln.next) {
job = (CamelIMAPXJob *) node;
if (!job || !(job->type & type))
@@ -1229,7 +1250,9 @@ imapx_is_job_in_queue (CamelIMAPXServer *is, CamelFolder *folder, guint32 type,
}
static void
-imapx_expunge_uid_from_summary (CamelIMAPXServer *imap, gchar *uid, gboolean unsolicited)
+imapx_expunge_uid_from_summary (CamelIMAPXServer *imap,
+ gchar *uid,
+ gboolean unsolicited)
{
CamelMessageInfo *mi;
CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *) imap->select_folder;
@@ -1267,7 +1290,8 @@ imapx_expunge_uid_from_summary (CamelIMAPXServer *imap, gchar *uid, gboolean uns
}
static void
-invalidate_local_cache (CamelIMAPXFolder *ifolder, guint64 new_uidvalidity)
+invalidate_local_cache (CamelIMAPXFolder *ifolder,
+ guint64 new_uidvalidity)
{
CamelFolder *cfolder;
CamelFolderChangeInfo *changes;
@@ -1461,11 +1485,11 @@ imapx_untagged (CamelIMAPXServer *imap,
return -1;
}
- if ((finfo->got & (FETCH_BODY|FETCH_UID)) == (FETCH_BODY|FETCH_UID)) {
+ if ((finfo->got & (FETCH_BODY | FETCH_UID)) == (FETCH_BODY | FETCH_UID)) {
CamelIMAPXJob *job = imapx_match_active_job (imap, IMAPX_JOB_GET_MESSAGE, finfo->uid);
/* This must've been a get-message request, fill out the body stream,
- in the right spot */
+ * in the right spot */
if (job && job->error == NULL) {
if (job->u.get_message.use_multi_fetch) {
@@ -1482,10 +1506,10 @@ imapx_untagged (CamelIMAPXServer *imap,
}
if ((finfo->got & FETCH_FLAGS) && !(finfo->got & FETCH_HEADER)) {
- CamelIMAPXJob *job = imapx_match_active_job (imap, IMAPX_JOB_FETCH_NEW_MESSAGES|IMAPX_JOB_REFRESH_INFO, NULL);
+ CamelIMAPXJob *job = imapx_match_active_job (imap, IMAPX_JOB_FETCH_NEW_MESSAGES | IMAPX_JOB_REFRESH_INFO, NULL);
/* This is either a refresh_info job, check to see if it is and update
- if so, otherwise it must've been an unsolicited response, so update
- the summary to match */
+ * if so, otherwise it must've been an unsolicited response, so update
+ * the summary to match */
if (job && (finfo->got & FETCH_UID)) {
struct _refresh_info r;
@@ -1519,11 +1543,11 @@ imapx_untagged (CamelIMAPXServer *imap,
mi = camel_folder_summary_uid (folder->summary, uid);
if (mi) {
/* It's unsolicited _unless_ imap->select_pending (i.e. during
- a QRESYNC SELECT */
+ * a QRESYNC SELECT */
changed = imapx_update_message_info_flags (mi, finfo->flags, finfo->user_flags, imap->permanentflags, folder, !imap->select_pending);
} else {
/* This (UID + FLAGS for previously unknown message) might
- happen during a SELECT (QRESYNC). We should use it. */
+ * happen during a SELECT (QRESYNC). We should use it. */
c(imap->tagprefix, "flags changed for unknown uid %s\n.", uid);
}
finfo->user_flags = NULL;
@@ -1550,11 +1574,11 @@ imapx_untagged (CamelIMAPXServer *imap,
}
}
- if ((finfo->got & (FETCH_HEADER|FETCH_UID)) == (FETCH_HEADER|FETCH_UID)) {
- CamelIMAPXJob *job = imapx_match_active_job (imap, IMAPX_JOB_FETCH_NEW_MESSAGES|IMAPX_JOB_REFRESH_INFO, NULL);
+ if ((finfo->got & (FETCH_HEADER | FETCH_UID)) == (FETCH_HEADER | FETCH_UID)) {
+ CamelIMAPXJob *job = imapx_match_active_job (imap, IMAPX_JOB_FETCH_NEW_MESSAGES | IMAPX_JOB_REFRESH_INFO, NULL);
/* This must be a refresh info job as well, but it has asked for
- new messages to be added to the index */
+ * new messages to be added to the index */
if (job) {
CamelMimeParser *mp;
@@ -1587,7 +1611,7 @@ imapx_untagged (CamelIMAPXServer *imap,
do {
gint cmp = 0;
- mid = (min + max)/2;
+ mid = (min + max) / 2;
r = &g_array_index (infos, struct _refresh_info, mid);
cmp = imapx_refresh_info_uid_cmp (finfo->uid, r->uid, fetch_order == CAMEL_SORT_ASCENDING);
@@ -1614,13 +1638,13 @@ imapx_untagged (CamelIMAPXServer *imap,
}
/* If the message is a really new one -- equal or higher than what
- we know as UIDNEXT for the folder, then it came in since we last
- fetched UIDNEXT and UNREAD count. We'll update UIDNEXT in the
- command completion, but update UNREAD count now according to the
- message SEEN flag */
+ * we know as UIDNEXT for the folder, then it came in since we last
+ * fetched UIDNEXT and UNREAD count. We'll update UIDNEXT in the
+ * command completion, but update UNREAD count now according to the
+ * message SEEN flag */
if (!(server_flags & CAMEL_MESSAGE_SEEN)) {
CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *) job->folder;
- unsigned long long uidl = strtoull (mi->uid, NULL, 10);
+ guint64 uidl = strtoull (mi->uid, NULL, 10);
if (uidl >= ifolder->uidnext_on_server) {
c(imap->tagprefix, "Updating unread count for new message %s\n", mi->uid);
@@ -1646,8 +1670,8 @@ imapx_untagged (CamelIMAPXServer *imap,
g_hash_table_remove (ifolder->ignore_recent, mi->uid);
}
- cnt = (camel_folder_summary_count (job->folder->summary) * 100 )/ifolder->exists_on_server;
- camel_operation_progress (job->cancellable, cnt?cnt:1);
+ cnt = (camel_folder_summary_count (job->folder->summary) * 100 ) / ifolder->exists_on_server;
+ camel_operation_progress (job->cancellable, cnt ? cnt : 1);
}
if (free_user_flags && server_user_flags)
@@ -1763,7 +1787,7 @@ imapx_untagged (CamelIMAPXServer *imap,
}
break;
case IMAPX_READ_WRITE:
- imap->mode = IMAPX_MODE_READ|IMAPX_MODE_WRITE;
+ imap->mode = IMAPX_MODE_READ | IMAPX_MODE_WRITE;
c(imap->tagprefix, "folder is read-write\n");
break;
case IMAPX_READ_ONLY:
@@ -1815,7 +1839,7 @@ imapx_untagged (CamelIMAPXServer *imap,
}
/* handle any continuation requests
- either data continuations, or auth continuation */
+ * either data continuations, or auth continuation */
static gint
imapx_continuation (CamelIMAPXServer *imap,
gboolean litplus,
@@ -1826,9 +1850,9 @@ imapx_continuation (CamelIMAPXServer *imap,
CamelIMAPXCommandPart *cp;
/* The 'literal' pointer is like a write-lock, nothing else
- can write while we have it ... so we dont need any
- ohter lock here. All other writes go through
- queue-lock */
+ * can write while we have it ... so we dont need any
+ * ohter lock here. All other writes go through
+ * queue-lock */
if (imapx_idle_supported (imap) && imapx_in_idle (imap)) {
camel_imapx_stream_skip (imap->stream, cancellable, error);
@@ -1839,8 +1863,8 @@ imapx_continuation (CamelIMAPXServer *imap,
imap->idle->state = IMAPX_IDLE_STARTED;
else if (imap->idle->state == IMAPX_IDLE_CANCEL) {
/* IDLE got cancelled after we sent the command, while
- we were waiting for this continuation. Send DONE
- immediately. */
+ * we were waiting for this continuation. Send DONE
+ * immediately. */
if (!imapx_command_idle_stop (imap, error)) {
IDLE_UNLOCK (imap->idle);
return -1;
@@ -1900,7 +1924,7 @@ imapx_continuation (CamelIMAPXServer *imap,
camel_stream_write ((CamelStream *) imap->stream, resp, strlen (resp), cancellable, NULL);
g_free (resp);
/* we want to keep getting called until we get a status reponse from the server
- ignore what sasl tells us */
+ * ignore what sasl tells us */
newliteral = ic;
/* We already ate the end of the input stream line */
goto noskip;
@@ -1939,7 +1963,7 @@ imapx_continuation (CamelIMAPXServer *imap,
c(imap->tagprefix, "next part of command \"%c%05u: %s\"\n", imap->tagprefix, ic->tag, cp->data);
camel_stream_write_string ((CamelStream *) imap->stream, cp->data, cancellable, NULL);
camel_stream_write_string ((CamelStream *) imap->stream, "\r\n", cancellable, NULL);
- if (cp->type & (CAMEL_IMAPX_COMMAND_CONTINUATION|CAMEL_IMAPX_COMMAND_LITERAL_PLUS)) {
+ if (cp->type & (CAMEL_IMAPX_COMMAND_CONTINUATION | CAMEL_IMAPX_COMMAND_LITERAL_PLUS)) {
newliteral = ic;
} else {
g_assert (cp->next->next == NULL);
@@ -1978,7 +2002,7 @@ imapx_completion (CamelIMAPXServer *imap,
return -1;
}
- tag = strtoul ( (const gchar *) token+1, NULL, 10);
+ tag = strtoul ( (const gchar *) token + 1, NULL, 10);
if ((ic = imapx_find_command_tag (imap, tag)) == NULL) {
g_set_error (
@@ -2069,9 +2093,10 @@ imapx_step (CamelIMAPXServer *is,
}
/* Used to run 1 command synchronously,
- use for capa, login, and namespaces only. */
+ * use for capa, login, and namespaces only. */
static gboolean
-imapx_command_run (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
+imapx_command_run (CamelIMAPXServer *is,
+ CamelIMAPXCommand *ic)
/* throws IO,PARSE exception */
{
camel_imapx_command_close (ic);
@@ -2094,14 +2119,16 @@ imapx_command_run (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
}
static void
-imapx_command_complete (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
+imapx_command_complete (CamelIMAPXServer *is,
+ CamelIMAPXCommand *ic)
{
e_flag_set (ic->flag);
}
/* The caller should free the command as well */
static void
-imapx_command_run_sync (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
+imapx_command_run_sync (CamelIMAPXServer *is,
+ CamelIMAPXCommand *ic)
{
ic->flag = e_flag_new ();
@@ -2156,7 +2183,8 @@ imapx_job_can_operation_msg (CamelIMAPXJob *job)
}
static void
-imapx_job_done (CamelIMAPXServer *is, CamelIMAPXJob *job)
+imapx_job_done (CamelIMAPXServer *is,
+ CamelIMAPXJob *job)
{
QUEUE_LOCK (is);
camel_dlist_remove ((CamelDListNode *) job);
@@ -2235,7 +2263,9 @@ imapx_submit_job (CamelIMAPXServer *is,
}
static void
-propagate_ic_error (CamelIMAPXJob *job, CamelIMAPXCommand *ic, const gchar *fmt)
+propagate_ic_error (CamelIMAPXJob *job,
+ CamelIMAPXCommand *ic,
+ const gchar *fmt)
{
g_return_if_fail (job != NULL);
g_return_if_fail (ic != NULL);
@@ -2259,7 +2289,8 @@ propagate_ic_error (CamelIMAPXJob *job, CamelIMAPXCommand *ic, const gchar *fmt)
/*TODO handle negative cases sanely */
static gboolean
-imapx_command_idle_stop (CamelIMAPXServer *is, GError **error)
+imapx_command_idle_stop (CamelIMAPXServer *is,
+ GError **error)
{
if (!is->stream || camel_stream_write_string ((CamelStream *)is->stream, "DONE\r\n", NULL, NULL) == -1) {
g_set_error (
@@ -2426,7 +2457,8 @@ imapx_idle_thread (gpointer data)
}
static gboolean
-imapx_stop_idle (CamelIMAPXServer *is, GError **error)
+imapx_stop_idle (CamelIMAPXServer *is,
+ GError **error)
{
CamelIMAPXIdle *idle = is->idle;
gint stopped = FALSE;
@@ -2444,7 +2476,7 @@ imapx_stop_idle (CamelIMAPXServer *is, GError **error)
case IMAPX_IDLE_STARTED:
/* We set 'stopped' even if sending DONE fails, to ensure that
- our caller doesn't try to submit its own command. */
+ * our caller doesn't try to submit its own command. */
stopped = TRUE;
if (!imapx_command_idle_stop (is, error))
break;
@@ -2547,7 +2579,8 @@ imapx_idle_supported (CamelIMAPXServer *is)
// end IDLE
/* ********************************************************************** */
static void
-imapx_command_select_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
+imapx_command_select_done (CamelIMAPXServer *is,
+ CamelIMAPXCommand *ic)
{
const gchar *selected_folder = NULL;
@@ -2625,7 +2658,7 @@ imapx_command_select_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
if (ifolder->uidnext_on_server < is->uidnext) {
imapx_server_fetch_new_messages (is, is->select_pending, TRUE, TRUE, NULL, NULL);
/* We don't do this right now because we want the new messages to
- update the unseen count. */
+ * update the unseen count. */
//ifolder->uidnext_on_server = is->uidnext;
}
ifolder->uidvalidity_on_server = is->uidvalidity;
@@ -2660,16 +2693,16 @@ imapx_select (CamelIMAPXServer *is,
CamelIMAPXCommand *ic;
/* Select is complicated by the fact we may have commands
- active on the server for a different selection.
-
- So this waits for any commands to complete, selects the
- new folder, and halts the queuing of any new commands.
- It is assumed whomever called is us about to issue
- a high-priority command anyway */
+ * active on the server for a different selection.
+ *
+ * So this waits for any commands to complete, selects the
+ * new folder, and halts the queuing of any new commands.
+ * It is assumed whomever called is us about to issue
+ * a high-priority command anyway */
/* TODO check locking here, pending_select will do
- most of the work for normal commands, but not
- for another select */
+ * most of the work for normal commands, but not
+ * for another select */
if (is->select_pending)
return TRUE;
@@ -2687,7 +2720,7 @@ imapx_select (CamelIMAPXServer *is,
is->select_folder = NULL;
} else {
/* If no folder was selected, we won't get a [CLOSED] status
- so just point select_folder at the new folder immediately */
+ * so just point select_folder at the new folder immediately */
is->select_folder = is->select_pending;
}
@@ -2738,9 +2771,9 @@ imapx_select (CamelIMAPXServer *is,
uids = g_string_new(")");
/* Include some seq/uid pairs to avoid a huge VANISHED list
- (see RFC5162 Â3.1). Work backwards exponentially from the
- end of the mailbox, starting with the message 9 from the
- end, then 27 from the end, then 81 from the end... */
+ * (see RFC5162 Â3.1). Work backwards exponentially from the
+ * end of the mailbox, starting with the message 9 from the
+ * end, then 27 from the end, then 81 from the end... */
i = 3;
do {
gchar buf[10];
@@ -2755,8 +2788,8 @@ imapx_select (CamelIMAPXServer *is,
}
/* IMAP sequence numbers are one higher than the corresponding
- indices in our folder summary -- they start from one, while
- the summary starts from zero. */
+ * indices in our folder summary -- they start from one, while
+ * the summary starts from zero. */
sprintf(buf, "%d", total - i + 1);
g_string_prepend (seqs, buf);
uid = camel_folder_summary_uid_from_index (folder->summary, total - i);
@@ -2789,7 +2822,9 @@ imapx_select (CamelIMAPXServer *is,
/* Using custom commands to connect to IMAP servers is not supported on Win32 */
static gboolean
-connect_to_server_process (CamelIMAPXServer *is, const gchar *cmd, GError **error)
+connect_to_server_process (CamelIMAPXServer *is,
+ const gchar *cmd,
+ GError **error)
{
CamelStream *cmd_stream;
gint ret, i = 0;
@@ -2799,7 +2834,7 @@ connect_to_server_process (CamelIMAPXServer *is, const gchar *cmd, GError **erro
gchar *child_env[7];
/* Put full details in the environment, in case the connection
- program needs them */
+ * program needs them */
buf = camel_url_to_string (is->url, 0);
child_env[i++] = g_strdup_printf("URL=%s", buf);
g_free (buf);
@@ -2849,7 +2884,7 @@ connect_to_server_process (CamelIMAPXServer *is, const gchar *cmd, GError **erro
}
if (!var) {
/* If there wasn't a valid %-code, with an actual
- variable to insert, pretend we didn't see the % */
+ * variable to insert, pretend we didn't see the % */
pc = strchr (pc + 1, '%');
goto ignore;
}
@@ -3163,7 +3198,7 @@ imapx_reconnect (CamelIMAPXServer *is,
goto noauth;
/* If this is the *first* attempt, set 'need_password'
- as appropriate. */
+ * as appropriate. */
if (!need_password)
need_password = authtype->need_password &&
!camel_sasl_try_empty_password_sync (sasl, cancellable, error);
@@ -3231,8 +3266,8 @@ imapx_reconnect (CamelIMAPXServer *is,
authenticated = TRUE;
} else {
/* If exception is set, it might be mostly due to cancellation and we would get an
- io error, else re-prompt. If authentication fails for other reasons ic->status would be
- set with the error message */
+ * io error, else re-prompt. If authentication fails for other reasons ic->status would be
+ * set with the error message */
if (ic->error != NULL) {
g_propagate_error (error, ic->error);
ic->error = NULL;
@@ -3339,14 +3374,15 @@ exception:
/* ********************************************************************** */
static void
-imapx_command_fetch_message_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
+imapx_command_fetch_message_done (CamelIMAPXServer *is,
+ CamelIMAPXCommand *ic)
{
CamelIMAPXJob *job = ic->job;
gboolean failed = FALSE;
/* We either have more to fetch (partial mode?), we are complete,
- or we failed. Failure is handled in the fetch code, so
- we just return the job, or keep it alive with more requests */
+ * or we failed. Failure is handled in the fetch code, so
+ * we just return the job, or keep it alive with more requests */
job->commands--;
@@ -3356,15 +3392,15 @@ imapx_command_fetch_message_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
} else if (job->u.get_message.use_multi_fetch) {
gsize really_fetched = g_seekable_tell (G_SEEKABLE (job->u.get_message.stream));
/* Don't automatically stop when we reach the reported message
- size -- some crappy servers (like Microsoft Exchange) have
- a tendency to lie about it. Keep going (one request at a
- time) until the data actually stop coming. */
+ * size -- some crappy servers (like Microsoft Exchange) have
+ * a tendency to lie about it. Keep going (one request at a
+ * time) until the data actually stop coming. */
if (job->u.get_message.fetch_offset < job->u.get_message.size ||
job->u.get_message.fetch_offset == really_fetched) {
camel_imapx_command_free (ic);
camel_operation_progress (
job->cancellable,
- (job->u.get_message.fetch_offset *100)/job->u.get_message.size);
+ (job->u.get_message.fetch_offset *100) / job->u.get_message.size);
ic = camel_imapx_command_new (
is, "FETCH", job->folder, job->cancellable,
@@ -3429,13 +3465,14 @@ imapx_command_fetch_message_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
}
static void
-imapx_job_get_message_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
+imapx_job_get_message_start (CamelIMAPXServer *is,
+ CamelIMAPXJob *job)
{
CamelIMAPXCommand *ic;
gint i;
if (job->u.get_message.use_multi_fetch) {
- for (i=0; i < 3 && job->u.get_message.fetch_offset < job->u.get_message.size;i++) {
+ for (i = 0; i < 3 && job->u.get_message.fetch_offset < job->u.get_message.size; i++) {
ic = camel_imapx_command_new (
is, "FETCH", job->folder, job->cancellable,
"UID FETCH %t (BODY.PEEK[]", job->u.get_message.uid);
@@ -3464,7 +3501,8 @@ imapx_job_get_message_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
static void
imapx_command_copy_messages_step_start (CamelIMAPXServer *is,
- CamelIMAPXJob *job, gint index)
+ CamelIMAPXJob *job,
+ gint index)
{
CamelIMAPXCommand *ic;
GPtrArray *uids = job->u.copy_messages.uids;
@@ -3478,7 +3516,7 @@ imapx_command_copy_messages_step_start (CamelIMAPXServer *is,
ic->pri = job->pri;
job->u.copy_messages.last_index = i;
- for (;i < uids->len; i++) {
+ for (; i < uids->len; i++) {
gint res;
const gchar *uid = (gchar *) g_ptr_array_index (uids, i);
@@ -3572,9 +3610,9 @@ imapx_command_append_message_done (CamelIMAPXServer *is,
gchar *cur, *old_uid;
/* Append done. If we the server supports UIDPLUS we will get an APPENDUID response
- with the new uid. This lets us move the message we have directly to the cache
- and also create a correctly numbered MessageInfo, without losing any information.
- Otherwise we have to wait for the server to less us know it was appended. */
+ * with the new uid. This lets us move the message we have directly to the cache
+ * and also create a correctly numbered MessageInfo, without losing any information.
+ * Otherwise we have to wait for the server to less us know it was appended. */
mi = camel_message_info_clone (job->u.append_message.info);
old_uid = g_strdup (job->u.append_message.info->uid);
@@ -3645,23 +3683,26 @@ imapx_job_append_message_start (CamelIMAPXServer *is,
/* ********************************************************************** */
static gint
-imapx_refresh_info_uid_cmp (gconstpointer ap, gconstpointer bp, gboolean ascending)
+imapx_refresh_info_uid_cmp (gconstpointer ap,
+ gconstpointer bp,
+ gboolean ascending)
{
guint av, bv;
av = g_ascii_strtoull ((const gchar *) ap, NULL, 10);
bv = g_ascii_strtoull ((const gchar *) bp, NULL, 10);
- if (av<bv)
+ if (av < bv)
return ascending ? -1 : 1;
- else if (av>bv)
+ else if (av > bv)
return ascending ? 1 : -1;
else
return 0;
}
static gint
-imapx_uids_array_cmp (gconstpointer ap, gconstpointer bp)
+imapx_uids_array_cmp (gconstpointer ap,
+ gconstpointer bp)
{
const gchar **a = (const gchar **) ap;
const gchar **b = (const gchar **) bp;
@@ -3670,7 +3711,8 @@ imapx_uids_array_cmp (gconstpointer ap, gconstpointer bp)
}
static gint
-imapx_refresh_info_cmp (gconstpointer ap, gconstpointer bp)
+imapx_refresh_info_cmp (gconstpointer ap,
+ gconstpointer bp)
{
const struct _refresh_info *a = ap;
const struct _refresh_info *b = bp;
@@ -3679,7 +3721,8 @@ imapx_refresh_info_cmp (gconstpointer ap, gconstpointer bp)
}
static gint
-imapx_refresh_info_cmp_descending (gconstpointer ap, gconstpointer bp)
+imapx_refresh_info_cmp_descending (gconstpointer ap,
+ gconstpointer bp)
{
const struct _refresh_info *a = ap;
const struct _refresh_info *b = bp;
@@ -3690,7 +3733,9 @@ imapx_refresh_info_cmp_descending (gconstpointer ap, gconstpointer bp)
/* skips over non-server uids (pending appends) */
static guint
-imapx_index_next (GPtrArray *uids, CamelFolderSummary *s, guint index)
+imapx_index_next (GPtrArray *uids,
+ CamelFolderSummary *s,
+ guint index)
{
while (index < uids->len) {
@@ -3739,7 +3784,7 @@ imapx_command_step_fetch_done (CamelIMAPXServer *is,
camel_folder_change_info_clear (job->u.refresh_info.changes);
- if (i<infos->len) {
+ if (i < infos->len) {
camel_imapx_command_free (ic);
ic = camel_imapx_command_new (
@@ -3750,7 +3795,7 @@ imapx_command_step_fetch_done (CamelIMAPXServer *is,
ic->pri = job->pri - 1;
job->u.refresh_info.last_index = i;
- for (;i<infos->len;i++) {
+ for (; i < infos->len; i++) {
gint res;
struct _refresh_info *r = &g_array_index (infos, struct _refresh_info, i);
@@ -3776,7 +3821,7 @@ imapx_command_step_fetch_done (CamelIMAPXServer *is,
if (camel_folder_summary_count (job->folder->summary)) {
gchar *uid = camel_folder_summary_uid_from_index (job->folder->summary,
camel_folder_summary_count (job->folder->summary) - 1);
- unsigned long long uidl = strtoull (uid, NULL, 10);
+ guint64 uidl = strtoull (uid, NULL, 10);
g_free (uid);
uidl++;
@@ -3790,7 +3835,7 @@ imapx_command_step_fetch_done (CamelIMAPXServer *is,
isum->uidnext = ifolder->uidnext_on_server;
cleanup:
- for (i=0;i<infos->len;i++) {
+ for (i = 0; i < infos->len; i++) {
struct _refresh_info *r = &g_array_index (infos, struct _refresh_info, i);
camel_flag_list_free (&r->server_user_flags);
@@ -3805,11 +3850,13 @@ imapx_command_step_fetch_done (CamelIMAPXServer *is,
}
static gint
-imapx_uid_cmp (gconstpointer ap, gconstpointer bp, gpointer data)
+imapx_uid_cmp (gconstpointer ap,
+ gconstpointer bp,
+ gpointer data)
{
const gchar *a = ap, *b = bp;
gchar *ae, *be;
- unsigned long av, bv;
+ gulong av, bv;
av = strtoul (a, &ae, 10);
bv = strtoul (b, &be, 10);
@@ -3857,18 +3904,18 @@ imapx_job_scan_changes_done (CamelIMAPXServer *is,
GPtrArray *uids;
/* Actually we wanted to do this after the SELECT but before the
- FETCH command was issued. But this should suffice. */
+ * FETCH command was issued. But this should suffice. */
((CamelIMAPXSummary *) s)->uidnext = ifolder->uidnext_on_server;
((CamelIMAPXSummary *) s)->modseq = ifolder->modseq_on_server;
/* Here we do the typical sort/iterate/merge loop.
- If the server flags dont match what we had, we modify our
- flags to pick up what the server now has - but we merge
- not overwrite */
+ * If the server flags dont match what we had, we modify our
+ * flags to pick up what the server now has - but we merge
+ * not overwrite */
/* FIXME: We also have to check the offline directory for
- anything missing in our summary, and also queue up jobs
- for all outstanding messages to be uploaded */
+ * anything missing in our summary, and also queue up jobs
+ * for all outstanding messages to be uploaded */
/* obtain a copy to be thread safe */
uids = camel_folder_summary_array (s);
@@ -3879,7 +3926,7 @@ imapx_job_scan_changes_done (CamelIMAPXServer *is,
if (uids->len)
s_minfo = camel_folder_summary_uid (s, g_ptr_array_index (uids, 0));
- for (i=0; i<infos->len; i++) {
+ for (i = 0; i < infos->len; i++) {
struct _refresh_info *r = &g_array_index (infos, struct _refresh_info, i);
while (s_minfo && uid_cmp (camel_message_info_uid (s_minfo), r->uid, s) < 0) {
@@ -3979,7 +4026,7 @@ imapx_job_scan_changes_done (CamelIMAPXServer *is,
imapx_uidset_init (&job->u.refresh_info.uidset, uidset_size, 0);
/* These are new messages which arrived since we last knew the unseen count;
- update it as they arrive. */
+ * update it as they arrive. */
job->u.refresh_info.update_unseen = TRUE;
imapx_command_step_fetch_done (is, ic);
return;
@@ -3988,7 +4035,7 @@ imapx_job_scan_changes_done (CamelIMAPXServer *is,
propagate_ic_error (job, ic, "Error retriving message: %s");
}
- for (i=0;i<infos->len;i++) {
+ for (i = 0; i < infos->len; i++) {
struct _refresh_info *r = &g_array_index (infos, struct _refresh_info, i);
camel_flag_list_free (&r->server_user_flags);
@@ -3996,7 +4043,7 @@ imapx_job_scan_changes_done (CamelIMAPXServer *is,
}
/* There's no sane way to get the server-side unseen count on the
- select mailbox. So just work it out from the flags */
+ * select mailbox. So just work it out from the flags */
((CamelIMAPXFolder *) job->folder)->unread_on_server = job->folder->summary->unread_count;
g_array_free (job->u.refresh_info.infos, TRUE);
@@ -4051,7 +4098,7 @@ imapx_command_fetch_new_messages_done (CamelIMAPXServer *is,
if (camel_folder_summary_count (ic->job->folder->summary)) {
gchar *uid = camel_folder_summary_uid_from_index (ic->job->folder->summary,
camel_folder_summary_count (ic->job->folder->summary) - 1);
- unsigned long long uidl = strtoull (uid, NULL, 10);
+ guint64 uidl = strtoull (uid, NULL, 10);
g_free (uid);
uidl++;
@@ -4073,8 +4120,8 @@ exception:
}
static void
-imapx_command_fetch_new_uids_done (CamelIMAPXServer *is,
- CamelIMAPXCommand *ic)
+imapx_command_fetch_new_uids_done (CamelIMAPXServer *is,
+ CamelIMAPXCommand *ic)
{
CamelIMAPXJob *job = ic->job;
GArray *infos = job->u.refresh_info.infos;
@@ -4110,7 +4157,7 @@ imapx_job_fetch_new_messages_start (CamelIMAPXServer *is,
diff = ifolder->exists_on_server - total;
if (total > 0) {
- unsigned long long uidl;
+ guint64 uidl;
uid = camel_folder_summary_uid_from_index (folder->summary, total - 1);
uidl = strtoull (uid, NULL, 10);
g_free (uid);
@@ -4168,7 +4215,7 @@ imapx_job_refresh_info_start (CamelIMAPXServer *is,
full_name = camel_folder_get_full_name (folder);
/* Sync changes first, else unread count will not
- match. Need to think about better ways for this */
+ * match. Need to think about better ways for this */
if (!imapx_server_sync_changes (
is, folder, job->pri,
job->cancellable, &job->error))
@@ -4187,8 +4234,8 @@ imapx_job_refresh_info_start (CamelIMAPXServer *is,
}
/* We don't have valid unread count or modseq for currently-selected server
- (unless we want to re-SELECT it). We fake unread count when fetching
- message flags, but don't depend on modseq for the selected folder */
+ * (unless we want to re-SELECT it). We fake unread count when fetching
+ * message flags, but don't depend on modseq for the selected folder */
if (total != ifolder->exists_on_server ||
isum->uidnext != ifolder->uidnext_on_server ||
folder->summary->unread_count != ifolder->unread_on_server ||
@@ -4196,9 +4243,9 @@ imapx_job_refresh_info_start (CamelIMAPXServer *is,
need_rescan = TRUE;
/* This is probably the first check of this folder after startup;
- use STATUS to check whether the cached summary is valid, rather
- than blindly updating. Only for servers which support CONDSTORE
- though. */
+ * use STATUS to check whether the cached summary is valid, rather
+ * than blindly updating. Only for servers which support CONDSTORE
+ * though. */
if ((isum->modseq && !ifolder->modseq_on_server))
need_rescan = FALSE;
@@ -4208,7 +4255,7 @@ imapx_job_refresh_info_start (CamelIMAPXServer *is,
if (is_selected) {
/* We may not issue STATUS on the current folder. Use SELECT or NOOP instead. */
- if (0 /* server needs SELECT not just NOOP*/) {
+ if (0 /* server needs SELECT not just NOOP */) {
if (imapx_idle_supported (is) && imapx_in_idle (is))
if (!imapx_stop_idle (is, &job->error))
goto done;
@@ -4262,7 +4309,7 @@ imapx_job_refresh_info_start (CamelIMAPXServer *is,
e(is->tagprefix, "folder %s is %sselected, total %u / %u, unread %u / %u, modseq %llu / %llu, uidnext %u / %u: will %srescan\n",
full_name, is_selected?"": "not ", total, ifolder->exists_on_server,
folder->summary->unread_count, ifolder->unread_on_server,
- (unsigned long long) isum->modseq, (unsigned long long) ifolder->modseq_on_server,
+ (guint64) isum->modseq, (guint64) ifolder->modseq_on_server,
isum->uidnext, ifolder->uidnext_on_server,
need_rescan?"":"not ");
@@ -4430,7 +4477,8 @@ imapx_job_list_start (CamelIMAPXServer *is,
/* ********************************************************************** */
static gchar *
-imapx_encode_folder_name (CamelIMAPXStore *istore, const gchar *folder_name)
+imapx_encode_folder_name (CamelIMAPXStore *istore,
+ const gchar *folder_name)
{
gchar *fname, *encoded;
@@ -4644,17 +4692,18 @@ static struct {
};
/*
- flags 00101000
- sflags 01001000
- ^ 01100000
-~flags 11010111
-& 01000000
-
-&flags 00100000
-*/
+ * flags 00101000
+ * sflags 01001000
+ * ^ 01100000
+ * ~flags 11010111
+ * & 01000000
+ *
+ * &flags 00100000
+ */
static void
-imapx_command_sync_changes_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
+imapx_command_sync_changes_done (CamelIMAPXServer *is,
+ CamelIMAPXCommand *ic)
{
CamelIMAPXJob *job = ic->job;
CamelStore *parent_store;
@@ -4666,14 +4715,15 @@ imapx_command_sync_changes_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
full_name = camel_folder_get_full_name (job->folder);
parent_store = camel_folder_get_parent_store (job->folder);
- /* If this worked, we should really just update the changes that we sucessfully
- stored, so we dont have to worry about sending them again ...
- But then we'd have to track which uid's we actually updated, so its easier
- just to refresh all of the ones we got.
-
- Not that ... given all the asynchronicity going on, we're guaranteed
- that what we just set is actually what is on the server now .. but
- if it isn't, i guess we'll fix up next refresh */
+ /* If this worked, we should really just update the changes that we
+ * sucessfully stored, so we dont have to worry about sending them
+ * again ...
+ * But then we'd have to track which uid's we actually updated, so
+ * its easier just to refresh all of the ones we got.
+ *
+ * Not that ... given all the asynchronicity going on, we're guaranteed
+ * that what we just set is actually what is on the server now .. but
+ * if it isn't, i guess we'll fix up next refresh */
if (ic->error != NULL || ic->status->result != IMAPX_OK) {
if (!job->error) {
@@ -4690,7 +4740,7 @@ imapx_command_sync_changes_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
{
gint i;
- for (i=0;i<job->u.sync_changes.changed_uids->len;i++) {
+ for (i = 0; i < job->u.sync_changes.changed_uids->len; i++) {
CamelIMAPXMessageInfo *xinfo = (CamelIMAPXMessageInfo *) camel_folder_summary_uid (job->folder->summary,
job->u.sync_changes.changed_uids->pdata[i]);
@@ -4706,7 +4756,7 @@ imapx_command_sync_changes_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
camel_message_info_free (xinfo);
}
/* Apply the changes to server-side unread count; it won't tell
- us of these changes, of course. */
+ * us of these changes, of course. */
((CamelIMAPXFolder *) job->folder)->unread_on_server += job->u.sync_changes.unread_change;
}
@@ -4736,16 +4786,17 @@ imapx_command_sync_changes_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
}
static void
-imapx_job_sync_changes_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
+imapx_job_sync_changes_start (CamelIMAPXServer *is,
+ CamelIMAPXJob *job)
{
guint32 i, j;
struct _uidset_state ss;
GPtrArray *uids = job->u.sync_changes.changed_uids;
gint on;
- for (on=0;on<2;on++) {
- guint32 orset = on?job->u.sync_changes.on_set:job->u.sync_changes.off_set;
- GArray *user_set = on?job->u.sync_changes.on_user:job->u.sync_changes.off_user;
+ for (on = 0; on < 2; on++) {
+ guint32 orset = on ? job->u.sync_changes.on_set : job->u.sync_changes.off_set;
+ GArray *user_set = on ? job->u.sync_changes.on_user : job->u.sync_changes.off_user;
for (j = 0; j < G_N_ELEMENTS (flags_table); j++) {
guint32 flag = flags_table[j].flag;
@@ -4782,7 +4833,7 @@ imapx_job_sync_changes_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
}
send = imapx_uidset_add (&ss, ic, camel_message_info_uid (info));
}
- if (send || (i == uids->len-1 && imapx_uidset_done (&ss, ic))) {
+ if (send || (i == uids->len - 1 && imapx_uidset_done (&ss, ic))) {
job->commands++;
camel_imapx_command_add(ic, " %tFLAGS.SILENT (%t)", on?"+":"-", flags_table[j].name);
imapx_command_queue (is, ic);
@@ -4790,7 +4841,7 @@ imapx_job_sync_changes_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
}
if (flag == CAMEL_MESSAGE_SEEN) {
/* Remember how the server's unread count will change if this
- command succeeds */
+ * command succeeds */
if (on)
job->u.sync_changes.unread_change--;
else
@@ -4803,11 +4854,11 @@ imapx_job_sync_changes_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
if (user_set) {
CamelIMAPXCommand *ic = NULL;
- for (j=0; j<user_set->len; j++) {
+ for (j = 0; j < user_set->len; j++) {
struct _imapx_flag_change *c = &g_array_index (user_set, struct _imapx_flag_change, j);
imapx_uidset_init (&ss, 0, 100);
- for (i=0; i < c->infos->len; i++) {
+ for (i = 0; i < c->infos->len; i++) {
CamelIMAPXMessageInfo *info = c->infos->pdata[i];
if (ic == NULL) {
@@ -4820,7 +4871,7 @@ imapx_job_sync_changes_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
}
if (imapx_uidset_add (&ss, ic, camel_message_info_uid (info))
- || (i == c->infos->len-1 && imapx_uidset_done (&ss, ic))) {
+ || (i == c->infos->len - 1 && imapx_uidset_done (&ss, ic))) {
job->commands++;
camel_imapx_command_add(ic, " %tFLAGS.SILENT (%t)", on?"+":"-", c->name);
imapx_command_queue (is, ic);
@@ -4832,7 +4883,7 @@ imapx_job_sync_changes_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
}
/* Since this may start in another thread ... we need to
- lock the commands count, ho hum */
+ * lock the commands count, ho hum */
if (job->commands == 0) {
imapx_job_done (is, job);
@@ -4841,7 +4892,8 @@ imapx_job_sync_changes_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
/* we cancel all the commands and their jobs, so associated jobs will be notified */
static void
-cancel_all_jobs (CamelIMAPXServer *is, GError *error)
+cancel_all_jobs (CamelIMAPXServer *is,
+ GError *error)
{
CamelIMAPXCommand **cw, *ic;
gint i = 0;
@@ -4890,12 +4942,12 @@ parse_contents (CamelIMAPXServer *is,
}
/*
- The main processing (reading) loop.
-
- Main area of locking required is command_queue
- and command_start_next, the 'literal' command,
- the jobs queue, the active queue, the queue
- queue. */
+ * The main processing (reading) loop.
+ *
+ * Main area of locking required is command_queue
+ * and command_start_next, the 'literal' command,
+ * the jobs queue, the active queue, the queue
+ * queue. */
static gpointer
imapx_parser_thread (gpointer d)
{
@@ -5149,7 +5201,8 @@ camel_imapx_server_init (CamelIMAPXServer *is)
}
CamelIMAPXServer *
-camel_imapx_server_new (CamelStore *store, CamelURL *url)
+camel_imapx_server_new (CamelStore *store,
+ CamelURL *url)
{
CamelService *service;
CamelSession *session;
@@ -5253,8 +5306,8 @@ imapx_server_get_message (CamelIMAPXServer *is,
job->pri = pri;
/* Wait for the job to finish. This would be so much nicer if
- we could just use the queue lock with a GCond, but instead
- we have to use a GMutex. I miss the kernel waitqueues. */
+ * we could just use the queue lock with a GCond, but instead
+ * we have to use a GMutex. I miss the kernel waitqueues. */
do {
gint this;
@@ -5426,9 +5479,9 @@ camel_imapx_server_append_message (CamelIMAPXServer *is,
gboolean success;
/* Append just assumes we have no/a dodgy connection. We dump stuff into the 'new'
- directory, and let the summary know it's there. Then we fire off a no-reply
- job which will asynchronously upload the message at some point in the future,
- and fix up the summary to match */
+ * directory, and let the summary know it's there. Then we fire off a no-reply
+ * job which will asynchronously upload the message at some point in the future,
+ * and fix up the summary to match */
/* chen cleanup this later */
uid = imapx_get_temp_uid ();
@@ -5463,9 +5516,9 @@ camel_imapx_server_append_message (CamelIMAPXServer *is,
g_free (uid);
/* So, we actually just want to let the server loop that
- messages need appending, i think. This is so the same
- mechanism is used for normal uploading as well as
- offline re-syncing when we go back online */
+ * messages need appending, i think. This is so the same
+ * mechanism is used for normal uploading as well as
+ * offline re-syncing when we go back online */
job = imapx_job_new (cancellable);
job->pri = IMAPX_PRIORITY_APPEND_MESSAGE;
@@ -5559,7 +5612,7 @@ imapx_sync_free_user (GArray *user_set)
if (user_set == NULL)
return;
- for (i=0;i<user_set->len;i++) {
+ for (i = 0; i < user_set->len; i++) {
struct _imapx_flag_change *flag_change = &g_array_index (user_set, struct _imapx_flag_change, i);
GPtrArray *infos = flag_change->infos;
gint j;
@@ -5591,14 +5644,14 @@ imapx_server_sync_changes (CamelIMAPXServer *is,
gboolean success = TRUE;
/* We calculate two masks, a mask of all flags which have been
- turned off and a mask of all flags which have been turned
- on. If either of these aren't 0, then we have work to do,
- and we fire off a job to do it.
-
- User flags are a bit more tricky, we rely on the user
- flags being sorted, and then we create a bunch of lists;
- one for each flag being turned off, including each
- info being turned off, and one for each flag being turned on.
+ * turned off and a mask of all flags which have been turned
+ * on. If either of these aren't 0, then we have work to do,
+ * and we fire off a job to do it.
+ *
+ * User flags are a bit more tricky, we rely on the user
+ * flags being sorted, and then we create a bunch of lists;
+ * one for each flag being turned off, including each
+ * info being turned off, and one for each flag being turned on.
*/
uids = camel_folder_summary_get_changed (folder->summary);
@@ -5608,7 +5661,7 @@ imapx_server_sync_changes (CamelIMAPXServer *is,
}
off_orset = on_orset = 0;
- for (i=0; i < uids->len; i++) {
+ for (i = 0; i < uids->len; i++) {
guint32 flags, sflags;
CamelFlag *uflags, *suflags;
guint j = 0;
@@ -5688,7 +5741,7 @@ imapx_server_sync_changes (CamelIMAPXServer *is,
camel_message_info_free (info);
}
- if ((on_orset|off_orset) == 0 && on_user == NULL && off_user == NULL) {
+ if ((on_orset | off_orset) == 0 && on_user == NULL && off_user == NULL) {
success = TRUE;
goto done;
}
@@ -5790,7 +5843,8 @@ imapx_name_hash (gconstpointer key)
}
static gint
-imapx_name_equal (gconstpointer a, gconstpointer b)
+imapx_name_equal (gconstpointer a,
+ gconstpointer b)
{
gconstpointer aname = a, bname = b;
@@ -5802,7 +5856,9 @@ imapx_name_equal (gconstpointer a, gconstpointer b)
}
static void
-imapx_list_flatten (gpointer k, gpointer v, gpointer d)
+imapx_list_flatten (gpointer k,
+ gpointer v,
+ gpointer d)
{
GPtrArray *folders = d;
@@ -5810,7 +5866,8 @@ imapx_list_flatten (gpointer k, gpointer v, gpointer d)
}
static gint
-imapx_list_cmp (gconstpointer ap, gconstpointer bp)
+imapx_list_cmp (gconstpointer ap,
+ gconstpointer bp)
{
struct _list_info *a = ((struct _list_info **) ap)[0];
struct _list_info *b = ((struct _list_info **) bp)[0];
@@ -5839,7 +5896,7 @@ camel_imapx_server_list (CamelIMAPXServer *is,
job->u.list.ext = ext;
job->u.list.flags = flags;
job->u.list.folders = g_hash_table_new (imapx_name_hash, imapx_name_equal);
- job->u.list.pattern = g_alloca (strlen (encoded_name)+5);
+ job->u.list.pattern = g_alloca (strlen (encoded_name) + 5);
if (flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE)
sprintf(job->u.list.pattern, "%s*", encoded_name);
else
@@ -5966,7 +6023,7 @@ camel_imapx_server_get_job_queue_info (CamelIMAPXServer *is)
jinfo->queue_len = camel_dlist_length (&is->jobs);
jinfo->folders = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) g_free, NULL);
- for (node = is->jobs.head;node->next;node = job->msg.ln.next) {
+ for (node = is->jobs.head; node->next; node = job->msg.ln.next) {
job = (CamelIMAPXJob *) node;
if (job->folder) {
diff --git a/camel/providers/imapx/camel-imapx-server.h b/camel/providers/imapx/camel-imapx-server.h
index d89dfb7..dbec35a 100644
--- a/camel/providers/imapx/camel-imapx-server.h
+++ b/camel/providers/imapx/camel-imapx-server.h
@@ -78,10 +78,10 @@ struct _CamelIMAPXServer {
guint job_timeout;
gchar tagprefix;
- gint state:4;
+ gint state : 4;
/* Current command/work queue. All commands are stored in one list,
- all the time, so they can be cleaned up in exception cases */
+ * all the time, so they can be cleaned up in exception cases */
GStaticRecMutex queue_lock;
CamelIMAPXCommand *literal;
CamelDList queue;
@@ -102,12 +102,12 @@ struct _CamelIMAPXServer {
guint32 mode;
/* any expunges that happened from the last command, they are
- processed after the command completes. */
+ * processed after the command completes. */
GSList *expunged;
GThread *parser_thread;
/* Protects the output stream between parser thread (which can disconnect from server) and other threads that issue
- commands. Input stream does not require a lock since only parser_thread can operate on it */
+ * commands. Input stream does not require a lock since only parser_thread can operate on it */
GStaticRecMutex ostream_lock;
/* Used for canceling operations as well as signaling parser thread to disconnnect/quit */
GCancellable *cancellable;
diff --git a/camel/providers/imapx/camel-imapx-store-summary.c b/camel/providers/imapx/camel-imapx-store-summary.c
index e733d73..f881a17 100644
--- a/camel/providers/imapx/camel-imapx-store-summary.c
+++ b/camel/providers/imapx/camel-imapx-store-summary.c
@@ -118,13 +118,14 @@ camel_imapx_store_summary_new (void)
* It must be freed using camel_store_summary_info_free().
**/
CamelIMAPXStoreInfo *
-camel_imapx_store_summary_full_name (CamelIMAPXStoreSummary *s, const gchar *full_name)
+camel_imapx_store_summary_full_name (CamelIMAPXStoreSummary *s,
+ const gchar *full_name)
{
gint count, i;
CamelIMAPXStoreInfo *info;
count = camel_store_summary_count ((CamelStoreSummary *) s);
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
info = (CamelIMAPXStoreInfo *) camel_store_summary_index ((CamelStoreSummary *) s, i);
if (info) {
if (strcmp (info->full_name, full_name) == 0)
@@ -137,7 +138,9 @@ camel_imapx_store_summary_full_name (CamelIMAPXStoreSummary *s, const gchar *ful
}
gchar *
-camel_imapx_store_summary_full_to_path (CamelIMAPXStoreSummary *s, const gchar *full_name, gchar dir_sep)
+camel_imapx_store_summary_full_to_path (CamelIMAPXStoreSummary *s,
+ const gchar *full_name,
+ gchar dir_sep)
{
gchar *path, *p;
@@ -156,7 +159,9 @@ camel_imapx_store_summary_full_to_path (CamelIMAPXStoreSummary *s, const gchar *
}
gchar *
-camel_imapx_store_summary_path_to_full (CamelIMAPXStoreSummary *s, const gchar *path, gchar dir_sep)
+camel_imapx_store_summary_path_to_full (CamelIMAPXStoreSummary *s,
+ const gchar *path,
+ gchar dir_sep)
{
gchar *full, *f;
const gchar *p;
@@ -165,7 +170,7 @@ camel_imapx_store_summary_path_to_full (CamelIMAPXStoreSummary *s, const gchar *
CamelIMAPXStoreNamespace *ns;
/* check to see if we have a subpath of path already defined */
- subpath = alloca (strlen (path)+1);
+ subpath = alloca (strlen (path) + 1);
strcpy (subpath, path);
do {
si = camel_store_summary_path ((CamelStoreSummary *) s, subpath);
@@ -220,7 +225,9 @@ camel_imapx_store_summary_path_to_full (CamelIMAPXStoreSummary *s, const gchar *
}
CamelIMAPXStoreInfo *
-camel_imapx_store_summary_add_from_full (CamelIMAPXStoreSummary *s, const gchar *full, gchar dir_sep)
+camel_imapx_store_summary_add_from_full (CamelIMAPXStoreSummary *s,
+ const gchar *full,
+ gchar dir_sep)
{
CamelIMAPXStoreInfo *info;
gchar *pathu8, *prefix;
@@ -231,10 +238,10 @@ camel_imapx_store_summary_add_from_full (CamelIMAPXStoreSummary *s, const gchar
d("adding full name '%s' '%c'\n", full, dir_sep);
len = strlen (full);
- full_name = alloca (len+1);
+ full_name = alloca (len + 1);
strcpy (full_name, full);
- if (full_name[len-1] == dir_sep)
- full_name[len-1] = 0;
+ if (full_name[len - 1] == dir_sep)
+ full_name[len - 1] = 0;
info = camel_imapx_store_summary_full_name (s, full_name);
if (info) {
@@ -253,7 +260,7 @@ camel_imapx_store_summary_add_from_full (CamelIMAPXStoreSummary *s, const gchar
if (full_name[len] == ns->sep)
len++;
- prefix = camel_imapx_store_summary_full_to_path (s, full_name+len, ns->sep);
+ prefix = camel_imapx_store_summary_full_to_path (s, full_name + len, ns->sep);
if (*ns->path) {
pathu8 = g_strdup_printf ("%s/%s", ns->path, prefix);
g_free (prefix);
@@ -273,7 +280,7 @@ camel_imapx_store_summary_add_from_full (CamelIMAPXStoreSummary *s, const gchar
camel_store_info_set_string ((CamelStoreSummary *) s, (CamelStoreInfo *) info, CAMEL_IMAPX_STORE_INFO_FULL_NAME, full_name);
if (!g_ascii_strcasecmp(full_name, "inbox"))
- info->info.flags |= CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_TYPE_INBOX;
+ info->info.flags |= CAMEL_FOLDER_SYSTEM | CAMEL_FOLDER_TYPE_INBOX;
} else {
d(" failed\n");
}
@@ -286,7 +293,8 @@ camel_imapx_store_summary_add_from_full (CamelIMAPXStoreSummary *s, const gchar
/* should this be const? */
/* TODO: deprecate/merge this function with path_to_full */
gchar *
-camel_imapx_store_summary_full_from_path (CamelIMAPXStoreSummary *s, const gchar *path)
+camel_imapx_store_summary_full_from_path (CamelIMAPXStoreSummary *s,
+ const gchar *path)
{
CamelIMAPXStoreNamespace *ns;
gchar *name = NULL;
@@ -301,7 +309,10 @@ camel_imapx_store_summary_full_from_path (CamelIMAPXStoreSummary *s, const gchar
}
/* TODO: this api needs some more work */
-CamelIMAPXStoreNamespace *camel_imapx_store_summary_namespace_new (CamelIMAPXStoreSummary *s, const gchar *full_name, gchar dir_sep)
+CamelIMAPXStoreNamespace *
+camel_imapx_store_summary_namespace_new (CamelIMAPXStoreSummary *s,
+ const gchar *full_name,
+ gchar dir_sep)
{
CamelIMAPXStoreNamespace *ns;
gchar *p, *o, c;
@@ -309,7 +320,7 @@ CamelIMAPXStoreNamespace *camel_imapx_store_summary_namespace_new (CamelIMAPXSto
ns = g_malloc0 (sizeof (*ns));
ns->full_name = g_strdup (full_name);
- len = strlen (ns->full_name)-1;
+ len = strlen (ns->full_name) - 1;
if (len >= 0 && ns->full_name[len] == dir_sep)
ns->full_name[len] = 0;
ns->sep = dir_sep;
@@ -336,7 +347,8 @@ void camel_imapx_store_summary_namespace_set (CamelIMAPXStoreSummary *s, CamelIM
}
CamelIMAPXStoreNamespace *
-camel_imapx_store_summary_namespace_find_path (CamelIMAPXStoreSummary *s, const gchar *path)
+camel_imapx_store_summary_namespace_find_path (CamelIMAPXStoreSummary *s,
+ const gchar *path)
{
gint len;
CamelIMAPXStoreNamespace *ns;
@@ -358,7 +370,8 @@ camel_imapx_store_summary_namespace_find_path (CamelIMAPXStoreSummary *s, const
}
CamelIMAPXStoreNamespace *
-camel_imapx_store_summary_namespace_find_full (CamelIMAPXStoreSummary *s, const gchar *full)
+camel_imapx_store_summary_namespace_find_full (CamelIMAPXStoreSummary *s,
+ const gchar *full)
{
gint len = 0;
CamelIMAPXStoreNamespace *ns;
@@ -382,7 +395,8 @@ camel_imapx_store_summary_namespace_find_full (CamelIMAPXStoreSummary *s, const
}
static CamelIMAPXNamespaceList *
-namespace_load (CamelStoreSummary *s, FILE *in)
+namespace_load (CamelStoreSummary *s,
+ FILE *in)
{
CamelIMAPXStoreNamespace *ns, *tail;
CamelIMAPXNamespaceList *nsl;
@@ -446,7 +460,9 @@ exception:
}
static gint
-namespace_save (CamelStoreSummary *s, FILE *out, CamelIMAPXNamespaceList *nsl)
+namespace_save (CamelStoreSummary *s,
+ FILE *out,
+ CamelIMAPXNamespaceList *nsl)
{
CamelIMAPXStoreNamespace *ns, *cur = NULL;
guint32 i, n;
@@ -489,7 +505,8 @@ namespace_save (CamelStoreSummary *s, FILE *out, CamelIMAPXNamespaceList *nsl)
}
static gint
-summary_header_load (CamelStoreSummary *s, FILE *in)
+summary_header_load (CamelStoreSummary *s,
+ FILE *in)
{
CamelIMAPXStoreSummary *is = (CamelIMAPXStoreSummary *) s;
CamelStoreSummaryClass *store_summary_class;
@@ -523,7 +540,8 @@ summary_header_load (CamelStoreSummary *s, FILE *in)
}
static gint
-summary_header_save (CamelStoreSummary *s, FILE *out)
+summary_header_save (CamelStoreSummary *s,
+ FILE *out)
{
CamelIMAPXStoreSummary *is = (CamelIMAPXStoreSummary *) s;
CamelStoreSummaryClass *store_summary_class;
@@ -542,7 +560,8 @@ summary_header_save (CamelStoreSummary *s, FILE *out)
}
static CamelStoreInfo *
-store_info_load (CamelStoreSummary *s, FILE *in)
+store_info_load (CamelStoreSummary *s,
+ FILE *in)
{
CamelIMAPXStoreInfo *mi;
CamelStoreSummaryClass *store_summary_class;
@@ -556,7 +575,7 @@ store_info_load (CamelStoreSummary *s, FILE *in)
} else {
/* NB: this is done again for compatability */
if (g_ascii_strcasecmp(mi->full_name, "inbox") == 0)
- mi->info.flags |= CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_TYPE_INBOX;
+ mi->info.flags |= CAMEL_FOLDER_SYSTEM | CAMEL_FOLDER_TYPE_INBOX;
}
}
@@ -564,7 +583,9 @@ store_info_load (CamelStoreSummary *s, FILE *in)
}
static gint
-store_info_save (CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi)
+store_info_save (CamelStoreSummary *s,
+ FILE *out,
+ CamelStoreInfo *mi)
{
CamelIMAPXStoreInfo *isi = (CamelIMAPXStoreInfo *) mi;
CamelStoreSummaryClass *store_summary_class;
@@ -578,7 +599,8 @@ store_info_save (CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi)
}
static void
-store_info_free (CamelStoreSummary *s, CamelStoreInfo *mi)
+store_info_free (CamelStoreSummary *s,
+ CamelStoreInfo *mi)
{
CamelIMAPXStoreInfo *isi = (CamelIMAPXStoreInfo *) mi;
CamelStoreSummaryClass *store_summary_class;
@@ -590,7 +612,9 @@ store_info_free (CamelStoreSummary *s, CamelStoreInfo *mi)
}
static const gchar *
-store_info_string (CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
+store_info_string (CamelStoreSummary *s,
+ const CamelStoreInfo *mi,
+ gint type)
{
CamelIMAPXStoreInfo *isi = (CamelIMAPXStoreInfo *) mi;
CamelStoreSummaryClass *store_summary_class;
@@ -610,7 +634,10 @@ store_info_string (CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
}
static void
-store_info_set_string (CamelStoreSummary *s, CamelStoreInfo *mi, gint type, const gchar *str)
+store_info_set_string (CamelStoreSummary *s,
+ CamelStoreInfo *mi,
+ gint type,
+ const gchar *str)
{
CamelIMAPXStoreInfo *isi = (CamelIMAPXStoreInfo *) mi;
CamelStoreSummaryClass *store_summary_class;
@@ -634,7 +661,8 @@ store_info_set_string (CamelStoreSummary *s, CamelStoreInfo *mi, gint type, cons
}
void
-camel_imapx_store_summary_set_namespaces (CamelIMAPXStoreSummary *summary, const CamelIMAPXNamespaceList *nsl)
+camel_imapx_store_summary_set_namespaces (CamelIMAPXStoreSummary *summary,
+ const CamelIMAPXNamespaceList *nsl)
{
if (summary->namespaces)
camel_imapx_namespace_list_clear (summary->namespaces);
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
index 8c5263d..28824c6 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -83,7 +83,8 @@ imapx_name_hash (gconstpointer key)
}
static gint
-imapx_name_equal (gconstpointer a, gconstpointer b)
+imapx_name_equal (gconstpointer a,
+ gconstpointer b)
{
gconstpointer aname = a, bname = b;
@@ -131,7 +132,8 @@ imapx_store_finalize (GObject *object)
}
static gchar *
-imapx_get_name (CamelService *service, gboolean brief)
+imapx_get_name (CamelService *service,
+ gboolean brief)
{
CamelURL *url;
@@ -169,7 +171,9 @@ camel_imapx_store_get_server (CamelIMAPXStore *istore,
}
void
-camel_imapx_store_op_done (CamelIMAPXStore *istore, CamelIMAPXServer *server, const gchar *folder_name)
+camel_imapx_store_op_done (CamelIMAPXStore *istore,
+ CamelIMAPXServer *server,
+ const gchar *folder_name)
{
g_return_if_fail (server != NULL);
@@ -268,8 +272,10 @@ imapx_query_auth_types_sync (CamelService *service,
}
static CamelFolder *
-get_folder_offline (CamelStore *store, const gchar *folder_name,
- guint32 flags, GError **error)
+get_folder_offline (CamelStore *store,
+ const gchar *folder_name,
+ guint32 flags,
+ GError **error)
{
CamelIMAPXStore *imapx_store = CAMEL_IMAPX_STORE (store);
CamelFolder *new_folder = NULL;
@@ -314,7 +320,8 @@ get_folder_offline (CamelStore *store, const gchar *folder_name,
/* folder_name is path name */
static CamelFolderInfo *
-imapx_build_folder_info (CamelIMAPXStore *imapx_store, const gchar *folder_name)
+imapx_build_folder_info (CamelIMAPXStore *imapx_store,
+ const gchar *folder_name)
{
CamelFolderInfo *fi;
const gchar *name;
@@ -347,7 +354,9 @@ imapx_build_folder_info (CamelIMAPXStore *imapx_store, const gchar *folder_name)
}
static void
-fill_fi (CamelStore *store, CamelFolderInfo *fi, guint32 flags)
+fill_fi (CamelStore *store,
+ CamelFolderInfo *fi,
+ guint32 flags)
{
CamelFolder *folder;
@@ -383,7 +392,8 @@ folder_hash (gconstpointer ap)
}
static gint
-folder_eq (gconstpointer ap, gconstpointer bp)
+folder_eq (gconstpointer ap,
+ gconstpointer bp)
{
const gchar *a = ap;
const gchar *b = bp;
@@ -397,7 +407,9 @@ folder_eq (gconstpointer ap, gconstpointer bp)
}
static gboolean
-imapx_match_pattern (CamelIMAPXStoreNamespace *ns, const gchar *pattern, const gchar *name)
+imapx_match_pattern (CamelIMAPXStoreNamespace *ns,
+ const gchar *pattern,
+ const gchar *name)
{
gchar p, n, dir_sep;
@@ -427,7 +439,9 @@ imapx_match_pattern (CamelIMAPXStoreNamespace *ns, const gchar *pattern, const g
}
static void
-imapx_unmark_folder_subscribed (CamelIMAPXStore *istore, const gchar *folder_name, gboolean emit_signal)
+imapx_unmark_folder_subscribed (CamelIMAPXStore *istore,
+ const gchar *folder_name,
+ gboolean emit_signal)
{
CamelStoreInfo *si;
@@ -452,7 +466,9 @@ imapx_unmark_folder_subscribed (CamelIMAPXStore *istore, const gchar *folder_nam
}
static void
-imapx_mark_folder_subscribed (CamelIMAPXStore *istore, const gchar *folder_name, gboolean emit_signal)
+imapx_mark_folder_subscribed (CamelIMAPXStore *istore,
+ const gchar *folder_name,
+ gboolean emit_signal)
{
CamelStoreInfo *si;
@@ -533,7 +549,8 @@ imapx_unsubscribe_folder (CamelStore *store,
}
static void
-imapx_delete_folder_from_cache (CamelIMAPXStore *istore, const gchar *folder_name)
+imapx_delete_folder_from_cache (CamelIMAPXStore *istore,
+ const gchar *folder_name)
{
gchar *state_file;
gchar *folder_dir, *storage_path;
@@ -577,7 +594,9 @@ imapx_delete_folder_from_cache (CamelIMAPXStore *istore, const gchar *folder_nam
}
static void
-rename_folder_info (CamelIMAPXStore *istore, const gchar *old_name, const gchar *new_name)
+rename_folder_info (CamelIMAPXStore *istore,
+ const gchar *old_name,
+ const gchar *new_name)
{
gint i, count;
CamelStoreInfo *si;
@@ -586,7 +605,7 @@ rename_folder_info (CamelIMAPXStore *istore, const gchar *old_name, const gchar
gchar *npath, *nfull;
count = camel_store_summary_count ((CamelStoreSummary *) istore->summary);
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
si = camel_store_summary_index ((CamelStoreSummary *) istore->summary, i);
if (si == NULL)
continue;
@@ -610,8 +629,10 @@ rename_folder_info (CamelIMAPXStore *istore, const gchar *old_name, const gchar
}
static CamelFolderInfo *
-get_folder_info_offline (CamelStore *store, const gchar *top,
- guint32 flags, GError **error)
+get_folder_info_offline (CamelStore *store,
+ const gchar *top,
+ guint32 flags,
+ GError **error)
{
CamelIMAPXStore *imapx_store = CAMEL_IMAPX_STORE (store);
CamelService *service;
@@ -668,7 +689,7 @@ get_folder_info_offline (CamelStore *store, const gchar *top,
* the moment. So let it do the right thing by bailing out if it's
* not a folder we're explicitly interested in. */
- for (i=0;i<camel_store_summary_count ((CamelStoreSummary *) imapx_store->summary);i++) {
+ for (i = 0; i < camel_store_summary_count ((CamelStoreSummary *) imapx_store->summary); i++) {
CamelStoreInfo *si = camel_store_summary_index ((CamelStoreSummary *) imapx_store->summary, i);
const gchar *full_name;
CamelIMAPXStoreNamespace *ns;
@@ -698,8 +719,8 @@ get_folder_info_offline (CamelStore *store, const gchar *top,
fi->total = si->total;
fi->flags = si->flags;
/* HACK: some servers report noinferiors for all folders (uw-imapd)
- We just translate this into nochildren, and let the imap layer enforce
- it. See create folder */
+ * We just translate this into nochildren, and let the imap layer enforce
+ * it. See create folder */
if (fi->flags & CAMEL_FOLDER_NOINFERIORS)
fi->flags = (fi->flags & ~CAMEL_FOLDER_NOINFERIORS) | CAMEL_FOLDER_NOCHILDREN;
@@ -728,7 +749,11 @@ get_folder_info_offline (CamelStore *store, const gchar *top,
}
static void
-add_folders_to_summary (CamelIMAPXStore *istore, CamelIMAPXServer *server, GPtrArray *folders, GHashTable *table, gboolean subscribed)
+add_folders_to_summary (CamelIMAPXStore *istore,
+ CamelIMAPXServer *server,
+ GPtrArray *folders,
+ GHashTable *table,
+ gboolean subscribed)
{
gint i = 0;
@@ -767,14 +792,14 @@ add_folders_to_summary (CamelIMAPXStore *istore, CamelIMAPXServer *server, GPtrA
fi = camel_folder_info_new ();
fi->full_name = g_strdup (camel_store_info_path (istore->summary, si));
if (!g_ascii_strcasecmp(fi->full_name, "inbox")) {
- li->flags |= CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_TYPE_INBOX;
+ li->flags |= CAMEL_FOLDER_SYSTEM | CAMEL_FOLDER_TYPE_INBOX;
fi->display_name = g_strdup (_("Inbox"));
} else
fi->display_name = g_strdup (camel_store_info_name (istore->summary, si));
/* HACK: some servers report noinferiors for all folders (uw-imapd)
- We just translate this into nochildren, and let the imap layer enforce
- it. See create folder */
+ * We just translate this into nochildren, and let the imap layer enforce
+ * it. See create folder */
if (li->flags & CAMEL_FOLDER_NOINFERIORS)
li->flags = (li->flags & ~CAMEL_FOLDER_NOINFERIORS) | CAMEL_FOLDER_NOCHILDREN;
fi->flags = li->flags;
@@ -787,14 +812,17 @@ add_folders_to_summary (CamelIMAPXStore *istore, CamelIMAPXServer *server, GPtrA
}
static void
-free_list (gpointer data, gpointer user_data)
+free_list (gpointer data,
+ gpointer user_data)
{
struct _list_info *li = data;
imapx_free_list (li);
}
static void
-imapx_get_folders_free (gpointer k, gpointer v, gpointer d)
+imapx_get_folders_free (gpointer k,
+ gpointer v,
+ gpointer d)
{
camel_folder_info_free (v);
}
@@ -892,7 +920,7 @@ fetch_folders_for_namespaces (CamelIMAPXStore *istore,
}
if (!list_ext) {
/* If the server doesn't support LIST-EXTENDED then we have to
- issue LSUB to list the subscribed folders separately */
+ * issue LSUB to list the subscribed folders separately */
flags |= CAMEL_STORE_FOLDER_INFO_SUBSCRIBED;
if (!fetch_folders_for_pattern (
istore, server, pat, flags, NULL,
@@ -1167,7 +1195,7 @@ imapx_store_get_folder_info_sync (CamelStore *store,
name = camel_imapx_store_summary_path_to_full (istore->summary, top, istore->dir_sep);
i = strlen (name);
- pattern = g_alloca (i+5);
+ pattern = g_alloca (i + 5);
strcpy (pattern, name);
g_free (name);
} else {
@@ -1367,7 +1395,7 @@ imapx_store_delete_folder_sync (CamelStore *store,
return FALSE;
}
/* Use INBOX connection as the implementation would try to select inbox to ensure
- we are not selected on the folder being deleted */
+ * we are not selected on the folder being deleted */
server = camel_imapx_store_get_server (istore, "INBOX", cancellable, error);
if (!server)
return FALSE;
@@ -1417,7 +1445,7 @@ imapx_store_rename_folder_sync (CamelStore *store,
imapx_unsubscribe_folder (store, old, FALSE, cancellable, NULL);
/* Use INBOX connection as the implementation would try to select inbox to ensure
- we are not selected on the folder being renamed */
+ * we are not selected on the folder being renamed */
server = camel_imapx_store_get_server(istore, "INBOX", cancellable, error);
if (server) {
success = camel_imapx_server_rename_folder (
diff --git a/camel/providers/imapx/camel-imapx-store.h b/camel/providers/imapx/camel-imapx-store.h
index 5324311..4aa065a 100644
--- a/camel/providers/imapx/camel-imapx-store.h
+++ b/camel/providers/imapx/camel-imapx-store.h
@@ -67,7 +67,7 @@ struct _CamelIMAPXStore {
guint32 rec_options;
/* Used for syncronizing get_folder_info. Check for re-use of any other lock. At the
- moment, could not find anything suitable for this */
+ * moment, could not find anything suitable for this */
GMutex *get_finfo_lock;
time_t last_refresh_time;
diff --git a/camel/providers/imapx/camel-imapx-stream.c b/camel/providers/imapx/camel-imapx-stream.c
index d3b74e6..a7c8a03 100644
--- a/camel/providers/imapx/camel-imapx-stream.c
+++ b/camel/providers/imapx/camel-imapx-stream.c
@@ -62,9 +62,9 @@ imapx_stream_fill (CamelIMAPXStream *is,
} else {
io(is->tagprefix, "camel_imapx_read: -1\n");
/* If returning zero, camel_stream_read() doesn't consider
- that to be an error. But we do -- we should only be here
- if we *know* there are data to receive. So set the error
- accordingly */
+ * that to be an error. But we do -- we should only be here
+ * if we *know* there are data to receive. So set the error
+ * accordingly */
if (!left)
g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
_("Source stream returned no data"));
@@ -279,7 +279,9 @@ camel_imapx_stream_buffered (CamelIMAPXStream *is)
#if 0
static gint
-skip_ws (CamelIMAPXStream *is, guchar *pp, guchar *pe)
+skip_ws (CamelIMAPXStream *is,
+ guchar *pp,
+ guchar *pe)
{
register guchar c, *p;
guchar *e;
@@ -306,7 +308,7 @@ skip_ws (CamelIMAPXStream *is, guchar *pp, guchar *pe)
#endif
/* FIXME: these should probably handle it themselves,
- and get rid of the token interface? */
+ * and get rid of the token interface? */
gint
camel_imapx_stream_atom (CamelIMAPXStream *is,
guchar **data,
@@ -603,7 +605,7 @@ camel_imapx_stream_token (CamelIMAPXStream *is,
while (1) {
while (p < e) {
c = *p++;
- if (isdigit (c) && literal < (UINT_MAX/10)) {
+ if (isdigit (c) && literal < (UINT_MAX / 10)) {
literal = literal * 10 + (c - '0');
} else if (c == '}') {
while (1) {
@@ -691,12 +693,12 @@ camel_imapx_stream_token (CamelIMAPXStream *is,
if (c == ' ' || c == '\r')
is->ptr = p;
else
- is->ptr = p-1;
+ is->ptr = p - 1;
*o = 0;
*data = is->tokenbuf;
*len = o - is->tokenbuf;
t(is->tagprefix, "token TOKEN '%s'\n", is->tokenbuf);
- return digits?IMAPX_TOK_INT:IMAPX_TOK_TOKEN;
+ return digits ? IMAPX_TOK_INT : IMAPX_TOK_TOKEN;
}
if (o >= oe) {
@@ -720,7 +722,7 @@ protocol_error:
io(is->tagprefix, "Got protocol error\n");
if (c == '\n')
- is->ptr = p-1;
+ is->ptr = p - 1;
else
is->ptr = p;
@@ -729,7 +731,10 @@ protocol_error:
}
void
-camel_imapx_stream_ungettoken (CamelIMAPXStream *is, camel_imapx_token_t tok, guchar *token, guint len)
+camel_imapx_stream_ungettoken (CamelIMAPXStream *is,
+ camel_imapx_token_t tok,
+ guchar *token,
+ guint len)
{
/*printf("ungettoken: '%c' '%s'\n", tok, token);*/
is->unget_tok = tok;
@@ -766,7 +771,7 @@ camel_imapx_stream_gets (CamelIMAPXStream *is,
*len = max;
is->ptr += max;
- return end == NULL?1:0;
+ return end == NULL ? 1 : 0;
}
void camel_imapx_stream_set_literal (CamelIMAPXStream *is, guint literal)
diff --git a/camel/providers/imapx/camel-imapx-summary.c b/camel/providers/imapx/camel-imapx-summary.c
index 0a97ed6..da5e097 100644
--- a/camel/providers/imapx/camel-imapx-summary.c
+++ b/camel/providers/imapx/camel-imapx-summary.c
@@ -52,7 +52,8 @@ static CamelMessageContentInfo * content_info_from_db (CamelFolderSummary *s, Ca
G_DEFINE_TYPE (CamelIMAPXSummary, camel_imapx_summary, CAMEL_TYPE_FOLDER_SUMMARY)
static CamelMessageInfo *
-imapx_message_info_clone (CamelFolderSummary *s, const CamelMessageInfo *mi)
+imapx_message_info_clone (CamelFolderSummary *s,
+ const CamelMessageInfo *mi)
{
CamelIMAPXMessageInfo *to;
CamelFolderSummaryClass *folder_summary_class;
@@ -99,22 +100,26 @@ camel_imapx_summary_init (CamelIMAPXSummary *obj)
}
static gint
-sort_uid_cmp (gpointer enc, gint len1, gpointer data1, gint len2, gpointer data2)
+sort_uid_cmp (gpointer enc,
+ gint len1,
+ gpointer data1,
+ gint len2,
+ gpointer data2)
{
- static gchar *sa1=NULL, *sa2=NULL;
- static gint l1=0, l2=0;
+ static gchar *sa1 = NULL, *sa2 = NULL;
+ static gint l1 = 0, l2 = 0;
gint a1, a2;
- if (l1 < len1+1) {
- sa1 = g_realloc (sa1, len1+1);
- l1 = len1+1;
+ if (l1 < len1 + 1) {
+ sa1 = g_realloc (sa1, len1 + 1);
+ l1 = len1 + 1;
}
- if (l2 < len2+1) {
- sa2 = g_realloc (sa2, len2+1);
- l2 = len2+1;
+ if (l2 < len2 + 1) {
+ sa2 = g_realloc (sa2, len2 + 1);
+ l2 = len2 + 1;
}
- strncpy (sa1, data1, len1);sa1[len1] = 0;
- strncpy (sa2, data2, len2);sa2[len2] = 0;
+ strncpy (sa1, data1, len1); sa1[len1] = 0;
+ strncpy (sa2, data2, len2); sa2[len2] = 0;
a1 = strtoul (sa1, NULL, 10);
a2 = strtoul (sa2, NULL, 10);
@@ -123,7 +128,8 @@ sort_uid_cmp (gpointer enc, gint len1, gpointer data1, gint len2, gpointer data
}
static gint
-uid_compare (gconstpointer va, gconstpointer vb)
+uid_compare (gconstpointer va,
+ gconstpointer vb)
{
const gchar **sa = (const gchar **) va, **sb = (const gchar **) vb;
gulong a, b;
@@ -149,7 +155,8 @@ uid_compare (gconstpointer va, gconstpointer vb)
* Returns: A new CamelIMAPXSummary object.
**/
CamelFolderSummary *
-camel_imapx_summary_new (CamelFolder *folder, const gchar *filename)
+camel_imapx_summary_new (CamelFolder *folder,
+ const gchar *filename)
{
CamelStore *parent_store;
CamelFolderSummary *summary;
@@ -185,7 +192,8 @@ camel_imapx_summary_new (CamelFolder *folder, const gchar *filename)
}
static gint
-summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *mir)
+summary_header_from_db (CamelFolderSummary *s,
+ CamelFIRecord *mir)
{
CamelIMAPXSummary *ims = CAMEL_IMAPX_SUMMARY (s);
CamelFolderSummaryClass *folder_summary_class;
@@ -217,7 +225,8 @@ summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *mir)
}
static gint
-summary_header_load (CamelFolderSummary *s, FILE *in)
+summary_header_load (CamelFolderSummary *s,
+ FILE *in)
{
CamelIMAPXSummary *ims = CAMEL_IMAPX_SUMMARY (s);
CamelFolderSummaryClass *folder_summary_class;
@@ -255,7 +264,7 @@ summary_header_load (CamelFolderSummary *s, FILE *in)
ims->validity = validity;
/* This is only used for migration; will never be asked to load newer
- versions of the store format */
+ * versions of the store format */
if (ims->version > 3) {
g_warning("Unknown summary version\n");
errno = EINVAL;
@@ -266,7 +275,8 @@ summary_header_load (CamelFolderSummary *s, FILE *in)
}
static CamelFIRecord *
-summary_header_to_db (CamelFolderSummary *s, GError **error)
+summary_header_to_db (CamelFolderSummary *s,
+ GError **error)
{
CamelIMAPXSummary *ims = CAMEL_IMAPX_SUMMARY (s);
CamelFolderSummaryClass *folder_summary_class;
@@ -279,20 +289,22 @@ summary_header_to_db (CamelFolderSummary *s, GError **error)
if (!fir)
return NULL;
fir->bdata = g_strdup_printf ("%d %llu %u %llu", CAMEL_IMAPX_SUMMARY_VERSION,
- (unsigned long long) ims->validity, ims->uidnext,
- (unsigned long long) ims->modseq);
+ (guint64) ims->validity, ims->uidnext,
+ (guint64) ims->modseq);
return fir;
}
static gint
-summary_header_save (CamelFolderSummary *s, FILE *out)
+summary_header_save (CamelFolderSummary *s,
+ FILE *out)
{
g_warning("imapx %s called; should never happen!\n", __func__);
return -1;
}
static CamelMessageInfo *
-message_info_from_db (CamelFolderSummary *s, CamelMIRecord *mir)
+message_info_from_db (CamelFolderSummary *s,
+ CamelMIRecord *mir)
{
CamelMessageInfo *info;
CamelIMAPXMessageInfo *iinfo;
@@ -313,7 +325,8 @@ message_info_from_db (CamelFolderSummary *s, CamelMIRecord *mir)
}
static CamelMessageInfo *
-message_info_migrate (CamelFolderSummary *s, FILE *in)
+message_info_migrate (CamelFolderSummary *s,
+ FILE *in)
{
CamelMessageInfo *info;
CamelIMAPXMessageInfo *iinfo;
@@ -337,7 +350,8 @@ error:
}
static CamelMIRecord *
-message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info)
+message_info_to_db (CamelFolderSummary *s,
+ CamelMessageInfo *info)
{
CamelIMAPXMessageInfo *iinfo = (CamelIMAPXMessageInfo *) info;
CamelFolderSummaryClass *folder_summary_class;
@@ -354,7 +368,9 @@ message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info)
}
static gboolean
-info_set_user_flag (CamelMessageInfo *info, const gchar *id, gboolean state)
+info_set_user_flag (CamelMessageInfo *info,
+ const gchar *id,
+ gboolean state)
{
CamelFolderSummaryClass *folder_summary_class;
gboolean res;
@@ -372,11 +388,12 @@ info_set_user_flag (CamelMessageInfo *info, const gchar *id, gboolean state)
}
static CamelMessageContentInfo *
-content_info_from_db (CamelFolderSummary *s, CamelMIRecord *mir)
+content_info_from_db (CamelFolderSummary *s,
+ CamelMIRecord *mir)
{
CamelFolderSummaryClass *folder_summary_class;
gchar *part = mir->cinfo;
- guint32 type=0;
+ guint32 type = 0;
folder_summary_class = CAMEL_FOLDER_SUMMARY_CLASS (
camel_imapx_summary_parent_class);
@@ -396,7 +413,8 @@ content_info_from_db (CamelFolderSummary *s, CamelMIRecord *mir)
}
static CamelMessageContentInfo *
-content_info_migrate (CamelFolderSummary *s, FILE *in)
+content_info_migrate (CamelFolderSummary *s,
+ FILE *in)
{
CamelFolderSummaryClass *folder_summary_class;
@@ -410,7 +428,9 @@ content_info_migrate (CamelFolderSummary *s, FILE *in)
}
static gint
-content_info_to_db (CamelFolderSummary *s, CamelMessageContentInfo *info, CamelMIRecord *mir)
+content_info_to_db (CamelFolderSummary *s,
+ CamelMessageContentInfo *info,
+ CamelMIRecord *mir)
{
CamelFolderSummaryClass *folder_summary_class;
gchar *oldr;
@@ -432,9 +452,10 @@ content_info_to_db (CamelFolderSummary *s, CamelMessageContentInfo *info, CamelM
}
void
-camel_imapx_summary_add_offline (CamelFolderSummary *summary, const gchar *uid,
- CamelMimeMessage *message,
- const CamelMessageInfo *info)
+camel_imapx_summary_add_offline (CamelFolderSummary *summary,
+ const gchar *uid,
+ CamelMimeMessage *message,
+ const CamelMessageInfo *info)
{
CamelIMAPXMessageInfo *mi;
const CamelFlag *flag;
@@ -464,8 +485,9 @@ camel_imapx_summary_add_offline (CamelFolderSummary *summary, const gchar *uid,
}
void
-camel_imapx_summary_add_offline_uncached (CamelFolderSummary *summary, const gchar *uid,
- const CamelMessageInfo *info)
+camel_imapx_summary_add_offline_uncached (CamelFolderSummary *summary,
+ const gchar *uid,
+ const CamelMessageInfo *info)
{
CamelIMAPXMessageInfo *mi;
diff --git a/camel/providers/imapx/camel-imapx-utils.c b/camel/providers/imapx/camel-imapx-utils.c
index 91aa429..71b3f02 100644
--- a/camel/providers/imapx/camel-imapx-utils.c
+++ b/camel/providers/imapx/camel-imapx-utils.c
@@ -65,7 +65,8 @@ static void camel_imapx_set_debug_flags (void)
__inline
#endif
camel_imapx_id_t
-imapx_tokenise (register const gchar *str, register guint len)
+imapx_tokenise (register const gchar *str,
+ register guint len)
{
struct _imapx_keyword *k = imapx_tokenise_struct (str, len);
@@ -94,8 +95,8 @@ static struct {
};
/* utility functions
- shoudl this be part of imapx-driver? */
-/* mabye this should be a stream op? */
+ * should this be part of imapx-driver? */
+/* maybe this should be a stream op? */
void
imapx_parse_flags (CamelIMAPXStream *stream,
guint32 *flagsp,
@@ -156,7 +157,9 @@ imapx_parse_flags (CamelIMAPXStream *stream,
* @server_to_evo: if TRUE, then converting server names to evo's names, if FALSE then opposite.
*/
static const gchar *
-rename_label_flag (const gchar *flag, gint len, gboolean server_to_evo)
+rename_label_flag (const gchar *flag,
+ gint len,
+ gboolean server_to_evo)
{
gint i;
const gchar *labels[] = {
@@ -168,7 +171,7 @@ rename_label_flag (const gchar *flag, gint len, gboolean server_to_evo)
NULL, NULL };
/* It really can pass zero-length flags inside, in that case it was able
- to always add first label, which is definitely wrong. */
+ * to always add first label, which is definitely wrong. */
if (!len || !flag || !*flag)
return "";
@@ -195,7 +198,7 @@ imapx_write_flags (CamelStream *stream,
return;
}
- for (i=0;flags!=0 && i< G_N_ELEMENTS (flag_table);i++) {
+ for (i = 0; flags != 0 && i< G_N_ELEMENTS (flag_table); i++) {
if (flag_table[i].flag & flags) {
if (flags & CAMEL_IMAPX_MESSAGE_RECENT)
continue;
@@ -231,7 +234,8 @@ imapx_write_flags (CamelStream *stream,
}
static gboolean
-imapx_update_user_flags (CamelMessageInfo *info, CamelFlag *server_user_flags)
+imapx_update_user_flags (CamelMessageInfo *info,
+ CamelFlag *server_user_flags)
{
gboolean changed = FALSE;
CamelMessageInfoBase *binfo = (CamelMessageInfoBase *) info;
@@ -252,7 +256,12 @@ imapx_update_user_flags (CamelMessageInfo *info, CamelFlag *server_user_flags)
}
gboolean
-imapx_update_message_info_flags (CamelMessageInfo *info, guint32 server_flags, CamelFlag *server_user_flags, guint32 permanent_flags, CamelFolder *folder, gboolean unsolicited)
+imapx_update_message_info_flags (CamelMessageInfo *info,
+ guint32 server_flags,
+ CamelFlag *server_user_flags,
+ guint32 permanent_flags,
+ CamelFolder *folder,
+ gboolean unsolicited)
{
gboolean changed = FALSE;
CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *) folder;
@@ -261,7 +270,7 @@ imapx_update_message_info_flags (CamelMessageInfo *info, guint32 server_flags, C
if (server_flags != xinfo->server_flags)
{
guint32 server_set, server_cleared;
- gint read=0, deleted=0, junk=0;
+ gint read = 0, deleted = 0, junk = 0;
server_set = server_flags & ~xinfo->server_flags;
server_cleared = xinfo->server_flags & ~server_flags;
@@ -320,11 +329,14 @@ imapx_update_message_info_flags (CamelMessageInfo *info, guint32 server_flags, C
}
void
-imapx_set_message_info_flags_for_new_message (CamelMessageInfo *info, guint32 server_flags, CamelFlag *server_user_flags, CamelFolder *folder)
+imapx_set_message_info_flags_for_new_message (CamelMessageInfo *info,
+ guint32 server_flags,
+ CamelFlag *server_user_flags,
+ CamelFolder *folder)
{
CamelMessageInfoBase *binfo = (CamelMessageInfoBase *) info;
CamelIMAPXMessageInfo *xinfo = (CamelIMAPXMessageInfo *) info;
- gint unread=0, deleted=0, junk=0;
+ gint unread = 0, deleted = 0, junk = 0;
guint32 flags;
binfo->flags |= server_flags;
@@ -367,11 +379,13 @@ imapx_set_message_info_flags_for_new_message (CamelMessageInfo *info, guint32 se
}
void
-imapx_update_summary_for_removed_message (CamelMessageInfo *info, CamelFolder *folder, gboolean unsolicited)
+imapx_update_summary_for_removed_message (CamelMessageInfo *info,
+ CamelFolder *folder,
+ gboolean unsolicited)
{
CamelMessageInfoBase *dinfo = (CamelMessageInfoBase *) info;
CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *) folder;
- gint unread=0, deleted=0, junk=0;
+ gint unread = 0, deleted = 0, junk = 0;
guint32 flags;
flags = dinfo->flags;
@@ -627,7 +641,7 @@ imapx_parse_namespace_list (CamelIMAPXStream *stream,
return nsl;
exception:
g_free (nsl);
- for (i=0; i < 3; i++)
+ for (i = 0; i < 3; i++)
imapx_namespace_clear (&namespaces[i]);
return NULL;
@@ -794,7 +808,7 @@ imapx_parse_param_list (CamelIMAPXStream *is,
camel_imapx_stream_ungettoken (is, tok, token, len);
camel_imapx_stream_astring (is, &token, cancellable, NULL);
- param = alloca (strlen ((gchar *) token)+1);
+ param = alloca (strlen ((gchar *) token) + 1);
strcpy (param, (gchar *) token);
camel_imapx_stream_astring (is, &token, cancellable, NULL);
camel_header_set_param (plist, param, (gchar *) token);
@@ -819,16 +833,16 @@ imapx_parse_ext_optional (CamelIMAPXStream *is,
/* although the grammars are different, they can be parsed the same way */
/* body_ext_1part ::= body_fld_md5 [SPACE body_fld_dsp
- [SPACE body_fld_lang
- [SPACE 1#body_extension]]]
- ;; MUST NOT be returned on non-extensible
- ;; "BODY" fetch */
+ * [SPACE body_fld_lang
+ * [SPACE 1#body_extension]]]
+ * ;; MUST NOT be returned on non-extensible
+ * ;; "BODY" fetch */
/* body_ext_mpart ::= body_fld_param
- [SPACE body_fld_dsp SPACE body_fld_lang
- [SPACE 1#body_extension]]
- ;; MUST NOT be returned on non-extensible
- ;; "BODY" fetch */
+ * [SPACE body_fld_dsp SPACE body_fld_lang
+ * [SPACE 1#body_extension]]
+ * ;; MUST NOT be returned on non-extensible
+ * ;; "BODY" fetch */
/* body_fld_dsp ::= "(" string SPACE body_fld_param ")" / nil */
@@ -908,8 +922,8 @@ imapx_parse_body_fields (CamelIMAPXStream *is,
GError *local_error = NULL;
/* body_fields ::= body_fld_param SPACE body_fld_id SPACE
- body_fld_desc SPACE body_fld_enc SPACE
- body_fld_octets */
+ * body_fld_desc SPACE body_fld_enc SPACE
+ * body_fld_octets */
p(is->tagprefix, "body_fields\n");
@@ -918,7 +932,7 @@ imapx_parse_body_fields (CamelIMAPXStream *is,
/* this should be string not astring */
if (camel_imapx_stream_astring (is, &token, cancellable, error))
goto error;
- type = alloca (strlen ( (gchar *) token)+1);
+ type = alloca (strlen ( (gchar *) token) + 1);
strcpy (type, (gchar *) token);
if (camel_imapx_stream_astring (is, &token, cancellable, error))
goto error;
@@ -937,7 +951,7 @@ imapx_parse_body_fields (CamelIMAPXStream *is,
cinfo->description = g_strdup ((gchar *) token);
/* body_fld_enc ::= (<"> ("7BIT" / "8BIT" / "BINARY" / "BASE64"/
- "QUOTED-PRINTABLE") <">) / string */
+ * "QUOTED-PRINTABLE") <">) / string */
if (camel_imapx_stream_astring (is, &token, cancellable, error))
goto error;
cinfo->encoding = g_strdup ((gchar *) token);
@@ -976,7 +990,7 @@ imapx_parse_address_list (CamelIMAPXStream *is,
struct _camel_header_address *addr, *group = NULL;
/* address ::= "(" addr_name SPACE addr_adl SPACE addr_mailbox
- SPACE addr_host ")" */
+ * SPACE addr_host ")" */
tok = camel_imapx_stream_token (is, &token, &len, cancellable, &local_error);
if (tok == ')')
break;
@@ -995,12 +1009,12 @@ imapx_parse_address_list (CamelIMAPXStream *is,
tok = camel_imapx_stream_nstring (is, &token, cancellable, &local_error);
/* [RFC-822] group syntax is indicated by a special
- form of address structure in which the host name
- field is NIL. If the mailbox name field is also
- NIL, this is an end of group marker (semi-colon in
- RFC 822 syntax). If the mailbox name field is
- non-NIL, this is a start of group marker, and the
- mailbox name field holds the group name phrase. */
+ * form of address structure in which the host name
+ * field is NIL. If the mailbox name field is also
+ * NIL, this is an end of group marker (semi-colon in
+ * RFC 822 syntax). If the mailbox name field is
+ * non-NIL, this is a start of group marker, and the
+ * mailbox name field holds the group name phrase. */
tok = camel_imapx_stream_nstring (is,(guchar **) &mbox, cancellable, &local_error);
mbox = g_strdup (mbox);
@@ -1054,9 +1068,9 @@ imapx_parse_envelope (CamelIMAPXStream *is,
GError *local_error = NULL;
/* envelope ::= "(" env_date SPACE env_subject SPACE env_from
- SPACE env_sender SPACE env_reply_to SPACE env_to
- SPACE env_cc SPACE env_bcc SPACE env_in_reply_to
- SPACE env_message_id ")" */
+ * SPACE env_sender SPACE env_reply_to SPACE env_to
+ * SPACE env_cc SPACE env_bcc SPACE env_in_reply_to
+ * SPACE env_message_id ")" */
p(is->tagprefix, "envelope\n");
@@ -1190,7 +1204,7 @@ imapx_parse_body (CamelIMAPXStream *is,
[SPACE body_ext_mpart] */
cinfo = g_malloc0 (sizeof (*cinfo));
- last = (struct _CamelMessageContentInfo *)&cinfo->childs;
+ last = (struct _CamelMessageContentInfo *) &cinfo->childs;
do {
subinfo = imapx_parse_body (is, cancellable, &local_error);
last->next = subinfo;
@@ -1206,10 +1220,10 @@ imapx_parse_body (CamelIMAPXStream *is,
cinfo->type = camel_content_type_new("multipart", (gchar *) token);
/* body_ext_mpart ::= body_fld_param
- [SPACE body_fld_dsp SPACE body_fld_lang
- [SPACE 1#body_extension]]
- ;; MUST NOT be returned on non-extensible
- ;; "BODY" fetch */
+ * [SPACE body_fld_dsp SPACE body_fld_lang
+ * [SPACE 1#body_extension]]
+ * ;; MUST NOT be returned on non-extensible
+ * ;; "BODY" fetch */
d(is->tagprefix, "body_ext_mpart\n");
@@ -1231,12 +1245,12 @@ imapx_parse_body (CamelIMAPXStream *is,
}
} else {
/* body_type_1part ::= (body_type_basic / body_type_msg / body_type_text)
- [SPACE body_ext_1part]
-
- body_type_basic ::= media_basic SPACE body_fields
- body_type_text ::= media_text SPACE body_fields SPACE body_fld_lines
- body_type_msg ::= media_message SPACE body_fields SPACE envelope
- SPACE body SPACE body_fld_lines */
+ * [SPACE body_ext_1part]
+ *
+ * body_type_basic ::= media_basic SPACE body_fields
+ * body_type_text ::= media_text SPACE body_fields SPACE body_fld_lines
+ * body_type_msg ::= media_message SPACE body_fields SPACE envelope
+ * SPACE body SPACE body_fld_lines */
d(is->tagprefix, "Single part body\n");
@@ -1270,8 +1284,8 @@ imapx_parse_body (CamelIMAPXStream *is,
/* body_ext_1part ::= body_fld_md5 [SPACE body_fld_dsp
[SPACE body_fld_lang
[SPACE 1#body_extension]]]
- ;; MUST NOT be returned on non-extensible
- ;; "BODY" fetch */
+ * ;; MUST NOT be returned on non - extensible
+ * ;; "BODY" fetch */
d(is->tagprefix, "extension data?\n");
@@ -1330,15 +1344,15 @@ imapx_parse_section (CamelIMAPXStream *is,
gchar * section = NULL;
/* currently we only return the part within the [section] specifier
- any header fields are parsed, but dropped */
+ * any header fields are parsed, but dropped */
/*
- section ::= "[" [section_text /
- (nz_number *["." nz_number] ["." (section_text / "MIME")])] "]"
-
- section_text ::= "HEADER" / "HEADER.FIELDS" [".NOT"]
- SPACE header_list / "TEXT"
- */
+ * section ::= "[" [section_text /
+ * (nz_number *["." nz_number] ["." (section_text / "MIME")])] "]"
+ *
+ * section_text ::= "HEADER" / "HEADER.FIELDS" [".NOT"]
+ * SPACE header_list / "TEXT"
+ */
tok = camel_imapx_stream_token (is, &token, &len, cancellable, NULL);
if (tok != '[') {
@@ -1358,7 +1372,7 @@ imapx_parse_section (CamelIMAPXStream *is,
}
/* header_list ::= "(" 1#header_fld_name ")"
- header_fld_name ::= astring */
+ * header_fld_name ::= astring */
/* we dont need the header specifiers */
tok = camel_imapx_stream_token (is, &token, &len, cancellable, NULL);
@@ -1584,7 +1598,7 @@ imapx_parse_fetch (CamelIMAPXStream *is,
finfo->got |= FETCH_SECTION;
tok = camel_imapx_stream_token (is, &token, &len, cancellable, NULL);
if (token[0] == '<') {
- finfo->offset = strtoul ((gchar *) token+1, NULL, 10);
+ finfo->offset = strtoul ((gchar *) token + 1, NULL, 10);
} else {
camel_imapx_stream_ungettoken (is, tok, token, len);
}
@@ -1686,7 +1700,9 @@ imapx_parse_status_info (CamelIMAPXStream *is,
}
static void
-generate_uids_from_sequence (GPtrArray *uids, guint32 begin_uid, guint32 end_uid)
+generate_uids_from_sequence (GPtrArray *uids,
+ guint32 begin_uid,
+ guint32 end_uid)
{
guint32 i;
@@ -1748,13 +1764,13 @@ imapx_parse_status (CamelIMAPXStream *is,
camel_imapx_stream_atom (is, &token, &len, cancellable, NULL);
/*
- resp_cond_auth ::= ("OK" / "PREAUTH") SPACE resp_text
- ;; Authentication condition
-
- resp_cond_bye ::= "BYE" SPACE resp_text
-
- resp_cond_state ::= ("OK" / "NO" / "BAD") SPACE resp_text
- ;; Status condition
+ * resp_cond_auth ::= ("OK" / "PREAUTH") SPACE resp_text
+ * ;; Authentication condition
+ *
+ * resp_cond_bye ::= "BYE" SPACE resp_text
+ *
+ * resp_cond_state ::= ("OK" / "NO" / "BAD") SPACE resp_text
+ * ;; Status condition
*/
sinfo->result = imapx_tokenise ((gchar *) token, len);
@@ -1839,7 +1855,7 @@ imapx_parse_status (CamelIMAPXStream *is,
}
/* and take the human readable response */
- camel_imapx_stream_text (is, (guchar **)&sinfo->text, cancellable, NULL);
+ camel_imapx_stream_text (is, (guchar **) &sinfo->text, cancellable, NULL);
return sinfo;
}
@@ -1914,8 +1930,8 @@ imapx_parse_list (CamelIMAPXStream *is,
linfo = g_malloc0 (sizeof (*linfo));
/* mailbox_list ::= "(" #("\Marked" / "\Noinferiors" /
- "\Noselect" / "\Unmarked" / flag_extension) ")"
- SPACE (<"> QUOTED_CHAR <"> / nil) SPACE mailbox */
+ * "\Noselect" / "\Unmarked" / flag_extension) ")"
+ * SPACE (<"> QUOTED_CHAR <"> / nil) SPACE mailbox */
tok = camel_imapx_stream_token (is, &token, &len, cancellable, NULL);
if (tok != '(') {
@@ -1940,7 +1956,7 @@ imapx_parse_list (CamelIMAPXStream *is,
}
camel_imapx_stream_nstring (is, &token, cancellable, NULL);
- linfo->separator = token?*token:0;
+ linfo->separator = token?*token : 0;
camel_imapx_stream_astring (is, &token, cancellable, NULL);
linfo->name = camel_utf7_utf8 ((gchar *) token);
@@ -1955,7 +1971,7 @@ imapx_list_get_path (struct _list_info *li)
const gchar *f;
if (li->separator != 0 && li->separator != '/') {
- p = path = alloca (strlen (li->name)*3+1);
+ p = path = alloca (strlen (li->name) * 3 + 1);
f = li->name;
while ((c = *f++ & 0xff)) {
if (c == li->separator)
@@ -1984,47 +2000,45 @@ imapx_free_list (struct _list_info *linfo)
/* ********************************************************************** */
/*
- From rfc2060
-
-ATOM_CHAR ::= <any CHAR except atom_specials>
-
-atom_specials ::= "(" / ")" / "{" / SPACE / CTL / list_wildcards /
- quoted_specials
-
-CHAR ::= <any 7-bit US-ASCII character except NUL,
- 0x01 - 0x7f>
-
-CTL ::= <any ASCII control character and DEL,
- 0x00 - 0x1f, 0x7f>
-
-SPACE ::= <ASCII SP, space, 0x20>
-
-list_wildcards ::= "%" / "*"
-
-quoted_specials ::= <"> / "\"
-
-string ::= quoted / literal
-
-literal ::= "{" number "}" CRLF *CHAR8
- ;; Number represents the number of CHAR8 octets
-
-quoted ::= <"> *QUOTED_CHAR <">
-
-QUOTED_CHAR ::= <any TEXT_CHAR except quoted_specials> /
- "\" quoted_specials
-
-TEXT_CHAR ::= <any CHAR except CR and LF>
-
-*/
+ * From rfc2060
+ *
+ * ATOM_CHAR ::= <any CHAR except atom_specials>
+ *
+ * atom_specials ::= "(" / ")" / "{" / SPACE / CTL / list_wildcards /
+ * quoted_specials
+ *
+ * CHAR ::= <any 7 - bit US - ASCII character except NUL,
+ * 0x01 - 0x7f>
+ *
+ * CTL ::= <any ASCII control character and DEL,
+ * 0x00 - 0x1f, 0x7f>
+ *
+ * SPACE ::= <ASCII SP, space, 0x20>
+ *
+ * list_wildcards ::= "%" / "*"
+ *
+ * quoted_specials ::= <"> / "\"
+ *
+ * string ::= quoted / literal
+ *
+ * literal ::= "{" number "}" CRLF *CHAR8
+ * ;; Number represents the number of CHAR8 octets
+ *
+ * quoted ::= <"> *QUOTED_CHAR <">
+ *
+ * QUOTED_CHAR ::= <any TEXT_CHAR except quoted_specials> /
+ * "\" quoted_specials
+ *
+ * TEXT_CHAR ::= <any CHAR except CR and LF>
+ */
/*
-ATOM = 1
-SIMPLE? = 2
-NOTID? = 4
-
-QSPECIAL = 8
-
-*/
+ * ATOM = 1
+ * SIMPLE? = 2
+ * NOTID? = 4
+ *
+ * QSPECIAL = 8
+ */
guchar imapx_specials[256] = {
/* 00 */0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 4, 0, 0,
@@ -2058,9 +2072,9 @@ void imapx_utils_init (void)
gint i;
guchar v;
- for (i=0;i<128;i++) {
+ for (i = 0; i < 128; i++) {
v = 0;
- if (i>=1 && i<=0x7f) {
+ if (i >= 1 && i <= 0x7f) {
v |= IMAPX_TYPE_CHAR;
if (i != 0x0a && i != 0x0d) {
v |= IMAPX_TYPE_TEXT_CHAR;
@@ -2085,7 +2099,7 @@ guchar imapx_is_mask (const gchar *p)
guchar v = 0xff;
while (*p) {
- v &= imapx_specials[((guchar)*p) & 0xff];
+ v &= imapx_specials[((guchar) * p) & 0xff];
p++;
}
@@ -2093,7 +2107,8 @@ guchar imapx_is_mask (const gchar *p)
}
gchar *
-imapx_path_to_physical (const gchar *prefix, const gchar *vpath)
+imapx_path_to_physical (const gchar *prefix,
+ const gchar *vpath)
{
GString *out = g_string_new (prefix);
const gchar *p = vpath;
@@ -2117,7 +2132,9 @@ imapx_path_to_physical (const gchar *prefix, const gchar *vpath)
}
gchar *
-imapx_concat (CamelIMAPXStore *imapx_store, const gchar *prefix, const gchar *suffix)
+imapx_concat (CamelIMAPXStore *imapx_store,
+ const gchar *prefix,
+ const gchar *suffix)
{
gsize len;
diff --git a/camel/providers/imapx/camel-imapx-utils.h b/camel/providers/imapx/camel-imapx-utils.h
index 6f8c179..17e4d80 100644
--- a/camel/providers/imapx/camel-imapx-utils.h
+++ b/camel/providers/imapx/camel-imapx-utils.h
@@ -215,9 +215,9 @@ struct _state_info *imapx_parse_status_info (struct _CamelIMAPXStream *is, GCanc
/* ********************************************************************** */
/* should this just return a FolderInfo?
- should this just return the name & flags & separator by reference? */
+ * should this just return the name & flags & separator by reference? */
struct _list_info {
- guint32 flags:24;
+ guint32 flags : 24;
gchar separator;
gchar *name;
};
diff --git a/camel/providers/imapx/test-imapx.c b/camel/providers/imapx/test-imapx.c
index 7449516..fe71d1c 100644
--- a/camel/providers/imapx/test-imapx.c
+++ b/camel/providers/imapx/test-imapx.c
@@ -22,7 +22,8 @@
#include <camel/camel.h>
gint
-main (gint argc, gchar *argv[])
+main (gint argc,
+ gchar *argv[])
{
CamelSession *session;
gchar *uri = NULL;
diff --git a/camel/providers/local/camel-local-folder.c b/camel/providers/local/camel-local-folder.c
index 0df10bc..e1c9765 100644
--- a/camel/providers/local/camel-local-folder.c
+++ b/camel/providers/local/camel-local-folder.c
@@ -533,8 +533,8 @@ camel_local_folder_construct (CamelLocalFolder *lf,
len = strlen (root_dir_path);
tmp = g_alloca (len + 1);
strcpy (tmp, root_dir_path);
- if (len>1 && G_IS_DIR_SEPARATOR (tmp[len-1]))
- tmp[len-1] = 0;
+ if (len > 1 && G_IS_DIR_SEPARATOR (tmp[len - 1]))
+ tmp[len - 1] = 0;
lf->base_path = g_strdup (root_dir_path);
@@ -579,7 +579,7 @@ camel_local_folder_construct (CamelLocalFolder *lf,
lf->changes = camel_folder_change_info_new ();
/* TODO: Remove the following line, it is a temporary workaround to remove
- the old-format 'ibex' files that might be lying around */
+ * the old-format 'ibex' files that might be lying around */
g_unlink (lf->index_path);
/* FIXME: Need to run indexing off of the setv method */
@@ -587,7 +587,7 @@ camel_local_folder_construct (CamelLocalFolder *lf,
/* if we have no/invalid index file, force it */
forceindex = camel_text_index_check (lf->index_path) == -1;
if (lf->flags & CAMEL_STORE_FOLDER_BODY_INDEX) {
- gint flag = O_RDWR|O_CREAT;
+ gint flag = O_RDWR | O_CREAT;
if (forceindex)
flag |= O_TRUNC;
@@ -657,7 +657,7 @@ camel_local_folder_set_index_body (CamelLocalFolder *local_folder,
}
/* lock the folder, may be called repeatedly (with matching unlock calls),
- with type the same or less than the first call */
+ * with type the same or less than the first call */
gint
camel_local_folder_lock (CamelLocalFolder *lf,
CamelLockType type,
@@ -681,7 +681,7 @@ camel_local_folder_lock (CamelLocalFolder *lf,
gint
camel_local_folder_unlock (CamelLocalFolder *lf)
{
- g_assert (lf->locked>0);
+ g_assert (lf->locked > 0);
lf->locked--;
if (lf->locked == 0)
CAMEL_LOCAL_FOLDER_GET_CLASS (lf)->unlock (lf);
@@ -690,11 +690,15 @@ camel_local_folder_unlock (CamelLocalFolder *lf)
}
void
-set_cannot_get_message_ex (GError **error, gint err_code, const gchar *msgID, const gchar *folder_path, const gchar *detailErr)
+set_cannot_get_message_ex (GError **error,
+ gint err_code,
+ const gchar *msgID,
+ const gchar *folder_path,
+ const gchar *detailErr)
{
/* Translators: The first %s is replaced with a message ID,
- the second %s is replaced with the folder path,
- the third %s is replaced with a detailed error string */
+ * the second %s is replaced with the folder path,
+ * the third %s is replaced with a detailed error string */
g_set_error (
error, CAMEL_ERROR, err_code,
_("Cannot get message %s from folder %s\n%s"),
diff --git a/camel/providers/local/camel-local-private.c b/camel/providers/local/camel-local-private.c
index 8e93b8a..2569e0a 100644
--- a/camel/providers/local/camel-local-private.c
+++ b/camel/providers/local/camel-local-private.c
@@ -29,22 +29,26 @@
#include "camel-local-private.h"
gint
-camel_local_frompos_sort (gpointer enc, gint len1, gpointer data1, gint len2, gpointer data2)
+camel_local_frompos_sort (gpointer enc,
+ gint len1,
+ gpointer data1,
+ gint len2,
+ gpointer data2)
{
- static gchar *sa1=NULL, *sa2=NULL;
- static gint l1=0, l2=0;
+ static gchar *sa1 = NULL, *sa2 = NULL;
+ static gint l1 = 0, l2 = 0;
gint a1, a2;
- if (l1 < len1+1) {
- sa1 = g_realloc (sa1, len1+1);
- l1 = len1+1;
+ if (l1 < len1 + 1) {
+ sa1 = g_realloc (sa1, len1 + 1);
+ l1 = len1 + 1;
}
- if (l2 < len2+1) {
- sa2 = g_realloc (sa2, len2+1);
- l2 = len2+1;
+ if (l2 < len2 + 1) {
+ sa2 = g_realloc (sa2, len2 + 1);
+ l2 = len2 + 1;
}
- strncpy (sa1, data1, len1);sa1[len1] = 0;
- strncpy (sa2, data2, len2);sa2[len2] = 0;
+ strncpy (sa1, data1, len1); sa1[len1] = 0;
+ strncpy (sa2, data2, len2); sa2[len2] = 0;
a1 = strtoul (sa1, NULL, 10);
a2 = strtoul (sa2, NULL, 10);
diff --git a/camel/providers/local/camel-local-private.h b/camel/providers/local/camel-local-private.h
index 2b3f7db..5165a2b 100644
--- a/camel/providers/local/camel-local-private.h
+++ b/camel/providers/local/camel-local-private.h
@@ -24,7 +24,7 @@
#define CAMEL_LOCAL_PRIVATE_H
/* need a way to configure and save this data, if this header is to
- be installed. For now, dont install it */
+ * be installed. For now, dont install it */
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/camel/providers/local/camel-local-provider.c b/camel/providers/local/camel-local-provider.c
index 0615c83..4db7c59 100644
--- a/camel/providers/local/camel-local-provider.c
+++ b/camel/providers/local/camel-local-provider.c
@@ -138,7 +138,8 @@ static CamelProvider spool_directory_provider = {
/* build a canonical 'path' */
static gchar *
-make_can_path (gchar *p, gchar *o)
+make_can_path (gchar *p,
+ gchar *o)
{
gchar c, last, *start = o;
@@ -146,12 +147,12 @@ make_can_path (gchar *p, gchar *o)
last = 0;
while ((c = *p++)) {
- if (c!='/'
- || (c=='/' && last != '/'))
+ if (c != '/'
+ || (c == '/' && last != '/'))
*o++ = c;
last = c;
}
- if (o>start && o[-1] == '/')
+ if (o > start && o[-1] == '/')
o[-1] = 0;
else
*o = 0;
@@ -186,7 +187,8 @@ local_url_hash (gconstpointer v)
}
static gint
-check_equal (gchar *s1, gchar *s2)
+check_equal (gchar *s1,
+ gchar *s2)
{
if (s1 == NULL || *s1 == 0) {
if (s2 == NULL || *s2 == 0)
@@ -202,7 +204,8 @@ check_equal (gchar *s1, gchar *s2)
}
static gint
-local_url_equal (gconstpointer v, gconstpointer v2)
+local_url_equal (gconstpointer v,
+ gconstpointer v2)
{
const CamelURL *u1 = v, *u2 = v2;
gchar *p1, *p2;
diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c
index 62236e0..aaf5913 100644
--- a/camel/providers/local/camel-local-store.c
+++ b/camel/providers/local/camel-local-store.c
@@ -196,7 +196,7 @@ static gchar *
local_store_get_name (CamelService *service,
gboolean brief)
{
- gchar *dir = ((CamelLocalStore*) service)->toplevel_dir;
+ gchar *dir = ((CamelLocalStore *) service)->toplevel_dir;
if (brief)
return g_strdup (dir);
@@ -225,8 +225,8 @@ local_store_get_folder_sync (CamelStore *store,
struct stat st;
strcpy (path, ((CamelLocalStore *) store)->toplevel_dir);
- if (G_IS_DIR_SEPARATOR (path[len-1]))
- path[len-1] = '\0';
+ if (G_IS_DIR_SEPARATOR (path[len - 1]))
+ path[len - 1] = '\0';
if (!g_path_is_absolute (path)) {
g_set_error (
diff --git a/camel/providers/local/camel-local-summary.c b/camel/providers/local/camel-local-summary.c
index f2265e4..92eaf00 100644
--- a/camel/providers/local/camel-local-summary.c
+++ b/camel/providers/local/camel-local-summary.c
@@ -131,7 +131,10 @@ camel_local_summary_init (CamelLocalSummary *local_summary)
}
void
-camel_local_summary_construct (CamelLocalSummary *new, const gchar *filename, const gchar *local_name, CamelIndex *index)
+camel_local_summary_construct (CamelLocalSummary *new,
+ const gchar *filename,
+ const gchar *local_name,
+ CamelIndex *index)
{
camel_folder_summary_set_build_content (CAMEL_FOLDER_SUMMARY (new), FALSE);
camel_folder_summary_set_filename (CAMEL_FOLDER_SUMMARY (new), filename);
@@ -142,7 +145,9 @@ camel_local_summary_construct (CamelLocalSummary *new, const gchar *filename, co
}
static gint
-local_summary_load (CamelLocalSummary *cls, gint forceindex, GError **error)
+local_summary_load (CamelLocalSummary *cls,
+ gint forceindex,
+ GError **error)
{
d(g_print ("\nlocal_summary_load called \n"));
return camel_folder_summary_load_from_db ((CamelFolderSummary *) cls, error);
@@ -150,7 +155,9 @@ local_summary_load (CamelLocalSummary *cls, gint forceindex, GError **error)
/* load/check the summary */
gint
-camel_local_summary_load (CamelLocalSummary *cls, gint forceindex, GError **error)
+camel_local_summary_load (CamelLocalSummary *cls,
+ gint forceindex,
+ GError **error)
{
CamelLocalSummaryClass *class;
@@ -174,13 +181,16 @@ void camel_local_summary_check_force (CamelLocalSummary *cls)
}
gchar *
-camel_local_summary_encode_x_evolution (CamelLocalSummary *cls, const CamelLocalMessageInfo *info)
+camel_local_summary_encode_x_evolution (CamelLocalSummary *cls,
+ const CamelLocalMessageInfo *info)
{
return CAMEL_LOCAL_SUMMARY_GET_CLASS (cls)->encode_x_evolution (cls, info);
}
gint
-camel_local_summary_decode_x_evolution (CamelLocalSummary *cls, const gchar *xev, CamelLocalMessageInfo *info)
+camel_local_summary_decode_x_evolution (CamelLocalSummary *cls,
+ const gchar *xev,
+ CamelLocalMessageInfo *info)
{
return CAMEL_LOCAL_SUMMARY_GET_CLASS (cls)->decode_x_evolution (cls, xev, info);
}
@@ -197,7 +207,9 @@ struct _stat_info {
};
static void
-do_stat_ci (CamelLocalSummary *cls, struct _stat_info *info, CamelMessageContentInfo *ci)
+do_stat_ci (CamelLocalSummary *cls,
+ struct _stat_info *info,
+ CamelMessageContentInfo *ci)
{
info->cicount++;
info->citotal += ((CamelFolderSummary *) cls)->content_info_size /*+ 4 memchunks are 1/4 byte overhead per mi */;
@@ -220,9 +232,9 @@ do_stat_ci (CamelLocalSummary *cls, struct _stat_info *info, CamelMessageContent
while (param) {
info->citotal += sizeof (*param) + 4;
if (param->name)
- info->citotal += strlen (param->name)+4;
+ info->citotal += strlen (param->name) + 4;
if (param->value)
- info->citotal += strlen (param->value)+4;
+ info->citotal += strlen (param->value) + 4;
param = param->next;
}
}
@@ -234,10 +246,12 @@ do_stat_ci (CamelLocalSummary *cls, struct _stat_info *info, CamelMessageContent
}
static void
-do_stat_mi (CamelLocalSummary *cls, struct _stat_info *info, CamelMessageInfo *mi)
+do_stat_mi (CamelLocalSummary *cls,
+ struct _stat_info *info,
+ CamelMessageInfo *mi)
{
info->micount++;
- info->mitotal += ((CamelFolderSummary *) cls)->content_info_size /*+ 4*/;
+ info->mitotal += ((CamelFolderSummary *) cls)->content_info_size /*+ 4 */;
if (mi->subject)
info->mitotal += strlen (mi->subject) + 4;
@@ -251,7 +265,7 @@ do_stat_mi (CamelLocalSummary *cls, struct _stat_info *info, CamelMessageInfo *m
info->mitotal += strlen (mi->uid) + 4;
if (mi->references) {
- info->mitotal += (mi->references->size-1) * sizeof (CamelSummaryMessageID) + sizeof (CamelSummaryReferences) + 4;
+ info->mitotal += (mi->references->size - 1) * sizeof (CamelSummaryMessageID) + sizeof (CamelSummaryReferences) + 4;
info->msgid += (mi->references->size) * sizeof (CamelSummaryMessageID);
info->msgcount += mi->references->size;
}
@@ -283,7 +297,7 @@ camel_local_summary_check (CamelLocalSummary *cls,
CamelFolderSummary *s = (CamelFolderSummary *) cls;
struct _stat_info stats = { 0 };
- for (i=0;i<camel_folder_summary_count (s);i++) {
+ for (i = 0; i < camel_folder_summary_count (s); i++) {
CamelMessageInfo *info = camel_folder_summary_index (s, i);
do_stat_mi (cls, &stats, info);
camel_message_info_free (info);
@@ -292,7 +306,7 @@ camel_local_summary_check (CamelLocalSummary *cls,
printf("\nMemory used by summary:\n\n");
printf("Total of %d messages\n", camel_folder_summary_count(s));
printf("Total: %d bytes (ave %f)\n", stats.citotal + stats.mitotal,
- (double)(stats.citotal+stats.mitotal)/(double) camel_folder_summary_count (s));
+ (double)(stats.citotal + stats.mitotal) / (double) camel_folder_summary_count (s));
printf("Message Info: %d (ave %f)\n", stats.mitotal, (double)stats.mitotal/(double)stats.micount);
printf("Content Info; %d (ave %f) count %d\n", stats.citotal, (double)stats.citotal/(double)stats.cicount, stats.cicount);
printf("message id's: %d (ave %f) count %d\n", stats.msgid, (double)stats.msgid/(double)stats.msgcount, stats.msgcount);
@@ -345,7 +359,11 @@ camel_local_summary_add (CamelLocalSummary *cls,
* Returns: -1 on error, otherwise the number of bytes written.
**/
gint
-camel_local_summary_write_headers (gint fd, struct _camel_header_raw *header, const gchar *xevline, const gchar *status, const gchar *xstatus)
+camel_local_summary_write_headers (gint fd,
+ struct _camel_header_raw *header,
+ const gchar *xevline,
+ const gchar *status,
+ const gchar *xstatus)
{
gint outlen = 0, len;
gint newfd;
@@ -452,14 +470,17 @@ local_summary_sync (CamelLocalSummary *cls,
}
static gint
-local_summary_need_index (void) {
+local_summary_need_index (void)
+{
return 1;
}
static void
-update_summary (CamelFolderSummary *summary, CamelMessageInfoBase *info, CamelMessageInfoBase *old)
+update_summary (CamelFolderSummary *summary,
+ CamelMessageInfoBase *info,
+ CamelMessageInfoBase *old)
{
- gint unread=0, deleted=0, junk=0;
+ gint unread = 0, deleted = 0, junk = 0;
guint32 flags = info->flags;
guint32 oldflags = old->flags;
@@ -551,7 +572,8 @@ local_summary_add (CamelLocalSummary *cls,
}
static gchar *
-local_summary_encode_x_evolution (CamelLocalSummary *cls, const CamelLocalMessageInfo *mi)
+local_summary_encode_x_evolution (CamelLocalSummary *cls,
+ const CamelLocalMessageInfo *mi)
{
GString *out = g_string_new("");
struct _camel_header_param *params = NULL;
@@ -607,7 +629,9 @@ local_summary_encode_x_evolution (CamelLocalSummary *cls, const CamelLocalMessag
}
static gint
-local_summary_decode_x_evolution (CamelLocalSummary *cls, const gchar *xev, CamelLocalMessageInfo *mi)
+local_summary_decode_x_evolution (CamelLocalSummary *cls,
+ const gchar *xev,
+ CamelLocalMessageInfo *mi)
{
struct _camel_header_param *params, *scan;
guint32 uid, flags;
@@ -635,20 +659,20 @@ local_summary_decode_x_evolution (CamelLocalSummary *cls, const gchar *xev, Came
/* check for additional data */
header = strchr (xev, ';');
if (header) {
- params = camel_header_param_list_decode (header+1);
+ params = camel_header_param_list_decode (header + 1);
scan = params;
while (scan) {
if (!g_ascii_strcasecmp(scan->name, "flags")) {
gchar **flagv = g_strsplit(scan->value, ",", 1000);
- for (i=0;flagv[i];i++)
+ for (i = 0; flagv[i]; i++)
camel_message_info_set_user_flag ((CamelMessageInfo *) mi, flagv[i], TRUE);
g_strfreev (flagv);
} else if (!g_ascii_strcasecmp(scan->name, "tags")) {
gchar **tagv = g_strsplit(scan->value, ",", 10000);
gchar *val;
- for (i=0;tagv[i];i++) {
+ for (i = 0; tagv[i]; i++) {
val = strchr (tagv[i], '=');
if (val) {
*val++ = 0;
@@ -670,7 +694,8 @@ local_summary_decode_x_evolution (CamelLocalSummary *cls, const gchar *xev, Came
}
static gint
-summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *fir)
+summary_header_from_db (CamelFolderSummary *s,
+ CamelFIRecord *fir)
{
CamelLocalSummary *cls = (CamelLocalSummary *) s;
gchar *part, *tmp;
@@ -694,7 +719,8 @@ summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *fir)
}
static gint
-summary_header_load (CamelFolderSummary *s, FILE *in)
+summary_header_load (CamelFolderSummary *s,
+ FILE *in)
{
CamelLocalSummary *cls = (CamelLocalSummary *) s;
@@ -712,7 +738,8 @@ summary_header_load (CamelFolderSummary *s, FILE *in)
}
static struct _CamelFIRecord *
-summary_header_to_db (CamelFolderSummary *s, GError **error)
+summary_header_to_db (CamelFolderSummary *s,
+ GError **error)
{
CamelFolderSummaryClass *folder_summary_class;
struct _CamelFIRecord *fir;
@@ -727,7 +754,8 @@ summary_header_to_db (CamelFolderSummary *s, GError **error)
}
static gint
-summary_header_save (CamelFolderSummary *s, FILE *out)
+summary_header_save (CamelFolderSummary *s,
+ FILE *out)
{
/*CamelLocalSummary *cls = (CamelLocalSummary *)s;*/
@@ -738,7 +766,8 @@ summary_header_save (CamelFolderSummary *s, FILE *out)
}
static CamelMessageInfo *
-message_info_new_from_header (CamelFolderSummary *s, struct _camel_header_raw *h)
+message_info_new_from_header (CamelFolderSummary *s,
+ struct _camel_header_raw *h)
{
CamelLocalMessageInfo *mi;
CamelLocalSummary *cls = (CamelLocalSummary *) s;
@@ -749,7 +778,7 @@ message_info_new_from_header (CamelFolderSummary *s, struct _camel_header_raw *h
gint doindex = FALSE;
xev = camel_header_raw_find(&h, "X-Evolution", NULL);
- if (xev==NULL || camel_local_summary_decode_x_evolution (cls, xev, mi) == -1) {
+ if (xev == NULL || camel_local_summary_decode_x_evolution (cls, xev, mi) == -1) {
/* to indicate it has no xev header */
mi->info.flags |= CAMEL_MESSAGE_FOLDER_FLAGGED | CAMEL_MESSAGE_FOLDER_NOXEV;
mi->info.dirty = TRUE;
diff --git a/camel/providers/local/camel-maildir-folder.c b/camel/providers/local/camel-maildir-folder.c
index 20bb2e6..bbae5c2 100644
--- a/camel/providers/local/camel-maildir-folder.c
+++ b/camel/providers/local/camel-maildir-folder.c
@@ -104,8 +104,8 @@ maildir_folder_get_filename (CamelFolder *folder,
mdi = (CamelMaildirMessageInfo *) info;
/* If filename is NULL, it means folder_summary_check is not yet executed.
- Try to find the file in the folder and use it, otherwise construct its
- name based on actual flags.
+ * Try to find the file in the folder and use it, otherwise construct its
+ * name based on actual flags.
*/
if (!camel_maildir_info_filename (mdi)) {
const gchar *uid = camel_message_info_uid (info);
@@ -183,7 +183,7 @@ maildir_folder_append_message_sync (CamelFolder *folder,
/* write it out to tmp, use the uid we got from the summary */
name = g_strdup_printf ("%s/tmp/%s", lf->folder_path, camel_message_info_uid(mi));
output_stream = camel_stream_fs_new_with_name (
- name, O_WRONLY|O_CREAT, 0600, error);
+ name, O_WRONLY | O_CREAT, 0600, error);
if (output_stream == NULL)
goto fail_write;
diff --git a/camel/providers/local/camel-maildir-store.c b/camel/providers/local/camel-maildir-store.c
index 8813f0f..95bc8bc 100644
--- a/camel/providers/local/camel-maildir-store.c
+++ b/camel/providers/local/camel-maildir-store.c
@@ -74,7 +74,7 @@ static CamelFolderInfo *
maildir_store_create_folder_sync (CamelStore *store,
const gchar *parent_name,
const gchar *folder_name,
- GCancellable *cancellable,
+ GCancellable *cancellable,
GError **error)
{
gchar *path = ((CamelLocalStore *) store)->toplevel_dir;
@@ -306,7 +306,7 @@ maildir_store_delete_folder_sync (CamelStore *store,
/* for tmp (only), its contents is irrelevant */
dir = opendir (tmp);
if (dir) {
- while ((d=readdir (dir))) {
+ while ((d = readdir (dir))) {
gchar *name = d->d_name, *file;
if (!strcmp(name, ".") || !strcmp(name, ".."))
@@ -620,14 +620,14 @@ maildir_store_get_folder_info_sync (CamelStore *store,
if (scan_dirs (store, flags, &fi, url, cancellable, error) == -1)
goto fail;
- fi->flags |= CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_TYPE_INBOX;
+ fi->flags |= CAMEL_FOLDER_SYSTEM | CAMEL_FOLDER_TYPE_INBOX;
} else if (!strcmp(top, ".")) {
fi = scan_fi(store, flags, url, "Inbox", _("Inbox"), cancellable);
- fi->flags |= CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_TYPE_INBOX;
+ fi->flags |= CAMEL_FOLDER_SYSTEM | CAMEL_FOLDER_TYPE_INBOX;
} else {
const gchar *name = strrchr (top, '/');
- fi = scan_fi (store, flags, url, top, name?name+1:top, cancellable);
+ fi = scan_fi (store, flags, url, top, name ? name + 1 : top, cancellable);
if (scan_dirs (store, flags, &fi, url, cancellable, error) == -1)
goto fail;
}
@@ -655,7 +655,13 @@ maildir_store_get_inbox_sync (CamelStore *store,
}
static gboolean
-rename_traverse_fi (CamelStore *store, CamelStoreClass *store_class, CamelFolderInfo *fi, const gchar *old_full_name_prefix, const gchar *new_full_name_prefix, GCancellable *cancellable, GError **error)
+rename_traverse_fi (CamelStore *store,
+ CamelStoreClass *store_class,
+ CamelFolderInfo *fi,
+ const gchar *old_full_name_prefix,
+ const gchar *new_full_name_prefix,
+ GCancellable *cancellable,
+ GError **error)
{
gint old_prefix_len = strlen (old_full_name_prefix);
gboolean ret = TRUE;
@@ -774,7 +780,8 @@ camel_maildir_store_init (CamelMaildirStore *maildir_store)
}
static gchar *
-maildir_get_full_path (CamelLocalStore *ls, const gchar *full_name)
+maildir_get_full_path (CamelLocalStore *ls,
+ const gchar *full_name)
{
gchar *dir_name, *path;
@@ -786,7 +793,9 @@ maildir_get_full_path (CamelLocalStore *ls, const gchar *full_name)
}
static gchar *
-maildir_get_meta_path (CamelLocalStore *ls, const gchar *full_name, const gchar *ext)
+maildir_get_meta_path (CamelLocalStore *ls,
+ const gchar *full_name,
+ const gchar *ext)
{
gchar *dir_name, *path;
@@ -829,7 +838,9 @@ static void scan_free (gpointer k, gpointer v, gpointer d)
}
static gint
-scan_old_dir_info (CamelStore *store, CamelFolderInfo *topfi, GError **error)
+scan_old_dir_info (CamelStore *store,
+ CamelFolderInfo *topfi,
+ GError **error)
{
CamelDList queue = CAMEL_DLIST_INITIALISER (queue);
CamelURL *url;
@@ -858,7 +869,7 @@ scan_old_dir_info (CamelStore *store, CamelFolderInfo *topfi, GError **error)
sn = (struct _scan_node *) camel_dlist_remhead (&queue);
- last = (CamelFolderInfo *)&sn->fi->child;
+ last = (CamelFolderInfo *) &sn->fi->child;
if (!strcmp(sn->fi->full_name, "."))
name = g_strdup (root);
@@ -935,7 +946,10 @@ fail:
}
static void
-maildir_rename_old_folder (CamelMaildirStore *mstore, CamelFolderInfo *fi, GCancellable *cancellable, GError **error)
+maildir_rename_old_folder (CamelMaildirStore *mstore,
+ CamelFolderInfo *fi,
+ GCancellable *cancellable,
+ GError **error)
{
gchar *new_name = NULL, *old_name;
CamelStoreClass *store_class;
@@ -953,7 +967,10 @@ maildir_rename_old_folder (CamelMaildirStore *mstore, CamelFolderInfo *fi, GCanc
}
static void
-traverse_rename_folder_info (CamelMaildirStore *mstore, CamelFolderInfo *fi, GCancellable *cancellable, GError **error)
+traverse_rename_folder_info (CamelMaildirStore *mstore,
+ CamelFolderInfo *fi,
+ GCancellable *cancellable,
+ GError **error)
{
if (fi != NULL) {
if (fi->child)
@@ -968,7 +985,9 @@ traverse_rename_folder_info (CamelMaildirStore *mstore, CamelFolderInfo *fi, GCa
}
static void
-maildir_migrate_hierarchy (CamelMaildirStore *mstore, GCancellable *cancellable, GError **error)
+maildir_migrate_hierarchy (CamelMaildirStore *mstore,
+ GCancellable *cancellable,
+ GError **error)
{
CamelFolderInfo *topfi;
gchar *meta_path;
diff --git a/camel/providers/local/camel-maildir-summary.c b/camel/providers/local/camel-maildir-summary.c
index b4bb16d..0024c42 100644
--- a/camel/providers/local/camel-maildir-summary.c
+++ b/camel/providers/local/camel-maildir-summary.c
@@ -244,7 +244,7 @@ static gchar *maildir_summary_encode_x_evolution (CamelLocalSummary *cls, const
}
/* FIXME:
- both 'new' and 'add' will try and set the filename, this is not ideal ...
+ * both 'new' and 'add' will try and set the filename, this is not ideal ...
*/
static CamelMessageInfo *
maildir_summary_add (CamelLocalSummary *cls,
@@ -271,7 +271,8 @@ maildir_summary_add (CamelLocalSummary *cls,
}
static CamelMessageInfo *
-message_info_new_from_header (CamelFolderSummary * s, struct _camel_header_raw *h)
+message_info_new_from_header (CamelFolderSummary *s,
+ struct _camel_header_raw *h)
{
CamelMessageInfo *mi, *info;
CamelMaildirSummary *mds = (CamelMaildirSummary *) s;
@@ -284,7 +285,7 @@ message_info_new_from_header (CamelFolderSummary * s, struct _camel_header_raw *
mdi = (CamelMaildirMessageInfo *) mi;
uid = camel_message_info_uid (mi);
- if (uid==NULL || uid[0] == 0)
+ if (uid == NULL || uid[0] == 0)
mdi->info.info.uid = camel_pstring_add (camel_folder_summary_next_uid_string (s), TRUE);
/* handle 'duplicates' */
@@ -314,11 +315,11 @@ message_info_new_from_header (CamelFolderSummary * s, struct _camel_header_raw *
/* we check for something.something_number.something */
p1 = strchr (mdi->filename, '.');
if (p1) {
- p2 = strchr (p1+1, '.');
- p3 = strchr (p1+1, '_');
- if (p2 && p3 && p3<p2) {
- uid = strtoul (p3+1, &p1, 10);
- if (p1 == p2 && uid>0)
+ p2 = strchr (p1 + 1, '.');
+ p3 = strchr (p1 + 1, '_');
+ if (p2 && p3 && p3 < p2) {
+ uid = strtoul (p3 + 1, &p1, 10);
+ if (p1 == p2 && uid > 0)
camel_folder_summary_set_uid (s, uid);
}
}
@@ -334,7 +335,8 @@ message_info_new_from_header (CamelFolderSummary * s, struct _camel_header_raw *
}
static void
-message_info_free (CamelFolderSummary *s, CamelMessageInfo *mi)
+message_info_free (CamelFolderSummary *s,
+ CamelMessageInfo *mi)
{
CamelMaildirMessageInfo *mdi = (CamelMaildirMessageInfo *) mi;
@@ -355,7 +357,7 @@ static gchar *maildir_summary_next_uid_string (CamelFolderSummary *s)
cln = strchr (mds->priv->current_file, ':');
if (cln)
- return g_strndup (mds->priv->current_file, cln-mds->priv->current_file);
+ return g_strndup (mds->priv->current_file, cln - mds->priv->current_file);
else
return g_strdup (mds->priv->current_file);
} else {
@@ -374,12 +376,12 @@ static gchar *maildir_summary_next_uid_string (CamelFolderSummary *s)
if (retry > 0) {
g_free (name);
g_free (uid);
- g_usleep (2*G_USEC_PER_SEC);
+ g_usleep (2 * G_USEC_PER_SEC);
}
uid = g_strdup_printf("%ld.%d_%u.%s", time(NULL), getpid(), nextuid, mds->priv->hostname);
name = g_strdup_printf("%s/tmp/%s", cls->folder_path, uid);
retry++;
- } while (g_stat (name, &st) == 0 && retry<3);
+ } while (g_stat (name, &st) == 0 && retry < 3);
/* I dont know what we're supposed to do if it fails to find a unique name?? */
@@ -390,7 +392,8 @@ static gchar *maildir_summary_next_uid_string (CamelFolderSummary *s)
}
static CamelMessageInfo *
-message_info_migrate (CamelFolderSummary *s, FILE *in)
+message_info_migrate (CamelFolderSummary *s,
+ FILE *in)
{
CamelMessageInfo *mi;
CamelMaildirSummary *mds = (CamelMaildirSummary *) s;
@@ -449,8 +452,8 @@ maildir_summary_load (CamelLocalSummary *cls,
/* map the filename -> uid */
uid = strchr (d->d_name, ':');
if (uid) {
- gint len = uid-d->d_name;
- uid = camel_mempool_alloc (pool, len+1);
+ gint len = uid - d->d_name;
+ uid = camel_mempool_alloc (pool, len + 1);
memcpy (uid, d->d_name, len);
uid[len] = 0;
g_hash_table_insert (mds->priv->load_map, uid, camel_mempool_strdup (pool, d->d_name));
@@ -486,7 +489,7 @@ camel_maildir_summary_add (CamelLocalSummary *cls,
d(printf("summarising: %s\n", name));
- fd = open (filename, O_RDONLY|O_LARGEFILE);
+ fd = open (filename, O_RDONLY | O_LARGEFILE);
if (fd == -1) {
g_warning ("Cannot summarise/index: %s: %s", filename, g_strerror (errno));
g_free (filename);
@@ -516,7 +519,9 @@ struct _remove_data {
};
static void
-remove_summary (gchar *key, CamelMessageInfo *info, struct _remove_data *rd)
+remove_summary (gchar *key,
+ CamelMessageInfo *info,
+ struct _remove_data *rd)
{
d(printf("removing message %s from summary\n", key));
if (rd->cls->index)
@@ -557,7 +562,7 @@ maildir_summary_check (CamelLocalSummary *cls,
cancellable, _("Checking folder consistency"));
/* scan the directory, check for mail files not in the index, or index entries that
- no longer exist */
+ * no longer exist */
dir = opendir (cur);
if (dir == NULL) {
g_set_error (
@@ -577,7 +582,7 @@ maildir_summary_check (CamelLocalSummary *cls,
camel_folder_summary_prepare_fetch_all (s, error);
count = camel_folder_summary_count (s);
forceindex = count == 0;
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
info = camel_folder_summary_index ((CamelFolderSummary *) cls, i);
if (info) {
g_hash_table_insert (left, (gchar *) camel_message_info_uid (info), info);
@@ -605,7 +610,7 @@ maildir_summary_check (CamelLocalSummary *cls,
/* map the filename -> uid */
uid = strchr (d->d_name, ':');
if (uid)
- uid = g_strndup (d->d_name, uid-d->d_name);
+ uid = g_strndup (d->d_name, uid - d->d_name);
else
uid = g_strdup (d->d_name);
@@ -744,15 +749,15 @@ maildir_summary_sync (CamelLocalSummary *cls,
camel_folder_summary_prepare_fetch_all ((CamelFolderSummary *) cls, error);
count = camel_folder_summary_count ((CamelFolderSummary *) cls);
- for (i=count-1;i>=0;i--) {
- camel_operation_progress (cancellable, (count-i)*100/count);
+ for (i = count - 1; i >= 0; i--) {
+ camel_operation_progress (cancellable, (count - i) * 100 / count);
info = camel_folder_summary_index ((CamelFolderSummary *) cls, i);
mdi = (CamelMaildirMessageInfo *) info;
if (mdi && (mdi->info.info.flags & CAMEL_MESSAGE_DELETED) && expunge) {
name = g_strdup_printf("%s/cur/%s", cls->folder_path, camel_maildir_info_filename(mdi));
d(printf("deleting %s\n", name));
- if (unlink (name) == 0 || errno==ENOENT) {
+ if (unlink (name) == 0 || errno == ENOENT) {
/* FIXME: put this in folder_summary::remove()? */
if (cls->index)
@@ -779,8 +784,8 @@ maildir_summary_sync (CamelLocalSummary *cls,
g_free (newname);
} else {
/* TODO: If this is made mt-safe, then this code could be a problem, since
- the estrv is being modified.
- Sigh, this may mean the maildir name has to be cached another way */
+ * the estrv is being modified.
+ * Sigh, this may mean the maildir name has to be cached another way */
g_free (mdi->filename);
mdi->filename = newname;
}
diff --git a/camel/providers/local/camel-mbox-folder.c b/camel/providers/local/camel-mbox-folder.c
index 5180b08..f31fcfc 100644
--- a/camel/providers/local/camel-mbox-folder.c
+++ b/camel/providers/local/camel-mbox-folder.c
@@ -192,7 +192,7 @@ mbox_folder_append_message_sync (CamelFolder *folder,
if (xev) {
/* the x-ev header should match the 'current' flags, no problem, so store as much */
camel_medium_set_header((CamelMedium *)message, "X-Evolution", xev);
- mi->flags &= ~ CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_FLAGGED;
+ mi->flags &= ~ CAMEL_MESSAGE_FOLDER_NOXEV | CAMEL_MESSAGE_FOLDER_FLAGGED;
g_free (xev);
}
#endif
@@ -335,9 +335,9 @@ retry:
camel_message_info_free ((CamelMessageInfo *) info);
/* we use an fd instead of a normal stream here - the reason is subtle, camel_mime_part will cache
- the whole message in memory if the stream is non-seekable (which it is when built from a parser
- with no stream). This means we dont have to lock the mbox for the life of the message, but only
- while it is being created. */
+ * the whole message in memory if the stream is non-seekable (which it is when built from a parser
+ * with no stream). This means we dont have to lock the mbox for the life of the message, but only
+ * while it is being created. */
fd = g_open (lf->folder_path, O_LARGEFILE | O_RDONLY | O_BINARY, 0);
if (fd == -1) {
@@ -428,7 +428,7 @@ mbox_folder_lock (CamelLocalFolder *lf,
/* make sure we have matching unlocks for locks, camel-local-folder class should enforce this */
g_assert (mf->lockfd == -1);
- mf->lockfd = open (lf->folder_path, O_RDWR|O_LARGEFILE, 0);
+ mf->lockfd = open (lf->folder_path, O_RDWR | O_LARGEFILE, 0);
if (mf->lockfd == -1) {
g_set_error (
error, G_IO_ERROR,
diff --git a/camel/providers/local/camel-mbox-store.c b/camel/providers/local/camel-mbox-store.c
index 01f37c0..f08ce83 100644
--- a/camel/providers/local/camel-mbox-store.c
+++ b/camel/providers/local/camel-mbox-store.c
@@ -59,7 +59,8 @@ inode_hash (gconstpointer d)
}
static gboolean
-inode_equal (gconstpointer a, gconstpointer b)
+inode_equal (gconstpointer a,
+ gconstpointer b)
{
const struct _inode *v1 = a, *v2 = b;
@@ -67,19 +68,22 @@ inode_equal (gconstpointer a, gconstpointer b)
}
static void
-inode_free (gpointer k, gpointer v, gpointer d)
+inode_free (gpointer k,
+ gpointer v,
+ gpointer d)
{
g_free (k);
}
static gboolean
-ignore_file (const gchar *filename, gboolean sbd)
+ignore_file (const gchar *filename,
+ gboolean sbd)
{
gint flen, len, i;
/* TODO: Should probably just be 1 regex */
flen = strlen (filename);
- if (flen > 0 && filename[flen-1] == '~')
+ if (flen > 0 && filename[flen - 1] == '~')
return TRUE;
for (i = 0; i < G_N_ELEMENTS (extensions); i++) {
@@ -264,7 +268,11 @@ scan_dir (CamelStore *store,
}
static gint
-xrename (CamelStore *store, const gchar *old_name, const gchar *new_name, const gchar *ext, gboolean missingok)
+xrename (CamelStore *store,
+ const gchar *old_name,
+ const gchar *new_name,
+ const gchar *ext,
+ gboolean missingok)
{
CamelLocalStore *ls = (CamelLocalStore *) store;
gchar *oldpath, *newpath;
diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c
index 0816ed2..ae6f08e 100644
--- a/camel/providers/local/camel-mbox-summary.c
+++ b/camel/providers/local/camel-mbox-summary.c
@@ -79,7 +79,9 @@ static guint32 decode_status (const gchar *status);
G_DEFINE_TYPE (CamelMboxSummary, camel_mbox_summary, CAMEL_TYPE_LOCAL_SUMMARY)
static gboolean
-mbox_info_set_user_flag (CamelMessageInfo *mi, const gchar *name, gboolean value)
+mbox_info_set_user_flag (CamelMessageInfo *mi,
+ const gchar *name,
+ gboolean value)
{
gint res;
@@ -91,7 +93,9 @@ mbox_info_set_user_flag (CamelMessageInfo *mi, const gchar *name, gboolean value
}
static gboolean
-mbox_info_set_user_tag (CamelMessageInfo *mi, const gchar *name, const gchar *value)
+mbox_info_set_user_tag (CamelMessageInfo *mi,
+ const gchar *name,
+ const gchar *value)
{
gint res;
@@ -110,9 +114,9 @@ mbox_info_set_flags (CamelMessageInfo *mi,
{
/* Basically, if anything could change the Status line, presume it does */
if (((CamelMboxSummary *) mi->summary)->xstatus
- && (flags & (CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_FLAGGED|CAMEL_MESSAGE_ANSWERED|CAMEL_MESSAGE_DELETED))) {
- flags |= CAMEL_MESSAGE_FOLDER_XEVCHANGE|CAMEL_MESSAGE_FOLDER_FLAGGED;
- set |= CAMEL_MESSAGE_FOLDER_XEVCHANGE|CAMEL_MESSAGE_FOLDER_FLAGGED;
+ && (flags & (CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_FLAGGED | CAMEL_MESSAGE_ANSWERED | CAMEL_MESSAGE_DELETED))) {
+ flags |= CAMEL_MESSAGE_FOLDER_XEVCHANGE | CAMEL_MESSAGE_FOLDER_FLAGGED;
+ set |= CAMEL_MESSAGE_FOLDER_XEVCHANGE | CAMEL_MESSAGE_FOLDER_FLAGGED;
}
return CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->
@@ -175,7 +179,10 @@ camel_mbox_summary_init (CamelMboxSummary *mbox_summary)
* Returns: A new CamelMboxSummary widget.
**/
CamelMboxSummary *
-camel_mbox_summary_new (struct _CamelFolder *folder, const gchar *filename, const gchar *mbox_name, CamelIndex *index)
+camel_mbox_summary_new (CamelFolder *folder,
+ const gchar *filename,
+ const gchar *mbox_name,
+ CamelIndex *index)
{
CamelMboxSummary *new;
@@ -203,7 +210,8 @@ void camel_mbox_summary_xstatus (CamelMboxSummary *mbs, gint state)
}
static gchar *
-mbox_summary_encode_x_evolution (CamelLocalSummary *cls, const CamelLocalMessageInfo *mi)
+mbox_summary_encode_x_evolution (CamelLocalSummary *cls,
+ const CamelLocalMessageInfo *mi)
{
const gchar *p, *uidstr;
guint32 uid;
@@ -221,7 +229,8 @@ mbox_summary_encode_x_evolution (CamelLocalSummary *cls, const CamelLocalMessage
}
static gint
-summary_header_from_db (CamelFolderSummary *s, struct _CamelFIRecord *fir)
+summary_header_from_db (CamelFolderSummary *s,
+ struct _CamelFIRecord *fir)
{
CamelMboxSummary *mbs = CAMEL_MBOX_SUMMARY (s);
gchar *part;
@@ -238,7 +247,8 @@ summary_header_from_db (CamelFolderSummary *s, struct _CamelFIRecord *fir)
}
static gint
-summary_header_load (CamelFolderSummary *s, FILE *in)
+summary_header_load (CamelFolderSummary *s,
+ FILE *in)
{
CamelMboxSummary *mbs = CAMEL_MBOX_SUMMARY (s);
@@ -258,7 +268,8 @@ summary_header_load (CamelFolderSummary *s, FILE *in)
}
static CamelFIRecord *
-summary_header_to_db (CamelFolderSummary *s, GError **error)
+summary_header_to_db (CamelFolderSummary *s,
+ GError **error)
{
CamelFolderSummaryClass *folder_summary_class;
CamelMboxSummary *mbs = CAMEL_MBOX_SUMMARY (s);
@@ -278,7 +289,8 @@ summary_header_to_db (CamelFolderSummary *s, GError **error)
}
static gint
-summary_header_save (CamelFolderSummary *s, FILE *out)
+summary_header_save (CamelFolderSummary *s,
+ FILE *out)
{
CamelMboxSummary *mbs = CAMEL_MBOX_SUMMARY (s);
@@ -291,7 +303,8 @@ summary_header_save (CamelFolderSummary *s, FILE *out)
}
static CamelMessageInfo *
-message_info_new_from_header (CamelFolderSummary *s, struct _camel_header_raw *h)
+message_info_new_from_header (CamelFolderSummary *s,
+ struct _camel_header_raw *h)
{
CamelMboxMessageInfo *mi;
CamelMboxSummary *mbs = (CamelMboxSummary *) s;
@@ -372,7 +385,8 @@ message_info_new_from_header (CamelFolderSummary *s, struct _camel_header_raw *h
}
static CamelMessageInfo *
-message_info_new_from_parser (CamelFolderSummary *s, CamelMimeParser *mp)
+message_info_new_from_parser (CamelFolderSummary *s,
+ CamelMimeParser *mp)
{
CamelMessageInfo *mi;
@@ -387,7 +401,8 @@ message_info_new_from_parser (CamelFolderSummary *s, CamelMimeParser *mp)
}
static CamelMessageInfo *
-message_info_from_db (CamelFolderSummary *s, struct _CamelMIRecord *mir)
+message_info_from_db (CamelFolderSummary *s,
+ struct _CamelMIRecord *mir)
{
CamelMessageInfo *mi;
@@ -405,7 +420,8 @@ message_info_from_db (CamelFolderSummary *s, struct _CamelMIRecord *mir)
}
static CamelMessageInfo *
-message_info_migrate (CamelFolderSummary *s, FILE *in)
+message_info_migrate (CamelFolderSummary *s,
+ FILE *in)
{
CamelMessageInfo *mi;
@@ -429,7 +445,8 @@ error:
}
static struct _CamelMIRecord *
-message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info)
+message_info_to_db (CamelFolderSummary *s,
+ CamelMessageInfo *info)
{
CamelMboxMessageInfo *mbi = (CamelMboxMessageInfo *) info;
struct _CamelMIRecord *mir;
@@ -502,11 +519,11 @@ summary_update (CamelLocalSummary *cls,
}
/* we mark messages as to whether we've seen them or not.
- If we're not starting from the start, we must be starting
- from the old end, so everything must be treated as new */
+ * If we're not starting from the start, we must be starting
+ * from the old end, so everything must be treated as new */
camel_folder_summary_prepare_fetch_all (s, NULL);
count = camel_folder_summary_count (s);
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
mi = (CamelMboxMessageInfo *) camel_folder_summary_index (s, i);
if (offset == 0)
mi->info.info.flags |= CAMEL_MESSAGE_FOLDER_NOTSEEN;
@@ -549,7 +566,7 @@ summary_update (CamelLocalSummary *cls,
g_object_unref (mp);
count = camel_folder_summary_count (s);
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
mi = (CamelMboxMessageInfo *) camel_folder_summary_index (s, i);
/* must've dissapeared from the file? */
if (!mi || mi->info.info.flags & CAMEL_MESSAGE_FOLDER_NOTSEEN) {
@@ -639,7 +656,7 @@ mbox_summary_check (CamelLocalSummary *cls,
d(printf("Empty mbox, clearing summary\n"));
camel_folder_summary_prepare_fetch_all (s, NULL);
count= camel_folder_summary_count (s);
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
CamelMessageInfo *info = camel_folder_summary_index (s, i);
if (info) {
@@ -692,7 +709,7 @@ mbox_summary_sync_full (CamelMboxSummary *mbs,
CamelFolderSummary *s = CAMEL_FOLDER_SUMMARY (mbs);
gint fd = -1, fdout = -1;
gchar *tmpname = NULL;
- guint32 flags = (expunge?1:0), filemode = 0600;
+ guint32 flags = (expunge ? 1 : 0), filemode = 0600;
struct stat st;
d(printf("performing full summary/sync\n"));
@@ -759,7 +776,7 @@ mbox_summary_sync_full (CamelMboxSummary *mbs,
}
/* this should probably either use unlink/link/unlink, or recopy over
- the original mailbox, for various locking reasons/etc */
+ * the original mailbox, for various locking reasons/etc */
#ifdef G_OS_WIN32
if (g_file_test (cls->folder_path,G_FILE_TEST_IS_REGULAR) && g_remove (cls->folder_path) == -1)
g_warning ("Cannot remove %s: %s", cls->folder_path, g_strerror (errno));
@@ -796,7 +813,9 @@ mbox_summary_sync_full (CamelMboxSummary *mbs,
}
static gint
-cms_sort_frompos (gpointer a, gpointer b, gpointer data)
+cms_sort_frompos (gpointer a,
+ gpointer b,
+ gpointer data)
{
CamelFolderSummary *summary = (CamelFolderSummary *) data;
CamelMboxMessageInfo *info1, *info2;
@@ -844,7 +863,7 @@ mbox_summary_sync_quick (CamelMboxSummary *mbs,
camel_operation_push_message (cancellable, _("Storing folder"));
camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
- fd = g_open (cls->folder_path, O_LARGEFILE|O_RDWR|O_BINARY, 0);
+ fd = g_open (cls->folder_path, O_LARGEFILE | O_RDWR | O_BINARY, 0);
if (fd == -1) {
camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
g_set_error (
@@ -882,7 +901,7 @@ mbox_summary_sync_quick (CamelMboxSummary *mbs,
for (i = 0; i < summary->len; i++) {
gint xevoffset;
- gint pc = (i+1)*100/summary->len;
+ gint pc = (i + 1) * 100 / summary->len;
camel_operation_progress (cancellable, pc);
@@ -928,11 +947,11 @@ mbox_summary_sync_quick (CamelMboxSummary *mbs,
}
xevnew = camel_local_summary_encode_x_evolution (cls, &info->info);
/* SIGH: encode_param_list is about the only function which folds headers by itself.
- This should be fixed somehow differently (either parser doesn't fold headers,
- or param_list doesn't, or something */
+ * This should be fixed somehow differently (either parser doesn't fold headers,
+ * or param_list doesn't, or something */
xevtmp = camel_header_unfold (xevnew);
/* the raw header contains a leading ' ', so (dis)count that too */
- if (strlen (xev)-1 != strlen (xevtmp)) {
+ if (strlen (xev) - 1 != strlen (xevtmp)) {
g_free (xevnew);
g_free (xevtmp);
g_warning("Hmm, the xev headers shouldn't have changed size, but they did");
@@ -1009,7 +1028,7 @@ mbox_summary_sync (CamelLocalSummary *cls,
CamelStore *parent_store;
const gchar *full_name;
gint i;
- gint quick = TRUE, work=FALSE;
+ gint quick = TRUE, work = FALSE;
gint ret;
GPtrArray *summary = NULL;
@@ -1027,11 +1046,11 @@ mbox_summary_sync (CamelLocalSummary *cls,
/* Sync only the changes */
summary = camel_folder_summary_get_changed ((CamelFolderSummary *) mbs);
- for (i=0; i<summary->len; i++) {
+ for (i = 0; i < summary->len; i++) {
CamelMboxMessageInfo *info = (CamelMboxMessageInfo *) camel_folder_summary_uid (s, summary->pdata[i]);
if ((expunge && (info->info.info.flags & CAMEL_MESSAGE_DELETED)) ||
- (info->info.info.flags & (CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_XEVCHANGE)))
+ (info->info.info.flags & (CAMEL_MESSAGE_FOLDER_NOXEV | CAMEL_MESSAGE_FOLDER_XEVCHANGE)))
quick = FALSE;
else
work |= (info->info.info.flags & CAMEL_MESSAGE_FOLDER_FLAGGED) != 0;
@@ -1115,7 +1134,7 @@ camel_mbox_summary_sync_mbox (CamelMboxSummary *cls,
const gchar *fromline;
gint lastdel = FALSE;
gboolean touched = FALSE;
- GSList *del=NULL;
+ GSList *del = NULL;
#ifdef STATUS_PINE
gchar statnew[8], xstatnew[8];
#endif
@@ -1206,7 +1225,7 @@ camel_mbox_summary_sync_mbox (CamelMboxSummary *cls,
} else {
/* otherwise, the message is staying, copy its From_ line across */
#if 0
- if (i>0)
+ if (i > 0)
write(fdout, "\n", 1);
#endif
info->frompos = lseek (fdout, 0, SEEK_CUR);
@@ -1299,10 +1318,10 @@ camel_mbox_summary_sync_mbox (CamelMboxSummary *cls,
g_object_unref (mp);
/* clear working flags */
- for (i=0; i<count; i++) {
+ for (i = 0; i < count; i++) {
info = (CamelMboxMessageInfo *) camel_folder_summary_index (s, i);
if (info) {
- if (info->info.info.flags & (CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_FLAGGED|CAMEL_MESSAGE_FOLDER_XEVCHANGE)) {
+ if (info->info.info.flags & (CAMEL_MESSAGE_FOLDER_NOXEV | CAMEL_MESSAGE_FOLDER_FLAGGED | CAMEL_MESSAGE_FOLDER_XEVCHANGE)) {
info->info.info.flags &= ~(CAMEL_MESSAGE_FOLDER_NOXEV
|CAMEL_MESSAGE_FOLDER_FLAGGED
|CAMEL_MESSAGE_FOLDER_XEVCHANGE);
@@ -1372,7 +1391,8 @@ static struct {
};
static void
-encode_status (guint32 flags, gchar status[8])
+encode_status (guint32 flags,
+ gchar status[8])
{
gsize i;
gchar *p;
diff --git a/camel/providers/local/camel-mh-folder.c b/camel/providers/local/camel-mh-folder.c
index 757d6c4..f8b6286 100644
--- a/camel/providers/local/camel-mh-folder.c
+++ b/camel/providers/local/camel-mh-folder.c
@@ -86,7 +86,7 @@ mh_folder_append_message_sync (CamelFolder *folder,
/* write it out, use the uid we got from the summary */
name = g_strdup_printf("%s/%s", lf->folder_path, camel_message_info_uid(mi));
output_stream = camel_stream_fs_new_with_name (
- name, O_WRONLY|O_CREAT, 0600, error);
+ name, O_WRONLY | O_CREAT, 0600, error);
if (output_stream == NULL)
goto fail_write;
diff --git a/camel/providers/local/camel-mh-store.c b/camel/providers/local/camel-mh-store.c
index 0ef3215..0f3baab 100644
--- a/camel/providers/local/camel-mh-store.c
+++ b/camel/providers/local/camel-mh-store.c
@@ -67,7 +67,7 @@ folders_update (const gchar *root,
sprintf (tmpnew, "%s.folders~", root);
out = camel_stream_fs_new_with_name (
- tmpnew, O_WRONLY|O_CREAT|O_TRUNC, 0666, NULL);
+ tmpnew, O_WRONLY | O_CREAT | O_TRUNC, 0666, NULL);
if (out == NULL)
goto fail;
@@ -103,7 +103,7 @@ folders_update (const gchar *root,
if (strncmp (line, folder, flen) == 0
&& (line[flen] == 0 || line[flen] == '/')) {
if (camel_stream_write (out, new, strlen (new), cancellable, NULL) == -1
- || camel_stream_write (out, line+flen, strlen (line)-flen, cancellable, NULL) == -1
+ || camel_stream_write (out, line + flen, strlen (line) - flen, cancellable, NULL) == -1
|| camel_stream_write(out, "\n", 1, cancellable, NULL) == -1)
goto fail;
copy = FALSE;
@@ -208,8 +208,8 @@ fill_fi (CamelStore *store,
/* This should be fast enough not to have to test for INFO_FAST */
/* We could: if we have no folder, and FAST isn't specified, perform a full
- scan of all messages for their status flags. But its probably not worth
- it as we need to read the top of every file, i.e. very very slow */
+ * scan of all messages for their status flags. But its probably not worth
+ * it as we need to read the top of every file, i.e. very very slow */
root = camel_local_store_get_toplevel_dir (local_store);
path = g_strdup_printf (
@@ -252,7 +252,7 @@ folder_info_new (CamelStore *store,
/* Build the folder info structure. */
fi = camel_folder_info_new ();
fi->full_name = g_strdup (path);
- fi->display_name = g_strdup (base?base+1:path);
+ fi->display_name = g_strdup (base ? base + 1 : path);
fill_fi (store, fi, flags, cancellable);
return fi;
@@ -388,15 +388,15 @@ folders_scan (CamelStore *store,
/* Check for invalidly long lines,
* we abort everything and fallback. */
- if (line[len-1] != '\n') {
+ if (line[len - 1] != '\n') {
gint i;
- for (i=0;i<folders->len;i++)
+ for (i = 0; i < folders->len; i++)
camel_folder_info_free (folders->pdata[i]);
g_ptr_array_set_size (folders, 0);
break;
}
- line[len-1] = 0;
+ line[len - 1] = 0;
/* check for \r ? */
@@ -411,7 +411,7 @@ folders_scan (CamelStore *store,
/* check is not sub-subdir if not recursive */
if ((flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) == 0
&& (tmp = strrchr (line, '/'))
- && tmp > line+toplen)
+ && tmp > line + toplen)
continue;
}
@@ -450,7 +450,8 @@ inode_hash (gconstpointer d)
}
static gboolean
-inode_equal (gconstpointer a, gconstpointer b)
+inode_equal (gconstpointer a,
+ gconstpointer b)
{
const struct _inode *v1 = a, *v2 = b;
@@ -458,7 +459,9 @@ inode_equal (gconstpointer a, gconstpointer b)
}
static void
-inode_free (gpointer k, gpointer v, gpointer d)
+inode_free (gpointer k,
+ gpointer v,
+ gpointer d)
{
g_free (k);
}
diff --git a/camel/providers/local/camel-mh-summary.c b/camel/providers/local/camel-mh-summary.c
index fd556fe..ada6ee5 100644
--- a/camel/providers/local/camel-mh-summary.c
+++ b/camel/providers/local/camel-mh-summary.c
@@ -127,7 +127,7 @@ mh_summary_next_uid_string (CamelFolderSummary *s)
if (mhs->priv->current_uid) {
uidstr = g_strdup (mhs->priv->current_uid);
/* tell the summary of this, so we always append numbers to the end */
- camel_folder_summary_set_uid (s, strtoul (uidstr, NULL, 10)+1);
+ camel_folder_summary_set_uid (s, strtoul (uidstr, NULL, 10) + 1);
} else {
/* else scan for one - and create it too, to make sure */
do {
@@ -136,7 +136,7 @@ mh_summary_next_uid_string (CamelFolderSummary *s)
uid = camel_folder_summary_next_uid (s);
name = g_strdup_printf("%s/%u", cls->folder_path, uid);
/* O_EXCL isn't guaranteed, sigh. Oh well, bad luck, mh has problems anyway */
- fd = open (name, O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0600);
+ fd = open (name, O_WRONLY | O_CREAT | O_EXCL | O_LARGEFILE, 0600);
g_free (name);
} while (fd == -1 && errno == EEXIST);
@@ -162,7 +162,7 @@ camel_mh_summary_add (CamelLocalSummary *cls,
d(printf("summarising: %s\n", name));
- fd = open (filename, O_RDONLY|O_LARGEFILE);
+ fd = open (filename, O_RDONLY | O_LARGEFILE);
if (fd == -1) {
g_warning ("Cannot summarise/index: %s: %s", filename, g_strerror (errno));
g_free (filename);
@@ -218,7 +218,7 @@ mh_summary_check (CamelLocalSummary *cls,
d(printf("checking summary ...\n"));
/* scan the directory, check for mail files not in the index, or index entries that
- no longer exist */
+ * no longer exist */
dir = opendir (cls->folder_path);
if (dir == NULL) {
g_set_error (
@@ -234,7 +234,7 @@ mh_summary_check (CamelLocalSummary *cls,
camel_folder_summary_prepare_fetch_all ((CamelFolderSummary *) cls, error);
count = camel_folder_summary_count ((CamelFolderSummary *) cls);
forceindex = count == 0;
- for (i=0;i<count;i++) {
+ for (i = 0; i < count; i++) {
info = camel_folder_summary_index ((CamelFolderSummary *) cls, i);
if (info) {
g_hash_table_insert (left, (gchar *) camel_message_info_uid (info), info);
@@ -248,7 +248,7 @@ mh_summary_check (CamelLocalSummary *cls,
if (!isdigit (c))
break;
}
- if (c==0) {
+ if (c == 0) {
info = camel_folder_summary_uid ((CamelFolderSummary *) cls, d->d_name);
if (info == NULL || (cls->index && (!camel_index_has_name (cls->index, d->d_name)))) {
/* need to add this file to the summary */
@@ -298,7 +298,7 @@ mh_summary_sync (CamelLocalSummary *cls,
d(printf("summary_sync(expunge=%s)\n", expunge?"true":"false"));
/* we could probably get away without this ... but why not use it, esp if we're going to
- be doing any significant io already */
+ * be doing any significant io already */
if (camel_local_summary_check (cls, changes, cancellable, error) == -1)
return -1;
@@ -306,14 +306,14 @@ mh_summary_sync (CamelLocalSummary *cls,
camel_folder_summary_prepare_fetch_all ((CamelFolderSummary *) cls, error);
count = camel_folder_summary_count ((CamelFolderSummary *) cls);
- for (i=count-1;i>=0;i--) {
+ for (i = count - 1; i >= 0; i--) {
info = (CamelLocalMessageInfo *) camel_folder_summary_index ((CamelFolderSummary *) cls, i);
g_assert (info);
if (expunge && (info->info.flags & CAMEL_MESSAGE_DELETED)) {
uid = camel_message_info_uid (info);
name = g_strdup_printf("%s/%s", cls->folder_path, uid);
d(printf("deleting %s\n", name));
- if (unlink (name) == 0 || errno==ENOENT) {
+ if (unlink (name) == 0 || errno == ENOENT) {
/* FIXME: put this in folder_summary::remove()? */
if (cls->index)
@@ -323,7 +323,7 @@ mh_summary_sync (CamelLocalSummary *cls,
camel_folder_summary_remove ((CamelFolderSummary *) cls, (CamelMessageInfo *) info);
}
g_free (name);
- } else if (info->info.flags & (CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_FLAGGED)) {
+ } else if (info->info.flags & (CAMEL_MESSAGE_FOLDER_NOXEV | CAMEL_MESSAGE_FOLDER_FLAGGED)) {
info->info.flags &= 0xffff;
}
camel_message_info_free (info);
diff --git a/camel/providers/local/camel-spool-folder.c b/camel/providers/local/camel-spool-folder.c
index 8125a22..b24c65b 100644
--- a/camel/providers/local/camel-spool-folder.c
+++ b/camel/providers/local/camel-spool-folder.c
@@ -63,7 +63,7 @@ spool_folder_lock (CamelLocalFolder *lf,
CamelSpoolFolder *sf = (CamelSpoolFolder *) lf;
GError *local_error = NULL;
- mf->lockfd = open (lf->folder_path, O_RDWR|O_LARGEFILE, 0);
+ mf->lockfd = open (lf->folder_path, O_RDWR | O_LARGEFILE, 0);
if (mf->lockfd == -1) {
g_set_error (
error, G_IO_ERROR,
diff --git a/camel/providers/local/camel-spool-store.c b/camel/providers/local/camel-spool-store.c
index 14589e4..e714b05 100644
--- a/camel/providers/local/camel-spool-store.c
+++ b/camel/providers/local/camel-spool-store.c
@@ -267,7 +267,8 @@ inode_hash (gconstpointer d)
}
static gboolean
-inode_equal (gconstpointer a, gconstpointer b)
+inode_equal (gconstpointer a,
+ gconstpointer b)
{
const struct _inode *v1 = a, *v2 = b;
@@ -275,7 +276,9 @@ inode_equal (gconstpointer a, gconstpointer b)
}
static void
-inode_free (gpointer k, gpointer v, gpointer d)
+inode_free (gpointer k,
+ gpointer v,
+ gpointer d)
{
g_free (k);
}
diff --git a/camel/providers/local/camel-spool-summary.c b/camel/providers/local/camel-spool-summary.c
index f8587b3..3d5f6ad 100644
--- a/camel/providers/local/camel-spool-summary.c
+++ b/camel/providers/local/camel-spool-summary.c
@@ -124,13 +124,13 @@ spool_summary_sync_full (CamelMboxSummary *cls,
goffset spoollen, outlen;
gint size, sizeout;
struct stat st;
- guint32 flags = (expunge?1:0);
+ guint32 flags = (expunge ? 1 : 0);
d(printf("performing full summary/sync\n"));
camel_operation_push_message (cancellable, _("Storing folder"));
- fd = open (((CamelLocalSummary *) cls)->folder_path, O_RDWR|O_LARGEFILE);
+ fd = open (((CamelLocalSummary *) cls)->folder_path, O_RDWR | O_LARGEFILE);
if (fd == -1) {
g_set_error (
error, G_IO_ERROR,
@@ -198,8 +198,8 @@ spool_summary_sync_full (CamelMboxSummary *cls,
outlen = st.st_size;
/* I think this is the right way to do this - checking that the file will fit the new data */
- if (outlen>0
- && (lseek (fd, outlen-1, SEEK_SET) == -1
+ if (outlen > 0
+ && (lseek (fd, outlen - 1, SEEK_SET) == -1
|| write(fd, "", 1) != 1
|| fsync (fd) == -1
|| lseek (fd, 0, SEEK_SET) == -1
@@ -219,7 +219,7 @@ spool_summary_sync_full (CamelMboxSummary *cls,
/* now copy content back */
buffer = g_malloc (8192);
size = 1;
- while (size>0) {
+ while (size > 0) {
do {
size = read (fdout, buffer, 8192);
} while (size == -1 && errno == EINTR);
@@ -321,7 +321,7 @@ spool_summary_check (CamelLocalSummary *cls,
work = FALSE;
camel_folder_summary_prepare_fetch_all (s, error);
count = camel_folder_summary_count (s);
- for (i=0;!work && i<count; i++) {
+ for (i = 0; !work && i < count; i++) {
CamelMboxMessageInfo *info = (CamelMboxMessageInfo *) camel_folder_summary_index (s, i);
g_assert (info);
work = (info->info.info.flags & (CAMEL_MESSAGE_FOLDER_NOXEV)) != 0;
@@ -353,6 +353,7 @@ spool_summary_check (CamelLocalSummary *cls,
}
static gint
-spool_summary_need_index (void) {
+spool_summary_need_index (void)
+{
return 0;
}
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c
index cf18c97..76dc0d1 100644
--- a/camel/providers/nntp/camel-nntp-folder.c
+++ b/camel/providers/nntp/camel-nntp-folder.c
@@ -115,7 +115,7 @@ nntp_folder_refresh_info_online (CamelFolder *folder,
camel_service_lock (CAMEL_SERVICE (nntp_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
/* When invoked with no fmt, camel_nntp_command() just selects the folder
- and should return zero. */
+ * and should return zero. */
success = !camel_nntp_command (
nntp_store, cancellable, error, nntp_folder, &line, NULL);
@@ -135,7 +135,8 @@ nntp_folder_refresh_info_online (CamelFolder *folder,
}
static void
-unset_flagged_flag (const gchar *uid, CamelFolderSummary *summary)
+unset_flagged_flag (const gchar *uid,
+ CamelFolderSummary *summary)
{
CamelMessageInfo *info;
@@ -153,7 +154,8 @@ unset_flagged_flag (const gchar *uid, CamelFolderSummary *summary)
}
static gboolean
-nntp_folder_sync (CamelFolder *folder, GError **error)
+nntp_folder_sync (CamelFolder *folder,
+ GError **error)
{
CamelStore *parent_store;
GPtrArray *changed;
@@ -177,19 +179,23 @@ nntp_folder_sync (CamelFolder *folder, GError **error)
}
static gboolean
-nntp_folder_sync_online (CamelFolder *folder, GError **error)
+nntp_folder_sync_online (CamelFolder *folder,
+ GError **error)
{
return nntp_folder_sync (folder, error);
}
static gboolean
-nntp_folder_sync_offline (CamelFolder *folder, GError **error)
+nntp_folder_sync_offline (CamelFolder *folder,
+ GError **error)
{
return nntp_folder_sync (folder, error);
}
static gchar *
-nntp_get_filename (CamelFolder *folder, const gchar *uid, GError **error)
+nntp_get_filename (CamelFolder *folder,
+ const gchar *uid,
+ GError **error)
{
CamelStore *parent_store;
CamelNNTPStore *nntp_store;
@@ -198,7 +204,7 @@ nntp_get_filename (CamelFolder *folder, const gchar *uid, GError **error)
parent_store = camel_folder_get_parent_store (folder);
nntp_store = CAMEL_NNTP_STORE (parent_store);
- article = alloca (strlen (uid)+1);
+ article = alloca (strlen (uid) + 1);
strcpy (article, uid);
msgid = strchr (article, ',');
if (msgid == NULL) {
@@ -287,7 +293,7 @@ nntp_folder_cache_message (CamelDiscoFolder *disco_folder,
parent_store = camel_folder_get_parent_store (folder);
nntp_store = CAMEL_NNTP_STORE (parent_store);
- article = alloca (strlen (uid)+1);
+ article = alloca (strlen (uid) + 1);
strcpy (article, uid);
msgid = strchr (article, ',');
if (!msgid) {
@@ -312,8 +318,10 @@ nntp_folder_cache_message (CamelDiscoFolder *disco_folder,
return success;
}
-static GPtrArray*
-nntp_folder_search_by_expression (CamelFolder *folder, const gchar *expression, GError **error)
+static GPtrArray *
+nntp_folder_search_by_expression (CamelFolder *folder,
+ const gchar *expression,
+ GError **error)
{
CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (folder);
GPtrArray *matches;
@@ -332,7 +340,9 @@ nntp_folder_search_by_expression (CamelFolder *folder, const gchar *expression,
}
static guint32
-nntp_folder_count_by_expression (CamelFolder *folder, const gchar *expression, GError **error)
+nntp_folder_count_by_expression (CamelFolder *folder,
+ const gchar *expression,
+ GError **error)
{
CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (folder);
guint32 count;
@@ -351,7 +361,10 @@ nntp_folder_count_by_expression (CamelFolder *folder, const gchar *expression, G
}
static GPtrArray *
-nntp_folder_search_by_uids (CamelFolder *folder, const gchar *expression, GPtrArray *uids, GError **error)
+nntp_folder_search_by_uids (CamelFolder *folder,
+ const gchar *expression,
+ GPtrArray *uids,
+ GError **error)
{
CamelNNTPFolder *nntp_folder = (CamelNNTPFolder *) folder;
GPtrArray *matches;
@@ -373,7 +386,8 @@ nntp_folder_search_by_uids (CamelFolder *folder, const gchar *expression, GPtrAr
}
static void
-nntp_folder_search_free (CamelFolder *folder, GPtrArray *result)
+nntp_folder_search_free (CamelFolder *folder,
+ GPtrArray *result)
{
CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (folder);
@@ -401,7 +415,7 @@ nntp_folder_get_message_sync (CamelFolder *folder,
nntp_folder = CAMEL_NNTP_FOLDER (folder);
nntp_store = CAMEL_NNTP_STORE (parent_store);
- article = alloca (strlen (uid)+1);
+ article = alloca (strlen (uid) + 1);
strcpy (article, uid);
msgid = strchr (article, ',');
if (msgid == NULL) {
@@ -538,7 +552,7 @@ nntp_folder_append_message_online (CamelFolder *folder,
|| camel_data_wrapper_write_to_stream_sync (CAMEL_DATA_WRAPPER (mime_message), filtered_stream, cancellable, error) == -1
|| camel_stream_flush (filtered_stream, cancellable, error) == -1
|| camel_stream_write (stream, "\r\n.\r\n", 5, cancellable, error) == -1
- || camel_nntp_stream_line (nntp_store->stream, (guchar **)&line, &u, cancellable, error) == -1) {
+ || camel_nntp_stream_line (nntp_store->stream, (guchar **) &line, &u, cancellable, error) == -1) {
g_prefix_error (error, _("Posting failed: "));
success = FALSE;
} else if (atoi (line) != 240) {
@@ -574,8 +588,8 @@ nntp_folder_append_message_offline (CamelFolder *folder,
}
/* I do not know what to do this exactly. Looking at the IMAP implementation for this, it
- seems to assume the message is copied to a folder on the same store. In that case, an
- NNTP implementation doesn't seem to make any sense. */
+ * seems to assume the message is copied to a folder on the same store. In that case, an
+ * NNTP implementation doesn't seem to make any sense. */
static gboolean
nntp_folder_transfer_message (CamelFolder *source,
GPtrArray *uids,
@@ -594,7 +608,9 @@ nntp_folder_transfer_message (CamelFolder *source,
}
static gboolean
-nntp_folder_expunge_uids_offline (CamelFolder *folder, GPtrArray *uids, GError **error)
+nntp_folder_expunge_uids_offline (CamelFolder *folder,
+ GPtrArray *uids,
+ GError **error)
{
CamelFolderChangeInfo *changes;
gint ii;
@@ -710,10 +726,10 @@ camel_nntp_folder_new (CamelStore *parent,
camel_folder_summary_load_from_db (folder->summary, NULL);
- si = camel_store_summary_path ((CamelStoreSummary *) ((CamelNNTPStore*) parent)->summary, folder_name);
+ si = camel_store_summary_path ((CamelStoreSummary *) ((CamelNNTPStore *) parent)->summary, folder_name);
if (si) {
subscribed = (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) != 0;
- camel_store_summary_info_free ((CamelStoreSummary *) ((CamelNNTPStore*) parent)->summary, si);
+ camel_store_summary_info_free ((CamelStoreSummary *) ((CamelNNTPStore *) parent)->summary, si);
}
if (subscribed && !camel_folder_refresh_info_sync (
diff --git a/camel/providers/nntp/camel-nntp-private.h b/camel/providers/nntp/camel-nntp-private.h
index 0139b87..1ed654c 100644
--- a/camel/providers/nntp/camel-nntp-private.h
+++ b/camel/providers/nntp/camel-nntp-private.h
@@ -24,7 +24,7 @@
#define CAMEL_NNTP_PRIVATE_H
/* need a way to configure and save this data, if this header is to
- be installed. For now, dont install it */
+ * be installed. For now, dont install it */
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/camel/providers/nntp/camel-nntp-provider.c b/camel/providers/nntp/camel-nntp-provider.c
index c4c504d..f0d8997 100644
--- a/camel/providers/nntp/camel-nntp-provider.c
+++ b/camel/providers/nntp/camel-nntp-provider.c
@@ -100,7 +100,8 @@ camel_provider_module_init (void)
}
static void
-add_hash (guint *hash, gchar *s)
+add_hash (guint *hash,
+ gchar *s)
{
if (s)
*hash ^= g_str_hash(s);
@@ -120,7 +121,8 @@ nntp_url_hash (gconstpointer key)
}
static gint
-check_equal (gchar *s1, gchar *s2)
+check_equal (gchar *s1,
+ gchar *s2)
{
if (s1 == NULL) {
if (s2 == NULL)
@@ -136,7 +138,8 @@ check_equal (gchar *s1, gchar *s2)
}
static gint
-nntp_url_equal (gconstpointer a, gconstpointer b)
+nntp_url_equal (gconstpointer a,
+ gconstpointer b)
{
const CamelURL *u1 = a, *u2 = b;
diff --git a/camel/providers/nntp/camel-nntp-store-summary.c b/camel/providers/nntp/camel-nntp-store-summary.c
index 82a37ed..4f0c3f3 100644
--- a/camel/providers/nntp/camel-nntp-store-summary.c
+++ b/camel/providers/nntp/camel-nntp-store-summary.c
@@ -108,7 +108,8 @@ camel_nntp_store_summary_new (void)
* It must be freed using camel_store_summary_info_free().
**/
CamelNNTPStoreInfo *
-camel_nntp_store_summary_full_name (CamelNNTPStoreSummary *s, const gchar *full_name)
+camel_nntp_store_summary_full_name (CamelNNTPStoreSummary *s,
+ const gchar *full_name)
{
gint count, i;
CamelNNTPStoreInfo *info;
@@ -127,7 +128,9 @@ camel_nntp_store_summary_full_name (CamelNNTPStoreSummary *s, const gchar *full_
}
gchar *
-camel_nntp_store_summary_full_to_path (CamelNNTPStoreSummary *s, const gchar *full_name, gchar dir_sep)
+camel_nntp_store_summary_full_to_path (CamelNNTPStoreSummary *s,
+ const gchar *full_name,
+ gchar dir_sep)
{
gchar *path, *p;
gint c;
@@ -155,7 +158,7 @@ static guint32
hexnib (guint32 c)
{
if (c >= '0' && c <= '9')
- return c-'0';
+ return c - '0';
else if (c >= 'A' && c <= 'Z')
return c - 'A' + 10;
else
@@ -163,12 +166,14 @@ hexnib (guint32 c)
}
gchar *
-camel_nntp_store_summary_path_to_full (CamelNNTPStoreSummary *s, const gchar *path, gchar dir_sep)
+camel_nntp_store_summary_path_to_full (CamelNNTPStoreSummary *s,
+ const gchar *path,
+ gchar dir_sep)
{
gchar *full, *f;
guint32 c, v = 0;
const gchar *p;
- gint state=0;
+ gint state = 0;
gchar *subpath, *last = NULL;
CamelStoreInfo *si;
@@ -191,7 +196,7 @@ camel_nntp_store_summary_path_to_full (CamelNNTPStoreSummary *s, const gchar *pa
return f;
}
- f = full = g_alloca (strlen (path)*2+1);
+ f = full = g_alloca (strlen (path) * 2 + 1);
if (si)
p = path + strlen (subpath);
else
@@ -234,7 +239,9 @@ camel_nntp_store_summary_path_to_full (CamelNNTPStoreSummary *s, const gchar *pa
}
CamelNNTPStoreInfo *
-camel_nntp_store_summary_add_from_full (CamelNNTPStoreSummary *s, const gchar *full, gchar dir_sep)
+camel_nntp_store_summary_add_from_full (CamelNNTPStoreSummary *s,
+ const gchar *full,
+ gchar dir_sep)
{
CamelNNTPStoreInfo *info;
gchar *pathu8;
@@ -244,10 +251,10 @@ camel_nntp_store_summary_add_from_full (CamelNNTPStoreSummary *s, const gchar *f
d(printf("adding full name '%s' '%c'\n", full, dir_sep));
len = strlen (full);
- full_name = g_alloca (len+1);
+ full_name = g_alloca (len + 1);
strcpy (full_name, full);
- if (full_name[len-1] == dir_sep)
- full_name[len-1] = 0;
+ if (full_name[len - 1] == dir_sep)
+ full_name[len - 1] = 0;
info = camel_nntp_store_summary_full_name (s, full_name);
if (info) {
@@ -270,7 +277,8 @@ camel_nntp_store_summary_add_from_full (CamelNNTPStoreSummary *s, const gchar *f
}
static gint
-summary_header_load (CamelStoreSummary *s, FILE *in)
+summary_header_load (CamelStoreSummary *s,
+ FILE *in)
{
CamelNNTPStoreSummary *is = (CamelNNTPStoreSummary *) s;
gint32 version, nil;
@@ -295,7 +303,8 @@ summary_header_load (CamelStoreSummary *s, FILE *in)
}
static gint
-summary_header_save (CamelStoreSummary *s, FILE *out)
+summary_header_save (CamelStoreSummary *s,
+ FILE *out)
{
CamelNNTPStoreSummary *is = (CamelNNTPStoreSummary *) s;
@@ -310,7 +319,8 @@ summary_header_save (CamelStoreSummary *s, FILE *out)
}
static CamelStoreInfo *
-store_info_load (CamelStoreSummary *s, FILE *in)
+store_info_load (CamelStoreSummary *s,
+ FILE *in)
{
CamelNNTPStoreInfo *ni;
@@ -334,7 +344,9 @@ store_info_load (CamelStoreSummary *s, FILE *in)
}
static gint
-store_info_save (CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi)
+store_info_save (CamelStoreSummary *s,
+ FILE *out,
+ CamelStoreInfo *mi)
{
CamelNNTPStoreInfo *isi = (CamelNNTPStoreInfo *) mi;
@@ -348,7 +360,8 @@ store_info_save (CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi)
}
static void
-store_info_free (CamelStoreSummary *s, CamelStoreInfo *mi)
+store_info_free (CamelStoreSummary *s,
+ CamelStoreInfo *mi)
{
CamelNNTPStoreInfo *nsi = (CamelNNTPStoreInfo *) mi;
@@ -357,7 +370,9 @@ store_info_free (CamelStoreSummary *s, CamelStoreInfo *mi)
}
static const gchar *
-store_info_string (CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
+store_info_string (CamelStoreSummary *s,
+ const CamelStoreInfo *mi,
+ gint type)
{
CamelNNTPStoreInfo *nsi = (CamelNNTPStoreInfo *) mi;
@@ -374,7 +389,10 @@ store_info_string (CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
}
static void
-store_info_set_string (CamelStoreSummary *s, CamelStoreInfo *mi, gint type, const gchar *str)
+store_info_set_string (CamelStoreSummary *s,
+ CamelStoreInfo *mi,
+ gint type,
+ const gchar *str)
{
CamelNNTPStoreInfo *nsi = (CamelNNTPStoreInfo *) mi;
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c
index 2342197..c702b96 100644
--- a/camel/providers/nntp/camel-nntp-store.c
+++ b/camel/providers/nntp/camel-nntp-store.c
@@ -290,10 +290,10 @@ xover_setup (CamelNNTPStore *store,
/* unsupported command? ignore */
return 0;
- last = (struct _xover_header *)&store->xover;
+ last = (struct _xover_header *) &store->xover;
/* supported command */
- while ((ret = camel_nntp_stream_line (store->stream, (guchar **)&line, &len, cancellable, error)) > 0) {
+ while ((ret = camel_nntp_stream_line (store->stream, (guchar **) &line, &len, cancellable, error)) > 0) {
p = (guchar *) line;
xover = g_malloc0 (sizeof (*xover));
last->next = xover;
@@ -305,7 +305,7 @@ xover_setup (CamelNNTPStore *store,
if (strcmp (line, headers[i].name) == 0) {
xover->name = headers[i].name;
if (strncmp((gchar *) p, "full", 4) == 0)
- xover->skip = strlen (xover->name)+1;
+ xover->skip = strlen (xover->name) + 1;
else
xover->skip = 0;
xover->type = headers[i].type;
@@ -328,7 +328,7 @@ connect_to_server (CamelService *service,
GError **error)
{
CamelNNTPStore *store = (CamelNNTPStore *) service;
- CamelDiscoStore *disco_store = (CamelDiscoStore*) service;
+ CamelDiscoStore *disco_store = (CamelDiscoStore *) service;
CamelURL *url;
CamelStream *tcp_stream;
const gchar *user_data_dir;
@@ -457,8 +457,8 @@ nntp_connect_offline (CamelService *service,
return FALSE;
/* Default cache expiry - 2 weeks old, or not visited in 5 days */
- camel_data_cache_set_expire_age (nntp_store->cache, 60*60*24*14);
- camel_data_cache_set_expire_access (nntp_store->cache, 60*60*24*5);
+ camel_data_cache_set_expire_age (nntp_store->cache, 60 * 60 * 24 * 14);
+ camel_data_cache_set_expire_access (nntp_store->cache, 60 * 60 * 24 * 5);
}
if (disco_store->diary)
@@ -515,7 +515,8 @@ nntp_disconnect_offline (CamelService *service,
}
static gchar *
-nntp_store_get_name (CamelService *service, gboolean brief)
+nntp_store_get_name (CamelService *service,
+ gboolean brief)
{
CamelURL *url;
@@ -640,7 +641,8 @@ nntp_folder_info_from_name (CamelNNTPStore *store,
/* handle list/newgroups response */
static CamelNNTPStoreInfo *
-nntp_store_info_update (CamelNNTPStore *store, gchar *line)
+nntp_store_info_update (CamelNNTPStore *store,
+ gchar *line)
{
CamelStoreSummary *summ = (CamelStoreSummary *) store->summary;
CamelURL *base_url;
@@ -657,9 +659,9 @@ nntp_store_info_update (CamelNNTPStore *store, gchar *line)
fsi = si = (CamelNNTPStoreInfo *) camel_store_summary_path ((CamelStoreSummary *) store->summary, line);
if (si == NULL) {
- si = (CamelNNTPStoreInfo*) camel_store_summary_info_new (summ);
+ si = (CamelNNTPStoreInfo *) camel_store_summary_info_new (summ);
- relpath = g_alloca (strlen (line)+2);
+ relpath = g_alloca (strlen (line) + 2);
sprintf(relpath, "/%s", line);
url = camel_url_new_with_base (base_url, relpath);
si->info.uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
@@ -676,7 +678,7 @@ nntp_store_info_update (CamelNNTPStore *store, gchar *line)
if (tmp && *tmp >= '0' && *tmp <= '9') {
last = strtoul (tmp, &tmp, 10);
if (*tmp == ' ' && tmp[1] >= '0' && tmp[1] <= '9') {
- first = strtoul (tmp+1, &tmp, 10);
+ first = strtoul (tmp + 1, &tmp, 10);
if (*tmp == ' ' && tmp[1] != 'y')
si->info.flags |= CAMEL_STORE_INFO_FOLDER_READONLY;
}
@@ -686,13 +688,13 @@ nntp_store_info_update (CamelNNTPStore *store, gchar *line)
if (si->last) {
if (last > si->last)
- new = last-si->last;
+ new = last - si->last;
} else {
if (last > first)
new = last - first;
}
- si->info.total = last > first?last-first:0;
+ si->info.total = last > first ? last - first : 0;
si->info.unread += new; /* this is a _guess_ */
si->last = last;
si->first = first;
@@ -729,13 +731,13 @@ nntp_store_get_subscribed_folder_info (CamelNNTPStore *store,
short_folder_names = camel_nntp_settings_get_short_folder_names (
CAMEL_NNTP_SETTINGS (settings));
- for (i=0;(si = camel_store_summary_index ((CamelStoreSummary *) store->summary, i));i++) {
+ for (i = 0;(si = camel_store_summary_index ((CamelStoreSummary *) store->summary, i)); i++) {
if (si == NULL)
continue;
if (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) {
/* slow mode? open and update the folder, always! this will implictly update
- our storeinfo too; in a very round-about way */
+ * our storeinfo too; in a very round-about way */
if ((flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0) {
CamelNNTPFolder *folder;
gchar *line;
@@ -776,7 +778,9 @@ nntp_store_get_subscribed_folder_info (CamelNNTPStore *store,
}
static CamelFolderInfo *
-tree_insert (CamelFolderInfo *root, CamelFolderInfo *last, CamelFolderInfo *fi)
+tree_insert (CamelFolderInfo *root,
+ CamelFolderInfo *last,
+ CamelFolderInfo *fi)
{
CamelFolderInfo *kfi;
@@ -897,8 +901,8 @@ nntp_store_get_cached_folder_info (CamelNNTPStore *store,
}
} else {
/* apparently, this is an indirect subitem. if it's not a subitem of
- the item we added last, we need to add a portion of this item to
- the list as a placeholder */
+ * the item we added last, we need to add a portion of this item to
+ * the list as a placeholder */
if (!last ||
strncmp (si->path, last->full_name, strlen (last->full_name)) != 0 ||
si->path[strlen (last->full_name)] != '.') {
@@ -911,7 +915,7 @@ nntp_store_get_cached_folder_info (CamelNNTPStore *store,
fi->flags |= CAMEL_FOLDER_NOSELECT;
if (folder_hierarchy_relative) {
g_free (fi->display_name);
- fi->display_name = g_strdup (tmpname + ((toplen==1) ? 0 : toplen));
+ fi->display_name = g_strdup (tmpname + ((toplen == 1) ? 0 : toplen));
}
g_free (tmpname);
} else {
@@ -951,7 +955,9 @@ nntp_store_get_cached_folder_info (CamelNNTPStore *store,
}
static void
-store_info_remove (gpointer key, gpointer value, gpointer data)
+store_info_remove (gpointer key,
+ gpointer value,
+ gpointer data)
{
CamelStoreSummary *summary = data;
CamelStoreInfo *si = value;
@@ -960,9 +966,10 @@ store_info_remove (gpointer key, gpointer value, gpointer data)
}
static gint
-store_info_sort (gconstpointer a, gconstpointer b)
+store_info_sort (gconstpointer a,
+ gconstpointer b)
{
- return strcmp ((*(CamelNNTPStoreInfo**) a)->full_name, (*(CamelNNTPStoreInfo**) b)->full_name);
+ return strcmp ((*(CamelNNTPStoreInfo **) a)->full_name, (*(CamelNNTPStoreInfo **) b)->full_name);
}
/* retrieves the date from the NNTP server */
@@ -1189,7 +1196,9 @@ nntp_store_delete_folder_sync (CamelStore *store,
}
static gboolean
-nntp_can_refresh_folder (CamelStore *store, CamelFolderInfo *info, GError **error)
+nntp_can_refresh_folder (CamelStore *store,
+ CamelFolderInfo *info,
+ GError **error)
{
/* any nntp folder can be refreshed */
return TRUE;
@@ -1238,8 +1247,8 @@ nntp_store_initable_init (GInitable *initable,
return FALSE;
/* Default cache expiry - 2 weeks old, or not visited in 5 days */
- camel_data_cache_set_expire_age (nntp_store->cache, 60*60*24*14);
- camel_data_cache_set_expire_access (nntp_store->cache, 60*60*24*5);
+ camel_data_cache_set_expire_age (nntp_store->cache, 60 * 60 * 24 * 14);
+ camel_data_cache_set_expire_access (nntp_store->cache, 60 * 60 * 24 * 5);
return TRUE;
}
@@ -1543,7 +1552,7 @@ camel_nntp_raw_commandv (CamelNNTPStore *store,
}
}
- camel_stream_write (stream, (const gchar *) ps, p-ps-1, NULL, NULL);
+ camel_stream_write (stream, (const gchar *) ps, p - ps - 1, NULL, NULL);
camel_stream_write (stream, "\r\n", 2, NULL, NULL);
byte_array = camel_stream_mem_get_byte_array (store->mem);
@@ -1662,7 +1671,7 @@ camel_nntp_command (CamelNNTPStore *store,
/* Check for unprocessed data, !*/
if (store->stream->mode == CAMEL_NNTP_STREAM_DATA) {
g_warning("Unprocessed data left in stream, flushing");
- while (camel_nntp_stream_getd (store->stream, (guchar **)&p, &u, cancellable, error) > 0)
+ while (camel_nntp_stream_getd (store->stream, (guchar **) &p, &u, cancellable, error) > 0)
;
}
camel_nntp_stream_set_mode (store->stream, CAMEL_NNTP_STREAM_LINE);
diff --git a/camel/providers/nntp/camel-nntp-store.h b/camel/providers/nntp/camel-nntp-store.h
index c1d6dbe..8fa0568 100644
--- a/camel/providers/nntp/camel-nntp-store.h
+++ b/camel/providers/nntp/camel-nntp-store.h
@@ -74,8 +74,8 @@ struct _xover_header {
struct _xover_header *next;
const gchar *name;
- guint skip:8;
- xover_t type:8;
+ guint skip : 8;
+ xover_t type : 8;
};
/* names of supported capabilities on the server */
@@ -89,7 +89,7 @@ struct _CamelNNTPStore {
guint32 extensions;
- guint posting_allowed:1;
+ guint posting_allowed : 1;
gboolean password_reprompt;
struct _CamelNNTPStoreSummary *summary;
diff --git a/camel/providers/nntp/camel-nntp-stream.c b/camel/providers/nntp/camel-nntp-stream.c
index 8e0731f..98d1a4e 100644
--- a/camel/providers/nntp/camel-nntp-stream.c
+++ b/camel/providers/nntp/camel-nntp-stream.c
@@ -139,11 +139,11 @@ nntp_stream_read (CamelStream *stream,
}
if (p[0] == '.') {
if (p[1] == '\r' && p[2] == '\n') {
- is->ptr = p+3;
+ is->ptr = p + 3;
is->mode = CAMEL_NNTP_STREAM_EOD;
is->state = 0;
dd (printf ("NNTP_STREAM_READ (%d):\n%.*s\n", (gint)(o-buffer), (gint)(o-buffer), buffer));
- return o-buffer;
+ return o - buffer;
}
p++;
}
@@ -177,7 +177,7 @@ nntp_stream_read (CamelStream *stream,
dd (printf ("NNTP_STREAM_READ (%d):\n%.*s\n", (gint)(o-buffer), (gint)(o-buffer), buffer));
- return o-buffer;
+ return o - buffer;
}
static gssize
@@ -240,8 +240,8 @@ static void
camel_nntp_stream_init (CamelNNTPStream *is)
{
/* +1 is room for appending a 0 if we need to for a line */
- is->ptr = is->end = is->buf = g_malloc (CAMEL_NNTP_STREAM_SIZE+1);
- is->lineptr = is->linebuf = g_malloc (CAMEL_NNTP_STREAM_LINE_SIZE+1);
+ is->ptr = is->end = is->buf = g_malloc (CAMEL_NNTP_STREAM_SIZE + 1);
+ is->lineptr = is->linebuf = g_malloc (CAMEL_NNTP_STREAM_LINE_SIZE + 1);
is->lineend = is->linebuf + CAMEL_NNTP_STREAM_LINE_SIZE;
/* init sentinal */
@@ -296,7 +296,7 @@ camel_nntp_stream_line (CamelNNTPStream *is,
/* Data mode, convert leading '..' to '.', and stop when we reach a solitary '.' */
if (is->mode == CAMEL_NNTP_STREAM_DATA) {
/* need at least 3 chars in buffer */
- while (e-p < 3) {
+ while (e - p < 3) {
is->ptr = p;
if (nntp_stream_fill (is, cancellable, error) == -1)
return -1;
@@ -307,7 +307,7 @@ camel_nntp_stream_line (CamelNNTPStream *is,
/* check for isolated '.\r\n' or begging of line '.' */
if (p[0] == '.') {
if (p[1] == '\r' && p[2] == '\n') {
- is->ptr = p+3;
+ is->ptr = p + 3;
is->mode = CAMEL_NNTP_STREAM_EOD;
*data = is->linebuf;
*len = 0;
@@ -387,7 +387,7 @@ camel_nntp_stream_gets (CamelNNTPStream *is,
dd (printf ("NNTP_STREAM_GETS (%s,%d): '%.*s'\n", end==NULL?"more":"last", *len, (gint)*len, *start));
- return end == NULL?1:0;
+ return end == NULL ? 1 : 0;
}
void
@@ -438,7 +438,7 @@ camel_nntp_stream_getd (CamelNNTPStream *is,
/* check leading '.', ... */
if (p[0] == '.') {
if (p[1] == '\r' && p[2] == '\n') {
- is->ptr = p+3;
+ is->ptr = p + 3;
*len = p-s;
*start = s;
is->mode = CAMEL_NNTP_STREAM_EOD;
@@ -454,7 +454,7 @@ camel_nntp_stream_getd (CamelNNTPStream *is,
s++;
p++;
} else {
- is->ptr = p+1;
+ is->ptr = p + 1;
*len = p-s;
*start = s;
is->state = 1;
@@ -467,7 +467,7 @@ camel_nntp_stream_getd (CamelNNTPStream *is,
state = 1;
case 1:
/* Scan for sentinal */
- while ((*p++)!='\n')
+ while ((*p++) != '\n')
;
if (p > e) {
@@ -477,7 +477,7 @@ camel_nntp_stream_getd (CamelNNTPStream *is,
}
break;
}
- } while ((e-p) >= 3);
+ } while ((e - p) >= 3);
is->state = state;
is->ptr = p;
diff --git a/camel/providers/nntp/camel-nntp-summary.c b/camel/providers/nntp/camel-nntp-summary.c
index e79a979..0440d4b 100644
--- a/camel/providers/nntp/camel-nntp-summary.c
+++ b/camel/providers/nntp/camel-nntp-summary.c
@@ -92,7 +92,8 @@ camel_nntp_summary_init (CamelNNTPSummary *nntp_summary)
}
CamelNNTPSummary *
-camel_nntp_summary_new (CamelFolder *folder, const gchar *path)
+camel_nntp_summary_new (CamelFolder *folder,
+ const gchar *path)
{
CamelNNTPSummary *cns;
@@ -128,7 +129,8 @@ message_info_new_from_header (CamelFolderSummary *s,
}
static gint
-summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *mir)
+summary_header_from_db (CamelFolderSummary *s,
+ CamelFIRecord *mir)
{
CamelNNTPSummary *cns = CAMEL_NNTP_SUMMARY (s);
gchar *part;
@@ -146,7 +148,8 @@ summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *mir)
}
static gint
-summary_header_load (CamelFolderSummary *s, FILE *in)
+summary_header_load (CamelFolderSummary *s,
+ FILE *in)
{
CamelNNTPSummary *cns = CAMEL_NNTP_SUMMARY (s);
@@ -176,7 +179,8 @@ summary_header_load (CamelFolderSummary *s, FILE *in)
}
static CamelFIRecord *
-summary_header_to_db (CamelFolderSummary *s, GError **error)
+summary_header_to_db (CamelFolderSummary *s,
+ GError **error)
{
CamelNNTPSummary *cns = CAMEL_NNTP_SUMMARY (s);
struct _CamelFIRecord *fir;
@@ -190,7 +194,8 @@ summary_header_to_db (CamelFolderSummary *s, GError **error)
}
static gint
-summary_header_save (CamelFolderSummary *s, FILE *out)
+summary_header_save (CamelFolderSummary *s,
+ FILE *out)
{
CamelNNTPSummary *cns = CAMEL_NNTP_SUMMARY (s);
@@ -253,8 +258,8 @@ add_range_xover (CamelNNTPSummary *cns,
}
count = 0;
- total = high-low+1;
- while ((ret = camel_nntp_stream_line (store->stream, (guchar **)&line, &len, cancellable, error)) > 0) {
+ total = high - low + 1;
+ while ((ret = camel_nntp_stream_line (store->stream, (guchar **) &line, &len, cancellable, error)) > 0) {
camel_operation_progress (cancellable, (count * 100) / total);
count++;
n = strtoul (line, &tab, 10);
@@ -263,13 +268,13 @@ add_range_xover (CamelNNTPSummary *cns,
tab++;
xover = store->xover;
size = 0;
- for (;tab[0] && xover;xover = xover->next) {
+ for (; tab[0] && xover; xover = xover->next) {
line = tab;
tab = strchr (line, '\t');
if (tab)
*tab++ = 0;
else
- tab = line+strlen (line);
+ tab = line + strlen (line);
/* do we care about this column? */
if (xover->name) {
@@ -353,8 +358,8 @@ add_range_head (CamelNNTPSummary *cns,
cancellable, _("%s: Scanning new messages"), url->host);
count = 0;
- total = high-low+1;
- for (i=low;i<high+1;i++) {
+ total = high - low + 1;
+ for (i = low; i < high + 1; i++) {
camel_operation_progress (cancellable, (count * 100) / total);
count++;
ret = camel_nntp_raw_command_auth (store, cancellable, error, &line, "head %u", i);
@@ -376,7 +381,7 @@ add_range_head (CamelNNTPSummary *cns,
g_warning ("retrieved message '%u' when i expected '%u'?\n", n, i);
/* FIXME: use camel-mime-utils.c function for parsing msgid? */
- if ((msgid = strchr (line, '<')) && (line = strchr (msgid+1, '>'))) {
+ if ((msgid = strchr (line, '<')) && (line = strchr (msgid + 1, '>'))) {
line[1] = 0;
cns->priv->uid = g_strdup_printf ("%u,%s\n", n, msgid);
if (!GPOINTER_TO_INT (g_hash_table_lookup (summary_table, cns->priv->uid))) {
@@ -461,11 +466,11 @@ camel_nntp_summary_check (CamelNNTPSummary *cns,
if (line[0] == ' ') {
gchar *tmp;
- folder = line+1;
+ folder = line + 1;
tmp = strchr (folder, ' ');
if (tmp)
*tmp = 0;
- tmp = g_alloca (strlen (folder)+1);
+ tmp = g_alloca (strlen (folder) + 1);
strcpy (tmp, folder);
folder = tmp;
}
@@ -490,8 +495,8 @@ camel_nntp_summary_check (CamelNNTPSummary *cns,
if (n < f || n > l) {
dd (printf ("nntp_summary: %u is lower/higher than lowest/highest article, removed\n", n));
/* Since we use a global cache this could prematurely remove
- a cached message that might be in another folder - not that important as
- it is a true cache */
+ * a cached message that might be in another folder - not that important as
+ * it is a true cache */
msgid = strchr (uid, ',');
if (msgid)
camel_data_cache_remove (store->cache, "cache", msgid+1, NULL);
@@ -513,15 +518,15 @@ camel_nntp_summary_check (CamelNNTPSummary *cns,
if (cns->high < l) {
if (cns->high < f)
- cns->high = f-1;
+ cns->high = f - 1;
if (store->xover)
ret = add_range_xover (
- cns, store, l, cns->high+1,
+ cns, store, l, cns->high + 1,
changes, cancellable, error);
else
ret = add_range_head (
- cns, store, l, cns->high+1,
+ cns, store, l, cns->high + 1,
changes, cancellable, error);
}
diff --git a/camel/providers/nntp/test-newsrc.c b/camel/providers/nntp/test-newsrc.c
index 3667cce..357ff6e 100644
--- a/camel/providers/nntp/test-newsrc.c
+++ b/camel/providers/nntp/test-newsrc.c
@@ -3,8 +3,9 @@
#include "camel-nntp-newsrc.h"
gint
-main (gint argc, gchar *argv[])
+main (gint argc,
+ gchar *argv[])
{
- CamelNNTPNewsrc *newsrc = camel_nntp_newsrc_read_for_server (argv[1]);
- camel_nntp_newsrc_write_to_file (newsrc, stdout);
+ CamelNNTPNewsrc *newsrc = camel_nntp_newsrc_read_for_server (argv[1]);
+ camel_nntp_newsrc_write_to_file (newsrc, stdout);
}
diff --git a/camel/providers/pop3/camel-pop3-engine.c b/camel/providers/pop3/camel-pop3-engine.c
index b9d7a06..9a49a6b 100644
--- a/camel/providers/pop3/camel-pop3-engine.c
+++ b/camel/providers/pop3/camel-pop3-engine.c
@@ -33,7 +33,7 @@
#include "camel-pop3-stream.h"
/* max 'outstanding' bytes in output stream, so we can't deadlock waiting
- for the server to accept our data when pipelining */
+ * for the server to accept our data when pipelining */
#define CAMEL_POP3_SEND_LIMIT (1024)
extern CamelServiceAuthType camel_pop3_password_authtype;
@@ -127,7 +127,8 @@ read_greeting (CamelPOP3Engine *pe)
* Returns: the stream
**/
CamelPOP3Engine *
-camel_pop3_engine_new (CamelStream *source, guint32 flags)
+camel_pop3_engine_new (CamelStream *source,
+ guint32 flags)
{
CamelPOP3Engine *pe;
@@ -162,7 +163,7 @@ camel_pop3_engine_reget_capabilities (CamelPOP3Engine *engine)
}
/* TODO: read implementation too?
- etc? */
+ * etc? */
static struct {
const gchar *cap;
guint32 flag;
@@ -175,7 +176,9 @@ static struct {
};
static void
-cmd_capa (CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
+cmd_capa (CamelPOP3Engine *pe,
+ CamelPOP3Stream *stream,
+ gpointer data)
{
guchar *line, *tok, *next;
guint len;
@@ -189,7 +192,7 @@ cmd_capa (CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
ret = camel_pop3_stream_line (stream, &line, &len, NULL, NULL);
if (ret >= 0) {
if (strncmp((gchar *) line, "SASL ", 5) == 0) {
- tok = line+5;
+ tok = line + 5;
dd(printf("scanning tokens '%s'\n", tok));
while (tok) {
next = (guchar *) strchr ((gchar *) tok, ' ');
@@ -211,7 +214,7 @@ cmd_capa (CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
}
}
}
- } while (ret>0);
+ } while (ret > 0);
}
static void
@@ -359,15 +362,15 @@ camel_pop3_engine_iterate (CamelPOP3Engine *pe,
if (pcwait && pcwait->state >= CAMEL_POP3_COMMAND_OK)
return 0;
- return pe->current==NULL?0:1;
+ return pe->current == NULL ? 0 : 1;
ioerror:
/* we assume all outstanding commands are gunna fail now */
- while ((pw = (CamelPOP3Command*) camel_dlist_remhead (&pe->active))) {
+ while ((pw = (CamelPOP3Command *) camel_dlist_remhead (&pe->active))) {
pw->state = CAMEL_POP3_COMMAND_ERR;
camel_dlist_addtail (&pe->done, (CamelDListNode *) pw);
}
- while ((pw = (CamelPOP3Command*) camel_dlist_remhead (&pe->queue))) {
+ while ((pw = (CamelPOP3Command *) camel_dlist_remhead (&pe->queue))) {
pw->state = CAMEL_POP3_COMMAND_ERR;
camel_dlist_addtail (&pe->done, (CamelDListNode *) pw);
}
@@ -410,7 +413,8 @@ camel_pop3_engine_command_new (CamelPOP3Engine *pe,
}
void
-camel_pop3_engine_command_free (CamelPOP3Engine *pe, CamelPOP3Command *pc)
+camel_pop3_engine_command_free (CamelPOP3Engine *pe,
+ CamelPOP3Command *pc)
{
if (pe->current != pc)
camel_dlist_remove ((CamelDListNode *) pc);
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
index 13ed8c5..5acffa3 100644
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ b/camel/providers/pop3/camel-pop3-folder.c
@@ -54,13 +54,13 @@ cmd_uidl (CamelPOP3Engine *pe,
do {
ret = camel_pop3_stream_line (stream, &line, &len, NULL, NULL);
- if (ret>=0) {
+ if (ret >= 0) {
if (strlen ((gchar *) line) > 1024)
line[1024] = 0;
if (sscanf((gchar *) line, "%u %s", &id, uid) == 2) {
fi = g_hash_table_lookup (folder->uids_id, GINT_TO_POINTER (id));
if (fi) {
- camel_operation_progress (NULL, (fi->index+1) * 100 / folder->uids->len);
+ camel_operation_progress (NULL, (fi->index + 1) * 100 / folder->uids->len);
fi->uid = g_strdup (uid);
g_hash_table_insert (folder->uids_fi, fi->uid, fi);
} else {
@@ -68,7 +68,7 @@ cmd_uidl (CamelPOP3Engine *pe,
}
}
}
- } while (ret>0);
+ } while (ret > 0);
}
/* create a uid from md5 of 'top' output */
@@ -88,7 +88,7 @@ cmd_builduid (CamelPOP3Engine *pe,
digest = g_alloca (length);
/* TODO; somehow work out the limit and use that for proper progress reporting
- We need a pointer to the folder perhaps? */
+ * We need a pointer to the folder perhaps? */
camel_operation_progress (NULL, fi->id);
checksum = g_checksum_new (G_CHECKSUM_MD5);
@@ -120,7 +120,9 @@ cmd_builduid (CamelPOP3Engine *pe,
}
static void
-cmd_list (CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
+cmd_list (CamelPOP3Engine *pe,
+ CamelPOP3Stream *stream,
+ gpointer data)
{
gint ret;
guint len, id, size;
@@ -135,7 +137,7 @@ cmd_list (CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
do {
ret = camel_pop3_stream_line (stream, &line, &len, NULL, NULL);
- if (ret>=0) {
+ if (ret >= 0) {
if (sscanf((gchar *) line, "%u %u", &id, &size) == 2) {
fi = g_malloc0 (sizeof (*fi));
fi->size = size;
@@ -147,7 +149,7 @@ cmd_list (CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
g_hash_table_insert (((CamelPOP3Folder *) folder)->uids_id, GINT_TO_POINTER (id), fi);
}
}
- } while (ret>0);
+ } while (ret > 0);
}
static void
@@ -252,7 +254,7 @@ pop3_folder_get_uids (CamelFolder *folder)
CamelPOP3FolderInfo **fi = (CamelPOP3FolderInfo **) pop3_folder->uids->pdata;
gint i;
- for (i=0;i<pop3_folder->uids->len;i++,fi++) {
+ for (i = 0; i < pop3_folder->uids->len; i++,fi++) {
if (fi[0]->uid)
g_ptr_array_add (uids, fi[0]->uid);
}
@@ -344,13 +346,13 @@ pop3_folder_get_message_sync (CamelFolder *folder,
}
/* Sigh, most of the crap in this function is so that the cancel button
- returns the proper exception code. Sigh. */
+ * returns the proper exception code. Sigh. */
camel_operation_push_message (
cancellable, _("Retrieving POP message %d"), fi->id);
/* If we have an oustanding retrieve message running, wait for that to complete
- & then retrieve from cache, otherwise, start a new one, and similar */
+ * & then retrieve from cache, otherwise, start a new one, and similar */
if (fi->cmd != NULL) {
while ((i = camel_pop3_engine_iterate (pop3_store->engine, fi->cmd, cancellable, error)) > 0)
@@ -386,10 +388,10 @@ pop3_folder_get_message_sync (CamelFolder *folder,
/* Also initiate retrieval of some of the following messages, assume we'll be receiving them */
if (pop3_store->cache != NULL) {
/* This should keep track of the last one retrieved, also how many are still
- oustanding incase of random access on large folders */
- i = fi->index+1;
- last = MIN (i+10, pop3_folder->uids->len);
- for (;i<last;i++) {
+ * oustanding incase of random access on large folders */
+ i = fi->index + 1;
+ last = MIN (i + 10, pop3_folder->uids->len);
+ for (; i < last; i++) {
CamelPOP3FolderInfo *pfi = pop3_folder->uids->pdata[i];
if (pfi->uid && pfi->cmd == NULL) {
@@ -494,7 +496,7 @@ pop3_folder_refresh_info_sync (CamelFolder *folder,
if (pcu) {
camel_pop3_engine_command_free (pop3_store->engine, pcu);
} else {
- for (i=0;i<pop3_folder->uids->len;i++) {
+ for (i = 0; i < pop3_folder->uids->len; i++) {
CamelPOP3FolderInfo *fi = pop3_folder->uids->pdata[i];
if (fi->cmd) {
camel_pop3_engine_command_free (pop3_store->engine, fi->cmd);
@@ -601,7 +603,7 @@ pop3_folder_synchronize_sync (CamelFolder *folder,
fi->cmd = NULL;
}
camel_operation_progress (
- cancellable, (i+1) * 100 / pop3_folder->uids->len);
+ cancellable, (i + 1) * 100 / pop3_folder->uids->len);
}
camel_operation_pop_message (cancellable);
@@ -662,7 +664,9 @@ camel_pop3_folder_new (CamelStore *parent,
}
static gboolean
-pop3_get_message_time_from_cache (CamelFolder *folder, const gchar *uid, time_t *message_time)
+pop3_get_message_time_from_cache (CamelFolder *folder,
+ const gchar *uid,
+ time_t *message_time)
{
CamelStore *parent_store;
CamelPOP3Store *pop3_store;
@@ -761,7 +765,7 @@ camel_pop3_delete_old (CamelFolder *folder,
if (message_time) {
gdouble time_diff = difftime (temp,message_time);
- gint day_lag = time_diff/(60*60*24);
+ gint day_lag = time_diff / (60 * 60 * 24);
d(printf("%s(%d): message_time= [%ld]\n", __FILE__, __LINE__, message_time));
d(printf("%s(%d): day_lag=[%d] \t days_to_delete=[%d]\n",
@@ -802,7 +806,7 @@ camel_pop3_delete_old (CamelFolder *folder,
fi->cmd = NULL;
}
camel_operation_progress (
- cancellable, (i+1) * 100 / pop3_folder->uids->len);
+ cancellable, (i + 1) * 100 / pop3_folder->uids->len);
}
camel_pop3_store_expunge (pop3_store, error);
diff --git a/camel/providers/pop3/camel-pop3-provider.c b/camel/providers/pop3/camel-pop3-provider.c
index 93d3f1a..0a7973e 100644
--- a/camel/providers/pop3/camel-pop3-provider.c
+++ b/camel/providers/pop3/camel-pop3-provider.c
@@ -119,7 +119,8 @@ camel_provider_module_init (void)
}
static void
-add_hash (guint *hash, gchar *s)
+add_hash (guint *hash,
+ gchar *s)
{
if (s)
*hash ^= g_str_hash(s);
@@ -139,7 +140,8 @@ pop3_url_hash (gconstpointer key)
}
static gint
-check_equal (gchar *s1, gchar *s2)
+check_equal (gchar *s1,
+ gchar *s2)
{
if (s1 == NULL) {
if (s2 == NULL)
@@ -155,7 +157,8 @@ check_equal (gchar *s1, gchar *s2)
}
static gint
-pop3_url_equal (gconstpointer a, gconstpointer b)
+pop3_url_equal (gconstpointer a,
+ gconstpointer b)
{
const CamelURL *u1 = a, *u2 = b;
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index 7859f53..756cb60 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -194,7 +194,7 @@ connect_to_server (CamelService *service,
g_object_unref (tcp_stream);
/* rfc2595, section 4 states that after a successful STLS
- command, the client MUST discard prior CAPA responses */
+ * command, the client MUST discard prior CAPA responses */
camel_pop3_engine_reget_capabilities (store->engine);
return TRUE;
@@ -273,10 +273,10 @@ try_sasl (CamelPOP3Store *store,
goto done;
}
/* If we dont get continuation, or the sasl object's run out of work, or we dont get a challenge,
- its a protocol error, so fail, and try reset the server */
+ * its a protocol error, so fail, and try reset the server */
if (strncmp((gchar *) line, "+ ", 2) != 0
|| camel_sasl_get_authenticated (sasl)
- || (resp = (guchar *) camel_sasl_challenge_base64_sync (sasl, (const gchar *) line+2, cancellable, NULL)) == NULL) {
+ || (resp = (guchar *) camel_sasl_challenge_base64_sync (sasl, (const gchar *) line + 2, cancellable, NULL)) == NULL) {
camel_stream_write_string (
CAMEL_STREAM (stream), "*\r\n", NULL, NULL);
camel_pop3_stream_line (stream, &line, &len, NULL, NULL);
@@ -371,7 +371,7 @@ pop3_try_authenticate (CamelService *service,
d = store->engine->apop;
while (*d != '\0') {
- if (!isascii ((gint)*d)) {
+ if (!isascii ((gint) * d)) {
/* README for Translators: The string APOP should not be translated */
g_set_error (
@@ -387,7 +387,7 @@ pop3_try_authenticate (CamelService *service,
d++;
}
- secret = g_alloca (strlen (store->engine->apop) + strlen (url->passwd)+1);
+ secret = g_alloca (strlen (store->engine->apop) + strlen (url->passwd) + 1);
sprintf(secret, "%s%s", store->engine->apop, url->passwd);
md5asc = g_compute_checksum_for_string (G_CHECKSUM_MD5, secret, -1);
pcp = camel_pop3_engine_command_new (
diff --git a/camel/providers/pop3/camel-pop3-stream.c b/camel/providers/pop3/camel-pop3-stream.c
index f785a08..ec57f73 100644
--- a/camel/providers/pop3/camel-pop3-stream.c
+++ b/camel/providers/pop3/camel-pop3-stream.c
@@ -21,7 +21,7 @@
*/
/* This is *identical* to the camel-nntp-stream, so should probably
- work out a way to merge them */
+ * work out a way to merge them */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -133,11 +133,11 @@ stream_read (CamelStream *stream,
}
if (p[0] == '.') {
if (p[1] == '\r' && p[2] == '\n') {
- is->ptr = p+3;
+ is->ptr = p + 3;
is->mode = CAMEL_POP3_STREAM_EOD;
is->state = 0;
dd (printf ("POP3_STREAM_READ (%d):\n%.*s\n", (gint)(o-buffer), (gint)(o-buffer), buffer));
- return o-buffer;
+ return o - buffer;
}
p++;
}
@@ -171,7 +171,7 @@ stream_read (CamelStream *stream,
dd (printf ("POP3_STREAM_READ (%d):\n%.*s\n", (gint)(o-buffer), (gint)(o-buffer), buffer));
- return o-buffer;
+ return o - buffer;
}
static gssize
@@ -239,8 +239,8 @@ static void
camel_pop3_stream_init (CamelPOP3Stream *is)
{
/* +1 is room for appending a 0 if we need to for a line */
- is->ptr = is->end = is->buf = g_malloc (CAMEL_POP3_STREAM_SIZE+1);
- is->lineptr = is->linebuf = g_malloc (CAMEL_POP3_STREAM_LINE+1);
+ is->ptr = is->end = is->buf = g_malloc (CAMEL_POP3_STREAM_SIZE + 1);
+ is->lineptr = is->linebuf = g_malloc (CAMEL_POP3_STREAM_LINE + 1);
is->lineend = is->linebuf + CAMEL_POP3_STREAM_LINE;
/* init sentinal */
@@ -295,7 +295,7 @@ camel_pop3_stream_line (CamelPOP3Stream *is,
/* Data mode, convert leading '..' to '.', and stop when we reach a solitary '.' */
if (is->mode == CAMEL_POP3_STREAM_DATA) {
/* need at least 3 chars in buffer */
- while (e-p < 3) {
+ while (e - p < 3) {
is->ptr = p;
if (stream_fill (is, cancellable, error) == -1)
return -1;
@@ -306,7 +306,7 @@ camel_pop3_stream_line (CamelPOP3Stream *is,
/* check for isolated '.\r\n' or begging of line '.' */
if (p[0] == '.') {
if (p[1] == '\r' && p[2] == '\n') {
- is->ptr = p+3;
+ is->ptr = p + 3;
is->mode = CAMEL_POP3_STREAM_EOD;
*data = is->linebuf;
*len = 0;
@@ -406,7 +406,7 @@ camel_pop3_stream_getd (CamelPOP3Stream *is,
/* check leading '.', ... */
if (p[0] == '.') {
if (p[1] == '\r' && p[2] == '\n') {
- is->ptr = p+3;
+ is->ptr = p + 3;
*len = p-s;
*start = s;
is->mode = CAMEL_POP3_STREAM_EOD;
@@ -422,7 +422,7 @@ camel_pop3_stream_getd (CamelPOP3Stream *is,
s++;
p++;
} else {
- is->ptr = p+1;
+ is->ptr = p + 1;
*len = p-s;
*start = s;
is->state = 1;
@@ -435,7 +435,7 @@ camel_pop3_stream_getd (CamelPOP3Stream *is,
state = 1;
case 1:
/* Scan for sentinal */
- while ((*p++)!='\n')
+ while ((*p++) != '\n')
;
if (p > e) {
@@ -445,7 +445,7 @@ camel_pop3_stream_getd (CamelPOP3Stream *is,
}
break;
}
- } while ((e-p) >= 3);
+ } while ((e - p) >= 3);
is->state = state;
is->ptr = p;
diff --git a/camel/providers/pop3/camel-pop3-stream.h b/camel/providers/pop3/camel-pop3-stream.h
index 74bf7a0..d79ea3f 100644
--- a/camel/providers/pop3/camel-pop3-stream.h
+++ b/camel/providers/pop3/camel-pop3-stream.h
@@ -19,7 +19,7 @@
*/
/* This is *identical* to the camel-nntp-stream, so should probably
- work out a way to merge them */
+ * work out a way to merge them */
#ifndef CAMEL_POP3_STREAM_H
#define CAMEL_POP3_STREAM_H
diff --git a/camel/providers/smtp/camel-smtp-provider.c b/camel/providers/smtp/camel-smtp-provider.c
index 1960e60..d1a181b 100644
--- a/camel/providers/smtp/camel-smtp-provider.c
+++ b/camel/providers/smtp/camel-smtp-provider.c
@@ -79,7 +79,8 @@ camel_provider_module_init (void)
}
static void
-add_hash (guint *hash, gchar *s)
+add_hash (guint *hash,
+ gchar *s)
{
if (s)
*hash ^= g_str_hash(s);
@@ -99,7 +100,8 @@ smtp_url_hash (gconstpointer key)
}
static gint
-check_equal (gchar *s1, gchar *s2)
+check_equal (gchar *s1,
+ gchar *s2)
{
if (s1 == NULL) {
if (s2 == NULL)
@@ -115,7 +117,8 @@ check_equal (gchar *s1, gchar *s2)
}
static gint
-smtp_url_equal (gconstpointer a, gconstpointer b)
+smtp_url_equal (gconstpointer a,
+ gconstpointer b)
{
const CamelURL *u1 = a, *u2 = b;
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 8d071cf..260e9bd 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -240,7 +240,7 @@ connect_to_server (CamelService *service,
#endif /* CAMEL_HAVE_SSL */
/* We are supposed to re-EHLO after a successful STARTTLS to
- re-fetch any supported extensions. */
+ * re-fetch any supported extensions. */
if (!smtp_helo (transport, cancellable, error)) {
camel_service_disconnect_sync (
(CamelService *) transport, TRUE, NULL);
@@ -263,13 +263,16 @@ connect_to_server (CamelService *service,
}
static void
-authtypes_free (gpointer key, gpointer value, gpointer data)
+authtypes_free (gpointer key,
+ gpointer value,
+ gpointer data)
{
g_free (value);
}
static gchar *
-smtp_transport_get_name (CamelService *service, gboolean brief)
+smtp_transport_get_name (CamelService *service,
+ gboolean brief)
{
CamelURL *url;
@@ -366,7 +369,7 @@ smtp_transport_connect_sync (CamelService *service,
authenticated = smtp_auth (transport, sasl, cancellable, error);
if (!authenticated && !authtype->need_password) {
/* authentication mechanism doesn't need a password,
- so if it fails there's nothing we can do */
+ * so if it fails there's nothing we can do */
camel_service_disconnect_sync (
service, TRUE, NULL);
return FALSE;
@@ -576,7 +579,7 @@ smtp_transport_send_to_sync (CamelTransport *transport,
smtp_transport->need_rset = FALSE;
/* rfc1652 (8BITMIME) requires that you notify the ESMTP daemon that
- you'll be sending an 8bit mime message at "MAIL FROM:" time. */
+ * you'll be sending an 8bit mime message at "MAIL FROM:" time. */
if (!smtp_mail (
smtp_transport, addr, has_8bit_parts, cancellable, error)) {
camel_operation_pop_message (cancellable);
@@ -836,7 +839,8 @@ smtp_next_token (const gchar *buf)
* hexadecimal digits
*/
static gchar *
-smtp_decode_status_code (const gchar *in, gsize len)
+smtp_decode_status_code (const gchar *in,
+ gsize len)
{
guchar *inptr, *outptr;
const guchar *inend;
@@ -864,10 +868,10 @@ smtp_decode_status_code (const gchar *in, gsize len)
}
/* converts string str to local encoding, thinking it's in utf8.
- If fails, then converts all character greater than 127 to hex values.
- Also those under 32, other than \n, \r, \t.
- Note that the c is signed character, so all characters above 127 have
- negative value.
+ * If fails, then converts all character greater than 127 to hex values.
+ * Also those under 32, other than \n, \r, \t.
+ * Note that the c is signed character, so all characters above 127 have
+ * negative value.
*/
static void
convert_to_local (GString *str)
@@ -990,7 +994,7 @@ smtp_helo (CamelSmtpTransport *transport,
socklen_t addrlen;
/* these are flags that we set, so unset them in case we
- are being called a second time (ie, after a STARTTLS) */
+ * are being called a second time (ie, after a STARTTLS) */
transport->flags &= ~(CAMEL_SMTP_TRANSPORT_8BITMIME |
CAMEL_SMTP_TRANSPORT_ENHANCEDSTATUSCODES |
CAMEL_SMTP_TRANSPORT_STARTTLS);
@@ -1379,8 +1383,8 @@ smtp_data (CamelSmtpTransport *transport,
/* FIXME: should we get the best charset too?? */
/* Changes the encoding of all mime parts to fit within our required
- encoding type and also force any text parts with long lines (longer
- than 998 octets) to wrap by QP or base64 encoding them. */
+ * encoding type and also force any text parts with long lines (longer
+ * than 998 octets) to wrap by QP or base64 encoding them. */
camel_mime_message_set_best_encoding (message, CAMEL_BESTENC_GET_ENCODING, enctype);
cmdbuf = g_strdup ("DATA\r\n");
diff --git a/camel/tests/folder/test10.c b/camel/tests/folder/test10.c
index 0243146..3fef140 100644
--- a/camel/tests/folder/test10.c
+++ b/camel/tests/folder/test10.c
@@ -32,7 +32,7 @@ worker (gpointer d)
CamelService *service;
CamelFolder *folder;
- for (i=0;i<MAX_LOOP;i++) {
+ for (i = 0; i < MAX_LOOP; i++) {
gchar *uid;
uid = g_strdup_printf ("test-uid-%d", i);
@@ -59,7 +59,8 @@ worker (gpointer d)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gint i, j;
GThread *threads[MAX_THREADS];
@@ -72,7 +73,7 @@ main (gint argc, gchar **argv)
session = camel_test_session_new ("/tmp/camel-test");
- for (testid=0;testid<2;testid++) {
+ for (testid = 0; testid < 2; testid++) {
if (testid == 0)
camel_test_start ("store and folder bag torture test, stacked references");
else
diff --git a/camel/tests/folder/test11.c b/camel/tests/folder/test11.c
index de497ce..d67bdfd 100644
--- a/camel/tests/folder/test11.c
+++ b/camel/tests/folder/test11.c
@@ -39,7 +39,8 @@ static CamelFolderInfo fi_list_3[] = {
};
static gint
-cmp_fi (gconstpointer a, gconstpointer b)
+cmp_fi (gconstpointer a,
+ gconstpointer b)
{
const CamelFolderInfo *fa = ((const CamelFolderInfo **) a)[0];
const CamelFolderInfo *fb = ((const CamelFolderInfo **) b)[0];
@@ -48,7 +49,8 @@ cmp_fi (gconstpointer a, gconstpointer b)
}
static void
-add_fi (GPtrArray *folders, CamelFolderInfo *fi)
+add_fi (GPtrArray *folders,
+ CamelFolderInfo *fi)
{
while (fi) {
g_ptr_array_add (folders, fi);
@@ -59,7 +61,9 @@ add_fi (GPtrArray *folders, CamelFolderInfo *fi)
}
static void
-check_fi (CamelFolderInfo *fi, CamelFolderInfo *list, gint len)
+check_fi (CamelFolderInfo *fi,
+ CamelFolderInfo *list,
+ gint len)
{
GPtrArray *folders = g_ptr_array_new ();
gint i;
@@ -67,7 +71,7 @@ check_fi (CamelFolderInfo *fi, CamelFolderInfo *list, gint len)
add_fi (folders, fi);
check_msg (folders->len == len, "unexpected number of folders returned from folderinfo");
qsort (folders->pdata, folders->len, sizeof (folders->pdata[0]), cmp_fi);
- for (i=0;i<len;i++) {
+ for (i = 0; i < len; i++) {
CamelFolderInfo *f = folders->pdata[i];
camel_test_push ("checking folder '%s'", list[i].display_name);
@@ -90,7 +94,8 @@ check_fi (CamelFolderInfo *fi, CamelFolderInfo *list, gint len)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
CamelFolder *f1, *f2;
CamelStore *store;
diff --git a/camel/tests/folder/test3.c b/camel/tests/folder/test3.c
index 97857f0..31e906d 100644
--- a/camel/tests/folder/test3.c
+++ b/camel/tests/folder/test3.c
@@ -9,7 +9,9 @@
#include "session.h"
static void
-test_folder_search_sub (CamelFolder *folder, const gchar *expr, gint expected)
+test_folder_search_sub (CamelFolder *folder,
+ const gchar *expr,
+ gint expected)
{
GPtrArray *uids;
GHashTable *hash;
@@ -24,7 +26,7 @@ test_folder_search_sub (CamelFolder *folder, const gchar *expr, gint expected)
/* check the uid's are actually unique, too */
hash = g_hash_table_new (g_str_hash, g_str_equal);
- for (i=0;i<uids->len;i++) {
+ for (i = 0; i < uids->len; i++) {
check (g_hash_table_lookup (hash, uids->pdata[i]) == NULL);
g_hash_table_insert (hash, uids->pdata[i], uids->pdata[i]);
}
@@ -34,7 +36,9 @@ test_folder_search_sub (CamelFolder *folder, const gchar *expr, gint expected)
}
static void
-test_folder_search (CamelFolder *folder, const gchar *expr, gint expected)
+test_folder_search (CamelFolder *folder,
+ const gchar *expr,
+ gint expected)
{
gchar *matchall;
@@ -106,16 +110,17 @@ static struct {
};
static void
-run_search (CamelFolder *folder, gint m)
+run_search (CamelFolder *folder,
+ gint m)
{
gint i, j = 0;
check (m == 50 || m == 100 || m == 0);
/* *shrug* messy, but it'll do */
- if (m==50)
+ if (m == 50)
j = 1;
- else if (m==0)
+ else if (m == 0)
j = 2;
push ("performing searches, expected %d", m);
@@ -135,7 +140,9 @@ static const gchar *stores[] = {
"maildir:///tmp/camel-test/maildir"
};
-gint main (gint argc, gchar **argv)
+gint
+main (gint argc,
+ gchar **argv)
{
CamelService *service;
CamelSession *session;
@@ -161,7 +168,7 @@ gint main (gint argc, gchar **argv)
/* we iterate over all stores we want to test, with indexing or indexing turned on or off */
for (i = 0; i < G_N_ELEMENTS (stores); i++) {
const gchar *name = stores[i];
- for (indexed = 0;indexed<2;indexed++) {
+ for (indexed = 0; indexed < 2; indexed++) {
gchar *what = g_strdup_printf ("folder search: %s (%sindexed)", name, indexed?"":"non-");
gchar *uid;
gint flags;
@@ -183,7 +190,7 @@ gint main (gint argc, gchar **argv)
push ("creating %sindexed folder", indexed?"":"non-");
if (indexed)
- flags = CAMEL_STORE_FOLDER_CREATE|CAMEL_STORE_FOLDER_BODY_INDEX;
+ flags = CAMEL_STORE_FOLDER_CREATE | CAMEL_STORE_FOLDER_BODY_INDEX;
else
flags = CAMEL_STORE_FOLDER_CREATE;
folder = camel_store_get_folder_sync (
@@ -198,7 +205,7 @@ gint main (gint argc, gchar **argv)
/* append a bunch of messages with specific content */
push ("appending 100 test messages");
- for (j=0;j<100;j++) {
+ for (j = 0; j < 100; j++) {
gchar *content, *subject;
push ("creating test message");
@@ -210,7 +217,7 @@ gint main (gint argc, gchar **argv)
subject = g_strdup_printf ("Test%d message%d subject", j, 100-j);
camel_mime_message_set_subject (msg, subject);
- camel_mime_message_set_date (msg, j*60*24, 0);
+ camel_mime_message_set_date (msg, j * 60 * 24, 0);
pull ();
push ("appending simple message %d", j);
@@ -229,21 +236,21 @@ gint main (gint argc, gchar **argv)
push ("Setting up some flags &c");
uids = camel_folder_get_uids (folder);
check (uids->len == 100);
- for (j=0;j<100;j++) {
+ for (j = 0; j < 100; j++) {
gchar *uid = uids->pdata[j];
- if ((j/13)*13 == j) {
+ if ((j / 13) * 13 == j) {
camel_folder_set_message_user_flag (folder, uid, "every13", TRUE);
}
- if ((j/17)*17 == j) {
+ if ((j / 17) * 17 == j) {
camel_folder_set_message_user_flag (folder, uid, "every17", TRUE);
}
- if ((j/7)*7 == j) {
+ if ((j / 7) * 7 == j) {
gchar *tag = g_strdup_printf ("7tag%d", j/7);
camel_folder_set_message_user_tag (folder, uid, "every7", tag);
test_free (tag);
}
- if ((j/11)*11 == j) {
+ if ((j / 11) * 11 == j) {
camel_folder_set_message_user_tag (folder, uid, "every11", "11tag");
}
}
@@ -271,7 +278,7 @@ gint main (gint argc, gchar **argv)
push ("deleting every 2nd message");
uids = camel_folder_get_uids (folder);
check (uids->len == 100);
- for (j=0;j<uids->len;j+=2) {
+ for (j = 0; j < uids->len; j+=2) {
camel_folder_delete_message (folder, uids->pdata[j]);
}
camel_folder_free_uids (folder, uids);
@@ -307,7 +314,7 @@ gint main (gint argc, gchar **argv)
push ("deleting remaining messages");
uids = camel_folder_get_uids (folder);
check (uids->len == 50);
- for (j=0;j<uids->len;j++) {
+ for (j = 0; j < uids->len; j++) {
camel_folder_delete_message (folder, uids->pdata[j]);
}
camel_folder_free_uids (folder, uids);
diff --git a/camel/tests/folder/test8.c b/camel/tests/folder/test8.c
index 75ed44d..4fc91d7 100644
--- a/camel/tests/folder/test8.c
+++ b/camel/tests/folder/test8.c
@@ -20,7 +20,8 @@ static const gchar *local_providers[] = {
};
static void
-test_add_message (CamelFolder *folder, gint j)
+test_add_message (CamelFolder *folder,
+ gint j)
{
CamelMimeMessage *msg;
gchar *content;
@@ -64,8 +65,8 @@ worker (gpointer d)
/* we add a message, search for it, twiddle some flags, delete it */
/* and flat out */
- for (i=0;i<MAX_MESSAGES;i++) {
- test_add_message (info->folder, id+i);
+ for (i = 0; i < MAX_MESSAGES; i++) {
+ test_add_message (info->folder, id + i);
sub = g_strdup_printf ("(match-all (header-contains \"subject\" \"message %08x subject\"))", id+i);
@@ -90,8 +91,8 @@ worker (gpointer d)
pull ();
push ("deleting message, cleanup");
- j=(100.0*rand ()/(RAND_MAX+1.0));
- if (j<=70) {
+ j = (100.0 * rand () / (RAND_MAX + 1.0));
+ if (j <= 70) {
camel_folder_delete_message (info->folder, res->pdata[0]);
}
@@ -103,8 +104,8 @@ worker (gpointer d)
pull ();
/* about 1-in 100 calls will expunge */
- j=(200.0*rand ()/(RAND_MAX+1.0));
- if (j<=2) {
+ j = (200.0 * rand () / (RAND_MAX + 1.0));
+ if (j <= 2) {
push ("expunging folder");
camel_folder_expunge_sync (info->folder, NULL, &error);
check_msg (error == NULL, "%s", error->message);
@@ -137,7 +138,7 @@ gint main (gint argc, gchar **argv)
session = camel_test_session_new ("/tmp/camel-test");
for (j = 0; j < G_N_ELEMENTS (local_providers); j++) {
- for (index=0;index<2;index++) {
+ for (index = 0; index < 2; index++) {
gchar *uid;
path = g_strdup_printf ("method %s %s", local_providers[j], index?"indexed":"nonindexed");
@@ -174,7 +175,7 @@ gint main (gint argc, gchar **argv)
GError *error = NULL;
info = g_malloc (sizeof (*info));
- info->id = i*MAX_MESSAGES;
+ info->id = i * MAX_MESSAGES;
info->folder = folder;
threads[i] = g_thread_create (worker, info, TRUE, &error);
@@ -194,7 +195,7 @@ gint main (gint argc, gchar **argv)
push ("deleting remaining messages");
uids = camel_folder_get_uids (folder);
- for (i=0;i<uids->len;i++) {
+ for (i = 0; i < uids->len; i++) {
camel_folder_delete_message (folder, uids->pdata[i]);
}
camel_folder_free_uids (folder, uids);
diff --git a/camel/tests/folder/test9.c b/camel/tests/folder/test9.c
index 6f5a2a3..c8157c8 100644
--- a/camel/tests/folder/test9.c
+++ b/camel/tests/folder/test9.c
@@ -134,7 +134,7 @@ gint main (gint argc, gchar **argv)
/* append a bunch of messages with specific content */
push ("creating 100 test message mbox");
mbox = camel_stream_fs_new_with_name ("/tmp/camel-test/inbox", O_WRONLY|O_CREAT|O_EXCL, 0600, NULL);
- for (j=0;j<100;j++) {
+ for (j = 0; j < 100; j++) {
gchar *content, *subject;
push ("creating test message");
@@ -146,7 +146,7 @@ gint main (gint argc, gchar **argv)
subject = g_strdup_printf ("Test%d message%d subject", j, 100-j);
camel_mime_message_set_subject (msg, subject);
- camel_mime_message_set_date (msg, j*60*24, 0);
+ camel_mime_message_set_date (msg, j * 60 * 24, 0);
pull ();
camel_stream_write_string (mbox, "From \n", NULL, NULL);
diff --git a/camel/tests/lib/address-data.h b/camel/tests/lib/address-data.h
index 9fe9dd8..605f155 100644
--- a/camel/tests/lib/address-data.h
+++ b/camel/tests/lib/address-data.h
@@ -1,6 +1,6 @@
/* BE WARY of editing this file with emacs.
- Otherwise it might be smart and try to re-encode everything, which
- you really do not want
+ * Otherwise it might be smart and try to re-encode everything, which
+ * you really do not want
*/
static struct _a {
diff --git a/camel/tests/lib/addresses.c b/camel/tests/lib/addresses.c
index 3dfcf81..467d73e 100644
--- a/camel/tests/lib/addresses.c
+++ b/camel/tests/lib/addresses.c
@@ -6,14 +6,15 @@
#include "camel-test.h"
void
-test_address_compare (CamelInternetAddress *addr, CamelInternetAddress *addr2)
+test_address_compare (CamelInternetAddress *addr,
+ CamelInternetAddress *addr2)
{
const gchar *r1, *r2, *a1, *a2;
gchar *e1, *e2, *f1, *f2;
gint j;
check (camel_address_length (CAMEL_ADDRESS (addr)) == camel_address_length (CAMEL_ADDRESS (addr2)));
- for (j=0;j<camel_address_length (CAMEL_ADDRESS (addr));j++) {
+ for (j = 0; j < camel_address_length (CAMEL_ADDRESS (addr)); j++) {
check (camel_internet_address_get (addr, j, &r1, &a1) == TRUE);
check (camel_internet_address_get (addr2, j, &r2, &a2) == TRUE);
diff --git a/camel/tests/lib/camel-test-provider.c b/camel/tests/lib/camel-test-provider.c
index db3621f..06834e8 100644
--- a/camel/tests/lib/camel-test-provider.c
+++ b/camel/tests/lib/camel-test-provider.c
@@ -2,13 +2,14 @@
#include "camel-test.h"
void
-camel_test_provider_init (gint argc, const gchar **argv)
+camel_test_provider_init (gint argc,
+ const gchar **argv)
{
gchar *name, *path;
gint i;
GError *error = NULL;
- for (i=0;i<argc;i++) {
+ for (i = 0; i < argc; i++) {
name = g_strdup_printf("libcamel%s."G_MODULE_SUFFIX, argv[i]);
path = g_build_filename(CAMEL_BUILD_DIR, "providers", argv[i], ".libs", name, NULL);
g_free (name);
diff --git a/camel/tests/lib/camel-test.c b/camel/tests/lib/camel-test.c
index c57dabc..16caf79 100644
--- a/camel/tests/lib/camel-test.c
+++ b/camel/tests/lib/camel-test.c
@@ -11,7 +11,7 @@
/* well i dunno, doesn't seem to be in the headers but hte manpage mentions it */
/* a nonportable checking mutex for glibc, not really needed, just validates
- the test harness really */
+ * the test harness really */
static GStaticMutex lock = G_STATIC_MUTEX_INIT;
#define CAMEL_TEST_LOCK g_static_mutex_lock(&lock)
#define CAMEL_TEST_UNLOCK g_static_mutex_unlock(&lock)
@@ -38,7 +38,9 @@ static GHashTable *info_table;
gint camel_test_verbose;
static void
-dump_action (GThread *thread, struct _state *s, gpointer d)
+dump_action (GThread *thread,
+ struct _state *s,
+ gpointer d)
{
struct _stack *node;
@@ -91,7 +93,8 @@ current_state (void)
}
void
-camel_test_init (gint argc, gchar **argv)
+camel_test_init (gint argc,
+ gchar **argv)
{
struct stat st;
gchar *path;
@@ -124,7 +127,7 @@ camel_test_init (gint argc, gchar **argv)
/* default, just say what, how well we did, unless fail, then abort */
camel_test_verbose = 1;
- for (i=0;i<argc;i++) {
+ for (i = 0; i < argc; i++) {
if (argv[i][0] == '-') {
switch (argv[i][1]) {
case 'v':
@@ -255,7 +258,7 @@ void camel_test_failv (const gchar *why, va_list ap)
if (s->nonfatal == 0) {
exit (1);
} else {
- ok=0;
+ ok = 0;
if (camel_test_verbose > 1) {
printf("Known problem (ignored):\n");
dump_action (CAMEL_TEST_ID, s, 0);
@@ -334,7 +337,7 @@ gint string_equal (const gchar *a, const gchar *b)
if (ap - a != bp - a
&& ap - 1 > 0
- && memcmp (a, b, ap-a) != 0) {
+ && memcmp (a, b, ap - a) != 0) {
return 0;
}
}
diff --git a/camel/tests/lib/folders.c b/camel/tests/lib/folders.c
index 6ccda3f..1340a45 100644
--- a/camel/tests/lib/folders.c
+++ b/camel/tests/lib/folders.c
@@ -6,7 +6,9 @@
/* check the total/unread is what we think it should be */
void
-test_folder_counts (CamelFolder *folder, gint total, gint unread)
+test_folder_counts (CamelFolder *folder,
+ gint total,
+ gint unread)
{
GPtrArray *s;
gint i, myunread;
@@ -19,7 +21,7 @@ test_folder_counts (CamelFolder *folder, gint total, gint unread)
check (s != NULL);
check (s->len == total);
myunread = s->len;
- for (i=0;i<s->len;i++) {
+ for (i = 0; i < s->len; i++) {
info = s->pdata[i];
if (camel_message_info_flags (info) & CAMEL_MESSAGE_SEEN)
myunread--;
@@ -32,7 +34,7 @@ test_folder_counts (CamelFolder *folder, gint total, gint unread)
check (s != NULL);
check (s->len == total);
myunread = s->len;
- for (i=0;i<s->len;i++) {
+ for (i = 0; i < s->len; i++) {
info = camel_folder_get_message_info (folder, s->pdata[i]);
if (camel_message_info_flags (info) & CAMEL_MESSAGE_SEEN)
myunread--;
@@ -45,7 +47,8 @@ test_folder_counts (CamelFolder *folder, gint total, gint unread)
}
static gint
-safe_strcmp (const gchar *a, const gchar *b)
+safe_strcmp (const gchar *a,
+ const gchar *b)
{
if (a == NULL && b == NULL)
return 0;
@@ -57,7 +60,8 @@ safe_strcmp (const gchar *a, const gchar *b)
}
void
-test_message_info (CamelMimeMessage *msg, const CamelMessageInfo *info)
+test_message_info (CamelMimeMessage *msg,
+ const CamelMessageInfo *info)
{
check_msg (safe_strcmp (camel_message_info_subject (info), camel_mime_message_get_subject (msg)) == 0,
"info->subject = '%s', get_subject () = '%s'", camel_message_info_subject (info), camel_mime_message_get_subject (msg));
@@ -74,7 +78,8 @@ test_message_info (CamelMimeMessage *msg, const CamelMessageInfo *info)
/* check a message is present */
void
-test_folder_message (CamelFolder *folder, const gchar *uid)
+test_folder_message (CamelFolder *folder,
+ const gchar *uid)
{
CamelMimeMessage *msg;
CamelMessageInfo *info;
@@ -105,7 +110,7 @@ test_folder_message (CamelFolder *folder, const gchar *uid)
s = camel_folder_get_summary (folder);
check (s != NULL);
found = 0;
- for (i=0;i<s->len;i++) {
+ for (i = 0; i < s->len; i++) {
info = s->pdata[i];
if (strcmp (camel_message_info_uid (info), uid) == 0)
found++;
@@ -117,7 +122,7 @@ test_folder_message (CamelFolder *folder, const gchar *uid)
s = camel_folder_get_uids (folder);
check (s != NULL);
found = 0;
- for (i=0;i<s->len;i++) {
+ for (i = 0; i < s->len; i++) {
if (strcmp (s->pdata[i], uid) == 0)
found++;
}
@@ -131,7 +136,8 @@ test_folder_message (CamelFolder *folder, const gchar *uid)
/* check message not present */
void
-test_folder_not_message (CamelFolder *folder, const gchar *uid)
+test_folder_not_message (CamelFolder *folder,
+ const gchar *uid)
{
CamelMimeMessage *msg;
CamelMessageInfo *info;
@@ -161,7 +167,7 @@ test_folder_not_message (CamelFolder *folder, const gchar *uid)
s = camel_folder_get_summary (folder);
check (s != NULL);
found = 0;
- for (i=0;i<s->len;i++) {
+ for (i = 0; i < s->len; i++) {
info = s->pdata[i];
if (strcmp (camel_message_info_uid (info), uid) == 0)
found++;
@@ -175,7 +181,7 @@ test_folder_not_message (CamelFolder *folder, const gchar *uid)
s = camel_folder_get_uids (folder);
check (s != NULL);
found = 0;
- for (i=0;i<s->len;i++) {
+ for (i = 0; i < s->len; i++) {
if (strcmp (s->pdata[i], uid) == 0)
found++;
}
@@ -191,7 +197,10 @@ test_folder_not_message (CamelFolder *folder, const gchar *uid)
/* test basic store operations on folders */
/* TODO: Add subscription stuff */
void
-test_folder_basic (CamelSession *session, const gchar *storename, gint local, gint spool)
+test_folder_basic (CamelSession *session,
+ const gchar *storename,
+ gint local,
+ gint spool)
{
CamelStore *store;
CamelFolder *folder;
@@ -328,7 +337,10 @@ test_folder_basic (CamelSession *session, const gchar *storename, gint local, gi
/* todo: cross-check everything with folder_info checks as well */
/* this should probably take a folder instead of a session ... */
void
-test_folder_message_ops (CamelSession *session, const gchar *name, gint local, const gchar *mailbox)
+test_folder_message_ops (CamelSession *session,
+ const gchar *name,
+ gint local,
+ const gchar *mailbox)
{
CamelStore *store;
CamelService *service;
@@ -340,9 +352,9 @@ test_folder_message_ops (CamelSession *session, const gchar *name, gint local, c
CamelMessageInfo *info;
GError *error = NULL;
- max=local?2:1;
+ max = local ? 2 : 1;
- for (indexed = 0;indexed<max;indexed++) {
+ for (indexed = 0; indexed < max; indexed++) {
gchar *what = g_strdup_printf ("folder ops: %s %s", name, local?(indexed?"indexed":"non-indexed"):"");
gint flags;
@@ -360,14 +372,14 @@ test_folder_message_ops (CamelSession *session, const gchar *name, gint local, c
push ("creating %sindexed folder", indexed?"":"non-");
if (indexed)
- flags = CAMEL_STORE_FOLDER_CREATE|CAMEL_STORE_FOLDER_BODY_INDEX;
+ flags = CAMEL_STORE_FOLDER_CREATE | CAMEL_STORE_FOLDER_BODY_INDEX;
else
flags = CAMEL_STORE_FOLDER_CREATE;
folder = camel_store_get_folder_sync (
store, mailbox, flags, NULL, &error);
/* we can't create mailbox outside of namespace, since we have no api for it, try
- using inbox namespace, works for courier */
+ * using inbox namespace, works for courier */
if (folder == NULL) {
gchar *mbox = g_strdup_printf ("INBOX/%s", mailbox);
mailbox = mbox;
@@ -384,7 +396,7 @@ test_folder_message_ops (CamelSession *session, const gchar *name, gint local, c
test_folder_not_message (folder, "0");
test_folder_not_message (folder, "");
- for (j=0;j<10;j++) {
+ for (j = 0; j < 10; j++) {
gchar *content, *subject;
push ("creating test message");
@@ -414,7 +426,7 @@ test_folder_message_ops (CamelSession *session, const gchar *name, gint local, c
/*if (!local)
camel_test_nonfatal ("unread counts dont seem right for imap");*/
- test_folder_counts (folder, j+1, j+1);
+ test_folder_counts (folder, j + 1, j + 1);
/*if (!local)
camel_test_fatal ();*/
@@ -422,7 +434,7 @@ test_folder_message_ops (CamelSession *session, const gchar *name, gint local, c
push ("checking it is in the right uid slot & exists");
uids = camel_folder_get_uids (folder);
check (uids != NULL);
- check (uids->len == j+1);
+ check (uids->len == j + 1);
if (uids->len > j)
test_folder_message (folder, uids->pdata[j]);
pull ();
@@ -431,7 +443,7 @@ test_folder_message_ops (CamelSession *session, const gchar *name, gint local, c
if (uids->len > j) {
info = camel_folder_get_message_info (folder, uids->pdata[j]);
check (info != NULL);
- check_msg (strcmp (camel_message_info_subject (info), subject)==0,
+ check_msg (strcmp (camel_message_info_subject (info), subject) == 0,
"info->subject %s", camel_message_info_subject (info));
camel_folder_free_message_info (folder, info);
}
@@ -475,14 +487,14 @@ test_folder_message_ops (CamelSession *session, const gchar *name, gint local, c
uids = camel_folder_get_uids (folder);
check (uids != NULL);
check (uids->len == 10);
- for (j=0;j<10;j++) {
+ for (j = 0; j < 10; j++) {
gchar *subject = g_strdup_printf ("Test message %d", j);
push ("verify reload of %s", subject);
test_folder_message (folder, uids->pdata[j]);
info = camel_folder_get_message_info (folder, uids->pdata[j]);
- check_msg (strcmp (camel_message_info_subject (info), subject)==0,
+ check_msg (strcmp (camel_message_info_subject (info), subject) == 0,
"info->subject %s", camel_message_info_subject (info));
test_free (subject);
camel_folder_free_message_info (folder, info);
@@ -503,14 +515,14 @@ test_folder_message_ops (CamelSession *session, const gchar *name, gint local, c
uids = camel_folder_get_uids (folder);
check (uids != NULL);
check (uids->len == 9);
- for (j=0;j<9;j++) {
+ for (j = 0; j < 9; j++) {
gchar *subject = g_strdup_printf ("Test message %d", j+1);
push ("verify after expunge of %s", subject);
test_folder_message (folder, uids->pdata[j]);
info = camel_folder_get_message_info (folder, uids->pdata[j]);
- check_msg (strcmp (camel_message_info_subject (info), subject)==0,
+ check_msg (strcmp (camel_message_info_subject (info), subject) == 0,
"info->subject %s", camel_message_info_subject (info));
test_free (subject);
camel_folder_free_message_info (folder, info);
@@ -533,14 +545,14 @@ test_folder_message_ops (CamelSession *session, const gchar *name, gint local, c
uids = camel_folder_get_uids (folder);
check (uids != NULL);
check (uids->len == 8);
- for (j=0;j<8;j++) {
+ for (j = 0; j < 8; j++) {
gchar *subject = g_strdup_printf ("Test message %d", j+1);
push ("verify after expunge of %s", subject);
test_folder_message (folder, uids->pdata[j]);
info = camel_folder_get_message_info (folder, uids->pdata[j]);
- check_msg (strcmp (camel_message_info_subject (info), subject)==0,
+ check_msg (strcmp (camel_message_info_subject (info), subject) == 0,
"info->subject %s", camel_message_info_subject (info));
test_free (subject);
camel_folder_free_message_info (folder, info);
@@ -549,7 +561,7 @@ test_folder_message_ops (CamelSession *session, const gchar *name, gint local, c
pull ();
push ("deleting all messages & expunging");
- for (j=0;j<8;j++) {
+ for (j = 0; j < 8; j++) {
camel_folder_delete_message (folder, uids->pdata[j]);
}
/* sync? */
@@ -557,7 +569,7 @@ test_folder_message_ops (CamelSession *session, const gchar *name, gint local, c
camel_folder_expunge_sync (folder, NULL, &error);
check_msg (error == NULL, "%s", error->message);
g_clear_error (&error);
- for (j=0;j<8;j++) {
+ for (j = 0; j < 8; j++) {
test_folder_not_message (folder, uids->pdata[j]);
}
test_folder_counts (folder, 0, 0);
diff --git a/camel/tests/lib/messages.c b/camel/tests/lib/messages.c
index 8241636..d39329e 100644
--- a/camel/tests/lib/messages.c
+++ b/camel/tests/lib/messages.c
@@ -39,7 +39,11 @@ content_weak_notify (GByteArray *ba,
}
void
-test_message_set_content_simple (CamelMimePart *part, gint how, const gchar *type, const gchar *text, gint len)
+test_message_set_content_simple (CamelMimePart *part,
+ gint how,
+ const gchar *type,
+ const gchar *text,
+ gint len)
{
CamelStreamMem *content = NULL;
CamelDataWrapper *dw;
@@ -90,13 +94,14 @@ test_message_set_content_simple (CamelMimePart *part, gint how, const gchar *typ
}
gint
-test_message_write_file (CamelMimeMessage *msg, const gchar *name)
+test_message_write_file (CamelMimeMessage *msg,
+ const gchar *name)
{
CamelStream *stream;
gint ret;
stream = camel_stream_fs_new_with_name (
- name, O_CREAT|O_WRONLY, 0600, NULL);
+ name, O_CREAT | O_WRONLY, 0600, NULL);
camel_data_wrapper_write_to_stream_sync (
CAMEL_DATA_WRAPPER (msg), stream, NULL, NULL);
ret = camel_stream_close (stream, NULL, NULL);
@@ -126,7 +131,8 @@ test_message_read_file (const gchar *name)
}
static void
-hexdump (const guchar *in, gint inlen)
+hexdump (const guchar *in,
+ gint inlen)
{
const guchar *inptr = in, *start = inptr;
const guchar *inend = in + inlen;
@@ -156,13 +162,15 @@ hexdump (const guchar *in, gint inlen)
}
gint
-test_message_compare_content (CamelDataWrapper *dw, const gchar *text, gint len)
+test_message_compare_content (CamelDataWrapper *dw,
+ const gchar *text,
+ gint len)
{
GByteArray *byte_array;
CamelStream *stream;
/* sigh, ok, so i len == 0, dw will probably be 0 too
- camel_mime_part_set_content is weird like that */
+ * camel_mime_part_set_content is weird like that */
if (dw == 0 && len == 0)
return 0;
@@ -244,26 +252,30 @@ test_message_compare (CamelMimeMessage *msg)
}
gint
-test_message_compare_header (CamelMimeMessage *m1, CamelMimeMessage *m2)
+test_message_compare_header (CamelMimeMessage *m1,
+ CamelMimeMessage *m2)
{
return 0;
}
gint
-test_message_compare_messages (CamelMimeMessage *m1, CamelMimeMessage *m2)
+test_message_compare_messages (CamelMimeMessage *m1,
+ CamelMimeMessage *m2)
{
return 0;
}
static void
-message_dump_rec (CamelMimeMessage *msg, CamelMimePart *part, gint depth)
+message_dump_rec (CamelMimeMessage *msg,
+ CamelMimePart *part,
+ gint depth)
{
CamelDataWrapper *containee;
gint parts, i;
gchar *s;
gchar *mime_type;
- s = alloca (depth+1);
+ s = alloca (depth + 1);
memset (s, ' ', depth);
s[depth] = 0;
@@ -291,10 +303,10 @@ message_dump_rec (CamelMimeMessage *msg, CamelMimePart *part, gint depth)
for (i = 0; i < parts; i++) {
CamelMimePart *part = camel_multipart_get_part (CAMEL_MULTIPART (containee), i);
- message_dump_rec (msg, part, depth+1);
+ message_dump_rec (msg, part, depth + 1);
}
} else if (CAMEL_IS_MIME_MESSAGE (containee)) {
- message_dump_rec (msg, (CamelMimePart *) containee, depth+1);
+ message_dump_rec (msg, (CamelMimePart *) containee, depth + 1);
}
}
diff --git a/camel/tests/message/test1.c b/camel/tests/message/test1.c
index 0fc7522..8841fdb 100644
--- a/camel/tests/message/test1.c
+++ b/camel/tests/message/test1.c
@@ -1,16 +1,16 @@
/*
test1.c
-
+ *
Create a message, save it.
-
+ *
Retrieve message, compare content.
-
+ *
Operations:
- writing/loading from different types of streams
- reading/writing different content
- reading/writing different encodings
- reading/writing different charsets
-
+ writing / loading from different types of streams
+ reading / writing different content
+ reading / writing different encodings
+ reading / writing different charsets
+ *
Just testing streams:
different stream types
different file ops
@@ -71,18 +71,18 @@ setup (void)
srand (42);
p = texts[12].text = g_malloc (1024);
- for (i=0;i<1024;i++) {
+ for (i = 0; i < 1024; i++) {
j = rand ();
- if (j<RAND_MAX/120)
+ if (j < RAND_MAX / 120)
*p++ = '\n';
else
*p++ = (j % 95) + 32;
}
texts[12].len = 1024;
p = texts[13].text = g_malloc (102400);
- for (i=0;i<102400;i++) {
+ for (i = 0; i < 102400; i++) {
j = rand ();
- if (j<RAND_MAX/120)
+ if (j < RAND_MAX / 120)
*p++ = '\n';
else
*p++ = (j % 95) + 32;
@@ -100,7 +100,8 @@ cleanup (void)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
CamelMimeMessage *msg, *msg2;
gint i, j;
@@ -114,11 +115,11 @@ main (gint argc, gchar **argv)
camel_test_start("Simple memory-based content creation");
/* test all ways of setting simple content for a message (i.e. memory based) */
- for (j=0;j<MAX_TEXTS;j++) {
+ for (j = 0; j < MAX_TEXTS; j++) {
push("testing text number %d", j);
text = texts[j].text;
len = texts[j].len;
- for (i=0;i<SET_CONTENT_WAYS;i++) {
+ for (i = 0; i < SET_CONTENT_WAYS; i++) {
push("create simple message %d", i);
msg = test_message_create_simple ();
@@ -154,11 +155,11 @@ main (gint argc, gchar **argv)
camel_test_end ();
camel_test_start("Different encodings");
- for (j=0;j<MAX_TEXTS;j++) {
+ for (j = 0; j < MAX_TEXTS; j++) {
push("testing text number %d", j);
text = texts[j].text;
len = texts[j].len;
- for (i=0;i<CAMEL_TRANSFER_NUM_ENCODINGS;i++) {
+ for (i = 0; i < CAMEL_TRANSFER_NUM_ENCODINGS; i++) {
push("test simple message, encoding %s", camel_transfer_encoding_to_string(i));
msg = test_message_create_simple ();
diff --git a/camel/tests/message/test2.c b/camel/tests/message/test2.c
index aa6879f..8ac4af3 100644
--- a/camel/tests/message/test2.c
+++ b/camel/tests/message/test2.c
@@ -18,11 +18,11 @@ static gchar *convert (const gchar *in, const gchar *from, const gchar *to)
const gchar *inp;
gsize inlen, outlen;
- if (ic == (iconv_t)-1)
+ if (ic == (iconv_t) - 1)
return g_strdup (in);
inlen = strlen (in);
- outlen = inlen*5 + 16;
+ outlen = inlen * 5 + 16;
outp = out = g_malloc (outlen);
inp = in;
@@ -49,12 +49,12 @@ static gchar *convert (const gchar *in, const gchar *from, const gchar *to)
gchar *nout, *noutp;
iconv_t ic = iconv_open (from, to);
- if (ic == (iconv_t)-1)
+ if (ic == (iconv_t) - 1)
goto fail;
inp = out;
inlen = strlen (out);
- outlen = inlen*5 + 16;
+ outlen = inlen * 5 + 16;
noutp = nout = g_malloc (outlen);
if (iconv (ic, &inp, &inlen, &noutp, &outlen) == -1
|| iconv (ic, NULL, 0, &noutp, &outlen) == -1) {
@@ -75,7 +75,10 @@ fail:
}
static void
-check_address_line_decode (gint i, const gchar *line, const gchar *name, const gchar *email)
+check_address_line_decode (gint i,
+ const gchar *line,
+ const gchar *name,
+ const gchar *email)
{
CamelInternetAddress *addr;
const gchar *dname, *demail;
@@ -136,12 +139,12 @@ gint main (gint argc, gchar **argv)
pull ();
push("Test add many");
- for (i=1;i<10;i++) {
+ for (i = 1; i < 10; i++) {
gchar name[16], a[32];
sprintf(name, "Zed %d", i);
sprintf(a, "nowhere here-%d com au", i);
camel_internet_address_add (addr, name, a);
- check (camel_address_length (CAMEL_ADDRESS (addr)) == i+1);
+ check (camel_address_length (CAMEL_ADDRESS (addr)) == i + 1);
check (camel_internet_address_get (addr, i, &real, &where) == TRUE);
check_msg(string_equal(name, real), "name = '%s' real = '%s'", name, real);
check (strcmp (where, a) == 0);
@@ -233,7 +236,7 @@ gint main (gint argc, gchar **argv)
camel_test_start("CamelInternetAddress, I18N");
- for (i = 0;i < G_N_ELEMENTS (test_lines); i++) {
+ for (i = 0; i < G_N_ELEMENTS (test_lines); i++) {
push("Testing text line %d (%s) '%s'", i, test_lines[i].type, test_lines[i].line);
addr = camel_internet_address_new ();
diff --git a/camel/tests/message/test4.c b/camel/tests/message/test4.c
index 7485e63..0b14a32 100644
--- a/camel/tests/message/test4.c
+++ b/camel/tests/message/test4.c
@@ -32,7 +32,8 @@
#if 0
static void
-dump_mime_struct (CamelMimePart *mime_part, gint depth)
+dump_mime_struct (CamelMimePart *mime_part,
+ gint depth)
{
CamelDataWrapper *content;
gchar *mime_type;
diff --git a/camel/tests/mime-filter/test-charset.c b/camel/tests/mime-filter/test-charset.c
index 0ad1bdb..d2624df 100644
--- a/camel/tests/mime-filter/test-charset.c
+++ b/camel/tests/mime-filter/test-charset.c
@@ -1,8 +1,8 @@
/*
- test-crlf.c
-
- Test the CamelMimeFilterCharset class
-*/
+ * test-crlf.c
+ *
+ * Test the CamelMimeFilterCharset class
+ */
#include <stdio.h>
#include <string.h>
@@ -16,7 +16,8 @@
#define CHUNK_SIZE 4096
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gssize comp_progress, comp_correct_chunk, comp_filter_chunk;
gchar comp_correct[CHUNK_SIZE], comp_filter[CHUNK_SIZE];
diff --git a/camel/tests/mime-filter/test-crlf.c b/camel/tests/mime-filter/test-crlf.c
index 9acb6c3..7928d65 100644
--- a/camel/tests/mime-filter/test-crlf.c
+++ b/camel/tests/mime-filter/test-crlf.c
@@ -1,6 +1,6 @@
/*
- test-crlf.c
-
+ test - crlf.c
+ *
Test the CamelMimeFilterCrlf class
*/
@@ -21,7 +21,8 @@ enum {
};
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
CamelStream *source;
CamelStream *correct;
diff --git a/camel/tests/mime-filter/test-tohtml.c b/camel/tests/mime-filter/test-tohtml.c
index 42a8d27..ba4f7a8 100644
--- a/camel/tests/mime-filter/test-tohtml.c
+++ b/camel/tests/mime-filter/test-tohtml.c
@@ -1,8 +1,8 @@
/*
- test-html.c
-
- Test the CamelMimeFilterToHTML class
-*/
+ * test - html.c
+ *
+ * Test the CamelMimeFilterToHTML class
+ */
#include <sys/stat.h>
#include <unistd.h>
@@ -19,7 +19,9 @@
#define CHUNK_SIZE 4096
static void
-test_filter (CamelMimeFilter *f, const gchar *inname, const gchar *outname)
+test_filter (CamelMimeFilter *f,
+ const gchar *inname,
+ const gchar *outname)
{
CamelStream *in, *out;
CamelStream *indisk, *outdisk, *filter;
@@ -101,7 +103,8 @@ test_filter (CamelMimeFilter *f, const gchar *inname, const gchar *outname)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gint i;
@@ -109,7 +112,7 @@ main (gint argc, gchar **argv)
camel_test_start("HTML Stream filtering");
- for (i=0;i<100;i++) {
+ for (i = 0; i < 100; i++) {
gchar inname[32], outname[32];
CamelMimeFilter *f;
struct stat st;
diff --git a/camel/tests/mime-filter/test1.c b/camel/tests/mime-filter/test1.c
index 4fda01f..e9ac7c1 100644
--- a/camel/tests/mime-filter/test1.c
+++ b/camel/tests/mime-filter/test1.c
@@ -1,8 +1,8 @@
/*
- test-crlf.c
-
- Test the CamelMimeFilterCanon class
-*/
+ * test-crlf.c
+ *
+ * Test the CamelMimeFilterCanon class
+ */
#include <stdio.h>
#include <string.h>
@@ -19,13 +19,13 @@ struct {
const gchar *in;
const gchar *out;
} tests[] = {
- { CAMEL_MIME_FILTER_CANON_FROM|CAMEL_MIME_FILTER_CANON_CRLF,
+ { CAMEL_MIME_FILTER_CANON_FROM | CAMEL_MIME_FILTER_CANON_CRLF,
"From \nRussia - with love.\n\n",
"=46rom \r\nRussia - with love.\r\n\r\n" },
- { CAMEL_MIME_FILTER_CANON_FROM|CAMEL_MIME_FILTER_CANON_CRLF,
+ { CAMEL_MIME_FILTER_CANON_FROM | CAMEL_MIME_FILTER_CANON_CRLF,
"From \r\nRussia - with love.\r\n\n",
"=46rom \r\nRussia - with love.\r\n\r\n" },
- { CAMEL_MIME_FILTER_CANON_FROM|CAMEL_MIME_FILTER_CANON_CRLF,
+ { CAMEL_MIME_FILTER_CANON_FROM | CAMEL_MIME_FILTER_CANON_CRLF,
"Tasmiania with fur \nFrom",
"Tasmiania with fur \r\nFrom" },
{ CAMEL_MIME_FILTER_CANON_FROM,
@@ -34,22 +34,23 @@ struct {
{ CAMEL_MIME_FILTER_CANON_CRLF,
"Tasmiania with fur \nFrom",
"Tasmiania with fur \r\nFrom" },
- { CAMEL_MIME_FILTER_CANON_FROM|CAMEL_MIME_FILTER_CANON_CRLF,
+ { CAMEL_MIME_FILTER_CANON_FROM | CAMEL_MIME_FILTER_CANON_CRLF,
"Tasmiania with fur \nFrom here",
"Tasmiania with fur \r\n=46rom here" },
- { CAMEL_MIME_FILTER_CANON_FROM|CAMEL_MIME_FILTER_CANON_CRLF|CAMEL_MIME_FILTER_CANON_STRIP,
+ { CAMEL_MIME_FILTER_CANON_FROM | CAMEL_MIME_FILTER_CANON_CRLF | CAMEL_MIME_FILTER_CANON_STRIP,
"Tasmiania with fur \nFrom here",
"Tasmiania with fur\r\n=46rom here" },
- { CAMEL_MIME_FILTER_CANON_FROM|CAMEL_MIME_FILTER_CANON_CRLF|CAMEL_MIME_FILTER_CANON_STRIP,
+ { CAMEL_MIME_FILTER_CANON_FROM | CAMEL_MIME_FILTER_CANON_CRLF | CAMEL_MIME_FILTER_CANON_STRIP,
"Tasmiania with fur \nFrom here\n",
"Tasmiania with fur\r\n=46rom here\r\n" },
- { CAMEL_MIME_FILTER_CANON_FROM|CAMEL_MIME_FILTER_CANON_CRLF|CAMEL_MIME_FILTER_CANON_STRIP,
+ { CAMEL_MIME_FILTER_CANON_FROM | CAMEL_MIME_FILTER_CANON_CRLF | CAMEL_MIME_FILTER_CANON_STRIP,
"Tasmiania with fur \nFrom here or there ? \n",
"Tasmiania with fur\r\n=46rom here or there ?\r\n" },
};
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
CamelStream *stream;
CamelMimeFilter *sh;
@@ -65,7 +66,7 @@ main (gint argc, gchar **argv)
camel_test_push ("Data test %d '%s'\n", i, tests[i].in);
/* try all write sizes */
- for (step=1;step<20;step++) {
+ for (step = 1; step < 20; step++) {
GByteArray *byte_array;
CamelStream *out;
const gchar *p;
diff --git a/camel/tests/misc/split.c b/camel/tests/misc/split.c
index d259223..f88f629 100644
--- a/camel/tests/misc/split.c
+++ b/camel/tests/misc/split.c
@@ -50,7 +50,8 @@ static struct {
};
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gint i, j;
struct _camel_search_words *words, *tmp;
@@ -66,7 +67,7 @@ main (gint argc, gchar **argv)
check (words != NULL);
check_msg(words->len == split_tests[i].count, "words->len = %d, count = %d", words->len, split_tests[i].count);
- for (j=0;j<words->len;j++) {
+ for (j = 0; j < words->len; j++) {
check_msg (strcmp (split_tests[i].splits[j].word, words->words[j]->word) == 0,
"'%s' != '%s'", split_tests[i].splits[j].word, words->words[j]->word);
check (split_tests[i].splits[j].type == words->words[j]->type);
@@ -90,7 +91,7 @@ main (gint argc, gchar **argv)
check (words != NULL);
check_msg(words->len == simple_tests[i].count, "words->len = %d, count = %d", words->len, simple_tests[i].count);
- for (j=0;j<words->len;j++) {
+ for (j = 0; j < words->len; j++) {
check_msg (strcmp (simple_tests[i].splits[j].word, words->words[j]->word) == 0,
"'%s' != '%s'", simple_tests[i].splits[j].word, words->words[j]->word);
check (simple_tests[i].splits[j].type == words->words[j]->type);
diff --git a/camel/tests/misc/test1.c b/camel/tests/misc/test1.c
index 3b1fd0c..2812a54 100644
--- a/camel/tests/misc/test1.c
+++ b/camel/tests/misc/test1.c
@@ -25,7 +25,8 @@ struct {
};
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gint i, j;
@@ -39,7 +40,7 @@ main (gint argc, gchar **argv)
camel_test_push("references decoding[%d] '%s'", i, test1[i].header);
head = camel_header_references_decode (test1[i].header);
node = head;
- for (j=0;test1[i].values[j];j++) {
+ for (j = 0; test1[i].values[j]; j++) {
check_msg(node != NULL, "didn't find all references");
check (strcmp (test1[i].values[j], node->id) == 0);
node = node->next;
diff --git a/camel/tests/misc/test2.c b/camel/tests/misc/test2.c
index a142894..8c274be 100644
--- a/camel/tests/misc/test2.c
+++ b/camel/tests/misc/test2.c
@@ -9,7 +9,7 @@
#include "camel-test.h"
/* NB: We know which order the params will be decoded in, plain in the order they come,
- and rfc2184 encoded following those, sorted lexigraphically */
+ * and rfc2184 encoded following those, sorted lexigraphically */
struct {
const gchar *list;
gint count;
@@ -62,7 +62,8 @@ struct {
};
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gint i, j;
@@ -77,10 +78,10 @@ main (gint argc, gchar **argv)
head = camel_header_param_list_decode (test1[i].list);
check (head != NULL);
node = head;
- for (j=0;j<test1[i].count;j++) {
+ for (j = 0; j < test1[i].count; j++) {
check_msg(node != NULL, "didn't find all params");
- check (strcmp (node->name, test1[i].params[j*2]) == 0);
- check (strcmp (node->value, test1[i].params[j*2+1]) == 0);
+ check (strcmp (node->name, test1[i].params[j * 2]) == 0);
+ check (strcmp (node->value, test1[i].params[j * 2 + 1]) == 0);
node = node->next;
}
check_msg(node == NULL, "found more params than should have");
@@ -98,10 +99,10 @@ main (gint argc, gchar **argv)
camel_test_push("param encoding[%d]", i);
- for (j=0;j<test2[i].count;j++)
- camel_header_set_param (&head, test2[i].params[j*2], test2[i].params[j*2+1]);
+ for (j = 0; j < test2[i].count; j++)
+ camel_header_set_param (&head, test2[i].params[j * 2], test2[i].params[j * 2 + 1]);
scan = head;
- for (j=0;scan;j++)
+ for (j = 0; scan; j++)
scan = scan->next;
check (j == test2[i].count);
diff --git a/camel/tests/misc/url.c b/camel/tests/misc/url.c
index 37762b9..44e4840 100644
--- a/camel/tests/misc/url.c
+++ b/camel/tests/misc/url.c
@@ -69,7 +69,8 @@ struct {
};
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
CamelURL *base_url, *url;
gchar *url_string;
diff --git a/camel/tests/misc/utf7.c b/camel/tests/misc/utf7.c
index bad56d8..ce96a86 100644
--- a/camel/tests/misc/utf7.c
+++ b/camel/tests/misc/utf7.c
@@ -40,7 +40,8 @@ static struct {
};
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
const gchar *p;
gchar *utf8, *utf7;
@@ -61,7 +62,7 @@ main (gint argc, gchar **argv)
p = tests[i].utf8;
j = 0;
do {
- u = camel_utf8_getc ((const guchar **)&p);
+ u = camel_utf8_getc ((const guchar **) &p);
check (u == tests[i].unicode[j]);
j++;
} while (u);
@@ -87,7 +88,7 @@ main (gint argc, gchar **argv)
j = 0;
do {
u = tests[i].unicode[j++];
- camel_utf8_putc ((guchar **)&p, u);
+ camel_utf8_putc ((guchar **) &p, u);
g_string_append_u (out, u);
} while (u);
diff --git a/camel/tests/smime/pgp-mime.c b/camel/tests/smime/pgp-mime.c
index 9576d12..408ebef 100644
--- a/camel/tests/smime/pgp-mime.c
+++ b/camel/tests/smime/pgp-mime.c
@@ -91,8 +91,12 @@ camel_pgp_session_get_type (void)
}
static gchar *
-get_password (CamelSession *session, const gchar *prompt, guint32 flags,
- CamelService *service, const gchar *item, GError **error)
+get_password (CamelSession *session,
+ const gchar *prompt,
+ guint32 flags,
+ CamelService *service,
+ const gchar *item,
+ GError **error)
{
return g_strdup ("no.secret");
}
diff --git a/camel/tests/smime/pkcs7.c b/camel/tests/smime/pkcs7.c
index dd31188..1f56c5b 100644
--- a/camel/tests/smime/pkcs7.c
+++ b/camel/tests/smime/pkcs7.c
@@ -60,8 +60,12 @@ camel_test_session_get_type (void)
}
static gchar *
-get_password (CamelSession *session, const gchar *prompt, guint32 flags,
- CamelService *service, const gchar *item, GError **error)
+get_password (CamelSession *session,
+ const gchar *prompt,
+ guint32 flags,
+ CamelService *service,
+ const gchar *item,
+ GError **error)
{
return g_strdup ("S/MIME v3 is rfc263x, now go and read them.");
}
diff --git a/libebackend/e-data-server-module.c b/libebackend/e-data-server-module.c
index ee39644..e710536 100644
--- a/libebackend/e-data-server-module.c
+++ b/libebackend/e-data-server-module.c
@@ -109,13 +109,13 @@ e_data_server_module_load (GTypeModule *gmodule)
if (!g_module_symbol (module->library,
"eds_module_initialize",
- (gpointer *)&module->initialize) ||
+ (gpointer *) &module->initialize) ||
!g_module_symbol (module->library,
"eds_module_shutdown",
- (gpointer *)&module->shutdown) ||
+ (gpointer *) &module->shutdown) ||
!g_module_symbol (module->library,
"eds_module_list_types",
- (gpointer *)&module->list_types)) {
+ (gpointer *) &module->list_types)) {
g_warning ("%s", g_module_error ());
g_module_close (module->library);
@@ -171,7 +171,8 @@ e_data_server_module_class_init (EDataServerModuleClass *class)
}
static void
-module_object_weak_notify (gpointer user_data, GObject *object)
+module_object_weak_notify (gpointer user_data,
+ GObject *object)
{
module_objects = g_list_remove (module_objects, object);
}
diff --git a/libebackend/e-db3-utils.c b/libebackend/e-db3-utils.c
index 22aa3ac..c87253b 100644
--- a/libebackend/e-db3-utils.c
+++ b/libebackend/e-db3-utils.c
@@ -37,7 +37,8 @@ get_copy_filename (const gchar *filename)
}
static gint
-cp_file (const gchar *src, const gchar *dest)
+cp_file (const gchar *src,
+ const gchar *dest)
{
gint i;
gint o;
diff --git a/libebackend/e-dbhash.c b/libebackend/e-dbhash.c
index bae990a..81ec12f 100644
--- a/libebackend/e-dbhash.c
+++ b/libebackend/e-dbhash.c
@@ -73,7 +73,8 @@ e_dbhash_new (const gchar *filename)
}
static void
-string_to_dbt (const gchar *str, DBT *dbt)
+string_to_dbt (const gchar *str,
+ DBT *dbt)
{
memset (dbt, 0, sizeof (DBT));
dbt->data = (gpointer) str;
@@ -81,7 +82,8 @@ string_to_dbt (const gchar *str, DBT *dbt)
}
static void
-md5_to_dbt (const guint8 str[16], DBT *dbt)
+md5_to_dbt (const guint8 str[16],
+ DBT *dbt)
{
memset (dbt, 0, sizeof (DBT));
dbt->data = (gpointer) str;
diff --git a/libebackend/e-file-cache.c b/libebackend/e-file-cache.c
index beaaca2..bdd10d3 100644
--- a/libebackend/e-file-cache.c
+++ b/libebackend/e-file-cache.c
@@ -269,7 +269,9 @@ e_file_cache_remove (EFileCache *cache)
}
static void
-add_key_to_slist (const gchar *key, const gchar *value, gpointer user_data)
+add_key_to_slist (const gchar *key,
+ const gchar *value,
+ gpointer user_data)
{
GSList **keys = user_data;
@@ -318,7 +320,9 @@ typedef struct {
} CacheFindData;
static void
-find_object_in_hash (gpointer key, gpointer value, gpointer user_data)
+find_object_in_hash (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
CacheFindData *find_data = user_data;
@@ -362,7 +366,9 @@ e_file_cache_get_object (EFileCache *cache,
}
static void
-add_object_to_slist (const gchar *key, const gchar *value, gpointer user_data)
+add_object_to_slist (const gchar *key,
+ const gchar *value,
+ gpointer user_data)
{
GSList **list = user_data;
diff --git a/libebackend/e-offline-listener.c b/libebackend/e-offline-listener.c
index 213fde5..26c157d 100644
--- a/libebackend/e-offline-listener.c
+++ b/libebackend/e-offline-listener.c
@@ -60,7 +60,8 @@ struct _EOfflineListenerPrivate {
};
static void
-set_online_status (EOfflineListener *eol, gboolean is_offline)
+set_online_status (EOfflineListener *eol,
+ gboolean is_offline)
{
g_signal_emit (eol, signals[CHANGED], 0);
}
@@ -126,7 +127,7 @@ setup_offline_listener (EOfflineListener *eol)
*
* Since: 2.30
**/
-EOfflineListener*
+EOfflineListener *
e_offline_listener_new (void)
{
EOfflineListener *eol = g_object_new (E_TYPE_OFFLINE_LISTENER, NULL);
diff --git a/libebackend/e-sqlite3-vfs.c b/libebackend/e-sqlite3-vfs.c
index ce2bab1..ea767d5 100644
--- a/libebackend/e-sqlite3-vfs.c
+++ b/libebackend/e-sqlite3-vfs.c
@@ -45,7 +45,8 @@ typedef struct {
} ESqlite3File;
static gint
-call_old_file_Sync (ESqlite3File *cFile, gint flags)
+call_old_file_Sync (ESqlite3File *cFile,
+ gint flags)
{
g_return_val_if_fail (old_vfs != NULL, SQLITE_ERROR);
g_return_val_if_fail (cFile != NULL, SQLITE_ERROR);
@@ -62,7 +63,8 @@ struct SyncRequestData
};
static void
-sync_request_thread_cb (gpointer task_data, gpointer null_data)
+sync_request_thread_cb (gpointer task_data,
+ gpointer null_data)
{
struct SyncRequestData *sync_data = task_data;
EFlag *sync_op;
@@ -80,7 +82,8 @@ sync_request_thread_cb (gpointer task_data, gpointer null_data)
}
static void
-sync_push_request (ESqlite3File *cFile, gboolean wait_for_finish)
+sync_push_request (ESqlite3File *cFile,
+ gboolean wait_for_finish)
{
struct SyncRequestData *data;
EFlag *sync_op = NULL;
@@ -163,7 +166,8 @@ def_subclassed (xDeviceCharacteristics, (sqlite3_file *pFile), (cFile->old_vfs_f
#undef def_subclassed
static gint
-e_sqlite3_file_xCheckReservedLock (sqlite3_file *pFile, gint *pResOut)
+e_sqlite3_file_xCheckReservedLock (sqlite3_file *pFile,
+ gint *pResOut)
{
ESqlite3File *cFile;
@@ -218,7 +222,8 @@ e_sqlite3_file_xClose (sqlite3_file *pFile)
}
static gint
-e_sqlite3_file_xSync (sqlite3_file *pFile, gint flags)
+e_sqlite3_file_xSync (sqlite3_file *pFile,
+ gint flags)
{
ESqlite3File *cFile;
@@ -247,7 +252,11 @@ e_sqlite3_file_xSync (sqlite3_file *pFile, gint flags)
}
static gint
-e_sqlite3_vfs_xOpen (sqlite3_vfs *pVfs, const gchar *zPath, sqlite3_file *pFile, gint flags, gint *pOutFlags)
+e_sqlite3_vfs_xOpen (sqlite3_vfs *pVfs,
+ const gchar *zPath,
+ sqlite3_file *pFile,
+ gint flags,
+ gint *pOutFlags)
{
static GStaticRecMutex only_once_lock = G_STATIC_REC_MUTEX_INIT;
static sqlite3_io_methods io_methods = {0};
@@ -274,7 +283,7 @@ e_sqlite3_vfs_xOpen (sqlite3_vfs *pVfs, const gchar *zPath, sqlite3_file *pFile,
sync_pool = g_thread_pool_new (sync_request_thread_cb, NULL, 2, FALSE, NULL);
/* cFile->old_vfs_file->pMethods is NULL when open failed for some reason,
- thus do not initialize our structure when do not know the version */
+ * thus do not initialize our structure when do not know the version */
if (io_methods.xClose == NULL && cFile->old_vfs_file->pMethods) {
/* initialize our subclass function only once */
io_methods.iVersion = cFile->old_vfs_file->pMethods->iVersion;
diff --git a/libedataserver/e-account-list.c b/libedataserver/e-account-list.c
index 259f007..1712b0b 100644
--- a/libedataserver/e-account-list.c
+++ b/libedataserver/e-account-list.c
@@ -118,8 +118,10 @@ finalize (GObject *object)
}
static void
-gconf_accounts_changed (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gpointer user_data)
+gconf_accounts_changed (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
{
EAccountList *account_list = user_data;
GSList *list, *l, *new_accounts = NULL;
@@ -194,7 +196,8 @@ gconf_accounts_changed (GConfClient *client, guint cnxn_id,
}
static gpointer
-copy_func (gconstpointer data, gpointer closure)
+copy_func (gconstpointer data,
+ gpointer closure)
{
GObject *object = (GObject *) data;
@@ -203,7 +206,8 @@ copy_func (gconstpointer data, gpointer closure)
}
static void
-free_func (gpointer data, gpointer closure)
+free_func (gpointer data,
+ gpointer closure)
{
g_object_unref (data);
}
@@ -237,7 +241,8 @@ e_account_list_new (GConfClient *gconf)
}
void
-e_account_list_construct (EAccountList *account_list, GConfClient *gconf)
+e_account_list_construct (EAccountList *account_list,
+ GConfClient *gconf)
{
g_return_if_fail (GCONF_IS_CLIENT (gconf));
@@ -315,7 +320,8 @@ e_account_list_prune_proxies (EAccountList *account_list)
}
void
-e_account_list_remove_account_proxies (EAccountList *accounts, EAccount *account)
+e_account_list_remove_account_proxies (EAccountList *accounts,
+ EAccount *account)
{
EAccount *child_account;
@@ -430,7 +436,7 @@ e_account_list_get_default (EAccountList *account_list)
it = e_list_get_iterator (E_LIST (account_list));
if (uid) {
- for (;e_iterator_is_valid (it);e_iterator_next (it)) {
+ for (; e_iterator_is_valid (it); e_iterator_next (it)) {
account = (const EAccount *) e_iterator_get (it);
if (!strcmp (uid, account->uid))
@@ -499,7 +505,7 @@ e_account_list_find (EAccountList *account_list,
const EAccount *account = NULL;
/* this could use a callback for more flexibility ...
- ... but this makes the common cases easier */
+ * ... but this makes the common cases easier */
if (!key)
return NULL;
diff --git a/libedataserver/e-account.c b/libedataserver/e-account.c
index fc3bee7..5a03f4a 100644
--- a/libedataserver/e-account.c
+++ b/libedataserver/e-account.c
@@ -209,12 +209,14 @@ e_account_new_from_xml (const gchar *xml)
}
static gboolean
-xml_set_bool (xmlNodePtr node, const gchar *name, gboolean *val)
+xml_set_bool (xmlNodePtr node,
+ const gchar *name,
+ gboolean *val)
{
gboolean bool;
xmlChar *buf;
- if ((buf = xmlGetProp (node, (xmlChar*) name))) {
+ if ((buf = xmlGetProp (node, (xmlChar *) name))) {
bool = (!strcmp ((gchar *)buf, "true") || !strcmp ((gchar *)buf, "yes"));
xmlFree (buf);
@@ -228,12 +230,14 @@ xml_set_bool (xmlNodePtr node, const gchar *name, gboolean *val)
}
static gboolean
-xml_set_int (xmlNodePtr node, const gchar *name, gint *val)
+xml_set_int (xmlNodePtr node,
+ const gchar *name,
+ gint *val)
{
gint number;
xmlChar *buf;
- if ((buf = xmlGetProp (node, (xmlChar*) name))) {
+ if ((buf = xmlGetProp (node, (xmlChar *) name))) {
number = strtol ((gchar *) buf, NULL, 10);
xmlFree (buf);
@@ -247,12 +251,14 @@ xml_set_int (xmlNodePtr node, const gchar *name, gint *val)
}
static gboolean
-xml_set_prop (xmlNodePtr node, const gchar *name, gchar **val)
+xml_set_prop (xmlNodePtr node,
+ const gchar *name,
+ gchar **val)
{
xmlChar *buf;
gint res;
- buf = xmlGetProp (node, (xmlChar*) name);
+ buf = xmlGetProp (node, (xmlChar *) name);
if (buf == NULL) {
res = (*val != NULL);
if (res) {
@@ -282,7 +288,7 @@ str_to_receipt_policy (const xmlChar *str)
return E_ACCOUNT_RECEIPT_NEVER;
}
-static xmlChar*
+static xmlChar *
receipt_policy_to_str (EAccountReceiptPolicy val)
{
const gchar *ret = NULL;
@@ -299,16 +305,18 @@ receipt_policy_to_str (EAccountReceiptPolicy val)
break;
}
- return (xmlChar*) ret;
+ return (xmlChar *) ret;
}
static gboolean
-xml_set_receipt_policy (xmlNodePtr node, const gchar *name, EAccountReceiptPolicy *val)
+xml_set_receipt_policy (xmlNodePtr node,
+ const gchar *name,
+ EAccountReceiptPolicy *val)
{
EAccountReceiptPolicy new_val;
xmlChar *buf;
- if ((buf = xmlGetProp (node, (xmlChar*) name))) {
+ if ((buf = xmlGetProp (node, (xmlChar *) name))) {
new_val = str_to_receipt_policy (buf);
xmlFree (buf);
@@ -322,7 +330,8 @@ xml_set_receipt_policy (xmlNodePtr node, const gchar *name, EAccountReceiptPolic
}
static gboolean
-xml_set_content (xmlNodePtr node, gchar **val)
+xml_set_content (xmlNodePtr node,
+ gchar **val)
{
xmlChar *buf;
gint res;
@@ -347,7 +356,8 @@ xml_set_content (xmlNodePtr node, gchar **val)
}
static gboolean
-xml_set_identity (xmlNodePtr node, EAccountIdentity *id)
+xml_set_identity (xmlNodePtr node,
+ EAccountIdentity *id)
{
gboolean changed = FALSE;
@@ -388,7 +398,8 @@ xml_set_identity (xmlNodePtr node, EAccountIdentity *id)
}
static gboolean
-xml_set_service (xmlNodePtr node, EAccountService *service)
+xml_set_service (xmlNodePtr node,
+ EAccountService *service)
{
gboolean changed = FALSE;
@@ -510,13 +521,14 @@ exit:
* already matched @xml or @xml could not be parsed
**/
gboolean
-e_account_set_from_xml (EAccount *account, const gchar *xml)
+e_account_set_from_xml (EAccount *account,
+ const gchar *xml)
{
xmlNodePtr node, cur;
xmlDocPtr doc;
gboolean changed = FALSE;
- if (!(doc = xmlParseDoc ((xmlChar*) xml)))
+ if (!(doc = xmlParseDoc ((xmlChar *) xml)))
return FALSE;
node = doc->children;
@@ -611,7 +623,8 @@ e_account_set_from_xml (EAccount *account, const gchar *xml)
* Import the settings from @src to @dest.
**/
void
-e_account_import (EAccount *dest, EAccount *src)
+e_account_import (EAccount *dest,
+ EAccount *src)
{
g_free (dest->name);
dest->name = g_strdup (src->name);
@@ -924,7 +937,10 @@ static struct _option_info {
#define LOCK_BASE "/apps/evolution/lock/mail/accounts"
static void
-ea_setting_notify (GConfClient *gconf, guint cnxn_id, GConfEntry *entry, gpointer crap)
+ea_setting_notify (GConfClient *gconf,
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer crap)
{
GConfValue *value;
gchar *tkey;
@@ -938,7 +954,7 @@ ea_setting_notify (GConfClient *gconf, guint cnxn_id, GConfEntry *entry, gpointe
tkey = strrchr (entry->key, '/');
g_return_if_fail (tkey != NULL);
- info = g_hash_table_lookup (ea_system_table, tkey+1);
+ info = g_hash_table_lookup (ea_system_table, tkey + 1);
if (info) {
if (gconf_value_get_bool (value))
ea_perms |= info->perm;
@@ -988,25 +1004,28 @@ ea_setting_setup (void)
/* look up the item in the structure or the substructure using our table of reflection data */
#define addr(ea, type) \
((account_info[type].type & TYPE_STRUCT)? \
- (((gchar **)(((gchar *) ea)+account_info[type].offset))[0] + account_info[type].struct_offset): \
- (((gchar *) ea)+account_info[type].offset))
+ (((gchar **)(((gchar *) ea) + account_info[type].offset))[0] + account_info[type].struct_offset): \
+ (((gchar *) ea) + account_info[type].offset))
const gchar *
-e_account_get_string (EAccount *ea, e_account_item_t type)
+e_account_get_string (EAccount *ea,
+ e_account_item_t type)
{
g_return_val_if_fail (ea != NULL, NULL);
return *((const gchar **) addr (ea, type));
}
gint
-e_account_get_int (EAccount *ea, e_account_item_t type)
+e_account_get_int (EAccount *ea,
+ e_account_item_t type)
{
g_return_val_if_fail (ea != NULL, 0);
return *((gint *) addr (ea, type));
}
gboolean
-e_account_get_bool (EAccount *ea, e_account_item_t type)
+e_account_get_bool (EAccount *ea,
+ e_account_item_t type)
{
g_return_val_if_fail (ea != NULL, FALSE);
return *((gboolean *) addr (ea, type));
@@ -1027,7 +1046,9 @@ dump_account (EAccount *ea)
/* TODO: should it return true if it changed? */
void
-e_account_set_string (EAccount *ea, e_account_item_t type, const gchar *val)
+e_account_set_string (EAccount *ea,
+ e_account_item_t type,
+ const gchar *val)
{
gchar **p;
@@ -1049,7 +1070,9 @@ e_account_set_string (EAccount *ea, e_account_item_t type, const gchar *val)
}
void
-e_account_set_int (EAccount *ea, e_account_item_t type, gint val)
+e_account_set_int (EAccount *ea,
+ e_account_item_t type,
+ gint val)
{
g_return_if_fail (ea != NULL);
@@ -1067,7 +1090,9 @@ e_account_set_int (EAccount *ea, e_account_item_t type, gint val)
}
void
-e_account_set_bool (EAccount *ea, e_account_item_t type, gboolean val)
+e_account_set_bool (EAccount *ea,
+ e_account_item_t type,
+ gboolean val)
{
g_return_if_fail (ea != NULL);
@@ -1085,14 +1110,16 @@ e_account_set_bool (EAccount *ea, e_account_item_t type, gboolean val)
}
gboolean
-e_account_writable_option (EAccount *ea, const gchar *protocol, const gchar *option)
+e_account_writable_option (EAccount *ea,
+ const gchar *protocol,
+ const gchar *option)
{
gchar *key;
struct _option_info *info;
ea_setting_setup ();
- key = alloca (strlen (protocol)+strlen (option)+2);
+ key = alloca (strlen (protocol) + strlen (option) + 2);
sprintf(key, "%s_%s", protocol, option);
info = g_hash_table_lookup (ea_option_table, key);
@@ -1108,7 +1135,8 @@ e_account_writable_option (EAccount *ea, const gchar *protocol, const gchar *opt
}
gboolean
-e_account_writable (EAccount *ea, e_account_item_t type)
+e_account_writable (EAccount *ea,
+ e_account_item_t type)
{
ea_setting_setup ();
diff --git a/libedataserver/e-account.h b/libedataserver/e-account.h
index 53b45b3..2427e77 100644
--- a/libedataserver/e-account.h
+++ b/libedataserver/e-account.h
@@ -95,7 +95,7 @@ typedef enum _e_account_item_t {
} e_account_item_t;
typedef enum _e_account_access_t {
- E_ACCOUNT_ACCESS_WRITE = 1<<0
+ E_ACCOUNT_ACCESS_WRITE = 1 << 0
} e_account_access_t;
typedef struct _EAccountIdentity {
diff --git a/libedataserver/e-categories.c b/libedataserver/e-categories.c
index 88dfa97..2aa596d 100644
--- a/libedataserver/e-categories.c
+++ b/libedataserver/e-categories.c
@@ -187,7 +187,9 @@ escape_string (const gchar *source)
}
static void
-hash_to_xml_string (gpointer key, gpointer value, gpointer user_data)
+hash_to_xml_string (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
CategoryInfo *cat_info = value;
GString *string = user_data;
@@ -288,7 +290,7 @@ static void
categories_add_full (const gchar *category,
const gchar *icon_file,
gboolean is_default,
- gboolean is_searchable)
+ gboolean is_searchable)
{
CategoryInfo *cat_info;
gchar *collation_key;
@@ -328,7 +330,8 @@ categories_lookup (const gchar *category)
}
static gint
-parse_categories (const gchar *contents, gsize length)
+parse_categories (const gchar *contents,
+ gsize length)
{
xmlDocPtr doc;
xmlNodePtr node;
@@ -407,7 +410,9 @@ exit:
}
static void
-migrate_old_icon_file (gpointer key, gpointer value, gpointer user_data)
+migrate_old_icon_file (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
CategoryInfo *info = value;
gchar *basename;
@@ -736,7 +741,8 @@ e_categories_is_searchable (const gchar *category)
* Since: 2.24
**/
void
-e_categories_register_change_listener (GCallback listener, gpointer user_data)
+e_categories_register_change_listener (GCallback listener,
+ gpointer user_data)
{
if (!initialized)
initialize_categories ();
@@ -755,7 +761,8 @@ e_categories_register_change_listener (GCallback listener, gpointer user_data)
* Since: 2.24
**/
void
-e_categories_unregister_change_listener (GCallback listener, gpointer user_data)
+e_categories_unregister_change_listener (GCallback listener,
+ gpointer user_data)
{
if (initialized)
g_signal_handlers_disconnect_by_func (listeners, listener, user_data);
diff --git a/libedataserver/e-client.c b/libedataserver/e-client.c
index 4d3eef1..c2fe993 100644
--- a/libedataserver/e-client.c
+++ b/libedataserver/e-client.c
@@ -165,7 +165,8 @@ e_client_error_to_string (EClientError code)
* Returned pointer should be freed with g_error_free().
**/
GError *
-e_client_error_create (EClientError code, const gchar *custom_msg)
+e_client_error_create (EClientError code,
+ const gchar *custom_msg)
{
return g_error_new_literal (E_CLIENT_ERROR, code, custom_msg ? custom_msg : e_client_error_to_string (code));
}
@@ -252,7 +253,10 @@ client_finalize (GObject *object)
}
static void
-client_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+client_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
switch (property_id) {
case PROP_SOURCE:
@@ -268,7 +272,10 @@ client_set_property (GObject *object, guint property_id, const GValue *value, GP
}
static void
-client_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+client_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
switch (property_id) {
case PROP_SOURCE:
@@ -407,7 +414,8 @@ e_client_class_init (EClientClass *klass)
}
static void
-client_set_source (EClient *client, ESource *source)
+client_set_source (EClient *client,
+ ESource *source)
{
g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
@@ -527,7 +535,8 @@ e_client_get_capabilities (EClient *client)
* Since: 3.2
**/
gboolean
-e_client_check_capability (EClient *client, const gchar *capability)
+e_client_check_capability (EClient *client,
+ const gchar *capability)
{
GSList *iter;
@@ -575,7 +584,8 @@ e_client_check_refresh_supported (EClient *client)
/* capabilities - comma-separated list of capabilities; can be NULL to unset */
void
-e_client_set_capabilities (EClient *client, const gchar *capabilities)
+e_client_set_capabilities (EClient *client,
+ const gchar *capabilities)
{
g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
@@ -616,7 +626,8 @@ e_client_is_readonly (EClient *client)
}
void
-e_client_set_readonly (EClient *client, gboolean readonly)
+e_client_set_readonly (EClient *client,
+ gboolean readonly)
{
g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
@@ -656,7 +667,8 @@ e_client_is_online (EClient *client)
}
void
-e_client_set_online (EClient *client, gboolean is_online)
+e_client_set_online (EClient *client,
+ gboolean is_online)
{
g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
@@ -714,7 +726,8 @@ e_client_is_opened (EClient *client)
* Since: 3.2
*/
static void
-client_cancel_op (EClient *client, guint32 opid)
+client_cancel_op (EClient *client,
+ guint32 opid)
{
GCancellable *cancellable;
@@ -733,7 +746,9 @@ client_cancel_op (EClient *client, guint32 opid)
}
static void
-gather_opids_cb (gpointer opid, gpointer cancellable, gpointer ids_list)
+gather_opids_cb (gpointer opid,
+ gpointer cancellable,
+ gpointer ids_list)
{
GSList **ids = ids_list;
@@ -743,7 +758,8 @@ gather_opids_cb (gpointer opid, gpointer cancellable, gpointer ids_list)
}
static void
-cancel_op_cb (gpointer opid, gpointer client)
+cancel_op_cb (gpointer opid,
+ gpointer client)
{
client_cancel_op (client, GPOINTER_TO_INT (opid));
}
@@ -777,7 +793,8 @@ e_client_cancel_all (EClient *client)
}
guint32
-e_client_register_op (EClient *client, GCancellable *cancellable)
+e_client_register_op (EClient *client,
+ GCancellable *cancellable)
{
guint32 opid;
@@ -807,7 +824,8 @@ e_client_register_op (EClient *client, GCancellable *cancellable)
}
void
-e_client_unregister_op (EClient *client, guint32 opid)
+e_client_unregister_op (EClient *client,
+ guint32 opid)
{
g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
@@ -820,7 +838,8 @@ e_client_unregister_op (EClient *client, guint32 opid)
}
static void
-client_handle_authentication (EClient *client, const ECredentials *credentials)
+client_handle_authentication (EClient *client,
+ const ECredentials *credentials)
{
EClientClass *klass;
@@ -865,15 +884,16 @@ client_process_authentication_idle_cb (gpointer user_data)
}
/* Processes authentication request in idle callback. Usual steps are:
- a) backend sends an auth-required signal
- b) EClient implementation calls this function
- c) a new idle callback is run which emits authenticate signal by e_client_emit_authenticate ()
- d) if anyone responds (returns true), the EClient::handle_authentication
- is called from the same idle callback with new credentials
- e) EClient implementation passes results to backend in the EClient::handle_authentication
+ * a) backend sends an auth - required signal
+ * b) EClient implementation calls this function
+ * c) a new idle callback is run which emits authenticate signal by e_client_emit_authenticate ()
+ * d) if anyone responds (returns true), the EClient::handle_authentication
+ * is called from the same idle callback with new credentials
+ * e) EClient implementation passes results to backend in the EClient::handle_authentication
*/
void
-e_client_process_authentication (EClient *client, const ECredentials *credentials)
+e_client_process_authentication (EClient *client,
+ const ECredentials *credentials)
{
struct EClientAuthData *auth_data;
@@ -888,7 +908,8 @@ e_client_process_authentication (EClient *client, const ECredentials *credential
}
gboolean
-e_client_emit_authenticate (EClient *client, ECredentials *credentials)
+e_client_emit_authenticate (EClient *client,
+ ECredentials *credentials)
{
gboolean handled = FALSE;
@@ -902,7 +923,8 @@ e_client_emit_authenticate (EClient *client, ECredentials *credentials)
}
void
-e_client_emit_opened (EClient *client, const GError *dbus_error)
+e_client_emit_opened (EClient *client,
+ const GError *dbus_error)
{
GError *local_error = NULL;
@@ -925,7 +947,8 @@ e_client_emit_opened (EClient *client, const GError *dbus_error)
}
void
-e_client_emit_backend_error (EClient *client, const gchar *error_msg)
+e_client_emit_backend_error (EClient *client,
+ const gchar *error_msg)
{
g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
@@ -944,7 +967,9 @@ e_client_emit_backend_died (EClient *client)
}
void
-e_client_emit_backend_property_changed (EClient *client, const gchar *prop_name, const gchar *prop_value)
+e_client_emit_backend_property_changed (EClient *client,
+ const gchar *prop_name,
+ const gchar *prop_value)
{
g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
@@ -959,7 +984,9 @@ e_client_emit_backend_property_changed (EClient *client, const gchar *prop_name,
}
void
-e_client_update_backend_property_cache (EClient *client, const gchar *prop_name, const gchar *prop_value)
+e_client_update_backend_property_cache (EClient *client,
+ const gchar *prop_name,
+ const gchar *prop_value)
{
g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
@@ -977,7 +1004,8 @@ e_client_update_backend_property_cache (EClient *client, const gchar *prop_name,
}
gchar *
-e_client_get_backend_property_from_cache (EClient *client, const gchar *prop_name)
+e_client_get_backend_property_from_cache (EClient *client,
+ const gchar *prop_name)
{
gchar *prop_value = NULL;
@@ -1014,7 +1042,10 @@ e_client_get_backend_property_from_cache (EClient *client, const gchar *prop_nam
* Since: 3.2
**/
void
-e_client_retrieve_capabilities (EClient *client, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_client_retrieve_capabilities (EClient *client,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
EClientClass *klass;
@@ -1046,7 +1077,10 @@ e_client_retrieve_capabilities (EClient *client, GCancellable *cancellable, GAsy
* Since: 3.2
**/
gboolean
-e_client_retrieve_capabilities_finish (EClient *client, GAsyncResult *result, gchar **capabilities, GError **error)
+e_client_retrieve_capabilities_finish (EClient *client,
+ GAsyncResult *result,
+ gchar **capabilities,
+ GError **error)
{
EClientClass *klass;
gboolean res;
@@ -1086,7 +1120,10 @@ e_client_retrieve_capabilities_finish (EClient *client, GAsyncResult *result, gc
* Since: 3.2
**/
gboolean
-e_client_retrieve_capabilities_sync (EClient *client, gchar **capabilities, GCancellable *cancellable, GError **error)
+e_client_retrieve_capabilities_sync (EClient *client,
+ gchar **capabilities,
+ GCancellable *cancellable,
+ GError **error)
{
EClientClass *klass;
gboolean res = FALSE;
@@ -1121,7 +1158,11 @@ e_client_retrieve_capabilities_sync (EClient *client, gchar **capabilities, GCan
* Since: 3.2
**/
void
-e_client_get_backend_property (EClient *client, const gchar *prop_name, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_client_get_backend_property (EClient *client,
+ const gchar *prop_name,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
EClientClass *klass;
@@ -1152,7 +1193,10 @@ e_client_get_backend_property (EClient *client, const gchar *prop_name, GCancell
* Since: 3.2
**/
gboolean
-e_client_get_backend_property_finish (EClient *client, GAsyncResult *result, gchar **prop_value, GError **error)
+e_client_get_backend_property_finish (EClient *client,
+ GAsyncResult *result,
+ gchar **prop_value,
+ GError **error)
{
EClientClass *klass;
@@ -1183,7 +1227,11 @@ e_client_get_backend_property_finish (EClient *client, GAsyncResult *result, gch
* Since: 3.2
**/
gboolean
-e_client_get_backend_property_sync (EClient *client, const gchar *prop_name, gchar **prop_value, GCancellable *cancellable, GError **error)
+e_client_get_backend_property_sync (EClient *client,
+ const gchar *prop_name,
+ gchar **prop_value,
+ GCancellable *cancellable,
+ GError **error)
{
EClientClass *klass;
@@ -1216,7 +1264,12 @@ e_client_get_backend_property_sync (EClient *client, const gchar *prop_name, gch
* Since: 3.2
**/
void
-e_client_set_backend_property (EClient *client, const gchar *prop_name, const gchar *prop_value, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_client_set_backend_property (EClient *client,
+ const gchar *prop_name,
+ const gchar *prop_value,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
EClientClass *klass;
@@ -1247,7 +1300,9 @@ e_client_set_backend_property (EClient *client, const gchar *prop_name, const gc
* Since: 3.2
**/
gboolean
-e_client_set_backend_property_finish (EClient *client, GAsyncResult *result, GError **error)
+e_client_set_backend_property_finish (EClient *client,
+ GAsyncResult *result,
+ GError **error)
{
EClientClass *klass;
@@ -1278,7 +1333,11 @@ e_client_set_backend_property_finish (EClient *client, GAsyncResult *result, GEr
* Since: 3.2
**/
gboolean
-e_client_set_backend_property_sync (EClient *client, const gchar *prop_name, const gchar *prop_value, GCancellable *cancellable, GError **error)
+e_client_set_backend_property_sync (EClient *client,
+ const gchar *prop_name,
+ const gchar *prop_value,
+ GCancellable *cancellable,
+ GError **error)
{
EClientClass *klass;
@@ -1309,7 +1368,11 @@ e_client_set_backend_property_sync (EClient *client, const gchar *prop_name, con
* Since: 3.2
**/
void
-e_client_open (EClient *client, gboolean only_if_exists, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_client_open (EClient *client,
+ gboolean only_if_exists,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
EClientClass *klass;
@@ -1338,7 +1401,9 @@ e_client_open (EClient *client, gboolean only_if_exists, GCancellable *cancellab
* Since: 3.2
**/
gboolean
-e_client_open_finish (EClient *client, GAsyncResult *result, GError **error)
+e_client_open_finish (EClient *client,
+ GAsyncResult *result,
+ GError **error)
{
EClientClass *klass;
@@ -1367,7 +1432,10 @@ e_client_open_finish (EClient *client, GAsyncResult *result, GError **error)
* Since: 3.2
**/
gboolean
-e_client_open_sync (EClient *client, gboolean only_if_exists, GCancellable *cancellable, GError **error)
+e_client_open_sync (EClient *client,
+ gboolean only_if_exists,
+ GCancellable *cancellable,
+ GError **error)
{
EClientClass *klass;
@@ -1392,7 +1460,10 @@ e_client_open_sync (EClient *client, gboolean only_if_exists, GCancellable *canc
* Since: 3.2
**/
void
-e_client_remove (EClient *client, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_client_remove (EClient *client,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
EClientClass *klass;
@@ -1421,7 +1492,9 @@ e_client_remove (EClient *client, GCancellable *cancellable, GAsyncReadyCallback
* Since: 3.2
**/
gboolean
-e_client_remove_finish (EClient *client, GAsyncResult *result, GError **error)
+e_client_remove_finish (EClient *client,
+ GAsyncResult *result,
+ GError **error)
{
EClientClass *klass;
@@ -1450,7 +1523,9 @@ e_client_remove_finish (EClient *client, GAsyncResult *result, GError **error)
* Since: 3.2
**/
gboolean
-e_client_remove_sync (EClient *client, GCancellable *cancellable, GError **error)
+e_client_remove_sync (EClient *client,
+ GCancellable *cancellable,
+ GError **error)
{
EClientClass *klass;
@@ -1477,7 +1552,10 @@ e_client_remove_sync (EClient *client, GCancellable *cancellable, GError **error
* Since: 3.2
**/
void
-e_client_refresh (EClient *client, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_client_refresh (EClient *client,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
EClientClass *klass;
@@ -1506,7 +1584,9 @@ e_client_refresh (EClient *client, GCancellable *cancellable, GAsyncReadyCallbac
* Since: 3.2
**/
gboolean
-e_client_refresh_finish (EClient *client, GAsyncResult *result, GError **error)
+e_client_refresh_finish (EClient *client,
+ GAsyncResult *result,
+ GError **error)
{
EClientClass *klass;
@@ -1537,7 +1617,9 @@ e_client_refresh_finish (EClient *client, GAsyncResult *result, GError **error)
* Since: 3.2
**/
gboolean
-e_client_refresh_sync (EClient *client, GCancellable *cancellable, GError **error)
+e_client_refresh_sync (EClient *client,
+ GCancellable *cancellable,
+ GError **error)
{
EClientClass *klass;
@@ -1624,7 +1706,8 @@ e_client_util_strv_to_slist (const gchar * const *strv)
* Since: 3.2
**/
GSList *
-e_client_util_copy_string_slist (GSList *copy_to, const GSList *strings)
+e_client_util_copy_string_slist (GSList *copy_to,
+ const GSList *strings)
{
GSList *res = copy_to;
const GSList *iter;
@@ -1649,7 +1732,8 @@ e_client_util_copy_string_slist (GSList *copy_to, const GSList *strings)
* Since: 3.2
**/
GSList *
-e_client_util_copy_object_slist (GSList *copy_to, const GSList *objects)
+e_client_util_copy_object_slist (GSList *copy_to,
+ const GSList *objects)
{
GSList *res = copy_to;
const GSList *iter;
@@ -1736,10 +1820,13 @@ e_client_util_parse_comma_strings (const gchar *strings)
}
/* for each known source calls check_func, which should return TRUE if the required
- source have been found. Function returns NULL or the source on which was returned
- TRUE by the check_func. Non-NULL pointer should be unreffed by g_object_unref. */
+ * source have been found. Function returns NULL or the source on which was returned
+ * TRUE by the check_func. Non - NULL pointer should be unreffed by g_object_unref. */
static ESource *
-search_known_sources (ESourceList *sources, gboolean (*check_func)(ESource *source, gpointer user_data), gpointer user_data)
+search_known_sources (ESourceList *sources,
+ gboolean (*check_func) (ESource *source,
+ gpointer user_data),
+ gpointer user_data)
{
ESource *res = NULL;
GSList *g;
@@ -1768,7 +1855,8 @@ search_known_sources (ESourceList *sources, gboolean (*check_func)(ESource *sour
}
static gboolean
-check_uri (ESource *source, gpointer uri)
+check_uri (ESource *source,
+ gpointer uri)
{
const gchar *suri;
gchar *suri2;
@@ -1796,7 +1884,8 @@ struct check_system_data
};
static gboolean
-check_system (ESource *source, gpointer data)
+check_system (ESource *source,
+ gpointer data)
{
struct check_system_data *csd = data;
@@ -1864,7 +1953,8 @@ e_client_util_get_system_source (ESourceList *source_list)
}
gboolean
-e_client_util_set_default (ESourceList *source_list, ESource *source)
+e_client_util_set_default (ESourceList *source_list,
+ ESource *source)
{
const gchar *uid;
GSList *g;
@@ -1877,13 +1967,13 @@ e_client_util_set_default (ESourceList *source_list, ESource *source)
uid = e_source_peek_uid (source);
/* make sure the source is actually in the ESourceList. If
- it's not we don't bother adding it, just return an error */
+ * it's not we don't bother adding it, just return an error */
source = e_source_list_peek_source_by_uid (source_list, uid);
if (!source)
return FALSE;
/* loop over all the sources clearing out any "default"
- properties we find */
+ * properties we find */
for (g = e_source_list_peek_groups (source_list); g; g = g->next) {
GSList *s;
for (s = e_source_group_peek_sources (E_SOURCE_GROUP (g->data));
@@ -1899,7 +1989,8 @@ e_client_util_set_default (ESourceList *source_list, ESource *source)
}
ESource *
-e_client_util_get_source_for_uri (ESourceList *source_list, const gchar *uri)
+e_client_util_get_source_for_uri (ESourceList *source_list,
+ const gchar *uri)
{
ESource *source;
@@ -1915,7 +2006,13 @@ e_client_util_get_source_for_uri (ESourceList *source_list, const gchar *uri)
}
void
-e_client_finish_async_without_dbus (EClient *client, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data, gpointer source_tag, gpointer op_res, GDestroyNotify destroy_op_res)
+e_client_finish_async_without_dbus (EClient *client,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data,
+ gpointer source_tag,
+ gpointer op_res,
+ GDestroyNotify destroy_op_res)
{
GCancellable *use_cancellable;
GSimpleAsyncResult *simple;
@@ -1967,7 +2064,9 @@ e_client_get_dbus_proxy (EClient *client)
* @dbus_erorr and @out_error can point to the same variable.
**/
void
-e_client_unwrap_dbus_error (EClient *client, GError *dbus_error, GError **out_error)
+e_client_unwrap_dbus_error (EClient *client,
+ GError *dbus_error,
+ GError **out_error)
{
EClientClass *klass;
@@ -2009,7 +2108,12 @@ e_client_unwrap_dbus_error (EClient *client, GError *dbus_error, GError **out_er
* Note: The @dbus_error is automatically freed if returned %TRUE.
**/
gboolean
-e_client_util_unwrap_dbus_error (GError *dbus_error, GError **client_error, const EClientErrorsList *known_errors, guint known_errors_count, GQuark known_errors_domain, gboolean fail_when_none_matched)
+e_client_util_unwrap_dbus_error (GError *dbus_error,
+ GError **client_error,
+ const EClientErrorsList *known_errors,
+ guint known_errors_count,
+ GQuark known_errors_domain,
+ gboolean fail_when_none_matched)
{
if (!client_error) {
if (dbus_error)
@@ -2134,7 +2238,9 @@ complete_async_op_in_idle_cb (gpointer user_data)
}
static void
-finish_async_op (EClientAsyncOpData *async_data, const GError *error, gboolean in_idle)
+finish_async_op (EClientAsyncOpData *async_data,
+ const GError *error,
+ gboolean in_idle)
{
GSimpleAsyncResult *simple;
@@ -2161,7 +2267,9 @@ finish_async_op (EClientAsyncOpData *async_data, const GError *error, gboolean i
}
static void
-async_result_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_result_ready_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
GError *error = NULL;
EClientAsyncOpData *async_data;
@@ -2197,7 +2305,19 @@ async_result_ready_cb (GObject *source_object, GAsyncResult *result, gpointer us
}
static EClientAsyncOpData *
-prepare_async_data (EClient *client, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data, gpointer source_tag, gboolean error_report_only, EClientProxyFinishVoidFunc finish_void, EClientProxyFinishBooleanFunc finish_boolean, EClientProxyFinishStringFunc finish_string, EClientProxyFinishStrvFunc finish_strv, EClientProxyFinishUintFunc finish_uint, GDBusProxy **proxy, GCancellable **out_cancellable)
+prepare_async_data (EClient *client,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data,
+ gpointer source_tag,
+ gboolean error_report_only,
+ EClientProxyFinishVoidFunc finish_void,
+ EClientProxyFinishBooleanFunc finish_boolean,
+ EClientProxyFinishStringFunc finish_string,
+ EClientProxyFinishStrvFunc finish_strv,
+ EClientProxyFinishUintFunc finish_uint,
+ GDBusProxy **proxy,
+ GCancellable **out_cancellable)
{
EClientAsyncOpData *async_data;
GCancellable *use_cancellable;
@@ -2280,7 +2400,11 @@ prepare_async_data (EClient *client, GCancellable *cancellable, GAsyncReadyCallb
}
void
-e_client_proxy_return_async_error (EClient *client, const GError *error, GAsyncReadyCallback callback, gpointer user_data, gpointer source_tag)
+e_client_proxy_return_async_error (EClient *client,
+ const GError *error,
+ GAsyncReadyCallback callback,
+ gpointer user_data,
+ gpointer source_tag)
{
EClientAsyncOpData *async_data;
@@ -2296,7 +2420,20 @@ e_client_proxy_return_async_error (EClient *client, const GError *error, GAsyncR
}
void
-e_client_proxy_call_void (EClient *client, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data, gpointer source_tag, void (*func) (GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data), EClientProxyFinishVoidFunc finish_void, EClientProxyFinishBooleanFunc finish_boolean, EClientProxyFinishStringFunc finish_string, EClientProxyFinishStrvFunc finish_strv, EClientProxyFinishUintFunc finish_uint)
+e_client_proxy_call_void (EClient *client,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data,
+ gpointer source_tag,
+ void (*func) (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data),
+ EClientProxyFinishVoidFunc finish_void,
+ EClientProxyFinishBooleanFunc finish_boolean,
+ EClientProxyFinishStringFunc finish_string,
+ EClientProxyFinishStrvFunc finish_strv,
+ EClientProxyFinishUintFunc finish_uint)
{
EClientAsyncOpData *async_data;
GDBusProxy *proxy = NULL;
@@ -2314,7 +2451,22 @@ e_client_proxy_call_void (EClient *client, GCancellable *cancellable, GAsyncRead
}
void
-e_client_proxy_call_boolean (EClient *client, gboolean in_boolean, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data, gpointer source_tag, void (*func) (GDBusProxy *proxy, gboolean in_boolean, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data), EClientProxyFinishVoidFunc finish_void, EClientProxyFinishBooleanFunc finish_boolean, EClientProxyFinishStringFunc finish_string, EClientProxyFinishStrvFunc finish_strv, EClientProxyFinishUintFunc finish_uint)
+e_client_proxy_call_boolean (EClient *client,
+ gboolean in_boolean,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data,
+ gpointer source_tag,
+ void (*func) (GDBusProxy *proxy,
+ gboolean in_boolean,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data),
+ EClientProxyFinishVoidFunc finish_void,
+ EClientProxyFinishBooleanFunc finish_boolean,
+ EClientProxyFinishStringFunc finish_string,
+ EClientProxyFinishStrvFunc finish_strv,
+ EClientProxyFinishUintFunc finish_uint)
{
EClientAsyncOpData *async_data;
GDBusProxy *proxy = NULL;
@@ -2332,7 +2484,22 @@ e_client_proxy_call_boolean (EClient *client, gboolean in_boolean, GCancellable
}
void
-e_client_proxy_call_string (EClient *client, const gchar *in_string, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data, gpointer source_tag, void (*func) (GDBusProxy *proxy, const gchar * in_string, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data), EClientProxyFinishVoidFunc finish_void, EClientProxyFinishBooleanFunc finish_boolean, EClientProxyFinishStringFunc finish_string, EClientProxyFinishStrvFunc finish_strv, EClientProxyFinishUintFunc finish_uint)
+e_client_proxy_call_string (EClient *client,
+ const gchar *in_string,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data,
+ gpointer source_tag,
+ void (*func) (GDBusProxy *proxy,
+ const gchar *in_string,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data),
+ EClientProxyFinishVoidFunc finish_void,
+ EClientProxyFinishBooleanFunc finish_boolean,
+ EClientProxyFinishStringFunc finish_string,
+ EClientProxyFinishStrvFunc finish_strv,
+ EClientProxyFinishUintFunc finish_uint)
{
EClientAsyncOpData *async_data;
GDBusProxy *proxy = NULL;
@@ -2351,7 +2518,23 @@ e_client_proxy_call_string (EClient *client, const gchar *in_string, GCancellabl
}
void
-e_client_proxy_call_string_with_res_op_data (EClient *client, const gchar *in_string, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data, gpointer source_tag, const gchar *res_op_data, void (*func) (GDBusProxy *proxy, const gchar * in_string, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data), EClientProxyFinishVoidFunc finish_void, EClientProxyFinishBooleanFunc finish_boolean, EClientProxyFinishStringFunc finish_string, EClientProxyFinishStrvFunc finish_strv, EClientProxyFinishUintFunc finish_uint)
+e_client_proxy_call_string_with_res_op_data (EClient *client,
+ const gchar *in_string,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data,
+ gpointer source_tag,
+ const gchar *res_op_data,
+ void (*func) (GDBusProxy *proxy,
+ const gchar *in_string,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data),
+ EClientProxyFinishVoidFunc finish_void,
+ EClientProxyFinishBooleanFunc finish_boolean,
+ EClientProxyFinishStringFunc finish_string,
+ EClientProxyFinishStrvFunc finish_strv,
+ EClientProxyFinishUintFunc finish_uint)
{
EClientAsyncOpData *async_data;
GDBusProxy *proxy = NULL;
@@ -2372,7 +2555,22 @@ e_client_proxy_call_string_with_res_op_data (EClient *client, const gchar *in_st
}
void
-e_client_proxy_call_strv (EClient *client, const gchar * const *in_strv, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data, gpointer source_tag, void (*func) (GDBusProxy *proxy, const gchar * const * in_strv, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data), EClientProxyFinishVoidFunc finish_void, EClientProxyFinishBooleanFunc finish_boolean, EClientProxyFinishStringFunc finish_string, EClientProxyFinishStrvFunc finish_strv, EClientProxyFinishUintFunc finish_uint)
+e_client_proxy_call_strv (EClient *client,
+ const gchar * const *in_strv,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data,
+ gpointer source_tag,
+ void (*func) (GDBusProxy *proxy,
+ const gchar * const * in_strv,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data),
+ EClientProxyFinishVoidFunc finish_void,
+ EClientProxyFinishBooleanFunc finish_boolean,
+ EClientProxyFinishStringFunc finish_string,
+ EClientProxyFinishStrvFunc finish_strv,
+ EClientProxyFinishUintFunc finish_uint)
{
EClientAsyncOpData *async_data;
GDBusProxy *proxy = NULL;
@@ -2391,7 +2589,22 @@ e_client_proxy_call_strv (EClient *client, const gchar * const *in_strv, GCancel
}
void
-e_client_proxy_call_uint (EClient *client, guint in_uint, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data, gpointer source_tag, void (*func) (GDBusProxy *proxy, guint in_uint, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data), EClientProxyFinishVoidFunc finish_void, EClientProxyFinishBooleanFunc finish_boolean, EClientProxyFinishStringFunc finish_string, EClientProxyFinishStrvFunc finish_strv, EClientProxyFinishUintFunc finish_uint)
+e_client_proxy_call_uint (EClient *client,
+ guint in_uint,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data,
+ gpointer source_tag,
+ void (*func) (GDBusProxy *proxy,
+ guint in_uint,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data),
+ EClientProxyFinishVoidFunc finish_void,
+ EClientProxyFinishBooleanFunc finish_boolean,
+ EClientProxyFinishStringFunc finish_string,
+ EClientProxyFinishStrvFunc finish_strv,
+ EClientProxyFinishUintFunc finish_uint)
{
EClientAsyncOpData *async_data;
GDBusProxy *proxy = NULL;
@@ -2409,7 +2622,10 @@ e_client_proxy_call_uint (EClient *client, guint in_uint, GCancellable *cancella
}
gboolean
-e_client_proxy_call_finish_void (EClient *client, GAsyncResult *result, GError **error, gpointer source_tag)
+e_client_proxy_call_finish_void (EClient *client,
+ GAsyncResult *result,
+ GError **error,
+ gpointer source_tag)
{
GSimpleAsyncResult *simple;
GError *local_error = NULL;
@@ -2435,7 +2651,11 @@ e_client_proxy_call_finish_void (EClient *client, GAsyncResult *result, GError *
}
gboolean
-e_client_proxy_call_finish_boolean (EClient *client, GAsyncResult *result, gboolean *out_boolean, GError **error, gpointer source_tag)
+e_client_proxy_call_finish_boolean (EClient *client,
+ GAsyncResult *result,
+ gboolean *out_boolean,
+ GError **error,
+ gpointer source_tag)
{
GSimpleAsyncResult *simple;
GError *local_error = NULL;
@@ -2464,7 +2684,11 @@ e_client_proxy_call_finish_boolean (EClient *client, GAsyncResult *result, gbool
}
gboolean
-e_client_proxy_call_finish_string (EClient *client, GAsyncResult *result, gchar **out_string, GError **error, gpointer source_tag)
+e_client_proxy_call_finish_string (EClient *client,
+ GAsyncResult *result,
+ gchar **out_string,
+ GError **error,
+ gpointer source_tag)
{
GSimpleAsyncResult *simple;
GError *local_error = NULL;
@@ -2494,7 +2718,11 @@ e_client_proxy_call_finish_string (EClient *client, GAsyncResult *result, gchar
}
gboolean
-e_client_proxy_call_finish_strv (EClient *client, GAsyncResult *result, gchar ***out_strv, GError **error, gpointer source_tag)
+e_client_proxy_call_finish_strv (EClient *client,
+ GAsyncResult *result,
+ gchar ***out_strv,
+ GError **error,
+ gpointer source_tag)
{
GSimpleAsyncResult *simple;
GError *local_error = NULL;
@@ -2524,7 +2752,11 @@ e_client_proxy_call_finish_strv (EClient *client, GAsyncResult *result, gchar **
}
gboolean
-e_client_proxy_call_finish_uint (EClient *client, GAsyncResult *result, guint *out_uint, GError **error, gpointer source_tag)
+e_client_proxy_call_finish_uint (EClient *client,
+ GAsyncResult *result,
+ guint *out_uint,
+ GError **error,
+ gpointer source_tag)
{
GSimpleAsyncResult *simple;
GError *local_error = NULL;
@@ -2587,151 +2819,356 @@ e_client_proxy_call_finish_uint (EClient *client, GAsyncResult *result, guint *o
return result;
gboolean
-e_client_proxy_call_sync_void__void (EClient *client, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_void__void (EClient *client,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (client, (proxy, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_void__boolean (EClient *client, gboolean *out_boolean, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, gboolean *out_boolean, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_void__boolean (EClient *client,
+ gboolean *out_boolean,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ gboolean *out_boolean,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_boolean, (proxy, out_boolean, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_void__string (EClient *client, gchar **out_string, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, gchar **out_string, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_void__string (EClient *client,
+ gchar **out_string,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ gchar **out_string,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_string, (proxy, out_string, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_void__strv (EClient *client, gchar ***out_strv, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, gchar ***out_strv, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_void__strv (EClient *client,
+ gchar ***out_strv,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ gchar ***out_strv,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_strv, (proxy, out_strv, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_void__uint (EClient *client, guint *out_uint, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, guint *out_uint, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_void__uint (EClient *client,
+ guint *out_uint,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ guint *out_uint,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_uint, (proxy, out_uint, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_boolean__void (EClient *client, gboolean in_boolean, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, gboolean in_boolean, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_boolean__void (EClient *client,
+ gboolean in_boolean,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ gboolean in_boolean,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (client, (proxy, in_boolean, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_boolean__boolean (EClient *client, gboolean in_boolean, gboolean *out_boolean, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, gboolean in_boolean, gboolean *out_boolean, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_boolean__boolean (EClient *client,
+ gboolean in_boolean,
+ gboolean *out_boolean,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ gboolean in_boolean,
+ gboolean *out_boolean,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_boolean, (proxy, in_boolean, out_boolean, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_boolean__string (EClient *client, gboolean in_boolean, gchar **out_string, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, gboolean in_boolean, gchar **out_string, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_boolean__string (EClient *client,
+ gboolean in_boolean,
+ gchar **out_string,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ gboolean in_boolean,
+ gchar **out_string,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_string, (proxy, in_boolean, out_string, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_boolean__strv (EClient *client, gboolean in_boolean, gchar ***out_strv, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, gboolean in_boolean, gchar ***out_strv, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_boolean__strv (EClient *client,
+ gboolean in_boolean,
+ gchar ***out_strv,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ gboolean in_boolean,
+ gchar ***out_strv,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_strv, (proxy, in_boolean, out_strv, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_boolean__uint (EClient *client, gboolean in_boolean, guint *out_uint, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, gboolean in_boolean, guint *out_uint, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_boolean__uint (EClient *client,
+ gboolean in_boolean,
+ guint *out_uint,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ gboolean in_boolean,
+ guint *out_uint,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_uint, (proxy, in_boolean, out_uint, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_string__void (EClient *client, const gchar *in_string, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, const gchar *in_string, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_string__void (EClient *client,
+ const gchar *in_string,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ const gchar *in_string,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (client, (proxy, in_string, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_string__boolean (EClient *client, const gchar *in_string, gboolean *out_boolean, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, const gchar *in_string, gboolean *out_boolean, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_string__boolean (EClient *client,
+ const gchar *in_string,
+ gboolean *out_boolean,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ const gchar *in_string,
+ gboolean *out_boolean,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_boolean, (proxy, in_string, out_boolean, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_string__string (EClient *client, const gchar *in_string, gchar **out_string, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, const gchar *in_string, gchar **out_string, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_string__string (EClient *client,
+ const gchar *in_string,
+ gchar **out_string,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ const gchar *in_string,
+ gchar **out_string,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_string, (proxy, in_string, out_string, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_string__strv (EClient *client, const gchar *in_string, gchar ***out_strv, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, const gchar *in_string, gchar ***out_strv, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_string__strv (EClient *client,
+ const gchar *in_string,
+ gchar ***out_strv,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ const gchar *in_string,
+ gchar ***out_strv,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_strv, (proxy, in_string, out_strv, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_string__uint (EClient *client, const gchar *in_string, guint *out_uint, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, const gchar *in_string, guint *out_uint, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_string__uint (EClient *client,
+ const gchar *in_string,
+ guint *out_uint,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ const gchar *in_string,
+ guint *out_uint,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_uint, (proxy, in_string, out_uint, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_strv__void (EClient *client, const gchar * const *in_strv, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, const gchar * const *in_strv, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_strv__void (EClient *client,
+ const gchar * const *in_strv,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ const gchar * const *in_strv,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (client, (proxy, in_strv, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_strv__boolean (EClient *client, const gchar * const *in_strv, gboolean *out_boolean, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, const gchar * const *in_strv, gboolean *out_boolean, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_strv__boolean (EClient *client,
+ const gchar * const *in_strv,
+ gboolean *out_boolean,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ const gchar * const *in_strv,
+ gboolean *out_boolean,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_boolean, (proxy, in_strv, out_boolean, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_strv__string (EClient *client, const gchar * const *in_strv, gchar **out_string, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, const gchar * const *in_strv, gchar **out_string, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_strv__string (EClient *client,
+ const gchar * const *in_strv,
+ gchar **out_string,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ const gchar * const *in_strv,
+ gchar **out_string,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_string, (proxy, in_strv, out_string, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_strv__strv (EClient *client, const gchar * const *in_strv, gchar ***out_strv, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, const gchar * const *in_strv, gchar ***out_strv, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_strv__strv (EClient *client,
+ const gchar * const *in_strv,
+ gchar ***out_strv,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ const gchar * const *in_strv,
+ gchar ***out_strv,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_strv, (proxy, in_strv, out_strv, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_strv__uint (EClient *client, const gchar * const *in_strv, guint *out_uint, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, const gchar * const *in_strv, guint *out_uint, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_strv__uint (EClient *client,
+ const gchar * const *in_strv,
+ guint *out_uint,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ const gchar * const *in_strv,
+ guint *out_uint,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_uint, (proxy, in_strv, out_uint, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_uint__void (EClient *client, guint in_uint, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, guint in_uint, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_uint__void (EClient *client,
+ guint in_uint,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ guint in_uint,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (client, (proxy, in_uint, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_uint__boolean (EClient *client, guint in_uint, gboolean *out_boolean, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, guint in_uint, gboolean *out_boolean, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_uint__boolean (EClient *client,
+ guint in_uint,
+ gboolean *out_boolean,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ guint in_uint,
+ gboolean *out_boolean,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_boolean, (proxy, in_uint, out_boolean, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_uint__string (EClient *client, guint in_uint, gchar **out_string, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, guint in_uint, gchar **out_string, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_uint__string (EClient *client,
+ guint in_uint,
+ gchar **out_string,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ guint in_uint,
+ gchar **out_string,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_string, (proxy, in_uint, out_string, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_uint__strv (EClient *client, guint in_uint, gchar ***out_strv, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, guint in_uint, gchar ***out_strv, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_uint__strv (EClient *client,
+ guint in_uint,
+ gchar ***out_strv,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ guint in_uint,
+ gchar ***out_strv,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_strv, (proxy, in_uint, out_strv, use_cancellable, &local_error))
}
gboolean
-e_client_proxy_call_sync_uint__uint (EClient *client, guint in_uint, guint *out_uint, GCancellable *cancellable, GError **error, gboolean (*func) (GDBusProxy *proxy, guint in_uint, guint *out_uint, GCancellable *cancellable, GError **error))
+e_client_proxy_call_sync_uint__uint (EClient *client,
+ guint in_uint,
+ guint *out_uint,
+ GCancellable *cancellable,
+ GError **error,
+ gboolean (*func) (GDBusProxy *proxy,
+ guint in_uint,
+ guint *out_uint,
+ GCancellable *cancellable,
+ GError **error))
{
SYNC_CALL_TEMPLATE (out_uint, (proxy, in_uint, out_uint, use_cancellable, &local_error))
}
diff --git a/libedataserver/e-credentials.c b/libedataserver/e-credentials.c
index 716796e..a32cf41 100644
--- a/libedataserver/e-credentials.c
+++ b/libedataserver/e-credentials.c
@@ -37,7 +37,8 @@ struct _ECredentialsPrivate
};
static gboolean
-key_equal (gconstpointer str1, gconstpointer str2)
+key_equal (gconstpointer str1,
+ gconstpointer str2)
{
g_return_val_if_fail (str1 != NULL, FALSE);
g_return_val_if_fail (str2 != NULL, FALSE);
@@ -62,7 +63,7 @@ e_credentials_new (void)
}
/* Expects @keys as NULL terminate list of strings "key:encoded_value".
- The same can be returned from e_credentials_to_strv ().
+ * The same can be returned from e_credentials_to_strv ().
*/
ECredentials *
e_credentials_new_strv (const gchar * const *keys)
@@ -89,7 +90,8 @@ e_credentials_new_strv (const gchar * const *keys)
/* NULL-terminated list of string pairs <key, value>; value is in a clear form */
ECredentials *
-e_credentials_new_args (const gchar *key, ...)
+e_credentials_new_args (const gchar *key,
+ ...)
{
ECredentials *credentials;
va_list va;
@@ -115,13 +117,15 @@ e_credentials_new_args (const gchar *key, ...)
}
static void
-copy_keys_cb (gpointer key, gpointer value, gpointer hash_table)
+copy_keys_cb (gpointer key,
+ gpointer value,
+ gpointer hash_table)
{
g_hash_table_insert (hash_table, g_strdup (key), g_strdup (value));
}
ECredentials *
-e_credentials_new_clone (const ECredentials *credentials)
+e_credentials_new_clone (const ECredentials *credentials)
{
ECredentials *res;
@@ -151,7 +155,9 @@ e_credentials_free (ECredentials *credentials)
}
static void
-add_to_array_cb (gpointer key, gpointer value, gpointer ptr_array)
+add_to_array_cb (gpointer key,
+ gpointer value,
+ gpointer ptr_array)
{
if (key && value && ptr_array) {
gchar *str = g_strconcat (key, ":", value, NULL);
@@ -163,9 +169,9 @@ add_to_array_cb (gpointer key, gpointer value, gpointer ptr_array)
}
/* Returns NULL-terminated array of strings with keys and encoded values;
- To read them back pass this pointer to e_credentials_new (). As it returns
- newly allocated string then this should be freed with g_strfreev ()
- when no longer needed.
+ * To read them back pass this pointer to e_credentials_new (). As it returns
+ * newly allocated string then this should be freed with g_strfreev ()
+ * when no longer needed.
*/
gchar **
e_credentials_to_strv (const ECredentials *credentials)
@@ -240,11 +246,13 @@ decode_string (const gchar *encoded)
}
/* sets value for a key, if value is NULL or an empty string then the key is removed.
- the value is supposed to be in a clear form (unencoded).
- 'key' cannot contain colon.
+ * the value is supposed to be in a clear form (unencoded).
+ * 'key' cannot contain colon.
*/
void
-e_credentials_set (ECredentials *credentials, const gchar *key, const gchar *value)
+e_credentials_set (ECredentials *credentials,
+ const gchar *key,
+ const gchar *value)
{
g_return_if_fail (credentials != NULL);
g_return_if_fail (credentials->priv != NULL);
@@ -264,10 +272,11 @@ e_credentials_set (ECredentials *credentials, const gchar *key, const gchar *val
}
/* Returned pointer should be freed with e_credentials_util_safe_free_string()
- when no longer needed.
+ * when no longer needed.
*/
gchar *
-e_credentials_get (const ECredentials *credentials, const gchar *key)
+e_credentials_get (const ECredentials *credentials,
+ const gchar *key)
{
const gchar *stored;
@@ -285,11 +294,12 @@ e_credentials_get (const ECredentials *credentials, const gchar *key)
}
/* peeks value for a key, in a clear form. The value is valid until free
- of the @credentials structure or until the key value is rewritten
- by e_credentials_set ()
+ * of the @credentials structure or until the key value is rewritten
+ * by e_credentials_set ()
*/
const gchar *
-e_credentials_peek (ECredentials *credentials, const gchar *key)
+e_credentials_peek (ECredentials *credentials,
+ const gchar *key)
{
gchar *value;
@@ -317,7 +327,9 @@ struct equal_data
};
static void
-check_equal_cb (gpointer key, gpointer value, gpointer user_data)
+check_equal_cb (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
struct equal_data *ed = user_data;
@@ -331,7 +343,8 @@ check_equal_cb (gpointer key, gpointer value, gpointer user_data)
/* Returns whether two credential structurs contain the same keys with same values */
gboolean
-e_credentials_equal (const ECredentials *credentials1, const ECredentials *credentials2)
+e_credentials_equal (const ECredentials *credentials1,
+ const ECredentials *credentials2)
{
struct equal_data ed;
@@ -362,7 +375,10 @@ e_credentials_equal (const ECredentials *credentials1, const ECredentials *crede
/* Returns whether two credentials structures has same keys. Key names are NULL-terminated. */
gboolean
-e_credentials_equal_keys (const ECredentials *credentials1, const ECredentials *credentials2, const gchar *key1, ...)
+e_credentials_equal_keys (const ECredentials *credentials1,
+ const ECredentials *credentials2,
+ const gchar *key1,
+ ...)
{
va_list va;
gboolean equal = TRUE;
@@ -393,7 +409,8 @@ e_credentials_equal_keys (const ECredentials *credentials1, const ECredentials *
* This key is non-NULL and non-empty string.
**/
gboolean
-e_credentials_has_key (const ECredentials *credentials, const gchar *key)
+e_credentials_has_key (const ECredentials *credentials,
+ const gchar *key)
{
g_return_val_if_fail (credentials != NULL, FALSE);
g_return_val_if_fail (credentials->priv != NULL, FALSE);
@@ -415,7 +432,9 @@ e_credentials_keys_size (const ECredentials *credentials)
}
static void
-gather_key_names (gpointer key, gpointer value, gpointer pslist)
+gather_key_names (gpointer key,
+ gpointer value,
+ gpointer pslist)
{
GSList **slist = pslist;
@@ -426,11 +445,11 @@ gather_key_names (gpointer key, gpointer value, gpointer pslist)
}
/* Returns newly allocated list of key names stored in the credentials strucutre;
- strings are internal credentials values, only the list is newly allocated.
- Free the list with g_slist_free () when no longer needed.
+ * strings are internal credentials values, only the list is newly allocated.
+ * Free the list with g_slist_free () when no longer needed.
*/
GSList *
-e_credentials_list_keys (const ECredentials *credentials)
+e_credentials_list_keys (const ECredentials *credentials)
{
GSList *keys = NULL;
@@ -495,7 +514,7 @@ static struct _PromptFlags {
};
/* Returned pointer can be passed to e_credentials_util_string_to prompt_flags()
- to decode it back to flags. Free returned pointer with g_free ().
+ * to decode it back to flags. Free returned pointer with g_free ().
*/
gchar *
e_credentials_util_prompt_flags_to_string (guint prompt_flags)
diff --git a/libedataserver/e-data-server-util.c b/libedataserver/e-data-server-util.c
index 7fac72f..a08299e 100644
--- a/libedataserver/e-data-server-util.c
+++ b/libedataserver/e-data-server-util.c
@@ -751,7 +751,7 @@ e_filename_make_safe (gchar *string)
* written?
*/
if (!g_unichar_isprint (c) || ( c < 0xff && strchr (unsafe_chars, c&0xff ))) {
- while (ts<p)
+ while (ts < p)
*ts++ = '_';
}
}
@@ -780,8 +780,8 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL,
/* Minimal DllMain that just tucks away the DLL's HMODULE */
BOOL WINAPI
DllMain (HINSTANCE hinstDLL,
- DWORD fdwReason,
- LPVOID lpvReserved)
+ DWORD fdwReason,
+ LPVOID lpvReserved)
{
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
@@ -941,7 +941,9 @@ free_pt_data (gpointer ptr)
}
static void
-dump_left_ptrs_cb (gpointer key, gpointer value, gpointer user_data)
+dump_left_ptrs_cb (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
guint *left = user_data;
struct pt_data *ptd = value;
@@ -965,7 +967,8 @@ by_backtrace_hash (gconstpointer ptr)
}
static gboolean
-by_backtrace_equal (gconstpointer ptr1, gconstpointer ptr2)
+by_backtrace_equal (gconstpointer ptr1,
+ gconstpointer ptr2)
{
const struct pt_data *ptd1 = ptr1, *ptd2 = ptr2;
@@ -976,7 +979,9 @@ by_backtrace_equal (gconstpointer ptr1, gconstpointer ptr2)
}
static void
-dump_by_backtrace_cb (gpointer key, gpointer value, gpointer user_data)
+dump_by_backtrace_cb (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
guint *left = user_data;
struct pt_data *ptd = key;
@@ -1107,7 +1112,11 @@ struct getmodules_callback_arg
};
static gint
-getmodules_callback (Dwfl_Module *module, gpointer *module_userdata_pointer, const gchar *module_name, Dwarf_Addr module_low_addr, gpointer arg_voidp)
+getmodules_callback (Dwfl_Module *module,
+ gpointer *module_userdata_pointer,
+ const gchar *module_name,
+ Dwarf_Addr module_low_addr,
+ gpointer arg_voidp)
{
struct getmodules_callback_arg *arg = arg_voidp;
Dwfl_Line *line;
@@ -1125,7 +1134,10 @@ getmodules_callback (Dwfl_Module *module, gpointer *module_userdata_pointer, con
#endif /* HAVE_ELFUTILS_LIBDWFL */
static const gchar *
-addr_lookup (gpointer addr, const gchar **file_path, gint *lineno, const gchar *fallback)
+addr_lookup (gpointer addr,
+ const gchar **file_path,
+ gint *lineno,
+ const gchar *fallback)
{
#ifdef HAVE_ELFUTILS_LIBDWFL
Dwfl *dwfl = dwfl_get (FALSE);
@@ -1232,7 +1244,8 @@ dump_left_at_exit_cb (void)
}
void
-e_pointer_tracker_track_with_info (gpointer ptr, const gchar *info)
+e_pointer_tracker_track_with_info (gpointer ptr,
+ const gchar *info)
{
struct pt_data *ptd;
diff --git a/libedataserver/e-debug-log.c b/libedataserver/e-debug-log.c
index 6a7192d..a719c78 100644
--- a/libedataserver/e-debug-log.c
+++ b/libedataserver/e-debug-log.c
@@ -64,7 +64,10 @@ unlock (void)
* Since: 2.32
**/
void
-e_debug_log (gboolean is_milestone, const gchar *domain, const gchar *format, ...)
+e_debug_log (gboolean is_milestone,
+ const gchar *domain,
+ const gchar *format,
+ ...)
{
va_list args;
@@ -148,7 +151,10 @@ add_to_milestones (const gchar *str)
* Since: 2.32
**/
void
-e_debug_logv (gboolean is_milestone, const gchar *domain, const gchar *format, va_list args)
+e_debug_logv (gboolean is_milestone,
+ const gchar *domain,
+ const gchar *format,
+ va_list args)
{
gchar *str;
gchar *debug_str;
@@ -192,7 +198,8 @@ e_debug_logv (gboolean is_milestone, const gchar *domain, const gchar *format, v
* Since: 2.32
**/
gboolean
-e_debug_log_load_configuration (const gchar *filename, GError **error)
+e_debug_log_load_configuration (const gchar *filename,
+ GError **error)
{
GKeyFile *key_file;
gchar **strings;
@@ -245,7 +252,8 @@ e_debug_log_load_configuration (const gchar *filename, GError **error)
* Since: 2.32
**/
void
-e_debug_log_enable_domains (const gchar **domains, gint n_domains)
+e_debug_log_enable_domains (const gchar **domains,
+ gint n_domains)
{
gint i;
@@ -280,7 +288,8 @@ e_debug_log_enable_domains (const gchar **domains, gint n_domains)
* Since: 2.32
**/
void
-e_debug_log_disable_domains (const gchar **domains, gint n_domains)
+e_debug_log_disable_domains (const gchar **domains,
+ gint n_domains)
{
gint i;
@@ -334,7 +343,9 @@ struct domains_dump_closure {
};
static void
-domains_foreach_dump_cb (gpointer key, gpointer value, gpointer data)
+domains_foreach_dump_cb (gpointer key,
+ gpointer value,
+ gpointer data)
{
struct domains_dump_closure *closure;
gchar *domain;
@@ -380,7 +391,10 @@ make_key_file_from_configuration (void)
}
static gboolean
-write_string (const gchar *filename, FILE *file, const gchar *str, GError **error)
+write_string (const gchar *filename,
+ FILE *file,
+ const gchar *str,
+ GError **error)
{
if (fputs (str, file) == EOF) {
gint saved_errno;
@@ -398,7 +412,9 @@ write_string (const gchar *filename, FILE *file, const gchar *str, GError **erro
}
static gboolean
-dump_configuration (const gchar *filename, FILE *file, GError **error)
+dump_configuration (const gchar *filename,
+ FILE *file,
+ GError **error)
{
GKeyFile *key_file;
gchar *data;
@@ -433,7 +449,9 @@ dump_configuration (const gchar *filename, FILE *file, GError **error)
}
static gboolean
-dump_milestones (const gchar *filename, FILE *file, GError **error)
+dump_milestones (const gchar *filename,
+ FILE *file,
+ GError **error)
{
GSList *l;
@@ -456,7 +474,9 @@ dump_milestones (const gchar *filename, FILE *file, GError **error)
}
static gboolean
-dump_ring_buffer (const gchar *filename, FILE *file, GError **error)
+dump_ring_buffer (const gchar *filename,
+ FILE *file,
+ GError **error)
{
gint start_index;
gint i;
@@ -492,7 +512,8 @@ dump_ring_buffer (const gchar *filename, FILE *file, GError **error)
* Since: 2.32
**/
gboolean
-e_debug_log_dump (const gchar *filename, GError **error)
+e_debug_log_dump (const gchar *filename,
+ GError **error)
{
FILE *file;
gboolean success;
diff --git a/libedataserver/e-flag.c b/libedataserver/e-flag.c
index 2971018..ccffd88 100644
--- a/libedataserver/e-flag.c
+++ b/libedataserver/e-flag.c
@@ -150,7 +150,8 @@ e_flag_wait (EFlag *flag)
* Since: 1.12
**/
gboolean
-e_flag_timed_wait (EFlag *flag, GTimeVal *abs_time)
+e_flag_timed_wait (EFlag *flag,
+ GTimeVal *abs_time)
{
gboolean is_set;
diff --git a/libedataserver/e-gdbus-templates.c b/libedataserver/e-gdbus-templates.c
index b5c6ec2..009f2f0 100644
--- a/libedataserver/e-gdbus-templates.c
+++ b/libedataserver/e-gdbus-templates.c
@@ -28,7 +28,11 @@
#include "e-gdbus-templates.h"
gboolean
-e_gdbus_signal_emission_hook_void (GSignalInvocationHint *ihint, guint n_param_values, const GValue *param_values, const gchar *signal_name, const gchar *iface_name)
+e_gdbus_signal_emission_hook_void (GSignalInvocationHint *ihint,
+ guint n_param_values,
+ const GValue *param_values,
+ const gchar *signal_name,
+ const gchar *iface_name)
{
GObject *object;
GDBusConnection *connection;
@@ -49,7 +53,11 @@ e_gdbus_signal_emission_hook_void (GSignalInvocationHint *ihint, guint n_param_v
}
gboolean
-e_gdbus_signal_emission_hook_boolean (GSignalInvocationHint *ihint, guint n_param_values, const GValue *param_values, const gchar *signal_name, const gchar *iface_name)
+e_gdbus_signal_emission_hook_boolean (GSignalInvocationHint *ihint,
+ guint n_param_values,
+ const GValue *param_values,
+ const gchar *signal_name,
+ const gchar *iface_name)
{
GObject *object;
GDBusConnection *connection;
@@ -82,7 +90,11 @@ e_gdbus_signal_emission_hook_boolean (GSignalInvocationHint *ihint, guint n_para
}
gboolean
-e_gdbus_signal_emission_hook_string (GSignalInvocationHint *ihint, guint n_param_values, const GValue *param_values, const gchar *signal_name, const gchar *iface_name)
+e_gdbus_signal_emission_hook_string (GSignalInvocationHint *ihint,
+ guint n_param_values,
+ const GValue *param_values,
+ const gchar *signal_name,
+ const gchar *iface_name)
{
GObject *object;
GDBusConnection *connection;
@@ -115,7 +127,11 @@ e_gdbus_signal_emission_hook_string (GSignalInvocationHint *ihint, guint n_param
}
gboolean
-e_gdbus_signal_emission_hook_strv (GSignalInvocationHint *ihint, guint n_param_values, const GValue *param_values, const gchar *signal_name, const gchar *iface_name)
+e_gdbus_signal_emission_hook_strv (GSignalInvocationHint *ihint,
+ guint n_param_values,
+ const GValue *param_values,
+ const gchar *signal_name,
+ const gchar *iface_name)
{
GObject *object;
GDBusConnection *connection;
@@ -150,7 +166,11 @@ e_gdbus_signal_emission_hook_strv (GSignalInvocationHint *ihint, guint n_param_v
}
gboolean
-e_gdbus_signal_emission_hook_uint (GSignalInvocationHint *ihint, guint n_param_values, const GValue *param_values, const gchar *signal_name, const gchar *iface_name)
+e_gdbus_signal_emission_hook_uint (GSignalInvocationHint *ihint,
+ guint n_param_values,
+ const GValue *param_values,
+ const gchar *signal_name,
+ const gchar *iface_name)
{
GObject *object;
GDBusConnection *connection;
@@ -183,7 +203,11 @@ e_gdbus_signal_emission_hook_uint (GSignalInvocationHint *ihint, guint n_param_v
}
gboolean
-e_gdbus_signal_emission_hook_uint_string (GSignalInvocationHint *ihint, guint n_param_values, const GValue *param_values, const gchar *signal_name, const gchar *iface_name)
+e_gdbus_signal_emission_hook_uint_string (GSignalInvocationHint *ihint,
+ guint n_param_values,
+ const GValue *param_values,
+ const gchar *signal_name,
+ const gchar *iface_name)
{
GObject *object;
GDBusConnection *connection;
@@ -219,7 +243,11 @@ e_gdbus_signal_emission_hook_uint_string (GSignalInvocationHint *ihint, guint n_
}
gboolean
-e_gdbus_signal_emission_hook_async_void (GSignalInvocationHint *ihint, guint n_param_values, const GValue *param_values, const gchar *signal_name, const gchar *iface_name)
+e_gdbus_signal_emission_hook_async_void (GSignalInvocationHint *ihint,
+ guint n_param_values,
+ const GValue *param_values,
+ const gchar *signal_name,
+ const gchar *iface_name)
{
GObject *object;
GDBusConnection *connection;
@@ -269,7 +297,11 @@ e_gdbus_signal_emission_hook_async_void (GSignalInvocationHint *ihint, guint n_p
}
gboolean
-e_gdbus_signal_emission_hook_async_boolean (GSignalInvocationHint *ihint, guint n_param_values, const GValue *param_values, const gchar *signal_name, const gchar *iface_name)
+e_gdbus_signal_emission_hook_async_boolean (GSignalInvocationHint *ihint,
+ guint n_param_values,
+ const GValue *param_values,
+ const gchar *signal_name,
+ const gchar *iface_name)
{
GObject *object;
GDBusConnection *connection;
@@ -326,7 +358,11 @@ e_gdbus_signal_emission_hook_async_boolean (GSignalInvocationHint *ihint, guint
}
gboolean
-e_gdbus_signal_emission_hook_async_string (GSignalInvocationHint *ihint, guint n_param_values, const GValue *param_values, const gchar *signal_name, const gchar *iface_name)
+e_gdbus_signal_emission_hook_async_string (GSignalInvocationHint *ihint,
+ guint n_param_values,
+ const GValue *param_values,
+ const gchar *signal_name,
+ const gchar *iface_name)
{
GObject *object;
GDBusConnection *connection;
@@ -383,7 +419,11 @@ e_gdbus_signal_emission_hook_async_string (GSignalInvocationHint *ihint, guint n
}
gboolean
-e_gdbus_signal_emission_hook_async_strv (GSignalInvocationHint *ihint, guint n_param_values, const GValue *param_values, const gchar *signal_name, const gchar *iface_name)
+e_gdbus_signal_emission_hook_async_strv (GSignalInvocationHint *ihint,
+ guint n_param_values,
+ const GValue *param_values,
+ const gchar *signal_name,
+ const gchar *iface_name)
{
GObject *object;
GDBusConnection *connection;
@@ -444,7 +484,11 @@ e_gdbus_signal_emission_hook_async_strv (GSignalInvocationHint *ihint, guint n_p
}
gboolean
-e_gdbus_signal_emission_hook_async_uint (GSignalInvocationHint *ihint, guint n_param_values, const GValue *param_values, const gchar *signal_name, const gchar *iface_name)
+e_gdbus_signal_emission_hook_async_uint (GSignalInvocationHint *ihint,
+ guint n_param_values,
+ const GValue *param_values,
+ const gchar *signal_name,
+ const gchar *iface_name)
{
GObject *object;
GDBusConnection *connection;
@@ -501,7 +545,10 @@ e_gdbus_signal_emission_hook_async_uint (GSignalInvocationHint *ihint, guint n_p
}
void
-e_gdbus_proxy_emit_signal (GDBusProxy *proxy, GVariant *parameters, guint signal_id, guint signal_type)
+e_gdbus_proxy_emit_signal (GDBusProxy *proxy,
+ GVariant *parameters,
+ guint signal_id,
+ guint signal_type)
{
gboolean arg_boolean = FALSE;
const gchar *arg_const_string = NULL;
@@ -601,7 +648,12 @@ e_gdbus_proxy_emit_signal (GDBusProxy *proxy, GVariant *parameters, guint signal
}
void
-e_gdbus_stub_handle_method_call (GObject *stub_object, GDBusMethodInvocation *invocation, GVariant *parameters, const gchar *method_name, guint method_id, guint method_type)
+e_gdbus_stub_handle_method_call (GObject *stub_object,
+ GDBusMethodInvocation *invocation,
+ GVariant *parameters,
+ const gchar *method_name,
+ guint method_id,
+ guint method_type)
{
gboolean handled = FALSE;
gboolean arg_boolean = FALSE;
@@ -651,8 +703,8 @@ e_gdbus_async_op_keeper_default_init (EGdbusAsyncOpKeeperInterface *iface)
}
/* Created hash table of pending async operations. This can be freed
- with g_hash_table_destroy () in dispose. Interface asks for this
- ponter by call of e_gdbus_async_op_keeper_create_pending_ops ().
+ * with g_hash_table_destroy () in dispose. Interface asks for this
+ * ponter by call of e_gdbus_async_op_keeper_create_pending_ops ().
*/
GHashTable *
e_gdbus_async_op_keeper_create_pending_ops (EGdbusAsyncOpKeeper *object)
@@ -664,7 +716,7 @@ e_gdbus_async_op_keeper_create_pending_ops (EGdbusAsyncOpKeeper *object)
}
/* Returns hash table of pending async operations previously created
- by e_gdbus_async_op_keeper_create_pending_ops ().
+ * by e_gdbus_async_op_keeper_create_pending_ops ().
*/
GHashTable *
e_gdbus_async_op_keeper_get_pending_ops (EGdbusAsyncOpKeeper *object)
@@ -681,7 +733,10 @@ e_gdbus_async_op_keeper_get_pending_ops (EGdbusAsyncOpKeeper *object)
/* synchronously cancels one operation - sends a request from client to the server */
gboolean
-e_gdbus_async_op_keeper_cancel_op_sync (EGdbusAsyncOpKeeper *object, guint in_opid, GCancellable *cancellable, GError **error)
+e_gdbus_async_op_keeper_cancel_op_sync (EGdbusAsyncOpKeeper *object,
+ guint in_opid,
+ GCancellable *cancellable,
+ GError **error)
{
EGdbusAsyncOpKeeperInterface *iface;
@@ -694,17 +749,21 @@ e_gdbus_async_op_keeper_cancel_op_sync (EGdbusAsyncOpKeeper *object, guint in_op
}
/* Used to finish asynchronous GDBus call - this might be done in the callback
- as soon as possible; method returns to a caller operation ID which was started */
+ * as soon as possible; method returns to a caller operation ID which was started */
void
-e_gdbus_complete_async_method (gpointer object, GDBusMethodInvocation *invocation, guint opid)
+e_gdbus_complete_async_method (gpointer object,
+ GDBusMethodInvocation *invocation,
+ guint opid)
{
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(u)", opid));
}
/* Used to finish synchronous GDBus call - this might be done in the callback
- as soon as possible */
+ * as soon as possible */
void
-e_gdbus_complete_sync_method_void (gpointer object, GDBusMethodInvocation *invocation, const GError *error)
+e_gdbus_complete_sync_method_void (gpointer object,
+ GDBusMethodInvocation *invocation,
+ const GError *error)
{
if (error)
g_dbus_method_invocation_return_gerror (invocation, error);
@@ -713,7 +772,10 @@ e_gdbus_complete_sync_method_void (gpointer object, GDBusMethodInvocation *invoc
}
void
-e_gdbus_complete_sync_method_boolean (gpointer object, GDBusMethodInvocation *invocation, gboolean out_boolean, const GError *error)
+e_gdbus_complete_sync_method_boolean (gpointer object,
+ GDBusMethodInvocation *invocation,
+ gboolean out_boolean,
+ const GError *error)
{
if (error)
g_dbus_method_invocation_return_gerror (invocation, error);
@@ -722,7 +784,10 @@ e_gdbus_complete_sync_method_boolean (gpointer object, GDBusMethodInvocation *in
}
void
-e_gdbus_complete_sync_method_string (gpointer object, GDBusMethodInvocation *invocation, const gchar *out_string, const GError *error)
+e_gdbus_complete_sync_method_string (gpointer object,
+ GDBusMethodInvocation *invocation,
+ const gchar *out_string,
+ const GError *error)
{
if (error)
g_dbus_method_invocation_return_gerror (invocation, error);
@@ -731,7 +796,10 @@ e_gdbus_complete_sync_method_string (gpointer object, GDBusMethodInvocation *inv
}
void
-e_gdbus_complete_sync_method_strv (gpointer object, GDBusMethodInvocation *invocation, const gchar * const *out_strv, const GError *error)
+e_gdbus_complete_sync_method_strv (gpointer object,
+ GDBusMethodInvocation *invocation,
+ const gchar * const *out_strv,
+ const GError *error)
{
if (error)
g_dbus_method_invocation_return_gerror (invocation, error);
@@ -740,7 +808,10 @@ e_gdbus_complete_sync_method_strv (gpointer object, GDBusMethodInvocation *invoc
}
void
-e_gdbus_complete_sync_method_uint (gpointer object, GDBusMethodInvocation *invocation, guint out_uint, const GError *error)
+e_gdbus_complete_sync_method_uint (gpointer object,
+ GDBusMethodInvocation *invocation,
+ guint out_uint,
+ const GError *error)
{
if (error)
g_dbus_method_invocation_return_gerror (invocation, error);
@@ -804,7 +875,9 @@ async_op_data_free (AsyncOpData *op_data)
}
static void
-async_op_complete (AsyncOpData *op_data, const GError *error, gboolean in_idle)
+async_op_complete (AsyncOpData *op_data,
+ const GError *error,
+ gboolean in_idle)
{
GSimpleAsyncResult *simple;
@@ -824,7 +897,8 @@ async_op_complete (AsyncOpData *op_data, const GError *error, gboolean in_idle)
}
static void
-gdbus_op_cancelled_cb (GCancellable *cancellable, AsyncOpData *op_data)
+gdbus_op_cancelled_cb (GCancellable *cancellable,
+ AsyncOpData *op_data)
{
GError *call_error = NULL;
@@ -847,7 +921,9 @@ gdbus_op_cancelled_cb (GCancellable *cancellable, AsyncOpData *op_data)
}
static void
-gdbus_async_call_opid_ready_cb (GObject *source_proxy, GAsyncResult *result, gpointer user_data)
+gdbus_async_call_opid_ready_cb (GObject *source_proxy,
+ GAsyncResult *result,
+ gpointer user_data)
{
GVariant *_result;
GError *error = NULL;
@@ -905,7 +981,11 @@ copy_strv (const gchar * const *strv)
}
static void
-gdbus_proxy_async_method_done (guint e_gdbus_type, gconstpointer out_value, EGdbusAsyncOpKeeper *object, guint arg_opid, const GError *error)
+gdbus_proxy_async_method_done (guint e_gdbus_type,
+ gconstpointer out_value,
+ EGdbusAsyncOpKeeper *object,
+ guint arg_opid,
+ const GError *error)
{
AsyncOpData *op_data;
GHashTable *pending_ops;
@@ -951,40 +1031,60 @@ gdbus_proxy_async_method_done (guint e_gdbus_type, gconstpointer out_value, EGdb
}
void
-e_gdbus_proxy_async_method_done_void (EGdbusAsyncOpKeeper *proxy, guint arg_opid, const GError *error)
+e_gdbus_proxy_async_method_done_void (EGdbusAsyncOpKeeper *proxy,
+ guint arg_opid,
+ const GError *error)
{
gdbus_proxy_async_method_done (E_GDBUS_TYPE_VOID, NULL, proxy, arg_opid, error);
}
void
-e_gdbus_proxy_async_method_done_boolean (EGdbusAsyncOpKeeper *proxy, guint arg_opid, const GError *error, gboolean out_boolean)
+e_gdbus_proxy_async_method_done_boolean (EGdbusAsyncOpKeeper *proxy,
+ guint arg_opid,
+ const GError *error,
+ gboolean out_boolean)
{
gdbus_proxy_async_method_done (E_GDBUS_TYPE_BOOLEAN, &out_boolean, proxy, arg_opid, error);
}
/* takes ownership of the out parameter */
void
-e_gdbus_proxy_async_method_done_string (EGdbusAsyncOpKeeper *proxy, guint arg_opid, const GError *error, const gchar *out_string)
+e_gdbus_proxy_async_method_done_string (EGdbusAsyncOpKeeper *proxy,
+ guint arg_opid,
+ const GError *error,
+ const gchar *out_string)
{
gdbus_proxy_async_method_done (E_GDBUS_TYPE_STRING, out_string, proxy, arg_opid, error);
}
/* takes ownership of the out parameter */
void
-e_gdbus_proxy_async_method_done_strv (EGdbusAsyncOpKeeper *proxy, guint arg_opid, const GError *error, const gchar * const *out_strv)
+e_gdbus_proxy_async_method_done_strv (EGdbusAsyncOpKeeper *proxy,
+ guint arg_opid,
+ const GError *error,
+ const gchar * const *out_strv)
{
gdbus_proxy_async_method_done (E_GDBUS_TYPE_STRV, out_strv, proxy, arg_opid, error);
}
void
-e_gdbus_proxy_async_method_done_uint (EGdbusAsyncOpKeeper *proxy, guint arg_opid, const GError *error, guint out_uint)
+e_gdbus_proxy_async_method_done_uint (EGdbusAsyncOpKeeper *proxy,
+ guint arg_opid,
+ const GError *error,
+ guint out_uint)
{
gdbus_proxy_async_method_done (E_GDBUS_TYPE_UINT, &out_uint, proxy, arg_opid, error);
}
/* takes ownership of _params */
static void
-gdbus_proxy_call_with_params (GVariant *_params, const gchar *method_name, gpointer source_tag, EGdbusAsyncOpKeeper *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+gdbus_proxy_call_with_params (GVariant *_params,
+ const gchar *method_name,
+ gpointer source_tag,
+ EGdbusAsyncOpKeeper *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
AsyncOpData *op_data;
@@ -1002,13 +1102,24 @@ gdbus_proxy_call_with_params (GVariant *_params, const gchar *method_name, gpoin
}
void
-e_gdbus_proxy_call_void (const gchar *method_name, gpointer source_tag, EGdbusAsyncOpKeeper *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_proxy_call_void (const gchar *method_name,
+ gpointer source_tag,
+ EGdbusAsyncOpKeeper *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
gdbus_proxy_call_with_params (NULL, method_name, source_tag, proxy, cancellable, callback, user_data);
}
void
-e_gdbus_proxy_call_boolean (const gchar *method_name, gpointer source_tag, EGdbusAsyncOpKeeper *proxy, gboolean in_boolean, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_proxy_call_boolean (const gchar *method_name,
+ gpointer source_tag,
+ EGdbusAsyncOpKeeper *proxy,
+ gboolean in_boolean,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
GVariant *_params;
@@ -1018,7 +1129,13 @@ e_gdbus_proxy_call_boolean (const gchar *method_name, gpointer source_tag, EGdbu
}
void
-e_gdbus_proxy_call_string (const gchar *method_name, gpointer source_tag, EGdbusAsyncOpKeeper *proxy, const gchar *in_string, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_proxy_call_string (const gchar *method_name,
+ gpointer source_tag,
+ EGdbusAsyncOpKeeper *proxy,
+ const gchar *in_string,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
GVariant *_params;
@@ -1028,7 +1145,13 @@ e_gdbus_proxy_call_string (const gchar *method_name, gpointer source_tag, EGdbus
}
void
-e_gdbus_proxy_call_strv (const gchar *method_name, gpointer source_tag, EGdbusAsyncOpKeeper *proxy, const gchar * const *in_strv, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_proxy_call_strv (const gchar *method_name,
+ gpointer source_tag,
+ EGdbusAsyncOpKeeper *proxy,
+ const gchar * const *in_strv,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
GVariant *_params;
@@ -1038,7 +1161,13 @@ e_gdbus_proxy_call_strv (const gchar *method_name, gpointer source_tag, EGdbusAs
}
void
-e_gdbus_proxy_call_uint (const gchar *method_name, gpointer source_tag, EGdbusAsyncOpKeeper *proxy, guint in_uint, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_proxy_call_uint (const gchar *method_name,
+ gpointer source_tag,
+ EGdbusAsyncOpKeeper *proxy,
+ guint in_uint,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
GVariant *_params;
@@ -1048,7 +1177,10 @@ e_gdbus_proxy_call_uint (const gchar *method_name, gpointer source_tag, EGdbusAs
}
gboolean
-e_gdbus_proxy_finish_call_void (EGdbusAsyncOpKeeper *proxy, GAsyncResult *result, GError **error, gpointer source_tag)
+e_gdbus_proxy_finish_call_void (EGdbusAsyncOpKeeper *proxy,
+ GAsyncResult *result,
+ GError **error,
+ gpointer source_tag)
{
g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (proxy), source_tag), FALSE);
@@ -1057,7 +1189,11 @@ e_gdbus_proxy_finish_call_void (EGdbusAsyncOpKeeper *proxy, GAsyncResult *result
}
gboolean
-e_gdbus_proxy_finish_call_boolean (EGdbusAsyncOpKeeper *proxy, GAsyncResult *result, gboolean *out_boolean, GError **error, gpointer source_tag)
+e_gdbus_proxy_finish_call_boolean (EGdbusAsyncOpKeeper *proxy,
+ GAsyncResult *result,
+ gboolean *out_boolean,
+ GError **error,
+ gpointer source_tag)
{
AsyncOpData *op_data;
@@ -1079,7 +1215,11 @@ e_gdbus_proxy_finish_call_boolean (EGdbusAsyncOpKeeper *proxy, GAsyncResult *res
/* caller takes ownership and responsibility for freeing the out parameter */
gboolean
-e_gdbus_proxy_finish_call_string (EGdbusAsyncOpKeeper *proxy, GAsyncResult *result, gchar **out_string, GError **error, gpointer source_tag)
+e_gdbus_proxy_finish_call_string (EGdbusAsyncOpKeeper *proxy,
+ GAsyncResult *result,
+ gchar **out_string,
+ GError **error,
+ gpointer source_tag)
{
AsyncOpData *op_data;
@@ -1102,7 +1242,11 @@ e_gdbus_proxy_finish_call_string (EGdbusAsyncOpKeeper *proxy, GAsyncResult *resu
/* caller takes ownership and responsibility for freeing the out parameter */
gboolean
-e_gdbus_proxy_finish_call_strv (EGdbusAsyncOpKeeper *proxy, GAsyncResult *result, gchar ***out_strv, GError **error, gpointer source_tag)
+e_gdbus_proxy_finish_call_strv (EGdbusAsyncOpKeeper *proxy,
+ GAsyncResult *result,
+ gchar ***out_strv,
+ GError **error,
+ gpointer source_tag)
{
AsyncOpData *op_data;
@@ -1124,7 +1268,11 @@ e_gdbus_proxy_finish_call_strv (EGdbusAsyncOpKeeper *proxy, GAsyncResult *result
}
gboolean
-e_gdbus_proxy_finish_call_uint (EGdbusAsyncOpKeeper *proxy, GAsyncResult *result, guint *out_uint, GError **error, gpointer source_tag)
+e_gdbus_proxy_finish_call_uint (EGdbusAsyncOpKeeper *proxy,
+ GAsyncResult *result,
+ guint *out_uint,
+ GError **error,
+ gpointer source_tag)
{
AsyncOpData *op_data;
@@ -1169,7 +1317,9 @@ typedef struct _SyncOpData
} SyncOpData;
static void
-gdbus_proxy_sync_ready_cb (GObject *proxy, GAsyncResult *result, gpointer user_data)
+gdbus_proxy_sync_ready_cb (GObject *proxy,
+ GAsyncResult *result,
+ gpointer user_data)
{
SyncOpData *sync_data = user_data;
@@ -1206,7 +1356,15 @@ gdbus_proxy_sync_ready_cb (GObject *proxy, GAsyncResult *result, gpointer user_d
}
static gboolean
-gdbus_proxy_call_sync (GDBusProxy *proxy, GCancellable *cancellable, GError **error, gpointer start_func, gpointer finish_func, guint in_type, gconstpointer in_value, guint out_type, gpointer out_value)
+gdbus_proxy_call_sync (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error,
+ gpointer start_func,
+ gpointer finish_func,
+ guint in_type,
+ gconstpointer in_value,
+ guint out_type,
+ gpointer out_value)
{
SyncOpData sync_data = { 0 };
@@ -1275,9 +1433,9 @@ gdbus_proxy_call_sync (GDBusProxy *proxy, GCancellable *cancellable, GError **er
|| g_main_context_default () == g_main_context_get_thread_default ()
|| !g_main_context_get_thread_default ()) {
/* Might not be the best thing here, but as the async operation
- is divided into two-steps process, invoking the method and
- waiting for its "done" signal, then if the sync method is called
- from the main thread, then there is probably no other option.
+ * is divided into two-step process, invoking the method and
+ * waiting for its "done" signal, then if the sync method is called
+ * from the main thread, then there is probably no other option.
*/
while (!e_flag_is_set (sync_data.flag)) {
g_usleep (250000);
@@ -1293,7 +1451,11 @@ gdbus_proxy_call_sync (GDBusProxy *proxy, GCancellable *cancellable, GError **er
}
gboolean
-e_gdbus_proxy_call_sync_void__void (GDBusProxy *proxy, GCancellable *cancellable, GError **error, EGdbusCallStartVoid start_func, EGdbusCallFinishVoid finish_func)
+e_gdbus_proxy_call_sync_void__void (GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error,
+ EGdbusCallStartVoid start_func,
+ EGdbusCallFinishVoid finish_func)
{
g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (start_func != NULL, FALSE);
@@ -1303,7 +1465,12 @@ e_gdbus_proxy_call_sync_void__void (GDBusProxy *proxy, GCancellable *cancellable
}
gboolean
-e_gdbus_proxy_call_sync_void__boolean (GDBusProxy *proxy, gboolean *out_boolean, GCancellable *cancellable, GError **error, EGdbusCallStartVoid start_func, EGdbusCallFinishBoolean finish_func)
+e_gdbus_proxy_call_sync_void__boolean (GDBusProxy *proxy,
+ gboolean *out_boolean,
+ GCancellable *cancellable,
+ GError **error,
+ EGdbusCallStartVoid start_func,
+ EGdbusCallFinishBoolean finish_func)
{
g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (start_func != NULL, FALSE);
@@ -1314,7 +1481,12 @@ e_gdbus_proxy_call_sync_void__boolean (GDBusProxy *proxy, gboolean *out_boolean,
}
gboolean
-e_gdbus_proxy_call_sync_void__string (GDBusProxy *proxy, gchar **out_string, GCancellable *cancellable, GError **error, EGdbusCallStartVoid start_func, EGdbusCallFinishString finish_func)
+e_gdbus_proxy_call_sync_void__string (GDBusProxy *proxy,
+ gchar **out_string,
+ GCancellable *cancellable,
+ GError **error,
+ EGdbusCallStartVoid start_func,
+ EGdbusCallFinishString finish_func)
{
g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (start_func != NULL, FALSE);
@@ -1325,7 +1497,12 @@ e_gdbus_proxy_call_sync_void__string (GDBusProxy *proxy, gchar **out_string, GCa
}
gboolean
-e_gdbus_proxy_call_sync_void__strv (GDBusProxy *proxy, gchar ***out_strv, GCancellable *cancellable, GError **error, EGdbusCallStartVoid start_func, EGdbusCallFinishStrv finish_func)
+e_gdbus_proxy_call_sync_void__strv (GDBusProxy *proxy,
+ gchar ***out_strv,
+ GCancellable *cancellable,
+ GError **error,
+ EGdbusCallStartVoid start_func,
+ EGdbusCallFinishStrv finish_func)
{
g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (start_func != NULL, FALSE);
@@ -1336,7 +1513,12 @@ e_gdbus_proxy_call_sync_void__strv (GDBusProxy *proxy, gchar ***out_strv, GCance
}
gboolean
-e_gdbus_proxy_call_sync_void__uint (GDBusProxy *proxy, guint *out_uint, GCancellable *cancellable, GError **error, EGdbusCallStartVoid start_func, EGdbusCallFinishUint finish_func)
+e_gdbus_proxy_call_sync_void__uint (GDBusProxy *proxy,
+ guint *out_uint,
+ GCancellable *cancellable,
+ GError **error,
+ EGdbusCallStartVoid start_func,
+ EGdbusCallFinishUint finish_func)
{
g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (start_func != NULL, FALSE);
@@ -1347,7 +1529,12 @@ e_gdbus_proxy_call_sync_void__uint (GDBusProxy *proxy, guint *out_uint, GCancell
}
gboolean
-e_gdbus_proxy_call_sync_boolean__void (GDBusProxy *proxy, gboolean in_boolean, GCancellable *cancellable, GError **error, EGdbusCallStartBoolean start_func, EGdbusCallFinishVoid finish_func)
+e_gdbus_proxy_call_sync_boolean__void (GDBusProxy *proxy,
+ gboolean in_boolean,
+ GCancellable *cancellable,
+ GError **error,
+ EGdbusCallStartBoolean start_func,
+ EGdbusCallFinishVoid finish_func)
{
g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (start_func != NULL, FALSE);
@@ -1357,7 +1544,12 @@ e_gdbus_proxy_call_sync_boolean__void (GDBusProxy *proxy, gboolean in_boolean, G
}
gboolean
-e_gdbus_proxy_call_sync_string__void (GDBusProxy *proxy, const gchar *in_string, GCancellable *cancellable, GError **error, EGdbusCallStartString start_func, EGdbusCallFinishVoid finish_func)
+e_gdbus_proxy_call_sync_string__void (GDBusProxy *proxy,
+ const gchar *in_string,
+ GCancellable *cancellable,
+ GError **error,
+ EGdbusCallStartString start_func,
+ EGdbusCallFinishVoid finish_func)
{
g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (start_func != NULL, FALSE);
@@ -1368,7 +1560,12 @@ e_gdbus_proxy_call_sync_string__void (GDBusProxy *proxy, const gchar *in_string,
}
gboolean
-e_gdbus_proxy_call_sync_strv__void (GDBusProxy *proxy, const gchar * const *in_strv, GCancellable *cancellable, GError **error, EGdbusCallStartStrv start_func, EGdbusCallFinishVoid finish_func)
+e_gdbus_proxy_call_sync_strv__void (GDBusProxy *proxy,
+ const gchar * const *in_strv,
+ GCancellable *cancellable,
+ GError **error,
+ EGdbusCallStartStrv start_func,
+ EGdbusCallFinishVoid finish_func)
{
g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (start_func != NULL, FALSE);
@@ -1379,7 +1576,12 @@ e_gdbus_proxy_call_sync_strv__void (GDBusProxy *proxy, const gchar * const *in_s
}
gboolean
-e_gdbus_proxy_call_sync_uint__void (GDBusProxy *proxy, guint in_uint, GCancellable *cancellable, GError **error, EGdbusCallStartUint start_func, EGdbusCallFinishVoid finish_func)
+e_gdbus_proxy_call_sync_uint__void (GDBusProxy *proxy,
+ guint in_uint,
+ GCancellable *cancellable,
+ GError **error,
+ EGdbusCallStartUint start_func,
+ EGdbusCallFinishVoid finish_func)
{
g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (start_func != NULL, FALSE);
@@ -1389,7 +1591,13 @@ e_gdbus_proxy_call_sync_uint__void (GDBusProxy *proxy, guint in_uint, GCancellab
}
gboolean
-e_gdbus_proxy_call_sync_string__string (GDBusProxy *proxy, const gchar *in_string, gchar **out_string, GCancellable *cancellable, GError **error, EGdbusCallStartString start_func, EGdbusCallFinishString finish_func)
+e_gdbus_proxy_call_sync_string__string (GDBusProxy *proxy,
+ const gchar *in_string,
+ gchar **out_string,
+ GCancellable *cancellable,
+ GError **error,
+ EGdbusCallStartString start_func,
+ EGdbusCallFinishString finish_func)
{
g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (start_func != NULL, FALSE);
@@ -1401,7 +1609,13 @@ e_gdbus_proxy_call_sync_string__string (GDBusProxy *proxy, const gchar *in_strin
}
gboolean
-e_gdbus_proxy_call_sync_string__strv (GDBusProxy *proxy, const gchar *in_string, gchar ***out_strv, GCancellable *cancellable, GError **error, EGdbusCallStartString start_func, EGdbusCallFinishStrv finish_func)
+e_gdbus_proxy_call_sync_string__strv (GDBusProxy *proxy,
+ const gchar *in_string,
+ gchar ***out_strv,
+ GCancellable *cancellable,
+ GError **error,
+ EGdbusCallStartString start_func,
+ EGdbusCallFinishStrv finish_func)
{
g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (start_func != NULL, FALSE);
@@ -1413,7 +1627,13 @@ e_gdbus_proxy_call_sync_string__strv (GDBusProxy *proxy, const gchar *in_string,
}
gboolean
-e_gdbus_proxy_call_sync_strv__string (GDBusProxy *proxy, const gchar * const *in_strv, gchar **out_string, GCancellable *cancellable, GError **error, EGdbusCallStartStrv start_func, EGdbusCallFinishString finish_func)
+e_gdbus_proxy_call_sync_strv__string (GDBusProxy *proxy,
+ const gchar * const *in_strv,
+ gchar **out_string,
+ GCancellable *cancellable,
+ GError **error,
+ EGdbusCallStartStrv start_func,
+ EGdbusCallFinishString finish_func)
{
g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (start_func != NULL, FALSE);
@@ -1425,7 +1645,13 @@ e_gdbus_proxy_call_sync_strv__string (GDBusProxy *proxy, const gchar * const *in
}
gboolean
-e_gdbus_proxy_call_sync_strv__strv (GDBusProxy *proxy, const gchar * const *in_strv, gchar ***out_strv, GCancellable *cancellable, GError **error, EGdbusCallStartStrv start_func, EGdbusCallFinishStrv finish_func)
+e_gdbus_proxy_call_sync_strv__strv (GDBusProxy *proxy,
+ const gchar * const *in_strv,
+ gchar ***out_strv,
+ GCancellable *cancellable,
+ GError **error,
+ EGdbusCallStartStrv start_func,
+ EGdbusCallFinishStrv finish_func)
{
g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (start_func != NULL, FALSE);
@@ -1437,7 +1663,13 @@ e_gdbus_proxy_call_sync_strv__strv (GDBusProxy *proxy, const gchar * const *in_s
}
static void
-proxy_method_call (const gchar *method_name, guint param_type, gconstpointer param_value, GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+proxy_method_call (const gchar *method_name,
+ guint param_type,
+ gconstpointer param_value,
+ GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
GVariant *params = NULL;
GVariant *item;
@@ -1486,37 +1718,64 @@ proxy_method_call (const gchar *method_name, guint param_type, gconstpointer par
}
void
-e_gdbus_proxy_method_call_void (const gchar *method_name, GDBusProxy *proxy, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_proxy_method_call_void (const gchar *method_name,
+ GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
proxy_method_call (method_name, E_GDBUS_TYPE_VOID, NULL, proxy, cancellable, callback, user_data);
}
void
-e_gdbus_proxy_method_call_boolean (const gchar *method_name, GDBusProxy *proxy, gboolean in_boolean, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_proxy_method_call_boolean (const gchar *method_name,
+ GDBusProxy *proxy,
+ gboolean in_boolean,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
proxy_method_call (method_name, E_GDBUS_TYPE_BOOLEAN, &in_boolean, proxy, cancellable, callback, user_data);
}
void
-e_gdbus_proxy_method_call_string (const gchar *method_name, GDBusProxy *proxy, const gchar *in_string, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_proxy_method_call_string (const gchar *method_name,
+ GDBusProxy *proxy,
+ const gchar *in_string,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
proxy_method_call (method_name, E_GDBUS_TYPE_STRING, in_string, proxy, cancellable, callback, user_data);
}
void
-e_gdbus_proxy_method_call_strv (const gchar *method_name, GDBusProxy *proxy, const gchar * const *in_strv, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_proxy_method_call_strv (const gchar *method_name,
+ GDBusProxy *proxy,
+ const gchar * const *in_strv,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
proxy_method_call (method_name, E_GDBUS_TYPE_STRV, in_strv, proxy, cancellable, callback, user_data);
}
void
-e_gdbus_proxy_method_call_uint (const gchar *method_name, GDBusProxy *proxy, guint in_uint, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
+e_gdbus_proxy_method_call_uint (const gchar *method_name,
+ GDBusProxy *proxy,
+ guint in_uint,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
proxy_method_call (method_name, E_GDBUS_TYPE_VOID, &in_uint, proxy, cancellable, callback, user_data);
}
static gboolean
-process_result (const gchar *caller_func_name, guint out_type, gpointer out_value, GVariant *_result)
+process_result (const gchar *caller_func_name,
+ guint out_type,
+ gpointer out_value,
+ GVariant *_result)
{
if (out_type != E_GDBUS_TYPE_VOID)
g_return_val_if_fail (out_value != NULL, FALSE);
@@ -1550,7 +1809,11 @@ process_result (const gchar *caller_func_name, guint out_type, gpointer out_valu
}
static gboolean
-proxy_method_call_finish (guint out_type, gpointer out_param, GDBusProxy *proxy, GAsyncResult *result, GError **error)
+proxy_method_call_finish (guint out_type,
+ gpointer out_param,
+ GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (G_IS_DBUS_PROXY (proxy), FALSE);
@@ -1561,37 +1824,58 @@ proxy_method_call_finish (guint out_type, gpointer out_param, GDBusProxy *proxy,
}
gboolean
-e_gdbus_proxy_method_call_finish_void (GDBusProxy *proxy, GAsyncResult *result, GError **error)
+e_gdbus_proxy_method_call_finish_void (GDBusProxy *proxy,
+ GAsyncResult *result,
+ GError **error)
{
return proxy_method_call_finish (E_GDBUS_TYPE_VOID, NULL, proxy, result, error);
}
gboolean
-e_gdbus_proxy_method_call_finish_boolean (GDBusProxy *proxy, GAsyncResult *result, gboolean *out_boolean, GError **error)
+e_gdbus_proxy_method_call_finish_boolean (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gboolean *out_boolean,
+ GError **error)
{
return proxy_method_call_finish (E_GDBUS_TYPE_BOOLEAN, out_boolean, proxy, result, error);
}
gboolean
-e_gdbus_proxy_method_call_finish_string (GDBusProxy *proxy, GAsyncResult *result, gchar **out_string, GError **error)
+e_gdbus_proxy_method_call_finish_string (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar **out_string,
+ GError **error)
{
return proxy_method_call_finish (E_GDBUS_TYPE_STRING, out_string, proxy, result, error);
}
gboolean
-e_gdbus_proxy_method_call_finish_strv (GDBusProxy *proxy, GAsyncResult *result, gchar ***out_strv, GError **error)
+e_gdbus_proxy_method_call_finish_strv (GDBusProxy *proxy,
+ GAsyncResult *result,
+ gchar ***out_strv,
+ GError **error)
{
return proxy_method_call_finish (E_GDBUS_TYPE_STRV, out_strv, proxy, result, error);
}
gboolean
-e_gdbus_proxy_method_call_finish_uint (GDBusProxy *proxy, GAsyncResult *result, guint *out_uint, GError **error)
+e_gdbus_proxy_method_call_finish_uint (GDBusProxy *proxy,
+ GAsyncResult *result,
+ guint *out_uint,
+ GError **error)
{
return proxy_method_call_finish (E_GDBUS_TYPE_UINT, out_uint, proxy, result, error);
}
static gboolean
-proxy_method_call_sync (const gchar *method_name, guint in_type, gconstpointer in_value, guint out_type, gpointer out_value, GDBusProxy *proxy, GCancellable *cancellable, GError **error)
+proxy_method_call_sync (const gchar *method_name,
+ guint in_type,
+ gconstpointer in_value,
+ guint out_type,
+ gpointer out_value,
+ GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error)
{
GVariant *params = NULL;
GVariant *item;
@@ -1642,43 +1926,72 @@ proxy_method_call_sync (const gchar *method_name, guint in_type, gconstpointer i
}
gboolean
-e_gdbus_proxy_method_call_sync_void__void (const gchar *method_name, GDBusProxy *proxy, GCancellable *cancellable, GError **error)
+e_gdbus_proxy_method_call_sync_void__void (const gchar *method_name,
+ GDBusProxy *proxy,
+ GCancellable *cancellable,
+ GError **error)
{
return proxy_method_call_sync (method_name, E_GDBUS_TYPE_VOID, NULL, E_GDBUS_TYPE_VOID, NULL, proxy, cancellable, error);
}
gboolean
-e_gdbus_proxy_method_call_sync_boolean__void (const gchar *method_name, GDBusProxy *proxy, gboolean in_boolean, GCancellable *cancellable, GError **error)
+e_gdbus_proxy_method_call_sync_boolean__void (const gchar *method_name,
+ GDBusProxy *proxy,
+ gboolean in_boolean,
+ GCancellable *cancellable,
+ GError **error)
{
return proxy_method_call_sync (method_name, E_GDBUS_TYPE_BOOLEAN, &in_boolean, E_GDBUS_TYPE_VOID, NULL, proxy, cancellable, error);
}
gboolean
-e_gdbus_proxy_method_call_sync_string__void (const gchar *method_name, GDBusProxy *proxy, const gchar *in_string, GCancellable *cancellable, GError **error)
+e_gdbus_proxy_method_call_sync_string__void (const gchar *method_name,
+ GDBusProxy *proxy,
+ const gchar *in_string,
+ GCancellable *cancellable,
+ GError **error)
{
return proxy_method_call_sync (method_name, E_GDBUS_TYPE_STRING, in_string, E_GDBUS_TYPE_VOID, NULL, proxy, cancellable, error);
}
gboolean
-e_gdbus_proxy_method_call_sync_strv__void (const gchar *method_name, GDBusProxy *proxy, const gchar * const *in_strv, GCancellable *cancellable, GError **error)
+e_gdbus_proxy_method_call_sync_strv__void (const gchar *method_name,
+ GDBusProxy *proxy,
+ const gchar * const *in_strv,
+ GCancellable *cancellable,
+ GError **error)
{
return proxy_method_call_sync (method_name, E_GDBUS_TYPE_STRV, in_strv, E_GDBUS_TYPE_VOID, NULL, proxy, cancellable, error);
}
gboolean
-e_gdbus_proxy_method_call_sync_uint__void (const gchar *method_name, GDBusProxy *proxy, guint in_uint, GCancellable *cancellable, GError **error)
+e_gdbus_proxy_method_call_sync_uint__void (const gchar *method_name,
+ GDBusProxy *proxy,
+ guint in_uint,
+ GCancellable *cancellable,
+ GError **error)
{
return proxy_method_call_sync (method_name, E_GDBUS_TYPE_UINT, &in_uint, E_GDBUS_TYPE_VOID, NULL, proxy, cancellable, error);
}
gboolean
-e_gdbus_proxy_method_call_sync_string__string (const gchar *method_name, GDBusProxy *proxy, const gchar *in_string, gchar **out_string, GCancellable *cancellable, GError **error)
+e_gdbus_proxy_method_call_sync_string__string (const gchar *method_name,
+ GDBusProxy *proxy,
+ const gchar *in_string,
+ gchar **out_string,
+ GCancellable *cancellable,
+ GError **error)
{
return proxy_method_call_sync (method_name, E_GDBUS_TYPE_STRING, in_string, E_GDBUS_TYPE_STRING, out_string, proxy, cancellable, error);
}
gboolean
-e_gdbus_proxy_method_call_sync_strv__string (const gchar *method_name, GDBusProxy *proxy, const gchar * const *in_strv, gchar **out_string, GCancellable *cancellable, GError **error)
+e_gdbus_proxy_method_call_sync_strv__string (const gchar *method_name,
+ GDBusProxy *proxy,
+ const gchar * const *in_strv,
+ gchar **out_string,
+ GCancellable *cancellable,
+ GError **error)
{
return proxy_method_call_sync (method_name, E_GDBUS_TYPE_STRV, in_strv, E_GDBUS_TYPE_STRING, out_string, proxy, cancellable, error);
}
@@ -1708,7 +2021,8 @@ e_gdbus_templates_encode_error (const GError *in_error)
/* free *out_error with g_error_free(), if not NULL */
gboolean
-e_gdbus_templates_decode_error (const gchar * const *in_strv, GError **out_error)
+e_gdbus_templates_decode_error (const gchar * const *in_strv,
+ GError **out_error)
{
const gchar *error_name, *error_message;
@@ -1732,7 +2046,8 @@ e_gdbus_templates_decode_error (const gchar * const *in_strv, GError **out_error
/* free returned pointer with g_strfreev() */
gchar **
-e_gdbus_templates_encode_two_strings (const gchar *in_str1, const gchar *in_str2)
+e_gdbus_templates_encode_two_strings (const gchar *in_str1,
+ const gchar *in_str2)
{
gchar **strv;
@@ -1746,7 +2061,9 @@ e_gdbus_templates_encode_two_strings (const gchar *in_str1, const gchar *in_str2
/* free *out_str1 and *out_str2 with g_free() */
gboolean
-e_gdbus_templates_decode_two_strings (const gchar * const *in_strv, gchar **out_str1, gchar **out_str2)
+e_gdbus_templates_decode_two_strings (const gchar * const *in_strv,
+ gchar **out_str1,
+ gchar **out_str2)
{
g_return_val_if_fail (in_strv != NULL, FALSE);
g_return_val_if_fail (in_strv[0] != NULL, FALSE);
diff --git a/libedataserver/e-gdbus-templates.h b/libedataserver/e-gdbus-templates.h
index c9bc205..87e30a1 100644
--- a/libedataserver/e-gdbus-templates.h
+++ b/libedataserver/e-gdbus-templates.h
@@ -59,11 +59,11 @@ enum {
};
/* _where is a target component name, like ' ## _where ## ' or 'cal'
- _mname is method name, like 'open'
- _mtype is method type, like 'method_in'
- _param_name is parameter name, like 'only_if_exists'
- _param_type is parameter type, as string, like "s"
- all except _param_type are identificators, not strings
+ * _mname is method name, like 'open'
+ * _mtype is method type, like 'method_in'
+ * _param_name is parameter name, like 'only_if_exists'
+ * _param_type is parameter type, as string, like "s"
+ * all except _param_type are identificators, not strings
*/
#define E_DECLARE_GDBUS_ARG(_where, _mname, _mtype, _param_name, _param_type) \
static const GDBusArgInfo e_gdbus_ ## _where ## _ ## _mtype ## _mname ## _param_name = \
@@ -328,7 +328,7 @@ enum {
#define E_DECLARED_GDBUS_METHOD_INFO_NAME(_where, _mname) e_gdbus_ ## _where ## _method_ ## _mname
/* this requires signal_emission_hook_cb_ ## _sig_name hook defined,
- which can be created with one of E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_... macros */
+ * which can be created with one of E_DECLARE_GDBUS_SIGNAL_EMISSION_HOOK_... macros */
#define E_INIT_GDBUS_SIGNAL_VOID(_iface_struct, _dbus_sig_name_str, _sig_name_var, _sig_id) \
signals[_sig_id] = g_signal_new (# _sig_name_var, \
G_TYPE_FROM_INTERFACE (iface), \
@@ -675,7 +675,7 @@ void e_gdbus_complete_sync_method_strv (gpointer object, GDBusMethodInvocation
void e_gdbus_complete_sync_method_uint (gpointer object, GDBusMethodInvocation *invocation, guint out_uint, const GError *error);
/* callbacks on done signal handlers in the client proxy, which implements EGdbusAsyncOpKeeper interface;
- functions take ownership of out parameters and are responsible for their freeing */
+ * functions take ownership of out parameters and are responsible for their freeing */
void e_gdbus_proxy_async_method_done_void (EGdbusAsyncOpKeeper *proxy, guint arg_opid, const GError *error);
void e_gdbus_proxy_async_method_done_boolean (EGdbusAsyncOpKeeper *proxy, guint arg_opid, const GError *error, gboolean out_boolean);
void e_gdbus_proxy_async_method_done_string (EGdbusAsyncOpKeeper *proxy, guint arg_opid, const GError *error, const gchar *out_string);
diff --git a/libedataserver/e-iterator.c b/libedataserver/e-iterator.c
index 46a4e8e..0f86764 100644
--- a/libedataserver/e-iterator.c
+++ b/libedataserver/e-iterator.c
@@ -61,7 +61,7 @@ e_iterator_init (EIterator *card)
* Returns: (transfer none): the iterator.
*/
gconstpointer
-e_iterator_get (EIterator *iterator)
+e_iterator_get (EIterator *iterator)
{
if (E_ITERATOR_GET_CLASS (iterator)->get)
return E_ITERATOR_GET_CLASS (iterator)->get (iterator);
@@ -70,21 +70,21 @@ e_iterator_get (EIterator *iterator)
}
void
-e_iterator_reset (EIterator *iterator)
+e_iterator_reset (EIterator *iterator)
{
if (E_ITERATOR_GET_CLASS (iterator)->reset)
E_ITERATOR_GET_CLASS (iterator)->reset (iterator);
}
void
-e_iterator_last (EIterator *iterator)
+e_iterator_last (EIterator *iterator)
{
if (E_ITERATOR_GET_CLASS (iterator)->last)
E_ITERATOR_GET_CLASS (iterator)->last (iterator);
}
gboolean
-e_iterator_next (EIterator *iterator)
+e_iterator_next (EIterator *iterator)
{
if (E_ITERATOR_GET_CLASS (iterator)->next)
return E_ITERATOR_GET_CLASS (iterator)->next (iterator);
@@ -93,7 +93,7 @@ e_iterator_next (EIterator *iterator)
}
gboolean
-e_iterator_prev (EIterator *iterator)
+e_iterator_prev (EIterator *iterator)
{
if (E_ITERATOR_GET_CLASS (iterator)->prev)
return E_ITERATOR_GET_CLASS (iterator)->prev (iterator);
@@ -102,23 +102,24 @@ e_iterator_prev (EIterator *iterator)
}
void
-e_iterator_delete (EIterator *iterator)
+e_iterator_delete (EIterator *iterator)
{
if (E_ITERATOR_GET_CLASS (iterator)->remove)
E_ITERATOR_GET_CLASS (iterator)->remove (iterator);
}
-void e_iterator_insert (EIterator *iterator,
- gconstpointer object,
- gboolean before)
+void
+e_iterator_insert (EIterator *iterator,
+ gconstpointer object,
+ gboolean before)
{
if (E_ITERATOR_GET_CLASS (iterator)->insert)
E_ITERATOR_GET_CLASS (iterator)->insert (iterator, object, before);
}
void
-e_iterator_set (EIterator *iterator,
- const void *object)
+e_iterator_set (EIterator *iterator,
+ gconstpointer object)
{
if (E_ITERATOR_GET_CLASS (iterator)->set)
E_ITERATOR_GET_CLASS (iterator)->set (iterator, object);
diff --git a/libedataserver/e-list-iterator.c b/libedataserver/e-list-iterator.c
index 0ff4350..d5b7b77 100644
--- a/libedataserver/e-list-iterator.c
+++ b/libedataserver/e-list-iterator.c
@@ -92,7 +92,7 @@ e_list_iterator_dispose (GObject *object)
}
static gconstpointer
-e_list_iterator_get (EIterator *_iterator)
+e_list_iterator_get (EIterator *_iterator)
{
EListIterator *iterator = E_LIST_ITERATOR (_iterator);
if (iterator->iterator)
@@ -102,21 +102,21 @@ e_list_iterator_get (EIterator *_iterator)
}
static void
-e_list_iterator_reset (EIterator *_iterator)
+e_list_iterator_reset (EIterator *_iterator)
{
EListIterator *iterator = E_LIST_ITERATOR (_iterator);
iterator->iterator = iterator->list->list;
}
static void
-e_list_iterator_last (EIterator *_iterator)
+e_list_iterator_last (EIterator *_iterator)
{
EListIterator *iterator = E_LIST_ITERATOR (_iterator);
iterator->iterator = g_list_last (iterator->list->list);
}
static gboolean
-e_list_iterator_next (EIterator *_iterator)
+e_list_iterator_next (EIterator *_iterator)
{
EListIterator *iterator = E_LIST_ITERATOR (_iterator);
if (iterator->iterator)
@@ -127,7 +127,7 @@ e_list_iterator_next (EIterator *_iterator)
}
static gboolean
-e_list_iterator_prev (EIterator *_iterator)
+e_list_iterator_prev (EIterator *_iterator)
{
EListIterator *iterator = E_LIST_ITERATOR (_iterator);
if (iterator->iterator)
@@ -138,9 +138,9 @@ e_list_iterator_prev (EIterator *_iterator)
}
static void
-e_list_iterator_insert (EIterator *_iterator,
- gconstpointer object,
- gboolean before)
+e_list_iterator_insert (EIterator *_iterator,
+ gconstpointer object,
+ gboolean before)
{
EListIterator *iterator = E_LIST_ITERATOR (_iterator);
gpointer data;
@@ -173,7 +173,7 @@ e_list_iterator_insert (EIterator *_iterator,
}
static void
-e_list_iterator_remove (EIterator *_iterator)
+e_list_iterator_remove (EIterator *_iterator)
{
EListIterator *iterator = E_LIST_ITERATOR (_iterator);
if (iterator->iterator) {
@@ -182,8 +182,8 @@ e_list_iterator_remove (EIterator *_iterator)
}
static void
-e_list_iterator_set (EIterator *_iterator,
- gconstpointer object)
+e_list_iterator_set (EIterator *_iterator,
+ gconstpointer object)
{
EListIterator *iterator = E_LIST_ITERATOR (_iterator);
if (iterator->iterator) {
diff --git a/libedataserver/e-list.c b/libedataserver/e-list.c
index 22a96d6..6022c63 100644
--- a/libedataserver/e-list.c
+++ b/libedataserver/e-list.c
@@ -44,7 +44,9 @@ e_list_init (EList *list)
* Returns: (transfer full): The new #EList.
**/
EList *
-e_list_new (EListCopyFunc copy, EListFreeFunc free, gpointer closure)
+e_list_new (EListCopyFunc copy,
+ EListFreeFunc free,
+ gpointer closure)
{
EList *list = g_object_new (E_TYPE_LIST, NULL);
e_list_construct (list, copy, free, closure);
@@ -60,7 +62,10 @@ e_list_new (EListCopyFunc copy, EListFreeFunc free, gpointer closure)
*
**/
void
-e_list_construct (EList *list, EListCopyFunc copy, EListFreeFunc free, gpointer closure)
+e_list_construct (EList *list,
+ EListCopyFunc copy,
+ EListFreeFunc free,
+ gpointer closure)
{
list->copy = copy;
list->free = free;
@@ -115,7 +120,8 @@ e_list_length (EList *list)
}
void
-e_list_append (EList *list, gconstpointer data)
+e_list_append (EList *list,
+ gconstpointer data)
{
e_list_invalidate_iterators (list, NULL);
if (list->copy)
@@ -125,7 +131,8 @@ e_list_append (EList *list, gconstpointer data)
}
void
-e_list_remove (EList *list, gconstpointer data)
+e_list_remove (EList *list,
+ gconstpointer data)
{
GList *link;
link = g_list_find (list->list, data);
@@ -134,7 +141,8 @@ e_list_remove (EList *list, gconstpointer data)
}
void
-e_list_invalidate_iterators (EList *list, EIterator *skip)
+e_list_invalidate_iterators (EList *list,
+ EIterator *skip)
{
GList *iterators = list->iterators;
for (; iterators; iterators = iterators->next) {
@@ -145,10 +153,11 @@ e_list_invalidate_iterators (EList *list, EIterator *skip)
}
/* FIXME: This doesn't work properly if the iterator is the first
- iterator in the list. Well, the iterator doesn't continue on after
- the next time next is called, at least. */
+ * iterator in the list. Well, the iterator doesn't continue on after
+ * the next time next is called, at least. */
void
-e_list_remove_link (EList *list, GList *link)
+e_list_remove_link (EList *list,
+ GList *link)
{
GList *iterators = list->iterators;
for (; iterators; iterators = iterators->next) {
@@ -163,7 +172,8 @@ e_list_remove_link (EList *list, GList *link)
}
void
-e_list_remove_iterator (EList *list, EIterator *iterator)
+e_list_remove_iterator (EList *list,
+ EIterator *iterator)
{
list->iterators = g_list_remove (list->iterators, iterator);
}
diff --git a/libedataserver/e-memory.c b/libedataserver/e-memory.c
index 3793dc2..0d60bfd 100644
--- a/libedataserver/e-memory.c
+++ b/libedataserver/e-memory.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
-
+ *
*/
#include "e-memory.h"
@@ -44,8 +44,8 @@ static time_end (const gchar *desc)
struct timeval end;
gettimeofday (&end, NULL);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= timeit_start.tv_sec * 1000 + timeit_start.tv_usec/1000;
+ diff = end.tv_sec * 1000 + end.tv_usec / 1000;
+ diff -= timeit_start.tv_sec * 1000 + timeit_start.tv_usec / 1000;
printf("%s took %ld.%03ld seconds\n",
desc, diff / 1000, diff % 1000);
}
@@ -81,7 +81,8 @@ struct _EMemChunk {
* Returns: a new #EMemChunk
**/
EMemChunk *
-e_memchunk_new (gint atomcount, gint atomsize)
+e_memchunk_new (gint atomcount,
+ gint atomsize)
{
EMemChunk *memchunk = g_malloc (sizeof (*memchunk));
@@ -123,7 +124,7 @@ e_memchunk_alloc (EMemChunk *memchunk)
b = g_malloc (memchunk->blocksize * memchunk->atomsize);
g_ptr_array_add (memchunk->blocks, b);
f = (MemChunkFreeNode *) &b[memchunk->atomsize];
- f->atoms = memchunk->blocksize-1;
+ f->atoms = memchunk->blocksize - 1;
f->next = NULL;
memchunk->free = f;
return b;
@@ -354,7 +355,7 @@ main ()
s = strv_set(s, 5, "Testing 5");
s = strv_set(s, 6, "Testing 7");
- for (i=0;i<8;i++) {
+ for (i = 0; i < 8; i++) {
printf("s[%d] = %s\n", i, strv_get(s, i));
}
@@ -363,7 +364,7 @@ main ()
printf("packing ...\n");
s = strv_pack (s);
- for (i=0;i<8;i++) {
+ for (i = 0; i < 8; i++) {
printf("s[%d] = %s\n", i, strv_get(s, i));
}
@@ -371,14 +372,14 @@ main ()
s = strv_set_ref(s, 1, "Testing 1 x");
- for (i=0;i<8;i++) {
+ for (i = 0; i < 8; i++) {
printf("s[%d] = %s\n", i, strv_get(s, i));
}
printf("packing ...\n");
s = strv_pack (s);
- for (i=0;i<8;i++) {
+ for (i = 0; i < 8; i++) {
printf("s[%d] = %s\n", i, strv_get(s, i));
}
@@ -387,7 +388,7 @@ main ()
#if 0
time_start("Using memchunks");
mc = memchunk_new (CHUNK_COUNT, CHUNK_SIZE);
- for (i=0;i<1000000;i++) {
+ for (i = 0; i < 1000000; i++) {
mem = memchunk_alloc (mc);
if ((i & 1) == 0)
memchunk_free (mc, mem);
@@ -398,7 +399,7 @@ main ()
time_start("Using gmemchunks");
gmc = g_mem_chunk_new("memchunk", CHUNK_SIZE, CHUNK_SIZE*CHUNK_COUNT, G_ALLOC_AND_FREE);
- for (i=0;i<1000000;i++) {
+ for (i = 0; i < 1000000; i++) {
mem = g_mem_chunk_alloc (gmc);
if ((i & 1) == 0)
g_mem_chunk_free (gmc, mem);
@@ -409,7 +410,7 @@ main ()
time_start("Using memchunks");
mc = memchunk_new (CHUNK_COUNT, CHUNK_SIZE);
- for (i=0;i<1000000;i++) {
+ for (i = 0; i < 1000000; i++) {
mem = memchunk_alloc (mc);
}
s (sleep (10));
@@ -418,7 +419,7 @@ main ()
time_start("Using gmemchunks");
gmc = g_mem_chunk_new("memchunk", CHUNK_SIZE, CHUNK_COUNT*CHUNK_SIZE, G_ALLOC_ONLY);
- for (i=0;i<1000000;i++) {
+ for (i = 0; i < 1000000; i++) {
mem = g_mem_chunk_alloc (gmc);
}
s (sleep (10));
@@ -426,7 +427,7 @@ main ()
time_end("allocating 1000000 gmemchunks");
time_start("Using malloc");
- for (i=0;i<1000000;i++) {
+ for (i = 0; i < 1000000; i++) {
malloc (CHUNK_SIZE);
}
time_end("allocating 1000000 malloc");
diff --git a/libedataserver/e-operation-pool.c b/libedataserver/e-operation-pool.c
index 4b336e2..e6c784f 100644
--- a/libedataserver/e-operation-pool.c
+++ b/libedataserver/e-operation-pool.c
@@ -30,7 +30,9 @@ struct _EOperationPool {
};
EOperationPool *
-e_operation_pool_new (guint max_threads, GFunc thread_func, gpointer user_data)
+e_operation_pool_new (guint max_threads,
+ GFunc thread_func,
+ gpointer user_data)
{
EOperationPool *pool;
GThreadPool *thread_pool;
@@ -69,8 +71,8 @@ e_operation_pool_free (EOperationPool *pool)
}
/* Reserves new operation ID, which is returned. This operation ID may
- be released by e_operation_pool_release_opid () when the operation
- is finished.
+ * be released by e_operation_pool_release_opid () when the operation
+ * is finished.
*/
guint32
e_operation_pool_reserve_opid (EOperationPool *pool)
@@ -103,7 +105,8 @@ e_operation_pool_reserve_opid (EOperationPool *pool)
/* Releases operation ID previously reserved by e_operation_pool_reserve_opid(). */
void
-e_operation_pool_release_opid (EOperationPool *pool, guint32 opid)
+e_operation_pool_release_opid (EOperationPool *pool,
+ guint32 opid)
{
g_return_if_fail (pool != NULL);
g_return_if_fail (pool->ops != NULL);
@@ -115,10 +118,11 @@ e_operation_pool_release_opid (EOperationPool *pool, guint32 opid)
}
/* Pushes operation to be processed. 'opdata' is passed to the function
- provided in e_operation_pool_new ().
+ * provided in e_operation_pool_new ().
*/
void
-e_operation_pool_push (EOperationPool *pool, gpointer opdata)
+e_operation_pool_push (EOperationPool *pool,
+ gpointer opdata)
{
GError *error = NULL;
diff --git a/libedataserver/e-proxy.c b/libedataserver/e-proxy.c
index 22e3919..19bde39 100644
--- a/libedataserver/e-proxy.c
+++ b/libedataserver/e-proxy.c
@@ -97,8 +97,8 @@ enum ProxyType {
struct _EProxyPrivate {
SoupURI *uri_http, *uri_https;
guint notify_id_evo, notify_id_sys, notify_id_sys_http; /* conxn id of gconf_client_notify_add */
- GSList* ign_hosts; /* List of hostnames. (Strings) */
- GSList* ign_addrs; /* List of hostaddrs. (ProxyHostAddrs) */
+ GSList * ign_hosts; /* List of hostnames. (Strings) */
+ GSList * ign_addrs; /* List of hostaddrs. (ProxyHostAddrs) */
gboolean use_proxy; /* Is our-proxy enabled? */
enum ProxyType type;
};
@@ -111,8 +111,8 @@ typedef enum {
typedef struct {
ProxyAddrType type; /* Specifies whether IPV4 or IPV6 */
- gpointer addr; /* Either in_addr* or in6_addr* */
- gpointer mask; /* Either in_addr* or in6_addr* */
+ gpointer addr; /* Either in_addr * or in6_addr * */
+ gpointer mask; /* Either in_addr * or in6_addr * */
} ProxyHostAddr;
/* Signals. */
@@ -133,7 +133,7 @@ static void ipv6_network_addr (const struct in6_addr *addr,
struct in6_addr *res);
static void
-ep_free_proxy_host_addr (ProxyHostAddr* host)
+ep_free_proxy_host_addr (ProxyHostAddr *host)
{
if (host) {
if (host->addr) {
@@ -152,7 +152,7 @@ static void
e_proxy_dispose (GObject *object)
{
EProxyPrivate *priv;
- GConfClient* client;
+ GConfClient * client;
priv = E_PROXY (object)->priv;
@@ -228,10 +228,11 @@ e_proxy_init (EProxy *proxy)
}
static gboolean
-ep_is_in_ignored (EProxy *proxy, const gchar *host)
+ep_is_in_ignored (EProxy *proxy,
+ const gchar *host)
{
EProxyPrivate *priv;
- GSList* l;
+ GSList * l;
gchar *hn;
g_return_val_if_fail (proxy != NULL, FALSE);
@@ -245,7 +246,7 @@ ep_is_in_ignored (EProxy *proxy, const gchar *host)
for (l = priv->ign_hosts; l; l = l->next) {
if (*((gchar *) l->data) == '*') {
- if (g_str_has_suffix (hn, ((gchar *) l->data)+1)) {
+ if (g_str_has_suffix (hn, ((gchar *) l->data) + 1)) {
g_free (hn);
return TRUE;
}
@@ -260,7 +261,8 @@ ep_is_in_ignored (EProxy *proxy, const gchar *host)
}
static gboolean
-ep_need_proxy_http (EProxy* proxy, const gchar * host)
+ep_need_proxy_http (EProxy *proxy,
+ const gchar *host)
{
SoupAddress *addr = NULL;
EProxyPrivate *priv = proxy->priv;
@@ -276,12 +278,12 @@ ep_need_proxy_http (EProxy* proxy, const gchar * host)
status = soup_address_resolve_sync (addr, NULL);
if (status == SOUP_STATUS_OK) {
gint addr_len;
- struct sockaddr* so_addr = NULL;
+ struct sockaddr * so_addr = NULL;
so_addr = soup_address_get_sockaddr (addr, &addr_len);
/* This will never happen, since we have already called
- soup_address_resolve_sync ().
+ * soup_address_resolve_sync ().
*/
if (!so_addr)
return TRUE;
@@ -341,7 +343,8 @@ ep_need_proxy_http (EProxy* proxy, const gchar * host)
}
static gboolean
-ep_need_proxy_https (EProxy* proxy, const gchar * host)
+ep_need_proxy_https (EProxy *proxy,
+ const gchar *host)
{
/* Can we share ignore list from HTTP at all? */
return !ep_is_in_ignored (proxy, host);
@@ -349,8 +352,8 @@ ep_need_proxy_https (EProxy* proxy, const gchar * host)
static gboolean
ep_manipulate_ipv4 (ProxyHostAddr *host_addr,
- struct in_addr *addr_in,
- gchar * netmask)
+ struct in_addr *addr_in,
+ gchar *netmask)
{
gboolean has_error = FALSE;
struct in_addr *addr, *mask;
@@ -386,8 +389,9 @@ ep_manipulate_ipv4 (ProxyHostAddr *host_addr,
}
static void
-ipv6_network_addr (const struct in6_addr *addr, const struct in6_addr *mask,
- struct in6_addr *res)
+ipv6_network_addr (const struct in6_addr *addr,
+ const struct in6_addr *mask,
+ struct in6_addr *res)
{
gint i;
@@ -398,8 +402,8 @@ ipv6_network_addr (const struct in6_addr *addr, const struct in6_addr *mask,
static gboolean
ep_manipulate_ipv6 (ProxyHostAddr *host_addr,
- struct in6_addr *addr_in6,
- gchar * netmask)
+ struct in6_addr *addr_in6,
+ gchar *netmask)
{
gboolean has_error = FALSE;
struct in6_addr *addr, *mask;
@@ -444,10 +448,11 @@ ep_manipulate_ipv6 (ProxyHostAddr *host_addr,
}
static void
-ep_parse_ignore_host (gpointer data, gpointer user_data)
+ep_parse_ignore_host (gpointer data,
+ gpointer user_data)
{
- EProxy* proxy = (EProxy *) user_data;
- EProxyPrivate* priv = NULL;
+ EProxy * proxy = (EProxy *) user_data;
+ EProxyPrivate * priv = NULL;
SoupAddress *addr;
guint status;
gchar *input, *netmask, *hostname;
@@ -471,14 +476,14 @@ ep_parse_ignore_host (gpointer data, gpointer user_data)
status = soup_address_resolve_sync (addr, NULL);
if (status == SOUP_STATUS_OK) {
gint addr_len;
- struct sockaddr* so_addr = NULL;
+ struct sockaddr * so_addr = NULL;
host_addr = g_new0 (ProxyHostAddr, 1);
so_addr = soup_address_get_sockaddr (addr, &addr_len);
/* This will never happen, since we have already called
- soup_address_resolve_sync ().
+ * soup_address_resolve_sync ().
*/
if (!so_addr)
goto error;
@@ -505,7 +510,8 @@ ep_parse_ignore_host (gpointer data, gpointer user_data)
}
static gboolean
-ep_change_uri (SoupURI **soup_uri, const gchar *uri)
+ep_change_uri (SoupURI **soup_uri,
+ const gchar *uri)
{
gboolean changed = FALSE;
@@ -536,7 +542,9 @@ ep_change_uri (SoupURI **soup_uri, const gchar *uri)
}
static gchar *
-update_proxy_uri (const gchar *uri, const gchar *proxy_user, const gchar *proxy_pw)
+update_proxy_uri (const gchar *uri,
+ const gchar *proxy_user,
+ const gchar *proxy_pw)
{
gchar *res, *user = NULL, *pw = NULL;
gboolean is_https;
@@ -571,13 +579,13 @@ update_proxy_uri (const gchar *uri, const gchar *proxy_user, const gchar *proxy_
static void
ep_set_proxy (GConfClient *client,
- gpointer user_data,
- gboolean regen_ign_host_list)
+ gpointer user_data,
+ gboolean regen_ign_host_list)
{
gchar *proxy_server, *uri_http = NULL, *uri_https = NULL;
gint proxy_port, old_type;
- EProxy* proxy = (EProxy *) user_data;
- EProxyPrivate* priv = proxy->priv;
+ EProxy * proxy = (EProxy *) user_data;
+ EProxyPrivate * priv = proxy->priv;
GSList *ignore;
gboolean changed = FALSE, sys_manual = TRUE;
@@ -681,10 +689,13 @@ ep_set_proxy (GConfClient *client,
}
static void
-ep_setting_changed (GConfClient *client, guint32 cnxn_id, GConfEntry *entry, gpointer user_data)
+ep_setting_changed (GConfClient *client,
+ guint32 cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
{
const gchar *key;
- EProxy* proxy = (EProxy *) user_data;
+ EProxy * proxy = (EProxy *) user_data;
EProxyPrivate *priv;
if (!proxy || !proxy->priv)
@@ -749,8 +760,8 @@ e_proxy_setup_proxy (EProxy *proxy)
GConfClient *client;
/* We get the evolution-shell proxy keys here
- set soup up to use the proxy,
- and listen to any changes */
+ * set soup up to use the proxy,
+ * and listen to any changes */
/* XXX Why can't we do this automatically in constructed() ? */
diff --git a/libedataserver/e-sexp.c b/libedataserver/e-sexp.c
index fad24f1..86cbfa6 100644
--- a/libedataserver/e-sexp.c
+++ b/libedataserver/e-sexp.c
@@ -5,7 +5,7 @@
*
* Author :
* Michael Zucchi <notzed ximian com>
-
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU Lesser General Public
* License as published by the Free Software Foundation.
@@ -22,65 +22,65 @@
*/
/*
- The following built-in s-exp's are supported:
-
- list = (and list*)
- perform an intersection of a number of lists, and return that.
-
- bool = (and bool*)
- perform a boolean AND of boolean values.
-
- list = (or list*)
- perform a union of a number of lists, returning the new list.
-
- bool = (or bool*)
- perform a boolean OR of boolean values.
-
- gint = (+ int*)
- Add integers.
-
- string = (+ string*)
- Concat strings.
-
- time_t = (+ time_t*)
- Add time_t values.
-
- gint = (- gint int*)
- Subtract integers from the first.
-
- time_t = (- time_t*)
- Subtract time_t values from the first.
-
- gint = (cast-int string|int|bool)
- Cast to an integer value.
-
- string = (cast-string string|int|bool)
- Cast to an string value.
-
- Comparison operators:
-
- bool = (< gint gint)
- bool = (> gint gint)
- bool = (= gint gint)
-
- bool = (< string string)
- bool = (> string string)
- bool = (= string string)
-
- bool = (< time_t time_t)
- bool = (> time_t time_t)
- bool = (= time_t time_t)
- Perform a comparision of 2 integers, 2 string values, or 2 time values.
-
- Function flow:
-
- type = (if bool function)
- type = (if bool function function)
- Choose a flow path based on a boolean value
-
- type = (begin func func func)
- Execute a sequence. The last function return is the return type.
-*/
+ * The following built-in s-exp's are supported:
+ *
+ * list = (and list*)
+ * perform an intersection of a number of lists, and return that.
+ *
+ * bool = (and bool*)
+ * perform a boolean AND of boolean values.
+ *
+ * list = (or list*)
+ * perform a union of a number of lists, returning the new list.
+ *
+ * bool = (or bool*)
+ * perform a boolean OR of boolean values.
+ *
+ * gint = (+ int*)
+ * Add integers.
+ *
+ * string = (+ string*)
+ * Concat strings.
+ *
+ * time_t = (+ time_t*)
+ * Add time_t values.
+ *
+ * gint = (- gint int*)
+ * Subtract integers from the first.
+ *
+ * time_t = (- time_t*)
+ * Subtract time_t values from the first.
+ *
+ * gint = (cast-int string|int|bool)
+ * Cast to an integer value.
+ *
+ * string = (cast-string string|int|bool)
+ * Cast to an string value.
+ *
+ * Comparison operators:
+ *
+ * bool = (< gint gint)
+ * bool = (> gint gint)
+ * bool = (= gint gint)
+ *
+ * bool = (< string string)
+ * bool = (> string string)
+ * bool = (= string string)
+ *
+ * bool = (< time_t time_t)
+ * bool = (> time_t time_t)
+ * bool = (= time_t time_t)
+ * Perform a comparision of 2 integers, 2 string values, or 2 time values.
+ *
+ * Function flow:
+ *
+ * type = (if bool function)
+ * type = (if bool function function)
+ * Choose a flow path based on a boolean value
+ *
+ * type = (begin func func func)
+ * Execute a sequence. The last function return is the return type.
+ */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -158,7 +158,9 @@ static const GScannerConfig scanner_config =
/* jumps back to the caller of f->failenv, only to be called from inside a callback */
void
-e_sexp_fatal_error (struct _ESExp *f, const gchar *why, ...)
+e_sexp_fatal_error (struct _ESExp *f,
+ const gchar *why,
+ ...)
{
va_list args;
@@ -179,7 +181,8 @@ e_sexp_error (struct _ESExp *f)
}
struct _ESExpResult *
-e_sexp_result_new (struct _ESExp *f, gint type)
+e_sexp_result_new (struct _ESExp *f,
+ gint type)
{
struct _ESExpResult *r = e_memchunk_alloc0 (f->result_chunks);
r->type = type;
@@ -190,7 +193,8 @@ e_sexp_result_new (struct _ESExp *f, gint type)
}
void
-e_sexp_result_free (struct _ESExp *f, struct _ESExpResult *t)
+e_sexp_result_free (struct _ESExp *f,
+ struct _ESExpResult *t)
{
if (t == NULL)
return;
@@ -216,11 +220,13 @@ e_sexp_result_free (struct _ESExp *f, struct _ESExpResult *t)
/* used in normal functions if they have to abort, and free their arguments */
void
-e_sexp_resultv_free (struct _ESExp *f, gint argc, struct _ESExpResult **argv)
+e_sexp_resultv_free (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv)
{
gint i;
- for (i=0;i<argc;i++) {
+ for (i = 0; i < argc; i++) {
e_sexp_result_free (f, argv[i]);
}
}
@@ -235,7 +241,9 @@ struct IterData {
/* ok, store any values that are in all sets */
static void
-htand (gchar *key, gint value, struct IterData *iter_data)
+htand (gchar *key,
+ gint value,
+ struct IterData *iter_data)
{
if (value == iter_data->count) {
g_ptr_array_add (iter_data->uids, key);
@@ -244,13 +252,18 @@ htand (gchar *key, gint value, struct IterData *iter_data)
/* or, store all unique values */
static void
-htor (gchar *key, gint value, struct IterData *iter_data)
+htor (gchar *key,
+ gint value,
+ struct IterData *iter_data)
{
g_ptr_array_add (iter_data->uids, key);
}
static ESExpResult *
-term_eval_and (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+term_eval_and (struct _ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ gpointer data)
{
struct _ESExpResult *r, *r1;
GHashTable *ht = g_hash_table_new (g_str_hash, g_str_equal);
@@ -267,7 +280,7 @@ term_eval_and (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer d
oper = "AND";
f->operators = g_slist_prepend (f->operators, (gpointer) oper);
- for (i=0;bool && i<argc;i++) {
+ for (i = 0; bool && i < argc; i++) {
r1 = e_sexp_term_eval (f, argv[i]);
if (type == -1)
type = r1->type;
@@ -282,12 +295,12 @@ term_eval_and (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer d
a1 = (gchar **) r1->value.ptrarray->pdata;
l1 = r1->value.ptrarray->len;
- for (j=0;j<l1;j++) {
+ for (j = 0; j < l1; j++) {
gpointer ptr;
gint n;
ptr = g_hash_table_lookup (ht, a1[j]);
n = GPOINTER_TO_INT (ptr);
- g_hash_table_insert (ht, a1[j], GINT_TO_POINTER (n+1));
+ g_hash_table_insert (ht, a1[j], GINT_TO_POINTER (n + 1));
}
} else if (r1->type == ESEXP_RES_BOOL) {
bool = bool && r1->value.boolean;
@@ -313,7 +326,10 @@ term_eval_and (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer d
}
static ESExpResult *
-term_eval_or (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+term_eval_or (struct _ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ gpointer data)
{
struct _ESExpResult *r, *r1;
GHashTable *ht = g_hash_table_new (g_str_hash, g_str_equal);
@@ -330,7 +346,7 @@ term_eval_or (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer da
r = e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
- for (i=0;!bool && i<argc;i++) {
+ for (i = 0; !bool && i < argc; i++) {
r1 = e_sexp_term_eval (f, argv[i]);
if (type == -1)
type = r1->type;
@@ -345,7 +361,7 @@ term_eval_or (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer da
a1 = (gchar **) r1->value.ptrarray->pdata;
l1 = r1->value.ptrarray->len;
- for (j=0;j<l1;j++) {
+ for (j = 0; j < l1; j++) {
g_hash_table_insert (ht, a1[j], (gpointer) 1);
}
} else if (r1->type == ESEXP_RES_BOOL) {
@@ -371,12 +387,15 @@ term_eval_or (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer da
}
static ESExpResult *
-term_eval_not (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+term_eval_not (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
gint res = TRUE;
ESExpResult *r;
- if (argc>0) {
+ if (argc > 0) {
if (argv[0]->type == ESEXP_RES_BOOL
&& argv[0]->value.boolean)
res = FALSE;
@@ -388,7 +407,10 @@ term_eval_not (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
/* this should support all arguments ...? */
static ESExpResult *
-term_eval_lt (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+term_eval_lt (struct _ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ gpointer data)
{
struct _ESExpResult *r, *r1, *r2;
@@ -420,7 +442,10 @@ term_eval_lt (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer da
/* this should support all arguments ...? */
static ESExpResult *
-term_eval_gt (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+term_eval_gt (struct _ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ gpointer data)
{
struct _ESExpResult *r, *r1, *r2;
@@ -452,7 +477,10 @@ term_eval_gt (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer da
/* this should support all arguments ...? */
static ESExpResult *
-term_eval_eq (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+term_eval_eq (struct _ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ gpointer data)
{
struct _ESExpResult *r, *r1, *r2;
@@ -479,21 +507,24 @@ term_eval_eq (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer da
}
static ESExpResult *
-term_eval_plus (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+term_eval_plus (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
- struct _ESExpResult *r=NULL;
+ struct _ESExpResult *r = NULL;
gint type;
gint i;
- if (argc>0) {
+ if (argc > 0) {
type = argv[0]->type;
switch (type) {
case ESEXP_RES_INT: {
gint total = argv[0]->value.number;
- for (i=1;i<argc && argv[i]->type == ESEXP_RES_INT;i++) {
+ for (i = 1; i < argc && argv[i]->type == ESEXP_RES_INT; i++) {
total += argv[i]->value.number;
}
- if (i<argc) {
+ if (i < argc) {
e_sexp_resultv_free (f, argc, argv);
e_sexp_fatal_error(f, "Invalid types in (+ ints)");
}
@@ -502,10 +533,10 @@ term_eval_plus (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointe
break; }
case ESEXP_RES_STRING: {
GString *s = g_string_new (argv[0]->value.string);
- for (i=1;i<argc && argv[i]->type == ESEXP_RES_STRING;i++) {
+ for (i = 1; i < argc && argv[i]->type == ESEXP_RES_STRING; i++) {
g_string_append (s, argv[i]->value.string);
}
- if (i<argc) {
+ if (i < argc) {
e_sexp_resultv_free (f, argc, argv);
e_sexp_fatal_error(f, "Invalid types in (+ strings)");
}
@@ -540,21 +571,24 @@ term_eval_plus (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointe
}
static ESExpResult *
-term_eval_sub (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+term_eval_sub (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
- struct _ESExpResult *r=NULL;
+ struct _ESExpResult *r = NULL;
gint type;
gint i;
- if (argc>0) {
+ if (argc > 0) {
type = argv[0]->type;
switch (type) {
case ESEXP_RES_INT: {
gint total = argv[0]->value.number;
- for (i=1;i<argc && argv[i]->type == ESEXP_RES_INT;i++) {
+ for (i = 1; i < argc && argv[i]->type == ESEXP_RES_INT; i++) {
total -= argv[i]->value.number;
}
- if (i<argc) {
+ if (i < argc) {
e_sexp_resultv_free (f, argc, argv);
e_sexp_fatal_error(f, "Invalid types in -");
}
@@ -589,7 +623,10 @@ term_eval_sub (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
/* cast to gint */
static ESExpResult *
-term_eval_castint (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+term_eval_castint (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
struct _ESExpResult *r;
@@ -617,7 +654,10 @@ term_eval_castint (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpoi
/* cast to string */
static ESExpResult *
-term_eval_caststring (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+term_eval_caststring (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
struct _ESExpResult *r;
@@ -645,18 +685,21 @@ term_eval_caststring (struct _ESExp *f, gint argc, struct _ESExpResult **argv, g
/* implements 'if' function */
static ESExpResult *
-term_eval_if (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+term_eval_if (struct _ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ gpointer data)
{
struct _ESExpResult *r;
gint doit;
- if (argc >=2 && argc<=3) {
+ if (argc >=2 && argc <= 3) {
r = e_sexp_term_eval (f, argv[0]);
doit = (r->type == ESEXP_RES_BOOL && r->value.boolean);
e_sexp_result_free (f, r);
if (doit) {
return e_sexp_term_eval (f, argv[1]);
- } else if (argc>2) {
+ } else if (argc > 2) {
return e_sexp_term_eval (f, argv[2]);
}
}
@@ -665,12 +708,15 @@ term_eval_if (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer da
/* implements 'begin' statement */
static ESExpResult *
-term_eval_begin (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+term_eval_begin (struct _ESExp *f,
+ gint argc,
+ struct _ESExpTerm **argv,
+ gpointer data)
{
- struct _ESExpResult *r=NULL;
+ struct _ESExpResult *r = NULL;
gint i;
- for (i=0;i<argc;i++) {
+ for (i = 0; i < argc; i++) {
if (r)
e_sexp_result_free (f, r);
r = e_sexp_term_eval (f, argv[i]);
@@ -683,7 +729,8 @@ term_eval_begin (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer
/* this must only be called from inside term evaluation callbacks! */
struct _ESExpResult *
-e_sexp_term_eval (struct _ESExp *f, struct _ESExpTerm *t)
+e_sexp_term_eval (struct _ESExp *f,
+ struct _ESExpTerm *t)
{
struct _ESExpResult *r = NULL;
gint i;
@@ -723,7 +770,7 @@ e_sexp_term_eval (struct _ESExp *f, struct _ESExpTerm *t)
case ESEXP_TERM_FUNC:
/* first evaluate all arguments to result types */
argv = alloca (sizeof (argv[0]) * t->value.func.termcount);
- for (i=0;i<t->value.func.termcount;i++) {
+ for (i = 0; i < t->value.func.termcount; i++) {
argv[i] = e_sexp_term_eval (f, t->value.func.terms[i]);
}
/* call the function */
@@ -736,7 +783,7 @@ e_sexp_term_eval (struct _ESExp *f, struct _ESExpTerm *t)
e_sexp_fatal_error(f, "Unknown type in parse tree: %d", t->type);
}
- if (r==NULL)
+ if (r == NULL)
r = e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
return r;
@@ -744,16 +791,17 @@ e_sexp_term_eval (struct _ESExp *f, struct _ESExpTerm *t)
#ifdef TESTER
static void
-eval_dump_result (ESExpResult *r, gint depth)
+eval_dump_result (ESExpResult *r,
+ gint depth)
{
gint i;
- if (r==NULL) {
+ if (r == NULL) {
printf("null result???\n");
return;
}
- for (i=0;i<depth;i++)
+ for (i = 0; i < depth; i++)
printf(" ");
switch (r->type) {
@@ -782,16 +830,17 @@ eval_dump_result (ESExpResult *r, gint depth)
#ifdef TESTER
static void
-parse_dump_term (struct _ESExpTerm *t, gint depth)
+parse_dump_term (struct _ESExpTerm *t,
+ gint depth)
{
gint i;
- if (t==NULL) {
+ if (t == NULL) {
printf("null term??\n");
return;
}
- for (i=0;i<depth;i++)
+ for (i = 0; i < depth; i++)
printf(" ");
switch (t->type) {
@@ -811,10 +860,10 @@ parse_dump_term (struct _ESExpTerm *t, gint depth)
case ESEXP_TERM_FUNC:
printf(" (function %s\n", t->value.func.sym->name);
/*printf(" [%d] ", t->value.func.termcount);*/
- for (i=0;i<t->value.func.termcount;i++) {
- parse_dump_term (t->value.func.terms[i], depth+1);
+ for (i = 0; i < t->value.func.termcount; i++) {
+ parse_dump_term (t->value.func.terms[i], depth + 1);
}
- for (i=0;i<depth;i++)
+ for (i = 0; i < depth; i++)
printf(" ");
printf(" )");
break;
@@ -838,7 +887,9 @@ const gchar *time_functions[] = {
};
static gboolean
-binary_generator (gint argc, struct _ESExpResult **argv, struct _ESExpResult *r)
+binary_generator (gint argc,
+ struct _ESExpResult **argv,
+ struct _ESExpResult *r)
{
g_return_val_if_fail (r != NULL, FALSE);
g_return_val_if_fail (argc == 2, FALSE);
@@ -853,7 +904,9 @@ binary_generator (gint argc, struct _ESExpResult **argv, struct _ESExpResult *r)
}
static gboolean
-unary_generator (gint argc, struct _ESExpResult **argv, struct _ESExpResult *r)
+unary_generator (gint argc,
+ struct _ESExpResult **argv,
+ struct _ESExpResult *r)
{
/* unary generator with end time */
g_return_val_if_fail (r != NULL, FALSE);
@@ -881,18 +934,20 @@ static const struct {
const gint generators_count = sizeof (generators) / sizeof (generators[0]);
static gboolean
-or_operator (gint argc, struct _ESExpResult **argv, struct _ESExpResult *r)
+or_operator (gint argc,
+ struct _ESExpResult **argv,
+ struct _ESExpResult *r)
{
gint ii;
/*
- A B A or B
- ---- ---- ------
- norm (0) norm (0) norm (0)
- gen (1) norm (0) norm (0)
- norm (0) gen (1) norm (0)
- gen (1) gen (1) gen*(1)
- */
+ * A B A or B
+ * ---- ---- ------
+ * norm (0) norm (0) norm (0)
+ * gen (1) norm (0) norm (0)
+ * norm (0) gen (1) norm (0)
+ * gen (1) gen (1) gen*(1)
+ */
g_return_val_if_fail (r != NULL, FALSE);
g_return_val_if_fail (argc > 0, FALSE);
@@ -916,18 +971,20 @@ or_operator (gint argc, struct _ESExpResult **argv, struct _ESExpResult *r)
}
static gboolean
-and_operator (gint argc, struct _ESExpResult **argv, struct _ESExpResult *r)
+and_operator (gint argc,
+ struct _ESExpResult **argv,
+ struct _ESExpResult *r)
{
gint ii;
/*
- A B A and B
- ---- ---- ------- -
- norm (0) norm (0) norm (0)
- gen (1) norm (0) gen (1)
- norm (0) gen (1) gen (1)
- gen (1) gen (1) gen (1)
- */
+ * A B A and B
+ * ---- ---- ------- -
+ * norm (0) norm (0) norm (0)
+ * gen (1) norm (0) gen (1)
+ * norm (0) gen (1) gen (1)
+ * gen (1) gen (1) gen (1)
+ * */
g_return_val_if_fail (r != NULL, FALSE);
g_return_val_if_fail (argc > 0, FALSE);
@@ -960,7 +1017,7 @@ static const struct {
const gint operators_count = sizeof (operators) / sizeof (operators[0]);
-static ESOperatorFunc*
+static ESOperatorFunc *
get_operator_function (const gchar *fname)
{
gint i;
@@ -988,7 +1045,7 @@ is_time_function (const gchar *fname)
return FALSE;
}
-static ESGeneratorFunc*
+static ESGeneratorFunc *
get_generator_function (const gchar *fname)
{
gint i;
@@ -1004,7 +1061,10 @@ get_generator_function (const gchar *fname)
/* this must only be called from inside term evaluation callbacks! */
static struct _ESExpResult *
-e_sexp_term_evaluate_occur_times (struct _ESExp *f, struct _ESExpTerm *t, time_t *start, time_t *end)
+e_sexp_term_evaluate_occur_times (struct _ESExp *f,
+ struct _ESExpTerm *t,
+ time_t *start,
+ time_t *end)
{
struct _ESExpResult *r = NULL;
gint i, argc;
@@ -1038,7 +1098,7 @@ e_sexp_term_evaluate_occur_times (struct _ESExp *f, struct _ESExpTerm *t, time_t
argc = t->value.func.termcount;
argv = alloca (sizeof (argv[0]) * argc);
- for (i=0;i<t->value.func.termcount;i++) {
+ for (i = 0; i < t->value.func.termcount; i++) {
argv[i] = e_sexp_term_evaluate_occur_times (f, t->value.func.terms[i],
start, end);
}
@@ -1075,7 +1135,7 @@ e_sexp_term_evaluate_occur_times (struct _ESExp *f, struct _ESExpTerm *t, time_t
if (!ok)
e_sexp_fatal_error(f, "Error in parse tree");
- if (r==NULL)
+ if (r == NULL)
r = e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
return r;
@@ -1086,7 +1146,8 @@ e_sexp_term_evaluate_occur_times (struct _ESExp *f, struct _ESExpTerm *t, time_t
*/
static struct _ESExpTerm *
-parse_term_new (struct _ESExp *f, gint type)
+parse_term_new (struct _ESExp *f,
+ gint type)
{
struct _ESExpTerm *s = e_memchunk_alloc0 (f->term_chunks);
s->type = type;
@@ -1094,11 +1155,12 @@ parse_term_new (struct _ESExp *f, gint type)
}
static void
-parse_term_free (struct _ESExp *f, struct _ESExpTerm *t)
+parse_term_free (struct _ESExp *f,
+ struct _ESExpTerm *t)
{
gint i;
- if (t==NULL) {
+ if (t == NULL) {
return;
}
@@ -1115,7 +1177,7 @@ parse_term_free (struct _ESExp *f, struct _ESExpTerm *t)
case ESEXP_TERM_FUNC:
case ESEXP_TERM_IFUNC:
- for (i=0;i<t->value.func.termcount;i++) {
+ for (i = 0; i < t->value.func.termcount; i++) {
parse_term_free (f, t->value.func.terms[i]);
}
g_free (t->value.func.terms);
@@ -1128,7 +1190,8 @@ parse_term_free (struct _ESExp *f, struct _ESExpTerm *t)
}
static struct _ESExpTerm **
-parse_values (ESExp *f, gint *len)
+parse_values (ESExp *f,
+ gint *len)
{
gint token;
struct _ESExpTerm **terms;
@@ -1147,7 +1210,7 @@ parse_values (ESExp *f, gint *len)
/* go over the list, and put them backwards into the term array */
terms = g_malloc (size * sizeof (*terms));
l = list;
- for (i=size-1;i>=0;i--) {
+ for (i = size - 1; i >= 0; i--) {
g_assert (l);
g_assert (l->data);
terms[i] = l->data;
@@ -1240,7 +1303,7 @@ parse_value (ESExp *f)
case ESEXP_TERM_FUNC:
case ESEXP_TERM_IFUNC:
/* this is basically invalid, since we can't use function
- pointers, but let the runtime catch it ... */
+ * pointers, but let the runtime catch it ... */
t = parse_term_new (f, s->type);
t->value.func.sym = s;
t->value.func.terms = parse_values (f, &t->value.func.termcount);
@@ -1266,7 +1329,8 @@ parse_value (ESExp *f)
/* FIXME: this needs some robustification */
static struct _ESExpTerm *
-parse_list (ESExp *f, gint gotbrace)
+parse_list (ESExp *f,
+ gint gotbrace)
{
gint token;
struct _ESExpTerm *t = NULL;
@@ -1356,7 +1420,9 @@ static const struct {
};
static void
-free_symbol (gpointer key, gpointer value, gpointer data)
+free_symbol (gpointer key,
+ gpointer value,
+ gpointer data)
{
struct _ESExpSymbol *s = value;
@@ -1397,9 +1463,9 @@ e_sexp_init (ESExp *s)
/* load in builtin symbols? */
for (i = 0; i < G_N_ELEMENTS (symbols); i++) {
if (symbols[i].type == 1) {
- e_sexp_add_ifunction (s, 0, symbols[i].name, (ESExpIFunc *) symbols[i].func, (gpointer)&symbols[i]);
+ e_sexp_add_ifunction (s, 0, symbols[i].name, (ESExpIFunc *) symbols[i].func, (gpointer) &symbols[i]);
} else {
- e_sexp_add_function (s, 0, symbols[i].name, symbols[i].func, (gpointer)&symbols[i]);
+ e_sexp_add_function (s, 0, symbols[i].name, symbols[i].func, (gpointer) &symbols[i]);
}
}
@@ -1440,7 +1506,11 @@ e_sexp_unref (ESExp *f)
#endif
void
-e_sexp_add_function (ESExp *f, gint scope, const gchar *name, ESExpFunc *func, gpointer data)
+e_sexp_add_function (ESExp *f,
+ gint scope,
+ const gchar *name,
+ ESExpFunc *func,
+ gpointer data)
{
struct _ESExpSymbol *s;
@@ -1458,7 +1528,11 @@ e_sexp_add_function (ESExp *f, gint scope, const gchar *name, ESExpFunc *func, g
}
void
-e_sexp_add_ifunction (ESExp *f, gint scope, const gchar *name, ESExpIFunc *ifunc, gpointer data)
+e_sexp_add_ifunction (ESExp *f,
+ gint scope,
+ const gchar *name,
+ ESExpIFunc *ifunc,
+ gpointer data)
{
struct _ESExpSymbol *s;
@@ -1476,7 +1550,10 @@ e_sexp_add_ifunction (ESExp *f, gint scope, const gchar *name, ESExpIFunc *ifunc
}
void
-e_sexp_add_variable (ESExp *f, gint scope, gchar *name, ESExpTerm *value)
+e_sexp_add_variable (ESExp *f,
+ gint scope,
+ gchar *name,
+ ESExpTerm *value)
{
struct _ESExpSymbol *s;
@@ -1491,7 +1568,9 @@ e_sexp_add_variable (ESExp *f, gint scope, gchar *name, ESExpTerm *value)
}
void
-e_sexp_remove_symbol (ESExp *f, gint scope, const gchar *name)
+e_sexp_remove_symbol (ESExp *f,
+ gint scope,
+ const gchar *name)
{
gint oldscope;
struct _ESExpSymbol *s;
@@ -1510,7 +1589,8 @@ e_sexp_remove_symbol (ESExp *f, gint scope, const gchar *name)
}
gint
-e_sexp_set_scope (ESExp *f, gint scope)
+e_sexp_set_scope (ESExp *f,
+ gint scope)
{
g_return_val_if_fail (IS_E_SEXP (f), 0);
@@ -1518,7 +1598,9 @@ e_sexp_set_scope (ESExp *f, gint scope)
}
void
-e_sexp_input_text (ESExp *f, const gchar *text, gint len)
+e_sexp_input_text (ESExp *f,
+ const gchar *text,
+ gint len)
{
g_return_if_fail (IS_E_SEXP (f));
g_return_if_fail (text != NULL);
@@ -1527,7 +1609,8 @@ e_sexp_input_text (ESExp *f, const gchar *text, gint len)
}
void
-e_sexp_input_file (ESExp *f, gint fd)
+e_sexp_input_file (ESExp *f,
+ gint fd)
{
g_return_if_fail (IS_E_SEXP (f));
@@ -1579,7 +1662,9 @@ e_sexp_eval (ESExp *f)
* Since: 2.32
*/
gboolean
-e_sexp_evaluate_occur_times (ESExp *f, time_t *start, time_t *end)
+e_sexp_evaluate_occur_times (ESExp *f,
+ time_t *start,
+ time_t *end)
{
struct _ESExpResult *r;
gboolean generator;
@@ -1617,7 +1702,8 @@ e_sexp_evaluate_occur_times (ESExp *f, time_t *start, time_t *end)
* encoded using #t #f syntax.
**/
void
-e_sexp_encode_bool (GString *s, gboolean state)
+e_sexp_encode_bool (GString *s,
+ gboolean state)
{
if (state)
g_string_append(s, " #t");
@@ -1635,7 +1721,8 @@ e_sexp_encode_bool (GString *s, gboolean state)
* are escaped appropriately.
**/
void
-e_sexp_encode_string (GString *s, const gchar *string)
+e_sexp_encode_string (GString *s,
+ const gchar *string)
{
gchar c;
const gchar *p;
@@ -1646,7 +1733,7 @@ e_sexp_encode_string (GString *s, const gchar *string)
p = string;
g_string_append(s, " \"");
while ((c = *p++)) {
- if (c=='\\' || c=='\"' || c=='\'')
+ if (c == '\\' || c == '\"' || c == '\'')
g_string_append_c (s, '\\');
g_string_append_c (s, c);
}
diff --git a/libedataserver/e-sexp.h b/libedataserver/e-sexp.h
index ae4ab64..17b2f18 100644
--- a/libedataserver/e-sexp.h
+++ b/libedataserver/e-sexp.h
@@ -1,5 +1,5 @@
/*
- generic s-exp evaluator class
+ * generic s-exp evaluator class
*/
#ifndef _E_SEXP_H
#define _E_SEXP_H
@@ -121,7 +121,7 @@ struct _ESExp {
GSList *operators;
/* TODO: may also need a pool allocator for term strings, so we dont lose them
- in error conditions? */
+ * in error conditions? */
struct _EMemChunk *term_chunks;
struct _EMemChunk *result_chunks;
};
diff --git a/libedataserver/e-source-group.c b/libedataserver/e-source-group.c
index 054f32c..277a724 100644
--- a/libedataserver/e-source-group.c
+++ b/libedataserver/e-source-group.c
@@ -60,7 +60,7 @@ static guint signals[LAST_SIGNAL] = { 0 };
static void
source_changed_callback (ESource *source,
- ESourceGroup *group)
+ ESourceGroup *group)
{
if (!group->priv->ignore_source_changed)
g_signal_emit (group, signals[CHANGED], 0);
@@ -163,7 +163,7 @@ e_source_group_init (ESourceGroup *source_group)
static void
import_properties (ESourceGroup *source_group,
- xmlNodePtr prop_root)
+ xmlNodePtr prop_root)
{
ESourceGroupPrivate *priv = source_group->priv;
xmlNodePtr prop_node;
@@ -195,7 +195,9 @@ typedef struct
} hash_compare_data;
static void
-compare_str_hash (gpointer key, gpointer value, hash_compare_data *cd)
+compare_str_hash (gpointer key,
+ gpointer value,
+ hash_compare_data *cd)
{
gpointer value2 = g_hash_table_lookup (cd->table2, key);
if (value2 == NULL || g_str_equal (value, value2) == FALSE)
@@ -203,7 +205,8 @@ compare_str_hash (gpointer key, gpointer value, hash_compare_data *cd)
}
static gboolean
-compare_str_hashes (GHashTable *table1, GHashTable *table2)
+compare_str_hashes (GHashTable *table1,
+ GHashTable *table2)
{
hash_compare_data cd;
@@ -217,7 +220,9 @@ compare_str_hashes (GHashTable *table1, GHashTable *table2)
}
static void
-property_dump_cb (const gchar *key, const gchar *value, xmlNodePtr root)
+property_dump_cb (const gchar *key,
+ const gchar *value,
+ xmlNodePtr root)
{
xmlNodePtr node;
@@ -230,7 +235,7 @@ property_dump_cb (const gchar *key, const gchar *value, xmlNodePtr root)
ESourceGroup *
e_source_group_new (const gchar *name,
- const gchar *base_uri)
+ const gchar *base_uri)
{
ESourceGroup *new;
@@ -249,7 +254,8 @@ e_source_group_new (const gchar *name,
static ESourceGroup *source_group_new_from_xmldoc (xmlDocPtr doc, gboolean can_migrate);
static ESourceGroup *
-source_group_new_from_xml (const gchar *xml, gboolean can_migrate)
+source_group_new_from_xml (const gchar *xml,
+ gboolean can_migrate)
{
xmlDocPtr doc;
ESourceGroup *group;
@@ -271,7 +277,8 @@ e_source_group_new_from_xml (const gchar *xml)
}
static ESourceGroup *
-source_group_new_from_xmldoc (xmlDocPtr doc, gboolean can_migrate)
+source_group_new_from_xmldoc (xmlDocPtr doc,
+ gboolean can_migrate)
{
xmlNodePtr root, p;
xmlChar *uid;
@@ -355,8 +362,8 @@ e_source_group_new_from_xmldoc (xmlDocPtr doc)
gboolean
e_source_group_update_from_xml (ESourceGroup *group,
- const gchar *xml,
- gboolean *changed_return)
+ const gchar *xml,
+ gboolean *changed_return)
{
xmlDocPtr xmldoc;
gboolean success;
@@ -375,8 +382,8 @@ e_source_group_update_from_xml (ESourceGroup *group,
gboolean
e_source_group_update_from_xmldoc (ESourceGroup *group,
- xmlDocPtr doc,
- gboolean *changed_return)
+ xmlDocPtr doc,
+ gboolean *changed_return)
{
GHashTable *new_sources_hash;
GSList *new_sources_list = NULL;
@@ -509,7 +516,7 @@ e_source_group_update_from_xmldoc (ESourceGroup *group,
new_sources_list = g_slist_reverse (new_sources_list);
/* Emit "group_removed" and disconnect the "changed" signal for all the
- groups that we haven't found in the new list. */
+ * groups that we haven't found in the new list. */
q = new_sources_list;
for (p = group->priv->sources; p != NULL; p = p->next) {
ESource *source = E_SOURCE (p->data);
@@ -571,7 +578,7 @@ e_source_group_uid_from_xmldoc (xmlDocPtr doc)
void
e_source_group_set_name (ESourceGroup *group,
- const gchar *name)
+ const gchar *name)
{
g_return_if_fail (E_IS_SOURCE_GROUP (group));
g_return_if_fail (name != NULL);
@@ -679,7 +686,7 @@ e_source_group_peek_sources (ESourceGroup *group)
*/
ESource *
e_source_group_peek_source_by_uid (ESourceGroup *group,
- const gchar *uid)
+ const gchar *uid)
{
GSList *p;
@@ -698,7 +705,7 @@ e_source_group_peek_source_by_uid (ESourceGroup *group,
*/
ESource *
e_source_group_peek_source_by_name (ESourceGroup *group,
- const gchar *name)
+ const gchar *name)
{
GSList *p;
@@ -712,8 +719,8 @@ e_source_group_peek_source_by_name (ESourceGroup *group,
gboolean
e_source_group_add_source (ESourceGroup *group,
- ESource *source,
- gint position)
+ ESource *source,
+ gint position)
{
g_return_val_if_fail (E_IS_SOURCE_GROUP (group), FALSE);
@@ -738,7 +745,7 @@ e_source_group_add_source (ESourceGroup *group,
gboolean
e_source_group_remove_source (ESourceGroup *group,
- ESource *source)
+ ESource *source)
{
GSList *p;
@@ -766,7 +773,7 @@ e_source_group_remove_source (ESourceGroup *group,
gboolean
e_source_group_remove_source_by_uid (ESourceGroup *group,
- const gchar *uid)
+ const gchar *uid)
{
GSList *p;
@@ -836,13 +843,15 @@ e_source_group_to_xml (ESourceGroup *group)
}
static gint
-find_esource_from_uid (gconstpointer a, gconstpointer b)
+find_esource_from_uid (gconstpointer a,
+ gconstpointer b)
{
return g_ascii_strcasecmp (e_source_peek_uid ((ESource *)(a)), (gchar *)(b));
}
static gboolean
-compare_source_lists (GSList *a, GSList *b)
+compare_source_lists (GSList *a,
+ GSList *b)
{
gboolean retval = TRUE;
GSList *l;
@@ -873,7 +882,8 @@ compare_source_lists (GSList *a, GSList *b)
* Since: 2.24
**/
gboolean
-e_source_group_equal (ESourceGroup *a, ESourceGroup *b)
+e_source_group_equal (ESourceGroup *a,
+ ESourceGroup *b)
{
g_return_val_if_fail (E_IS_SOURCE_GROUP (a), FALSE);
g_return_val_if_fail (E_IS_SOURCE_GROUP (b), FALSE);
@@ -920,7 +930,8 @@ e_source_group_equal (ESourceGroup *a, ESourceGroup *b)
* Since: 2.24
**/
gboolean
-e_source_group_xmlstr_equal (const gchar *a, const gchar *b)
+e_source_group_xmlstr_equal (const gchar *a,
+ const gchar *b)
{
ESourceGroup *grpa, *grpb;
gboolean retval;
@@ -943,7 +954,7 @@ e_source_group_xmlstr_equal (const gchar *a, const gchar *b)
**/
gchar *
e_source_group_get_property (ESourceGroup *source_group,
- const gchar *property)
+ const gchar *property)
{
ESourceGroupPrivate *priv;
@@ -960,8 +971,8 @@ e_source_group_get_property (ESourceGroup *source_group,
**/
void
e_source_group_set_property (ESourceGroup *source_group,
- const gchar *property,
- const gchar *value)
+ const gchar *property,
+ const gchar *value)
{
ESourceGroupPrivate *priv;
@@ -985,7 +996,9 @@ e_source_group_set_property (ESourceGroup *source_group,
* Since: 1.12
**/
void
-e_source_group_foreach_property (ESourceGroup *source_group, GHFunc func, gpointer data)
+e_source_group_foreach_property (ESourceGroup *source_group,
+ GHFunc func,
+ gpointer data)
{
ESourceGroupPrivate *priv;
diff --git a/libedataserver/e-source-list.c b/libedataserver/e-source-list.c
index a6d1d92..ffb402c 100644
--- a/libedataserver/e-source-list.c
+++ b/libedataserver/e-source-list.c
@@ -138,8 +138,8 @@ load_from_gconf (ESourceList *list)
g_slist_free (conf_list);
/* Emit "group_removed" and disconnect the "changed" signal for all the
- groups that we haven't found in the new list. Also, check if the
- order has changed. */
+ * groups that we haven't found in the new list. Also, check if the
+ * order has changed. */
q = new_groups_list;
for (p = list->priv->groups; p != NULL; p = p->next) {
ESourceGroup *group = E_SOURCE_GROUP (p->data);
@@ -174,7 +174,7 @@ load_from_gconf (ESourceList *list)
static void
remove_group (ESourceList *list,
- ESourceGroup *group)
+ ESourceGroup *group)
{
list->priv->groups = g_slist_remove (list->priv->groups, group);
@@ -191,7 +191,6 @@ sync_idle_callback (ESourceList *list)
{
GError *error = NULL;
- g_return_val_if_fail (list != NULL, FALSE);
g_return_val_if_fail (E_IS_SOURCE_LIST (list), FALSE);
g_object_ref (list);
@@ -208,9 +207,8 @@ sync_idle_callback (ESourceList *list)
static void
group_changed_callback (ESourceGroup *group,
- ESourceList *list)
+ ESourceList *list)
{
- g_return_if_fail (list != NULL);
g_return_if_fail (E_IS_SOURCE_LIST (list));
g_object_ref (list);
@@ -226,11 +224,10 @@ group_changed_callback (ESourceGroup *group,
static void
conf_changed_callback (GConfClient *client,
- guint connection_id,
- GConfEntry *entry,
- ESourceList *list)
+ guint connection_id,
+ GConfEntry *entry,
+ ESourceList *list)
{
- g_return_if_fail (list != NULL);
g_return_if_fail (E_IS_SOURCE_LIST (list));
g_object_ref (list);
@@ -354,7 +351,7 @@ e_source_list_new (void)
ESourceList *
e_source_list_new_for_gconf (GConfClient *client,
- const gchar *path)
+ const gchar *path)
{
ESourceList *list;
@@ -379,7 +376,7 @@ e_source_list_new_for_gconf (GConfClient *client,
}
ESourceList *
-e_source_list_new_for_gconf_default (const gchar *path)
+e_source_list_new_for_gconf_default (const gchar *path)
{
ESourceList *list;
@@ -421,7 +418,7 @@ e_source_list_peek_groups (ESourceList *list)
*/
ESourceGroup *
e_source_list_peek_group_by_uid (ESourceList *list,
- const gchar *uid)
+ const gchar *uid)
{
GSList *p;
@@ -480,7 +477,9 @@ struct property_check_struct {
};
static void
-check_group_property (const gchar *property_name, const gchar *property_value, struct property_check_struct *pcs)
+check_group_property (const gchar *property_name,
+ const gchar *property_value,
+ struct property_check_struct *pcs)
{
gchar *value;
@@ -507,7 +506,9 @@ check_group_property (const gchar *property_name, const gchar *property_value, s
* Since: 2.28
**/
ESourceGroup *
-e_source_list_peek_group_by_properties (ESourceList *list, const gchar *property_name, ...)
+e_source_list_peek_group_by_properties (ESourceList *list,
+ const gchar *property_name,
+ ...)
{
GSList *p;
va_list ap;
@@ -556,7 +557,7 @@ e_source_list_peek_group_by_properties (ESourceList *list, const gchar *property
*/
ESource *
e_source_list_peek_source_by_uid (ESourceList *list,
- const gchar *uid)
+ const gchar *uid)
{
GSList *p;
diff --git a/libedataserver/e-source.c b/libedataserver/e-source.c
index 971ec5a..2cebbb8 100644
--- a/libedataserver/e-source.c
+++ b/libedataserver/e-source.c
@@ -54,7 +54,7 @@ static guint signals[LAST_SIGNAL] = { 0 };
static void
group_weak_notify (ESource *source,
- GObject **where_the_object_was)
+ GObject **where_the_object_was)
{
source->priv->group = NULL;
@@ -239,7 +239,7 @@ e_source_new_from_xml_node (xmlNodePtr node)
static void
import_properties (ESource *source,
- xmlNodePtr prop_root)
+ xmlNodePtr prop_root)
{
ESourcePrivate *priv = source->priv;
xmlNodePtr prop_node;
@@ -270,7 +270,9 @@ typedef struct
} hash_compare_data;
static void
-compare_str_hash (gpointer key, gpointer value, hash_compare_data *cd)
+compare_str_hash (gpointer key,
+ gpointer value,
+ hash_compare_data *cd)
{
gpointer value2 = g_hash_table_lookup (cd->table2, key);
if (value2 == NULL || g_str_equal (value, value2) == FALSE)
@@ -278,7 +280,8 @@ compare_str_hash (gpointer key, gpointer value, hash_compare_data *cd)
}
static gboolean
-compare_str_hashes (GHashTable *table1, GHashTable *table2)
+compare_str_hashes (GHashTable *table1,
+ GHashTable *table2)
{
hash_compare_data cd;
@@ -346,7 +349,7 @@ e_source_update_from_xml_node (ESource *source,
if (abs_uri && source->priv->absolute_uri && g_str_equal (abs_uri, source->priv->absolute_uri)) {
/* reset the absolute uri to NULL to be regenerated when asked for,
- but only when it was generated also before */
+ * but only when it was generated also before */
g_free (source->priv->absolute_uri);
source->priv->absolute_uri = NULL;
} else if (source->priv->absolute_uri &&
@@ -563,7 +566,7 @@ e_source_set_group (ESource *source,
**/
void
e_source_set_name (ESource *source,
- const gchar *name)
+ const gchar *name)
{
g_return_if_fail (E_IS_SOURCE (source));
g_return_if_fail (name != NULL);
@@ -975,7 +978,8 @@ e_source_to_standalone_xml (ESource *source)
* Since: 2.24
**/
gboolean
-e_source_equal (ESource *a, ESource *b)
+e_source_equal (ESource *a,
+ ESource *b)
{
g_return_val_if_fail (E_IS_SOURCE (a), FALSE);
g_return_val_if_fail (E_IS_SOURCE (b), FALSE);
@@ -1032,7 +1036,8 @@ e_source_equal (ESource *a, ESource *b)
* Since: 2.24
**/
gboolean
-e_source_xmlstr_equal (const gchar *a, const gchar *b)
+e_source_xmlstr_equal (const gchar *a,
+ const gchar *b)
{
ESource *srca, *srcb;
gboolean retval;
diff --git a/libedataserver/e-time-utils.c b/libedataserver/e-time-utils.c
index 0cc2802..a203f7a 100644
--- a/libedataserver/e-time-utils.c
+++ b/libedataserver/e-time-utils.c
@@ -169,22 +169,22 @@ translate_picture (const gchar *picture)
enum ptime_locale_status { not, loc, raw };
/* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA. */
+ * This file is part of the GNU C Library.
+ *
+ * The GNU C Library is free software; you can redistribute it and / or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * The GNU C Library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the GNU C Library; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110 - 1301 USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -216,7 +216,8 @@ enum ptime_locale_status { not, loc, raw };
# define localtime_r my_localtime_r
static struct tm *localtime_r __P ((const time_t *, struct tm *));
static struct tm *
-localtime_r (t, tp)
+localtime_r (t,
+ tp)
const time_t *t;
struct tm *tp;
{
@@ -242,7 +243,7 @@ localtime_r (t, tp)
(g_ascii_strncasecmp ((cs1), (s2), strlen (cs1)) ? 0 : ((s2) += strlen (cs1), 1))
#endif
/* We intentionally do not use isdigit() for testing because this will
- lead to problems with the wide character version. */
+ * lead to problems with the wide character version. */
#define get_number(from, to, n) \
do { \
gint __n = n; \
@@ -347,9 +348,9 @@ static const gushort __mon_yday[2][13] =
#if defined _LIBC
/* We use this code also for the extended locale handling where the
- function gets as an additional argument the locale which has to be
- used. To access the values we have to redefine the _NL_CURRENT
- macro. */
+ * function gets as an additional argument the locale which has to be
+ * used. To access the values we have to redefine the _NL_CURRENT
+ * macro. */
# define strptime __strptime_l
# undef _NL_CURRENT
# define _NL_CURRENT(category, item) \
@@ -374,7 +375,7 @@ static const gushort __mon_yday[2][13] =
#ifndef __isleap
/* Nonzero if YEAR is a leap year (every 4 years,
- except every 100th isn't, and every 400th is). */
+ * except every 100th isn't, and every 400th is). */
# define __isleap(year) \
((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
#endif
@@ -411,7 +412,11 @@ internal_function
#else
static gchar *
#endif
-__strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM)
+__strptime_internal (rp,
+ fmt,
+ tm,
+ decided,
+ era_cnt LOCALE_PARAM)
const gchar *rp;
const gchar *fmt;
struct tm *tm;
@@ -992,7 +997,7 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM)
/* Match year within century. */
get_number (0, 99, 2);
/* The "Year 2000: The Millennium Rollover" paper suggests that
- values in the range 69-99 refer to the twentieth century. */
+ * values in the range 69-99 refer to the twentieth century. */
tm->tm_year = val >= 69 ? val : val + 100;
/* Indicate that we want to use the century, if specified. */
want_century = 1;
@@ -1353,7 +1358,7 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM)
if (want_era)
{
/* No era found but we have seen an E modifier. Rectify some
- values. */
+ * values. */
if (want_century && century == -1 && tm->tm_year < 69)
tm->tm_year += 100;
}
@@ -1420,7 +1425,9 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM)
}
static gchar *
-strptime (buf, format, tm LOCALE_PARAM)
+strptime (buf,
+ format,
+ tm LOCALE_PARAM)
const gchar *buf;
const gchar *format;
struct tm *tm;
@@ -1439,7 +1446,8 @@ strptime (buf, format, tm LOCALE_PARAM)
}
#ifdef _LIBC
-weak_alias (__strptime_l, strptime_l)
+weak_alias (__strptime_l,
+ strptime_l)
#endif
#endif /* HAVE_STRPTIME */
@@ -1467,7 +1475,10 @@ string_is_empty (const gchar *value)
* string with them.
*/
static ETimeParseStatus
-parse_with_strptime (const gchar *value, struct tm *result, const gchar **formats, gint n_formats)
+parse_with_strptime (const gchar *value,
+ struct tm *result,
+ const gchar **formats,
+ gint n_formats)
{
const gchar *parse_end = NULL, *pos;
gchar *locale_str;
@@ -1489,7 +1500,7 @@ parse_with_strptime (const gchar *value, struct tm *result, const gchar **format
return E_TIME_PARSE_INVALID;
/* Skip whitespace */
- while (n = (gint)((guchar)*pos), isspace (n) != 0)
+ while (n = (gint)((guchar) * pos), isspace (n) != 0)
pos++;
/* Try each of the formats in turn */
@@ -1521,7 +1532,8 @@ parse_with_strptime (const gchar *value, struct tm *result, const gchar **format
}
static void
-correct_two_digit_year (struct tm *result, gboolean *two_digit_year)
+correct_two_digit_year (struct tm *result,
+ gboolean *two_digit_year)
{
g_return_if_fail (result != NULL);
@@ -1546,7 +1558,7 @@ correct_two_digit_year (struct tm *result, gboolean *two_digit_year)
}
/* Returns TRUE if the locale has 'am' and 'pm' strings defined, in which
- case the user can choose between 12 and 24-hour time formats. */
+ * case the user can choose between 12 and 24-hour time formats. */
static gboolean
locale_supports_12_hour_format (void)
{
@@ -1613,16 +1625,16 @@ e_time_parse_date_and_time_ex (const gchar *value,
}
/* We'll parse the whole date and time in one go, otherwise we get
- into i18n problems. We attempt to parse with several formats,
- longest first. Note that we only use the '%p' specifier if the
- locale actually has 'am' and 'pm' strings defined, otherwise we
- will get incorrect results. Note also that we try to use exactly
- the same strings as in e_time_format_date_and_time (), to try to
- avoid i18n problems. We also use cut-down versions, so users don't
- have to type in the weekday or the seconds, for example.
- Note that all these formats include the full date, and the time
- will be set to 00:00:00 before parsing, so we don't need to worry
- about filling in any missing fields after parsing. */
+ * into i18n problems. We attempt to parse with several formats,
+ * longest first. Note that we only use the '%p' specifier if the
+ * locale actually has 'am' and 'pm' strings defined, otherwise we
+ * will get incorrect results. Note also that we try to use exactly
+ * the same strings as in e_time_format_date_and_time (), to try to
+ * avoid i18n problems. We also use cut-down versions, so users don't
+ * have to type in the weekday or the seconds, for example.
+ * Note that all these formats include the full date, and the time
+ * will be set to 00:00:00 before parsing, so we don't need to worry
+ * about filling in any missing fields after parsing. */
/*
* Try the full times, with the weekday. Then try without seconds,
@@ -1630,32 +1642,32 @@ e_time_parse_date_and_time_ex (const gchar *value,
*/
if (use_12_hour_formats) {
/* strptime format of a weekday, a date and a time,
- in 12-hour format. */
+ * in 12-hour format. */
format[num_formats++] = _("%a %m/%d/%Y %I:%M:%S %p");
}
/* strptime format of a weekday, a date and a time,
- in 24-hour format. */
+ * in 24-hour format. */
format[num_formats++] = _("%a %m/%d/%Y %H:%M:%S");
if (use_12_hour_formats) {
/* strptime format of a weekday, a date and a time,
- in 12-hour format, without seconds. */
+ * in 12-hour format, without seconds. */
format[num_formats++] = _("%a %m/%d/%Y %I:%M %p");
}
/* strptime format of a weekday, a date and a time,
- in 24-hour format, without seconds. */
+ * in 24-hour format, without seconds. */
format[num_formats++] = _("%a %m/%d/%Y %H:%M");
if (use_12_hour_formats) {
/* strptime format of a weekday, a date and a time,
- in 12-hour format, without minutes or seconds. */
+ * in 12-hour format, without minutes or seconds. */
format[num_formats++] = _("%a %m/%d/%Y %I %p");
}
/* strptime format of a weekday, a date and a time,
- in 24-hour format, without minutes or seconds. */
+ * in 24-hour format, without minutes or seconds. */
format[num_formats++] = _("%a %m/%d/%Y %H");
/* strptime format of a weekday and a date. */
@@ -1674,22 +1686,22 @@ e_time_parse_date_and_time_ex (const gchar *value,
if (use_12_hour_formats) {
/* strptime format of a date and a time, in 12-hour format,
- without seconds. */
+ * without seconds. */
format[num_formats++] = _("%m/%d/%Y %I:%M %p");
}
/* strptime format of a date and a time, in 24-hour format,
- without seconds. */
+ * without seconds. */
format[num_formats++] = _("%m/%d/%Y %H:%M");
if (use_12_hour_formats) {
/* strptime format of a date and a time, in 12-hour format,
- without minutes or seconds. */
+ * without minutes or seconds. */
format[num_formats++] = _("%m/%d/%Y %I %p");
}
/* strptime format of a date and a time, in 24-hour format,
- without minutes or seconds. */
+ * without minutes or seconds. */
format[num_formats++] = _("%m/%d/%Y %H");
/* strptime format of a weekday and a date. */
@@ -1704,7 +1716,7 @@ e_time_parse_date_and_time_ex (const gchar *value,
status = E_TIME_PARSE_INVALID;
/* Note that we checked if it was empty already, so it is either OK
- or INVALID here. */
+ * or INVALID here. */
if (status == E_TIME_PARSE_OK) {
correct_two_digit_year (result, two_digit_year);
} else {
@@ -1740,7 +1752,7 @@ e_time_parse_date_and_time_ex (const gchar *value,
* E_TIME_PARSE_INVALID if the string could not be parsed.
*/
ETimeParseStatus
-e_time_parse_date_and_time (const gchar *value,
+e_time_parse_date_and_time (const gchar *value,
struct tm *result)
{
return e_time_parse_date_and_time_ex (value, result, NULL);
@@ -1786,8 +1798,8 @@ e_time_parse_date_ex (const gchar *value,
if (two_digit_year) {
/* when we need to know about two digit year, then always first try
- full year, because for example nl_NL have format %d-%m-%y and it
- changes from two year itself, which isn't what we want */
+ * full year, because for example nl_NL have format %d-%m-%y and it
+ * changes from two year itself, which isn't what we want */
const gchar *tmp = format[1];
format[1] = format[0];
format[0] = tmp;
@@ -1823,7 +1835,8 @@ e_time_parse_date_ex (const gchar *value,
* @value was an empty string, a valid date, or an invalid date.
**/
ETimeParseStatus
-e_time_parse_date (const gchar *value, struct tm *result)
+e_time_parse_date (const gchar *value,
+ struct tm *result)
{
return e_time_parse_date_ex (value, result, NULL);
}
@@ -1843,7 +1856,8 @@ e_time_parse_date (const gchar *value, struct tm *result)
* @value was an empty string, a valid date, or an invalid date.
**/
ETimeParseStatus
-e_time_parse_time (const gchar *value, struct tm *result)
+e_time_parse_time (const gchar *value,
+ struct tm *result)
{
const gchar *format[7];
gint num_formats = 0;
@@ -1859,7 +1873,7 @@ e_time_parse_time (const gchar *value, struct tm *result)
if (use_12_hour_formats) {
/* strptime format for time of day, without seconds,
- in 12-hour format. */
+ * in 12-hour format. */
format[num_formats++] = _("%I:%M %p");
}
@@ -1897,12 +1911,12 @@ e_time_parse_time (const gchar *value, struct tm *result)
* of the time are stored in @buffer.
**/
void
-e_time_format_date_and_time (struct tm *date_tm,
- gboolean use_24_hour_format,
- gboolean show_midnight,
- gboolean show_zero_seconds,
- gchar *buffer,
- gint buffer_size)
+e_time_format_date_and_time (struct tm *date_tm,
+ gboolean use_24_hour_format,
+ gboolean show_midnight,
+ gboolean show_zero_seconds,
+ gchar *buffer,
+ gint buffer_size)
{
gchar *format;
@@ -1913,25 +1927,25 @@ e_time_format_date_and_time (struct tm *date_tm,
} else if (use_24_hour_format) {
if (!show_zero_seconds && date_tm->tm_sec == 0)
/* strftime format of a weekday, a date and a
- time, in 24-hour format, without seconds. */
+ * time, in 24-hour format, without seconds. */
format = _("%a %m/%d/%Y %H:%M");
else
/* strftime format of a weekday, a date and a
- time, in 24-hour format. */
+ * time, in 24-hour format. */
format = _("%a %m/%d/%Y %H:%M:%S");
} else {
if (!show_zero_seconds && date_tm->tm_sec == 0)
/* strftime format of a weekday, a date and a
- time, in 12-hour format, without seconds. */
+ * time, in 12-hour format, without seconds. */
format = _("%a %m/%d/%Y %I:%M %p");
else
/* strftime format of a weekday, a date and a
- time, in 12-hour format. */
+ * time, in 12-hour format. */
format = _("%a %m/%d/%Y %I:%M:%S %p");
}
/* strftime returns 0 if the string doesn't fit, and leaves the buffer
- undefined, so we set it to the empty string in that case. */
+ * undefined, so we set it to the empty string in that case. */
if (e_utf8_strftime (buffer, buffer_size, format, date_tm) == 0)
buffer[0] = '\0';
}
@@ -1948,18 +1962,18 @@ e_time_format_date_and_time (struct tm *date_tm,
* stores it in @buffer. @buffer_size should be at least 64.
**/
void
-e_time_format_time (struct tm *date_tm,
- gboolean use_24_hour_format,
- gboolean show_zero_seconds,
- gchar *buffer,
- gint buffer_size)
+e_time_format_time (struct tm *date_tm,
+ gboolean use_24_hour_format,
+ gboolean show_zero_seconds,
+ gchar *buffer,
+ gint buffer_size)
{
gchar *format;
if (use_24_hour_format) {
if (!show_zero_seconds && date_tm->tm_sec == 0)
/* strftime format of a time in 24-hour format,
- without seconds. */
+ * without seconds. */
format = _("%H:%M");
else
/* strftime format of a time in 24-hour format. */
@@ -1967,7 +1981,7 @@ e_time_format_time (struct tm *date_tm,
} else {
if (!show_zero_seconds && date_tm->tm_sec == 0)
/* strftime format of a time in 12-hour format,
- without seconds. */
+ * without seconds. */
format = _("%I:%M %p");
else
/* strftime format of a time in 12-hour format. */
@@ -1975,7 +1989,7 @@ e_time_format_time (struct tm *date_tm,
}
/* strftime returns 0 if the string doesn't fit, and leaves the buffer
- undefined, so we set it to the empty string in that case. */
+ * undefined, so we set it to the empty string in that case. */
if (e_utf8_strftime (buffer, buffer_size, format, date_tm) == 0)
buffer[0] = '\0';
}
@@ -2023,7 +2037,9 @@ e_mktime_utc (struct tm *tm)
* seconds from UTC time, stored in @offset.
**/
void
-e_localtime_with_offset (time_t tt, struct tm *tm, gint *offset)
+e_localtime_with_offset (time_t tt,
+ struct tm *tm,
+ gint *offset)
{
localtime_r (&tt, tm);
diff --git a/libedataserver/e-url.c b/libedataserver/e-url.c
index 3fe541a..6783863 100644
--- a/libedataserver/e-url.c
+++ b/libedataserver/e-url.c
@@ -64,9 +64,9 @@ e_url_shroud (const gchar *url)
}
if (first_colon && last_at && first_colon < last_at) {
- shrouded = g_malloc (first_colon - url + strlen (last_at)+1);
- memcpy (shrouded, url, first_colon-url);
- strcpy (shrouded + (first_colon-url), last_at);
+ shrouded = g_malloc (first_colon - url + strlen (last_at) + 1);
+ memcpy (shrouded, url, first_colon - url);
+ strcpy (shrouded + (first_colon - url), last_at);
} else {
shrouded = g_strdup (url);
}
@@ -85,7 +85,8 @@ e_url_shroud (const gchar *url)
* Returns: %TRUE if the urls are equal, %FALSE if they are not.
**/
gboolean
-e_url_equal (const gchar *url1, const gchar *url2)
+e_url_equal (const gchar *url1,
+ const gchar *url2)
{
gchar *shroud1 = e_url_shroud (url1);
gchar *shroud2 = e_url_shroud (url2);
@@ -182,8 +183,8 @@ e_uri_new (const gchar *uri_string)
if (at && at < slash) {
const gchar *at2;
/* this is for cases where username contains '@' at it, like:
- http://user domain com@server.addr.com/path
- We skip all at-s before the slash here. */
+ * http://user domain com@server.addr.com/path
+ * We skip all at-s before the slash here. */
while (at2 = strchr (at + 1, '@'), at2 && at2 < slash) {
at = at2;
@@ -314,13 +315,16 @@ e_uri_free (EUri *uri)
* Returns: The value of the parameter.
**/
const gchar *
-e_uri_get_param (EUri *uri, const gchar *name)
+e_uri_get_param (EUri *uri,
+ const gchar *name)
{
return g_datalist_get_data (&uri->params, name);
}
static void
-copy_param_cb (GQuark key_id, gpointer data, gpointer user_data)
+copy_param_cb (GQuark key_id,
+ gpointer data,
+ gpointer user_data)
{
GData *params = (GData *) user_data;
@@ -372,7 +376,8 @@ e_uri_copy (EUri *uri)
* Returns: The string representation of @uri.
**/
gchar *
-e_uri_to_string (EUri *uri, gboolean show_password)
+e_uri_to_string (EUri *uri,
+ gboolean show_password)
{
gchar *str_uri = NULL;
diff --git a/libedataserver/e-xml-hash-utils.c b/libedataserver/e-xml-hash-utils.c
index 45475bf..0f246b5 100644
--- a/libedataserver/e-xml-hash-utils.c
+++ b/libedataserver/e-xml-hash-utils.c
@@ -47,7 +47,8 @@
* of @doc.
**/
GHashTable *
-e_xml_to_hash (xmlDoc *doc, EXmlHashType type)
+e_xml_to_hash (xmlDoc *doc,
+ EXmlHashType type)
{
xmlNode *root, *node;
xmlChar *key, *value;
@@ -93,7 +94,9 @@ struct save_data {
};
static void
-foreach_save_func (gpointer key, gpointer value, gpointer user_data)
+foreach_save_func (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
struct save_data *sd = user_data;
xmlNodePtr new_node;
@@ -135,7 +138,7 @@ e_xml_from_hash (GHashTable *hash,
doc->encoding = xmlStrdup ((xmlChar*)"UTF-8");
sd.type = type;
sd.doc = doc;
- sd.root = xmlNewDocNode (doc, NULL, (xmlChar*) root_name, NULL);
+ sd.root = xmlNewDocNode (doc, NULL, (xmlChar *) root_name, NULL);
xmlDocSetRootElement (doc, sd.root);
g_hash_table_foreach (hash, foreach_save_func, &sd);
@@ -143,7 +146,9 @@ e_xml_from_hash (GHashTable *hash,
}
static void
-free_values (gpointer key, gpointer value, gpointer data)
+free_values (gpointer key,
+ gpointer value,
+ gpointer data)
{
g_free (key);
g_free (value);
@@ -297,7 +302,9 @@ typedef struct {
} foreach_data_t;
static void
-foreach_hash_func (gpointer key, gpointer value, gpointer user_data)
+foreach_hash_func (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
foreach_data_t *data = (foreach_data_t *) user_data;
diff --git a/libedataserverui/e-book-auth-util.c b/libedataserverui/e-book-auth-util.c
index 3eaedfc..0dedd26 100644
--- a/libedataserverui/e-book-auth-util.c
+++ b/libedataserverui/e-book-auth-util.c
@@ -72,7 +72,9 @@ remove_parameters_from_uri (const gchar *uri)
}
static void
-load_source_auth_cb (EBook *book, const GError *error, gpointer closure)
+load_source_auth_cb (EBook *book,
+ const GError *error,
+ gpointer closure)
{
LoadSourceData *data = closure;
@@ -84,8 +86,8 @@ load_source_auth_cb (EBook *book, const GError *error, gpointer closure)
GtkWidget *dialog;
/* XXX "LDAP" has to be removed from the folowing message
- so that it wil valid for other servers which provide
- anonymous access*/
+ * so that it wil valid for other servers which provide
+ * anonymous access */
dialog = gtk_message_dialog_new (NULL,
0,
@@ -143,15 +145,19 @@ get_remember_password (ESource *source)
}
static void
-set_remember_password (ESource *source, gboolean value)
+set_remember_password (ESource *source,
+ gboolean value)
{
e_source_set_property (source, "remember_password",
value ? "true" : "false");
}
static void
-addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *source,
- EBookAsyncCallback cb, gpointer closure)
+addressbook_authenticate (EBook *book,
+ gboolean previous_failure,
+ ESource *source,
+ EBookAsyncCallback cb,
+ gpointer closure)
{
const gchar *auth;
const gchar *user;
@@ -185,7 +191,7 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *sourc
gchar *password_prompt;
gboolean remember;
const gchar *failed_auth;
- guint32 flags = E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET|E_PASSWORDS_ONLINE;
+ guint32 flags = E_PASSWORDS_REMEMBER_FOREVER | E_PASSWORDS_SECRET | E_PASSWORDS_ONLINE;
if (previous_failure) {
failed_auth = _("Failed to authenticate.\n");
@@ -230,7 +236,8 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *sourc
}
static void
-auth_required_cb (EBook *book, gpointer data)
+auth_required_cb (EBook *book,
+ gpointer data)
{
LoadSourceData *load_source_data = g_new0 (LoadSourceData, 1);
@@ -241,7 +248,9 @@ auth_required_cb (EBook *book, gpointer data)
}
static void
-load_source_cb (EBook *book, const GError *error, gpointer closure)
+load_source_cb (EBook *book,
+ const GError *error,
+ gpointer closure)
{
LoadSourceData *load_source_data = closure;
@@ -292,7 +301,9 @@ load_source_cb (EBook *book, const GError *error, gpointer closure)
* Deprecated: 3.0: Use e_load_book_source_async() instead.
**/
EBook *
-e_load_book_source (ESource *source, EBookCallback open_func, gpointer user_data)
+e_load_book_source (ESource *source,
+ EBookCallback open_func,
+ gpointer user_data)
{
EBook *book;
LoadSourceData *load_source_data = g_new0 (LoadSourceData, 1);
diff --git a/libedataserverui/e-categories-selector.c b/libedataserverui/e-categories-selector.c
index 09a7ea1..985fbba 100644
--- a/libedataserverui/e-categories-selector.c
+++ b/libedataserverui/e-categories-selector.c
@@ -494,7 +494,7 @@ e_categories_selector_delete_selection (ECategoriesSelector *selector)
selected, (GCompareFunc) gtk_tree_path_compare));
/* Prevent the model from being rebuilt every time we
- remove a category, since we're already modifying it. */
+ * remove a category, since we're already modifying it. */
selector->priv->ignore_category_changes = TRUE;
for (item = selected; item != NULL; item = item->next) {
diff --git a/libedataserverui/e-category-completion.c b/libedataserverui/e-category-completion.c
index 238d2b9..c56dedc 100644
--- a/libedataserverui/e-category-completion.c
+++ b/libedataserverui/e-category-completion.c
@@ -297,7 +297,9 @@ category_completion_update_prefix (GtkEntryCompletion *completion)
}
static gboolean
-category_completion_sanitize_suffix (GtkEntry *entry, GdkEventFocus *event, GtkEntryCompletion *completion)
+category_completion_sanitize_suffix (GtkEntry *entry,
+ GdkEventFocus *event,
+ GtkEntryCompletion *completion)
{
const gchar *text;
diff --git a/libedataserverui/e-client-utils.c b/libedataserverui/e-client-utils.c
index 72a6933..6d05a90 100644
--- a/libedataserverui/e-client-utils.c
+++ b/libedataserverui/e-client-utils.c
@@ -41,7 +41,9 @@
* Proxy function for e_book_client_utils_new() and e_cal_client_utils_new().
**/
EClient *
-e_client_utils_new (ESource *source, EClientSourceType source_type, GError **error)
+e_client_utils_new (ESource *source,
+ EClientSourceType source_type,
+ GError **error)
{
EClient *res = NULL;
@@ -75,7 +77,9 @@ e_client_utils_new (ESource *source, EClientSourceType source_type, GError **err
* Proxy function for e_book_client_utils_new_from_uri() and e_cal_client_utils_new_from_uri().
**/
EClient *
-e_client_utils_new_from_uri (const gchar *uri, EClientSourceType source_type, GError **error)
+e_client_utils_new_from_uri (const gchar *uri,
+ EClientSourceType source_type,
+ GError **error)
{
EClient *res = NULL;
@@ -108,7 +112,8 @@ e_client_utils_new_from_uri (const gchar *uri, EClientSourceType source_type, GE
* Proxy function for e_book_client_utils_new_system() and e_cal_client_utils_new_system().
**/
EClient *
-e_client_utils_new_system (EClientSourceType source_type, GError **error)
+e_client_utils_new_system (EClientSourceType source_type,
+ GError **error)
{
EClient *res = NULL;
@@ -139,7 +144,8 @@ e_client_utils_new_system (EClientSourceType source_type, GError **error)
* Proxy function for e_book_client_utils_new_default() and e_cal_client_utils_new_default().
**/
EClient *
-e_client_utils_new_default (EClientSourceType source_type, GError **error)
+e_client_utils_new_default (EClientSourceType source_type,
+ GError **error)
{
EClient *res = NULL;
@@ -170,7 +176,9 @@ e_client_utils_new_default (EClientSourceType source_type, GError **error)
* Proxy function for e_book_client_utils_set_default() and e_book_client_utils_set_default().
**/
gboolean
-e_client_utils_set_default (EClient *client, EClientSourceType source_type, GError **error)
+e_client_utils_set_default (EClient *client,
+ EClientSourceType source_type,
+ GError **error)
{
gboolean res = FALSE;
@@ -202,7 +210,9 @@ e_client_utils_set_default (EClient *client, EClientSourceType source_type, GErr
* Proxy function for e_book_client_utils_set_default_source() and e_cal_client_utils_set_default_source().
**/
gboolean
-e_client_utils_set_default_source (ESource *source, EClientSourceType source_type, GError **error)
+e_client_utils_set_default_source (ESource *source,
+ EClientSourceType source_type,
+ GError **error)
{
gboolean res = FALSE;
@@ -236,7 +246,9 @@ e_client_utils_set_default_source (ESource *source, EClientSourceType source_typ
* Proxy function for e_book_client_utils_get_sources() and e_cal_client_utils_get_sources().
**/
gboolean
-e_client_utils_get_sources (ESourceList **sources, EClientSourceType source_type, GError **error)
+e_client_utils_get_sources (ESourceList **sources,
+ EClientSourceType source_type,
+ GError **error)
{
gboolean res = FALSE;
@@ -340,7 +352,11 @@ complete_async_op_in_idle_cb (gpointer user_data)
} G_STMT_END
static void
-return_async_error (const GError *error, GAsyncReadyCallback async_cb, gpointer async_cb_user_data, ESource *source, gpointer source_tag)
+return_async_error (const GError *error,
+ GAsyncReadyCallback async_cb,
+ gpointer async_cb_user_data,
+ ESource *source,
+ gpointer source_tag)
{
GSimpleAsyncResult *simple;
@@ -355,7 +371,9 @@ return_async_error (const GError *error, GAsyncReadyCallback async_cb, gpointer
}
static void
-client_utils_get_backend_property_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+client_utils_get_backend_property_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
EClient *client = E_CLIENT (source_object);
EClientUtilsAsyncOpData *async_data = user_data;
@@ -377,7 +395,7 @@ client_utils_get_backend_property_cb (GObject *source_object, GAsyncResult *resu
}
/* keep the initial auth_handler connected directly, thus it will be able
- to answer any later authentication requests, for reconnection, for example
+ * to answer any later authentication requests, for reconnection, for example
*/
if (async_data->auth_handler)
g_signal_connect (async_data->client, "authenticate", G_CALLBACK (async_data->auth_handler), async_data->auth_handler_user_data);
@@ -392,7 +410,9 @@ client_utils_get_backend_property_cb (GObject *source_object, GAsyncResult *resu
}
static void
-client_utils_capabilities_retrieved_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+client_utils_capabilities_retrieved_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
EClient *client = E_CLIENT (source_object);
EClientUtilsAsyncOpData *async_data = user_data;
@@ -447,7 +467,8 @@ client_utils_open_new_done (EClientUtilsAsyncOpData *async_data)
static gboolean client_utils_retry_open_timeout_cb (gpointer user_data);
static void
-finish_or_retry_open (EClientUtilsAsyncOpData *async_data, const GError *error)
+finish_or_retry_open (EClientUtilsAsyncOpData *async_data,
+ const GError *error)
{
g_return_if_fail (async_data != NULL);
@@ -478,7 +499,9 @@ finish_or_retry_open (EClientUtilsAsyncOpData *async_data, const GError *error)
}
static void
-client_utils_opened_cb (EClient *client, const GError *error, EClientUtilsAsyncOpData *async_data)
+client_utils_opened_cb (EClient *client,
+ const GError *error,
+ EClientUtilsAsyncOpData *async_data)
{
g_return_if_fail (client != NULL);
g_return_if_fail (async_data != NULL);
@@ -488,8 +511,8 @@ client_utils_opened_cb (EClient *client, const GError *error, EClientUtilsAsyncO
if (!async_data->open_finished) {
/* there can happen that the "opened" signal is received
- before the e_client_open () is finished, thus keep detailed
- error for later use, if any */
+ * before the e_client_open () is finished, thus keep detailed
+ * error for later use, if any */
if (error)
async_data->opened_cb_error = g_error_copy (error);
} else {
@@ -498,7 +521,9 @@ client_utils_opened_cb (EClient *client, const GError *error, EClientUtilsAsyncO
}
static void
-client_utils_open_new_async_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+client_utils_open_new_async_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
EClientUtilsAsyncOpData *async_data = user_data;
GError *error = NULL;
@@ -548,7 +573,9 @@ client_utils_retry_open_timeout_cb (gpointer user_data)
}
static gboolean
-client_utils_open_new_auth_cb (EClient *client, ECredentials *credentials, gpointer user_data)
+client_utils_open_new_auth_cb (EClient *client,
+ ECredentials *credentials,
+ gpointer user_data)
{
EClientUtilsAsyncOpData *async_data = user_data;
gboolean handled;
@@ -622,9 +649,14 @@ client_utils_open_new_auth_cb (EClient *client, ECredentials *credentials, gpoin
* Since: 3.2
**/
void
-e_client_utils_open_new (ESource *source, EClientSourceType source_type, gboolean only_if_exists, GCancellable *cancellable,
- EClientUtilsAuthenticateHandler auth_handler, gpointer auth_handler_user_data,
- GAsyncReadyCallback async_cb, gpointer async_cb_user_data)
+e_client_utils_open_new (ESource *source,
+ EClientSourceType source_type,
+ gboolean only_if_exists,
+ GCancellable *cancellable,
+ EClientUtilsAuthenticateHandler auth_handler,
+ gpointer auth_handler_user_data,
+ GAsyncReadyCallback async_cb,
+ gpointer async_cb_user_data)
{
EClient *client;
GError *error = NULL;
@@ -682,7 +714,10 @@ e_client_utils_open_new (ESource *source, EClientSourceType source_type, gboolea
* Since: 3.2
**/
gboolean
-e_client_utils_open_new_finish (ESource *source, GAsyncResult *result, EClient **client, GError **error)
+e_client_utils_open_new_finish (ESource *source,
+ GAsyncResult *result,
+ EClient **client,
+ GError **error)
{
GSimpleAsyncResult *simple;
@@ -704,7 +739,8 @@ e_client_utils_open_new_finish (ESource *source, GAsyncResult *result, EClient *
/* free returned pointer with g_free() */
static gchar *
-get_prompt_key (EClient *client, const gchar *user_name)
+get_prompt_key (EClient *client,
+ const gchar *user_name)
{
SoupURI *suri;
gchar *uri_str;
@@ -725,15 +761,17 @@ get_prompt_key (EClient *client, const gchar *user_name)
}
/* This function is suitable as a handler for EClient::authenticate signal.
- It takes care of all the password prompt and such and returns TRUE if
- credentials (password) were provided. Thus just connect it to that signal
- and it'll take care of everything else.
-
- gtk_window_parent is user_data passed into the callback. It can be a pointer
- to GtkWindow, used as a parent for a pasword prompt dialog.
+ * It takes care of all the password prompt and such and returns TRUE if
+ * credentials (password) were provided. Thus just connect it to that signal
+ * and it'll take care of everything else.
+ *
+ * gtk_window_parent is user_data passed into the callback. It can be a pointer
+ * to GtkWindow, used as a parent for a pasword prompt dialog.
*/
gboolean
-e_client_utils_authenticate_handler (EClient *client, ECredentials *credentials, gpointer gtk_window_parent)
+e_client_utils_authenticate_handler (EClient *client,
+ ECredentials *credentials,
+ gpointer gtk_window_parent)
{
ESource *source;
gboolean is_book, is_cal, res, remember_password = FALSE;
@@ -769,7 +807,7 @@ e_client_utils_authenticate_handler (EClient *client, ECredentials *credentials,
e_credentials_set (credentials, E_CREDENTIALS_KEY_USERNAME, username);
/* no username set on the source - deny authentication request until
- username will be also enterable with e-passwords */
+ * username will be also enterable with e-passwords */
if (!e_credentials_has_key (credentials, E_CREDENTIALS_KEY_USERNAME))
return FALSE;
}
@@ -872,18 +910,20 @@ e_client_utils_forget_password (EClient *client)
}
/* Asks for a password based on the provided credentials information.
- Credentials should have set following keys:
- E_CREDENTIALS_KEY_USERNAME
- E_CREDENTIALS_KEY_PROMPT_KEY
- E_CREDENTIALS_KEY_PROMPT_TEXT
- all other keys are optional. If also E_CREDENTIALS_KEY_PASSWORD key is provided,
- then it implies a reprompt.
-
- When this returns TRUE, then the structure contains E_CREDENTIALS_KEY_PASSWORD set
- as entered by a user.
+ * Credentials should have set following keys:
+ * E_CREDENTIALS_KEY_USERNAME
+ * E_CREDENTIALS_KEY_PROMPT_KEY
+ * E_CREDENTIALS_KEY_PROMPT_TEXT
+ * all other keys are optional. If also E_CREDENTIALS_KEY_PASSWORD key is provided,
+ * then it implies a reprompt.
+ *
+ * When this returns TRUE, then the structure contains E_CREDENTIALS_KEY_PASSWORD set
+ * as entered by a user.
*/
gboolean
-e_credentials_authenticate_helper (ECredentials *credentials, GtkWindow *parent, gboolean *remember_password)
+e_credentials_authenticate_helper (ECredentials *credentials,
+ GtkWindow *parent,
+ gboolean *remember_password)
{
gboolean res, fake_remember_password = FALSE;
guint prompt_flags;
diff --git a/libedataserverui/e-contact-store.c b/libedataserverui/e-contact-store.c
index d248350..2f75427 100644
--- a/libedataserverui/e-contact-store.c
+++ b/libedataserverui/e-contact-store.c
@@ -228,7 +228,8 @@ e_contact_store_new (void)
* ------------------ */
static void
-row_deleted (EContactStore *contact_store, gint n)
+row_deleted (EContactStore *contact_store,
+ gint n)
{
GtkTreePath *path;
@@ -239,7 +240,8 @@ row_deleted (EContactStore *contact_store, gint n)
}
static void
-row_inserted (EContactStore *contact_store, gint n)
+row_inserted (EContactStore *contact_store,
+ gint n)
{
GtkTreePath *path;
GtkTreeIter iter;
@@ -254,7 +256,8 @@ row_inserted (EContactStore *contact_store, gint n)
}
static void
-row_changed (EContactStore *contact_store, gint n)
+row_changed (EContactStore *contact_store,
+ gint n)
{
GtkTreePath *path;
GtkTreeIter iter;
@@ -273,7 +276,8 @@ row_changed (EContactStore *contact_store, gint n)
* ---------------------- */
static gint
-find_contact_source_by_client (EContactStore *contact_store, EBookClient *book_client)
+find_contact_source_by_client (EContactStore *contact_store,
+ EBookClient *book_client)
{
GArray *array;
gint i;
@@ -292,7 +296,8 @@ find_contact_source_by_client (EContactStore *contact_store, EBookClient *book_c
}
static gint
-find_contact_source_by_view (EContactStore *contact_store, EBookClientView *client_view)
+find_contact_source_by_view (EContactStore *contact_store,
+ EBookClientView *client_view)
{
GArray *array;
gint i;
@@ -312,7 +317,8 @@ find_contact_source_by_view (EContactStore *contact_store, EBookClientView *clie
}
static gint
-find_contact_source_by_offset (EContactStore *contact_store, gint offset)
+find_contact_source_by_offset (EContactStore *contact_store,
+ gint offset)
{
GArray *array;
gint i;
@@ -333,7 +339,8 @@ find_contact_source_by_offset (EContactStore *contact_store, gint offset)
}
static gint
-find_contact_source_by_pointer (EContactStore *contact_store, ContactSource *source)
+find_contact_source_by_pointer (EContactStore *contact_store,
+ ContactSource *source)
{
GArray *array;
gint i;
@@ -349,7 +356,8 @@ find_contact_source_by_pointer (EContactStore *contact_store, ContactSource *sou
}
static gint
-get_contact_source_offset (EContactStore *contact_store, gint contact_source_index)
+get_contact_source_offset (EContactStore *contact_store,
+ gint contact_source_index)
{
GArray *array;
gint offset = 0;
@@ -389,7 +397,9 @@ count_contacts (EContactStore *contact_store)
}
static gint
-find_contact_by_view_and_uid (EContactStore *contact_store, EBookClientView *find_view, const gchar *find_uid)
+find_contact_by_view_and_uid (EContactStore *contact_store,
+ EBookClientView *find_view,
+ const gchar *find_uid)
{
GArray *array;
ContactSource *source;
@@ -423,7 +433,8 @@ find_contact_by_view_and_uid (EContactStore *contact_store, EBookClientView *fin
}
static gint
-find_contact_by_uid (EContactStore *contact_store, const gchar *find_uid)
+find_contact_by_uid (EContactStore *contact_store,
+ const gchar *find_uid)
{
GArray *array;
gint i;
@@ -447,7 +458,8 @@ find_contact_by_uid (EContactStore *contact_store, const gchar *find_uid)
}
static EBookClient *
-get_book_at_row (EContactStore *contact_store, gint row)
+get_book_at_row (EContactStore *contact_store,
+ gint row)
{
GArray *array;
ContactSource *source;
@@ -464,7 +476,8 @@ get_book_at_row (EContactStore *contact_store, gint row)
}
static EContact *
-get_contact_at_row (EContactStore *contact_store, gint row)
+get_contact_at_row (EContactStore *contact_store,
+ gint row)
{
GArray *array;
ContactSource *source;
@@ -486,8 +499,10 @@ get_contact_at_row (EContactStore *contact_store, gint row)
}
static gboolean
-find_contact_source_details_by_view (EContactStore *contact_store, EBookClientView *client_view,
- ContactSource **contact_source, gint *offset)
+find_contact_source_details_by_view (EContactStore *contact_store,
+ EBookClientView *client_view,
+ ContactSource **contact_source,
+ gint *offset)
{
GArray *array;
gint source_index;
@@ -508,7 +523,9 @@ find_contact_source_details_by_view (EContactStore *contact_store, EBookClientVi
* ------------------------- */
static void
-view_contacts_added (EContactStore *contact_store, const GSList *contacts, EBookClientView *client_view)
+view_contacts_added (EContactStore *contact_store,
+ const GSList *contacts,
+ EBookClientView *client_view)
{
ContactSource *source;
gint offset;
@@ -536,7 +553,9 @@ view_contacts_added (EContactStore *contact_store, const GSList *contacts, EBook
}
static void
-view_contacts_removed (EContactStore *contact_store, const GSList *uids, EBookClientView *client_view)
+view_contacts_removed (EContactStore *contact_store,
+ const GSList *uids,
+ EBookClientView *client_view)
{
ContactSource *source;
gint offset;
@@ -573,7 +592,9 @@ view_contacts_removed (EContactStore *contact_store, const GSList *uids, EBookCl
}
static void
-view_contacts_modified (EContactStore *contact_store, const GSList *contacts, EBookClientView *client_view)
+view_contacts_modified (EContactStore *contact_store,
+ const GSList *contacts,
+ EBookClientView *client_view)
{
GPtrArray *cached_contacts;
ContactSource *source;
@@ -616,7 +637,9 @@ view_contacts_modified (EContactStore *contact_store, const GSList *contacts, EB
}
static void
-view_complete (EContactStore *contact_store, const GError *error, EBookClientView *client_view)
+view_complete (EContactStore *contact_store,
+ const GError *error,
+ EBookClientView *client_view)
{
ContactSource *source;
gint offset;
@@ -689,7 +712,8 @@ view_complete (EContactStore *contact_store, const GError *error, EBookClientVie
* --------------------- */
static void
-start_view (EContactStore *contact_store, EBookClientView *view)
+start_view (EContactStore *contact_store,
+ EBookClientView *view)
{
g_signal_emit (contact_store, signals[START_CLIENT_VIEW], 0, view);
@@ -706,7 +730,8 @@ start_view (EContactStore *contact_store, EBookClientView *view)
}
static void
-stop_view (EContactStore *contact_store, EBookClientView *view)
+stop_view (EContactStore *contact_store,
+ EBookClientView *view)
{
e_book_client_view_stop (view, NULL);
@@ -737,7 +762,8 @@ free_contact_ptrarray (GPtrArray *contacts)
}
static void
-clear_contact_source (EContactStore *contact_store, ContactSource *source)
+clear_contact_source (EContactStore *contact_store,
+ ContactSource *source)
{
gint source_index;
gint offset;
@@ -789,7 +815,9 @@ clear_contact_source (EContactStore *contact_store, ContactSource *source)
}
static void
-client_view_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+client_view_ready_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
EContactStore *contact_store = user_data;
gint source_idx;
@@ -839,7 +867,8 @@ client_view_ready_cb (GObject *source_object, GAsyncResult *result, gpointer use
}
static void
-query_contact_source (EContactStore *contact_store, ContactSource *source)
+query_contact_source (EContactStore *contact_store,
+ ContactSource *source)
{
gboolean is_opened;
@@ -885,7 +914,8 @@ query_contact_source (EContactStore *contact_store, ContactSource *source)
* Returns: An #EBookClient.
**/
EBookClient *
-e_contact_store_get_client (EContactStore *contact_store, GtkTreeIter *iter)
+e_contact_store_get_client (EContactStore *contact_store,
+ GtkTreeIter *iter)
{
gint index;
@@ -907,7 +937,8 @@ e_contact_store_get_client (EContactStore *contact_store, GtkTreeIter *iter)
* Returns: An #EContact.
**/
EContact *
-e_contact_store_get_contact (EContactStore *contact_store, GtkTreeIter *iter)
+e_contact_store_get_contact (EContactStore *contact_store,
+ GtkTreeIter *iter)
{
gint index;
@@ -930,8 +961,9 @@ e_contact_store_get_contact (EContactStore *contact_store, GtkTreeIter *iter)
* Returns: %TRUE if the contact was found, and @iter was set. %FALSE otherwise.
**/
gboolean
-e_contact_store_find_contact (EContactStore *contact_store, const gchar *uid,
- GtkTreeIter *iter)
+e_contact_store_find_contact (EContactStore *contact_store,
+ const gchar *uid,
+ GtkTreeIter *iter)
{
gint index;
@@ -985,7 +1017,8 @@ e_contact_store_get_clients (EContactStore *contact_store)
* The @contact_store adds a reference to @book_client, if added.
**/
void
-e_contact_store_add_client (EContactStore *contact_store, EBookClient *book_client)
+e_contact_store_add_client (EContactStore *contact_store,
+ EBookClient *book_client)
{
GArray *array;
ContactSource source;
@@ -1019,7 +1052,8 @@ e_contact_store_add_client (EContactStore *contact_store, EBookClient *book_clie
* Removes @book from the list of book clients that provide contacts for @contact_store.
**/
void
-e_contact_store_remove_client (EContactStore *contact_store, EBookClient *book_client)
+e_contact_store_remove_client (EContactStore *contact_store,
+ EBookClient *book_client)
{
GArray *array;
ContactSource *source;
@@ -1053,7 +1087,8 @@ e_contact_store_remove_client (EContactStore *contact_store, EBookClient *book_c
* assigned to @contact_store.
**/
void
-e_contact_store_set_query (EContactStore *contact_store, EBookQuery *book_query)
+e_contact_store_set_query (EContactStore *contact_store,
+ EBookQuery *book_query)
{
GArray *array;
gint i;
@@ -1118,7 +1153,8 @@ e_contact_store_get_n_columns (GtkTreeModel *tree_model)
}
static GType
-get_column_type (EContactStore *contact_store, gint column)
+get_column_type (EContactStore *contact_store,
+ gint column)
{
const gchar *field_name;
GObjectClass *contact_class;
@@ -1144,7 +1180,7 @@ get_column_type (EContactStore *contact_store, gint column)
static GType
e_contact_store_get_column_type (GtkTreeModel *tree_model,
- gint index)
+ gint index)
{
EContactStore *contact_store = E_CONTACT_STORE (tree_model);
@@ -1155,7 +1191,9 @@ e_contact_store_get_column_type (GtkTreeModel *tree_model,
}
static gboolean
-e_contact_store_get_iter (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePath *path)
+e_contact_store_get_iter (GtkTreeModel *tree_model,
+ GtkTreeIter *iter,
+ GtkTreePath *path)
{
EContactStore *contact_store = E_CONTACT_STORE (tree_model);
gint index;
@@ -1173,7 +1211,7 @@ e_contact_store_get_iter (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePa
static GtkTreePath *
e_contact_store_get_path (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+ GtkTreeIter *iter)
{
EContactStore *contact_store = E_CONTACT_STORE (tree_model);
GtkTreePath *path;
@@ -1190,8 +1228,8 @@ e_contact_store_get_path (GtkTreeModel *tree_model,
}
static gboolean
-e_contact_store_iter_next (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+e_contact_store_iter_next (GtkTreeModel *tree_model,
+ GtkTreeIter *iter)
{
EContactStore *contact_store = E_CONTACT_STORE (tree_model);
gint index;
@@ -1211,8 +1249,8 @@ e_contact_store_iter_next (GtkTreeModel *tree_model,
static gboolean
e_contact_store_iter_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent)
+ GtkTreeIter *iter,
+ GtkTreeIter *parent)
{
EContactStore *contact_store = E_CONTACT_STORE (tree_model);
@@ -1232,7 +1270,7 @@ e_contact_store_iter_children (GtkTreeModel *tree_model,
static gboolean
e_contact_store_iter_has_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+ GtkTreeIter *iter)
{
g_return_val_if_fail (E_IS_CONTACT_STORE (tree_model), FALSE);
@@ -1244,7 +1282,7 @@ e_contact_store_iter_has_child (GtkTreeModel *tree_model,
static gint
e_contact_store_iter_n_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+ GtkTreeIter *iter)
{
EContactStore *contact_store = E_CONTACT_STORE (tree_model);
@@ -1259,9 +1297,9 @@ e_contact_store_iter_n_children (GtkTreeModel *tree_model,
static gboolean
e_contact_store_iter_nth_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent,
- gint n)
+ GtkTreeIter *iter,
+ GtkTreeIter *parent,
+ gint n)
{
EContactStore *contact_store = E_CONTACT_STORE (tree_model);
@@ -1280,17 +1318,17 @@ e_contact_store_iter_nth_child (GtkTreeModel *tree_model,
static gboolean
e_contact_store_iter_parent (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *child)
+ GtkTreeIter *iter,
+ GtkTreeIter *child)
{
return FALSE;
}
static void
e_contact_store_get_value (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- gint column,
- GValue *value)
+ GtkTreeIter *iter,
+ gint column,
+ GValue *value)
{
EContactStore *contact_store = E_CONTACT_STORE (tree_model);
EContact *contact;
diff --git a/libedataserverui/e-destination-store.c b/libedataserverui/e-destination-store.c
index 8335d83..a03b419 100644
--- a/libedataserverui/e-destination-store.c
+++ b/libedataserverui/e-destination-store.c
@@ -177,7 +177,8 @@ e_destination_store_new (void)
* ------------------ */
static void
-row_deleted (EDestinationStore *destination_store, gint n)
+row_deleted (EDestinationStore *destination_store,
+ gint n)
{
GtkTreePath *path;
@@ -188,7 +189,8 @@ row_deleted (EDestinationStore *destination_store, gint n)
}
static void
-row_inserted (EDestinationStore *destination_store, gint n)
+row_inserted (EDestinationStore *destination_store,
+ gint n)
{
GtkTreePath *path;
GtkTreeIter iter;
@@ -203,7 +205,8 @@ row_inserted (EDestinationStore *destination_store, gint n)
}
static void
-row_changed (EDestinationStore *destination_store, gint n)
+row_changed (EDestinationStore *destination_store,
+ gint n)
{
GtkTreePath *path;
GtkTreeIter iter;
@@ -222,7 +225,8 @@ row_changed (EDestinationStore *destination_store, gint n)
* ------------------- */
static gint
-find_destination_by_pointer (EDestinationStore *destination_store, EDestination *destination)
+find_destination_by_pointer (EDestinationStore *destination_store,
+ EDestination *destination)
{
GPtrArray *array;
gint i;
@@ -242,7 +246,8 @@ find_destination_by_pointer (EDestinationStore *destination_store, EDestination
}
static gint
-find_destination_by_email (EDestinationStore *destination_store, EDestination *destination)
+find_destination_by_email (EDestinationStore *destination_store,
+ EDestination *destination)
{
GPtrArray *array;
gint i;
@@ -265,14 +270,16 @@ find_destination_by_email (EDestinationStore *destination_store, EDestination *d
}
static void
-start_destination (EDestinationStore *destination_store, EDestination *destination)
+start_destination (EDestinationStore *destination_store,
+ EDestination *destination)
{
g_signal_connect_swapped (destination, "changed",
G_CALLBACK (destination_changed), destination_store);
}
static void
-stop_destination (EDestinationStore *destination_store, EDestination *destination)
+stop_destination (EDestinationStore *destination_store,
+ EDestination *destination)
{
g_signal_handlers_disconnect_matched (destination, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, destination_store);
@@ -283,7 +290,8 @@ stop_destination (EDestinationStore *destination_store, EDestination *destinatio
* --------------- */
static void
-destination_changed (EDestinationStore *destination_store, EDestination *destination)
+destination_changed (EDestinationStore *destination_store,
+ EDestination *destination)
{
gint n;
@@ -310,7 +318,8 @@ destination_changed (EDestinationStore *destination_store, EDestination *destina
* Returns: An #EDestination.
**/
EDestination *
-e_destination_store_get_destination (EDestinationStore *destination_store, GtkTreeIter *iter)
+e_destination_store_get_destination (EDestinationStore *destination_store,
+ GtkTreeIter *iter)
{
GPtrArray *array;
gint index;
@@ -367,7 +376,8 @@ e_destination_store_list_destinations (EDestinationStore *destination_store)
**/
void
e_destination_store_insert_destination (EDestinationStore *destination_store,
- gint index, EDestination *destination)
+ gint index,
+ EDestination *destination)
{
GPtrArray *array;
@@ -406,7 +416,8 @@ e_destination_store_insert_destination (EDestinationStore *destination_store,
* @destination_store will ref @destination.
**/
void
-e_destination_store_append_destination (EDestinationStore *destination_store, EDestination *destination)
+e_destination_store_append_destination (EDestinationStore *destination_store,
+ EDestination *destination)
{
GPtrArray *array;
@@ -434,7 +445,8 @@ e_destination_store_append_destination (EDestinationStore *destination_store, ED
* unref @destination.
**/
void
-e_destination_store_remove_destination (EDestinationStore *destination_store, EDestination *destination)
+e_destination_store_remove_destination (EDestinationStore *destination_store,
+ EDestination *destination)
{
GPtrArray *array;
gint n;
@@ -456,7 +468,8 @@ e_destination_store_remove_destination (EDestinationStore *destination_store, ED
}
void
-e_destination_store_remove_destination_nth (EDestinationStore *destination_store, gint n)
+e_destination_store_remove_destination_nth (EDestinationStore *destination_store,
+ gint n)
{
EDestination *destination;
GPtrArray *array;
@@ -500,7 +513,7 @@ e_destination_store_get_n_columns (GtkTreeModel *tree_model)
static GType
e_destination_store_get_column_type (GtkTreeModel *tree_model,
- gint index)
+ gint index)
{
g_return_val_if_fail (E_IS_DESTINATION_STORE (tree_model), G_TYPE_INVALID);
g_return_val_if_fail (index >= 0 && index < E_DESTINATION_STORE_NUM_COLUMNS, G_TYPE_INVALID);
@@ -509,7 +522,9 @@ e_destination_store_get_column_type (GtkTreeModel *tree_model,
}
static gboolean
-e_destination_store_get_iter (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePath *path)
+e_destination_store_get_iter (GtkTreeModel *tree_model,
+ GtkTreeIter *iter,
+ GtkTreePath *path)
{
EDestinationStore *destination_store;
GPtrArray *array;
@@ -532,7 +547,7 @@ e_destination_store_get_iter (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTr
GtkTreePath *
e_destination_store_get_path (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+ GtkTreeIter *iter)
{
EDestinationStore *destination_store = E_DESTINATION_STORE (tree_model);
GtkTreePath *path;
@@ -549,8 +564,8 @@ e_destination_store_get_path (GtkTreeModel *tree_model,
}
static gboolean
-e_destination_store_iter_next (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+e_destination_store_iter_next (GtkTreeModel *tree_model,
+ GtkTreeIter *iter)
{
EDestinationStore *destination_store = E_DESTINATION_STORE (tree_model);
gint index;
@@ -570,8 +585,8 @@ e_destination_store_iter_next (GtkTreeModel *tree_model,
static gboolean
e_destination_store_iter_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent)
+ GtkTreeIter *iter,
+ GtkTreeIter *parent)
{
EDestinationStore *destination_store = E_DESTINATION_STORE (tree_model);
@@ -591,7 +606,7 @@ e_destination_store_iter_children (GtkTreeModel *tree_model,
static gboolean
e_destination_store_iter_has_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+ GtkTreeIter *iter)
{
g_return_val_if_fail (E_IS_DESTINATION_STORE (tree_model), FALSE);
@@ -603,7 +618,7 @@ e_destination_store_iter_has_child (GtkTreeModel *tree_model,
static gint
e_destination_store_iter_n_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+ GtkTreeIter *iter)
{
EDestinationStore *destination_store = E_DESTINATION_STORE (tree_model);
@@ -618,9 +633,9 @@ e_destination_store_iter_n_children (GtkTreeModel *tree_model,
static gboolean
e_destination_store_iter_nth_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent,
- gint n)
+ GtkTreeIter *iter,
+ GtkTreeIter *parent,
+ gint n)
{
EDestinationStore *destination_store = E_DESTINATION_STORE (tree_model);
@@ -639,17 +654,17 @@ e_destination_store_iter_nth_child (GtkTreeModel *tree_model,
static gboolean
e_destination_store_iter_parent (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *child)
+ GtkTreeIter *iter,
+ GtkTreeIter *child)
{
return FALSE;
}
static void
e_destination_store_get_value (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- gint column,
- GValue *value)
+ GtkTreeIter *iter,
+ gint column,
+ GValue *value)
{
EDestinationStore *destination_store = E_DESTINATION_STORE (tree_model);
EDestination *destination;
diff --git a/libedataserverui/e-name-selector-dialog.c b/libedataserverui/e-name-selector-dialog.c
index 4e75c23..ea79284 100644
--- a/libedataserverui/e-name-selector-dialog.c
+++ b/libedataserverui/e-name-selector-dialog.c
@@ -504,8 +504,9 @@ escape_sexp_string (const gchar *string)
}
static void
-sort_iter_to_contact_store_iter (ENameSelectorDialog *name_selector_dialog, GtkTreeIter *iter,
- gint *email_n)
+sort_iter_to_contact_store_iter (ENameSelectorDialog *name_selector_dialog,
+ GtkTreeIter *iter,
+ gint *email_n)
{
ETreeModelGenerator *contact_filter;
GtkTreeIter child_iter;
@@ -524,7 +525,11 @@ sort_iter_to_contact_store_iter (ENameSelectorDialog *name_selector_dialog, GtkT
}
static void
-add_destination (ENameSelectorModel *name_selector_model, EDestinationStore *destination_store, EContact *contact, gint email_n, EBookClient *client)
+add_destination (ENameSelectorModel *name_selector_model,
+ EDestinationStore *destination_store,
+ EContact *contact,
+ gint email_n,
+ EBookClient *client)
{
EDestination *destination;
GList *email_list, *nth;
@@ -580,7 +585,8 @@ remove_books (ENameSelectorDialog *name_selector_dialog)
* ------------------ */
static gint
-find_section_by_transfer_button (ENameSelectorDialog *name_selector_dialog, GtkButton *transfer_button)
+find_section_by_transfer_button (ENameSelectorDialog *name_selector_dialog,
+ GtkButton *transfer_button)
{
gint i;
@@ -596,7 +602,8 @@ find_section_by_transfer_button (ENameSelectorDialog *name_selector_dialog, GtkB
}
static gint
-find_section_by_tree_view (ENameSelectorDialog *name_selector_dialog, GtkTreeView *tree_view)
+find_section_by_tree_view (ENameSelectorDialog *name_selector_dialog,
+ GtkTreeView *tree_view)
{
gint i;
@@ -612,7 +619,8 @@ find_section_by_tree_view (ENameSelectorDialog *name_selector_dialog, GtkTreeVie
}
static gint
-find_section_by_name (ENameSelectorDialog *name_selector_dialog, const gchar *name)
+find_section_by_name (ENameSelectorDialog *name_selector_dialog,
+ const gchar *name)
{
gint i;
@@ -628,7 +636,8 @@ find_section_by_name (ENameSelectorDialog *name_selector_dialog, const gchar *na
}
static void
-selection_changed (GtkTreeSelection *selection, SelData *data)
+selection_changed (GtkTreeSelection *selection,
+ SelData *data)
{
GtkTreeSelection *contact_selection;
gboolean have_selection = FALSE;
@@ -640,7 +649,8 @@ selection_changed (GtkTreeSelection *selection, SelData *data)
}
static GtkTreeView *
-make_tree_view_for_section (ENameSelectorDialog *name_selector_dialog, EDestinationStore *destination_store)
+make_tree_view_for_section (ENameSelectorDialog *name_selector_dialog,
+ EDestinationStore *destination_store)
{
GtkTreeView *tree_view;
GtkTreeViewColumn *column;
@@ -663,11 +673,11 @@ make_tree_view_for_section (ENameSelectorDialog *name_selector_dialog, EDestinat
static void
setup_section_button (ENameSelectorDialog *name_selector_dialog,
- GtkButton *button,
- double halign,
- const gchar *label_text,
- const gchar *icon_name,
- gboolean icon_before_label)
+ GtkButton *button,
+ double halign,
+ const gchar *label_text,
+ const gchar *icon_name,
+ gboolean icon_before_label)
{
GtkWidget *alignment;
GtkWidget *hbox;
@@ -702,7 +712,9 @@ setup_section_button (ENameSelectorDialog *name_selector_dialog,
static gint
add_section (ENameSelectorDialog *name_selector_dialog,
- const gchar *name, const gchar *pretty_name, EDestinationStore *destination_store)
+ const gchar *name,
+ const gchar *pretty_name,
+ EDestinationStore *destination_store)
{
ENameSelectorDialogPrivate *priv;
Section section;
@@ -825,7 +837,8 @@ add_section (ENameSelectorDialog *name_selector_dialog,
}
static void
-free_section (ENameSelectorDialog *name_selector_dialog, gint n)
+free_section (ENameSelectorDialog *name_selector_dialog,
+ gint n)
{
Section *section;
@@ -840,7 +853,8 @@ free_section (ENameSelectorDialog *name_selector_dialog, gint n)
}
static void
-model_section_added (ENameSelectorDialog *name_selector_dialog, const gchar *name)
+model_section_added (ENameSelectorDialog *name_selector_dialog,
+ const gchar *name)
{
gchar *pretty_name;
EDestinationStore *destination_store;
@@ -853,7 +867,8 @@ model_section_added (ENameSelectorDialog *name_selector_dialog, const gchar *nam
}
static void
-model_section_removed (ENameSelectorDialog *name_selector_dialog, const gchar *name)
+model_section_removed (ENameSelectorDialog *name_selector_dialog,
+ const gchar *name)
{
gint section_index;
@@ -870,7 +885,10 @@ model_section_removed (ENameSelectorDialog *name_selector_dialog, const gchar *n
* -------------------- */
static void
-view_progress (EBookClientView *view, guint percent, const gchar *message, ENameSelectorDialog *dialog)
+view_progress (EBookClientView *view,
+ guint percent,
+ const gchar *message,
+ ENameSelectorDialog *dialog)
{
if (message == NULL)
gtk_label_set_text (dialog->priv->status_label, "");
@@ -879,13 +897,17 @@ view_progress (EBookClientView *view, guint percent, const gchar *message, EName
}
static void
-view_complete (EBookClientView *view, const GError *error, ENameSelectorDialog *dialog)
+view_complete (EBookClientView *view,
+ const GError *error,
+ ENameSelectorDialog *dialog)
{
view_progress (view, -1, NULL, dialog);
}
static void
-start_client_view_cb (EContactStore *store, EBookClientView *client_view, ENameSelectorDialog *name_selector_dialog)
+start_client_view_cb (EContactStore *store,
+ EBookClientView *client_view,
+ ENameSelectorDialog *name_selector_dialog)
{
g_signal_connect (
client_view, "progress",
@@ -897,7 +919,9 @@ start_client_view_cb (EContactStore *store, EBookClientView *client_view, ENameS
}
static void
-stop_client_view_cb (EContactStore *store, EBookClientView *client_view, ENameSelectorDialog *name_selector_dialog)
+stop_client_view_cb (EContactStore *store,
+ EBookClientView *client_view,
+ ENameSelectorDialog *name_selector_dialog)
{
g_signal_handlers_disconnect_by_func (client_view, view_progress, name_selector_dialog);
g_signal_handlers_disconnect_by_func (client_view, view_complete, name_selector_dialog);
@@ -1062,7 +1086,8 @@ contact_selection_changed (ENameSelectorDialog *name_selector_dialog)
}
static void
-contact_activated (ENameSelectorDialog *name_selector_dialog, GtkTreePath *path)
+contact_activated (ENameSelectorDialog *name_selector_dialog,
+ GtkTreePath *path)
{
EContactStore *contact_store;
EDestinationStore *destination_store;
@@ -1112,8 +1137,10 @@ contact_activated (ENameSelectorDialog *name_selector_dialog, GtkTreePath *path)
}
static void
-destination_activated (ENameSelectorDialog *name_selector_dialog, GtkTreePath *path,
- GtkTreeViewColumn *column, GtkTreeView *tree_view)
+destination_activated (ENameSelectorDialog *name_selector_dialog,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ GtkTreeView *tree_view)
{
gint section_index;
EDestinationStore *destination_store;
@@ -1152,7 +1179,8 @@ destination_activated (ENameSelectorDialog *name_selector_dialog, GtkTreePath *p
}
static gboolean
-remove_selection (ENameSelectorDialog *name_selector_dialog, GtkTreeView *tree_view)
+remove_selection (ENameSelectorDialog *name_selector_dialog,
+ GtkTreeView *tree_view)
{
gint section_index;
EDestinationStore *destination_store;
@@ -1209,7 +1237,8 @@ remove_selection (ENameSelectorDialog *name_selector_dialog, GtkTreeView *tree_v
}
static void
-remove_button_clicked (GtkButton *button, SelData *data)
+remove_button_clicked (GtkButton *button,
+ SelData *data)
{
GtkTreeView *view;
ENameSelectorDialog *name_selector_dialog;
@@ -1221,7 +1250,8 @@ remove_button_clicked (GtkButton *button, SelData *data)
static gboolean
destination_key_press (ENameSelectorDialog *name_selector_dialog,
- GdkEventKey *event, GtkTreeView *tree_view)
+ GdkEventKey *event,
+ GtkTreeView *tree_view)
{
/* we only care about DEL key */
@@ -1232,7 +1262,8 @@ destination_key_press (ENameSelectorDialog *name_selector_dialog,
}
static void
-transfer_button_clicked (ENameSelectorDialog *name_selector_dialog, GtkButton *transfer_button)
+transfer_button_clicked (ENameSelectorDialog *name_selector_dialog,
+ GtkButton *transfer_button)
{
EContactStore *contact_store;
EDestinationStore *destination_store;
@@ -1418,8 +1449,11 @@ shutdown_name_selector_model (ENameSelectorDialog *name_selector_dialog)
}
static void
-contact_column_formatter (GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *model,
- GtkTreeIter *iter, ENameSelectorDialog *name_selector_dialog)
+contact_column_formatter (GtkTreeViewColumn *column,
+ GtkCellRenderer *cell,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ ENameSelectorDialog *name_selector_dialog)
{
EContactStore *contact_store;
EContact *contact;
@@ -1461,8 +1495,11 @@ contact_column_formatter (GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkT
}
static void
-destination_column_formatter (GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *model,
- GtkTreeIter *iter, ENameSelectorDialog *name_selector_dialog)
+destination_column_formatter (GtkTreeViewColumn *column,
+ GtkCellRenderer *cell,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ ENameSelectorDialog *name_selector_dialog)
{
EDestinationStore *destination_store = E_DESTINATION_STORE (model);
EDestination *destination;
@@ -1515,7 +1552,7 @@ e_name_selector_dialog_peek_model (ENameSelectorDialog *name_selector_dialog)
**/
void
e_name_selector_dialog_set_model (ENameSelectorDialog *name_selector_dialog,
- ENameSelectorModel *model)
+ ENameSelectorModel *model)
{
g_return_if_fail (E_IS_NAME_SELECTOR_DIALOG (name_selector_dialog));
g_return_if_fail (E_IS_NAME_SELECTOR_MODEL (model));
@@ -1538,7 +1575,7 @@ e_name_selector_dialog_set_model (ENameSelectorDialog *name_selector_dialog,
**/
void
e_name_selector_dialog_set_destination_index (ENameSelectorDialog *name_selector_dialog,
- guint index)
+ guint index)
{
g_return_if_fail (E_IS_NAME_SELECTOR_DIALOG (name_selector_dialog));
@@ -1560,8 +1597,8 @@ e_name_selector_dialog_set_destination_index (ENameSelectorDialog *name_selector
**/
void
e_name_selector_dialog_set_scrolling_policy (ENameSelectorDialog *name_selector_dialog,
- GtkPolicyType hscrollbar_policy,
- GtkPolicyType vscrollbar_policy)
+ GtkPolicyType hscrollbar_policy,
+ GtkPolicyType vscrollbar_policy)
{
GtkScrolledWindow *win = GTK_SCROLLED_WINDOW (name_selector_dialog->priv->contact_window);
diff --git a/libedataserverui/e-name-selector-entry.c b/libedataserverui/e-name-selector-entry.c
index 3483df6..37120d3 100644
--- a/libedataserverui/e-name-selector-entry.c
+++ b/libedataserverui/e-name-selector-entry.c
@@ -273,8 +273,10 @@ sanitize_string (const gchar *string)
/* Called for each list store entry whenever the user types (but not on cut/paste) */
static gboolean
-completion_match_cb (GtkEntryCompletion *completion, const gchar *key,
- GtkTreeIter *iter, gpointer user_data)
+completion_match_cb (GtkEntryCompletion *completion,
+ const gchar *key,
+ GtkTreeIter *iter,
+ gpointer user_data)
{
ENS_DEBUG (g_print ("completion_match_cb, key=%s\n", key));
@@ -285,7 +287,10 @@ completion_match_cb (GtkEntryCompletion *completion, const gchar *key,
* and places them in array. If any positions would be outside the string, the
* corresponding unichars are set to zero. */
static void
-get_utf8_string_context (const gchar *string, gint position, gunichar *unichars, gint n_unichars)
+get_utf8_string_context (const gchar *string,
+ gint position,
+ gunichar *unichars,
+ gint n_unichars)
{
gchar *p = NULL;
gint len;
@@ -316,7 +321,10 @@ get_utf8_string_context (const gchar *string, gint position, gunichar *unichars,
}
static gboolean
-get_range_at_position (const gchar *string, gint pos, gint *start_pos, gint *end_pos)
+get_range_at_position (const gchar *string,
+ gint pos,
+ gint *start_pos,
+ gint *end_pos)
{
const gchar *p;
gboolean quoted = FALSE;
@@ -360,7 +368,8 @@ get_range_at_position (const gchar *string, gint pos, gint *start_pos, gint *end
}
static gboolean
-is_quoted_at (const gchar *string, gint pos)
+is_quoted_at (const gchar *string,
+ gint pos)
{
const gchar *p;
gboolean quoted = FALSE;
@@ -377,7 +386,8 @@ is_quoted_at (const gchar *string, gint pos)
}
static gint
-get_index_at_position (const gchar *string, gint pos)
+get_index_at_position (const gchar *string,
+ gint pos)
{
const gchar *p;
gboolean quoted = FALSE;
@@ -397,7 +407,10 @@ get_index_at_position (const gchar *string, gint pos)
}
static gboolean
-get_range_by_index (const gchar *string, gint index, gint *start_pos, gint *end_pos)
+get_range_by_index (const gchar *string,
+ gint index,
+ gint *start_pos,
+ gint *end_pos)
{
const gchar *p;
gboolean quoted = FALSE;
@@ -420,7 +433,8 @@ get_range_by_index (const gchar *string, gint index, gint *start_pos, gint *end_
}
static gchar *
-get_address_at_position (const gchar *string, gint pos)
+get_address_at_position (const gchar *string,
+ gint pos)
{
gint start_pos;
gint end_pos;
@@ -438,7 +452,8 @@ get_address_at_position (const gchar *string, gint pos)
/* Finds the destination in model */
static EDestination *
-find_destination_by_index (ENameSelectorEntry *name_selector_entry, gint index)
+find_destination_by_index (ENameSelectorEntry *name_selector_entry,
+ gint index)
{
GtkTreePath *path;
GtkTreeIter iter;
@@ -460,7 +475,8 @@ find_destination_by_index (ENameSelectorEntry *name_selector_entry, gint index)
/* Finds the destination in model */
static EDestination *
-find_destination_at_position (ENameSelectorEntry *name_selector_entry, gint pos)
+find_destination_at_position (ENameSelectorEntry *name_selector_entry,
+ gint pos)
{
const gchar *text;
gint index;
@@ -473,7 +489,8 @@ find_destination_at_position (ENameSelectorEntry *name_selector_entry, gint pos)
/* Builds destination from our text */
static EDestination *
-build_destination_at_position (const gchar *string, gint pos)
+build_destination_at_position (const gchar *string,
+ gint pos)
{
EDestination *destination;
gchar *address;
@@ -490,7 +507,8 @@ build_destination_at_position (const gchar *string, gint pos)
}
static gchar *
-name_style_query (const gchar *field, const gchar *value)
+name_style_query (const gchar *field,
+ const gchar *value)
{
gchar *spaced_str;
gchar *comma_str;
@@ -558,7 +576,9 @@ escape_sexp_string (const gchar *string)
* Since: 2.24
**/
gchar *
-ens_util_populate_user_query_fields (GSList *user_query_fields, const gchar *cue_str, const gchar *encoded_cue_str)
+ens_util_populate_user_query_fields (GSList *user_query_fields,
+ const gchar *cue_str,
+ const gchar *encoded_cue_str)
{
GString *user_fields;
GSList *s;
@@ -592,7 +612,8 @@ ens_util_populate_user_query_fields (GSList *user_query_fields, const gchar *cue
}
static void
-set_completion_query (ENameSelectorEntry *name_selector_entry, const gchar *cue_str)
+set_completion_query (ENameSelectorEntry *name_selector_entry,
+ const gchar *cue_str)
{
ENameSelectorEntryPrivate *priv;
EBookQuery *book_query;
@@ -644,7 +665,9 @@ set_completion_query (ENameSelectorEntry *name_selector_entry, const gchar *cue_
}
static gchar *
-get_entry_substring (ENameSelectorEntry *name_selector_entry, gint range_start, gint range_end)
+get_entry_substring (ENameSelectorEntry *name_selector_entry,
+ gint range_start,
+ gint range_end)
{
const gchar *entry_text;
gchar *p0, *p1;
@@ -658,7 +681,9 @@ get_entry_substring (ENameSelectorEntry *name_selector_entry, gint range_start,
}
static gint
-utf8_casefold_collate_len (const gchar *str1, const gchar *str2, gint len)
+utf8_casefold_collate_len (const gchar *str1,
+ const gchar *str2,
+ gint len)
{
gchar *s1 = g_utf8_casefold (str1, len);
gchar *s2 = g_utf8_casefold (str2, len);
@@ -673,7 +698,8 @@ utf8_casefold_collate_len (const gchar *str1, const gchar *str2, gint len)
}
static gchar *
-build_textrep_for_contact (EContact *contact, EContactField cue_field)
+build_textrep_for_contact (EContact *contact,
+ EContactField cue_field)
{
gchar *name = NULL;
gchar *email = NULL;
@@ -714,8 +740,10 @@ build_textrep_for_contact (EContact *contact, EContactField cue_field)
}
static gboolean
-contact_match_cue (EContact *contact, const gchar *cue_str,
- EContactField *matched_field, gint *matched_field_rank)
+contact_match_cue (EContact *contact,
+ const gchar *cue_str,
+ EContactField *matched_field,
+ gint *matched_field_rank)
{
EContactField fields[] = { E_CONTACT_FULL_NAME, E_CONTACT_NICKNAME, E_CONTACT_FILE_AS,
E_CONTACT_EMAIL_1, E_CONTACT_EMAIL_2, E_CONTACT_EMAIL_3,
@@ -777,8 +805,12 @@ contact_match_cue (EContact *contact, const gchar *cue_str,
}
static gboolean
-find_existing_completion (ENameSelectorEntry *name_selector_entry, const gchar *cue_str,
- EContact **contact, gchar **text, EContactField *matched_field, EBookClient **book_client)
+find_existing_completion (ENameSelectorEntry *name_selector_entry,
+ const gchar *cue_str,
+ EContact **contact,
+ gchar **text,
+ EContactField *matched_field,
+ EBookClient **book_client)
{
GtkTreeIter iter;
EContact *best_contact = NULL;
@@ -1031,7 +1063,8 @@ update_completions_on_timeout_cb (ENameSelectorEntry *name_selector_entry)
}
static void
-insert_destination_at_position (ENameSelectorEntry *name_selector_entry, gint pos)
+insert_destination_at_position (ENameSelectorEntry *name_selector_entry,
+ gint pos)
{
EDestination *destination;
const gchar *text;
@@ -1053,7 +1086,8 @@ insert_destination_at_position (ENameSelectorEntry *name_selector_entry, gint po
}
static void
-modify_destination_at_position (ENameSelectorEntry *name_selector_entry, gint pos)
+modify_destination_at_position (ENameSelectorEntry *name_selector_entry,
+ gint pos)
{
EDestination *destination;
const gchar *text;
@@ -1111,7 +1145,9 @@ get_destination_textrep (EDestination *destination)
}
static void
-sync_destination_at_position (ENameSelectorEntry *name_selector_entry, gint range_pos, gint *cursor_pos)
+sync_destination_at_position (ENameSelectorEntry *name_selector_entry,
+ gint range_pos,
+ gint *cursor_pos)
{
EDestination *destination;
const gchar *text;
@@ -1156,7 +1192,8 @@ sync_destination_at_position (ENameSelectorEntry *name_selector_entry, gint rang
}
static void
-remove_destination_by_index (ENameSelectorEntry *name_selector_entry, gint index)
+remove_destination_by_index (ENameSelectorEntry *name_selector_entry,
+ gint index)
{
EDestination *destination;
@@ -1197,7 +1234,9 @@ post_insert_update (ENameSelectorEntry *name_selector_entry,
/* Returns the number of characters inserted */
static gint
-insert_unichar (ENameSelectorEntry *name_selector_entry, gint *pos, gunichar c)
+insert_unichar (ENameSelectorEntry *name_selector_entry,
+ gint *pos,
+ gunichar c)
{
const gchar *text;
gunichar str_context[4];
@@ -1277,8 +1316,11 @@ insert_unichar (ENameSelectorEntry *name_selector_entry, gint *pos, gunichar c)
}
static void
-user_insert_text (ENameSelectorEntry *name_selector_entry, gchar *new_text,
- gint new_text_length, gint *position, gpointer user_data)
+user_insert_text (ENameSelectorEntry *name_selector_entry,
+ gchar *new_text,
+ gint new_text_length,
+ gint *position,
+ gpointer user_data)
{
gint chars_inserted = 0;
gboolean fast_insert;
@@ -1329,8 +1371,10 @@ user_insert_text (ENameSelectorEntry *name_selector_entry, gchar *new_text,
}
static void
-user_delete_text (ENameSelectorEntry *name_selector_entry, gint start_pos, gint end_pos,
- gpointer user_data)
+user_delete_text (ENameSelectorEntry *name_selector_entry,
+ gint start_pos,
+ gint end_pos,
+ gpointer user_data)
{
const gchar *text;
gint index_start, index_end;
@@ -1375,8 +1419,8 @@ user_delete_text (ENameSelectorEntry *name_selector_entry, gint start_pos, gint
EDestination *destination = find_destination_by_index (name_selector_entry, i);
gint range_start, range_end;
gchar *ttext;
- const gchar *email=NULL;
- gboolean sel=FALSE;
+ const gchar *email = NULL;
+ gboolean sel = FALSE;
if (destination)
email = e_destination_get_textrep (destination, TRUE);
@@ -1391,7 +1435,7 @@ user_delete_text (ENameSelectorEntry *name_selector_entry, gint start_pos, gint
if ((selection_start < range_start && selection_end > range_start) ||
(selection_end > range_start && selection_end < range_end))
- sel=TRUE;
+ sel = TRUE;
if (!sel) {
g_signal_handlers_block_by_func (name_selector_entry, user_insert_text, name_selector_entry);
@@ -1418,19 +1462,19 @@ user_delete_text (ENameSelectorEntry *name_selector_entry, gint start_pos, gint
gchar *c;
/* Get the actual deleted text */
- c = gtk_editable_get_chars (GTK_EDITABLE (name_selector_entry), start_pos, start_pos+1);
+ c = gtk_editable_get_chars (GTK_EDITABLE (name_selector_entry), start_pos, start_pos + 1);
if ( c[0] == ' ') {
/* If we are at the beginning or removing junk space, let us ignore it */
del_space = TRUE;
}
g_free (c);
- } else if (end_pos == start_pos +1 && index_end == index_start+1) {
+ } else if (end_pos == start_pos +1 && index_end == index_start + 1) {
/* We could be just deleting the empty text */
gchar *c;
/* Get the actual deleted text */
- c = gtk_editable_get_chars (GTK_EDITABLE (name_selector_entry), start_pos, start_pos+1);
+ c = gtk_editable_get_chars (GTK_EDITABLE (name_selector_entry), start_pos, start_pos + 1);
if ( c[0] == ',' && !is_quoted_at (text, start_pos)) {
/* If we are at the beginning or removing junk space, let us ignore it */
@@ -1449,7 +1493,7 @@ user_delete_text (ENameSelectorEntry *name_selector_entry, gint start_pos, gint
EDestination *destination1 = find_destination_by_index (name_selector_entry, index_start);
gchar *ttext;
- const gchar *email=NULL;
+ const gchar *email = NULL;
if (destination1)
email = e_destination_get_textrep (destination1, TRUE);
@@ -1476,7 +1520,7 @@ user_delete_text (ENameSelectorEntry *name_selector_entry, gint start_pos, gint
if (range_start != -1) {
start_pos = range_start;
- end_pos = start_pos+1;
+ end_pos = start_pos + 1;
gtk_editable_set_position (GTK_EDITABLE (name_selector_entry),start_pos);
}
}
@@ -1493,10 +1537,10 @@ user_delete_text (ENameSelectorEntry *name_selector_entry, gint start_pos, gint
const gchar *p;
gint j;
p = text + end_pos;
- for (p = text + (end_pos-1), j = end_pos - 1; *p && *p != '"' ; p = g_utf8_next_char (p), j++) {
+ for (p = text + (end_pos - 1), j = end_pos - 1; *p && *p != '"' ; p = g_utf8_next_char (p), j++) {
gunichar c = g_utf8_get_char (p);
if (c == ',') {
- insert_destination_at_position (name_selector_entry, j+1);
+ insert_destination_at_position (name_selector_entry, j + 1);
}
}
@@ -1526,8 +1570,9 @@ user_delete_text (ENameSelectorEntry *name_selector_entry, gint start_pos, gint
}
static gboolean
-completion_match_selected (ENameSelectorEntry *name_selector_entry, ETreeModelGenerator *email_generator_model,
- GtkTreeIter *generator_iter)
+completion_match_selected (ENameSelectorEntry *name_selector_entry,
+ ETreeModelGenerator *email_generator_model,
+ GtkTreeIter *generator_iter)
{
EContact *contact;
EBookClient *book_client;
@@ -1615,9 +1660,9 @@ entry_activate (ENameSelectorEntry *name_selector_entry)
get_range_at_position (text, cursor_pos, &range_start, &range_end);
if (priv->is_completing) {
- gchar *str_context=NULL;
+ gchar *str_context = NULL;
- str_context = gtk_editable_get_chars (GTK_EDITABLE (name_selector_entry), range_end, range_end+1);
+ str_context = gtk_editable_get_chars (GTK_EDITABLE (name_selector_entry), range_end, range_end + 1);
if (str_context[0] != ',') {
/* At the end*/
@@ -1629,11 +1674,11 @@ entry_activate (ENameSelectorEntry *name_selector_entry)
/* Doing this we can make sure that It wont ask for completion again. */
gtk_editable_insert_text (GTK_EDITABLE (name_selector_entry), ", ", -1, &newpos);
g_signal_handlers_block_by_func (name_selector_entry, user_delete_text, name_selector_entry);
- gtk_editable_delete_text (GTK_EDITABLE (name_selector_entry), newpos-2, newpos);
+ gtk_editable_delete_text (GTK_EDITABLE (name_selector_entry), newpos - 2, newpos);
g_signal_handlers_unblock_by_func (name_selector_entry, user_delete_text, name_selector_entry);
/* Move it close to next destination*/
- range_end = range_end+2;
+ range_end = range_end + 2;
}
g_free (str_context);
@@ -1647,7 +1692,8 @@ entry_activate (ENameSelectorEntry *name_selector_entry)
}
static void
-update_text (ENameSelectorEntry *name_selector_entry, const gchar *text)
+update_text (ENameSelectorEntry *name_selector_entry,
+ const gchar *text)
{
gint start = 0, end = 0;
gboolean has_selection;
@@ -1707,7 +1753,8 @@ sanitize_entry (ENameSelectorEntry *name_selector_entry)
}
static gboolean
-user_focus_in (ENameSelectorEntry *name_selector_entry, GdkEventFocus *event_focus)
+user_focus_in (ENameSelectorEntry *name_selector_entry,
+ GdkEventFocus *event_focus)
{
gint n;
GList *l, *known;
@@ -1754,7 +1801,8 @@ user_focus_in (ENameSelectorEntry *name_selector_entry, GdkEventFocus *event_foc
}
static gboolean
-user_focus_out (ENameSelectorEntry *name_selector_entry, GdkEventFocus *event_focus)
+user_focus_out (ENameSelectorEntry *name_selector_entry,
+ GdkEventFocus *event_focus)
{
if (!event_focus->in) {
entry_activate (name_selector_entry);
@@ -1807,8 +1855,11 @@ entry_height (GtkWidget *widget)
}
static void
-contact_layout_pixbuffer (GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkTreeModel *model,
- GtkTreeIter *iter, ENameSelectorEntry *name_selector_entry)
+contact_layout_pixbuffer (GtkCellLayout *cell_layout,
+ GtkCellRenderer *cell,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ ENameSelectorEntry *name_selector_entry)
{
EContact *contact;
GtkTreeIter generator_iter;
@@ -1878,8 +1929,11 @@ contact_layout_pixbuffer (GtkCellLayout *cell_layout, GtkCellRenderer *cell, Gtk
}
static void
-contact_layout_formatter (GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkTreeModel *model,
- GtkTreeIter *iter, ENameSelectorEntry *name_selector_entry)
+contact_layout_formatter (GtkCellLayout *cell_layout,
+ GtkCellRenderer *cell,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ ENameSelectorEntry *name_selector_entry)
{
EContact *contact;
GtkTreeIter generator_iter;
@@ -1920,8 +1974,9 @@ contact_layout_formatter (GtkCellLayout *cell_layout, GtkCellRenderer *cell, Gtk
}
static gint
-generate_contact_rows (EContactStore *contact_store, GtkTreeIter *iter,
- ENameSelectorEntry *name_selector_entry)
+generate_contact_rows (EContactStore *contact_store,
+ GtkTreeIter *iter,
+ ENameSelectorEntry *name_selector_entry)
{
EContact *contact;
const gchar *contact_uid;
@@ -2065,7 +2120,9 @@ setup_default_contact_store (ENameSelectorEntry *name_selector_entry)
}
static void
-destination_row_changed (ENameSelectorEntry *name_selector_entry, GtkTreePath *path, GtkTreeIter *iter)
+destination_row_changed (ENameSelectorEntry *name_selector_entry,
+ GtkTreePath *path,
+ GtkTreeIter *iter)
{
EDestination *destination;
const gchar *entry_text;
@@ -2104,7 +2161,9 @@ destination_row_changed (ENameSelectorEntry *name_selector_entry, GtkTreePath *p
}
static void
-destination_row_inserted (ENameSelectorEntry *name_selector_entry, GtkTreePath *path, GtkTreeIter *iter)
+destination_row_inserted (ENameSelectorEntry *name_selector_entry,
+ GtkTreePath *path,
+ GtkTreeIter *iter)
{
EDestination *destination;
const gchar *entry_text;
@@ -2158,7 +2217,8 @@ destination_row_inserted (ENameSelectorEntry *name_selector_entry, GtkTreePath *
}
static void
-destination_row_deleted (ENameSelectorEntry *name_selector_entry, GtkTreePath *path)
+destination_row_deleted (ENameSelectorEntry *name_selector_entry,
+ GtkTreePath *path)
{
const gchar *text;
gboolean deleted_comma = FALSE;
@@ -2251,7 +2311,8 @@ setup_destination_store (ENameSelectorEntry *name_selector_entry)
}
static gboolean
-prepare_popup_destination (ENameSelectorEntry *name_selector_entry, GdkEventButton *event_button)
+prepare_popup_destination (ENameSelectorEntry *name_selector_entry,
+ GdkEventButton *event_button)
{
EDestination *destination;
PangoLayout *layout;
@@ -2297,7 +2358,9 @@ prepare_popup_destination (ENameSelectorEntry *name_selector_entry, GdkEventButt
}
static EBookClient *
-find_client_by_contact (GSList *clients, const gchar *contact_uid, const gchar *source_uid)
+find_client_by_contact (GSList *clients,
+ const gchar *contact_uid,
+ const gchar *source_uid)
{
GSList *l;
@@ -2332,7 +2395,8 @@ find_client_by_contact (GSList *clients, const gchar *contact_uid, const gchar *
}
static void
-editor_closed_cb (GtkWidget *editor, gpointer data)
+editor_closed_cb (GtkWidget *editor,
+ gpointer data)
{
EContact *contact;
gchar *contact_uid;
@@ -2386,30 +2450,33 @@ editor_closed_cb (GtkWidget *editor, gpointer data)
* and return the decoded representation of name & email parts.
* */
static gboolean
-eab_parse_qp_email (const gchar *string, gchar **name, gchar **email)
+eab_parse_qp_email (const gchar *string,
+ gchar **name,
+ gchar **email)
{
- struct _camel_header_address *address;
- gboolean res = FALSE;
+ struct _camel_header_address *address;
+ gboolean res = FALSE;
address = camel_header_address_decode (string, "UTF-8");
- if (!address)
- return FALSE;
+ if (!address)
+ return FALSE;
/* report success only when we have filled both name and email address */
- if (address->type == CAMEL_HEADER_ADDRESS_NAME && address->name && *address->name && address->v.addr && *address->v.addr) {
+ if (address->type == CAMEL_HEADER_ADDRESS_NAME && address->name && *address->name && address->v.addr && *address->v.addr) {
*name = g_strdup (address->name);
*email = g_strdup (address->v.addr);
- res = TRUE;
- }
+ res = TRUE;
+ }
- camel_header_address_unref (address);
+ camel_header_address_unref (address);
- return res;
+ return res;
}
static void
-popup_activate_inline_expand (ENameSelectorEntry *name_selector_entry, GtkWidget *menu_item)
+popup_activate_inline_expand (ENameSelectorEntry *name_selector_entry,
+ GtkWidget *menu_item)
{
const gchar *text;
GString *sanitized_text = g_string_new ("");
@@ -2465,7 +2532,8 @@ popup_activate_inline_expand (ENameSelectorEntry *name_selector_entry, GtkWidget
}
static void
-popup_activate_contact (ENameSelectorEntry *name_selector_entry, GtkWidget *menu_item)
+popup_activate_contact (ENameSelectorEntry *name_selector_entry,
+ GtkWidget *menu_item)
{
EBookClient *book_client;
GSList *clients;
@@ -2521,7 +2589,8 @@ popup_activate_contact (ENameSelectorEntry *name_selector_entry, GtkWidget *menu
}
static void
-popup_activate_email (ENameSelectorEntry *name_selector_entry, GtkWidget *menu_item)
+popup_activate_email (ENameSelectorEntry *name_selector_entry,
+ GtkWidget *menu_item)
{
EDestination *destination;
EContact *contact;
@@ -2540,7 +2609,8 @@ popup_activate_email (ENameSelectorEntry *name_selector_entry, GtkWidget *menu_i
}
static void
-popup_activate_list (EDestination *destination, GtkWidget *item)
+popup_activate_list (EDestination *destination,
+ GtkWidget *item)
{
gboolean status = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (item));
@@ -2548,7 +2618,8 @@ popup_activate_list (EDestination *destination, GtkWidget *item)
}
static void
-popup_activate_cut (ENameSelectorEntry *name_selector_entry, GtkWidget *menu_item)
+popup_activate_cut (ENameSelectorEntry *name_selector_entry,
+ GtkWidget *menu_item)
{
EDestination *destination;
const gchar *contact_email;
@@ -2577,7 +2648,8 @@ popup_activate_cut (ENameSelectorEntry *name_selector_entry, GtkWidget *menu_ite
}
static void
-popup_activate_copy (ENameSelectorEntry *name_selector_entry, GtkWidget *menu_item)
+popup_activate_copy (ENameSelectorEntry *name_selector_entry,
+ GtkWidget *menu_item)
{
EDestination *destination;
const gchar *contact_email;
@@ -2602,7 +2674,8 @@ popup_activate_copy (ENameSelectorEntry *name_selector_entry, GtkWidget *menu_it
}
static void
-destination_set_list (GtkWidget *item, EDestination *destination)
+destination_set_list (GtkWidget *item,
+ EDestination *destination)
{
EContact *contact;
gboolean status = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (item));
@@ -2615,7 +2688,8 @@ destination_set_list (GtkWidget *item, EDestination *destination)
}
static void
-destination_set_email (GtkWidget *item, EDestination *destination)
+destination_set_email (GtkWidget *item,
+ EDestination *destination)
{
gint email_num;
EContact *contact;
@@ -2631,12 +2705,13 @@ destination_set_email (GtkWidget *item, EDestination *destination)
}
static void
-populate_popup (ENameSelectorEntry *name_selector_entry, GtkMenu *menu)
+populate_popup (ENameSelectorEntry *name_selector_entry,
+ GtkMenu *menu)
{
EDestination *destination;
EContact *contact;
GtkWidget *menu_item;
- GList *email_list=NULL;
+ GList *email_list = NULL;
GList *l;
gint i;
gchar *edit_label;
@@ -2883,14 +2958,16 @@ copy_or_cut_clipboard (ENameSelectorEntry *name_selector_entry,
}
static void
-copy_clipboard (GtkEntry *entry, ENameSelectorEntry *name_selector_entry)
+copy_clipboard (GtkEntry *entry,
+ ENameSelectorEntry *name_selector_entry)
{
copy_or_cut_clipboard (name_selector_entry, FALSE);
g_signal_stop_emission_by_name (entry, "copy-clipboard");
}
static void
-cut_clipboard (GtkEntry *entry, ENameSelectorEntry *name_selector_entry)
+cut_clipboard (GtkEntry *entry,
+ ENameSelectorEntry *name_selector_entry)
{
copy_or_cut_clipboard (name_selector_entry, TRUE);
g_signal_stop_emission_by_name (entry, "cut-clipboard");
@@ -3024,7 +3101,7 @@ e_name_selector_entry_peek_contact_store (ENameSelectorEntry *name_selector_entr
**/
void
e_name_selector_entry_set_contact_store (ENameSelectorEntry *name_selector_entry,
- EContactStore *contact_store)
+ EContactStore *contact_store)
{
g_return_if_fail (E_IS_NAME_SELECTOR_ENTRY (name_selector_entry));
g_return_if_fail (contact_store == NULL || E_IS_CONTACT_STORE (contact_store));
@@ -3066,8 +3143,8 @@ e_name_selector_entry_peek_destination_store (ENameSelectorEntry *name_selector_
* destinations for @name_selector_entry.
**/
void
-e_name_selector_entry_set_destination_store (ENameSelectorEntry *name_selector_entry,
- EDestinationStore *destination_store)
+e_name_selector_entry_set_destination_store (ENameSelectorEntry *name_selector_entry,
+ EDestinationStore *destination_store)
{
g_return_if_fail (E_IS_NAME_SELECTOR_ENTRY (name_selector_entry));
g_return_if_fail (E_IS_DESTINATION_STORE (destination_store));
@@ -3100,7 +3177,8 @@ e_name_selector_entry_get_popup_destination (ENameSelectorEntry *name_selector_e
* DO NOT USE.
**/
void
-e_name_selector_entry_set_contact_editor_func (ENameSelectorEntry *name_selector_entry, gpointer func)
+e_name_selector_entry_set_contact_editor_func (ENameSelectorEntry *name_selector_entry,
+ gpointer func)
{
name_selector_entry->priv->contact_editor_func = func;
}
@@ -3111,7 +3189,8 @@ e_name_selector_entry_set_contact_editor_func (ENameSelectorEntry *name_selector
* DO NOT USE.
**/
void
-e_name_selector_entry_set_contact_list_editor_func (ENameSelectorEntry *name_selector_entry, gpointer func)
+e_name_selector_entry_set_contact_list_editor_func (ENameSelectorEntry *name_selector_entry,
+ gpointer func)
{
name_selector_entry->priv->contact_list_editor_func = func;
}
diff --git a/libedataserverui/e-name-selector-list.c b/libedataserverui/e-name-selector-list.c
index 1cace04..e8d2490 100644
--- a/libedataserverui/e-name-selector-list.c
+++ b/libedataserverui/e-name-selector-list.c
@@ -134,7 +134,9 @@ enl_popup_ungrab (ENameSelectorList *list)
}
static gboolean
-enl_entry_focus_in (ENameSelectorList *list, GdkEventFocus *event, gpointer dummy)
+enl_entry_focus_in (ENameSelectorList *list,
+ GdkEventFocus *event,
+ gpointer dummy)
{
gint len;
@@ -146,7 +148,9 @@ enl_entry_focus_in (ENameSelectorList *list, GdkEventFocus *event, gpointer dumm
}
static gboolean
-enl_entry_focus_out (ENameSelectorList *list, GdkEventFocus *event, gpointer dummy)
+enl_entry_focus_out (ENameSelectorList *list,
+ GdkEventFocus *event,
+ gpointer dummy)
{
/* When we lose focus and popup is still present hide it. Dont do it, when we click the popup. Look for grab */
if (gtk_widget_get_visible (GTK_WIDGET (list->priv->popup))
@@ -162,8 +166,8 @@ enl_entry_focus_out (ENameSelectorList *list, GdkEventFocus *event, gpointer dum
static gboolean
enl_popup_button_press (GtkWidget *widget,
- GdkEventButton *event,
- ENameSelectorList *list)
+ GdkEventButton *event,
+ ENameSelectorList *list)
{
if (!gtk_widget_get_mapped (widget))
return FALSE;
@@ -176,8 +180,8 @@ enl_popup_button_press (GtkWidget *widget,
static gboolean
enl_popup_focus_out (GtkWidget *w,
- GdkEventFocus *event,
- ENameSelectorList *list)
+ GdkEventFocus *event,
+ ENameSelectorList *list)
{
/* Just ungrab. We lose focus on button press event */
enl_popup_ungrab (list);
@@ -185,9 +189,9 @@ enl_popup_focus_out (GtkWidget *w,
}
static gboolean
-enl_popup_enter_notify (GtkWidget *widget,
- GdkEventCrossing *event,
- ENameSelectorList *list)
+enl_popup_enter_notify (GtkWidget *widget,
+ GdkEventCrossing *event,
+ ENameSelectorList *list)
{
if (event->type == GDK_ENTER_NOTIFY && !gtk_widget_has_grab (GTK_WIDGET (list->priv->popup)))
enl_popup_grab (list);
@@ -197,7 +201,7 @@ enl_popup_enter_notify (GtkWidget *widget,
static void
enl_tree_select_node (ENameSelectorList *list,
- gint n)
+ gint n)
{
EDestinationStore *store;
ENameSelectorEntry *entry;
@@ -212,7 +216,7 @@ enl_tree_select_node (ENameSelectorList *list,
store = e_name_selector_entry_peek_destination_store (entry);
selection = gtk_tree_view_get_selection (tree_view);
iter.stamp = e_destination_store_get_stamp (store);
- iter.user_data = GINT_TO_POINTER (n-1);
+ iter.user_data = GINT_TO_POINTER (n - 1);
gtk_tree_selection_unselect_all (selection);
gtk_tree_selection_select_iter (selection, &iter);
@@ -229,8 +233,8 @@ enl_tree_select_node (ENameSelectorList *list,
static gboolean
enl_entry_key_press_event (ENameSelectorList *list,
- GdkEventKey *event,
- gpointer dummy)
+ GdkEventKey *event,
+ gpointer dummy)
{
ENameSelectorEntry *entry;
EDestinationStore *store;
@@ -251,7 +255,8 @@ enl_entry_key_press_event (ENameSelectorList *list,
}
static void
-delete_row (GtkTreePath *path, ENameSelectorList *list)
+delete_row (GtkTreePath *path,
+ ENameSelectorList *list)
{
ENameSelectorEntry *entry;
EDestinationStore *store;
@@ -297,7 +302,8 @@ delete_row (GtkTreePath *path, ENameSelectorList *list)
}
static void
-popup_activate_email (ENameSelectorEntry *name_selector_entry, GtkWidget *menu_item)
+popup_activate_email (ENameSelectorEntry *name_selector_entry,
+ GtkWidget *menu_item)
{
EDestination *destination;
EContact *contact;
@@ -316,7 +322,8 @@ popup_activate_email (ENameSelectorEntry *name_selector_entry, GtkWidget *menu_i
}
static void
-popup_activate_list (EDestination *destination, GtkWidget *item)
+popup_activate_list (EDestination *destination,
+ GtkWidget *item)
{
gboolean status = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (item));
@@ -324,7 +331,8 @@ popup_activate_list (EDestination *destination, GtkWidget *item)
}
static void
-destination_set_list (GtkWidget *item, EDestination *destination)
+destination_set_list (GtkWidget *item,
+ EDestination *destination)
{
EContact *contact;
gboolean status = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (item));
@@ -337,7 +345,8 @@ destination_set_list (GtkWidget *item, EDestination *destination)
}
static void
-destination_set_email (GtkWidget *item, EDestination *destination)
+destination_set_email (GtkWidget *item,
+ EDestination *destination)
{
gint email_num;
EContact *contact;
@@ -358,22 +367,24 @@ typedef struct {
}PopupDeleteRowInfo;
static void
-popup_delete_row (GtkWidget *w, PopupDeleteRowInfo *row_info)
+popup_delete_row (GtkWidget *w,
+ PopupDeleteRowInfo *row_info)
{
delete_row (row_info->path, row_info->list);
g_free (row_info);
}
static void
-menu_deactivate (GtkMenuShell *junk, ENameSelectorList *list)
+menu_deactivate (GtkMenuShell *junk,
+ ENameSelectorList *list)
{
enl_popup_grab (list);
}
static gboolean
enl_tree_button_press_event (GtkWidget *widget,
- GdkEventButton *event,
- ENameSelectorList *list)
+ GdkEventButton *event,
+ ENameSelectorList *list)
{
GtkWidget *menu;
EDestination *destination;
@@ -525,8 +536,8 @@ enl_tree_button_press_event (GtkWidget *widget,
static gboolean
enl_tree_key_press_event (GtkWidget *w,
- GdkEventKey *event,
- ENameSelectorList *list)
+ GdkEventKey *event,
+ ENameSelectorList *list)
{
if (event->keyval == GDK_KEY_Escape) {
enl_popup_ungrab (list);
diff --git a/libedataserverui/e-name-selector-model.c b/libedataserverui/e-name-selector-model.c
index 8a0ea23..ce3d5d3 100644
--- a/libedataserverui/e-name-selector-model.c
+++ b/libedataserverui/e-name-selector-model.c
@@ -170,8 +170,9 @@ deep_free_list (GList *list)
}
static gint
-generate_contact_rows (EContactStore *contact_store, GtkTreeIter *iter,
- ENameSelectorModel *name_selector_model)
+generate_contact_rows (EContactStore *contact_store,
+ GtkTreeIter *iter,
+ ENameSelectorModel *name_selector_model)
{
EContact *contact;
const gchar *contact_uid;
@@ -222,9 +223,12 @@ generate_contact_rows (EContactStore *contact_store, GtkTreeIter *iter,
}
static void
-override_email_address (EContactStore *contact_store, GtkTreeIter *iter,
- gint permutation_n, gint column, GValue *value,
- ENameSelectorModel *name_selector_model)
+override_email_address (EContactStore *contact_store,
+ GtkTreeIter *iter,
+ gint permutation_n,
+ gint column,
+ GValue *value,
+ ENameSelectorModel *name_selector_model)
{
if (column == E_CONTACT_EMAIL_1) {
EContact *contact;
@@ -254,7 +258,9 @@ typedef struct
HashCompare;
static void
-emit_destination_uid_changes_cb (gchar *uid_num, gpointer value, HashCompare *hash_compare)
+emit_destination_uid_changes_cb (gchar *uid_num,
+ gpointer value,
+ HashCompare *hash_compare)
{
EContactStore *contact_store = hash_compare->name_selector_model->priv->contact_store;
@@ -329,7 +335,8 @@ destinations_changed (ENameSelectorModel *name_selector_model)
}
static void
-free_section (ENameSelectorModel *name_selector_model, gint n)
+free_section (ENameSelectorModel *name_selector_model,
+ gint n)
{
Section *section;
@@ -347,7 +354,8 @@ free_section (ENameSelectorModel *name_selector_model, gint n)
}
static gint
-find_section_by_name (ENameSelectorModel *name_selector_model, const gchar *name)
+find_section_by_name (ENameSelectorModel *name_selector_model,
+ const gchar *name)
{
gint i;
@@ -441,8 +449,9 @@ e_name_selector_model_list_sections (ENameSelectorModel *name_selector_model)
**/
void
e_name_selector_model_add_section (ENameSelectorModel *name_selector_model,
- const gchar *name, const gchar *pretty_name,
- EDestinationStore *destination_store)
+ const gchar *name,
+ const gchar *pretty_name,
+ EDestinationStore *destination_store)
{
Section section;
@@ -486,7 +495,8 @@ e_name_selector_model_add_section (ENameSelectorModel *name_selector_model,
* Removes a destination section from @name_selector_model.
**/
void
-e_name_selector_model_remove_section (ENameSelectorModel *name_selector_model, const gchar *name)
+e_name_selector_model_remove_section (ENameSelectorModel *name_selector_model,
+ const gchar *name)
{
gint n;
@@ -518,8 +528,10 @@ e_name_selector_model_remove_section (ENameSelectorModel *name_selector_model, c
* Gets the parameters for a destination section.
**/
gboolean
-e_name_selector_model_peek_section (ENameSelectorModel *name_selector_model, const gchar *name,
- gchar **pretty_name, EDestinationStore **destination_store)
+e_name_selector_model_peek_section (ENameSelectorModel *name_selector_model,
+ const gchar *name,
+ gchar **pretty_name,
+ EDestinationStore **destination_store)
{
Section *section;
gint n;
@@ -557,7 +569,9 @@ e_name_selector_model_peek_section (ENameSelectorModel *name_selector_model, con
* Since: 2.30
**/
GList *
-e_name_selector_model_get_contact_emails_without_used (ENameSelectorModel *name_selector_model, EContact *contact, gboolean remove_used)
+e_name_selector_model_get_contact_emails_without_used (ENameSelectorModel *name_selector_model,
+ EContact *contact,
+ gboolean remove_used)
{
GList *email_list;
gint emails;
diff --git a/libedataserverui/e-name-selector.c b/libedataserverui/e-name-selector.c
index 94195f7..84b1156 100644
--- a/libedataserverui/e-name-selector.c
+++ b/libedataserverui/e-name-selector.c
@@ -60,7 +60,8 @@ struct _ENameSelectorPrivate {
G_DEFINE_TYPE (ENameSelector, e_name_selector, G_TYPE_OBJECT)
static void
-reset_pointer_cb (gpointer data, GObject *where_was)
+reset_pointer_cb (gpointer data,
+ GObject *where_was)
{
ENameSelector *name_selector = data;
ENameSelectorPrivate *priv;
@@ -330,7 +331,8 @@ e_name_selector_new (void)
* ------- */
static gint
-add_section (ENameSelector *name_selector, const gchar *name)
+add_section (ENameSelector *name_selector,
+ const gchar *name)
{
GArray *array;
Section section;
@@ -346,7 +348,8 @@ add_section (ENameSelector *name_selector, const gchar *name)
}
static gint
-find_section_by_name (ENameSelector *name_selector, const gchar *name)
+find_section_by_name (ENameSelector *name_selector,
+ const gchar *name)
{
GArray *array;
gint i;
@@ -428,7 +431,7 @@ e_name_selector_peek_dialog (ENameSelector *name_selector)
**/
void
e_name_selector_show_dialog (ENameSelector *name_selector,
- GtkWidget *for_transient_widget)
+ GtkWidget *for_transient_widget)
{
GtkWindow *top = NULL;
ENameSelectorDialog *dialog;
@@ -455,7 +458,8 @@ e_name_selector_show_dialog (ENameSelector *name_selector,
* doesn't exist in the #ENameSelectorModel.
**/
ENameSelectorEntry *
-e_name_selector_peek_section_entry (ENameSelector *name_selector, const gchar *name)
+e_name_selector_peek_section_entry (ENameSelector *name_selector,
+ const gchar *name)
{
ENameSelectorPrivate *priv;
ENameSelectorModel *model;
@@ -523,7 +527,8 @@ e_name_selector_peek_section_entry (ENameSelector *name_selector, const gchar *n
**/
ENameSelectorList *
-e_name_selector_peek_section_list (ENameSelector *name_selector, const gchar *name)
+e_name_selector_peek_section_list (ENameSelector *name_selector,
+ const gchar *name)
{
ENameSelectorPrivate *priv;
ENameSelectorModel *model;
diff --git a/libedataserverui/e-passwords-win32.c b/libedataserverui/e-passwords-win32.c
index ef9d1dc..274683b 100644
--- a/libedataserverui/e-passwords-win32.c
+++ b/libedataserverui/e-passwords-win32.c
@@ -528,7 +528,9 @@ ep_add_password (EPassMsg *msg)
static void ep_ask_password (EPassMsg *msg);
static void
-pass_response (GtkDialog *dialog, gint response, gpointer data)
+pass_response (GtkDialog *dialog,
+ gint response,
+ gpointer data)
{
EPassMsg *msg = data;
gint type = msg->flags & E_PASSWORDS_REMEMBER_MASK;
@@ -898,7 +900,8 @@ e_passwords_clear_passwords (const gchar *component_name)
* Saves the password associated with @key to disk.
**/
void
-e_passwords_remember_password (const gchar *component_name, const gchar *key)
+e_passwords_remember_password (const gchar *component_name,
+ const gchar *key)
{
EPassMsg *msg;
@@ -920,7 +923,8 @@ e_passwords_remember_password (const gchar *component_name, const gchar *key)
* Forgets the password associated with @key, in memory and on disk.
**/
void
-e_passwords_forget_password (const gchar *component_name, const gchar *key)
+e_passwords_forget_password (const gchar *component_name,
+ const gchar *key)
{
EPassMsg *msg;
@@ -943,7 +947,8 @@ e_passwords_forget_password (const gchar *component_name, const gchar *key)
* must free the returned password.
**/
gchar *
-e_passwords_get_password (const gchar *component_name, const gchar *key)
+e_passwords_get_password (const gchar *component_name,
+ const gchar *key)
{
EPassMsg *msg;
gchar *passwd;
@@ -973,7 +978,8 @@ e_passwords_get_password (const gchar *component_name, const gchar *key)
* hash.
**/
void
-e_passwords_add_password (const gchar *key, const gchar *passwd)
+e_passwords_add_password (const gchar *key,
+ const gchar *passwd)
{
EPassMsg *msg;
@@ -1009,12 +1015,13 @@ e_passwords_add_password (const gchar *key, const gchar *passwd)
* E_PASSWORDS_DO_NOT_REMEMBER.
**/
gchar *
-e_passwords_ask_password (const gchar *title, const gchar *component_name,
- const gchar *key,
- const gchar *prompt,
- EPasswordsRememberType type,
- gboolean *remember,
- GtkWindow *parent)
+e_passwords_ask_password (const gchar *title,
+ const gchar *component_name,
+ const gchar *key,
+ const gchar *prompt,
+ EPasswordsRememberType type,
+ gboolean *remember,
+ GtkWindow *parent)
{
gchar *passwd;
EPassMsg *msg;
diff --git a/libedataserverui/e-passwords.c b/libedataserverui/e-passwords.c
index 580ddcf..9a14502 100644
--- a/libedataserverui/e-passwords.c
+++ b/libedataserverui/e-passwords.c
@@ -76,7 +76,7 @@ struct _EPassMsg {
/* work variables */
GtkWidget *entry;
GtkWidget *check;
- guint ismain:1;
+ guint ismain : 1;
guint noreply:1; /* supress replies; when calling
* dispatch functions from others */
};
@@ -318,7 +318,7 @@ ep_idle_dispatch (gpointer data)
EPassMsg *msg;
/* As soon as a password window is up we stop; it will
- re-invoke us when it has been closed down */
+ * re - invoke us when it has been closed down */
G_LOCK (passwords);
while (password_dialog == NULL && (msg = g_queue_pop_head (&message_queue)) != NULL) {
G_UNLOCK (passwords);
@@ -616,7 +616,9 @@ ep_add_password (EPassMsg *msg)
static void ep_ask_password (EPassMsg *msg);
static void
-pass_response (GtkDialog *dialog, gint response, gpointer data)
+pass_response (GtkDialog *dialog,
+ gint response,
+ gpointer data)
{
EPassMsg *msg = data;
gint type = msg->flags & E_PASSWORDS_REMEMBER_MASK;
@@ -811,7 +813,7 @@ ep_ask_password (EPassMsg *msg)
G_CALLBACK (update_capslock_state), widget);
/* static password, shouldn't be remembered between sessions,
- but will be remembered within the session beyond our control */
+ * but will be remembered within the session beyond our control */
if (type != E_PASSWORDS_REMEMBER_NEVER) {
if (msg->flags & E_PASSWORDS_PASSPHRASE) {
widget = gtk_check_button_new_with_mnemonic (
@@ -1050,7 +1052,8 @@ e_passwords_get_password (const gchar *unused,
* hash.
**/
void
-e_passwords_add_password (const gchar *key, const gchar *passwd)
+e_passwords_add_password (const gchar *key,
+ const gchar *passwd)
{
EPassMsg *msg;
diff --git a/libedataserverui/e-passwords.h b/libedataserverui/e-passwords.h
index e3ea84a..05ba0be 100644
--- a/libedataserverui/e-passwords.h
+++ b/libedataserverui/e-passwords.h
@@ -28,12 +28,12 @@
G_BEGIN_DECLS
/*
- initialization is now implicit when you call any of the functions
- below, although this is only correct if the functions are called
- from the main thread.
-
- e_passwords_shutdown should be called at exit time to synch the
- password on-disk storage, and to free up in-memory storage. */
+ * initialization is now implicit when you call any of the functions
+ * below, although this is only correct if the functions are called
+ * from the main thread.
+ *
+ * e_passwords_shutdown should be called at exit time to synch the
+ * password on-disk storage, and to free up in-memory storage. */
void e_passwords_init (void);
void e_passwords_shutdown (void);
@@ -53,8 +53,8 @@ typedef enum {
E_PASSWORDS_REMEMBER_MASK = 0xf,
/* option bits */
- E_PASSWORDS_SECRET = 1<<8,
- E_PASSWORDS_REPROMPT = 1<<9,
+ E_PASSWORDS_SECRET = 1 << 8,
+ E_PASSWORDS_REPROMPT = 1 << 9,
E_PASSWORDS_ONLINE = 1<<10, /* only ask if we're online */
E_PASSWORDS_DISABLE_REMEMBER = 1<<11, /* disable the 'remember password' checkbox */
E_PASSWORDS_PASSPHRASE = 1<<12 /* We are asking a passphrase */
diff --git a/libedataserverui/e-source-combo-box.c b/libedataserverui/e-source-combo-box.c
index d66f4a0..671d133 100644
--- a/libedataserverui/e-source-combo-box.c
+++ b/libedataserverui/e-source-combo-box.c
@@ -178,7 +178,8 @@ source_list_changed_cb (ESourceList *source_list,
}
static GObject *
-e_source_combo_box_constructor (GType type, guint n_construct_properties,
+e_source_combo_box_constructor (GType type,
+ guint n_construct_properties,
GObjectConstructParam *construct_properties)
{
GtkCellRenderer *renderer;
diff --git a/libedataserverui/e-source-selector-dialog.c b/libedataserverui/e-source-selector-dialog.c
index 22419f2..cdd7064 100644
--- a/libedataserverui/e-source-selector-dialog.c
+++ b/libedataserverui/e-source-selector-dialog.c
@@ -111,14 +111,17 @@ e_source_selector_dialog_init (ESourceSelectorDialog *dialog)
/* Public API */
static void
-row_activated_cb (GtkTreeView *tree_view, GtkTreePath *path,
- GtkTreeViewColumn *column, GtkWidget *dialog)
+row_activated_cb (GtkTreeView *tree_view,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ GtkWidget *dialog)
{
gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
}
static void
-primary_selection_changed_cb (ESourceSelector *selector, gpointer user_data)
+primary_selection_changed_cb (ESourceSelector *selector,
+ gpointer user_data)
{
ESourceSelectorDialog *dialog = user_data;
ESourceSelectorDialogPrivate *priv = dialog->priv;
@@ -150,7 +153,9 @@ primary_selection_changed_cb (ESourceSelector *selector, gpointer user_data)
}
static GtkWidget *
-setup_dialog (GtkWindow *parent, ESourceSelectorDialog *dialog, ESourceList *source_list)
+setup_dialog (GtkWindow *parent,
+ ESourceSelectorDialog *dialog,
+ ESourceList *source_list)
{
GtkWidget *vbox, *label, *scroll, *hbox, *spacer;
GtkWidget *content_area;
diff --git a/libedataserverui/e-source-selector.c b/libedataserverui/e-source-selector.c
index d8f8333..3ab1c4b 100644
--- a/libedataserverui/e-source-selector.c
+++ b/libedataserverui/e-source-selector.c
@@ -85,13 +85,13 @@ GType e_cell_renderer_safe_toggle_get_type (void);
G_DEFINE_TYPE (ECellRendererSafeToggle, e_cell_renderer_safe_toggle, GTK_TYPE_CELL_RENDERER_TOGGLE)
static gboolean
-safe_toggle_activate (GtkCellRenderer *cell,
- GdkEvent *event,
- GtkWidget *widget,
- const gchar *path,
- const GdkRectangle *background_area,
- const GdkRectangle *cell_area,
- GtkCellRendererState flags)
+safe_toggle_activate (GtkCellRenderer *cell,
+ GdkEvent *event,
+ GtkWidget *widget,
+ const gchar *path,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
+ GtkCellRendererState flags)
{
if (event->type == GDK_BUTTON_PRESS && cell_area) {
cairo_region_t *region;
@@ -319,7 +319,8 @@ find_source (ESourceSelector *selector,
* Compares sources by name.
**/
static gint
-compare_source_names (gconstpointer a, gconstpointer b)
+compare_source_names (gconstpointer a,
+ gconstpointer b)
{
const gchar *name_a;
const gchar *name_b;
@@ -362,8 +363,8 @@ rebuild_model (ESourceSelector *selector)
path = gtk_tree_row_reference_get_path (row_ref);
if (!path) {
/* skip this, if the reference is not valid any more, like when
- removing a group, which got removed in the previous iteration
- because it had no children */
+ * removing a group, which got removed in the previous iteration
+ * because it had no children */
continue;
}
@@ -506,7 +507,7 @@ on_idle_rebuild_model_callback (ESourceSelector *selector)
static void
list_changed_callback (ESourceList *list,
- ESourceSelector *selector)
+ ESourceSelector *selector)
{
ESourceSelectorPrivate *priv = selector->priv;
@@ -519,10 +520,10 @@ list_changed_callback (ESourceList *list,
static void
toggle_cell_data_func (GtkTreeViewColumn *column,
- GtkCellRenderer *renderer,
- GtkTreeModel *model,
- GtkTreeIter *iter,
- ESourceSelector *selector)
+ GtkCellRenderer *renderer,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ ESourceSelector *selector)
{
gpointer data;
@@ -549,10 +550,10 @@ toggle_cell_data_func (GtkTreeViewColumn *column,
static void
text_cell_data_func (GtkTreeViewColumn *column,
- GtkCellRenderer *renderer,
- GtkTreeModel *model,
- GtkTreeIter *iter,
- ESourceSelector *selector)
+ GtkCellRenderer *renderer,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ ESourceSelector *selector)
{
gpointer data;
@@ -586,10 +587,10 @@ text_cell_data_func (GtkTreeViewColumn *column,
static void
pixbuf_cell_data_func (GtkTreeViewColumn *column,
- GtkCellRenderer *renderer,
- GtkTreeModel *model,
- GtkTreeIter *iter,
- ESourceSelector *selector)
+ GtkCellRenderer *renderer,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ ESourceSelector *selector)
{
gpointer data;
@@ -1483,7 +1484,7 @@ e_source_selector_free_selection (GSList *list)
**/
void
e_source_selector_show_selection (ESourceSelector *selector,
- gboolean show)
+ gboolean show)
{
GtkTreeModel *model;
diff --git a/libedataserverui/e-tree-model-generator.c b/libedataserverui/e-tree-model-generator.c
index bf84fee..9269d17 100644
--- a/libedataserverui/e-tree-model-generator.c
+++ b/libedataserverui/e-tree-model-generator.c
@@ -248,7 +248,8 @@ e_tree_model_generator_init (ETreeModelGenerator *tree_model_generator)
* ------------------ */
static void
-row_deleted (ETreeModelGenerator *tree_model_generator, GtkTreePath *path)
+row_deleted (ETreeModelGenerator *tree_model_generator,
+ GtkTreePath *path)
{
g_assert (path);
@@ -257,7 +258,8 @@ row_deleted (ETreeModelGenerator *tree_model_generator, GtkTreePath *path)
}
static void
-row_inserted (ETreeModelGenerator *tree_model_generator, GtkTreePath *path)
+row_inserted (ETreeModelGenerator *tree_model_generator,
+ GtkTreePath *path)
{
GtkTreeIter iter;
@@ -272,7 +274,8 @@ row_inserted (ETreeModelGenerator *tree_model_generator, GtkTreePath *path)
}
static void
-row_changed (ETreeModelGenerator *tree_model_generator, GtkTreePath *path)
+row_changed (ETreeModelGenerator *tree_model_generator,
+ GtkTreePath *path)
{
GtkTreeIter iter;
@@ -291,7 +294,9 @@ row_changed (ETreeModelGenerator *tree_model_generator, GtkTreePath *path)
* -------------------- */
static gint
-generated_offset_to_child_offset (GArray *group, gint offset, gint *internal_offset)
+generated_offset_to_child_offset (GArray *group,
+ gint offset,
+ gint *internal_offset)
{
gboolean success = FALSE;
gint accum_offset = 0;
@@ -318,7 +323,8 @@ generated_offset_to_child_offset (GArray *group, gint offset, gint *internal_off
}
static gint
-child_offset_to_generated_offset (GArray *group, gint offset)
+child_offset_to_generated_offset (GArray *group,
+ gint offset)
{
gint accum_offset = 0;
gint i;
@@ -374,8 +380,10 @@ append_node (GArray *group)
}
static GArray *
-build_node_map (ETreeModelGenerator *tree_model_generator, GtkTreeIter *parent_iter,
- GArray *parent_group, gint parent_index)
+build_node_map (ETreeModelGenerator *tree_model_generator,
+ GtkTreeIter *parent_iter,
+ GArray *parent_group,
+ gint parent_index)
{
GArray *group;
GtkTreeIter iter;
@@ -415,7 +423,8 @@ build_node_map (ETreeModelGenerator *tree_model_generator, GtkTreeIter *parent_i
}
static gint
-get_first_visible_index_from (GArray *group, gint index)
+get_first_visible_index_from (GArray *group,
+ gint index)
{
gint i;
@@ -433,7 +442,9 @@ get_first_visible_index_from (GArray *group, gint index)
}
static Node *
-get_node_by_child_path (ETreeModelGenerator *tree_model_generator, GtkTreePath *path, GArray **node_group)
+get_node_by_child_path (ETreeModelGenerator *tree_model_generator,
+ GtkTreePath *path,
+ GArray **node_group)
{
Node *node = NULL;
GArray *group;
@@ -466,7 +477,8 @@ get_node_by_child_path (ETreeModelGenerator *tree_model_generator, GtkTreePath *
}
static Node *
-create_node_at_child_path (ETreeModelGenerator *tree_model_generator, GtkTreePath *path)
+create_node_at_child_path (ETreeModelGenerator *tree_model_generator,
+ GtkTreePath *path)
{
GtkTreePath *parent_path;
gint parent_index;
@@ -556,7 +568,8 @@ dump_group (GArray *group)
)
static void
-delete_node_at_child_path (ETreeModelGenerator *tree_model_generator, GtkTreePath *path)
+delete_node_at_child_path (ETreeModelGenerator *tree_model_generator,
+ GtkTreePath *path)
{
GtkTreePath *parent_path;
GArray *parent_group;
@@ -607,7 +620,9 @@ delete_node_at_child_path (ETreeModelGenerator *tree_model_generator, GtkTreePat
}
static void
-child_row_changed (ETreeModelGenerator *tree_model_generator, GtkTreePath *path, GtkTreeIter *iter)
+child_row_changed (ETreeModelGenerator *tree_model_generator,
+ GtkTreePath *path,
+ GtkTreeIter *iter)
{
GtkTreePath *generated_path;
Node *node;
@@ -649,7 +664,9 @@ child_row_changed (ETreeModelGenerator *tree_model_generator, GtkTreePath *path,
}
static void
-child_row_inserted (ETreeModelGenerator *tree_model_generator, GtkTreePath *path, GtkTreeIter *iter)
+child_row_inserted (ETreeModelGenerator *tree_model_generator,
+ GtkTreePath *path,
+ GtkTreeIter *iter)
{
GtkTreePath *generated_path;
Node *node;
@@ -680,7 +697,8 @@ child_row_inserted (ETreeModelGenerator *tree_model_generator, GtkTreePath *path
}
static void
-child_row_deleted (ETreeModelGenerator *tree_model_generator, GtkTreePath *path)
+child_row_deleted (ETreeModelGenerator *tree_model_generator,
+ GtkTreePath *path)
{
GtkTreePath *generated_path;
Node *node;
@@ -755,8 +773,9 @@ e_tree_model_generator_get_model (ETreeModelGenerator *tree_model_generator)
**/
void
e_tree_model_generator_set_generate_func (ETreeModelGenerator *tree_model_generator,
- ETreeModelGeneratorGenerateFunc func,
- gpointer data, GDestroyNotify destroy)
+ ETreeModelGeneratorGenerateFunc func,
+ gpointer data,
+ GDestroyNotify destroy)
{
g_return_if_fail (E_IS_TREE_MODEL_GENERATOR (tree_model_generator));
@@ -778,8 +797,9 @@ e_tree_model_generator_set_generate_func (ETreeModelGenerator *tree_model_genera
**/
void
e_tree_model_generator_set_modify_func (ETreeModelGenerator *tree_model_generator,
- ETreeModelGeneratorModifyFunc func,
- gpointer data, GDestroyNotify destroy)
+ ETreeModelGeneratorModifyFunc func,
+ gpointer data,
+ GDestroyNotify destroy)
{
g_return_if_fail (E_IS_TREE_MODEL_GENERATOR (tree_model_generator));
@@ -798,7 +818,7 @@ e_tree_model_generator_set_modify_func (ETreeModelGenerator *tree_model_generato
**/
GtkTreePath *
e_tree_model_generator_convert_child_path_to_path (ETreeModelGenerator *tree_model_generator,
- GtkTreePath *child_path)
+ GtkTreePath *child_path)
{
GtkTreePath *path;
GArray *group;
@@ -843,8 +863,8 @@ e_tree_model_generator_convert_child_path_to_path (ETreeModelGenerator *tree_mod
**/
void
e_tree_model_generator_convert_child_iter_to_iter (ETreeModelGenerator *tree_model_generator,
- GtkTreeIter *generator_iter,
- GtkTreeIter *child_iter)
+ GtkTreeIter *generator_iter,
+ GtkTreeIter *child_iter)
{
GtkTreePath *path;
GArray *group;
@@ -890,7 +910,7 @@ e_tree_model_generator_convert_child_iter_to_iter (ETreeModelGenerator *tree_mod
**/
GtkTreePath *
e_tree_model_generator_convert_path_to_child_path (ETreeModelGenerator *tree_model_generator,
- GtkTreePath *generator_path)
+ GtkTreePath *generator_path)
{
GtkTreePath *path;
GArray *group;
@@ -937,9 +957,9 @@ e_tree_model_generator_convert_path_to_child_path (ETreeModelGenerator *tree_mod
**/
void
e_tree_model_generator_convert_iter_to_child_iter (ETreeModelGenerator *tree_model_generator,
- GtkTreeIter *child_iter,
- gint *permutation_n,
- GtkTreeIter *generator_iter)
+ GtkTreeIter *child_iter,
+ gint *permutation_n,
+ GtkTreeIter *generator_iter)
{
GtkTreePath *path;
GArray *group;
@@ -999,7 +1019,7 @@ e_tree_model_generator_get_n_columns (GtkTreeModel *tree_model)
static GType
e_tree_model_generator_get_column_type (GtkTreeModel *tree_model,
- gint index)
+ gint index)
{
ETreeModelGenerator *tree_model_generator = E_TREE_MODEL_GENERATOR (tree_model);
@@ -1009,7 +1029,9 @@ e_tree_model_generator_get_column_type (GtkTreeModel *tree_model,
}
static gboolean
-e_tree_model_generator_get_iter (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePath *path)
+e_tree_model_generator_get_iter (GtkTreeModel *tree_model,
+ GtkTreeIter *iter,
+ GtkTreePath *path)
{
ETreeModelGenerator *tree_model_generator = E_TREE_MODEL_GENERATOR (tree_model);
GArray *group;
@@ -1047,7 +1069,7 @@ e_tree_model_generator_get_iter (GtkTreeModel *tree_model, GtkTreeIter *iter, Gt
static GtkTreePath *
e_tree_model_generator_get_path (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+ GtkTreeIter *iter)
{
ETreeModelGenerator *tree_model_generator = E_TREE_MODEL_GENERATOR (tree_model);
GtkTreePath *path;
@@ -1083,8 +1105,8 @@ e_tree_model_generator_get_path (GtkTreeModel *tree_model,
}
static gboolean
-e_tree_model_generator_iter_next (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+e_tree_model_generator_iter_next (GtkTreeModel *tree_model,
+ GtkTreeIter *iter)
{
ETreeModelGenerator *tree_model_generator = E_TREE_MODEL_GENERATOR (tree_model);
Node *node;
@@ -1111,8 +1133,8 @@ e_tree_model_generator_iter_next (GtkTreeModel *tree_model,
static gboolean
e_tree_model_generator_iter_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent)
+ GtkTreeIter *iter,
+ GtkTreeIter *parent)
{
ETreeModelGenerator *tree_model_generator = E_TREE_MODEL_GENERATOR (tree_model);
Node *node;
@@ -1149,7 +1171,7 @@ e_tree_model_generator_iter_children (GtkTreeModel *tree_model,
static gboolean
e_tree_model_generator_iter_has_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+ GtkTreeIter *iter)
{
ETreeModelGenerator *tree_model_generator = E_TREE_MODEL_GENERATOR (tree_model);
Node *node;
@@ -1184,7 +1206,7 @@ e_tree_model_generator_iter_has_child (GtkTreeModel *tree_model,
static gint
e_tree_model_generator_iter_n_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+ GtkTreeIter *iter)
{
ETreeModelGenerator *tree_model_generator = E_TREE_MODEL_GENERATOR (tree_model);
Node *node;
@@ -1212,9 +1234,9 @@ e_tree_model_generator_iter_n_children (GtkTreeModel *tree_model,
static gboolean
e_tree_model_generator_iter_nth_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent,
- gint n)
+ GtkTreeIter *iter,
+ GtkTreeIter *parent,
+ gint n)
{
ETreeModelGenerator *tree_model_generator = E_TREE_MODEL_GENERATOR (tree_model);
Node *node;
@@ -1253,8 +1275,8 @@ e_tree_model_generator_iter_nth_child (GtkTreeModel *tree_model,
static gboolean
e_tree_model_generator_iter_parent (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *child)
+ GtkTreeIter *iter,
+ GtkTreeIter *child)
{
ETreeModelGenerator *tree_model_generator = E_TREE_MODEL_GENERATOR (tree_model);
Node *node;
@@ -1281,9 +1303,9 @@ e_tree_model_generator_iter_parent (GtkTreeModel *tree_model,
static void
e_tree_model_generator_get_value (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- gint column,
- GValue *value)
+ GtkTreeIter *iter,
+ gint column,
+ GValue *value)
{
ETreeModelGenerator *tree_model_generator = E_TREE_MODEL_GENERATOR (tree_model);
GtkTreeIter child_iter;
diff --git a/tests/libebook/client/client-test-utils.c b/tests/libebook/client/client-test-utils.c
index 004587f..710ba25 100644
--- a/tests/libebook/client/client-test-utils.c
+++ b/tests/libebook/client/client-test-utils.c
@@ -5,7 +5,8 @@
#include "client-test-utils.h"
void
-report_error (const gchar *operation, GError **error)
+report_error (const gchar *operation,
+ GError **error)
{
g_return_if_fail (operation != NULL);
@@ -107,7 +108,8 @@ static GMainLoop *loop = NULL;
static gint main_stop_result = 0;
static void
-do_start (GThreadFunc func, gpointer data)
+do_start (GThreadFunc func,
+ gpointer data)
{
main_initialize ();
@@ -125,11 +127,11 @@ do_start (GThreadFunc func, gpointer data)
}
/* Starts new main-loop, but just before that calls 'func'.
- Main-loop is kept running, and this function blocks,
- until call of stop_main_loop ().
-*/
+ * Main-loop is kept running, and this function blocks,
+ * until call of stop_main_loop (). */
void
-start_main_loop (GThreadFunc func, gpointer data)
+start_main_loop (GThreadFunc func,
+ gpointer data)
{
g_return_if_fail (loop == NULL);
@@ -137,11 +139,11 @@ start_main_loop (GThreadFunc func, gpointer data)
}
/* Starts new main-loop and then invokes func in a new thread.
- Main-loop is kept running, and this function blocks,
- until call of stop_main_loop ().
-*/
+ * Main-loop is kept running, and this function blocks,
+ * until call of stop_main_loop (). */
void
-start_in_thread_with_main_loop (GThreadFunc func, gpointer data)
+start_in_thread_with_main_loop (GThreadFunc func,
+ gpointer data)
{
struct IdleData *idle;
@@ -161,11 +163,11 @@ start_in_thread_with_main_loop (GThreadFunc func, gpointer data)
}
/* Starts new main-loop and then invokes func in an idle callback.
- Main-loop is kept running, and this function blocks,
- until call of stop_main_loop ().
-*/
+ * Main-loop is kept running, and this function blocks,
+ * until call of stop_main_loop (). */
void
-start_in_idle_with_main_loop (GThreadFunc func, gpointer data)
+start_in_idle_with_main_loop (GThreadFunc func,
+ gpointer data)
{
struct IdleData *idle;
@@ -185,7 +187,7 @@ start_in_idle_with_main_loop (GThreadFunc func, gpointer data)
}
/* Stops main-loop previously run by start_main_loop,
- start_in_thread_with_main_loop or start_in_idle_with_main_loop.
+ * start_in_thread_with_main_loop or start_in_idle_with_main_loop.
*/
void
stop_main_loop (gint stop_result)
@@ -273,7 +275,8 @@ foreach_configured_source_async_start (ESource **source)
}
gboolean
-foreach_configured_source_async_next (gpointer *foreach_async_data, ESource **source)
+foreach_configured_source_async_next (gpointer *foreach_async_data,
+ ESource **source)
{
struct ForeachConfiguredData *async_data;
@@ -353,7 +356,7 @@ new_vcard_from_test_case (const gchar *case_name)
{
gchar *filename;
gchar *case_filename;
- GFile* file;
+ GFile * file;
GError *error = NULL;
gchar *vcard;
@@ -374,7 +377,8 @@ new_vcard_from_test_case (const gchar *case_name)
}
static gboolean
-contacts_are_equal_shallow (EContact *a, EContact *b)
+contacts_are_equal_shallow (EContact *a,
+ EContact *b)
{
const gchar *uid_a, *uid_b;
@@ -393,7 +397,9 @@ contacts_are_equal_shallow (EContact *a, EContact *b)
}
gboolean
-add_contact_from_test_case_verify (EBookClient *book_client, const gchar *case_name, EContact **contact)
+add_contact_from_test_case_verify (EBookClient *book_client,
+ const gchar *case_name,
+ EContact **contact)
{
gchar *vcard;
EContact *contact_orig;
@@ -433,7 +439,8 @@ add_contact_from_test_case_verify (EBookClient *book_client, const gchar *case_n
}
gboolean
-add_contact_verify (EBookClient *book_client, EContact *contact)
+add_contact_verify (EBookClient *book_client,
+ EContact *contact)
{
EContact *contact_final;
gchar *uid;
diff --git a/tests/libebook/client/test-client-add-contact.c b/tests/libebook/client/test-client-add-contact.c
index 24b3de1..fb66f18 100644
--- a/tests/libebook/client/test-client-add-contact.c
+++ b/tests/libebook/client/test-client-add-contact.c
@@ -6,7 +6,9 @@
#include "client-test-utils.h"
static void
-add_contact_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+add_contact_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
GError *error = NULL;
gchar *uid;
@@ -23,7 +25,8 @@ add_contact_cb (GObject *source_object, GAsyncResult *result, gpointer user_data
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBookClient *book_client;
GError *error = NULL;
diff --git a/tests/libebook/client/test-client-async.c b/tests/libebook/client/test-client-async.c
index 3e01758..d6b730f 100644
--- a/tests/libebook/client/test-client-async.c
+++ b/tests/libebook/client/test-client-async.c
@@ -7,7 +7,9 @@
#include "client-test-utils.h"
static void
-print_all_uids_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+print_all_uids_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
EBookClient *book_client;
GSList *uids = NULL, *u;
@@ -35,7 +37,9 @@ print_all_uids_cb (GObject *source_object, GAsyncResult *result, gpointer user_d
}
static void
-print_all_emails_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+print_all_emails_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
EBookClient *book_client;
EBookQuery *query;
@@ -86,7 +90,9 @@ print_all_emails (EBookClient *book_client)
}
static void
-print_email_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+print_email_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
EBookClient *book_client;
EContact *contact = NULL;
@@ -113,7 +119,9 @@ print_one_email (EBookClient *book_client)
}
static void
-client_loaded_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+client_loaded_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
EBookClient *book_client;
GError *error = NULL;
@@ -132,7 +140,8 @@ client_loaded_cb (GObject *source_object, GAsyncResult *result, gpointer user_da
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBookClient *book_client;
GError *error = NULL;
diff --git a/tests/libebook/client/test-client-examine.c b/tests/libebook/client/test-client-examine.c
index edd92fd..1124d50 100644
--- a/tests/libebook/client/test-client-examine.c
+++ b/tests/libebook/client/test-client-examine.c
@@ -46,7 +46,9 @@ extra_values_free (ExtraValues *evals)
}
static void
-print_each_property (gpointer prop_name, gpointer prop_value, gpointer user_data)
+print_each_property (gpointer prop_name,
+ gpointer prop_value,
+ gpointer user_data)
{
g_return_if_fail (prop_name != NULL);
@@ -79,7 +81,8 @@ print_each_property (gpointer prop_name, gpointer prop_value, gpointer user_data
}
static void
-print_values (const ExtraValues *evals, EClient *client)
+print_values (const ExtraValues *evals,
+ EClient *client)
{
const GSList *values;
@@ -179,7 +182,9 @@ continue_next_source (gpointer async_data)
}
static void
-client_got_backend_property_async (GObject *source_object, GAsyncResult *result, gpointer user_data)
+client_got_backend_property_async (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ExtraValues *evals = user_data;
gchar *prop_value = NULL;
@@ -217,7 +222,9 @@ client_got_backend_property_async (GObject *source_object, GAsyncResult *result,
}
static void
-client_set_backend_property_async (GObject *source_object, GAsyncResult *result, gpointer user_data)
+client_set_backend_property_async (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ExtraValues *evals = user_data;
GError *error = NULL;
@@ -241,7 +248,9 @@ client_set_backend_property_async (GObject *source_object, GAsyncResult *result,
}
static void
-client_opened_async (GObject *source_object, GAsyncResult *result, gpointer async_data)
+client_opened_async (GObject *source_object,
+ GAsyncResult *result,
+ gpointer async_data)
{
ExtraValues *evals;
GError *error = NULL;
@@ -384,7 +393,8 @@ worker_thread (gpointer unused)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
main_initialize ();
diff --git a/tests/libebook/client/test-client-get-contact.c b/tests/libebook/client/test-client-get-contact.c
index 7a8e0b7..e46ad42 100644
--- a/tests/libebook/client/test-client-get-contact.c
+++ b/tests/libebook/client/test-client-get-contact.c
@@ -6,7 +6,9 @@
#include "client-test-utils.h"
static void
-contact_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+contact_ready_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
EContact *contact;
GError *error = NULL;
@@ -21,7 +23,8 @@ contact_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_da
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBookClient *book_client;
EContact *contact_final;
diff --git a/tests/libebook/client/test-client-get-view.c b/tests/libebook/client/test-client-get-view.c
index de7829f..eef85ef 100644
--- a/tests/libebook/client/test-client-get-view.c
+++ b/tests/libebook/client/test-client-get-view.c
@@ -7,7 +7,8 @@
#include "client-test-utils.h"
static void
-objects_added (EBookClientView *view, const GSList *contacts)
+objects_added (EBookClientView *view,
+ const GSList *contacts)
{
const GSList *l;
@@ -17,7 +18,8 @@ objects_added (EBookClientView *view, const GSList *contacts)
}
static void
-objects_removed (EBookClientView *view, const GSList *ids)
+objects_removed (EBookClientView *view,
+ const GSList *ids)
{
const GSList *l;
@@ -27,7 +29,8 @@ objects_removed (EBookClientView *view, const GSList *ids)
}
static void
-complete (EBookClientView *view, const GError *error)
+complete (EBookClientView *view,
+ const GError *error)
{
e_book_client_view_stop (view, NULL);
g_object_unref (view);
@@ -54,7 +57,9 @@ setup_and_start_view (EBookClientView *view)
}
static void
-get_view_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+get_view_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
EBookClientView *view;
GError *error = NULL;
@@ -117,7 +122,8 @@ call_get_view (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBookClient *book_client;
EBookQuery *query;
diff --git a/tests/libebook/client/test-client-modify-contact.c b/tests/libebook/client/test-client-modify-contact.c
index 309e370..9705176 100644
--- a/tests/libebook/client/test-client-modify-contact.c
+++ b/tests/libebook/client/test-client-modify-contact.c
@@ -32,7 +32,9 @@ verify_modify (EContact *contact)
}
static void
-contact_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+contact_ready_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
EContact *contact;
GError *error = NULL;
@@ -51,7 +53,9 @@ contact_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_da
}
static void
-contact_modified_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+contact_modified_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
EContact *contact = user_data;
GError *error = NULL;
@@ -66,7 +70,8 @@ contact_modified_cb (GObject *source_object, GAsyncResult *result, gpointer user
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBookClient *book_client;
GError *error = NULL;
diff --git a/tests/libebook/client/test-client-nonexistent-id.c b/tests/libebook/client/test-client-nonexistent-id.c
index 058bf94..9dd229e 100644
--- a/tests/libebook/client/test-client-nonexistent-id.c
+++ b/tests/libebook/client/test-client-nonexistent-id.c
@@ -5,7 +5,8 @@
#include "client-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
GError *error = NULL;
EBookClient *book_client = NULL;
diff --git a/tests/libebook/client/test-client-refresh.c b/tests/libebook/client/test-client-refresh.c
index 37db6df..c624502 100644
--- a/tests/libebook/client/test-client-refresh.c
+++ b/tests/libebook/client/test-client-refresh.c
@@ -23,7 +23,9 @@ test_sync (EBookClient *book_client)
/* asynchronous callback with a main-loop running */
static void
-async_refresh_result_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_refresh_result_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
EBookClient *book_client;
GError *error = NULL;
@@ -75,7 +77,8 @@ test_sync_in_thread (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBookClient *book_client;
GError *error = NULL;
diff --git a/tests/libebook/client/test-client-remove-contact-by-uid.c b/tests/libebook/client/test-client-remove-contact-by-uid.c
index b55615a..d18be19 100644
--- a/tests/libebook/client/test-client-remove-contact-by-uid.c
+++ b/tests/libebook/client/test-client-remove-contact-by-uid.c
@@ -5,7 +5,9 @@
#include "client-test-utils.h"
static void
-remove_contact_by_uid_cb (GObject *source_object, GAsyncResult *result, gpointer uid)
+remove_contact_by_uid_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer uid)
{
GError *error = NULL;
EContact *contact = NULL;
@@ -29,7 +31,8 @@ remove_contact_by_uid_cb (GObject *source_object, GAsyncResult *result, gpointer
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBookClient *book_client;
GError *error = NULL;
diff --git a/tests/libebook/client/test-client-remove-contact.c b/tests/libebook/client/test-client-remove-contact.c
index f944684..904a2e4 100644
--- a/tests/libebook/client/test-client-remove-contact.c
+++ b/tests/libebook/client/test-client-remove-contact.c
@@ -5,7 +5,9 @@
#include "client-test-utils.h"
static void
-remove_contact_cb (GObject *source_object, GAsyncResult *result, gpointer uid)
+remove_contact_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer uid)
{
GError *error = NULL;
EContact *contact = NULL;
@@ -29,7 +31,8 @@ remove_contact_cb (GObject *source_object, GAsyncResult *result, gpointer uid)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBookClient *book_client;
GError *error = NULL;
diff --git a/tests/libebook/client/test-client-remove-contacts.c b/tests/libebook/client/test-client-remove-contacts.c
index 49c4dd1..e915c75 100644
--- a/tests/libebook/client/test-client-remove-contacts.c
+++ b/tests/libebook/client/test-client-remove-contacts.c
@@ -5,7 +5,8 @@
#include "client-test-utils.h"
static gboolean
-check_removed (EBookClient *book_client, const GSList *uids)
+check_removed (EBookClient *book_client,
+ const GSList *uids)
{
g_return_val_if_fail (book_client != NULL, FALSE);
g_return_val_if_fail (uids != NULL, FALSE);
@@ -31,7 +32,8 @@ check_removed (EBookClient *book_client, const GSList *uids)
}
static gboolean
-fill_book_client (EBookClient *book_client, GSList **uids)
+fill_book_client (EBookClient *book_client,
+ GSList **uids)
{
EContact *contact;
@@ -56,7 +58,9 @@ fill_book_client (EBookClient *book_client, GSList **uids)
}
static void
-remove_contacts_cb (GObject *source_object, GAsyncResult *result, gpointer uids)
+remove_contacts_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer uids)
{
GError *error = NULL;
@@ -70,7 +74,8 @@ remove_contacts_cb (GObject *source_object, GAsyncResult *result, gpointer uids)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBookClient *book_client;
GError *error = NULL;
diff --git a/tests/libebook/client/test-client-remove.c b/tests/libebook/client/test-client-remove.c
index a463f4b..c42611a 100644
--- a/tests/libebook/client/test-client-remove.c
+++ b/tests/libebook/client/test-client-remove.c
@@ -6,7 +6,9 @@
#include "client-test-utils.h"
static void
-client_removed_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+client_removed_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
GError *error = NULL;
@@ -19,7 +21,8 @@ client_removed_cb (GObject *source_object, GAsyncResult *result, gpointer user_d
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBookClient *book_client;
GError *error = NULL;
diff --git a/tests/libebook/client/test-client-revision-view.c b/tests/libebook/client/test-client-revision-view.c
index afca643..42ebd97 100644
--- a/tests/libebook/client/test-client-revision-view.c
+++ b/tests/libebook/client/test-client-revision-view.c
@@ -26,7 +26,7 @@ add_contact (EBookClient *client)
}
static gboolean
-setup_book (EBookClient **book_out)
+setup_book (EBookClient **book_out)
{
GError *error = NULL;
gint i;
@@ -83,7 +83,8 @@ finish_test (EBookClientView *view)
}
static void
-objects_added (EBookClientView *view, const GSList *contacts)
+objects_added (EBookClientView *view,
+ const GSList *contacts)
{
const GSList *l;
@@ -103,7 +104,8 @@ objects_added (EBookClientView *view, const GSList *contacts)
}
static void
-objects_removed (EBookClientView *view, const GSList *ids)
+objects_removed (EBookClientView *view,
+ const GSList *ids)
{
const GSList *l;
@@ -113,7 +115,8 @@ objects_removed (EBookClientView *view, const GSList *ids)
}
static void
-complete (EBookClientView *view, const GError *error)
+complete (EBookClientView *view,
+ const GError *error)
{
/* Now add a contact and assert that we received notification */
loading_view = FALSE;
@@ -148,7 +151,9 @@ setup_and_start_view (EBookClientView *view)
}
static void
-get_view_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+get_view_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
EBookClientView *view;
GError *error = NULL;
@@ -185,7 +190,8 @@ call_get_view (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBookClient *book_client;
EBookQuery *query;
diff --git a/tests/libebook/client/test-client-search.c b/tests/libebook/client/test-client-search.c
index f9b0c81..0b9386a 100644
--- a/tests/libebook/client/test-client-search.c
+++ b/tests/libebook/client/test-client-search.c
@@ -7,7 +7,8 @@
#include "client-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBookClient *book_client;
const gchar *query_string;
diff --git a/tests/libebook/client/test-client-self.c b/tests/libebook/client/test-client-self.c
index f0867a1..fa2ed48 100644
--- a/tests/libebook/client/test-client-self.c
+++ b/tests/libebook/client/test-client-self.c
@@ -6,7 +6,8 @@
#include "client-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBookClient *book_client = NULL;
EContact *contact = NULL;
diff --git a/tests/libebook/client/test-client-stress-factory--fifo.c b/tests/libebook/client/test-client-stress-factory--fifo.c
index 240142c..4084c11 100644
--- a/tests/libebook/client/test-client-stress-factory--fifo.c
+++ b/tests/libebook/client/test-client-stress-factory--fifo.c
@@ -8,7 +8,8 @@
#define NUM_CLIENTS 200
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBookClient *book_clients[NUM_CLIENTS];
GError *error = NULL;
diff --git a/tests/libebook/client/test-client-stress-factory--serial.c b/tests/libebook/client/test-client-stress-factory--serial.c
index 7a76ae5..9fd8899 100644
--- a/tests/libebook/client/test-client-stress-factory--serial.c
+++ b/tests/libebook/client/test-client-stress-factory--serial.c
@@ -7,7 +7,8 @@
#define NUM_CLIENTS 200
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
GError *error = NULL;
gint ii;
diff --git a/tests/libebook/client/test-client-stress-factory--single-book.c b/tests/libebook/client/test-client-stress-factory--single-book.c
index ea134b7..561190f 100644
--- a/tests/libebook/client/test-client-stress-factory--single-book.c
+++ b/tests/libebook/client/test-client-stress-factory--single-book.c
@@ -8,7 +8,8 @@
#define NUM_OPENS 200
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gchar *uri = NULL;
EBookClient *book_client;
diff --git a/tests/libebook/client/test-client-stress-views.c b/tests/libebook/client/test-client-stress-views.c
index e6638da..f919f19 100644
--- a/tests/libebook/client/test-client-stress-views.c
+++ b/tests/libebook/client/test-client-stress-views.c
@@ -9,7 +9,8 @@
#define NUM_VIEWS 200
static void
-objects_added (EBookClientView *view, const GSList *contacts)
+objects_added (EBookClientView *view,
+ const GSList *contacts)
{
const GSList *l;
@@ -19,7 +20,8 @@ objects_added (EBookClientView *view, const GSList *contacts)
}
static void
-objects_removed (EBookClientView *view, const GSList *ids)
+objects_removed (EBookClientView *view,
+ const GSList *ids)
{
const GSList *l;
@@ -29,13 +31,15 @@ objects_removed (EBookClientView *view, const GSList *ids)
}
static void
-complete (EBookClientView *view, const GError *error)
+complete (EBookClientView *view,
+ const GError *error)
{
printf ("view_complete (status == %d, error_msg == %s%s%s)\n", error ? error->code : 0, error ? "'" : "", error ? error->message : "NULL", error ? "'" : "");
}
static gint
-stress_book_views (EBookClient *book_client, gboolean in_thread)
+stress_book_views (EBookClient *book_client,
+ gboolean in_thread)
{
EBookQuery *query;
EBookClientView *view = NULL;
@@ -95,7 +99,8 @@ stress_book_views_thread (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBookClient *book_client;
GError *error = NULL;
diff --git a/tests/libebook/client/test-client-uid-only-view.c b/tests/libebook/client/test-client-uid-only-view.c
index 1dc2783..dbcc4a6 100644
--- a/tests/libebook/client/test-client-uid-only-view.c
+++ b/tests/libebook/client/test-client-uid-only-view.c
@@ -44,7 +44,7 @@ add_contact (EBookClient *client)
}
static gboolean
-setup_book (EBookClient **book_out)
+setup_book (EBookClient **book_out)
{
GError *error = NULL;
gint i, j;
@@ -147,7 +147,8 @@ finish_test (EBookClientView *view)
}
static void
-objects_added (EBookClientView *view, const GSList *contacts)
+objects_added (EBookClientView *view,
+ const GSList *contacts)
{
const GSList *l;
@@ -171,7 +172,8 @@ objects_added (EBookClientView *view, const GSList *contacts)
}
static void
-objects_removed (EBookClientView *view, const GSList *ids)
+objects_removed (EBookClientView *view,
+ const GSList *ids)
{
const GSList *l;
@@ -181,7 +183,8 @@ objects_removed (EBookClientView *view, const GSList *ids)
}
static void
-complete (EBookClientView *view, const GError *error)
+complete (EBookClientView *view,
+ const GError *error)
{
/* Now add a contact and assert that we received notification */
loading_view = FALSE;
@@ -217,7 +220,9 @@ setup_and_start_view (EBookClientView *view)
}
static void
-get_view_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+get_view_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
EBookClientView *view;
GError *error = NULL;
@@ -254,7 +259,8 @@ call_get_view (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBookClient *book_client;
EBookQuery *query;
diff --git a/tests/libebook/client/test-client.c b/tests/libebook/client/test-client.c
index 5866bc4..4d98005 100644
--- a/tests/libebook/client/test-client.c
+++ b/tests/libebook/client/test-client.c
@@ -92,7 +92,8 @@ print_one_email (EBookClient *book_client)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBookClient *book_client;
diff --git a/tests/libebook/ebook-test-utils.c b/tests/libebook/ebook-test-utils.c
index 5a24e8c..7b9c074 100644
--- a/tests/libebook/ebook-test-utils.c
+++ b/tests/libebook/ebook-test-utils.c
@@ -8,7 +8,7 @@
void
test_print (const gchar *format,
- ...)
+ ...)
{
va_list args;
const gchar *debug_string;
@@ -34,7 +34,7 @@ gboolean
ebook_test_utils_callback_quit (gpointer user_data)
{
EBookTestClosure *closure = user_data;
- g_main_loop_quit ((GMainLoop*) closure->user_data);
+ g_main_loop_quit ((GMainLoop *) closure->user_data);
return FALSE;
}
@@ -44,7 +44,7 @@ ebook_test_utils_new_vcard_from_test_case (const gchar *case_name)
{
gchar *filename;
gchar *case_filename;
- GFile* file;
+ GFile * file;
GError *error = NULL;
gchar *vcard;
@@ -65,9 +65,9 @@ ebook_test_utils_new_vcard_from_test_case (const gchar *case_name)
}
gchar *
-ebook_test_utils_book_add_contact_from_test_case_verify (EBook *book,
- const gchar *case_name,
- EContact **contact)
+ebook_test_utils_book_add_contact_from_test_case_verify (EBook *book,
+ const gchar *case_name,
+ EContact **contact)
{
gchar *vcard;
EContact *contact_orig;
@@ -111,7 +111,7 @@ ebook_test_utils_contacts_are_equal_shallow (EContact *a,
}
const gchar *
-ebook_test_utils_book_add_contact (EBook *book,
+ebook_test_utils_book_add_contact (EBook *book,
EContact *contact)
{
GError *error = NULL;
@@ -129,9 +129,9 @@ ebook_test_utils_book_add_contact (EBook *book,
}
static void
-add_contact_cb (EBook *book,
- const GError *error,
- const gchar *uid,
+add_contact_cb (EBook *book,
+ const GError *error,
+ const gchar *uid,
EBookTestClosure *closure)
{
if (error) {
@@ -149,10 +149,10 @@ add_contact_cb (EBook *book,
}
void
-ebook_test_utils_book_async_add_contact (EBook *book,
- EContact *contact,
- GSourceFunc callback,
- gpointer user_data)
+ebook_test_utils_book_async_add_contact (EBook *book,
+ EContact *contact,
+ GSourceFunc callback,
+ gpointer user_data)
{
EBookTestClosure *closure;
@@ -167,7 +167,7 @@ ebook_test_utils_book_async_add_contact (EBook *book,
}
void
-ebook_test_utils_book_commit_contact (EBook *book,
+ebook_test_utils_book_commit_contact (EBook *book,
EContact *contact)
{
GError *error = NULL;
@@ -185,8 +185,8 @@ ebook_test_utils_book_commit_contact (EBook *book,
}
static void
-commit_contact_cb (EBook *book,
- const GError *error,
+commit_contact_cb (EBook *book,
+ const GError *error,
EBookTestClosure *closure)
{
if (error) {
@@ -204,10 +204,10 @@ commit_contact_cb (EBook *book,
}
void
-ebook_test_utils_book_async_commit_contact (EBook *book,
- EContact *contact,
- GSourceFunc callback,
- gpointer user_data)
+ebook_test_utils_book_async_commit_contact (EBook *book,
+ EContact *contact,
+ GSourceFunc callback,
+ gpointer user_data)
{
EBookTestClosure *closure;
@@ -221,8 +221,8 @@ ebook_test_utils_book_async_commit_contact (EBook *book,
}
}
-EContact*
-ebook_test_utils_book_get_contact (EBook *book,
+EContact *
+ebook_test_utils_book_get_contact (EBook *book,
const gchar *uid)
{
EContact *contact = NULL;
@@ -241,9 +241,9 @@ ebook_test_utils_book_get_contact (EBook *book,
}
static void
-get_contact_cb (EBook *book,
- const GError *error,
- EContact *contact,
+get_contact_cb (EBook *book,
+ const GError *error,
+ EContact *contact,
EBookTestClosure *closure)
{
const gchar *uid;
@@ -265,10 +265,10 @@ get_contact_cb (EBook *book,
}
void
-ebook_test_utils_book_async_get_contact (EBook *book,
- const gchar *uid,
- GSourceFunc callback,
- gpointer user_data)
+ebook_test_utils_book_async_get_contact (EBook *book,
+ const gchar *uid,
+ GSourceFunc callback,
+ gpointer user_data)
{
EBookTestClosure *closure;
@@ -283,7 +283,7 @@ ebook_test_utils_book_async_get_contact (EBook *book,
}
}
-GList*
+GList *
ebook_test_utils_book_get_required_fields (EBook *book)
{
GList *fields = NULL;
@@ -302,9 +302,9 @@ ebook_test_utils_book_get_required_fields (EBook *book)
}
static void
-get_required_fields_cb (EBook *book,
- const GError *error,
- EList *fields,
+get_required_fields_cb (EBook *book,
+ const GError *error,
+ EList *fields,
EBookTestClosure *closure)
{
if (error) {
@@ -324,9 +324,9 @@ get_required_fields_cb (EBook *book,
}
void
-ebook_test_utils_book_async_get_required_fields (EBook *book,
- GSourceFunc callback,
- gpointer user_data)
+ebook_test_utils_book_async_get_required_fields (EBook *book,
+ GSourceFunc callback,
+ gpointer user_data)
{
EBookTestClosure *closure;
@@ -359,7 +359,7 @@ ebook_test_utils_book_get_static_capabilities (EBook *book)
return caps;
}
-GList*
+GList *
ebook_test_utils_book_get_supported_auth_methods (EBook *book)
{
GList *fields = NULL;
@@ -378,9 +378,9 @@ ebook_test_utils_book_get_supported_auth_methods (EBook *book)
}
static void
-get_supported_auth_methods_cb (EBook *book,
- const GError *error,
- EList *methods,
+get_supported_auth_methods_cb (EBook *book,
+ const GError *error,
+ EList *methods,
EBookTestClosure *closure)
{
if (error) {
@@ -401,9 +401,9 @@ get_supported_auth_methods_cb (EBook *book,
}
void
-ebook_test_utils_book_async_get_supported_auth_methods (EBook *book,
- GSourceFunc callback,
- gpointer user_data)
+ebook_test_utils_book_async_get_supported_auth_methods (EBook *book,
+ GSourceFunc callback,
+ gpointer user_data)
{
EBookTestClosure *closure;
@@ -418,7 +418,7 @@ ebook_test_utils_book_async_get_supported_auth_methods (EBook *book,
}
}
-GList*
+GList *
ebook_test_utils_book_get_supported_fields (EBook *book)
{
GList *fields = NULL;
@@ -437,9 +437,9 @@ ebook_test_utils_book_get_supported_fields (EBook *book)
}
static void
-get_supported_fields_cb (EBook *book,
- const GError *error,
- EList *fields,
+get_supported_fields_cb (EBook *book,
+ const GError *error,
+ EList *fields,
EBookTestClosure *closure)
{
if (error) {
@@ -459,9 +459,9 @@ get_supported_fields_cb (EBook *book,
}
void
-ebook_test_utils_book_async_get_supported_fields (EBook *book,
- GSourceFunc callback,
- gpointer user_data)
+ebook_test_utils_book_async_get_supported_fields (EBook *book,
+ GSourceFunc callback,
+ gpointer user_data)
{
EBookTestClosure *closure;
@@ -477,7 +477,7 @@ ebook_test_utils_book_async_get_supported_fields (EBook *book,
}
void
-ebook_test_utils_book_remove_contact (EBook *book,
+ebook_test_utils_book_remove_contact (EBook *book,
const gchar *uid)
{
GError *error = NULL;
@@ -493,8 +493,8 @@ ebook_test_utils_book_remove_contact (EBook *book,
}
static void
-remove_contact_cb (EBook *book,
- const GError *error,
+remove_contact_cb (EBook *book,
+ const GError *error,
EBookTestClosure *closure)
{
if (error) {
@@ -512,10 +512,10 @@ remove_contact_cb (EBook *book,
}
void
-ebook_test_utils_book_async_remove_contact (EBook *book,
- EContact *contact,
- GSourceFunc callback,
- gpointer user_data)
+ebook_test_utils_book_async_remove_contact (EBook *book,
+ EContact *contact,
+ GSourceFunc callback,
+ gpointer user_data)
{
EBookTestClosure *closure;
@@ -531,8 +531,8 @@ ebook_test_utils_book_async_remove_contact (EBook *book,
}
static void
-remove_contact_by_id_cb (EBook *book,
- const GError *error,
+remove_contact_by_id_cb (EBook *book,
+ const GError *error,
EBookTestClosure *closure)
{
if (error) {
@@ -550,10 +550,10 @@ remove_contact_by_id_cb (EBook *book,
}
void
-ebook_test_utils_book_async_remove_contact_by_id (EBook *book,
- const gchar *uid,
- GSourceFunc callback,
- gpointer user_data)
+ebook_test_utils_book_async_remove_contact_by_id (EBook *book,
+ const gchar *uid,
+ GSourceFunc callback,
+ gpointer user_data)
{
EBookTestClosure *closure;
@@ -585,8 +585,8 @@ ebook_test_utils_book_remove_contacts (EBook *book,
}
static void
-remove_contacts_cb (EBook *book,
- const GError *error,
+remove_contacts_cb (EBook *book,
+ const GError *error,
EBookTestClosure *closure)
{
if (error) {
@@ -604,10 +604,10 @@ remove_contacts_cb (EBook *book,
}
void
-ebook_test_utils_book_async_remove_contacts (EBook *book,
- GList *uids,
- GSourceFunc callback,
- gpointer user_data)
+ebook_test_utils_book_async_remove_contacts (EBook *book,
+ GList *uids,
+ GSourceFunc callback,
+ gpointer user_data)
{
EBookTestClosure *closure;
@@ -622,7 +622,7 @@ ebook_test_utils_book_async_remove_contacts (EBook *book,
}
}
-EBook*
+EBook *
ebook_test_utils_book_new_from_uri (const gchar *uri)
{
EBook *book;
@@ -638,7 +638,7 @@ ebook_test_utils_book_new_from_uri (const gchar *uri)
return book;
}
-EBook*
+EBook *
ebook_test_utils_book_new_temp (gchar **uri)
{
EBook *book;
@@ -667,8 +667,8 @@ ebook_test_utils_book_new_temp (gchar **uri)
}
void
-ebook_test_utils_book_open (EBook *book,
- gboolean only_if_exists)
+ebook_test_utils_book_open (EBook *book,
+ gboolean only_if_exists)
{
GError *error = NULL;
@@ -698,7 +698,9 @@ ebook_test_utils_book_remove (EBook *book)
}
static void
-remove_cb (EBook *book, const GError *error, EBookTestClosure *closure)
+remove_cb (EBook *book,
+ const GError *error,
+ EBookTestClosure *closure)
{
if (error) {
g_warning ("failed to asynchronously remove the book: "
@@ -713,9 +715,9 @@ remove_cb (EBook *book, const GError *error, EBookTestClosure *closure)
}
void
-ebook_test_utils_book_async_remove (EBook *book,
- GSourceFunc callback,
- gpointer user_data)
+ebook_test_utils_book_async_remove (EBook *book,
+ GSourceFunc callback,
+ gpointer user_data)
{
EBookTestClosure *closure;
@@ -729,9 +731,9 @@ ebook_test_utils_book_async_remove (EBook *book,
}
void
-ebook_test_utils_book_get_book_view (EBook *book,
- EBookQuery *query,
- EBookView **view)
+ebook_test_utils_book_get_book_view (EBook *book,
+ EBookQuery *query,
+ EBookView **view)
{
GError *error = NULL;
@@ -747,9 +749,9 @@ ebook_test_utils_book_get_book_view (EBook *book,
}
static void
-get_book_view_cb (EBook *book,
- const GError *error,
- EBookView *view,
+get_book_view_cb (EBook *book,
+ const GError *error,
+ EBookView *view,
EBookTestClosure *closure)
{
if (error) {
@@ -766,10 +768,10 @@ get_book_view_cb (EBook *book,
}
void
-ebook_test_utils_book_async_get_book_view (EBook *book,
- EBookQuery *query,
- GSourceFunc callback,
- gpointer user_data)
+ebook_test_utils_book_async_get_book_view (EBook *book,
+ EBookQuery *query,
+ GSourceFunc callback,
+ gpointer user_data)
{
EBookTestClosure *closure;
diff --git a/tests/libebook/ebook-test-utils.h b/tests/libebook/ebook-test-utils.h
index d9fee50..78c2256 100644
--- a/tests/libebook/ebook-test-utils.h
+++ b/tests/libebook/ebook-test-utils.h
@@ -53,10 +53,10 @@ gboolean
ebook_test_utils_contacts_are_equal_shallow (EContact *a,
EContact *b);
-EBook*
+EBook *
ebook_test_utils_book_new_from_uri (const gchar *uri);
-EBook*
+EBook *
ebook_test_utils_book_new_temp (gchar **uri);
const gchar *
@@ -77,7 +77,7 @@ ebook_test_utils_book_async_commit_contact (EBook *book,
GSourceFunc callback,
gpointer user_data);
-EContact*
+EContact *
ebook_test_utils_book_get_contact (EBook *book,
const gchar *uid);
void
@@ -86,21 +86,21 @@ ebook_test_utils_book_async_get_contact (EBook *book,
GSourceFunc callback,
gpointer user_data);
-GList*
+GList *
ebook_test_utils_book_get_required_fields (EBook *book);
void
ebook_test_utils_book_async_get_required_fields (EBook *book,
GSourceFunc callback,
gpointer user_data);
-GList*
+GList *
ebook_test_utils_book_get_supported_fields (EBook *book);
void
ebook_test_utils_book_async_get_supported_fields (EBook *book,
GSourceFunc callback,
gpointer user_data);
-GList*
+GList *
ebook_test_utils_book_get_supported_auth_methods (EBook *book);
void
ebook_test_utils_book_async_get_supported_auth_methods (EBook *book,
diff --git a/tests/libebook/test-categories.c b/tests/libebook/test-categories.c
index 2b73b6a..49563ea 100644
--- a/tests/libebook/test-categories.c
+++ b/tests/libebook/test-categories.c
@@ -3,7 +3,8 @@
#include <libebook/e-contact.h>
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EContact *contact;
GList *category_list;
diff --git a/tests/libebook/test-changes.c b/tests/libebook/test-changes.c
index a8bc4cf..49a8aac 100644
--- a/tests/libebook/test-changes.c
+++ b/tests/libebook/test-changes.c
@@ -6,14 +6,15 @@
#include "ebook-test-utils.h"
#define NEW_VCARD "BEGIN:VCARD\n\
-X-EVOLUTION-FILE-AS:Toshok, Chris\n\
-FN:Chris Toshok\n\
-EMAIL;INTERNET:toshok ximian com\n\
-ORG:Ximian, Inc.;\n\
-END:VCARD"
+X - EVOLUTION - FILE - AS : Toshok, Chris\n\
+FN : Chris Toshok\n\
+EMAIL; INTERNET : toshok ximian com\n\
+ORG : Ximian, Inc.;\n\
+END : VCARD"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBook *book;
EContact *contact;
diff --git a/tests/libebook/test-date.c b/tests/libebook/test-date.c
index caf90a5..b7ccabf 100644
--- a/tests/libebook/test-date.c
+++ b/tests/libebook/test-date.c
@@ -2,7 +2,8 @@
#include <libebook/e-contact.h>
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EContact *contact;
EContactDate date, *dp;
diff --git a/tests/libebook/test-ebook-add-contact.c b/tests/libebook/test-ebook-add-contact.c
index 7fb19ab..1cc86a5 100644
--- a/tests/libebook/test-ebook-add-contact.c
+++ b/tests/libebook/test-ebook-add-contact.c
@@ -6,7 +6,8 @@
#include "ebook-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBook *book;
GMainLoop *loop;
diff --git a/tests/libebook/test-ebook-async.c b/tests/libebook/test-ebook-async.c
index 1e6d23d..7ea42a8 100644
--- a/tests/libebook/test-ebook-async.c
+++ b/tests/libebook/test-ebook-async.c
@@ -26,7 +26,10 @@ print_email (EContact *contact)
}
static void
-print_all_emails_cb (EBook *book, const GError *error, GList *contacts, gpointer closure)
+print_all_emails_cb (EBook *book,
+ const GError *error,
+ GList *contacts,
+ gpointer closure)
{
GList *c;
@@ -56,7 +59,10 @@ print_all_emails (EBook *book)
}
static void
-print_email_cb (EBook *book, const GError *error, EContact *contact, gpointer closure)
+print_email_cb (EBook *book,
+ const GError *error,
+ EContact *contact,
+ gpointer closure)
{
if (!error)
print_email (contact);
@@ -74,7 +80,9 @@ print_one_email (EBook *book)
}
static void
-book_loaded_cb (EBook *book, const GError *error, gpointer data)
+book_loaded_cb (EBook *book,
+ const GError *error,
+ gpointer data)
{
if (error) {
g_warning ("%s: Got error %d (%s)", G_STRFUNC, error->code, error->message);
@@ -86,7 +94,8 @@ book_loaded_cb (EBook *book, const GError *error, gpointer data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBook *book;
diff --git a/tests/libebook/test-ebook-commit-contact.c b/tests/libebook/test-ebook-commit-contact.c
index 4f93fe7..a04e37a 100644
--- a/tests/libebook/test-ebook-commit-contact.c
+++ b/tests/libebook/test-ebook-commit-contact.c
@@ -41,13 +41,14 @@ commit_verify_cb (EBookTestClosure *closure)
contact = ebook_test_utils_book_get_contact (book, uid);
verify_commit (contact);
- g_main_loop_quit ((GMainLoop*) (closure->user_data));
+ g_main_loop_quit ((GMainLoop *) (closure->user_data));
return FALSE;
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
GMainLoop *loop;
EContact *contact;
diff --git a/tests/libebook/test-ebook-get-book-view.c b/tests/libebook/test-ebook-get-book-view.c
index 9cd4a00..9dec7e4 100644
--- a/tests/libebook/test-ebook-get-book-view.c
+++ b/tests/libebook/test-ebook-get-book-view.c
@@ -27,27 +27,31 @@ print_contact (EContact *contact)
}
static void
-contacts_added (EBookView *book_view, const GList *contacts)
+contacts_added (EBookView *book_view,
+ const GList *contacts)
{
GList *l;
- for (l = (GList*) contacts; l; l = l->next) {
+ for (l = (GList *) contacts; l; l = l->next) {
print_contact (l->data);
}
}
static void
-contacts_removed (EBookView *book_view, const GList *ids)
+contacts_removed (EBookView *book_view,
+ const GList *ids)
{
GList *l;
- for (l = (GList*) ids; l; l = l->next) {
+ for (l = (GList *) ids; l; l = l->next) {
test_print ("Removed contact: %s\n", (gchar *)l->data);
}
}
static void
-view_complete (EBookView *book_view, EBookViewStatus status, const gchar *error_msg)
+view_complete (EBookView *book_view,
+ EBookViewStatus status,
+ const gchar *error_msg)
{
e_book_view_stop (book_view);
g_object_unref (book_view);
@@ -73,7 +77,7 @@ get_book_view_cb (EBookTestClosure *closure)
}
static void
-setup_book (EBook **book_out)
+setup_book (EBook **book_out)
{
EBook *book;
@@ -88,7 +92,8 @@ setup_book (EBook **book_out)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBook *book;
EBookQuery *query;
diff --git a/tests/libebook/test-ebook-get-contact.c b/tests/libebook/test-ebook-get-contact.c
index 72c5961..d476022 100644
--- a/tests/libebook/test-ebook-get-contact.c
+++ b/tests/libebook/test-ebook-get-contact.c
@@ -6,7 +6,8 @@
#include "ebook-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBook *book;
GMainLoop *loop;
diff --git a/tests/libebook/test-ebook-get-required-fields.c b/tests/libebook/test-ebook-get-required-fields.c
index 0739f73..f66ac55 100644
--- a/tests/libebook/test-ebook-get-required-fields.c
+++ b/tests/libebook/test-ebook-get-required-fields.c
@@ -6,8 +6,8 @@
#include "ebook-test-utils.h"
static void
-list_member_print_and_free (gchar *member,
- gpointer user_data)
+list_member_print_and_free (gchar *member,
+ gpointer user_data)
{
test_print (" %s\n", member);
g_free (member);
@@ -33,11 +33,12 @@ get_required_fields_cb (EBookTestClosure *closure)
g_object_unref (closure->list);
- g_main_loop_quit ((GMainLoop*) (closure->user_data));
+ g_main_loop_quit ((GMainLoop *) (closure->user_data));
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBook *book;
GMainLoop *loop;
diff --git a/tests/libebook/test-ebook-get-static-capabilities.c b/tests/libebook/test-ebook-get-static-capabilities.c
index d225e04..fe553eb 100644
--- a/tests/libebook/test-ebook-get-static-capabilities.c
+++ b/tests/libebook/test-ebook-get-static-capabilities.c
@@ -6,7 +6,8 @@
#include "ebook-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBook *book;
const gchar *caps;
diff --git a/tests/libebook/test-ebook-get-supported-auth-methods.c b/tests/libebook/test-ebook-get-supported-auth-methods.c
index 5f4e6f1..49f05f1 100644
--- a/tests/libebook/test-ebook-get-supported-auth-methods.c
+++ b/tests/libebook/test-ebook-get-supported-auth-methods.c
@@ -6,8 +6,8 @@
#include "ebook-test-utils.h"
static void
-list_member_print_and_free (gchar *member,
- gpointer user_data)
+list_member_print_and_free (gchar *member,
+ gpointer user_data)
{
test_print (" %s\n", member);
g_free (member);
@@ -33,11 +33,12 @@ get_supported_auth_methods_cb (EBookTestClosure *closure)
g_object_unref (closure->list);
- g_main_loop_quit ((GMainLoop*) (closure->user_data));
+ g_main_loop_quit ((GMainLoop *) (closure->user_data));
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBook *book;
GMainLoop *loop;
diff --git a/tests/libebook/test-ebook-get-supported-fields.c b/tests/libebook/test-ebook-get-supported-fields.c
index 9df99dc..7213235 100644
--- a/tests/libebook/test-ebook-get-supported-fields.c
+++ b/tests/libebook/test-ebook-get-supported-fields.c
@@ -6,8 +6,8 @@
#include "ebook-test-utils.h"
static void
-list_member_print_and_free (gchar *member,
- gpointer user_data)
+list_member_print_and_free (gchar *member,
+ gpointer user_data)
{
test_print (" %s\n", member);
g_free (member);
@@ -33,11 +33,12 @@ get_supported_fields_cb (EBookTestClosure *closure)
g_object_unref (closure->list);
- g_main_loop_quit ((GMainLoop*) (closure->user_data));
+ g_main_loop_quit ((GMainLoop *) (closure->user_data));
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBook *book;
GMainLoop *loop;
diff --git a/tests/libebook/test-ebook-remove-contact-by-id.c b/tests/libebook/test-ebook-remove-contact-by-id.c
index d1d73ae..35bc3ac 100644
--- a/tests/libebook/test-ebook-remove-contact-by-id.c
+++ b/tests/libebook/test-ebook-remove-contact-by-id.c
@@ -5,7 +5,8 @@
#include "ebook-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBook *book;
GMainLoop *loop;
diff --git a/tests/libebook/test-ebook-remove-contact.c b/tests/libebook/test-ebook-remove-contact.c
index bdb8985..4c0f9a0 100644
--- a/tests/libebook/test-ebook-remove-contact.c
+++ b/tests/libebook/test-ebook-remove-contact.c
@@ -5,7 +5,8 @@
#include "ebook-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBook *book;
GMainLoop *loop;
diff --git a/tests/libebook/test-ebook-remove-contacts.c b/tests/libebook/test-ebook-remove-contacts.c
index 7caacb5..1e26917 100644
--- a/tests/libebook/test-ebook-remove-contacts.c
+++ b/tests/libebook/test-ebook-remove-contacts.c
@@ -5,7 +5,8 @@
#include "ebook-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBook *book;
GMainLoop *loop;
diff --git a/tests/libebook/test-ebook-remove.c b/tests/libebook/test-ebook-remove.c
index c3d4671..978df54 100644
--- a/tests/libebook/test-ebook-remove.c
+++ b/tests/libebook/test-ebook-remove.c
@@ -6,7 +6,8 @@
#include "ebook-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBook *book;
gchar *uri = NULL;
diff --git a/tests/libebook/test-ebook-stress-factory--fifo.c b/tests/libebook/test-ebook-stress-factory--fifo.c
index 6483fdb..f020dba 100644
--- a/tests/libebook/test-ebook-stress-factory--fifo.c
+++ b/tests/libebook/test-ebook-stress-factory--fifo.c
@@ -8,7 +8,8 @@
#define NUM_BOOKS 200
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gchar *uri = NULL;
EBook *books[NUM_BOOKS];
diff --git a/tests/libebook/test-ebook-stress-factory--serial.c b/tests/libebook/test-ebook-stress-factory--serial.c
index 8c19bb7..afbddf6 100644
--- a/tests/libebook/test-ebook-stress-factory--serial.c
+++ b/tests/libebook/test-ebook-stress-factory--serial.c
@@ -7,7 +7,8 @@
#define NUM_BOOKS 200
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gchar *uri = NULL;
gint i;
diff --git a/tests/libebook/test-ebook-stress-factory--single-book.c b/tests/libebook/test-ebook-stress-factory--single-book.c
index 53848b3..136113f 100644
--- a/tests/libebook/test-ebook-stress-factory--single-book.c
+++ b/tests/libebook/test-ebook-stress-factory--single-book.c
@@ -8,7 +8,8 @@
#define NUM_OPENS 200
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gchar *uri = NULL;
EBook *book;
@@ -20,7 +21,7 @@ main (gint argc, gchar **argv)
g_object_unref (book);
/* open and close the same book repeatedly */
- for (i = 0; i < NUM_OPENS-1; i++) {
+ for (i = 0; i < NUM_OPENS - 1; i++) {
book = ebook_test_utils_book_new_from_uri (uri);
ebook_test_utils_book_open (book, FALSE);
g_object_unref (book);
diff --git a/tests/libebook/test-ebook.c b/tests/libebook/test-ebook.c
index 4211f20..2383364 100644
--- a/tests/libebook/test-ebook.c
+++ b/tests/libebook/test-ebook.c
@@ -71,7 +71,8 @@ print_one_email (EBook *book)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBook *book;
diff --git a/tests/libebook/test-photo.c b/tests/libebook/test-photo.c
index 6e94137..e4cd2af 100644
--- a/tests/libebook/test-photo.c
+++ b/tests/libebook/test-photo.c
@@ -24,7 +24,8 @@ static const gchar *photo_data =
"VdTW3rgwvsUpSvAFKUoAUxSlAClKUAKUpQB//2Q==";
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EContact *contact;
EContactPhoto *photo, *new_photo;
diff --git a/tests/libebook/test-query.c b/tests/libebook/test-query.c
index 44b593d..05232dc 100644
--- a/tests/libebook/test-query.c
+++ b/tests/libebook/test-query.c
@@ -12,7 +12,8 @@ static const gchar * queries[] = {
};
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gint i;
gboolean failure = FALSE;
diff --git a/tests/libebook/test-search.c b/tests/libebook/test-search.c
index 4dcd0ed..cf309d0 100644
--- a/tests/libebook/test-search.c
+++ b/tests/libebook/test-search.c
@@ -4,7 +4,8 @@
#include <libebook/e-book.h>
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBook *book;
gboolean status;
diff --git a/tests/libebook/test-self.c b/tests/libebook/test-self.c
index a40dc50..0a875ac 100644
--- a/tests/libebook/test-self.c
+++ b/tests/libebook/test-self.c
@@ -4,7 +4,8 @@
#include <libebook/e-book.h>
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBook *book;
EContact *contact;
diff --git a/tests/libebook/test-stress-bookviews.c b/tests/libebook/test-stress-bookviews.c
index fa81f26..1048813 100644
--- a/tests/libebook/test-stress-bookviews.c
+++ b/tests/libebook/test-stress-bookviews.c
@@ -23,33 +23,38 @@ print_contact (EContact *contact)
}
static void
-contacts_added (EBookView *book_view, const GList *contacts)
+contacts_added (EBookView *book_view,
+ const GList *contacts)
{
GList *l;
- for (l = (GList*) contacts; l; l = l->next) {
+ for (l = (GList *) contacts; l; l = l->next) {
print_contact (l->data);
}
}
static void
-contacts_removed (EBookView *book_view, const GList *ids)
+contacts_removed (EBookView *book_view,
+ const GList *ids)
{
GList *l;
- for (l = (GList*) ids; l; l = l->next) {
+ for (l = (GList *) ids; l; l = l->next) {
printf ("Removed contact: %s\n", (gchar *)l->data);
}
}
static void
-view_complete (EBookView *book_view, EBookViewStatus status, const gchar *error_msg)
+view_complete (EBookView *book_view,
+ EBookViewStatus status,
+ const gchar *error_msg)
{
printf ("view_complete (status == %d, error_msg == %s%s%s)\n", status, error_msg ? "'" : "", error_msg ? error_msg : "NULL", error_msg ? "'" : "");
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EBook *book;
gboolean status;
diff --git a/tests/libebook/test-string.c b/tests/libebook/test-string.c
index b958eac..bd46aff 100644
--- a/tests/libebook/test-string.c
+++ b/tests/libebook/test-string.c
@@ -5,7 +5,8 @@
#define TEST_ID "test-uid"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EContact *contact;
diff --git a/tests/libebook/test-undefinedfield.c b/tests/libebook/test-undefinedfield.c
index 03a393b..538b791 100644
--- a/tests/libebook/test-undefinedfield.c
+++ b/tests/libebook/test-undefinedfield.c
@@ -2,7 +2,8 @@
#include <libebook/e-contact.h>
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EContact *contact;
gpointer test;
diff --git a/tests/libebook/test-untyped-phones.c b/tests/libebook/test-untyped-phones.c
index c5ef691..24c5c33 100644
--- a/tests/libebook/test-untyped-phones.c
+++ b/tests/libebook/test-untyped-phones.c
@@ -3,26 +3,28 @@
#include <libebook/e-contact.h>
/* TEL;WORK:... should map to PHONE_BUSINESS
- TEL;FAX:... should map to OTHER_FAX. */
+ * TEL;FAX:... should map to OTHER_FAX. */
#define VCARD \
-"BEGIN:vCard\r\n\
-VERSION:3.0\r\n\
-X-EVOLUTION-FILE-AS:test\\, 40013\r\n\
-FN:40013 test\r\n\
-N:40013;test;;;\r\n\
-TEL;VOICE:456-456-4567\r\n\
-TEL;WORK:123-123-1234\r\n\
-TEL;FAX:321-321-4321\r\n\
-END:vCard"
+"BEGIN : vCard\r\n\
+VERSION : 3.0\r\n\
+X - EVOLUTION - FILE - AS : test\\, 40013\r\n\
+FN : 40013 test\r\n\
+N : 40013; test;;;\r\n\
+TEL; VOICE : 456 - 456 - 4567\r\n\
+TEL; WORK : 123 - 123 - 1234\r\n\
+TEL; FAX : 321 - 321 - 4321\r\n\
+END : vCard"
static void
-check (gboolean test, const gchar *msg)
+check (gboolean test,
+ const gchar *msg)
{
printf ("%s - %s\n", test ? "passed" : "failed", msg);
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
EContact *contact;
const gchar *phone;
diff --git a/tests/libebook/vcard/dump-vcard.c b/tests/libebook/vcard/dump-vcard.c
index 307d34e..d79ce65 100644
--- a/tests/libebook/vcard/dump-vcard.c
+++ b/tests/libebook/vcard/dump-vcard.c
@@ -4,7 +4,8 @@
#include <libebook/e-vcard.h>
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
FILE *fp;
EVCard *vcard;
diff --git a/tests/libecal/client/client-test-utils.c b/tests/libecal/client/client-test-utils.c
index 6a774dc..c6f7062 100644
--- a/tests/libecal/client/client-test-utils.c
+++ b/tests/libecal/client/client-test-utils.c
@@ -44,7 +44,8 @@ print_icomp (icalcomponent *icalcomp)
}
void
-report_error (const gchar *operation, GError **error)
+report_error (const gchar *operation,
+ GError **error)
{
g_return_if_fail (operation != NULL);
@@ -103,7 +104,8 @@ static GMainLoop *loop = NULL;
static gint main_stop_result = 0;
static void
-do_start (GThreadFunc func, gpointer data)
+do_start (GThreadFunc func,
+ gpointer data)
{
main_initialize ();
@@ -121,11 +123,11 @@ do_start (GThreadFunc func, gpointer data)
}
/* Starts new main-loop, but just before that calls 'func'.
- Main-loop is kept running, and this function blocks,
- until call of stop_main_loop ().
-*/
+ * Main-loop is kept running, and this function blocks,
+ * until call of stop_main_loop (). */
void
-start_main_loop (GThreadFunc func, gpointer data)
+start_main_loop (GThreadFunc func,
+ gpointer data)
{
g_return_if_fail (loop == NULL);
@@ -133,11 +135,11 @@ start_main_loop (GThreadFunc func, gpointer data)
}
/* Starts new main-loop and then invokes func in a new thread.
- Main-loop is kept running, and this function blocks,
- until call of stop_main_loop ().
-*/
+ * Main-loop is kept running, and this function blocks,
+ * until call of stop_main_loop (). */
void
-start_in_thread_with_main_loop (GThreadFunc func, gpointer data)
+start_in_thread_with_main_loop (GThreadFunc func,
+ gpointer data)
{
struct IdleData *idle;
@@ -157,11 +159,11 @@ start_in_thread_with_main_loop (GThreadFunc func, gpointer data)
}
/* Starts new main-loop and then invokes func in an idle callback.
- Main-loop is kept running, and this function blocks,
- until call of stop_main_loop ().
-*/
+ * Main-loop is kept running, and this function blocks,
+ * until call of stop_main_loop (). */
void
-start_in_idle_with_main_loop (GThreadFunc func, gpointer data)
+start_in_idle_with_main_loop (GThreadFunc func,
+ gpointer data)
{
struct IdleData *idle;
@@ -181,7 +183,7 @@ start_in_idle_with_main_loop (GThreadFunc func, gpointer data)
}
/* Stops main-loop previously run by start_main_loop,
- start_in_thread_with_main_loop or start_in_idle_with_main_loop.
+ * start_in_thread_with_main_loop or start_in_idle_with_main_loop.
*/
void
stop_main_loop (gint stop_result)
@@ -200,7 +202,9 @@ get_main_loop_stop_result (void)
}
void
-foreach_configured_source (ECalClientSourceType source_type, void (*func) (ESource *source, ECalClientSourceType source_type))
+foreach_configured_source (ECalClientSourceType source_type,
+ void (*func) (ESource *source,
+ ECalClientSourceType source_type))
{
gpointer foreach_async_data;
ESource *source = NULL;
@@ -227,7 +231,8 @@ struct ForeachConfiguredData
};
gpointer
-foreach_configured_source_async_start (ECalClientSourceType source_type, ESource **source)
+foreach_configured_source_async_start (ECalClientSourceType source_type,
+ ESource **source)
{
struct ForeachConfiguredData *async_data;
ESourceList *source_list = NULL;
@@ -271,7 +276,8 @@ foreach_configured_source_async_start (ECalClientSourceType source_type, ESource
}
gboolean
-foreach_configured_source_async_next (gpointer *foreach_async_data, ESource **source)
+foreach_configured_source_async_next (gpointer *foreach_async_data,
+ ESource **source)
{
struct ForeachConfiguredData *async_data;
@@ -321,7 +327,8 @@ foreach_configured_source_async_get_source_type (gpointer foreach_async_data)
}
ECalClient *
-new_temp_client (ECalClientSourceType source_type, gchar **uri)
+new_temp_client (ECalClientSourceType source_type,
+ gchar **uri)
{
ECalClient *cal_client;
ESource *source;
diff --git a/tests/libecal/client/test-client-add-timezone.c b/tests/libecal/client/test-client-add-timezone.c
index ece2391..0ca13ba 100644
--- a/tests/libecal/client/test-client-add-timezone.c
+++ b/tests/libecal/client/test-client-add-timezone.c
@@ -10,7 +10,8 @@
#define TZNAME_NEW "Ex Wye Zee"
static gboolean
-test_zones (icaltimezone *zone1, icaltimezone *zone2)
+test_zones (icaltimezone *zone1,
+ icaltimezone *zone2)
{
if (!zone2) {
g_printerr ("Failure: get timezone returned NULL\n");
@@ -76,7 +77,9 @@ test_sync (icaltimezone *zone)
/* asynchronous read callback with a main-loop running */
static void
-async_read_result_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_read_result_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -107,7 +110,9 @@ async_read_result_ready (GObject *source_object, GAsyncResult *result, gpointer
/* asynchronous write callback with a main-loop running */
static void
-async_write_result_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_write_result_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -175,7 +180,8 @@ test_sync_in_thread (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
icalproperty *property;
icalcomponent *component;
diff --git a/tests/libecal/client/test-client-create-object.c b/tests/libecal/client/test-client-create-object.c
index 3cb8fa5..5ae6e7f 100644
--- a/tests/libecal/client/test-client-create-object.c
+++ b/tests/libecal/client/test-client-create-object.c
@@ -7,7 +7,8 @@
#include "client-test-utils.h"
static gboolean
-test_icalcomps (icalcomponent *icalcomp1, icalcomponent *icalcomp2)
+test_icalcomps (icalcomponent *icalcomp1,
+ icalcomponent *icalcomp2)
{
struct icaltimetype t1, t2;
@@ -121,7 +122,9 @@ test_sync (icalcomponent *icalcomp)
/* asynchronous read2 callback with a main-loop running */
static void
-async_read2_result_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_read2_result_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -164,7 +167,9 @@ async_read2_result_ready (GObject *source_object, GAsyncResult *result, gpointer
/* asynchronous read callback with a main-loop running */
static void
-async_read_result_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_read_result_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -191,7 +196,9 @@ async_read_result_ready (GObject *source_object, GAsyncResult *result, gpointer
/* asynchronous write callback with a main-loop running */
static void
-async_write_result_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_write_result_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -266,7 +273,8 @@ test_sync_in_thread (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
icalcomponent *icalcomp;
struct icaltimetype now;
diff --git a/tests/libecal/client/test-client-examine.c b/tests/libecal/client/test-client-examine.c
index 43b94db..8151ffe 100644
--- a/tests/libecal/client/test-client-examine.c
+++ b/tests/libecal/client/test-client-examine.c
@@ -50,7 +50,8 @@ extra_values_free (ExtraValues *evals)
}
static void
-print_with_prefix (const gchar *str, const gchar *prefix)
+print_with_prefix (const gchar *str,
+ const gchar *prefix)
{
const gchar *p = str, *n;
while (n = strchr (p, '\n'), p) {
@@ -67,7 +68,9 @@ print_with_prefix (const gchar *str, const gchar *prefix)
}
static void
-print_each_property (gpointer prop_name, gpointer prop_value, gpointer user_data)
+print_each_property (gpointer prop_name,
+ gpointer prop_value,
+ gpointer user_data)
{
g_return_if_fail (prop_name != NULL);
@@ -100,7 +103,8 @@ print_each_property (gpointer prop_name, gpointer prop_value, gpointer user_data
}
static void
-print_values (const ExtraValues *evals, EClient *client)
+print_values (const ExtraValues *evals,
+ EClient *client)
{
const GSList *values;
@@ -142,7 +146,8 @@ print_values (const ExtraValues *evals, EClient *client)
}
static void
-identify_source (ESource *source, ECalClientSourceType source_type)
+identify_source (ESource *source,
+ ECalClientSourceType source_type)
{
const gchar *name, *uri, *type;
gchar *abs_uri = NULL;
@@ -225,7 +230,9 @@ continue_next_source (gpointer async_data)
}
static void
-client_got_backend_property_async (GObject *source_object, GAsyncResult *result, gpointer user_data)
+client_got_backend_property_async (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ExtraValues *evals = user_data;
gchar *prop_value = NULL;
@@ -265,7 +272,9 @@ client_got_backend_property_async (GObject *source_object, GAsyncResult *result,
}
static void
-client_set_backend_property_async (GObject *source_object, GAsyncResult *result, gpointer user_data)
+client_set_backend_property_async (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ExtraValues *evals = user_data;
GError *error = NULL;
@@ -289,7 +298,9 @@ client_set_backend_property_async (GObject *source_object, GAsyncResult *result,
}
static void
-client_got_default_object_async (GObject *source_object, GAsyncResult *result, gpointer evals_data)
+client_got_default_object_async (GObject *source_object,
+ GAsyncResult *result,
+ gpointer evals_data)
{
ExtraValues *evals = evals_data;
ECalClient *cal_client;
@@ -310,7 +321,9 @@ client_got_default_object_async (GObject *source_object, GAsyncResult *result, g
}
static void
-client_opened_async (GObject *source_object, GAsyncResult *result, gpointer async_data)
+client_opened_async (GObject *source_object,
+ GAsyncResult *result,
+ gpointer async_data)
{
ExtraValues *evals;
GError *error = NULL;
@@ -339,7 +352,8 @@ client_opened_async (GObject *source_object, GAsyncResult *result, gpointer asyn
}
static void
-check_source_sync (ESource *source, ECalClientSourceType source_type)
+check_source_sync (ESource *source,
+ ECalClientSourceType source_type)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -470,7 +484,8 @@ worker_thread (gpointer unused)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
main_initialize ();
diff --git a/tests/libecal/client/test-client-get-attachment-uris.c b/tests/libecal/client/test-client-get-attachment-uris.c
index 0d9a5ce..2186638 100644
--- a/tests/libecal/client/test-client-get-attachment-uris.c
+++ b/tests/libecal/client/test-client-get-attachment-uris.c
@@ -55,7 +55,9 @@ test_sync (ECalClient *cal_client)
/* asynchronous callback with a main-loop running */
static void
-async_attachment_uris_result_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_attachment_uris_result_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -109,7 +111,8 @@ test_sync_in_thread (gpointer user_data)
}
static void
-add_attach (icalcomponent *icalcomp, const gchar *uri)
+add_attach (icalcomponent *icalcomp,
+ const gchar *uri)
{
gsize buf_size;
gchar *buf;
@@ -130,7 +133,8 @@ add_attach (icalcomponent *icalcomp, const gchar *uri)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECalClient *cal_client;
GError *error = NULL;
diff --git a/tests/libecal/client/test-client-get-free-busy.c b/tests/libecal/client/test-client-get-free-busy.c
index a493c97..bc37b8b 100644
--- a/tests/libecal/client/test-client-get-free-busy.c
+++ b/tests/libecal/client/test-client-get-free-busy.c
@@ -10,7 +10,9 @@
#define USER_EMAIL "user example com"
static void
-free_busy_data_cb (ECalClient *client, const GSList *free_busy, const gchar *func_name)
+free_busy_data_cb (ECalClient *client,
+ const GSList *free_busy,
+ const gchar *func_name)
{
g_print (" Received %d Free/Busy components from %s\n", g_slist_length ((GSList *) free_busy), func_name);
}
@@ -66,7 +68,9 @@ test_sync (void)
/* asynchronous get_free_busy callback with a main-loop running */
static void
-async_get_free_busy_result_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_get_free_busy_result_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -147,7 +151,8 @@ test_sync_in_thread (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
main_initialize ();
diff --git a/tests/libecal/client/test-client-get-object-list.c b/tests/libecal/client/test-client-get-object-list.c
index 0566f2e..74301d0 100644
--- a/tests/libecal/client/test-client-get-object-list.c
+++ b/tests/libecal/client/test-client-get-object-list.c
@@ -58,7 +58,9 @@ test_sync (ECalClient *cal_client)
/* asynchronous callback with a main-loop running */
static void
-async_get_object_list_as_comps_result_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_get_object_list_as_comps_result_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -86,7 +88,9 @@ async_get_object_list_as_comps_result_ready (GObject *source_object, GAsyncResul
/* asynchronous callback with a main-loop running */
static void
-async_get_object_list_result_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_get_object_list_result_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -145,7 +149,8 @@ test_sync_in_thread (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECalClient *cal_client;
GError *error = NULL;
diff --git a/tests/libecal/client/test-client-get-view.c b/tests/libecal/client/test-client-get-view.c
index 2142b22..0537f6c 100644
--- a/tests/libecal/client/test-client-get-view.c
+++ b/tests/libecal/client/test-client-get-view.c
@@ -32,7 +32,9 @@ subtest_passed (SubTestId id)
}
static void
-objects_added_cb (GObject *object, const GSList *objects, gpointer data)
+objects_added_cb (GObject *object,
+ const GSList *objects,
+ gpointer data)
{
const GSList *l;
@@ -43,7 +45,9 @@ objects_added_cb (GObject *object, const GSList *objects, gpointer data)
}
static void
-objects_modified_cb (GObject *object, const GSList *objects, gpointer data)
+objects_modified_cb (GObject *object,
+ const GSList *objects,
+ gpointer data)
{
const GSList *l;
@@ -54,7 +58,9 @@ objects_modified_cb (GObject *object, const GSList *objects, gpointer data)
}
static void
-objects_removed_cb (GObject *object, const GSList *objects, gpointer data)
+objects_removed_cb (GObject *object,
+ const GSList *objects,
+ gpointer data)
{
const GSList *l;
@@ -68,7 +74,9 @@ objects_removed_cb (GObject *object, const GSList *objects, gpointer data)
}
static void
-complete_cb (GObject *object, const GError *error, gpointer data)
+complete_cb (GObject *object,
+ const GError *error,
+ gpointer data)
{
g_print ("View complete (status: %d, error_msg:%s)\n", error ? error->code : 0, error ? error->message : "NULL");
@@ -125,7 +133,9 @@ alter_cal_client (gpointer user_data)
}
static void
-async_get_view_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_get_view_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *cal_client = E_CAL_CLIENT (source_object);
ECalClientView *view = NULL;
@@ -168,7 +178,8 @@ get_view_async (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECalClientView *view = NULL;
ECalClient *cal_client;
diff --git a/tests/libecal/client/test-client-modify-object.c b/tests/libecal/client/test-client-modify-object.c
index f8e9641..9417ef6 100644
--- a/tests/libecal/client/test-client-modify-object.c
+++ b/tests/libecal/client/test-client-modify-object.c
@@ -58,7 +58,9 @@ test_sync (ECalClient *cal_client)
/* asynchronous callback with a main-loop running */
static void
-async_modify_result_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_modify_result_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -135,7 +137,8 @@ test_sync_in_thread (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECalClient *cal_client;
GError *error = NULL;
diff --git a/tests/libecal/client/test-client-open.c b/tests/libecal/client/test-client-open.c
index 4aa3e21..b8284e9 100644
--- a/tests/libecal/client/test-client-open.c
+++ b/tests/libecal/client/test-client-open.c
@@ -34,7 +34,9 @@ test_sync (void)
/* asynchronous remove callback with a main-loop running */
static void
-async_remove_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_remove_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -55,7 +57,9 @@ async_remove_ready (GObject *source_object, GAsyncResult *result, gpointer user_
/* asynchronous open callback with a main-loop running */
static void
-async_open_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_open_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -106,7 +110,8 @@ test_sync_in_thread (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
main_initialize ();
diff --git a/tests/libecal/client/test-client-receive-objects.c b/tests/libecal/client/test-client-receive-objects.c
index 90858f4..fd7fe8f 100644
--- a/tests/libecal/client/test-client-receive-objects.c
+++ b/tests/libecal/client/test-client-receive-objects.c
@@ -44,7 +44,9 @@ test_sync (ECalClient *cal_client)
/* asynchronous callback with a main-loop running */
static void
-async_receive_result_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_receive_result_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -103,7 +105,8 @@ test_sync_in_thread (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECalClient *cal_client;
GError *error = NULL;
diff --git a/tests/libecal/client/test-client-refresh.c b/tests/libecal/client/test-client-refresh.c
index 5ebae91..c52b5e0 100644
--- a/tests/libecal/client/test-client-refresh.c
+++ b/tests/libecal/client/test-client-refresh.c
@@ -24,7 +24,9 @@ test_sync (ECalClient *cal_client)
/* asynchronous callback with a main-loop running */
static void
-async_refresh_result_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_refresh_result_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -76,7 +78,8 @@ test_sync_in_thread (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECalClient *cal_client;
GError *error = NULL;
diff --git a/tests/libecal/client/test-client-remove-object.c b/tests/libecal/client/test-client-remove-object.c
index 6fbd02d..eb5eb3d 100644
--- a/tests/libecal/client/test-client-remove-object.c
+++ b/tests/libecal/client/test-client-remove-object.c
@@ -58,7 +58,9 @@ test_sync (ECalClient *cal_client)
/* asynchronous callback with a main-loop running */
static void
-async_remove_result_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_remove_result_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -117,7 +119,8 @@ test_sync_in_thread (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECalClient *cal_client;
GError *error = NULL;
diff --git a/tests/libecal/client/test-client-send-objects.c b/tests/libecal/client/test-client-send-objects.c
index f8dfb7a..429005b 100644
--- a/tests/libecal/client/test-client-send-objects.c
+++ b/tests/libecal/client/test-client-send-objects.c
@@ -22,7 +22,8 @@ create_object (void)
}
static gboolean
-manage_result (GSList *users, icalcomponent *modified_icalcomp)
+manage_result (GSList *users,
+ icalcomponent *modified_icalcomp)
{
g_print ("Wishes to send to %d users", g_slist_length (users));
if (users) {
@@ -69,7 +70,9 @@ test_sync (ECalClient *cal_client)
/* asynchronous callback with a main-loop running */
static void
-async_send_result_ready (GObject *source_object, GAsyncResult *result, gpointer user_data)
+async_send_result_ready (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *cal_client;
GError *error = NULL;
@@ -130,7 +133,8 @@ test_sync_in_thread (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECalClient *cal_client;
GError *error = NULL;
diff --git a/tests/libecal/client/test-client-stress-factory--fifo.c b/tests/libecal/client/test-client-stress-factory--fifo.c
index 5a9db0a..111d2ad 100644
--- a/tests/libecal/client/test-client-stress-factory--fifo.c
+++ b/tests/libecal/client/test-client-stress-factory--fifo.c
@@ -8,7 +8,8 @@
#define NUM_CLIENTS 200
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECalClientSourceType source_type = E_CAL_CLIENT_SOURCE_TYPE_EVENTS;
ECalClient *cal_clients[NUM_CLIENTS];
diff --git a/tests/libecal/client/test-client-stress-factory--serial.c b/tests/libecal/client/test-client-stress-factory--serial.c
index c178487..1c098db 100644
--- a/tests/libecal/client/test-client-stress-factory--serial.c
+++ b/tests/libecal/client/test-client-stress-factory--serial.c
@@ -7,7 +7,8 @@
#define NUM_CLIENTS 200
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECalClientSourceType source_type = E_CAL_CLIENT_SOURCE_TYPE_EVENTS;
GError *error = NULL;
diff --git a/tests/libecal/client/test-client-stress-factory--single-cal.c b/tests/libecal/client/test-client-stress-factory--single-cal.c
index c82847b..9cb80a8 100644
--- a/tests/libecal/client/test-client-stress-factory--single-cal.c
+++ b/tests/libecal/client/test-client-stress-factory--single-cal.c
@@ -8,7 +8,8 @@
#define NUM_OPENS 200
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECalClientSourceType source_type = E_CAL_CLIENT_SOURCE_TYPE_EVENTS;
gchar *uri = NULL;
diff --git a/tests/libecal/client/test-client-stress-views.c b/tests/libecal/client/test-client-stress-views.c
index 7086b76..b79e21f 100644
--- a/tests/libecal/client/test-client-stress-views.c
+++ b/tests/libecal/client/test-client-stress-views.c
@@ -8,7 +8,8 @@
#define NUM_VIEWS 200
static void
-objects_added (ECalClientView *cal_view, const GSList *objects)
+objects_added (ECalClientView *cal_view,
+ const GSList *objects)
{
const GSList *l;
@@ -18,7 +19,8 @@ objects_added (ECalClientView *cal_view, const GSList *objects)
}
static void
-objects_removed (ECalClientView *view, const GSList *ids)
+objects_removed (ECalClientView *view,
+ const GSList *ids)
{
const GSList *l;
@@ -28,13 +30,15 @@ objects_removed (ECalClientView *view, const GSList *ids)
}
static void
-complete (ECalClientView *view, const GError *error)
+complete (ECalClientView *view,
+ const GError *error)
{
printf ("view_complete (status == %d, error_msg == %s%s%s)\n", error ? error->code : 0, error ? "'" : "", error ? error->message : "NULL", error ? "'" : "");
}
static gint
-stress_cal_views (ECalClient *cal_client, gboolean in_thread)
+stress_cal_views (ECalClient *cal_client,
+ gboolean in_thread)
{
ECalClientView *view = NULL;
ECalClientView *new_view;
@@ -85,7 +89,8 @@ stress_cal_views_thread (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECalClient *cal_client;
GError *error = NULL;
diff --git a/tests/libecal/ecal-test-utils.c b/tests/libecal/ecal-test-utils.c
index eb25a8c..a6b53fd 100644
--- a/tests/libecal/ecal-test-utils.c
+++ b/tests/libecal/ecal-test-utils.c
@@ -27,7 +27,7 @@
void
test_print (const gchar *format,
- ...)
+ ...)
{
va_list args;
const gchar *debug_string;
@@ -49,9 +49,9 @@ test_print (const gchar *format,
}
}
-ECal*
-ecal_test_utils_cal_new_from_uri (const gchar *uri,
- ECalSourceType type)
+ECal *
+ecal_test_utils_cal_new_from_uri (const gchar *uri,
+ ECalSourceType type)
{
ECal *cal;
@@ -63,9 +63,9 @@ ecal_test_utils_cal_new_from_uri (const gchar *uri,
return cal;
}
-ECal*
-ecal_test_utils_cal_new_temp (gchar **uri,
- ECalSourceType type)
+ECal *
+ecal_test_utils_cal_new_temp (gchar **uri,
+ ECalSourceType type)
{
ECal *cal;
gchar *file_template;
@@ -92,8 +92,8 @@ ecal_test_utils_cal_new_temp (gchar **uri,
}
void
-ecal_test_utils_cal_open (ECal *cal,
- gboolean only_if_exists)
+ecal_test_utils_cal_open (ECal *cal,
+ gboolean only_if_exists)
{
GError *error = NULL;
@@ -109,9 +109,9 @@ ecal_test_utils_cal_open (ECal *cal,
}
static void
-open_ex_cb (ECal *cal,
- const GError *error,
- ECalTestClosure *closure)
+open_ex_cb (ECal *cal,
+ const GError *error,
+ ECalTestClosure *closure)
{
if (FALSE) {
} else if (error && error->code == E_CALENDAR_STATUS_BUSY) {
@@ -135,10 +135,10 @@ open_ex_cb (ECal *cal,
}
void
-ecal_test_utils_cal_async_open (ECal *cal,
- gboolean only_if_exists,
- GSourceFunc callback,
- gpointer user_data)
+ecal_test_utils_cal_async_open (ECal *cal,
+ gboolean only_if_exists,
+ GSourceFunc callback,
+ gpointer user_data)
{
ECalTestClosure *closure;
@@ -295,7 +295,7 @@ ecal_test_utils_cal_get_capabilities (ECal *cal)
void
ecal_test_utils_cal_assert_objects_equal_shallow (icalcomponent *a,
- icalcomponent *b)
+ icalcomponent *b)
{
const gchar *uid_a, *uid_b;
@@ -320,7 +320,7 @@ ecal_test_utils_cal_assert_objects_equal_shallow (icalcomponent *a,
void
ecal_test_utils_cal_assert_e_cal_components_equal (ECalComponent *a,
- ECalComponent *b)
+ ECalComponent *b)
{
icalcomponent *ical_a, *ical_b;
ECalComponentTransparency transp_a, transp_b;
@@ -339,9 +339,9 @@ ecal_test_utils_cal_assert_e_cal_components_equal (ECalComponent *a,
g_assert (transp_a == transp_b);
}
-icalcomponent*
-ecal_test_utils_cal_get_object (ECal *cal,
- const gchar *uid)
+icalcomponent *
+ecal_test_utils_cal_get_object (ECal *cal,
+ const gchar *uid)
{
GError *error = NULL;
icalcomponent *component = NULL;
@@ -360,9 +360,9 @@ ecal_test_utils_cal_get_object (ECal *cal,
}
void
-ecal_test_utils_cal_modify_object (ECal *cal,
- icalcomponent *component,
- CalObjModType mod_type)
+ecal_test_utils_cal_modify_object (ECal *cal,
+ icalcomponent *component,
+ CalObjModType mod_type)
{
GError *error = NULL;
@@ -378,8 +378,8 @@ ecal_test_utils_cal_modify_object (ECal *cal,
}
void
-ecal_test_utils_cal_remove_object (ECal *cal,
- const gchar *uid)
+ecal_test_utils_cal_remove_object (ECal *cal,
+ const gchar *uid)
{
GError *error = NULL;
@@ -390,7 +390,7 @@ ecal_test_utils_cal_remove_object (ECal *cal,
test_print ("successfully remoed the icalcomponent object '%s'\n", uid);
}
-icalcomponent*
+icalcomponent *
ecal_test_utils_cal_get_default_object (ECal *cal)
{
GError *error = NULL;
@@ -409,9 +409,9 @@ ecal_test_utils_cal_get_default_object (ECal *cal)
return component;
}
-GList*
-ecal_test_utils_cal_get_object_list (ECal *cal,
- const gchar *query)
+GList *
+ecal_test_utils_cal_get_object_list (ECal *cal,
+ const gchar *query)
{
GError *error = NULL;
GList *objects = NULL;
@@ -425,9 +425,9 @@ ecal_test_utils_cal_get_object_list (ECal *cal,
return objects;
}
-GList*
-ecal_test_utils_cal_get_objects_for_uid (ECal *cal,
- const gchar *uid)
+GList *
+ecal_test_utils_cal_get_objects_for_uid (ECal *cal,
+ const gchar *uid)
{
GError *error = NULL;
GList *objects = NULL;
@@ -442,8 +442,8 @@ ecal_test_utils_cal_get_objects_for_uid (ECal *cal,
}
gchar *
-ecal_test_utils_cal_create_object (ECal *cal,
- icalcomponent *component)
+ecal_test_utils_cal_create_object (ECal *cal,
+ icalcomponent *component)
{
GError *error = NULL;
gchar *uid = NULL;
@@ -468,10 +468,10 @@ ecal_test_utils_cal_create_object (ECal *cal,
}
static void
-cal_set_mode_cb (ECal *cal,
- ECalendarStatus status,
- CalMode mode,
- ECalTestClosure *closure)
+cal_set_mode_cb (ECal *cal,
+ ECalendarStatus status,
+ CalMode mode,
+ ECalTestClosure *closure)
{
if (FALSE) {
} else if (status == E_CALENDAR_STATUS_BUSY) {
@@ -494,10 +494,10 @@ cal_set_mode_cb (ECal *cal,
}
void
-ecal_test_utils_cal_set_mode (ECal *cal,
- CalMode mode,
- GSourceFunc callback,
- gpointer user_data)
+ecal_test_utils_cal_set_mode (ECal *cal,
+ CalMode mode,
+ GSourceFunc callback,
+ gpointer user_data)
{
ECalTestClosure *closure;
@@ -510,14 +510,14 @@ ecal_test_utils_cal_set_mode (ECal *cal,
}
void
-ecal_test_utils_create_component (ECal *cal,
- const gchar *dtstart,
- const gchar *dtstart_tzid,
- const gchar *dtend,
- const gchar *dtend_tzid,
- const gchar *summary,
- ECalComponent **comp_out,
- gchar **uid_out)
+ecal_test_utils_create_component (ECal *cal,
+ const gchar *dtstart,
+ const gchar *dtstart_tzid,
+ const gchar *dtend,
+ const gchar *dtend_tzid,
+ const gchar *summary,
+ ECalComponent **comp_out,
+ gchar **uid_out)
{
ECalComponent *comp;
icalcomponent *icalcomp;
@@ -554,16 +554,16 @@ ecal_test_utils_create_component (ECal *cal,
void
ecal_test_utils_cal_component_set_icalcomponent (ECalComponent *e_component,
- icalcomponent *component)
+ icalcomponent *component)
{
if (!e_cal_component_set_icalcomponent (e_component, component)) {
g_error ("Could not set icalcomponent\n");
}
}
-icaltimezone*
-ecal_test_utils_cal_get_timezone (ECal *cal,
- const gchar *tzid)
+icaltimezone *
+ecal_test_utils_cal_get_timezone (ECal *cal,
+ const gchar *tzid)
{
GError *error = NULL;
icaltimezone *zone = NULL;
@@ -578,8 +578,8 @@ ecal_test_utils_cal_get_timezone (ECal *cal,
}
void
-ecal_test_utils_cal_add_timezone (ECal *cal,
- icaltimezone *zone)
+ecal_test_utils_cal_add_timezone (ECal *cal,
+ icaltimezone *zone)
{
GError *error = NULL;
const gchar *name;
@@ -594,8 +594,8 @@ ecal_test_utils_cal_add_timezone (ECal *cal,
}
void
-ecal_test_utils_cal_set_default_timezone (ECal *cal,
- icaltimezone *zone)
+ecal_test_utils_cal_set_default_timezone (ECal *cal,
+ icaltimezone *zone)
{
GError *error = NULL;
const gchar *name;
@@ -609,11 +609,11 @@ ecal_test_utils_cal_set_default_timezone (ECal *cal,
test_print ("successfully set default icaltimezone '%s'\n", name);
}
-GList*
-ecal_test_utils_cal_get_free_busy (ECal *cal,
- GList *users,
- time_t start,
- time_t end)
+GList *
+ecal_test_utils_cal_get_free_busy (ECal *cal,
+ GList *users,
+ time_t start,
+ time_t end)
{
GList *free_busy = NULL;
GList *l = NULL;
@@ -641,10 +641,10 @@ ecal_test_utils_cal_get_free_busy (ECal *cal,
}
void
-ecal_test_utils_cal_send_objects (ECal *cal,
- icalcomponent *component,
- GList **users,
- icalcomponent **component_final)
+ecal_test_utils_cal_send_objects (ECal *cal,
+ icalcomponent *component,
+ GList **users,
+ icalcomponent **component_final)
{
GList *l = NULL;
GError *error = NULL;
@@ -664,8 +664,8 @@ ecal_test_utils_cal_send_objects (ECal *cal,
}
void
-ecal_test_utils_cal_receive_objects (ECal *cal,
- icalcomponent *component)
+ecal_test_utils_cal_receive_objects (ECal *cal,
+ icalcomponent *component)
{
GError *error = NULL;
@@ -676,9 +676,9 @@ ecal_test_utils_cal_receive_objects (ECal *cal,
test_print ("successfully received the objects\n");
}
-ECalView*
-ecal_test_utils_get_query (ECal *cal,
- const gchar *sexp)
+ECalView *
+ecal_test_utils_get_query (ECal *cal,
+ const gchar *sexp)
{
GError *error = NULL;
ECalView *query = NULL;
diff --git a/tests/libecal/ecal-test-utils.h b/tests/libecal/ecal-test-utils.h
index 16d018a..b70b28e 100644
--- a/tests/libecal/ecal-test-utils.h
+++ b/tests/libecal/ecal-test-utils.h
@@ -35,11 +35,11 @@ void
test_print (const gchar *format,
...);
-ECal*
+ECal *
ecal_test_utils_cal_new_from_uri (const gchar *uri,
ECalSourceType type);
-ECal*
+ECal *
ecal_test_utils_cal_new_temp (gchar **uri,
ECalSourceType type);
@@ -68,7 +68,7 @@ ecal_test_utils_cal_get_ldap_attribute (ECal *cal);
void
ecal_test_utils_cal_get_capabilities (ECal *cal);
-GList*
+GList *
ecal_test_utils_cal_get_free_busy (ECal *cal,
GList *users,
time_t start,
@@ -82,7 +82,7 @@ void
ecal_test_utils_cal_assert_e_cal_components_equal (ECalComponent *a,
ECalComponent *b);
-icalcomponent*
+icalcomponent *
ecal_test_utils_cal_get_object (ECal *cal,
const gchar *uid);
@@ -95,14 +95,14 @@ void
ecal_test_utils_cal_remove_object (ECal *cal,
const gchar *uid);
-icalcomponent*
+icalcomponent *
ecal_test_utils_cal_get_default_object (ECal *cal);
-GList*
+GList *
ecal_test_utils_cal_get_object_list (ECal *cal,
const gchar *query);
-GList*
+GList *
ecal_test_utils_cal_get_objects_for_uid (ECal *cal,
const gchar *uid);
@@ -130,7 +130,7 @@ void
ecal_test_utils_cal_component_set_icalcomponent (ECalComponent *e_component,
icalcomponent *component);
-icaltimezone*
+icaltimezone *
ecal_test_utils_cal_get_timezone (ECal *cal,
const gchar *tzid);
@@ -152,7 +152,7 @@ void
ecal_test_utils_cal_receive_objects (ECal *cal,
icalcomponent *component);
-ECalView*
+ECalView *
ecal_test_utils_get_query (ECal *cal,
const gchar *sexp);
diff --git a/tests/libecal/test-ecal-add-timezone.c b/tests/libecal/test-ecal-add-timezone.c
index 2c034c1..fcd58e6 100644
--- a/tests/libecal/test-ecal-add-timezone.c
+++ b/tests/libecal/test-ecal-add-timezone.c
@@ -10,7 +10,8 @@
#define TZNAME_NEW "Ex Wye Zee"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-create-object--2.c b/tests/libecal/test-ecal-create-object--2.c
index 614e290..60368b7 100644
--- a/tests/libecal/test-ecal-create-object--2.c
+++ b/tests/libecal/test-ecal-create-object--2.c
@@ -9,7 +9,8 @@
#define EVENT_SUMMARY "Creation of new test event"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-create-object.c b/tests/libecal/test-ecal-create-object.c
index e9f2301..d1c1a2d 100644
--- a/tests/libecal/test-ecal-create-object.c
+++ b/tests/libecal/test-ecal-create-object.c
@@ -7,7 +7,8 @@
#include "ecal-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-get-alarm-email-address.c b/tests/libecal/test-ecal-get-alarm-email-address.c
index c9bff46..ab69c3f 100644
--- a/tests/libecal/test-ecal-get-alarm-email-address.c
+++ b/tests/libecal/test-ecal-get-alarm-email-address.c
@@ -6,7 +6,8 @@
#include "ecal-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-get-cal-address.c b/tests/libecal/test-ecal-get-cal-address.c
index 5bd21b6..c20aa29 100644
--- a/tests/libecal/test-ecal-get-cal-address.c
+++ b/tests/libecal/test-ecal-get-cal-address.c
@@ -6,7 +6,8 @@
#include "ecal-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-get-capabilities.c b/tests/libecal/test-ecal-get-capabilities.c
index d81ddb8..6303ef7 100644
--- a/tests/libecal/test-ecal-get-capabilities.c
+++ b/tests/libecal/test-ecal-get-capabilities.c
@@ -6,7 +6,8 @@
#include "ecal-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-get-default-object.c b/tests/libecal/test-ecal-get-default-object.c
index f6ff1e8..1acb9e3 100644
--- a/tests/libecal/test-ecal-get-default-object.c
+++ b/tests/libecal/test-ecal-get-default-object.c
@@ -7,7 +7,8 @@
#include "ecal-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-get-free-busy.c b/tests/libecal/test-ecal-get-free-busy.c
index 796bf98..e18fbc6 100644
--- a/tests/libecal/test-ecal-get-free-busy.c
+++ b/tests/libecal/test-ecal-get-free-busy.c
@@ -8,7 +8,8 @@
#include "ecal-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-get-ldap-attribute.c b/tests/libecal/test-ecal-get-ldap-attribute.c
index 7f1e3c1..56cdb3f 100644
--- a/tests/libecal/test-ecal-get-ldap-attribute.c
+++ b/tests/libecal/test-ecal-get-ldap-attribute.c
@@ -6,7 +6,8 @@
#include "ecal-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-get-object-list.c b/tests/libecal/test-ecal-get-object-list.c
index ad39125..9629975 100644
--- a/tests/libecal/test-ecal-get-object-list.c
+++ b/tests/libecal/test-ecal-get-object-list.c
@@ -9,7 +9,8 @@
#define EVENT_SUMMARY "Creation of new test event"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-get-objects-for-uid.c b/tests/libecal/test-ecal-get-objects-for-uid.c
index a502008..291fc80 100644
--- a/tests/libecal/test-ecal-get-objects-for-uid.c
+++ b/tests/libecal/test-ecal-get-objects-for-uid.c
@@ -7,7 +7,8 @@
#include "ecal-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-get-query.c b/tests/libecal/test-ecal-get-query.c
index ec443ed..cbcf433 100644
--- a/tests/libecal/test-ecal-get-query.c
+++ b/tests/libecal/test-ecal-get-query.c
@@ -42,7 +42,9 @@ subtest_passed (SubTestId id)
}
static void
-objects_added_cb (GObject *object, GList *objects, gpointer data)
+objects_added_cb (GObject *object,
+ GList *objects,
+ gpointer data)
{
GList *l;
@@ -53,7 +55,9 @@ objects_added_cb (GObject *object, GList *objects, gpointer data)
}
static void
-objects_modified_cb (GObject *object, GList *objects, gpointer data)
+objects_modified_cb (GObject *object,
+ GList *objects,
+ gpointer data)
{
GList *l;
@@ -64,7 +68,9 @@ objects_modified_cb (GObject *object, GList *objects, gpointer data)
}
static void
-objects_removed_cb (GObject *object, GList *objects, gpointer data)
+objects_removed_cb (GObject *object,
+ GList *objects,
+ gpointer data)
{
GList *l;
@@ -79,7 +85,10 @@ objects_removed_cb (GObject *object, GList *objects, gpointer data)
}
static void
-view_complete_cb (GObject *object, ECalendarStatus status, const gchar *error_msg, gpointer data)
+view_complete_cb (GObject *object,
+ ECalendarStatus status,
+ const gchar *error_msg,
+ gpointer data)
{
test_print ("View complete (status: %d, error_msg:%s\n", status, error_msg ? error_msg : "NULL");
@@ -146,7 +155,8 @@ alter_cal_cb (ECal *cal)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-get-timezone.c b/tests/libecal/test-ecal-get-timezone.c
index 29399ec..564772a 100644
--- a/tests/libecal/test-ecal-get-timezone.c
+++ b/tests/libecal/test-ecal-get-timezone.c
@@ -7,7 +7,8 @@
#include "ecal-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-modify-object.c b/tests/libecal/test-ecal-modify-object.c
index 52feb52..ca7cd36 100644
--- a/tests/libecal/test-ecal-modify-object.c
+++ b/tests/libecal/test-ecal-modify-object.c
@@ -15,7 +15,8 @@
#define FINAL_BEGIN_TIMEZONE "UTC"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-open.c b/tests/libecal/test-ecal-open.c
index 1748fb8..32cbd94 100644
--- a/tests/libecal/test-ecal-open.c
+++ b/tests/libecal/test-ecal-open.c
@@ -16,7 +16,7 @@ open_complete_cb (ECalTestClosure *closure)
{
g_source_remove (open_timeout_id);
- g_main_loop_quit ((GMainLoop*) closure->user_data);
+ g_main_loop_quit ((GMainLoop *) closure->user_data);
}
static void
@@ -28,7 +28,8 @@ open_timeout_cb (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-receive-objects.c b/tests/libecal/test-ecal-receive-objects.c
index 4721d65..f96c7b4 100644
--- a/tests/libecal/test-ecal-receive-objects.c
+++ b/tests/libecal/test-ecal-receive-objects.c
@@ -7,7 +7,8 @@
#include "ecal-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-remove-object.c b/tests/libecal/test-ecal-remove-object.c
index 1bc9e1c..ffec38f 100644
--- a/tests/libecal/test-ecal-remove-object.c
+++ b/tests/libecal/test-ecal-remove-object.c
@@ -7,7 +7,8 @@
#include "ecal-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-remove.c b/tests/libecal/test-ecal-remove.c
index 2d6b048..ccf14c8 100644
--- a/tests/libecal/test-ecal-remove.c
+++ b/tests/libecal/test-ecal-remove.c
@@ -6,7 +6,8 @@
#include "ecal-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-send-objects.c b/tests/libecal/test-ecal-send-objects.c
index 0670e7b..a5011ca 100644
--- a/tests/libecal/test-ecal-send-objects.c
+++ b/tests/libecal/test-ecal-send-objects.c
@@ -7,7 +7,8 @@
#include "ecal-test-utils.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-set-default-timezone.c b/tests/libecal/test-ecal-set-default-timezone.c
index 98a18de..1cd1d20 100644
--- a/tests/libecal/test-ecal-set-default-timezone.c
+++ b/tests/libecal/test-ecal-set-default-timezone.c
@@ -11,7 +11,8 @@
#define EVENT_SUMMARY "Creation of new test event in the " TZID_NEW " timezone"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-set-mode.c b/tests/libecal/test-ecal-set-mode.c
index ca74049..503af5a 100644
--- a/tests/libecal/test-ecal-set-mode.c
+++ b/tests/libecal/test-ecal-set-mode.c
@@ -22,7 +22,7 @@ cal_set_mode_cb (ECalTestClosure *closure)
MODE_FINAL);
}
- g_main_loop_quit ((GMainLoop*) closure->user_data);
+ g_main_loop_quit ((GMainLoop *) closure->user_data);
}
static void
@@ -34,7 +34,8 @@ cal_set_mode_timeout_cb (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *cal;
gchar *uri = NULL;
diff --git a/tests/libecal/test-ecal-stress-factory--fifo.c b/tests/libecal/test-ecal-stress-factory--fifo.c
index 16a4069..4d75a22 100644
--- a/tests/libecal/test-ecal-stress-factory--fifo.c
+++ b/tests/libecal/test-ecal-stress-factory--fifo.c
@@ -8,7 +8,8 @@
#define NUM_CALS 200
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gchar *uri = NULL;
ECal *cals[NUM_CALS];
diff --git a/tests/libecal/test-ecal-stress-factory--open-async.c b/tests/libecal/test-ecal-stress-factory--open-async.c
index 68b83a7..2eb656b 100644
--- a/tests/libecal/test-ecal-stress-factory--open-async.c
+++ b/tests/libecal/test-ecal-stress-factory--open-async.c
@@ -24,7 +24,7 @@ open_complete_cb (ECalTestClosure *closure)
if (cals_processed == NUM_CALS) {
test_print ("asynchronously opened all calendars successfully\n");
- g_main_loop_quit ((GMainLoop*) closure->user_data);
+ g_main_loop_quit ((GMainLoop *) closure->user_data);
}
}
@@ -36,7 +36,8 @@ open_timeout_cb (gpointer user_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gchar *uri = NULL;
GMainLoop *loop;
diff --git a/tests/libecal/test-ecal-stress-factory--serial.c b/tests/libecal/test-ecal-stress-factory--serial.c
index 9960fb2..97011c1 100644
--- a/tests/libecal/test-ecal-stress-factory--serial.c
+++ b/tests/libecal/test-ecal-stress-factory--serial.c
@@ -8,7 +8,8 @@
#define NUM_CALS 200
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gchar *uri = NULL;
gint i;
diff --git a/tests/libecal/test-ecal-stress-factory--single-cal.c b/tests/libecal/test-ecal-stress-factory--single-cal.c
index a969e6a..8193eb5 100644
--- a/tests/libecal/test-ecal-stress-factory--single-cal.c
+++ b/tests/libecal/test-ecal-stress-factory--single-cal.c
@@ -8,7 +8,8 @@
#define NUM_OPENS 200
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gchar *uri = NULL;
ECal *cal;
@@ -20,7 +21,7 @@ main (gint argc, gchar **argv)
g_object_unref (cal);
/* open and close the same calendar repeatedly */
- for (i = 0; i < NUM_OPENS-1; i++) {
+ for (i = 0; i < NUM_OPENS - 1; i++) {
cal = ecal_test_utils_cal_new_from_uri (uri,
E_CAL_SOURCE_TYPE_EVENT);
ecal_test_utils_cal_open (cal, FALSE);
diff --git a/tests/libecal/test-ecal.c b/tests/libecal/test-ecal.c
index 9831a51..63633e7 100644
--- a/tests/libecal/test-ecal.c
+++ b/tests/libecal/test-ecal.c
@@ -45,7 +45,9 @@ static GMainLoop *loop;
/* Prints a message with a client identifier */
static void
-cl_printf (ECal *client, const gchar *format, ...)
+cl_printf (ECal *client,
+ const gchar *format,
+ ...)
{
va_list args;
@@ -58,7 +60,9 @@ cl_printf (ECal *client, const gchar *format, ...)
}
static void
-objects_added_cb (GObject *object, GList *objects, gpointer data)
+objects_added_cb (GObject *object,
+ GList *objects,
+ gpointer data)
{
GList *l;
@@ -67,7 +71,9 @@ objects_added_cb (GObject *object, GList *objects, gpointer data)
}
static void
-objects_modified_cb (GObject *object, GList *objects, gpointer data)
+objects_modified_cb (GObject *object,
+ GList *objects,
+ gpointer data)
{
GList *l;
@@ -76,7 +82,9 @@ objects_modified_cb (GObject *object, GList *objects, gpointer data)
}
static void
-objects_removed_cb (GObject *object, GList *objects, gpointer data)
+objects_removed_cb (GObject *object,
+ GList *objects,
+ gpointer data)
{
GList *l;
@@ -85,7 +93,10 @@ objects_removed_cb (GObject *object, GList *objects, gpointer data)
}
static void
-view_complete_cb (GObject *object, ECalendarStatus status, const gchar *error_msg, gpointer data)
+view_complete_cb (GObject *object,
+ ECalendarStatus status,
+ const gchar *error_msg,
+ gpointer data)
{
cl_printf (data, "View complete (status:%d, error_msg:%s)\n", status, error_msg ? error_msg : "NULL");
}
@@ -130,7 +141,8 @@ list_uids (ECal *client)
/* Callback used when a client is destroyed */
static void
-client_destroy_cb (gpointer data, GObject *object)
+client_destroy_cb (gpointer data,
+ GObject *object)
{
if (E_CAL (object) == client1)
client1 = NULL;
@@ -142,7 +154,8 @@ client_destroy_cb (gpointer data, GObject *object)
}
static const gchar *
-test_object_creation (ECal *client, gchar **uid)
+test_object_creation (ECal *client,
+ gchar **uid)
{
ECalComponent *comp, *comp_retrieved;
icalcomponent *icalcomp, *icalcomp_retrieved;
@@ -217,7 +230,8 @@ test_object_creation (ECal *client, gchar **uid)
}
static const gchar *
-test_object_modification (ECal *client, gchar *uid)
+test_object_modification (ECal *client,
+ gchar *uid)
{
const gchar *summary = "This summary was modified";
icalcomponent *icalcomp, *icalcomp_modified;
@@ -320,7 +334,8 @@ test_get_alarms_in_range (ECal *client)
}
static const gchar *
-test_set_uri (ECal *client, const gchar *uri)
+test_set_uri (ECal *client,
+ const gchar *uri)
{
/* The uri is set as part of create_client call. This method merely
* verifies it was done correctly.
@@ -348,7 +363,8 @@ test_cal_loaded (ECal *client)
}
static const gchar *
-test_get_source (ECal *client, const gchar *expected)
+test_get_source (ECal *client,
+ const gchar *expected)
{
ESource *source;
gchar *uri;
@@ -367,7 +383,9 @@ test_get_source (ECal *client, const gchar *expected)
}
static const gchar *
-test_query (ECal *client, const gchar *query, gint expected)
+test_query (ECal *client,
+ const gchar *query,
+ gint expected)
{
/* This uses pre-loaded data. Hence its results are valid only
* when called before any write operation is performed.
@@ -387,7 +405,8 @@ test_query (ECal *client, const gchar *query, gint expected)
#if 0
static gchar *
-test_e_cal_new (ECal **cal, const gchar *uri)
+test_e_cal_new (ECal **cal,
+ const gchar *uri)
{
GError *error = NULL;
gchar *cal_uri, *cal_file;
@@ -422,7 +441,8 @@ test_e_cal_new (ECal **cal, const gchar *uri)
}
static gchar *
-test_e_cal_remove (ECal *ecal, const gchar *uri)
+test_e_cal_remove (ECal *ecal,
+ const gchar *uri)
{
gchar *cal_uri;
GError *error = NULL;
@@ -561,30 +581,30 @@ test_get_default_object (ECal *client)
* how can this be done better ?
*/
#define EXPECTED \
-"BEGIN:VEVENT\
-UID:20040213T055519Z-15802-500-1-3 testcal\
-DTSTAMP:20040213T055519Z\
-DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Asia/Calcutta:\
+"BEGIN : VEVENT\
+UID : 20040213T055519Z - 15802 - 500 - 1 - 3 testcal\
+DTSTAMP : 20040213T055519Z\
+DTSTART; TZID=/softwarestudio.org / Olson_20011030_5 / Asia / Calcutta:\
20040213T130000\
-DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Asia/Calcutta:\
+DTEND; TZID=/softwarestudio.org / Olson_20011030_5 / Asia / Calcutta:\
20040213T133000\
-TRANSP:OPAQUE\
-SEQUENCE:3\
-SUMMARY:Test - Travel plans to Kansas\
-LOCATION:Yellow Brick road\
-CLASS:PUBLIC\
-ORGANIZER;CN=dorothy:MAILTO:dorothy oz\
+TRANSP : OPAQUE\
+SEQUENCE : 3\
+SUMMARY : Test - Travel plans to Kansas\
+LOCATION : Yellow Brick road\
+CLASS : PUBLIC\
+ORGANIZER; CN = dorothy : MAILTO : dorothy oz\
DESCRIPTION: Discuss way to home\
-ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;\
- RSVP=TRUE;CN=dorothy;LANGUAGE=en:MAILTO:dorothy oz\
-ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;\
- RSVP=TRUE;CN=tinman;LANGUAGE=en:MAILTO:tinman oz\
-ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;\
- RSVP=TRUE;CN=toto;LANGUAGE=en:MAILTO:toto oz\
-ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=OPT-PARTICIPANT;PARTSTAT=NEEDS-ACTION;\
- RSVP=TRUE;CN=scarecrow;LANGUAGE=en:MAILTO:scarecrow oz\
-LAST-MODIFIED:20040213T055647Z\
-END:VEVENT"
+ATTENDEE; CUTYPE = INDIVIDUAL; ROLE = REQ - PARTICIPANT; PARTSTAT = ACCEPTED;\
+ RSVP = TRUE; CN = dorothy; LANGUAGE = en : MAILTO : dorothy oz\
+ATTENDEE; CUTYPE = INDIVIDUAL; ROLE = REQ - PARTICIPANT; PARTSTAT = NEEDS - ACTION;\
+ RSVP = TRUE; CN = tinman; LANGUAGE = en : MAILTO : tinman oz\
+ATTENDEE; CUTYPE = INDIVIDUAL; ROLE = REQ - PARTICIPANT; PARTSTAT = NEEDS - ACTION;\
+ RSVP = TRUE; CN = toto; LANGUAGE = en : MAILTO : toto oz\
+ATTENDEE; CUTYPE = INDIVIDUAL; ROLE = OPT - PARTICIPANT; PARTSTAT = NEEDS - ACTION;\
+ RSVP = TRUE; CN = scarecrow; LANGUAGE = en : MAILTO : scarecrow oz\
+LAST - MODIFIED : 20040213T055647Z\
+END : VEVENT"
static const gchar *
test_get_object (ECal *client)
@@ -626,7 +646,8 @@ test_timezones (ECal *client)
}
static const gchar *
-all_tests (ECal *client, const gchar *uri)
+all_tests (ECal *client,
+ const gchar *uri)
{
gchar *uid;
@@ -665,7 +686,10 @@ all_tests (ECal *client, const gchar *uri)
/* Creates a calendar client and tries to load the specified URI into it */
static void
-create_client (ECal **client, const gchar *uri, ECalSourceType type, gboolean only_if_exists)
+create_client (ECal **client,
+ const gchar *uri,
+ ECalSourceType type,
+ gboolean only_if_exists)
{
const gchar *results;
ECalView *query;
@@ -718,7 +742,8 @@ create_client (ECal **client, const gchar *uri, ECalSourceType type, gboolean on
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gchar *uri;
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
diff --git a/tests/libecal/test-recur.c b/tests/libecal/test-recur.c
index c18aef7..3e3f29f 100644
--- a/tests/libecal/test-recur.c
+++ b/tests/libecal/test-recur.c
@@ -4,7 +4,8 @@
#include <libecal/e-cal.h>
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *ecal;
diff --git a/tests/libecal/test-search.c b/tests/libecal/test-search.c
index ded2825..e20496c 100644
--- a/tests/libecal/test-search.c
+++ b/tests/libecal/test-search.c
@@ -4,7 +4,8 @@
#include <libecal/e-cal.h>
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
ECal *ecal;
GList *l, *objects;
diff --git a/tests/libedata-cal/test-cal-backend-sexp.c b/tests/libedata-cal/test-cal-backend-sexp.c
index 98faeb3..f2c5968 100644
--- a/tests/libedata-cal/test-cal-backend-sexp.c
+++ b/tests/libedata-cal/test-cal-backend-sexp.c
@@ -1,7 +1,7 @@
#include <libedata-cal/e-cal-backend-sexp.h>
static void
-test_query (const gchar * query)
+test_query (const gchar *query)
{
ECalBackendSExp *sexp = e_cal_backend_sexp_new (query);
time_t start, end;
diff --git a/tests/libedata-cal/test-intervaltree.c b/tests/libedata-cal/test-intervaltree.c
index 0b770d7..4a56131 100644
--- a/tests/libedata-cal/test-intervaltree.c
+++ b/tests/libedata-cal/test-intervaltree.c
@@ -40,7 +40,7 @@ struct _EInterval
{
gint start;
gint end;
- ECalComponent* comp;
+ ECalComponent * comp;
};
typedef struct _EInterval EInterval;
@@ -48,7 +48,10 @@ typedef struct _EInterval EInterval;
GList *list = NULL;
static inline gint
-compare_intervals (time_t x_start, time_t x_end, time_t y_start, time_t y_end)
+compare_intervals (time_t x_start,
+ time_t x_end,
+ time_t y_start,
+ time_t y_end)
{
/* assumption: x_start <= x_end */
/* assumption: y_start <= y_end */
@@ -65,15 +68,17 @@ compare_intervals (time_t x_start, time_t x_end, time_t y_start, time_t y_end)
return 0;
}
-static GList*
-search_in_list (GList* l, time_t start, time_t end)
+static GList *
+search_in_list (GList *l,
+ time_t start,
+ time_t end)
{
- GList* result = NULL;
+ GList * result = NULL;
EInterval *i, *i_new;
while (l)
{
- i = (EInterval*) l->data;
+ i = (EInterval *) l->data;
if (compare_intervals (start, end, i->start, i->end) == 0)
{
@@ -98,7 +103,8 @@ search_in_list (GList* l, time_t start, time_t end)
* list2 ... from interval tree
*/
static gboolean
-compare_interval_lists (GList *list1, GList *list2)
+compare_interval_lists (GList *list1,
+ GList *list2)
{
gboolean found;
GList *l2;
@@ -113,12 +119,12 @@ compare_interval_lists (GList *list1, GList *list2)
l2 = list2;
- i1 = (EInterval*) list1->data;
+ i1 = (EInterval *) list1->data;
c1 = i1->comp;
while (!found && l2 != NULL)
{
- c2 = (ECalComponent*) l2->data;
+ c2 = (ECalComponent *) l2->data;
found = (c1 == c2);
@@ -131,7 +137,7 @@ compare_interval_lists (GList *list1, GList *list2)
if (!found)
{
- i1 = (EInterval*) list1->data;
+ i1 = (EInterval *) list1->data;
g_message (G_STRLOC ": Not found %d - %d\n", i1->start, i1->end);
}
@@ -139,8 +145,9 @@ compare_interval_lists (GList *list1, GList *list2)
return found;
}
-static ECalComponent*
-create_test_component (time_t start, time_t end)
+static ECalComponent *
+create_test_component (time_t start,
+ time_t end)
{
ECalComponent *comp = e_cal_component_new ();
ECalComponentText summary;
@@ -150,11 +157,11 @@ create_test_component (time_t start, time_t end)
/*
ECalComponentDateTime dtstart, dtend;
struct icaltimetype time_start, time_end;
-
+ *
time_start = icaltime_from_timet (start, 0);
dtstart.value = icaltime_from_timet (start, 0);
dtstart.zone = icaltimezone_get_utc_timezone ();
-
+ *
dtend.value = icaltime_from_timet (end, 0);
dtend.value = icaltimezone_get_utc_timezone ();
e_cal_component_set_dtstart (comp, &dtstart);
@@ -176,9 +183,10 @@ create_test_component (time_t start, time_t end)
}
static void
-unref_comp (gpointer data, gpointer user_data)
+unref_comp (gpointer data,
+ gpointer user_data)
{
- EInterval *interval = (EInterval*) data;
+ EInterval *interval = (EInterval *) data;
g_object_unref (interval->comp);
g_free (data);
}
@@ -191,20 +199,20 @@ print_nodes_list (GList *l1)
{
ECalComponent *comp = l1->data;
ECalComponentText summary;
-
+ *
e_cal_component_get_summary (comp, &summary);
g_print ("%s\n", summary.value);
l1 = l1->next;
}
}
-
+ *
static void
print_list (GList *l2)
{
while (l2)
{
- EInterval* i = l2->data;
-
+ EInterval * i = l2->data;
+ *
g_print ("%d - %d\n", i->start, i->end);
l2 = l2->next;
}
@@ -283,8 +291,8 @@ random_test (void)
end = g_rand_int_range (myrand, 2000, _TIME_MAX);
/*
- g_print ("Search for : %d - %d\n", start, end);
- */
+ * g_print ("Search for : %d - %d\n", start, end);
+ * */
l1 = e_intervaltree_search (tree, start, end);
@@ -311,8 +319,8 @@ random_test (void)
end = _TIME_MAX;
/*
- g_print ("Search for : %d - %d\n", start, end);
- */
+ * g_print ("Search for : %d - %d\n", start, end);
+ * */
l1 = e_intervaltree_search (tree, start, end);
@@ -344,14 +352,14 @@ random_test (void)
ECalComponent *comp;
const gchar *uid = NULL;
gchar *rid;
- interval = (EInterval*) l1->data;
+ interval = (EInterval *) l1->data;
comp = interval->comp;
/* delete l1 */
/*
- g_print ("Deleting interval %d - %d\n", interval->start,
- interval->end);
- */
+ * g_print ("Deleting interval %d - %d\n", interval->start,
+ * interval->end);
+ * */
rid = e_cal_component_get_recurid_as_string (comp);
e_cal_component_get_uid (comp, &uid);
@@ -382,14 +390,14 @@ random_test (void)
end = g_rand_int_range (myrand, start, 2000);
/*
- g_print ("Search for : %d - %d\n", start, end);
- */
+ * g_print ("Search for : %d - %d\n", start, end);
+ * */
l1 = e_intervaltree_search (tree, start, end);
/*
- g_print ("Results from tree:\n");
- print_nodes_list (l1);
+ * g_print ("Results from tree:\n");
+ * print_nodes_list (l1);
*/
l2 = search_in_list (list, start, end);
@@ -453,7 +461,8 @@ mem_test (void)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
g_type_init ();
diff --git a/tests/libedataserver/test-source-list.c b/tests/libedataserver/test-source-list.c
index 59ba338..20d324d 100644
--- a/tests/libedataserver/test-source-list.c
+++ b/tests/libedataserver/test-source-list.c
@@ -77,7 +77,8 @@ static void source_added_callback (ESourceGroup *group, ESource *source);
static void source_removed_callback (ESourceGroup *group, ESource *source);
static void
-dump_property (const gchar *prop, const gchar *value)
+dump_property (const gchar *prop,
+ const gchar *value)
{
g_print ("\t\t\t%s: %s\n", prop, value);
}
@@ -241,7 +242,7 @@ disconnect_source (ESource *source)
static void
source_added_callback (ESourceGroup *group,
- ESource *source)
+ ESource *source)
{
static gint count = 0;
@@ -253,7 +254,7 @@ source_added_callback (ESourceGroup *group,
static void
source_removed_callback (ESourceGroup *group,
- ESource *source)
+ ESource *source)
{
static gint count = 0;
@@ -265,7 +266,7 @@ source_removed_callback (ESourceGroup *group,
static void
group_added_callback (ESourceList *list,
- ESourceGroup *group)
+ ESourceGroup *group)
{
static gint count = 0;
@@ -277,7 +278,7 @@ group_added_callback (ESourceList *list,
static void
group_removed_callback (ESourceList *list,
- ESourceGroup *group)
+ ESourceGroup *group)
{
static gint count = 0;
@@ -527,7 +528,8 @@ on_idle_do_stuff (gpointer unused_data)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
GOptionContext *context;
GError *error = NULL;
diff --git a/tests/libedataserverui/test-category-completion.c b/tests/libedataserverui/test-category-completion.c
index 0f53041..fdc68a6 100644
--- a/tests/libedataserverui/test-category-completion.c
+++ b/tests/libedataserverui/test-category-completion.c
@@ -47,7 +47,8 @@ on_idle_create_widget (void)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gtk_init (&argc, &argv);
diff --git a/tests/libedataserverui/test-client-examine-auth.c b/tests/libedataserverui/test-client-examine-auth.c
index bbf3111..a02fb04 100644
--- a/tests/libedataserverui/test-client-examine-auth.c
+++ b/tests/libedataserverui/test-client-examine-auth.c
@@ -47,7 +47,9 @@ extra_values_free (ExtraValues *evals)
}
static void
-print_each_property (gpointer prop_name, gpointer prop_value, gpointer user_data)
+print_each_property (gpointer prop_name,
+ gpointer prop_value,
+ gpointer user_data)
{
g_return_if_fail (prop_name != NULL);
@@ -77,7 +79,8 @@ print_each_property (gpointer prop_name, gpointer prop_value, gpointer user_data
}
static void
-print_values (const ExtraValues *evals, EClient *client)
+print_values (const ExtraValues *evals,
+ EClient *client)
{
const GSList *values;
@@ -168,7 +171,9 @@ continue_next_source (gpointer async_data)
}
static void
-client_got_backend_property_async (GObject *source_object, GAsyncResult *result, gpointer user_data)
+client_got_backend_property_async (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ExtraValues *evals = user_data;
gchar *prop_value = NULL;
@@ -204,7 +209,9 @@ client_got_backend_property_async (GObject *source_object, GAsyncResult *result,
}
static void
-client_set_backend_property_async (GObject *source_object, GAsyncResult *result, gpointer user_data)
+client_set_backend_property_async (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ExtraValues *evals = user_data;
GError *error = NULL;
@@ -227,7 +234,9 @@ client_set_backend_property_async (GObject *source_object, GAsyncResult *result,
}
static void
-client_opened_async (GObject *source_object, GAsyncResult *result, gpointer async_data)
+client_opened_async (GObject *source_object,
+ GAsyncResult *result,
+ gpointer async_data)
{
ExtraValues *evals;
GError *error = NULL;
@@ -349,7 +358,8 @@ foreach_configured_source_async_start (ESource **source)
}
static gboolean
-foreach_configured_source_async_next (gpointer *foreach_async_data, ESource **source)
+foreach_configured_source_async_next (gpointer *foreach_async_data,
+ ESource **source)
{
struct ForeachConfiguredData *async_data;
@@ -388,7 +398,8 @@ foreach_configured_source_async_next (gpointer *foreach_async_data, ESource **so
}
static void
-report_error (const gchar *operation, GError **error)
+report_error (const gchar *operation,
+ GError **error)
{
g_return_if_fail (operation != NULL);
@@ -398,7 +409,8 @@ report_error (const gchar *operation, GError **error)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
g_type_init ();
g_thread_init (NULL);
diff --git a/tests/libedataserverui/test-contact-store.c b/tests/libedataserverui/test-contact-store.c
index c986662..7ac189d 100644
--- a/tests/libedataserverui/test-contact-store.c
+++ b/tests/libedataserverui/test-contact-store.c
@@ -24,7 +24,8 @@
#include <libedataserverui/e-contact-store.h>
static void
-entry_changed (GtkWidget *entry, EContactStore *contact_store)
+entry_changed (GtkWidget *entry,
+ EContactStore *contact_store)
{
const gchar *text;
EBookQuery *query;
@@ -111,7 +112,8 @@ start_test (const gchar *gconf_path)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
const gchar *gconf_path;
diff --git a/tests/libedataserverui/test-name-selector.c b/tests/libedataserverui/test-name-selector.c
index 4250387..3173382 100644
--- a/tests/libedataserverui/test-name-selector.c
+++ b/tests/libedataserverui/test-name-selector.c
@@ -30,7 +30,9 @@ static ENameSelectorDialog *name_selector_dialog;
static GtkWidget *name_selector_entry_window;
static void
-close_dialog (GtkWidget *widget, gint response, gpointer data)
+close_dialog (GtkWidget *widget,
+ gint response,
+ gpointer data)
{
gtk_widget_destroy (GTK_WIDGET (name_selector_dialog));
gtk_widget_destroy (name_selector_entry_window);
@@ -75,7 +77,8 @@ start_test (void)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
gtk_init (&argc, &argv);
g_thread_init (NULL);
diff --git a/tests/libedataserverui/test-source-combo-box.c b/tests/libedataserverui/test-source-combo-box.c
index 4da534b..b144549 100644
--- a/tests/libedataserverui/test-source-combo-box.c
+++ b/tests/libedataserverui/test-source-combo-box.c
@@ -58,7 +58,8 @@ on_idle_create_widget (const gchar *gconf_path)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
const gchar *gconf_path;
diff --git a/tests/libedataserverui/test-source-selector.c b/tests/libedataserverui/test-source-selector.c
index 62afc37..ae899c7 100644
--- a/tests/libedataserverui/test-source-selector.c
+++ b/tests/libedataserverui/test-source-selector.c
@@ -48,7 +48,7 @@ dump_selection (ESourceSelector *selector)
static void
selection_changed_callback (ESourceSelector *selector,
- gpointer unused_data)
+ gpointer unused_data)
{
g_print ("Selection changed!\n");
dump_selection (selector);
@@ -56,7 +56,7 @@ selection_changed_callback (ESourceSelector *selector,
static void
check_toggled_callback (GtkToggleButton *button,
- ESourceSelector *selector)
+ ESourceSelector *selector)
{
e_source_selector_show_selection (selector, gtk_toggle_button_get_active (button));
}
@@ -102,7 +102,8 @@ on_idle_create_widget (const gchar *gconf_path)
}
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
const gchar *gconf_path;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]