[evolution-data-server/account-mgmt: 11/42] Add built-in ESource key files.



commit a3285b7441dfe542da1f7215f591babbd861d059
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Nov 27 10:25:32 2010 -0500

    Add built-in ESource key files.

 configure.ac                                       |    1 +
 data/Makefile.am                                   |    2 +
 data/sources/Makefile.am                           |   37 +++
 data/sources/birthdays.source.in                   |   11 +
 data/sources/caldav-stub.source.in                 |    5 +
 data/sources/contacts-stub.source.in               |    5 +
 data/sources/google-stub.source.in                 |    5 +
 data/sources/ldap-stub.source.in                   |    5 +
 data/sources/local-stub.source.in                  |    7 +
 data/sources/local.source.in                       |    9 +
 data/sources/sendmail.source.in                    |    8 +
 data/sources/system-address-book.source.in         |    9 +
 data/sources/system-calendar.source.in             |   11 +
 data/sources/system-memo-list.source.in            |   11 +
 data/sources/system-task-list.source.in            |   11 +
 data/sources/vfolder.source.in                     |    9 +
 data/sources/weather-stub.source.in                |    5 +
 data/sources/webcal-stub.source.in                 |    5 +
 data/sources/webdav-stub.source.in                 |    5 +
 .../libedataserver/libedataserver-sections.txt     |    3 +
 libedataserver/e-source-alarms.c                   |    2 +-
 libedataserver/e-source-authentication.c           |    6 +-
 libedataserver/e-source-authenticator.c            |    9 +-
 libedataserver/e-source-backend.c                  |    2 +-
 libedataserver/e-source-collection.c               |    2 +-
 libedataserver/e-source-goa.c                      |    2 +-
 libedataserver/e-source-mail-account.c             |    2 +-
 libedataserver/e-source-mail-composition.c         |   11 +-
 libedataserver/e-source-mail-identity.c            |   10 +-
 libedataserver/e-source-mail-signature.c           |   37 ++--
 libedataserver/e-source-mail-submission.c          |    5 +-
 libedataserver/e-source-refresh.c                  |    6 +-
 libedataserver/e-source-registry.c                 |  236 ++++++++++++--------
 libedataserver/e-source-registry.h                 |   15 ++
 libedataserver/e-source-security.c                 |    2 +-
 libedataserver/e-source-selectable.c               |    2 +-
 libedataserver/e-source-smime.c                    |    9 +-
 libedataserver/e-source-webdav.c                   |   10 +-
 libedataserver/e-source.c                          |   31 ++--
 39 files changed, 399 insertions(+), 164 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index dcdd75d..d94850a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1643,6 +1643,7 @@ camel/tests/misc/Makefile
 camel/tests/smime/Makefile
 camel/camel.pc
 data/Makefile
+data/sources/Makefile
 libebackend/Makefile
 libebackend/libebackend.pc
 libedataserver/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 566afe9..a31232a 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,3 +1,5 @@
+SUBDIRS = sources
+
 gsettings_SCHEMAS = \
 	org.gnome.Evolution.DefaultSources.gschema.xml
 
diff --git a/data/sources/Makefile.am b/data/sources/Makefile.am
new file mode 100644
index 0000000..39f91dd
--- /dev/null
+++ b/data/sources/Makefile.am
@@ -0,0 +1,37 @@
+NULL =
+
+# These are non-removable and non-writable.
+ro_sources_in_files = \
+	caldav-stub.source.in \
+	contacts-stub.source.in \
+	google-stub.source.in \
+	ldap-stub.source.in \
+	local-stub.source.in \
+	weather-stub.source.in \
+	webcal-stub.source.in \
+	webdav-stub.source.in \
+	$(NULL)
+ro_sources_DATA = $(ro_sources_in_files:.in=)
+
+# These are non-removable, but can be changed
+# and written to the user's sources directory.
+rw_sources_in_files = \
+	birthdays.source.in \
+	local.source.in \
+	sendmail.source.in \
+	system-address-book.source.in \
+	system-calendar.source.in \
+	system-memo-list.source.in \
+	system-task-list.source.in \
+	vfolder.source.in \
+	$(NULL)
+rw_sources_DATA = $(rw_sources_in_files:.in=)
+
+%: %.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po)
+	LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+
+EXTRA_DIST = $(ro_sources_in_files) $(rw_sources_in_files)
+
+CLEANFILES = $(ro_sources_DATA) $(rw_sources_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/sources/birthdays.source.in b/data/sources/birthdays.source.in
new file mode 100644
index 0000000..7f90f94
--- /dev/null
+++ b/data/sources/birthdays.source.in
@@ -0,0 +1,11 @@
+
+[Data Source]
+_DisplayName=Birthdays & Anniversaries
+Enabled=true
+Parent=contacts-stub
+
+[Calendar]
+BackendName=contacts
+Color=#fed4d3
+Enabled=true
+Writable=false
diff --git a/data/sources/caldav-stub.source.in b/data/sources/caldav-stub.source.in
new file mode 100644
index 0000000..90081a3
--- /dev/null
+++ b/data/sources/caldav-stub.source.in
@@ -0,0 +1,5 @@
+
+[Data Source]
+_DisplayName=CalDAV
+Enabled=true
+Parent=
diff --git a/data/sources/contacts-stub.source.in b/data/sources/contacts-stub.source.in
new file mode 100644
index 0000000..f2bcb97
--- /dev/null
+++ b/data/sources/contacts-stub.source.in
@@ -0,0 +1,5 @@
+
+[Data Source]
+_DisplayName=Contacts
+Enabled=true
+Parent=
diff --git a/data/sources/google-stub.source.in b/data/sources/google-stub.source.in
new file mode 100644
index 0000000..93de6f1
--- /dev/null
+++ b/data/sources/google-stub.source.in
@@ -0,0 +1,5 @@
+
+[Data Source]
+_DisplayName=Google
+Enabled=true
+Parent=
diff --git a/data/sources/ldap-stub.source.in b/data/sources/ldap-stub.source.in
new file mode 100644
index 0000000..9c5e324
--- /dev/null
+++ b/data/sources/ldap-stub.source.in
@@ -0,0 +1,5 @@
+
+[Data Source]
+_DisplayName=On LDAP Servers
+Enabled=true
+Parent=
diff --git a/data/sources/local-stub.source.in b/data/sources/local-stub.source.in
new file mode 100644
index 0000000..bad02f0
--- /dev/null
+++ b/data/sources/local-stub.source.in
@@ -0,0 +1,7 @@
+# An unfortunate name collision with the "On This Computer"
+# mail store forced the introduction of this "stub" suffix.
+
+[Data Source]
+_DisplayName=On This Computer
+Enabled=true
+Parent=
diff --git a/data/sources/local.source.in b/data/sources/local.source.in
new file mode 100644
index 0000000..1c38384
--- /dev/null
+++ b/data/sources/local.source.in
@@ -0,0 +1,9 @@
+# Special built-in mail store.
+
+[Data Source]
+_DisplayName=On This Computer
+Enabled=true
+Parent=
+
+[Mail Account]
+BackendName=maildir
diff --git a/data/sources/sendmail.source.in b/data/sources/sendmail.source.in
new file mode 100644
index 0000000..ce825cb
--- /dev/null
+++ b/data/sources/sendmail.source.in
@@ -0,0 +1,8 @@
+
+[Data Source]
+_DisplayName=Sendmail
+Enabled=true
+Parent=
+
+[Mail Transport]
+BackendName=sendmail
diff --git a/data/sources/system-address-book.source.in b/data/sources/system-address-book.source.in
new file mode 100644
index 0000000..f1cea75
--- /dev/null
+++ b/data/sources/system-address-book.source.in
@@ -0,0 +1,9 @@
+
+[Data Source]
+_DisplayName=Personal
+Enabled=true
+Parent=local-stub
+
+[Address Book]
+BackendName=local
+Color=#becedd
diff --git a/data/sources/system-calendar.source.in b/data/sources/system-calendar.source.in
new file mode 100644
index 0000000..ffbe161
--- /dev/null
+++ b/data/sources/system-calendar.source.in
@@ -0,0 +1,11 @@
+
+[Data Source]
+_DisplayName=Personal
+Enabled=true
+Parent=local-stub
+
+[Calendar]
+BackendName=local
+Color=#becedd
+Selected=true
+
diff --git a/data/sources/system-memo-list.source.in b/data/sources/system-memo-list.source.in
new file mode 100644
index 0000000..f53f0f0
--- /dev/null
+++ b/data/sources/system-memo-list.source.in
@@ -0,0 +1,11 @@
+
+[Data Source]
+_DisplayName=Personal
+Enabled=true
+Parent=local-stub
+
+[Memo List]
+BackendName=local
+Color=#becedd
+Selected=true
+
diff --git a/data/sources/system-task-list.source.in b/data/sources/system-task-list.source.in
new file mode 100644
index 0000000..22f40bc
--- /dev/null
+++ b/data/sources/system-task-list.source.in
@@ -0,0 +1,11 @@
+
+[Data Source]
+_DisplayName=Personal
+Enabled=true
+Parent=local-stub
+
+[Task List]
+BackendName=local
+Color=#becedd
+Selected=true
+
diff --git a/data/sources/vfolder.source.in b/data/sources/vfolder.source.in
new file mode 100644
index 0000000..98a9df4
--- /dev/null
+++ b/data/sources/vfolder.source.in
@@ -0,0 +1,9 @@
+# Special built-in mail store.
+
+[Data Source]
+_DisplayName=Search Folders
+Enabled=true
+Parent=
+
+[Mail Account]
+BackendName=vfolder
diff --git a/data/sources/weather-stub.source.in b/data/sources/weather-stub.source.in
new file mode 100644
index 0000000..e1a549d
--- /dev/null
+++ b/data/sources/weather-stub.source.in
@@ -0,0 +1,5 @@
+
+[Data Source]
+_DisplayName=Weather
+Enabled=true
+Parent=
diff --git a/data/sources/webcal-stub.source.in b/data/sources/webcal-stub.source.in
new file mode 100644
index 0000000..178cec1
--- /dev/null
+++ b/data/sources/webcal-stub.source.in
@@ -0,0 +1,5 @@
+
+[Data Source]
+_DisplayName=On The Web
+Enabled=true
+Parent=
diff --git a/data/sources/webdav-stub.source.in b/data/sources/webdav-stub.source.in
new file mode 100644
index 0000000..78ec0c4
--- /dev/null
+++ b/data/sources/webdav-stub.source.in
@@ -0,0 +1,5 @@
+
+[Data Source]
+_DisplayName=WebDAV
+Enabled=true
+Parent=
diff --git a/docs/reference/libedataserver/libedataserver-sections.txt b/docs/reference/libedataserver/libedataserver-sections.txt
index dd63213..f0ccada 100644
--- a/docs/reference/libedataserver/libedataserver-sections.txt
+++ b/docs/reference/libedataserver/libedataserver-sections.txt
@@ -807,6 +807,9 @@ e_source_registry_commit_source_finish
 e_source_registry_create_source_sync
 e_source_registry_create_source
 e_source_registry_create_source_finish
+e_source_registry_create_multiple_sources_sync
+e_source_registry_create_multiple_sources
+e_source_registry_create_multiple_sources_finish
 e_source_registry_ref_source
 e_source_registry_list_sources
 e_source_registry_find_extension
diff --git a/libedataserver/e-source-alarms.c b/libedataserver/e-source-alarms.c
index e5213b8..ce7e5b5 100644
--- a/libedataserver/e-source-alarms.c
+++ b/libedataserver/e-source-alarms.c
@@ -271,7 +271,7 @@ e_source_alarms_dup_last_notified (ESourceAlarms *extension)
 /**
  * e_source_alarms_set_last_notified:
  * @extension: an #ESourceAlarms
- * @last_notified: an ISO 8601 timestamp, or %NULL
+ * @last_notified: (allow-none): an ISO 8601 timestamp, or %NULL
  *
  * Sets an ISO 8601 formatted timestamp of when the user was last
  * alerted about an upcoming appointment in the calendar described
diff --git a/libedataserver/e-source-authentication.c b/libedataserver/e-source-authentication.c
index 58a7dc2..f8ece63 100644
--- a/libedataserver/e-source-authentication.c
+++ b/libedataserver/e-source-authentication.c
@@ -307,7 +307,7 @@ e_source_authentication_dup_host (ESourceAuthentication *extension)
 /**
  * e_source_authentication_set_host:
  * @extension: an #ESourceAuthentication
- * @host: a host name, or %NULL
+ * @host: (allow-none): a host name, or %NULL
  *
  * Sets the host name used to authenticate to a remote account.
  *
@@ -401,7 +401,7 @@ e_source_authentication_dup_method (ESourceAuthentication *extension)
 /**
  * e_source_authentication_set_method:
  * @extension: an #ESourceAuthentication
- * @method: authentication method, or %NULL
+ * @method: (allow-none): authentication method, or %NULL
  *
  * Sets the authentication method for a remote account.  There are no
  * pre-defined method names; backends are free to set this however they
@@ -535,7 +535,7 @@ e_source_authentication_dup_user (ESourceAuthentication *extension)
 /**
  * e_source_authentication_set_user:
  * @extension: an #ESourceAuthentication
- * @user: a user name, or %NULL
+ * @user: (allow-none): a user name, or %NULL
  *
  * Sets the user name used to authenticate to a remote account.
  *
diff --git a/libedataserver/e-source-authenticator.c b/libedataserver/e-source-authenticator.c
index 2d90c35..7d99599 100644
--- a/libedataserver/e-source-authenticator.c
+++ b/libedataserver/e-source-authenticator.c
@@ -380,7 +380,7 @@ e_source_authenticator_get_prompt_strings (ESourceAuthenticator *auth,
  * e_source_authenticator_try_password_sync:
  * @auth: an #ESourceAuthenticator
  * @password: a user-provided password
- * @cancellable: optional #GCancellable object, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
  * @error: return location for a #GError, or %NULL
  *
  * Attempts to authenticate using @password.
@@ -423,9 +423,10 @@ e_source_authenticator_try_password_sync (ESourceAuthenticator *auth,
  * e_source_authenticator_try_password:
  * @auth: an #ESourceAuthenticator
  * @password: a user-provided password
- * @cancellable: optional #GCancellable object, or %NULL
- * @callback: a #GAsyncReadyCallback to call when the request is satisfied
- * @user_data: data to pass to the callback function
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request
+ *            is satisfied
+ * @user_data: (closure): data to pass to the callback function
  *
  * Asyncrhonously attempts to authenticate using @password.
  *
diff --git a/libedataserver/e-source-backend.c b/libedataserver/e-source-backend.c
index 9b3c311..edfc5d0 100644
--- a/libedataserver/e-source-backend.c
+++ b/libedataserver/e-source-backend.c
@@ -185,7 +185,7 @@ e_source_backend_dup_backend_name (ESourceBackend *extension)
 /**
  * e_source_backend_set_backend_name:
  * @extension: an #ESourceBackend
- * @backend_name: a backend name
+ * @backend_name: (allow-none): a backend name, or %NULL
  *
  * Sets the backend name for @extension.
  *
diff --git a/libedataserver/e-source-collection.c b/libedataserver/e-source-collection.c
index 7980878..335c1d5 100644
--- a/libedataserver/e-source-collection.c
+++ b/libedataserver/e-source-collection.c
@@ -270,7 +270,7 @@ e_source_collection_dup_identity (ESourceCollection *extension)
 /**
  * e_source_collection_set_identity:
  * @extension: an #ESourceCollection
- * @identity: the collection identity
+ * @identity: (allow-none): the collection identity, or %NULL
  *
  * Sets the string used to uniquely identify the user account at the
  * service provider.  Often this is an email address or user name.
diff --git a/libedataserver/e-source-goa.c b/libedataserver/e-source-goa.c
index 0555dd9..3514b8c 100644
--- a/libedataserver/e-source-goa.c
+++ b/libedataserver/e-source-goa.c
@@ -197,7 +197,7 @@ e_source_goa_dup_account_id (ESourceGoa *extension)
 /**
  * e_source_goa_set_account_id:
  * @extension: an #ESourceGoa
- * @account_id: the associated GNOME Online Account ID, or %NULL
+ * @account_id: (allow-none): the associated GNOME Online Account ID, or %NULL
  *
  * Sets the identifier string of the GNOME Online Account associated
  * with the #ESource to which @extension belongs.
diff --git a/libedataserver/e-source-mail-account.c b/libedataserver/e-source-mail-account.c
index 547f848..3e6041e 100644
--- a/libedataserver/e-source-mail-account.c
+++ b/libedataserver/e-source-mail-account.c
@@ -200,7 +200,7 @@ e_source_mail_account_dup_identity_uid (ESourceMailAccount *extension)
 /**
  * e_source_mail_account_set_identity_uid:
  * @extension: an #ESourceMailAccount
- * @identity_uid: the mail identity #ESource:uid, or %NULL
+ * @identity_uid: (allow-none): the mail identity #ESource:uid, or %NULL
  *
  * Sets the #ESource:uid of the #ESource that describes the mail
  * identity to be used for this account.
diff --git a/libedataserver/e-source-mail-composition.c b/libedataserver/e-source-mail-composition.c
index e1d2cc8..61cee77 100644
--- a/libedataserver/e-source-mail-composition.c
+++ b/libedataserver/e-source-mail-composition.c
@@ -317,7 +317,7 @@ e_source_mail_composition_dup_bcc (ESourceMailComposition *extension)
 /**
  * e_source_mail_composition_set_bcc:
  * @extension: an #ESource
- * @bcc: a %NULL-terminated string array of Bcc recipients
+ * @bcc: (allow-none): a %NULL-terminated string array of Bcc recipients
  *
  * Sets the recipients which should automatically be added to the blind
  * carbon-copy (Bcc) list when composing a new mail message.  The recipient
@@ -398,7 +398,7 @@ e_source_mail_composition_dup_cc (ESourceMailComposition *extension)
 /**
  * e_source_mail_composition_set_cc:
  * @extension: an #ESourceMailComposition
- * @cc: a %NULL-terminated string array of Cc recipients
+ * @cc: (allow-none): a %NULL-terminated string array of Cc recipients
  *
  * Sets the recipients which should automatically be added to the carbon
  * copy (Cc) list when composing a new mail message.  The recipient strings
@@ -475,7 +475,8 @@ e_source_mail_composition_dup_drafts_folder (ESourceMailComposition *extension)
 /**
  * e_source_mail_composition_set_drafts_folder:
  * @extension: an #ESourceMailComposition
- * @drafts_folder: an identifier for the preferred drafts folder, or %NULL
+ * @drafts_folder: (allow-none): an identifier for the preferred drafts
+ *                 folder, or %NULL
  *
  * Sets the preferred folder for draft messages by an identifier string.
  * The format of the identifier string is defined by the client application.
@@ -610,8 +611,8 @@ e_source_mail_composition_dup_templates_folder (ESourceMailComposition *extensio
 /**
  * e_source_mail_composition_set_templates_folder:
  * @extension: an #ESourceMailComposition
- * @templates_folder: an identifier for the preferred templates folder,
- *                    or %NULL
+ * @templates_folder: (allow-none): an identifier for the preferred templates
+ *                    folder, or %NULL
  *
  * Sets the preferred folder for message templates by an identifier string.
  * The format of the identifier string is defined by the client application.
diff --git a/libedataserver/e-source-mail-identity.c b/libedataserver/e-source-mail-identity.c
index e4a59ea..2d51ecf 100644
--- a/libedataserver/e-source-mail-identity.c
+++ b/libedataserver/e-source-mail-identity.c
@@ -315,7 +315,7 @@ e_source_mail_identity_dup_address (ESourceMailIdentity *extension)
 /**
  * e_source_mail_identity_set_address:
  * @extension: an #ESourceMailIdentity
- * @address: the sender's email address, or %NULL
+ * @address: (allow-none): the sender's email address, or %NULL
  *
  * Sets the email address for this identity from which to send messages.
  *
@@ -406,7 +406,7 @@ e_source_mail_identity_dup_name (ESourceMailIdentity *extension)
 /**
  * e_source_mail_identity_set_name:
  * @extension: an #ESourceMailIdentity
- * @name: the sender's name, or %NULL
+ * @name: (allow-none): the sender's name, or %NULL
  *
  * Sets the sender's name for this identity.
  *
@@ -501,7 +501,7 @@ e_source_mail_identity_dup_organization (ESourceMailIdentity *extension)
 /**
  * e_source_mail_identity_set_organization:
  * @extension: an #ESourceMailIdentity
- * @organization: the sender's organization, or %NULL
+ * @organization: (allow-none): the sender's organization, or %NULL
  *
  * Sets the sender's organization for this identity.
  *
@@ -593,7 +593,7 @@ e_source_mail_identity_dup_reply_to (ESourceMailIdentity *extension)
 /**
  * e_source_mail_identity_set_reply_to:
  * @extension: an #ESourceMailIdentity
- * @reply_to: the sender's reply-to address, or %NULL
+ * @reply_to: (allow-none): the sender's reply-to address, or %NULL
  *
  * Sets the email address for this identity to which recipients should
  * send replies.
@@ -689,7 +689,7 @@ e_source_mail_identity_dup_signature_uid (ESourceMailIdentity *extension)
 /**
  * e_source_mail_identity_set_signature_uid:
  * @extension: an #ESourceMailIdentity
- * @signature_uid: the sender's signature ID, or %NULL
+ * @signature_uid: (allow-none): the sender's signature ID, or %NULL
  *
  * Sets the #ESource:uid of an #ESource describing a mail signature.
  *
diff --git a/libedataserver/e-source-mail-signature.c b/libedataserver/e-source-mail-signature.c
index f07f29c..4f650d2 100644
--- a/libedataserver/e-source-mail-signature.c
+++ b/libedataserver/e-source-mail-signature.c
@@ -316,7 +316,7 @@ e_source_mail_signature_dup_mime_type (ESourceMailSignature *extension)
 /**
  * e_source_mail_signature_set_mime_type:
  * @extension: an #ESourceMailSignature
- * @mime_type: a MIME type, or %NULL
+ * @mime_type: (allow-none): a MIME type, or %NULL
  *
  * Sets the MIME type of the signature content for @extension.
  *
@@ -385,9 +385,9 @@ source_mail_signature_load_thread (GSimpleAsyncResult *simple,
  * e_source_mail_signature_load_sync:
  * @source: an #ESource
  * @contents: return location for the signature content
- * @length: return location for the length of the signature content,
- *          or %NULL if the length is not needed
- * @cancellable: optional #GCancellable object, or %NULL
+ * @length: (allow-none): return location for the length of the signature
+ *          content, or %NULL if the length is not needed
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
  * @error: return location for a #GError, or %NULL
  *
  * Loads a signature from the signature file for @source, which is
@@ -576,9 +576,10 @@ exit:
  * e_source_mail_signature_load:
  * @source: an #ESource
  * @io_priority: the I/O priority of the request
- * @cancellable: optional #GCancellable object, or %NULL
- * @callback: a #GAsyncReadyCallback to call when the request is satisfied
- * @user_data: data to pass to the callback function
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request
+ *            is satisfied
+ * @user_data: (closure): data to pass to the callback function
  *
  * Asynchronously loads a signature from the signature file for @source,
  * which is given by e_source_mail_signature_get_file().
@@ -628,8 +629,8 @@ e_source_mail_signature_load (ESource *source,
  * @source: an #ESource
  * @result: a #GAsyncResult
  * @contents: return location for the signature content
- * @length: return location for the length of the signature content,
- *          or %NULL if the length is not needed
+ * @length: (allow-none): return location for the length of the signature
+ *          content, or %NULL if the length is not needed
  * @error: return location for a #GError, or %NULL
  *
  * Finishes an operation started with e_source_mail_signature_load().  The
@@ -701,7 +702,7 @@ source_mail_signature_replace_thread (GSimpleAsyncResult *simple,
  * @source: an #ESource
  * @contents: the signature contents
  * @length: the length of @contents in bytes
- * @cancellable: optional #GCancellable object, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
  * @error: return location for a #GError, or %NULL
  *
  * Replaces the signature file for @source with the given @contents
@@ -742,9 +743,10 @@ e_source_mail_signature_replace_sync (ESource *source,
  * @contents: the signature contents
  * @length: the length of @contents in bytes
  * @io_priority: the I/O priority of the request
- * @cancellable: optional #GCancellable object, or %NULL
- * @callback: a #GAsyncReadyCallback to call when the request is satisfied
- * @user_data: data to pass to the callback function
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request
+ *            is satisfied
+ * @user_data: (closure): data to pass to the callback function
  *
  * Asynchrously replaces the signature file for @source with the given
  * @contents of @length bytes.  The signature file for @source is given
@@ -847,7 +849,7 @@ source_mail_signature_symlink_thread (GSimpleAsyncResult *simple,
  * e_source_mail_signature_symlink_sync:
  * @source: an #ESource
  * @symlink_target: executable filename to link to
- * @cancellable: optional #GCancellable object, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
  * @error: return location for a #GError, or %NULL
  *
  * Replaces the signature file for @source with a symbolic link to
@@ -891,9 +893,10 @@ e_source_mail_signature_symlink_sync (ESource *source,
  * @source: an #ESource
  * @symlink_target: executable filename to link to
  * @io_priority: the I/O priority of the request
- * @cancellable: optional #GCancellable object, or %NULL
- * @callback: a #GAsyncReadyCallback to call when the request is satisfied
- * @user_data: data to pass to the callback function
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request
+ *            is satisfied
+ * @user_data: (closure): data to pass to the callback function
  *
  * Asynchronously replaces the signature file for @source with a symbolic
  * link to @symlink_target, which should be an executable file that prints
diff --git a/libedataserver/e-source-mail-submission.c b/libedataserver/e-source-mail-submission.c
index 5377c61..07b44ab 100644
--- a/libedataserver/e-source-mail-submission.c
+++ b/libedataserver/e-source-mail-submission.c
@@ -229,7 +229,8 @@ e_source_mail_submission_dup_sent_folder (ESourceMailSubmission *extension)
 /**
  * e_source_mail_submission_set_sent_folder:
  * @extension: an #ESourceMailSubmission
- * @sent_folder: an identifier for the preferred sent folder, or %NULL
+ * @sent_folder: (allow-none): an identifier for the preferred sent folder,
+ *               or %NULL
  *
  * Sets the preferred folder for sent messages by an identifier string.
  * The format of the identifier string is defined by the client application.
@@ -322,7 +323,7 @@ e_source_mail_submission_dup_transport_uid (ESourceMailSubmission *extension)
 /**
  * e_source_mail_submission_set_transport_uid:
  * @extension: an #ESourceMailSubmission
- * @transport_uid: the mail transport #ESource:uid, or %NULL
+ * @transport_uid: (allow-none): the mail transport #ESource:uid, or %NULL
  *
  * Sets the #ESource:uid of the #ESource that describes the mail
  * transport to be used for outgoing messages.
diff --git a/libedataserver/e-source-refresh.c b/libedataserver/e-source-refresh.c
index 9a2c568..7c5fa57 100644
--- a/libedataserver/e-source-refresh.c
+++ b/libedataserver/e-source-refresh.c
@@ -458,10 +458,12 @@ e_source_refresh_set_interval_minutes (ESourceRefresh *extension,
 /**
  * e_source_refresh_add_timeout:
  * @source: an #ESource
- * @context: a #GMainContext (if %NULL, the default context will be used)
+ * @context: (allow-none): a #GMainContext, or %NULL (if %NULL, the default
+ *           context will be used)
  * @callback: function to call on each timeout
  * @user_data: data to pass to @callback
- * @notify: function to call when the timeout is removed, or %NULL
+ * @notify: (allow-none): function to call when the timeout is removed,
+ *          or %NULL
  *
  * This is a simple way to schedule a periodic data source refresh.
  *
diff --git a/libedataserver/e-source-registry.c b/libedataserver/e-source-registry.c
index f8d9109..bc72bee 100644
--- a/libedataserver/e-source-registry.c
+++ b/libedataserver/e-source-registry.c
@@ -112,6 +112,7 @@ struct _ESourceRegistryPrivate {
 };
 
 struct _AsyncContext {
+	GList *input_sources;
 	ESource *input_source;
 	ESource *output_source;
 	ESourceAuthenticator *auth;
@@ -134,8 +135,8 @@ struct _CreateContext {
 	ESourceRegistry *registry;
 	GMainContext *main_context;
 	GMainLoop *main_loop;
-	gchar *object_path;
-	ESource *source;
+	ESource *input_source;
+	ESource *output_source;
 };
 
 struct _SourceClosure {
@@ -191,6 +192,10 @@ G_DEFINE_TYPE_WITH_CODE (
 static void
 async_context_free (AsyncContext *async_context)
 {
+	g_list_free_full (
+		async_context->input_sources,
+		(GDestroyNotify) g_object_unref);
+
 	if (async_context->input_source != NULL)
 		g_object_unref (async_context->input_source);
 
@@ -235,24 +240,21 @@ create_context_new (ESourceRegistry *registry)
 	create_context->main_loop = g_main_loop_new (
 		create_context->main_context, FALSE);
 
-	g_main_context_push_thread_default (create_context->main_context);
-
 	return create_context;
 }
 
 static void
 create_context_free (CreateContext *create_context)
 {
-	g_main_context_pop_thread_default (create_context->main_context);
-
 	g_object_unref (create_context->registry);
 	g_main_context_unref (create_context->main_context);
 	g_main_loop_unref (create_context->main_loop);
 
-	if (create_context->source != NULL)
-		g_object_unref (create_context->source);
+	if (create_context->input_source != NULL)
+		g_object_unref (create_context->input_source);
 
-	g_free (create_context->object_path);
+	if (create_context->output_source != NULL)
+		g_object_unref (create_context->output_source);
 
 	g_slice_free (CreateContext, create_context);
 }
@@ -1291,7 +1293,7 @@ e_source_registry_init (ESourceRegistry *registry)
 
 /**
  * e_source_registry_new_sync:
- * @cancellable: optional #GCancellable object, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
  * @error: return location for a #GError, or %NULL
  *
  * Creates a new #ESourceRegistry front-end for the registry D-Bus service.
@@ -1313,9 +1315,10 @@ e_source_registry_new_sync (GCancellable *cancellable,
 
 /**
  * e_source_registry_new:
- * @cancellable: optional #GCancellable object, or %NULL
- * @callback: a #GAsyncReadyCallback to call when the request is satisfied
- * @user_data: data to pass to the callback function
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request
+ *            is satisfied
+ * @user_data: (closure): data to pass to the callback function
  *
  * Asynchronously creates a new #ESourceRegistry front-end for the registry
  * D-Bus service.
@@ -1584,7 +1587,7 @@ source_registry_call_authenticate_for_source (ESourceRegistry *registry,
  * @registry: an #ESourceRegistry
  * @source: an #ESource
  * @auth: an #ESourceAuthenticator
- * @cancellable: optional #GCancellable object, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
  * @error: return location for a #GError, or %NULL
  *
  * Authenticates @source, using @auth to handle the authentication
@@ -1708,9 +1711,10 @@ exit:
  * @registry: an #ESourceRegistry
  * @source: an #ESource
  * @auth: an #ESourceAuthenticator
- * @cancellable: optional #GCancellable object, or %NULL
- * @callback: a #GAsyncReadyCallback to call when the request is satisfied
- * @user_data: data to pass to the callback function
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request
+ *            is satisfied
+ * @user_data: (closure): data to pass to the callback function
  *
  * Asynchronously authenticates @source, using @auth to handle the
  * authentication attempts.  The operation loops until authentication
@@ -1820,8 +1824,9 @@ source_registry_commit_source_thread (GSimpleAsyncResult *simple,
  * e_source_registry_commit_source_sync:
  * @registry: an #ESourceRegistry
  * @input_source: an #ESource with changes to commit
- * @output_source: return location for the committed #ESource, or %NULL
- * @cancellable: optional #GCancellable object, or %NULL
+ * @output_source: (allow-none): return location for the committed #ESource,
+ *                 or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
  * @error: return location for #GError, or %NULL
  *
  * This is a convenience function intended for use with graphical
@@ -1881,9 +1886,10 @@ e_source_registry_commit_source_sync (ESourceRegistry *registry,
  * e_source_registry_commit_source:
  * @registry: an #ESourceRegistry
  * @input_source: an #ESource with changes to commit
- * @cancellable: optional #GCancellable object, or %NULL
- * @callback: a #GAsyncReadyCallback to call when the request is satisfied
- * @user_data: data to pass to the callback function
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request
+ *            is satisfied
+ * @user_data: (closure): data to pass to the callback function
  *
  * See e_source_registry_commit_source_sync() for details.
  *
@@ -1929,7 +1935,8 @@ e_source_registry_commit_source (ESourceRegistry *registry,
  * e_source_registry_commit_source_finish:
  * @registry: an #ESourceRegistry
  * @result: a #GAsyncResult
- * @output_source: return location for the committed #ESource, or %NULL
+ * @output_source: (allow-none): return location for the committed #ESource,
+ *                 or %NULL
  * @error: return location for a #GError, or %NULL
  *
  * Finishes the operation started with e_source_registry_commit_source().
@@ -1997,18 +2004,11 @@ source_registry_create_idle_cb (gpointer user_data)
 {
 	CreateContext *create_context = user_data;
 
-	/* We should know what object path we're looking for by now. */
-	g_return_val_if_fail (create_context->object_path != NULL, FALSE);
-
-	/* Find the corresponding ESource in the object path table.
-	 * Note that the lookup returns a new ESource reference. */
-	create_context->source =
-		source_registry_object_path_table_lookup (
-		create_context->registry, create_context->object_path);
+	/* If we got here it means we found a matching ESource. */
+	g_return_val_if_fail (create_context->output_source != NULL, FALSE);
 
-	/* If we got a hit, terminate the main loop. */
-	if (create_context->source != NULL)
-		g_main_loop_quit (create_context->main_loop);
+	/* Just need to terminate the main loop. */
+	g_main_loop_quit (create_context->main_loop);
 
 	return FALSE;
 }
@@ -2019,27 +2019,51 @@ source_registry_create_object_added_cb (GDBusObjectManager *object_manager,
                                         GDBusObject *dbus_object,
                                         CreateContext *create_context)
 {
-	GSource *idle_source;
+	ESource *source;
+	const gchar *object_path;
 
-	/* Schedule a callback in response to an object being added.
-	 * Note that we're in the object manager thread here, so we
-	 * want to do as little as possible. */
+	/* Note that we're in the object manager thread here.
+	 * The object manager thread's "object-added" handler
+	 * should have already run.  We depend on it. */
 
-	idle_source = g_idle_source_new ();
-	g_source_set_callback (
-		idle_source,
-		source_registry_create_idle_cb,
-		create_context, (GDestroyNotify) NULL);
-	g_source_attach (idle_source, create_context->main_context);
-	g_source_unref (idle_source);
+	object_path = g_dbus_object_get_object_path (dbus_object);
+	g_return_if_fail (object_path != NULL);
+
+	/* Find the corresponding ESource in the object path table.
+	 * Note that the lookup returns a new ESource reference. */
+	source = source_registry_object_path_table_lookup (
+		create_context->registry, object_path);
+	g_return_if_fail (source != NULL);
+
+	/* Check if this is the source we want based on its UID. */
+	if (e_source_equal (source, create_context->input_source)) {
+		GSource *idle_source;
+
+		create_context->output_source = g_object_ref (source);
+
+		/* Schedule an idle source to quit the main loop.
+		 * We do it this way because the main loop may not
+		 * be running yet, but an idle source will not be
+		 * dispatched until the main loop is running. */
+		idle_source = g_idle_source_new ();
+		g_source_set_callback (
+			idle_source,
+			source_registry_create_idle_cb,
+			create_context, (GDestroyNotify) NULL);
+		g_source_attach (idle_source, create_context->main_context);
+		g_source_unref (idle_source);
+	}
+
+	g_object_unref (source);
 }
 
 /**
  * e_source_registry_create_source_sync:
  * @registry: an #ESourceRegistry
  * @input_source: an #ESource with no #GDBusObject
- * @output_source: return location for a newly-created #ESource, or %NULL
- * @cancellable: optional #GCancellable object, or %NULL
+ * @output_source: (allow-none): return location for a newly-created #ESource,
+ *                 or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
  * @error: return location for a #GError, or %NULL
  *
  * Requests the D-Bus service to create a new key file from @input_source
@@ -2064,6 +2088,8 @@ e_source_registry_create_source_sync (ESourceRegistry *registry,
                                       GError **error)
 {
 	CreateContext *create_context;
+	GVariantBuilder builder;
+	GVariant *variant;
 	gulong object_added_id;
 	gchar *source_data;
 	const gchar *uid;
@@ -2083,59 +2109,71 @@ e_source_registry_create_source_sync (ESourceRegistry *registry,
 	 *
 	 *     This is most likely to occur when creating a collection of
 	 *     related sources one at a time and the caller is not careful
-	 *     to create parent sources before children.  Perhaps a method
-	 *     to create the collection in parallel would help to mitigate
-	 *     the deadlock risk?
+	 *     to create parent sources before children.
+	 *
+	 *     ADDENDUM
+	 *
+	 *     I wrote e_source_registry_create_multiple_sources_sync()
+	 *     to address this issue, and so that collections are added
+	 *     atomically on the server side (wrt the main loop) which
+	 *     is easier for collection backends to deal with.
 	 */
 
+	uid = e_source_get_uid (input_source);
+
 	create_context = create_context_new (registry);
+	create_context->input_source = g_object_ref (input_source);
+
+	g_main_context_push_thread_default (create_context->main_context);
 
 	/* Start listening for the "object-added" signal BEFORE we call
-	 * the D-Bus method, even though we don't know what object path
-	 * we're looking for yet.  The signal may be emitted before the
-	 * D-Bus method returns. */
+	 * the D-Bus method.  The signal may be emitted before the D-Bus
+	 * method returns.
+	 *
+	 * The object manager thread's "object-added" signal handler
+	 * will run first and add a new ESource instance to the object
+	 * path table.  We then grab it from the object path table and
+	 * compare it to the input source.
+	 */
 	object_added_id = g_signal_connect_data (
 		registry->priv->dbus_object_manager, "object-added",
 		G_CALLBACK (source_registry_create_object_added_cb),
 		create_context, (GClosureNotify) create_context_free, 0);
 
-	uid = e_source_get_uid (input_source);
 	source_data = e_source_to_string (input_source, NULL);
 
-	/* Setting the object path directly on the CreateContext
-	 * is thread-safe because only the idle callbacks on our
-	 * GMainContext use the object path, but we have not yet
-	 * started our main loop so any scheduled idle callbacks
-	 * are still pending. */
-	success = e_dbus_source_manager_call_create_source_sync (
+	g_variant_builder_init (&builder, G_VARIANT_TYPE_ARRAY);
+	g_variant_builder_add (&builder, "{ss}", uid, source_data);
+	variant = g_variant_builder_end (&builder);
+
+	/* This function sinks the floating GVariant reference. */
+	success = e_dbus_source_manager_call_create_sources_sync (
 		registry->priv->dbus_source_manager,
-		uid, source_data, &create_context->object_path,
-		cancellable, error);
+		variant, cancellable, error);
 
-	g_free (source_data);
+	g_variant_builder_clear (&builder);
 
-	/* Sanity check. */
-	g_warn_if_fail (
-		(success && create_context->object_path != NULL) ||
-		(!success && create_context->object_path == NULL));
+	g_free (source_data);
 
 	if (success) {
 		/* Now start the main loop.  It will terminate
 		 * when we have our newly-created ESource. */
 		g_main_loop_run (create_context->main_loop);
 
-		g_warn_if_fail (E_IS_SOURCE (create_context->source));
+		g_warn_if_fail (create_context->output_source);
 
 		/* Hand the newly-created ESource back to
 		 * the caller if the caller is interested. */
 		if (output_source != NULL) {
-			*output_source = create_context->source;
-			create_context->source = NULL;
+			*output_source = create_context->output_source;
+			create_context->output_source = NULL;
 		}
 	}
 
 	/* Clean up. */
 
+	g_main_context_pop_thread_default (create_context->main_context);
+
 	/* This will free the CreateContext signal handler data. */
 	g_signal_handler_disconnect (
 		registry->priv->dbus_object_manager, object_added_id);
@@ -2147,9 +2185,10 @@ e_source_registry_create_source_sync (ESourceRegistry *registry,
  * e_source_registry_create_source:
  * @registry: an #ESourceRegistry
  * @input_source: an #ESource with no #EBusObject
- * @cancellable: optional #GCancellable object, or %NULL
- * @callback: a #GAsyncReadyCallback to call when the request is satisfied
- * @user_data: data to pass to the callback function
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request
+ *            is satisfied
+ * @user_data: (closure): data to pass to the callback function
  *
  * See e_source_registry_create_source_sync() for details.
  *
@@ -2195,7 +2234,8 @@ e_source_registry_create_source (ESourceRegistry *registry,
  * e_source_registry_create_source_finish:
  * @registry: an #ESourceRegistry
  * @result: a #GAsyncResult
- * @output_source: return location for a newly-created #ESource, or %NULL
+ * @output_source: (allow-none): return location for a newly-created #ESource,
+ *                 or %NULL
  * @error: return location for a #GError, or %NULL
  *
  * Finishes the operation started with e_source_registry_create_source().
@@ -2425,7 +2465,7 @@ e_source_registry_create_multiple_sources_finish (ESourceRegistry *registry,
  * The returned #ESource is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: an #ESource, or %NULL if no match was found
+ * Returns: (transfer full): an #ESource, or %NULL if no match was found
  *
  * Since: 3.6
  **/
@@ -2442,7 +2482,7 @@ e_source_registry_ref_source (ESourceRegistry *registry,
 /**
  * e_source_registry_list_sources:
  * @registry: an #ESourceRegistry
- * @extension_name: an extension name, or %NULL
+ * @extension_name: (allow-none): an extension name, or %NULL
  *
  * Returns a list of registered sources, sorted by display name.  If
  * @extension_name is given, restrict the list to sources having that
@@ -2458,7 +2498,7 @@ e_source_registry_ref_source (ESourceRegistry *registry,
  *   g_list_free_full (list, g_object_unref);
  * ]|
  *
- * Returns: a sorted list of sources
+ * Returns: (transfer full): a sorted list of sources
  *
  * Since: 3.6
  **/
@@ -2520,7 +2560,7 @@ e_source_registry_list_sources (ESourceRegistry *registry,
  * instead of the #ESourceExtension itself because extension instances are
  * not to be referenced directly (see e_source_get_extension()).
  *
- * Returns: an #ESource, or %NULL if no match was found
+ * Returns: (transfer full): an #ESource, or %NULL if no match was found
  *
  * Since: 3.6
  **/
@@ -2653,7 +2693,7 @@ source_registry_prune_nodes (GNode *node,
 /**
  * e_source_registry_build_display_tree:
  * @registry: an #ESourceRegistry
- * @extension_name: an extension name, or %NULL
+ * @extension_name: (allow-none): an extension name, or %NULL
  *
  * Returns a single #GNode tree of registered sources that can be used to
  * populate a #GtkTreeModel.  (The root #GNode is just an empty placeholder.)
@@ -2671,7 +2711,7 @@ source_registry_prune_nodes (GNode *node,
  * For convenience, e_source_registry_free_display_tree() does all
  * that in one step.
  *
- * Returns: a tree of sources, arranged for display
+ * Returns: (transfer full): a tree of sources, arranged for display
  *
  * Since: 3.6
  **/
@@ -2760,7 +2800,7 @@ source_registry_debug_dump_cb (GNode *node)
 /**
  * e_source_registry_debug_dump:
  * @registry: an #ESourceRegistry
- * @extension_name: an extension name, or %NULL
+ * @extension_name: (allow-none): an extension name, or %NULL
  *
  * Handy debugging function that uses e_source_registry_build_display_tree()
  * to print a tree of registered sources to standard output.
@@ -2795,7 +2835,7 @@ e_source_registry_debug_dump (ESourceRegistry *registry,
  * The returned #ESource is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: the built-in address book #ESource
+ * Returns: (transfer full): the built-in address book #ESource
  *
  * Since: 3.6
  **/
@@ -2825,7 +2865,7 @@ e_source_registry_ref_builtin_address_book (ESourceRegistry *registry)
  * The returned #ESource is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: the default address book #ESource
+ * Returns: (transfer full): the default address book #ESource
  *
  * Since: 3.6
  **/
@@ -2855,7 +2895,7 @@ e_source_registry_ref_default_address_book (ESourceRegistry *registry)
 /**
  * e_source_registry_set_default_address_book:
  * @registry: an #ESourceRegistry
- * @default_source: an address book #ESource, or %NULL
+ * @default_source: (allow-none): an address book #ESource, or %NULL
  *
  * Sets @default_source as the default address book.  If @default_source
  * is %NULL, the default address book is reset to the built-in address book.
@@ -2897,7 +2937,7 @@ e_source_registry_set_default_address_book (ESourceRegistry *registry,
  * The returned #ESource is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: the built-in calendar #ESource
+ * Returns: (transfer full): the built-in calendar #ESource
  *
  * Since: 3.6
  **/
@@ -2927,7 +2967,7 @@ e_source_registry_ref_builtin_calendar (ESourceRegistry *registry)
  * The returned #ESource is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: the default calendar #ESource
+ * Returns: (transfer full): the default calendar #ESource
  *
  * Since: 3.6
  **/
@@ -2957,7 +2997,7 @@ e_source_registry_ref_default_calendar (ESourceRegistry *registry)
 /**
  * e_source_registry_set_default_calendar:
  * @registry: an #ESourceRegistry
- * @default_source: a calendar #ESource, or %NULL
+ * @default_source: (allow-none): a calendar #ESource, or %NULL
  *
  * Sets @default_source as the default calendar.  If @default_source
  * is %NULL, the default calendar is reset to the built-in calendar.
@@ -2999,7 +3039,7 @@ e_source_registry_set_default_calendar (ESourceRegistry *registry,
  * The returned #ESource is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: the built-in mail account #ESource
+ * Returns: (transfer full): the built-in mail account #ESource
  *
  * Since: 3.6
  **/
@@ -3029,7 +3069,7 @@ e_source_registry_ref_builtin_mail_account (ESourceRegistry *registry)
  * The returned #ESource is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: the default mail account #ESource
+ * Returns: (transfer full): the default mail account #ESource
  *
  * Since: 3.6
  **/
@@ -3059,7 +3099,7 @@ e_source_registry_ref_default_mail_account (ESourceRegistry *registry)
 /**
  * e_source_registry_set_default_mail_account:
  * @registry: an #ESourceRegistry
- * @default_source: a mail account #ESource, or %NULL
+ * @default_source: (allow-none): a mail account #ESource, or %NULL
  *
  * Sets @default_source as the default mail account.  If @default_source
  * is %NULL, the default mail account is reset to the built-in mail account.
@@ -3229,7 +3269,7 @@ e_source_registry_set_default_mail_identity (ESourceRegistry *registry,
  * The returned #ESource is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: the built-in memo list #ESource
+ * Returns: (transfer full): the built-in memo list #ESource
  *
  * Since: 3.6
  **/
@@ -3259,7 +3299,7 @@ e_source_registry_ref_builtin_memo_list (ESourceRegistry *registry)
  * The returned #ESource is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: the default memo list #ESource
+ * Returns: (transfer full): the default memo list #ESource
  *
  * Since: 3.6
  **/
@@ -3289,7 +3329,7 @@ e_source_registry_ref_default_memo_list (ESourceRegistry *registry)
 /**
  * e_source_registry_set_default_memo_list:
  * @registry: an #ESourceRegistry
- * @default_source: a memo list #ESource, or %NULL
+ * @default_source: (allow-none): a memo list #ESource, or %NULL
  *
  * Sets @default_source as the default memo list.  If @default_source
  * is %NULL, the default memo list is reset to the built-in memo list.
@@ -3331,7 +3371,7 @@ e_source_registry_set_default_memo_list (ESourceRegistry *registry,
  * The returned #ESource is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: the built-in task list #ESource
+ * Returns: (transfer full): the built-in task list #ESource
  *
  * Since: 3.6
  **/
@@ -3361,7 +3401,7 @@ e_source_registry_ref_builtin_task_list (ESourceRegistry *registry)
  * The returned #ESource is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: the default task list #ESource
+ * Returns: (transfer full): the default task list #ESource
  *
  * Since: 3.6
  **/
@@ -3391,7 +3431,7 @@ e_source_registry_ref_default_task_list (ESourceRegistry *registry)
 /**
  * e_source_registry_set_default_task_list:
  * @registry: an #ESourceRegistry
- * @default_source: a task list #ESource, or %NULL
+ * @default_source: (allow-none): a task list #ESource, or %NULL
  *
  * Sets @default_source as the default task list.  If @default_source
  * is %NULL, the default task list is reset to the built-in task list.
@@ -3456,7 +3496,7 @@ e_source_registry_set_default_task_list (ESourceRegistry *registry,
  * The returned #ESource is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: the default #ESource based on @extension_name
+ * Returns: (transfer full): the default #ESource based on @extension_name
  *
  * Since: 3.6
  **/
@@ -3492,7 +3532,7 @@ e_source_registry_ref_default_for_extension_name (ESourceRegistry *registry,
  * e_source_registry_set_default_for_extension_name:
  * @registry: an #ESourceRegistry
  * @extension_name: an extension name
- * @default_source: an #ESource, or %NULL
+ * @default_source: (allow-none): an #ESource, or %NULL
  *
  * This is a convenience function to set a default #ESource based on
  * @extension_name.  This only works with a subset of extension names.
diff --git a/libedataserver/e-source-registry.h b/libedataserver/e-source-registry.h
index 4e25c6d..252e4a5 100644
--- a/libedataserver/e-source-registry.h
+++ b/libedataserver/e-source-registry.h
@@ -134,6 +134,21 @@ gboolean	e_source_registry_create_source_finish
 						 GAsyncResult *result,
 						 ESource **output_source,
 						 GError **error);
+gboolean	e_source_registry_create_multiple_sources_sync
+						(ESourceRegistry *registry,
+						 GList *input_sources,
+						 GCancellable *cancellable,
+						 GError **error);
+void		e_source_registry_create_multiple_sources
+						(ESourceRegistry *registry,
+						 GList *input_sources,
+						 GCancellable *cancellable,
+						 GAsyncReadyCallback callback,
+						 gpointer user_data);
+gboolean	e_source_registry_create_multiple_sources_finish
+						(ESourceRegistry *registry,
+						 GAsyncResult *result,
+						 GError **error);
 ESource *	e_source_registry_ref_source	(ESourceRegistry *registry,
 						 const gchar *uid);
 GList *		e_source_registry_list_sources	(ESourceRegistry *registry,
diff --git a/libedataserver/e-source-security.c b/libedataserver/e-source-security.c
index 0f6c87b..c0df815 100644
--- a/libedataserver/e-source-security.c
+++ b/libedataserver/e-source-security.c
@@ -225,7 +225,7 @@ e_source_security_dup_method (ESourceSecurity *extension)
 /**
  * e_source_security_set_method:
  * @extension: an #ESourceSecurity
- * @method: security method, or %NULL
+ * @method: (allow-none): security method, or %NULL
  *
  * Sets the method used to establish a secure network connection to a
  * remote account.  There are no pre-defined method names; backends are
diff --git a/libedataserver/e-source-selectable.c b/libedataserver/e-source-selectable.c
index c4a1271..5443179 100644
--- a/libedataserver/e-source-selectable.c
+++ b/libedataserver/e-source-selectable.c
@@ -216,7 +216,7 @@ e_source_selectable_dup_color (ESourceSelectable *extension)
 /**
  * e_source_selectable_set_color:
  * @extension: an #ESourceSelectable
- * @color: a color specification, or %NULL
+ * @color: (allow-none): a color specification, or %NULL
  *
  * Sets the color specification for the #ESource to which @extension
  * belongs.  A colored block is often displayed next to the data source's
diff --git a/libedataserver/e-source-smime.c b/libedataserver/e-source-smime.c
index 2099bb2..f380f10 100644
--- a/libedataserver/e-source-smime.c
+++ b/libedataserver/e-source-smime.c
@@ -338,7 +338,8 @@ e_source_smime_dup_encryption_certificate (ESourceSMIME *extension)
 /**
  * e_source_smime_set_encryption_certificate:
  * @extension: an #ESourceSMIME
- * @encryption_certificate: the certificate name used to encrypt messages
+ * @encryption_certificate: (allow-none): the certificate name used to encrypt
+ *                          messages, or %NULL
  *
  * Sets the certificate name used to encrypt messages.
  *
@@ -508,7 +509,8 @@ e_source_smime_dup_signing_algorithm (ESourceSMIME *extension)
 /**
  * e_source_smime_set_signing_algorithm:
  * @extension: an #ESourceSMIME
- * @signing_algorithm: the signing algorithm for outgoing messages
+ * @signing_algorithm: (allow-none): the signing algorithm for outgoing
+ *                     messages, or %NULL
  *
  * Sets the name of the hash algorithm used to digitally sign outgoing
  * messages.
@@ -600,7 +602,8 @@ e_source_smime_dup_signing_certificate (ESourceSMIME *extension)
 /**
  * e_source_smime_set_signing_certificate:
  * @extension: an #ESourceSMIME
- * @signing_certificate: the certificate name used to sign messages
+ * @signing_certificate: (allow-none): the certificate name used to sign
+ *                       messages, or %NULL
  *
  * Sets the S/MIME certificate name used to sign messages.
  *
diff --git a/libedataserver/e-source-webdav.c b/libedataserver/e-source-webdav.c
index eeaf755..9381e11 100644
--- a/libedataserver/e-source-webdav.c
+++ b/libedataserver/e-source-webdav.c
@@ -754,7 +754,8 @@ e_source_webdav_dup_display_name (ESourceWebdav *extension)
 /**
  * e_source_webdav_set_display_name:
  * @extension: an #ESourceWebdav
- * @display_name: the display name of the WebDAV resource
+ * @display_name: (allow-none): the display name of the WebDAV resource,
+ *                or %NULL
  *
  * Updates the last known display name of a WebDAV resource, which may
  * differ from the #ESource:display-name property of the #ESource to which
@@ -848,7 +849,7 @@ e_source_webdav_dup_email_address (ESourceWebdav *extension)
 /**
  * e_source_webdav_set_email_address:
  * @extension: an #ESourceWebdav
- * @email_address: the user's email address, or %NULL
+ * @email_address: (allow-none): the user's email address, or %NULL
  *
  * Sets the user's email address which can be passed to a CalDAV server if
  * the user wishes to receive scheduling messages.
@@ -984,7 +985,8 @@ e_source_webdav_dup_resource_path (ESourceWebdav *extension)
 /**
  * e_source_webdav_set_resource_path:
  * @extension: an #ESourceWebdav
- * @resource_path: the absolute path to a WebDAV resource, or %NULL
+ * @resource_path: (allow-none): the absolute path to a WebDAV resource,
+ *                 or %NULL
  *
  * Sets the absolute path to a resource on a WebDAV server.
  *
@@ -1032,7 +1034,7 @@ e_source_webdav_set_resource_path (ESourceWebdav *extension,
  * extension, the #ESourceSecurity extension, and @extension itself.
  * Free the returned #SoupURI with soup_uri_free().
  *
- * Returns: a newly-allocated #SoupURI
+ * Returns: (transfer full): a newly-allocated #SoupURI
  *
  * Since: 3.6
  **/
diff --git a/libedataserver/e-source.c b/libedataserver/e-source.c
index 896de21..65db8cb 100644
--- a/libedataserver/e-source.c
+++ b/libedataserver/e-source.c
@@ -1228,8 +1228,8 @@ e_source_init (ESource *source)
 
 /**
  * e_source_new:
- * @dbus_object: a #GDBusObject or %NULL
- * @main_context: a #GMainContext or %NULL
+ * @dbus_object: (allow-none): a #GDBusObject or %NULL
+ * @main_context: (allow-none): a #GMainContext or %NULL
  * @error: return location for a #GError, or %NULL
  *
  * Creates a new #ESource instance.
@@ -1452,7 +1452,7 @@ e_source_dup_parent (ESource *source)
 /**
  * e_source_set_parent:
  * @source: an #ESource
- * @parent: the UID of the parent #ESource
+ * @parent: (allow-none): the UID of the parent #ESource, or %NULL
  *
  * Identifies the parent of @source by its unique identifier string.
  * This can only be set prior to adding @source to an #ESourceRegistry.
@@ -1722,7 +1722,7 @@ e_source_has_extension (ESource *source,
  * The returned #GDBusObject is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: the #GDBusObject for @source, or %NULL
+ * Returns: (transfer full): the #GDBusObject for @source, or %NULL
  *
  * Since: 3.6
  **/
@@ -1747,7 +1747,7 @@ e_source_ref_dbus_object (ESource *source)
  * The returned #GMainContext is referenced for thread-safety and must be
  * unreferenced with g_main_context_unref() when finished with it.
  *
- * Returns: the #GMainContext for signal emissions
+ * Returns: (transfer full): the #GMainContext for signal emissions
  *
  * Since: 3.6
  **/
@@ -1874,7 +1874,8 @@ e_source_compare_by_display_name (ESource *source1,
 /**
  * e_source_to_string:
  * @source: an #ESource
- * @length: return location for the length of the returned string, or %NULL
+ * @length: (allow-none): return location for the length of the returned
+ *          string, or %NULL
  *
  * Outputs the current contents of @source as a key file string.
  * Free the returned string with g_free().
@@ -1952,7 +1953,7 @@ e_source_parameter_to_key (const gchar *param_name)
 /**
  * e_source_remove_sync:
  * @source: the #ESource to be removed
- * @cancellable: optional #GCancellable object, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
  * @error: return location for a #GError, or %NULL
  *
  * Requests the D-Bus service to delete the key files for @source and all of
@@ -1981,9 +1982,10 @@ e_source_remove_sync (ESource *source,
 /**
  * e_source_remove:
  * @source: the #ESource to be removed
- * @cancellable: optional #GCancellable object, or %NULL
- * @callback: a #GAsyncReadyCallback to call when the request is satisfied
- * @user_data: data to pass to the callback function
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request
+ *            is satisfied
+ * @user_data: (closure): data to pass to the callback function
  *
  * Asynchronously requests the D-Bus service to delete the key files for
  * @source all of its descendants and broadcast their removal to all clients.
@@ -2041,7 +2043,7 @@ e_source_remove_finish (ESource *source,
 /**
  * e_source_write_sync:
  * @source: a writable #ESource
- * @cancellable: optional #GCancellable object, or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
  * @error: return location for a #GError, or %NULL
  *
  * Submits the current contents of @source to the D-Bus service to be
@@ -2070,9 +2072,10 @@ e_source_write_sync (ESource *source,
 /**
  * e_source_write:
  * @source: a writable #ESource
- * @cancellable: optional #GCancellable object, or %NULL
- * @callback: a #GAsyncReadyCallback to call when the request is satisfied
- * @user_data: data to pass to the callback function
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the request
+ *            is satisfied
+ * @user_data: (closure): data to pass to the callback function
  *
  * Asynchronously submits the current contents of @source to the D-Bus
  * service to be written to disk and broadcast to other clients.  This



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]