[evolution-data-server] Bug 759714 - Fix annotations of EDataServer and Camel



commit 6fc1581faa3b72212db4ca2bccb49a9cc2709dd2
Author: Corentin Noël <corentin elementary io>
Date:   Wed Jan 13 16:31:14 2016 +0100

    Bug 759714 - Fix annotations of EDataServer and Camel

 camel/camel-address.c                              |    2 +-
 camel/camel-block-file.h                           |    4 +-
 camel/camel-certdb.c                               |   10 +++-
 camel/camel-charset-map.h                          |    6 +-
 camel/camel-cipher-context.c                       |    6 +-
 camel/camel-data-cache.c                           |    4 +-
 camel/camel-data-wrapper.c                         |    2 +-
 camel/camel-data-wrapper.h                         |    2 +-
 camel/camel-db.c                                   |   26 +++++--
 camel/camel-db.h                                   |    8 +-
 camel/camel-debug.c                                |    1 -
 camel/camel-filter-driver.c                        |   60 ++++++++++-----
 camel/camel-filter-driver.h                        |   20 +++---
 camel/camel-filter-input-stream.c                  |    2 +-
 camel/camel-filter-output-stream.c                 |    2 +-
 camel/camel-filter-search.c                        |    8 +-
 camel/camel-filter-search.h                        |    2 +-
 camel/camel-folder-search.c                        |   10 ++-
 camel/camel-folder-search.h                        |    2 +-
 camel/camel-folder-summary.c                       |   27 ++++---
 camel/camel-folder-summary.h                       |    4 +-
 camel/camel-folder-thread.c                        |    6 ++-
 camel/camel-folder.c                               |   66 +++++++++--------
 camel/camel-folder.h                               |    8 +-
 camel/camel-html-parser.c                          |    7 ++
 camel/camel-index.c                                |   76 +++++++++++++-------
 camel/camel-index.h                                |    2 +-
 camel/camel-medium.c                               |   12 ++--
 camel/camel-memchunk.c                             |    4 +-
 camel/camel-mime-message.c                         |    8 +-
 camel/camel-mime-parser.c                          |    6 +-
 camel/camel-mime-part.c                            |    4 +-
 camel/camel-multipart-signed.c                     |    2 +-
 camel/camel-multipart.c                            |    2 +-
 camel/camel-net-utils.c                            |    2 +
 camel/camel-network-service.c                      |    6 +-
 camel/camel-object-bag.c                           |   19 +++--
 camel/camel-provider.c                             |    2 +-
 camel/camel-sasl.c                                 |   10 ++-
 camel/camel-service.c                              |   12 ++--
 camel/camel-session.c                              |   12 ++--
 camel/camel-settings.c                             |    4 +-
 camel/camel-sexp.c                                 |   10 ++-
 camel/camel-sexp.h                                 |    4 +-
 camel/camel-smime-context.h                        |    2 +-
 camel/camel-store-summary.c                        |    4 +-
 camel/camel-store.c                                |   19 +++---
 camel/camel-stream-filter.c                        |    2 +
 camel/camel-stream-mem.c                           |    2 +
 camel/camel-stream.c                               |    2 +-
 camel/camel-transport.c                            |    4 +-
 camel/camel-uid-cache.c                            |    6 +-
 camel/camel-vee-data-cache.c                       |   20 ++++--
 camel/camel-vee-data-cache.h                       |    6 ++
 camel/camel-vee-folder.c                           |    6 +-
 camel/camel-vee-folder.h                           |   16 ++--
 camel/camel-vee-store.c                            |    4 +
 camel/camel-vee-summary.c                          |    2 +
 camel/camel.c                                      |   34 +++++++++-
 libedataserver/Makefile.am                         |    2 +-
 libedataserver/e-data-server-util.c                |   62 +++++++++++++++--
 libedataserver/e-extensible.c                      |    2 +-
 libedataserver/e-extension.c                       |    2 +-
 libedataserver/e-module.c                          |    6 +-
 .../e-source-credentials-provider-impl.c           |    4 +-
 libedataserver/e-source-credentials-provider.c     |    4 +-
 libedataserver/e-source-extension.c                |    2 +-
 libedataserver/e-source-local.c                    |   12 +++
 libedataserver/e-source-proxy.c                    |    4 +-
 libedataserver/e-webdav-discover.c                 |   18 +++---
 libedataserver/e-xml-utils.c                       |    2 +-
 libedataserver/eds-version.c                       |    2 +-
 vala/Camel-1.2.metadata                            |   20 +++++
 vala/EDataServer-1.2.metadata                      |   27 +++++++
 vala/Makefile.am                                   |   14 ++++
 vala/libedataserver-1.2.deps                       |    2 +
 76 files changed, 547 insertions(+), 259 deletions(-)
---
diff --git a/camel/camel-address.c b/camel/camel-address.c
index c6c3e86..9b6e6d3 100644
--- a/camel/camel-address.c
+++ b/camel/camel-address.c
@@ -66,7 +66,7 @@ camel_address_new (void)
  *
  * Clone an existing address type.
  *
- * Returns: the cloned address
+ * Returns: (transfer full): the cloned address
  **/
 CamelAddress *
 camel_address_new_clone (CamelAddress *addr)
diff --git a/camel/camel-block-file.h b/camel/camel-block-file.h
index 7e8531c..9c02075 100644
--- a/camel/camel-block-file.h
+++ b/camel/camel-block-file.h
@@ -133,8 +133,8 @@ struct _CamelBlockFile {
 struct _CamelBlockFileClass {
        GObjectClass parent_class;
 
-       gint (*validate_root)(CamelBlockFile *);
-       gint (*init_root)(CamelBlockFile *);
+       gint (*validate_root)(CamelBlockFile *bs);
+       gint (*init_root)(CamelBlockFile *bs);
 };
 
 GType          camel_block_file_get_type       (void);
diff --git a/camel/camel-certdb.c b/camel/camel-certdb.c
index 6a197a6..2bd6475 100644
--- a/camel/camel-certdb.c
+++ b/camel/camel-certdb.c
@@ -440,6 +440,14 @@ camel_certdb_set_default (CamelCertDB *certdb)
        g_mutex_unlock (&default_certdb_lock);
 }
 
+
+/**
+ * camel_certdb_get_default:
+ *
+ * FIXME Document me!
+ *
+ * Returns: (transfer full):
+ **/
 CamelCertDB *
 camel_certdb_get_default (void)
 {
@@ -784,7 +792,7 @@ camel_certdb_clear (CamelCertDB *certdb)
  * is referenced, thus unref it with camel_cert_unref() when done with it, the same
  * as free the list itself.
  *
- * Returns: (transfer full): (element-type CamelCert): Newly allocated list of
+ * Returns: (transfer full) (element-type CamelCert): Newly allocated list of
  *   referenced CamelCert-s, which are stored in the @certdb.
  *
  * Since: 3.16
diff --git a/camel/camel-charset-map.h b/camel/camel-charset-map.h
index f10a834..6942ce1 100644
--- a/camel/camel-charset-map.h
+++ b/camel/camel-charset-map.h
@@ -35,10 +35,10 @@ struct _CamelCharset {
        gint level;
 };
 
-void camel_charset_init (CamelCharset *);
-void camel_charset_step (CamelCharset *, const gchar *in, gint len);
+void camel_charset_init (CamelCharset *c);
+void camel_charset_step (CamelCharset *cc, const gchar *in, gint len);
 
-const gchar *camel_charset_best_name (CamelCharset *);
+const gchar *camel_charset_best_name (CamelCharset *charset);
 
 /* helper function */
 const gchar *camel_charset_best (const gchar *in, gint len);
diff --git a/camel/camel-cipher-context.c b/camel/camel-cipher-context.c
index 0819056..9f4d7e9 100644
--- a/camel/camel-cipher-context.c
+++ b/camel/camel-cipher-context.c
@@ -605,7 +605,7 @@ camel_cipher_context_verify_finish (CamelCipherContext *context,
  * camel_cipher_context_encrypt_sync:
  * @context: a #CamelCipherContext
  * @userid: key ID (or email address) to use when signing, or %NULL to not sign
- * @recipients: an array of recipient key IDs and/or email addresses
+ * @recipients: (element-type utf8): an array of recipient key IDs and/or email addresses
  * @ipart: clear-text #CamelMimePart
  * @opart: cipher-text #CamelMimePart
  * @cancellable: optional #GCancellable object, or %NULL
@@ -691,7 +691,7 @@ cipher_context_encrypt_thread (GTask *task,
  * camel_cipher_context_encrypt:
  * @context: a #CamelCipherContext
  * @userid: key id (or email address) to use when signing, or %NULL to not sign
- * @recipients: an array of recipient key IDs and/or email addresses
+ * @recipients: (element-type utf8): an array of recipient key IDs and/or email addresses
  * @ipart: clear-text #CamelMimePart
  * @opart: cipher-text #CamelMimePart
  * @io_priority: the I/O priority of the request
@@ -1268,6 +1268,8 @@ camel_cipher_context_new (CamelSession *session)
  * camel_cipher_context_get_session:
  * @context: a #CamelCipherContext
  *
+ * Returns: (transfer none):
+ *
  * Since: 2.32
  **/
 CamelSession *
diff --git a/camel/camel-data-cache.c b/camel/camel-data-cache.c
index f11a6b1..a518ea3 100644
--- a/camel/camel-data-cache.c
+++ b/camel/camel-data-cache.c
@@ -370,7 +370,7 @@ data_cache_path (CamelDataCache *cdc,
  * The returned #GIOStream is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: a #GIOStream for the new cache item, or %NULL
+ * Returns: (transfer full): a #GIOStream for the new cache item, or %NULL
  **/
 GIOStream *
 camel_data_cache_add (CamelDataCache *cdc,
@@ -424,7 +424,7 @@ camel_data_cache_add (CamelDataCache *cdc,
  * The returned #GIOStream is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: a #GIOStream for the requested cache item, or %NULL
+ * Returns: (transfer full): a #GIOStream for the requested cache item, or %NULL
  **/
 GIOStream *
 camel_data_cache_get (CamelDataCache *cdc,
diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c
index 826772c..f48795d 100644
--- a/camel/camel-data-wrapper.c
+++ b/camel/camel-data-wrapper.c
@@ -473,7 +473,7 @@ camel_data_wrapper_new (void)
  *
  * Note, it's up to the caller to use this in a thread-safe manner.
  *
- * Returns: the #GByteArray for @data_wrapper
+ * Returns: (transfer none): the #GByteArray for @data_wrapper
  *
  * Since: 3.2
  **/
diff --git a/camel/camel-data-wrapper.h b/camel/camel-data-wrapper.h
index 4d3cdd9..0e70224 100644
--- a/camel/camel-data-wrapper.h
+++ b/camel/camel-data-wrapper.h
@@ -77,7 +77,7 @@ struct _CamelDataWrapperClass {
        CamelContentType *
                        (*get_mime_type_field)  (CamelDataWrapper *data_wrapper);
        void            (*set_mime_type_field)  (CamelDataWrapper *data_wrapper,
-                                                CamelContentType *mime_type_field);
+                                                CamelContentType *mime_type);
        gboolean        (*is_offline)           (CamelDataWrapper *data_wrapper);
 
        /* Synchronous I/O Methods */
diff --git a/camel/camel-db.c b/camel/camel-db.c
index 43e2040..0a2e78e 100644
--- a/camel/camel-db.c
+++ b/camel/camel-db.c
@@ -875,6 +875,7 @@ camel_db_close (CamelDB *cdb)
 
 /**
  * camel_db_set_collate:
+ * @func: (scope call):
  *
  * Since: 2.24
  **/
@@ -1005,6 +1006,8 @@ camel_db_add_to_transaction (CamelDB *cdb,
 
 /**
  * camel_db_transaction_command:
+ * @cdb: a #CamelDB
+ * @qry_list: (element-type utf8) (transfer none): A #GList of querries
  *
  * Since: 2.24
  **/
@@ -1264,6 +1267,7 @@ camel_db_count_total_message_info (CamelDB *cdb,
 
 /**
  * camel_db_select:
+ * @callback: (scope async):
  *
  * Since: 2.24
  **/
@@ -1271,7 +1275,7 @@ gint
 camel_db_select (CamelDB *cdb,
                  const gchar *stmt,
                  CamelDBSelectCB callback,
-                 gpointer data,
+                 gpointer user_data,
                  GError **error)
 {
        gint ret = -1;
@@ -1283,7 +1287,7 @@ camel_db_select (CamelDB *cdb,
        cdb_reader_lock (cdb);
 
        START (stmt);
-       ret = cdb_sql_exec (cdb->db, stmt, callback, data, NULL, error);
+       ret = cdb_sql_exec (cdb->db, stmt, callback, user_data, NULL, error);
        END;
 
        cdb_reader_unlock (cdb);
@@ -1359,6 +1363,8 @@ camel_db_get_folder_uids (CamelDB *db,
 /**
  * camel_db_get_folder_junk_uids:
  *
+ * Returns: (element-type utf8) (transfer full):
+ *
  * Since: 2.24
  **/
 GPtrArray *
@@ -1386,6 +1392,8 @@ camel_db_get_folder_junk_uids (CamelDB *db,
 /**
  * camel_db_get_folder_deleted_uids:
  *
+ * Returns: (element-type utf8) (transfer full):
+ *
  * Since: 2.24
  **/
 GPtrArray *
@@ -1452,6 +1460,8 @@ read_preview_callback (gpointer ref,
 /**
  * camel_db_get_folder_preview:
  *
+ * Returns: (element-type utf8 utf8) (transfer full):
+ *
  * Since: 2.28
  **/
 GHashTable *
@@ -2155,6 +2165,7 @@ camel_db_read_folder_info_record (CamelDB *cdb,
 
 /**
  * camel_db_read_message_info_record_with_uid:
+ * @read_mir_callback: (scope async) (closure user_data):
  *
  * Since: 2.24
  **/
@@ -2162,7 +2173,7 @@ gint
 camel_db_read_message_info_record_with_uid (CamelDB *cdb,
                                             const gchar *folder_name,
                                             const gchar *uid,
-                                            gpointer p,
+                                            gpointer user_data,
                                             CamelDBSelectCB read_mir_callback,
                                             GError **error)
 {
@@ -2174,7 +2185,7 @@ camel_db_read_message_info_record_with_uid (CamelDB *cdb,
                "mail_from, mail_to, mail_cc, mlist, part, labels, "
                "usertags, cinfo, bdata FROM %Q WHERE uid = %Q",
                folder_name, uid);
-       ret = camel_db_select (cdb, query, read_mir_callback, p, error);
+       ret = camel_db_select (cdb, query, read_mir_callback, user_data, error);
        sqlite3_free (query);
 
        return (ret);
@@ -2182,13 +2193,14 @@ camel_db_read_message_info_record_with_uid (CamelDB *cdb,
 
 /**
  * camel_db_read_message_info_records:
+ * @read_mir_callback: (scope async) (closure user_data):
  *
  * Since: 2.24
  **/
 gint
 camel_db_read_message_info_records (CamelDB *cdb,
                                     const gchar *folder_name,
-                                    gpointer p,
+                                    gpointer user_data,
                                     CamelDBSelectCB read_mir_callback,
                                     GError **error)
 {
@@ -2199,7 +2211,7 @@ camel_db_read_message_info_records (CamelDB *cdb,
                "SELECT uid, flags, size, dsent, dreceived, subject, "
                "mail_from, mail_to, mail_cc, mlist, part, labels, "
                "usertags, cinfo, bdata FROM %Q ", folder_name);
-       ret = camel_db_select (cdb, query, read_mir_callback, p, error);
+       ret = camel_db_select (cdb, query, read_mir_callback, user_data, error);
        sqlite3_free (query);
 
        return (ret);
@@ -2359,6 +2371,8 @@ cdb_delete_ids (CamelDB *cdb,
 
 /**
  * camel_db_delete_uids:
+ * @cdb: a #CamelDB
+ * @uids: (element-type utf8) (transfer none): A #GList of uids
  *
  * Since: 2.24
  **/
diff --git a/camel/camel-db.h b/camel/camel-db.h
index ec5e2ea..b454af9 100644
--- a/camel/camel-db.h
+++ b/camel/camel-db.h
@@ -66,7 +66,7 @@ typedef struct _CamelDBPrivate CamelDBPrivate;
  *
  * Since: 2.24
  **/
-typedef gint (*CamelDBCollate)(gpointer, gint, gconstpointer, gint, gconstpointer );
+typedef gint (*CamelDBCollate)(gpointer enc, gint length1, gconstpointer data1, gint length2, gconstpointer 
data2);
 
 /**
  * CamelDB:
@@ -294,7 +294,7 @@ gint camel_db_delete_uid (CamelDB *cdb, const gchar *folder, const gchar *uid, G
 gint camel_db_delete_uids (CamelDB *cdb, const gchar * folder_name, GList *uids, GError **error);
 
 gint camel_db_create_folders_table (CamelDB *cdb, GError **error);
-gint camel_db_select (CamelDB *cdb, const gchar * stmt, CamelDBSelectCB callback, gpointer data, GError 
**error);
+gint camel_db_select (CamelDB *cdb, const gchar * stmt, CamelDBSelectCB callback, gpointer user_data, GError 
**error);
 
 gint camel_db_write_folder_info_record (CamelDB *cdb, CamelFIRecord *record, GError **error);
 gint camel_db_read_folder_info_record (CamelDB *cdb, const gchar *folder_name, CamelFIRecord *record, GError 
**error);
@@ -303,8 +303,8 @@ gint camel_db_prepare_message_info_table (CamelDB *cdb, const gchar *folder_name
 
 gint camel_db_write_message_info_record (CamelDB *cdb, const gchar *folder_name, CamelMIRecord *record, 
GError **error);
 gint camel_db_write_fresh_message_info_record (CamelDB *cdb, const gchar *folder_name, CamelMIRecord 
*record, GError **error);
-gint camel_db_read_message_info_records (CamelDB *cdb, const gchar *folder_name, gpointer p, CamelDBSelectCB 
read_mir_callback, GError **error);
-gint camel_db_read_message_info_record_with_uid (CamelDB *cdb, const gchar *folder_name, const gchar *uid, 
gpointer p, CamelDBSelectCB read_mir_callback, GError **error);
+gint camel_db_read_message_info_records (CamelDB *cdb, const gchar *folder_name, gpointer user_data, 
CamelDBSelectCB read_mir_callback, GError **error);
+gint camel_db_read_message_info_record_with_uid (CamelDB *cdb, const gchar *folder_name, const gchar *uid, 
gpointer user_data, CamelDBSelectCB read_mir_callback, GError **error);
 
 gint camel_db_count_junk_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, GError 
**error);
 gint camel_db_count_unread_message_info (CamelDB *cdb, const gchar *table_name, guint32 *count, GError 
**error);
diff --git a/camel/camel-debug.c b/camel/camel-debug.c
index 9c9e6e4..5e9e600 100644
--- a/camel/camel-debug.c
+++ b/camel/camel-debug.c
@@ -44,7 +44,6 @@ static GHashTable *debug_table = NULL;
 
 /**
  * camel_debug_init:
- * @void:
  *
  * Init camel debug.
  *
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c
index 6f98b58..3ef7307 100644
--- a/camel/camel-filter-driver.c
+++ b/camel/camel-filter-driver.c
@@ -303,13 +303,17 @@ camel_filter_driver_new (CamelSession *session)
        return d;
 }
 
+/**
+ * camel_filter_driver_set_folder_func:
+ * @get_folder: (scope call):
+ **/
 void
 camel_filter_driver_set_folder_func (CamelFilterDriver *d,
                                      CamelFilterGetFolderFunc get_folder,
-                                     gpointer data)
+                                     gpointer user_data)
 {
        d->priv->get_folder = get_folder;
-       d->priv->data = data;
+       d->priv->data = user_data;
 }
 
 void
@@ -319,40 +323,56 @@ camel_filter_driver_set_logfile (CamelFilterDriver *d,
        d->priv->logfile = logfile;
 }
 
+/**
+ * camel_filter_driver_set_status_func:
+ * @func: (scope call):
+ **/
 void
 camel_filter_driver_set_status_func (CamelFilterDriver *d,
                                      CamelFilterStatusFunc func,
-                                     gpointer data)
+                                     gpointer user_data)
 {
        d->priv->statusfunc = func;
-       d->priv->statusdata = data;
+       d->priv->statusdata = user_data;
 }
 
+/**
+ * camel_filter_driver_set_shell_func:
+ * @func: (scope call):
+ **/
 void
 camel_filter_driver_set_shell_func (CamelFilterDriver *d,
                                     CamelFilterShellFunc func,
-                                    gpointer data)
+                                    gpointer user_data)
 {
        d->priv->shellfunc = func;
-       d->priv->shelldata = data;
+       d->priv->shelldata = user_data;
 }
 
+/**
+ * camel_filter_driver_set_play_sound_func:
+ * @func: (scope call):
+ **/
 void
 camel_filter_driver_set_play_sound_func (CamelFilterDriver *d,
                                          CamelFilterPlaySoundFunc func,
-                                         gpointer data)
+                                         gpointer user_data)
 {
        d->priv->playfunc = func;
-       d->priv->playdata = data;
+       d->priv->playdata = user_data;
 }
 
+/**
+ * camel_filter_driver_set_system_beep_func:
+ * @func: (scope call):
+ **/
 void
 camel_filter_driver_set_system_beep_func (CamelFilterDriver *d,
                                           CamelFilterSystemBeepFunc func,
-                                          gpointer data)
+                                          gpointer user_data)
 {
        d->priv->beep = func;
-       d->priv->beepdata = data;
+       d->priv->beepdata = user_data;
 }
 
 void
@@ -849,9 +869,9 @@ typedef struct {
 static void
 child_watch (GPid pid,
              gint status,
-             gpointer data)
+             gpointer user_data)
 {
-       child_watch_data_t *child_watch_data = data;
+       child_watch_data_t *child_watch_data = user_data;
 
        g_spawn_close_pid (pid);
 
@@ -1260,18 +1280,18 @@ struct _run_only_once {
 static gboolean
 run_only_once (gpointer key,
                gchar *action,
-               struct _run_only_once *data)
+               struct _run_only_once *user_data)
 {
-       CamelFilterDriver *driver = data->driver;
+       CamelFilterDriver *driver = user_data->driver;
        CamelSExpResult *r;
 
        d (printf ("evaluating: %s\n\n", action));
 
        camel_sexp_input_text (driver->priv->eval, action, strlen (action));
        if (camel_sexp_parse (driver->priv->eval) == -1) {
-               if (data->error == NULL)
+               if (user_data->error == NULL)
                        g_set_error (
-                               &data->error,
+                               &user_data->error,
                                CAMEL_ERROR, CAMEL_ERROR_GENERIC,
                                _("Error parsing filter: %s: %s"),
                                camel_sexp_error (driver->priv->eval), action);
@@ -1280,9 +1300,9 @@ run_only_once (gpointer key,
 
        r = camel_sexp_eval (driver->priv->eval);
        if (r == NULL) {
-               if (data->error == NULL)
+               if (user_data->error == NULL)
                        g_set_error (
-                               &data->error,
+                               &user_data->error,
                                CAMEL_ERROR, CAMEL_ERROR_GENERIC,
                                _("Error executing filter: %s: %s"),
                                camel_sexp_error (driver->priv->eval), action);
@@ -1488,8 +1508,8 @@ fail:
  * @driver: CamelFilterDriver
  * @folder: CamelFolder to be filtered
  * @cache: UID cache (needed for POP folders)
- * @uids: message uids to be filtered or NULL (as a shortcut to filter
- *        all messages)
+ * @uids: (element-type utf8): message uids to be filtered or NULL (as a
+ *        shortcut to filter all messages)
  * @remove: TRUE to mark filtered messages as deleted
  * @cancellable: optional #GCancellable object, or %NULL
  * @error: return location for a #GError, or %NULL
diff --git a/camel/camel-filter-driver.h b/camel/camel-filter-driver.h
index b28225c..d0b7eda 100644
--- a/camel/camel-filter-driver.h
+++ b/camel/camel-filter-driver.h
@@ -77,23 +77,23 @@ typedef CamelFolder * (*CamelFilterGetFolderFunc) (CamelFilterDriver *driver, co
                                                   gpointer data, GError **error);
 /* report status */
 typedef void (*CamelFilterStatusFunc) (CamelFilterDriver *driver, enum camel_filter_status_t status,
-                                     gint pc, const gchar *desc, gpointer data);
+                                     gint pc, const gchar *desc, gpointer user_data);
 
-typedef void (*CamelFilterShellFunc)      (CamelFilterDriver *driver, gint argc, gchar **argv, gpointer 
data);
-typedef void (*CamelFilterPlaySoundFunc)  (CamelFilterDriver *driver, const gchar *filename, gpointer data);
-typedef void (*CamelFilterSystemBeepFunc) (CamelFilterDriver *driver, gpointer data);
+typedef void (*CamelFilterShellFunc)      (CamelFilterDriver *driver, gint argc, gchar **argv, gpointer 
user_data);
+typedef void (*CamelFilterPlaySoundFunc)  (CamelFilterDriver *driver, const gchar *filename, gpointer 
user_data);
+typedef void (*CamelFilterSystemBeepFunc) (CamelFilterDriver *driver, gpointer user_data);
 
 GType          camel_filter_driver_get_type (void);
-CamelFilterDriver  *camel_filter_driver_new     (struct _CamelSession *);
+CamelFilterDriver  *camel_filter_driver_new     (struct _CamelSession *session);
 
 /* modifiers */
 void camel_filter_driver_set_logfile          (CamelFilterDriver *d, FILE *logfile);
 
-void camel_filter_driver_set_status_func      (CamelFilterDriver *d, CamelFilterStatusFunc func, gpointer 
data);
-void camel_filter_driver_set_shell_func       (CamelFilterDriver *d, CamelFilterShellFunc func, gpointer 
data);
-void camel_filter_driver_set_play_sound_func  (CamelFilterDriver *d, CamelFilterPlaySoundFunc func, gpointer 
data);
-void camel_filter_driver_set_system_beep_func (CamelFilterDriver *d, CamelFilterSystemBeepFunc func, 
gpointer data);
-void camel_filter_driver_set_folder_func      (CamelFilterDriver *d, CamelFilterGetFolderFunc fetcher, 
gpointer data);
+void camel_filter_driver_set_status_func      (CamelFilterDriver *d, CamelFilterStatusFunc func, gpointer 
user_data);
+void camel_filter_driver_set_shell_func       (CamelFilterDriver *d, CamelFilterShellFunc func, gpointer 
user_data);
+void camel_filter_driver_set_play_sound_func  (CamelFilterDriver *d, CamelFilterPlaySoundFunc func, gpointer 
user_data);
+void camel_filter_driver_set_system_beep_func (CamelFilterDriver *d, CamelFilterSystemBeepFunc func, 
gpointer user_data);
+void camel_filter_driver_set_folder_func      (CamelFilterDriver *d, CamelFilterGetFolderFunc get_folder, 
gpointer user_data);
 
 void camel_filter_driver_set_default_folder   (CamelFilterDriver *d, CamelFolder *def);
 
diff --git a/camel/camel-filter-input-stream.c b/camel/camel-filter-input-stream.c
index c1188fd..2563ed0 100644
--- a/camel/camel-filter-input-stream.c
+++ b/camel/camel-filter-input-stream.c
@@ -246,7 +246,7 @@ camel_filter_input_stream_new (GInputStream *base_stream,
  *
  * Gets the #CamelMimeFilter that is used by @filter_stream.
  *
- * Returns: a #CamelMimeFilter
+ * Returns: (transfer none): a #CamelMimeFilter
  *
  * Since: 3.12
  **/
diff --git a/camel/camel-filter-output-stream.c b/camel/camel-filter-output-stream.c
index 2496fba..32ac301 100644
--- a/camel/camel-filter-output-stream.c
+++ b/camel/camel-filter-output-stream.c
@@ -266,7 +266,7 @@ camel_filter_output_stream_new (GOutputStream *base_stream,
  *
  * Gets the #CamelMimeFilter that is used by @filter_stream.
  *
- * Returns: a #CamelMimeFilter
+ * Returns: (transfer none): a #CamelMimeFilter
  *
  * Since: 3.12
  **/
diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c
index 9df10c9..89a98a0 100644
--- a/camel/camel-filter-search.c
+++ b/camel/camel-filter-search.c
@@ -1090,8 +1090,8 @@ message_location (struct _CamelSExp *f,
 /**
  * camel_filter_search_match:
  * @session:
- * @get_message: function to retrieve the message if necessary
- * @data: data for above
+ * @get_message: (scope async): function to retrieve the message if necessary
+ * @user_data: data for above
  * @info:
  * @source:
  * @folder: in which folder the message is stored
@@ -1105,7 +1105,7 @@ message_location (struct _CamelSExp *f,
 gint
 camel_filter_search_match (CamelSession *session,
                            CamelFilterSearchGetMessageFunc get_message,
-                           gpointer data,
+                           gpointer user_data,
                            CamelMessageInfo *info,
                            const gchar *source,
                           CamelFolder *folder,
@@ -1122,7 +1122,7 @@ camel_filter_search_match (CamelSession *session,
 
        fms.session = session;
        fms.get_message = get_message;
-       fms.get_message_data = data;
+       fms.get_message_data = user_data;
        fms.message = NULL;
        fms.info = info;
        fms.source = source;
diff --git a/camel/camel-filter-search.h b/camel/camel-filter-search.h
index d88ec01..a1669d6 100644
--- a/camel/camel-filter-search.h
+++ b/camel/camel-filter-search.h
@@ -42,7 +42,7 @@ typedef CamelMimeMessage * (*CamelFilterSearchGetMessageFunc) (gpointer data, GC
 
 gint camel_filter_search_match (struct _CamelSession *session,
                                CamelFilterSearchGetMessageFunc get_message,
-                               gpointer data,
+                               gpointer user_data,
                                CamelMessageInfo *info,
                                const gchar *source,
                                struct _CamelFolder *folder,
diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c
index 33d53a8..4ab2412 100644
--- a/camel/camel-folder-search.c
+++ b/camel/camel-folder-search.c
@@ -1812,7 +1812,7 @@ camel_folder_search_set_folder (CamelFolderSearch *search,
 /**
  * camel_folder_search_set_summary:
  * @search:
- * @summary: An array of CamelMessageInfo pointers.
+ * @summary: (element-type CamelMessageInfo): An array of CamelMessageInfo pointers.
  *
  * Set the array of summary objects representing the span of the search.
  *
@@ -2057,14 +2057,14 @@ fail:
  * camel_folder_search_search:
  * @search:
  * @expr:
- * @uids: to search against, NULL for all uid's.
+ * @uids: (element-type utf8): to search against, NULL for all uid's.
  * @cancellable: a #GCancellable
  * @error: return location for a #GError, or %NULL
  *
  * Run a search.  Search must have had Folder already set on it, and
  * it must implement summaries.
  *
- * Returns:
+ * Returns: (element-type utf8) (transfer full):
  **/
 GPtrArray *
 camel_folder_search_search (CamelFolderSearch *search,
@@ -2233,6 +2233,10 @@ fail:
        return matches;
 }
 
+/**
+ * camel_folder_search_free_result:
+ * @result: (element-type utf8):
+ **/
 void
 camel_folder_search_free_result (CamelFolderSearch *search,
                                  GPtrArray *result)
diff --git a/camel/camel-folder-search.h b/camel/camel-folder-search.h
index eca18cc..7c88f68 100644
--- a/camel/camel-folder-search.h
+++ b/camel/camel-folder-search.h
@@ -289,7 +289,7 @@ guint32             camel_folder_search_count       (CamelFolderSearch *search,
                                                 GCancellable *cancellable,
                                                 GError **error);
 void           camel_folder_search_free_result (CamelFolderSearch *search,
-                                                GPtrArray *);
+                                                GPtrArray *result);
 
 /* XXX This belongs in a general utility file. */
 time_t         camel_folder_search_util_add_months
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index 94579dd..b8c53a9 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -1362,10 +1362,10 @@ camel_folder_summary_new (CamelFolder *folder)
 }
 
 /**
- * camel_folder_summary_get_index:
+ * camel_folder_summary_get_folder:
  * @summary: a #CamelFolderSummary object
  *
- * Returns: a #CamelFolder to which the summary if associated.
+ * Returns: (transfer none): a #CamelFolder to which the summary if associated.
  *
  * Since: 3.4
  **/
@@ -1502,7 +1502,7 @@ camel_folder_summary_set_index (CamelFolderSummary *summary,
  * camel_folder_summary_get_index:
  * @summary: a #CamelFolderSummary object
  *
- * Returns: a #CamelIndex used to index body content.
+ * Returns: (transfer none): a #CamelIndex used to index body content.
  *
  * Since: 3.4
  **/
@@ -1736,7 +1736,7 @@ folder_summary_dupe_uids_to_array (gpointer key_uid,
  *
  * Free with camel_folder_summary_free_array()
  *
- * Returns: a #GPtrArray of uids
+ * Returns: (element-type utf8) (transfer full): a #GPtrArray of uids
  *
  * Since: 3.4
  **/
@@ -1759,7 +1759,7 @@ camel_folder_summary_get_array (CamelFolderSummary *summary)
 
 /**
  * camel_folder_summary_free_array:
- * @array: a #GPtrArray returned from camel_folder_summary_get_array()
+ * @array: (element-type utf8): a #GPtrArray returned from camel_folder_summary_get_array()
  *
  * Free's array and its elements returned from camel_folder_summary_get_array().
  *
@@ -1796,6 +1796,8 @@ cfs_copy_uids_cb (gpointer key,
  *
  * Note: When searching for values always use uids from the string pool.
  *
+ * Returns: (element-type utf8 gint) (transfer container):
+ *
  * Since: 3.6
  **/
 GHashTable *
@@ -2031,6 +2033,8 @@ gather_changed_uids (gpointer key,
 /**
  * camel_folder_summary_get_changed:
  *
+ * Returns: (element-type utf8) (transfer full):
+ *
  * Since: 2.24
  **/
 GPtrArray *
@@ -3386,7 +3390,7 @@ camel_folder_summary_remove_uid (CamelFolderSummary *summary,
 /**
  * camel_folder_summary_remove_uids:
  * @summary: a #CamelFolderSummary object
- * @uids: a GList of uids
+ * @uids: (element-type utf8): a GList of uids
  *
  * Remove a specific info record from the summary, by @uid.
  *
@@ -4468,11 +4472,11 @@ camel_system_flag_get (CamelMessageFlags flags,
 
 /**
  * camel_message_info_new:
- * @summary: a #CamelFolderSummary object or %NULL
+ * @summary: (nullable): a #CamelFolderSummary object or %NULL
  *
  * Create a new #CamelMessageInfo.
  *
- * Returns: a new #CamelMessageInfo
+ * Returns: (transfer full): a new #CamelMessageInfo
  **/
 gpointer
 camel_message_info_new (CamelFolderSummary *summary)
@@ -4504,6 +4508,7 @@ camel_message_info_new (CamelFolderSummary *summary)
  * @info: a #CamelMessageInfo
  *
  * Reference an info.
+ * Returns: (transfer full):
  **/
 gpointer
 camel_message_info_ref (gpointer o)
@@ -4526,7 +4531,7 @@ camel_message_info_ref (gpointer o)
  * Create a new #CamelMessageInfo pre-populated with info from
  * @header.
  *
- * Returns: a new #CamelMessageInfo
+ * Returns: (transfer full): a new #CamelMessageInfo
  **/
 CamelMessageInfo *
 camel_message_info_new_from_header (CamelFolderSummary *summary,
@@ -4583,7 +4588,7 @@ camel_message_info_unref (gpointer o)
  *
  * Duplicate a #CamelMessageInfo.
  *
- * Returns: the duplicated #CamelMessageInfo
+ * Returns: (transfer full): the duplicated #CamelMessageInfo
  **/
 gpointer
 camel_message_info_clone (gconstpointer o)
@@ -4603,7 +4608,7 @@ camel_message_info_clone (gconstpointer o)
  *
  * Generic accessor method for getting pointer data.
  *
- * Returns: the pointer data
+ * Returns: (transfer none): the pointer data
  **/
 gconstpointer
 camel_message_info_ptr (const CamelMessageInfo *info,
diff --git a/camel/camel-folder-summary.h b/camel/camel-folder-summary.h
index fcacb83..1a4da5e 100644
--- a/camel/camel-folder-summary.h
+++ b/camel/camel-folder-summary.h
@@ -290,7 +290,7 @@ struct _CamelFolderSummaryClass {
                                         const gchar *bodystructure);
        void            (*message_info_free)
                                        (CamelFolderSummary *summary,
-                                        CamelMessageInfo *info);
+                                        CamelMessageInfo *ci);
        CamelMessageInfo *
                        (*message_info_clone)
                                        (CamelFolderSummary *summary,
@@ -311,7 +311,7 @@ struct _CamelFolderSummaryClass {
                                         CamelMimePart *mime_part);
        void            (*content_info_free)
                                        (CamelFolderSummary *summary,
-                                        CamelMessageContentInfo *info);
+                                        CamelMessageContentInfo *ci);
        CamelMessageInfo *
                        (*message_info_from_uid)
                                        (CamelFolderSummary *summary,
diff --git a/camel/camel-folder-thread.c b/camel/camel-folder-thread.c
index 4db79b1..f085cec 100644
--- a/camel/camel-folder-thread.c
+++ b/camel/camel-folder-thread.c
@@ -636,7 +636,7 @@ thread_summary (CamelFolderThread *thread,
 /**
  * camel_folder_thread_messages_new:
  * @folder:
- * @uids: The subset of uid's to thread.  If NULL. then thread all
+ * @uids: (element-type utf8): The subset of uid's to thread.  If NULL. then thread all
  * uid's in @folder.
  * @thread_subject: thread based on subject also
  *
@@ -724,6 +724,10 @@ add_present_rec (CamelFolderThread *thread,
        }
 }
 
+/**
+ * camel_folder_thread_messages_apply:
+ * @uids:(element-type utf8) (transfer none):
+ **/
 void
 camel_folder_thread_messages_apply (CamelFolderThread *thread,
                                     GPtrArray *uids)
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index 5b03833..093f271 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -1611,7 +1611,7 @@ camel_folder_set_description (CamelFolder *folder,
  * camel_folder_get_parent_store:
  * @folder: a #CamelFolder
  *
- * Returns: the parent #CamelStore of the folder
+ * Returns: (transfer none): the parent #CamelStore of the folder
  **/
 CamelStore *
 camel_folder_get_parent_store (CamelFolder *folder)
@@ -1937,8 +1937,8 @@ camel_folder_has_summary_capability (CamelFolder *folder)
  * support summaries. The returned array should not be modified, and
  * must be freed by passing it to camel_folder_free_uids().
  *
- * Returns: a GPtrArray of UIDs corresponding to the messages available
- * in the folder
+ * Returns: (element-type utf8) (transfer none): a GPtrArray of UIDs
+ * corresponding to the messages available in the folder
  **/
 GPtrArray *
 camel_folder_get_uids (CamelFolder *folder)
@@ -1956,7 +1956,7 @@ camel_folder_get_uids (CamelFolder *folder)
 /**
  * camel_folder_free_uids:
  * @folder: a #CamelFolder
- * @array: the array of uids to free
+ * @array: (element-type utf8): the array of uids to free
  *
  * Frees the array of UIDs returned by camel_folder_get_uids().
  **/
@@ -1978,13 +1978,15 @@ camel_folder_free_uids (CamelFolder *folder,
 /**
  * camel_folder_get_uncached_uids:
  * @folder: a #CamelFolder
- * @uids: the array of uids to filter down to uncached ones.
+ * @uids: (element-type utf8): the array of uids to filter down to uncached ones.
  *
  * Returns the known-uncached uids from a list of uids. It may return uids
  * which are locally cached but should never filter out a uid which is not
  * locally cached. Free the result by called camel_folder_free_uids().
  * Frees the array of UIDs returned by camel_folder_get_uids().
  *
+ * Returns: (element-type utf8) (transfer none):
+ *
  * Since: 2.26
  **/
 GPtrArray *
@@ -2040,7 +2042,7 @@ camel_folder_cmp_uids (CamelFolder *folder,
 /**
  * camel_folder_sort_uids:
  * @folder: a #CamelFolder
- * @uids: array of uids
+ * @uids: (element-type utf8): array of uids
  *
  * Sorts the array of UIDs.
  *
@@ -2069,7 +2071,7 @@ camel_folder_sort_uids (CamelFolder *folder,
  * should not be modified, and must be freed with
  * camel_folder_free_summary().
  *
- * Returns: an array of #CamelMessageInfo
+ * Returns: (element-type CamelMessageInfo) (transfer none): an array of #CamelMessageInfo
  **/
 GPtrArray *
 camel_folder_get_summary (CamelFolder *folder)
@@ -2087,7 +2089,7 @@ camel_folder_get_summary (CamelFolder *folder)
 /**
  * camel_folder_free_summary:
  * @folder: a #CamelFolder
- * @array: the summary array to free
+ * @array: (element-type CamelMessageInfo): the summary array to free
  *
  * Frees the summary array returned by camel_folder_get_summary().
  **/
@@ -2109,14 +2111,15 @@ camel_folder_free_summary (CamelFolder *folder,
 /**
  * camel_folder_search_by_expression:
  * @folder: a #CamelFolder
- * @expr: a search expression
+ * @expression: a search expression
  * @cancellable: a #GCancellable
  * @error: return location for a #GError, or %NULL
  *
  * Searches the folder for messages matching the given search expression.
  *
- * Returns: a #GPtrArray of uids of matching messages. The caller must
- * free the list and each of the elements when it is done.
+ * Returns: (element-type utf8) (transfer full): a #GPtrArray of uids of
+ * matching messages. The caller must free the list and each of the elements
+ * when it is done.
  **/
 GPtrArray *
 camel_folder_search_by_expression (CamelFolder *folder,
@@ -2174,19 +2177,20 @@ camel_folder_count_by_expression (CamelFolder *folder,
 /**
  * camel_folder_search_by_uids:
  * @folder: a #CamelFolder
- * @expr: search expression
- * @uids: array of uid's to match against.
+ * @expression: search expression
+ * @uids: (element-type utf8): array of uid's to match against.
  * @cancellable: a #GCancellable
  * @error: return location for a #GError, or %NULL
  *
  * Search a subset of uid's for an expression match.
  *
- * Returns: a #GPtrArray of uids of matching messages. The caller must
- * free the list and each of the elements when it is done.
+ * Returns: (element-type utf8) (transfer full): a #GPtrArray of uids of
+ * matching messages. The caller must free the list and each of the elements
+ * when it is done.
  **/
 GPtrArray *
 camel_folder_search_by_uids (CamelFolder *folder,
-                             const gchar *expr,
+                             const gchar *expression,
                              GPtrArray *uids,
                              GCancellable *cancellable,
                              GError **error)
@@ -2201,7 +2205,7 @@ camel_folder_search_by_uids (CamelFolder *folder,
 
        /* NOTE: that it is upto the callee to CAMEL_FOLDER_REC_LOCK */
 
-       matches = class->search_by_uids (folder, expr, uids, cancellable, error);
+       matches = class->search_by_uids (folder, expression, uids, cancellable, error);
        CAMEL_CHECK_GERROR (folder, search_by_uids, matches != NULL, error);
 
        return matches;
@@ -2210,7 +2214,7 @@ camel_folder_search_by_uids (CamelFolder *folder,
 /**
  * camel_folder_search_free:
  * @folder: a #CamelFolder
- * @result: search results to free
+ * @result: (element-type utf8): search results to free
  *
  * Free the result of a search as gotten by camel_folder_search() or
  * camel_folder_search_by_uids().
@@ -2590,7 +2594,7 @@ camel_folder_free_nop (CamelFolder *folder,
 /**
  * camel_folder_free_shallow:
  * @folder: a #CamelFolder
- * @array: an array of uids or #CamelMessageInfo
+ * @array: (element-type utf8): an array of uids or #CamelMessageInfo
  *
  * Frees the provided array but not its contents. Used by #CamelFolder
  * subclasses as an implementation for free_uids or free_summary when
@@ -2607,7 +2611,7 @@ camel_folder_free_shallow (CamelFolder *folder,
 /**
  * camel_folder_free_deep:
  * @folder: a #CamelFolder
- * @array: an array of uids
+ * @array: (element-type utf8): an array of uids
  *
  * Frees the provided array and its contents. Used by #CamelFolder
  * subclasses as an implementation for free_uids when the provided
@@ -2995,7 +2999,7 @@ camel_folder_expunge_finish (CamelFolder *folder,
  *
  * Gets the message corresponding to @message_uid from @folder.
  *
- * Returns: a #CamelMimeMessage corresponding to the requested UID
+ * Returns: (transfer none): a #CamelMimeMessage corresponding to the requested UID
  *
  * Since: 3.0
  **/
@@ -3156,7 +3160,7 @@ camel_folder_get_message (CamelFolder *folder,
  *
  * Finishes the operation started with camel_folder_get_message().
  *
- * Returns: a #CamelMimeMessage corresponding to the requested UID
+ * Returns: (transfer none): a #CamelMimeMessage corresponding to the requested UID
  *
  * Since: 3.0
  **/
@@ -3920,11 +3924,12 @@ camel_folder_synchronize_message_finish (CamelFolder *folder,
 /**
  * camel_folder_transfer_messages_to_sync:
  * @source: the source #CamelFolder
- * @message_uids: message UIDs in @source
+ * @message_uids: (element-type utf8): message UIDs in @source
  * @destination: the destination #CamelFolder
  * @delete_originals: whether or not to delete the original messages
- * @transferred_uids: if non-%NULL, the UIDs of the resulting messages
- *                    in @destination will be stored here, if known.
+ * @transferred_uids: (element-type utf8) (out): if non-%NULL, the UIDs of the
+ *                    resulting messages in @destination will be stored here,
+ *                    if known.
  * @cancellable: optional #GCancellable object, or %NULL
  * @error: return location for a #GError, or %NULL
  *
@@ -4017,7 +4022,7 @@ folder_transfer_messages_to_thread (GTask *task,
 /**
  * camel_folder_transfer_messages_to:
  * @source: the source #CamelFolder
- * @message_uids: message UIDs in @source
+ * @message_uids: (element-type utf8): message UIDs in @source
  * @destination: the destination #CamelFolder
  * @delete_originals: whether or not to delete the original messages
  * @io_priority: the I/O priority of the request
@@ -4080,8 +4085,9 @@ camel_folder_transfer_messages_to (CamelFolder *source,
  * camel_folder_transfer_messages_to_finish:
  * @source: a #CamelFolder
  * @result: a #GAsyncResult
- * @transferred_uids: if non-%NULL, the UIDs of the resulting messages
- *                    in @destination will be stored here, if known.
+ * @transferred_uids: (element-type utf8) (out): if non-%NULL, the UIDs of the
+ *                    resulting messages in @destination will be stored here,
+ *                    if known.
  * @error: return location for a #GError, or %NULL
  *
  * Finishes the operation started with camel_folder_transfer_messages_to().
@@ -4174,7 +4180,7 @@ camel_folder_change_info_add_source (CamelFolderChangeInfo *info,
 /**
  * camel_folder_change_info_add_source_list:
  * @info: a #CamelFolderChangeInfo
- * @list: a list of uids
+ * @list: (element-type utf8) (transfer container): a list of uids
  *
  * Add a list of source uid's for generating a changeset.
  **/
@@ -4236,7 +4242,7 @@ camel_folder_change_info_add_update (CamelFolderChangeInfo *info,
 /**
  * camel_folder_change_info_add_update_list:
  * @info: a #CamelFolderChangeInfo
- * @list: a list of uids
+ * @list: (element-type utf8) (transfer container): a list of uids
  *
  * Add a list of uid's from the updated list.
  **/
diff --git a/camel/camel-folder.h b/camel/camel-folder.h
index 06843bc..1ff1e6e 100644
--- a/camel/camel-folder.h
+++ b/camel/camel-folder.h
@@ -187,7 +187,7 @@ struct _CamelFolderClass {
                                                 const gchar *uid);
        void            (*delete_)              (CamelFolder *folder);
        void            (*rename)               (CamelFolder *folder,
-                                                const gchar *newname);
+                                                const gchar *new_name);
        void            (*freeze)               (CamelFolder *folder);
        void            (*thaw)                 (CamelFolder *folder);
        gboolean        (*is_frozen)            (CamelFolder *folder);
@@ -257,7 +257,7 @@ struct _CamelFolderClass {
 
        /* Signals */
        void            (*changed)              (CamelFolder *folder,
-                                                CamelFolderChangeInfo *info);
+                                                CamelFolderChangeInfo *changes);
        void            (*deleted)              (CamelFolder *folder);
        void            (*renamed)              (CamelFolder *folder,
                                                 const gchar *old_name);
@@ -343,11 +343,11 @@ void              camel_folder_sort_uids          (CamelFolder *folder,
                                                 GPtrArray *uids);
 GPtrArray *    camel_folder_search_by_expression
                                                (CamelFolder *folder,
-                                                const gchar *expr,
+                                                const gchar *expression,
                                                 GCancellable *cancellable,
                                                 GError **error);
 GPtrArray *    camel_folder_search_by_uids     (CamelFolder *folder,
-                                                const gchar *expr,
+                                                const gchar *expression,
                                                 GPtrArray *uids,
                                                 GCancellable *cancellable,
                                                 GError **error);
diff --git a/camel/camel-html-parser.c b/camel/camel-html-parser.c
index 66187dd..1a6d0e5 100644
--- a/camel/camel-html-parser.c
+++ b/camel/camel-html-parser.c
@@ -145,6 +145,13 @@ const gchar *camel_html_parser_attr (CamelHTMLParser *hp, const gchar *name)
        return NULL;
 }
 
+/**
+ * camel_html_parser_attr_list:
+ * @values: (element-type utf8) (inout):
+ *
+ * Returns: (element-type utf8) (transfer none):
+ *
+ **/
 const GPtrArray *camel_html_parser_attr_list (CamelHTMLParser *hp, const GPtrArray **values)
 {
        if (values)
diff --git a/camel/camel-index.c b/camel/camel-index.c
index 2f65a6f..82c37ae 100644
--- a/camel/camel-index.c
+++ b/camel/camel-index.c
@@ -112,20 +112,20 @@ camel_index_rename (CamelIndex *idx,
 /**
  * camel_index_set_normalize:
  * @index: a #CamelIndex
- * @func: normalization function
- * @data: user data for @func
+ * @func: (scope call): normalization function
+ * @user_data: user data for @func
  *
  * Since: 2.32
  **/
 void
 camel_index_set_normalize (CamelIndex *index,
                            CamelIndexNorm func,
-                           gpointer data)
+                           gpointer user_data)
 {
        g_return_if_fail (CAMEL_IS_INDEX (index));
 
        index->normalize = func;
-       index->normalize_data = data;
+       index->normalize_data = user_data;
 }
 
 gint
@@ -203,19 +203,25 @@ camel_index_has_name (CamelIndex *idx,
                return FALSE;
 }
 
+/**
+ * camel_index_add_name:
+ * @index: a #CamelIndex
+ *
+ * Returns: (transfer none) (nullable):
+ **/
 CamelIndexName *
-camel_index_add_name (CamelIndex *idx,
+camel_index_add_name (CamelIndex *index,
                       const gchar *name)
 {
        CamelIndexClass *class;
 
-       g_return_val_if_fail (CAMEL_IS_INDEX (idx), NULL);
+       g_return_val_if_fail (CAMEL_IS_INDEX (index), NULL);
 
-       class = CAMEL_INDEX_GET_CLASS (idx);
+       class = CAMEL_INDEX_GET_CLASS (index);
        g_return_val_if_fail (class->add_name != NULL, NULL);
 
-       if ((idx->state & CAMEL_INDEX_DELETED) == 0)
-               return class->add_name (idx, name);
+       if ((index->state & CAMEL_INDEX_DELETED) == 0)
+               return class->add_name (index, name);
        else
                return NULL;
 }
@@ -239,19 +245,25 @@ camel_index_write_name (CamelIndex *idx,
        }
 }
 
+/**
+ * camel_index_find_name:
+ * @index: a #CamelIndex
+ *
+ * Returns: (transfer none) (nullable):
+ **/
 CamelIndexCursor *
-camel_index_find_name (CamelIndex *idx,
+camel_index_find_name (CamelIndex *index,
                        const gchar *name)
 {
        CamelIndexClass *class;
 
-       g_return_val_if_fail (CAMEL_IS_INDEX (idx), NULL);
+       g_return_val_if_fail (CAMEL_IS_INDEX (index), NULL);
 
-       class = CAMEL_INDEX_GET_CLASS (idx);
+       class = CAMEL_INDEX_GET_CLASS (index);
        g_return_val_if_fail (class->find_name != NULL, NULL);
 
-       if ((idx->state & CAMEL_INDEX_DELETED) == 0)
-               return class->find_name (idx, name);
+       if ((index->state & CAMEL_INDEX_DELETED) == 0)
+               return class->find_name (index, name);
        else
                return NULL;
 }
@@ -271,26 +283,32 @@ camel_index_delete_name (CamelIndex *idx,
                class->delete_name (idx, name);
 }
 
+/**
+ * camel_index_find:
+ * @index: a #CamelIndex
+ *
+ * Returns: (transfer none) (nullable):
+ **/
 CamelIndexCursor *
-camel_index_find (CamelIndex *idx,
+camel_index_find (CamelIndex *index,
                   const gchar *word)
 {
        CamelIndexClass *class;
        CamelIndexCursor *ret;
        gchar *b = (gchar *) word;
 
-       g_return_val_if_fail (CAMEL_IS_INDEX (idx), NULL);
+       g_return_val_if_fail (CAMEL_IS_INDEX (index), NULL);
 
-       class = CAMEL_INDEX_GET_CLASS (idx);
+       class = CAMEL_INDEX_GET_CLASS (index);
        g_return_val_if_fail (class->find != NULL, NULL);
 
-       if ((idx->state & CAMEL_INDEX_DELETED) != 0)
+       if ((index->state & CAMEL_INDEX_DELETED) != 0)
                return NULL;
 
-       if (idx->normalize)
-               b = idx->normalize (idx, word, idx->normalize_data);
+       if (index->normalize)
+               b = index->normalize (index, word, index->normalize_data);
 
-       ret = class->find (idx, b);
+       ret = class->find (index, b);
 
        if (b != word)
                g_free (b);
@@ -298,18 +316,24 @@ camel_index_find (CamelIndex *idx,
        return ret;
 }
 
+/**
+ * camel_index_words:
+ * @index: a #CamelIndex
+ *
+ * Returns: (transfer none) (nullable):
+ **/
 CamelIndexCursor *
-camel_index_words (CamelIndex *idx)
+camel_index_words (CamelIndex *index)
 {
        CamelIndexClass *class;
 
-       g_return_val_if_fail (CAMEL_IS_INDEX (idx), NULL);
+       g_return_val_if_fail (CAMEL_IS_INDEX (index), NULL);
 
-       class = CAMEL_INDEX_GET_CLASS (idx);
+       class = CAMEL_INDEX_GET_CLASS (index);
        g_return_val_if_fail (class->words != NULL, NULL);
 
-       if ((idx->state & CAMEL_INDEX_DELETED) == 0)
-               return class->words (idx);
+       if ((index->state & CAMEL_INDEX_DELETED) == 0)
+               return class->words (index);
        else
                return NULL;
 }
diff --git a/camel/camel-index.h b/camel/camel-index.h
index 4d14fbb..5bec6cf 100644
--- a/camel/camel-index.h
+++ b/camel/camel-index.h
@@ -191,7 +191,7 @@ gint                camel_index_rename              (CamelIndex *index,
                                                 const gchar *path);
 void           camel_index_set_normalize       (CamelIndex *index,
                                                 CamelIndexNorm func,
-                                                gpointer data);
+                                                gpointer user_data);
 gint           camel_index_sync                (CamelIndex *index);
 gint           camel_index_compress            (CamelIndex *index);
 gint           camel_index_delete              (CamelIndex *index);
diff --git a/camel/camel-medium.c b/camel/camel-medium.c
index 882de6f..b518383 100644
--- a/camel/camel-medium.c
+++ b/camel/camel-medium.c
@@ -260,7 +260,7 @@ camel_medium_remove_header (CamelMedium *medium,
  * instance of the header.  For multi-occuring headers, use
  * :get_headers().
  *
- * Returns: the value of the named header, or %NULL
+ * Returns: (transfer none) (nullable): the value of the named header, or %NULL
  **/
 gconstpointer
 camel_medium_get_header (CamelMedium *medium,
@@ -286,8 +286,8 @@ camel_medium_get_header (CamelMedium *medium,
  * to UTF-8 for any headers that are recognized by Camel. The
  * caller should not modify the returned data.
  *
- * Returns: the array of headers, which must be freed with
- * camel_medium_free_headers().
+ * Returns: (element-type CamelMediumHeader) (transfer full): the array of
+ * headers, which must be freed with camel_medium_free_headers().
  **/
 GArray *
 camel_medium_get_headers (CamelMedium *medium)
@@ -305,7 +305,8 @@ camel_medium_get_headers (CamelMedium *medium)
 /**
  * camel_medium_free_headers:
  * @medium: a #CamelMedium object
- * @headers: an array of headers returned from camel_medium_get_headers()
+ * @headers: (element-type CamelMediumHeader): an array of headers returned
+ * from camel_medium_get_headers()
  *
  * Frees @headers.
  **/
@@ -331,7 +332,8 @@ camel_medium_free_headers (CamelMedium *medium,
  * Gets a data wrapper that represents the content of the medium,
  * without its headers.
  *
- * Returns: a #CamelDataWrapper containing @medium's content. Can return NULL.
+ * Returns: (transfer none) (nullable): a #CamelDataWrapper containing
+ * @medium's content. Can return NULL.
  **/
 CamelDataWrapper *
 camel_medium_get_content (CamelMedium *medium)
diff --git a/camel/camel-memchunk.c b/camel/camel-memchunk.c
index 8d29faa..d99f3de 100644
--- a/camel/camel-memchunk.c
+++ b/camel/camel-memchunk.c
@@ -108,7 +108,7 @@ camel_memchunk_new (gint atomcount,
  * Allocate a new atom size block of memory from an #CamelMemChunk.
  * Free the returned atom with camel_memchunk_free().
  *
- * Returns: an allocated block of memory
+ * Returns: (transfer full): an allocated block of memory
  *
  * Since: 3.4
  **/
@@ -148,7 +148,7 @@ camel_memchunk_alloc (CamelMemChunk *memchunk)
  * and fill the memory with zeros.  Free the returned atom with
  * camel_memchunk_free().
  *
- * Returns: an allocated block of memory
+ * Returns: (transfer full): an allocated block of memory
  *
  * Since: 3.4
  **/
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
index cdd85ae..2b54c98 100644
--- a/camel/camel-mime-message.c
+++ b/camel/camel-mime-message.c
@@ -610,7 +610,7 @@ camel_mime_message_set_reply_to (CamelMimeMessage *msg,
  *
  * Get the Reply-To of a message.
  *
- * Returns: the Reply-Toa ddress of the message
+ * Returns: (transfer none): the Reply-To address of the message
  **/
 CamelInternetAddress *
 camel_mime_message_get_reply_to (CamelMimeMessage *mime_message)
@@ -712,7 +712,7 @@ camel_mime_message_set_from (CamelMimeMessage *msg,
  *
  * Get the from address of a message.
  *
- * Returns: the from address of the message
+ * Returns: (transfer none): the from address of the message
  **/
 CamelInternetAddress *
 camel_mime_message_get_from (CamelMimeMessage *mime_message)
@@ -772,7 +772,7 @@ camel_mime_message_set_recipients (CamelMimeMessage *mime_message,
  *
  * Get the message recipients of a specified type.
  *
- * Returns: the requested recipients
+ * Returns: (transfer none): the requested recipients
  **/
 CamelInternetAddress *
 camel_mime_message_get_recipients (CamelMimeMessage *mime_message,
@@ -1178,7 +1178,7 @@ check_content_id (CamelMimeMessage *message,
  *
  * Get a MIME part by id from a message.
  *
- * Returns: the MIME part with the requested id or %NULL if not found
+ * Returns: (transfer none): the MIME part with the requested id or %NULL if not found
  **/
 CamelMimePart *
 camel_mime_message_get_part_by_content_id (CamelMimeMessage *message,
diff --git a/camel/camel-mime-parser.c b/camel/camel-mime-parser.c
index a0287b4..3b4fdf5 100644
--- a/camel/camel-mime-parser.c
+++ b/camel/camel-mime-parser.c
@@ -330,7 +330,7 @@ camel_mime_parser_header (CamelMimeParser *m,
  * current state of the parser.  These headers are valid
  * until the next call to parser_step(), or parser_drop_step().
  *
- * Returns: The raw headers, or NULL if there are no headers
+ * Returns: (transfer none): The raw headers, or NULL if there are no headers
  * defined for the current part or state.  These are READ ONLY.
  *
  * Since: 2.22
@@ -909,8 +909,8 @@ camel_mime_parser_push_state (CamelMimeParser *mp,
  * be read from directly (without saving and restoring
  * the seek position in between).
  *
- * Returns: The stream from _init_with_stream(), or NULL
- * if the parser is reading from a file descriptor or is
+ * Returns: (transfer none) (nullable): The stream from _init_with_stream(),
+ * or NULL if the parser is reading from a file descriptor or is
  * uninitialised.
  **/
 CamelStream *
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index 117f163..ff9859f 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -1309,7 +1309,7 @@ camel_mime_part_set_content_md5 (CamelMimePart *mime_part,
  *
  * Get the Content-Languages set on the MIME part.
  *
- * Returns: a #GList of languages
+ * Returns: (element-type utf8) (transfer none): a #GList of languages
  **/
 const GList *
 camel_mime_part_get_content_languages (CamelMimePart *mime_part)
@@ -1322,7 +1322,7 @@ camel_mime_part_get_content_languages (CamelMimePart *mime_part)
 /**
  * camel_mime_part_set_content_languages:
  * @mime_part: a #CamelMimePart
- * @content_languages: list of languages
+ * @content_languages: (element-type utf8): list of languages
  *
  * Set the Content-Languages field of a MIME part.
  **/
diff --git a/camel/camel-multipart-signed.c b/camel/camel-multipart-signed.c
index 1fa5091..0480c61 100644
--- a/camel/camel-multipart-signed.c
+++ b/camel/camel-multipart-signed.c
@@ -782,7 +782,7 @@ camel_multipart_signed_new (void)
  * Get the raw signed content stream of the multipart/signed MIME part
  * suitable for use with verification of the signature.
  *
- * Returns: the signed content stream
+ * Returns: (transfer full): the signed content stream
  **/
 CamelStream *
 camel_multipart_signed_get_content_stream (CamelMultipartSigned *mps,
diff --git a/camel/camel-multipart.c b/camel/camel-multipart.c
index 896e539..e33f31f 100644
--- a/camel/camel-multipart.c
+++ b/camel/camel-multipart.c
@@ -459,7 +459,7 @@ camel_multipart_add_part (CamelMultipart *multipart,
  * @multipart: a #CamelMultipart object
  * @index: a zero-based index indicating the part to get
  *
- * Returns: the indicated subpart, or %NULL
+ * Returns: (transfer none): the indicated subpart, or %NULL
  **/
 CamelMimePart *
 camel_multipart_get_part (CamelMultipart *multipart,
diff --git a/camel/camel-net-utils.c b/camel/camel-net-utils.c
index 81f23d6..91cfafd 100644
--- a/camel/camel-net-utils.c
+++ b/camel/camel-net-utils.c
@@ -681,6 +681,8 @@ cs_getaddrinfo (gpointer data)
 /**
  * camel_getaddrinfo:
  *
+ * Returns: (transfer none):
+ *
  * Since: 2.22
  **/
 struct addrinfo *
diff --git a/camel/camel-network-service.c b/camel/camel-network-service.c
index 9df4265..19d0d9e 100644
--- a/camel/camel-network-service.c
+++ b/camel/camel-network-service.c
@@ -713,7 +713,7 @@ camel_network_service_get_default_port (CamelNetworkService *service,
  * The returned #GSocketConnectable is referenced for thread-safety and
  * must be unreferenced with g_object_unref() when finished with it.
  *
- * Returns: a #GSocketConnectable
+ * Returns: (transfer full): a #GSocketConnectable
  *
  * Since: 3.8
  **/
@@ -824,7 +824,7 @@ camel_network_service_get_host_reachable (CamelNetworkService *service)
  * connection attempt is cancelled, the function sets @error and returns
  * %NULL.
  *
- * Returns: a #GIOStream, or %NULL
+ * Returns: (transfer full): a #GIOStream, or %NULL
  *
  * Since: 3.2
  **/
@@ -856,7 +856,7 @@ camel_network_service_connect_sync (CamelNetworkService *service,
  * This should typically be called after issuing a STARTTLS command
  * to a server to initiate a Transport Layer Security handshake.
  *
- * Returns: the new #GTlsClientConnection, or %NULL on error
+ * Returns: (transfer full): the new #GTlsClientConnection, or %NULL on error
  *
  * Since: 3.12
  **/
diff --git a/camel/camel-object-bag.c b/camel/camel-object-bag.c
index 8b5f788..79c3cec 100644
--- a/camel/camel-object-bag.c
+++ b/camel/camel-object-bag.c
@@ -152,10 +152,10 @@ wref_free_func (gpointer p)
 
 /**
  * camel_object_bag_new:
- * @key_hash_func: a hashing function for keys
- * @key_equal_func: a comparison function for keys
- * @key_copy_func: a function to copy keys
- * @key_free_func: a function to free keys
+ * @key_hash_func: (scope call): a hashing function for keys
+ * @key_equal_func: (scope call): a comparison function for keys
+ * @key_copy_func: (scope call): a function to copy keys
+ * @key_free_func: (scope call): a function to free keys
  *
  * Returns a new object bag.  Object bags are keyed hash tables of objects
  * that can be updated atomically using transaction semantics.  Use
@@ -209,7 +209,8 @@ camel_object_bag_new (GHashFunc key_hash_func,
  * caller owns the reference to the returned object.  Use g_object_unref ()
  * to unreference it.
  *
- * Returns: the object corresponding to @key, or %NULL if not found
+ * Returns: (transfer full) (nullable): the object corresponding to @key, or
+ * %NULL if not found
  **/
 gpointer
 camel_object_bag_get (CamelObjectBag *bag,
@@ -284,7 +285,8 @@ camel_object_bag_get (CamelObjectBag *bag,
  * Unlink other "peek" operations, the caller owns the returned object
  * reference.  Use g_object_unref () to unreference it.
  *
- * Returns: the object for @key, or %NULL if @key is reserved or not found
+ * Returns: (transfer full) (nullable): the object for @key, or %NULL if @key
+ * is reserved or not found
  **/
 gpointer
 camel_object_bag_peek (CamelObjectBag *bag,
@@ -320,7 +322,8 @@ camel_object_bag_peek (CamelObjectBag *bag,
  * %NULL, signifying that you MUST call either camel_object_bag_add() or
  * camel_object_bag_abort().
  *
- * Returns: the object for @key, or %NULL if @key is not found
+ * Returns: (transfer full) (nullable): the object for @key, or %NULL if @key
+ * is not found
  **/
 gpointer
 camel_object_bag_reserve (CamelObjectBag *bag,
@@ -532,7 +535,7 @@ camel_object_bag_rekey (CamelObjectBag *bag,
  *   </programlisting>
  * </informalexample>
  *
- * Returns: an array of objects in @bag
+ * Returns: (element-type GObject) (transfer full): an array of objects in @bag
  **/
 GPtrArray *
 camel_object_bag_list (CamelObjectBag *bag)
diff --git a/camel/camel-provider.c b/camel/camel-provider.c
index 62ec6a8..33b760c 100644
--- a/camel/camel-provider.c
+++ b/camel/camel-provider.c
@@ -330,7 +330,7 @@ add_to_list (gpointer key,
  * Free the returned list with g_list_free().  The #CamelProvider structs
  * in the list are owned by Camel and should not be modified or freed.
  *
- * Returns: a #GList of #CamelProvider structs
+ * Returns: (element-type CamelProvider) (transfer container): a #GList of #CamelProvider structs
  **/
 GList *
 camel_provider_list (gboolean load)
diff --git a/camel/camel-sasl.c b/camel/camel-sasl.c
index 711e2ad..9096f88 100644
--- a/camel/camel-sasl.c
+++ b/camel/camel-sasl.c
@@ -548,6 +548,8 @@ camel_sasl_get_mechanism (CamelSasl *sasl)
  * camel_sasl_get_service:
  * @sasl: a #CamelSasl
  *
+ * Returns: (transfer none):
+ *
  * Since: 2.32
  **/
 CamelService *
@@ -586,7 +588,7 @@ camel_sasl_get_service_name (CamelSasl *sasl)
  *
  * Free the returned #GByteArray with g_byte_array_free().
  *
- * Returns: the SASL response or %NULL. If an error occurred, @error will
+ * Returns: (transfer full): the SASL response or %NULL. If an error occurred, @error will
  * also be set.
  **/
 GByteArray *
@@ -698,7 +700,7 @@ camel_sasl_challenge (CamelSasl *sasl,
  * Finishes the operation started with camel_sasl_challenge().  Free the
  * returned #GByteArray with g_byte_array_free().
  *
- * Returns: the SASL response or %NULL.  If an error occurred, @error will
+ * Returns: (transfer full): the SASL response or %NULL.  If an error occurred, @error will
  * also be set.
  *
  * Since: 3.0
@@ -728,7 +730,7 @@ camel_sasl_challenge_finish (CamelSasl *sasl,
  * As with camel_sasl_challenge_sync(), but the challenge @token and the
  * response are both base64-encoded.
  *
- * Returns: the base64-encoded response
+ * Returns: (transfer full): the base64-encoded response
  *
  * Since: 3.0
  **/
@@ -879,7 +881,7 @@ camel_sasl_challenge_base64_finish (CamelSasl *sasl,
  * camel_sasl_authtype_list:
  * @include_plain: whether or not to include the PLAIN mechanism
  *
- * Returns: a #GList of SASL-supported authtypes. The caller must
+ * Returns: (element-type CamelServiceAuthType) (transfer container): a #GList of SASL-supported authtypes. 
The caller must
  * free the list, but not the contents.
  **/
 GList *
diff --git a/camel/camel-service.c b/camel/camel-service.c
index a34ca48..09ab840 100644
--- a/camel/camel-service.c
+++ b/camel/camel-service.c
@@ -1494,7 +1494,7 @@ camel_service_get_provider (CamelService *service)
  * The returned #GProxyResolver is referenced for thread-safety and must
  * be unreferenced with g_object_unref() when finished with it.
  *
- * Returns: a #GProxyResolver, or %NULL
+ * Returns: (transfer full): a #GProxyResolver, or %NULL
  *
  * Since: 3.12
  **/
@@ -1569,7 +1569,7 @@ camel_service_set_proxy_resolver (CamelService *service,
  * The returned #CamelSession is referenced for thread-safety.  Unreference
  * the #CamelSession with g_object_unref() when finished with it.
  *
- * Returns: the #CamelSession
+ * Returns: (transfer full): the #CamelSession
  *
  * Since: 3.8
  **/
@@ -1590,7 +1590,7 @@ camel_service_ref_session (CamelService *service)
  * The returned #CamelSettings is referenced for thread-safety and must
  * be unreferenced with g_object_unref() when finished with it.
  *
- * Returns: the #CamelSettings
+ * Returns: (transfer full): the #CamelSettings
  *
  * Since: 3.6
  **/
@@ -1691,7 +1691,7 @@ camel_service_get_uid (CamelService *service)
  * camel_service_queue_task:
  * @service: a #CamelService
  * @task: a #GTask
- * @task_func: function to call when @task is dispatched
+ * @task_func: (scope async): function to call when @task is dispatched
  *
  * Adds @task to a queue of waiting tasks with the same source object.
  * Queued tasks execute one at a time in the order they were added.  When
@@ -2274,7 +2274,7 @@ camel_service_authenticate_finish (CamelService *service,
  * Obtains a list of authentication types supported by @service.
  * Free the returned list with g_list_free().
  *
- * Returns: a list of #CamelServiceAuthType structs
+ * Returns: (element-type CamelServiceAuthType) (transfer container): a list of #CamelServiceAuthType structs
  **/
 GList *
 camel_service_query_auth_types_sync (CamelService *service,
@@ -2361,7 +2361,7 @@ camel_service_query_auth_types (CamelService *service,
  * Finishes the operation started with camel_service_query_auth_types().
  * Free the returned list with g_list_free().
  *
- * Returns: a list of #CamelServiceAuthType structs
+ * Returns: (element-type CamelServiceAuthType) (transfer container): a list of #CamelServiceAuthType structs
  *
  * Since: 3.2
  **/
diff --git a/camel/camel-session.c b/camel/camel-session.c
index b59a39f..9fd8c80 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -804,7 +804,7 @@ camel_session_get_user_cache_dir (CamelSession *session)
  * The returned #CamelService is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: a #CamelService instance, or %NULL
+ * Returns: (transfer full): a #CamelService instance, or %NULL
  *
  * Since: 3.2
  **/
@@ -866,7 +866,7 @@ camel_session_remove_service (CamelSession *session,
  * The returned #CamelService is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: a #CamelService instance, or %NULL
+ * Returns: (transfer full): a #CamelService instance, or %NULL
  *
  * Since: 3.6
  **/
@@ -907,7 +907,7 @@ camel_session_ref_service (CamelSession *session,
  *
  * Note this function is significantly slower than camel_session_ref_service().
  *
- * Returns: a #CamelService instance, or %NULL
+ * Returns: (transfer full): a #CamelService instance, or %NULL
  *
  * Since: 3.6
  **/
@@ -986,7 +986,7 @@ camel_session_ref_service_by_url (CamelSession *session,
  *   g_list_free_full (list, g_object_unref);
  * ]|
  *
- * Returns: an unsorted list of #CamelService objects
+ * Returns: (element-type CamelService) (transfer full): an unsorted list of #CamelService objects
  *
  * Since: 3.2
  **/
@@ -1270,7 +1270,7 @@ camel_session_set_online (CamelSession *session,
  * @type: the type of filter (eg, "incoming")
  * @error: return location for a #GError, or %NULL
  *
- * Returns: a filter driver, loaded with applicable rules
+ * Returns:(transfer none): a filter driver, loaded with applicable rules
  **/
 CamelFilterDriver *
 camel_session_get_filter_driver (CamelSession *session,
@@ -1303,7 +1303,7 @@ camel_session_get_filter_driver (CamelSession *session,
  * must implement the interface and install a #CamelJunkFilter instance for
  * junk filtering to take place.
  *
- * Returns: a #CamelJunkFilter, or %NULL
+ * Returns: (transfer none): a #CamelJunkFilter, or %NULL
  *
  * Since: 3.2
  **/
diff --git a/camel/camel-settings.c b/camel/camel-settings.c
index f05bb67..fdeb8e7 100644
--- a/camel/camel-settings.c
+++ b/camel/camel-settings.c
@@ -144,7 +144,7 @@ camel_settings_init (CamelSettings *settings)
  * to be settings, but subclasses may wish to exclude certain properties.
  * Free the returned array with g_free().
  *
- * Returns: an array of #GParamSpec which should be freed after use
+ * Returns: (transfer full): an array of #GParamSpec which should be freed after use
  *
  * Since: 3.2
  **/
@@ -169,7 +169,7 @@ camel_settings_class_list_settings (CamelSettingsClass *settings_class,
  * as @settings, and copies all #GObject property values from @settings
  * to the new instance.
  *
- * Returns: a newly-created copy of @settings
+ * Returns: (transfer full): a newly-created copy of @settings
  *
  * Since: 3.2
  **/
diff --git a/camel/camel-sexp.c b/camel/camel-sexp.c
index cc659f1..adcaa66 100644
--- a/camel/camel-sexp.c
+++ b/camel/camel-sexp.c
@@ -1532,6 +1532,7 @@ camel_sexp_new (void)
 
 /**
  * camel_sexp_add_function:
+ * @func: (scope call):
  *
  * Since: 3.4
  **/
@@ -1540,7 +1541,7 @@ camel_sexp_add_function (CamelSExp *sexp,
                          guint scope,
                          const gchar *name,
                          CamelSExpFunc func,
-                         gpointer data)
+                         gpointer user_data)
 {
        CamelSExpSymbol *sym;
 
@@ -1553,13 +1554,14 @@ camel_sexp_add_function (CamelSExp *sexp,
        sym->name = g_strdup (name);
        sym->f.func = func;
        sym->type = CAMEL_SEXP_TERM_FUNC;
-       sym->data = data;
+       sym->data = user_data;
 
        g_scanner_scope_add_symbol (sexp->scanner, scope, sym->name, sym);
 }
 
 /**
  * camel_sexp_add_ifunction:
+ * @func: (scope call):
  *
  * Since: 3.4
  **/
@@ -1568,7 +1570,7 @@ camel_sexp_add_ifunction (CamelSExp *sexp,
                           guint scope,
                           const gchar *name,
                           CamelSExpIFunc ifunc,
-                          gpointer data)
+                          gpointer user_data)
 {
        CamelSExpSymbol *sym;
 
@@ -1581,7 +1583,7 @@ camel_sexp_add_ifunction (CamelSExp *sexp,
        sym->name = g_strdup (name);
        sym->f.ifunc = ifunc;
        sym->type = CAMEL_SEXP_TERM_IFUNC;
-       sym->data = data;
+       sym->data = user_data;
 
        g_scanner_scope_add_symbol (sexp->scanner, scope, sym->name, sym);
 }
diff --git a/camel/camel-sexp.h b/camel/camel-sexp.h
index 34f984e..e0d824a 100644
--- a/camel/camel-sexp.h
+++ b/camel/camel-sexp.h
@@ -192,12 +192,12 @@ void              camel_sexp_add_function         (CamelSExp *sexp,
                                                 guint scope,
                                                 const gchar *name,
                                                 CamelSExpFunc func,
-                                                gpointer data);
+                                                gpointer user_data);
 void           camel_sexp_add_ifunction        (CamelSExp *sexp,
                                                 guint scope,
                                                 const gchar *name,
                                                 CamelSExpIFunc func,
-                                                gpointer data);
+                                                gpointer user_data);
 void           camel_sexp_add_variable         (CamelSExp *sexp,
                                                 guint scope,
                                                 gchar *name,
diff --git a/camel/camel-smime-context.h b/camel/camel-smime-context.h
index 9163af4..10e6b0e 100644
--- a/camel/camel-smime-context.h
+++ b/camel/camel-smime-context.h
@@ -82,7 +82,7 @@ void camel_smime_context_set_encrypt_key (CamelSMIMEContext *context, gboolean u
 /* set signing mode, clearsigned multipart/signed or enveloped */
 void camel_smime_context_set_sign_mode (CamelSMIMEContext *context, camel_smime_sign_t type);
 
-guint32 camel_smime_context_describe_part (CamelSMIMEContext *, struct _CamelMimePart *);
+guint32 camel_smime_context_describe_part (CamelSMIMEContext *context, struct _CamelMimePart *part);
 
 G_END_DECLS
 
diff --git a/camel/camel-store-summary.c b/camel/camel-store-summary.c
index a73adc8..94497f6 100644
--- a/camel/camel-store-summary.c
+++ b/camel/camel-store-summary.c
@@ -347,7 +347,7 @@ camel_store_summary_count (CamelStoreSummary *summary)
  *
  * It must be freed using camel_store_summary_array_free().
  *
- * Returns: the summary array
+ * Returns: (element-type CamelStoreInfo) (transfer full): the summary array
  **/
 GPtrArray *
 camel_store_summary_array (CamelStoreSummary *summary)
@@ -375,7 +375,7 @@ camel_store_summary_array (CamelStoreSummary *summary)
 /**
  * camel_store_summary_array_free:
  * @summary: a #CamelStoreSummary object
- * @array: the summary array as gotten from camel_store_summary_array()
+ * @array: (element-type CamelStoreInfo): the summary array as gotten from camel_store_summary_array()
  *
  * Free the folder summary array.
  **/
diff --git a/camel/camel-store.c b/camel/camel-store.c
index 1fb36e0..1912081 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -1003,7 +1003,7 @@ folder_info_cmp (gconstpointer ap,
 
 /**
  * camel_folder_info_build:
- * @folders: an array of #CamelFolderInfo
+ * @folders: (element-type CamelFolderInfo): an array of #CamelFolderInfo
  * @namespace_: an ignorable prefix on the folder names
  * @separator: the hieararchy separator character
  * @short_names: %TRUE if the (short) name of a folder is the part after
@@ -1020,6 +1020,7 @@ folder_info_cmp (gconstpointer ap,
  * NOTE: This is deprected, do not use this.
  * FIXME: remove this/move it to imap, which is the only user of it now.
  *
+ * Deprecated:
  * Returns: the top level of the tree of linked folder info.
  **/
 CamelFolderInfo *
@@ -1195,7 +1196,7 @@ camel_store_can_refresh_folder (CamelStore *store,
  *
  * Gets a specific folder object from @store by name.
  *
- * Returns: the requested #CamelFolder object, or %NULL on error
+ * Returns: (transfer full): the requested #CamelFolder object, or %NULL on error
  *
  * Since: 3.0
  **/
@@ -1471,7 +1472,7 @@ camel_store_get_folder (CamelStore *store,
  *
  * Finishes the operation started with camel_store_get_folder().
  *
- * Returns: the requested #CamelFolder object, or %NULL on error
+ * Returns: (transfer full): the requested #CamelFolder object, or %NULL on error
  *
  * Since: 3.0
  **/
@@ -1787,7 +1788,7 @@ camel_store_get_folder_info_finish (CamelStore *store,
  *
  * Gets the folder in @store into which new mail is delivered.
  *
- * Returns: the inbox folder for @store, or %NULL on error or if no such
+ * Returns: (transfer full): the inbox folder for @store, or %NULL on error or if no such
  * folder exists
  *
  * Since: 3.0
@@ -1880,7 +1881,7 @@ camel_store_get_inbox_folder (CamelStore *store,
  *
  * Finishes the operation started with camel_store_get_inbox_folder().
  *
- * Returns: the inbox folder for @store, or %NULL on error or if no such
+ * Returns: (transfer full): the inbox folder for @store, or %NULL on error or if no such
  * folder exists
  *
  * Since: 3.0
@@ -1908,7 +1909,7 @@ camel_store_get_inbox_folder_finish (CamelStore *store,
  *
  * Gets the folder in @store into which junk is delivered.
  *
- * Returns: the junk folder for @store, or %NULL on error or if no such
+ * Returns: (transfer full): the junk folder for @store, or %NULL on error or if no such
  * folder exists
  *
  * Since: 3.0
@@ -2006,7 +2007,7 @@ camel_store_get_junk_folder (CamelStore *store,
  *
  * Finishes the operation started with camel_store_get_junk_folder().
  *
- * Returns: the junk folder for @store, or %NULL on error or if no such
+ * Returns: (transfer full): the junk folder for @store, or %NULL on error or if no such
  * folder exists
  *
  * Since: 3.0
@@ -2034,7 +2035,7 @@ camel_store_get_junk_folder_finish (CamelStore *store,
  *
  * Gets the folder in @store into which trash is delivered.
  *
- * Returns: the trash folder for @store, or %NULL on error or if no such
+ * Returns:(transfer full):  the trash folder for @store, or %NULL on error or if no such
  * folder exists
  *
  * Since: 3.0
@@ -2133,7 +2134,7 @@ camel_store_get_trash_folder (CamelStore *store,
  *
  * Finishes the operation started with camel_store_get_trash_folder().
  *
- * Returns: the trash folder for @store, or %NULL on error or if no such
+ * Returns: (transfer full): the trash folder for @store, or %NULL on error or if no such
  * folder exists
  *
  * Since: 3.0
diff --git a/camel/camel-stream-filter.c b/camel/camel-stream-filter.c
index 94c6ae6..1430433 100644
--- a/camel/camel-stream-filter.c
+++ b/camel/camel-stream-filter.c
@@ -447,6 +447,8 @@ camel_stream_filter_new (CamelStream *source)
  * camel_stream_filter_get_source:
  * @stream: a #CamelStreamFilter
  *
+ * Returns: (transfer none):
+ *
  * Since: 2.32
  **/
 CamelStream *
diff --git a/camel/camel-stream-mem.c b/camel/camel-stream-mem.c
index d3032a3..3a9e38e 100644
--- a/camel/camel-stream-mem.c
+++ b/camel/camel-stream-mem.c
@@ -344,6 +344,8 @@ camel_stream_mem_set_secure (CamelStreamMem *mem)
  * camel_stream_mem_get_byte_array:
  * @mem: a #CamelStreamMem
  *
+ * Returns: (transfer none):
+ *
  * Since: 2.32
  **/
 GByteArray *
diff --git a/camel/camel-stream.c b/camel/camel-stream.c
index 980c70b..5973f48 100644
--- a/camel/camel-stream.c
+++ b/camel/camel-stream.c
@@ -426,7 +426,7 @@ camel_stream_new (GIOStream *base_stream)
  * The returned #GIOStream is referenced for thread-safety and should be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: a #GIOStream, or %NULL
+ * Returns: (transfer full) (nullable): a #GIOStream, or %NULL
  *
  * Since: 3.12
  **/
diff --git a/camel/camel-transport.c b/camel/camel-transport.c
index 847baa5..ddde8ea 100644
--- a/camel/camel-transport.c
+++ b/camel/camel-transport.c
@@ -80,7 +80,7 @@ camel_transport_init (CamelTransport *transport)
  * @message: a #CamelMimeMessage to send
  * @from: a #CamelAddress to send from
  * @recipients: a #CamelAddress containing all recipients
- * @out_sent_message_saved: set to %TRUE, if the sent message was also saved
+ * @out_sent_message_saved: (out): set to %TRUE, if the sent message was also saved
  * @cancellable: optional #GCancellable object, or %NULL
  * @error: return location for a #GError, or %NULL
  *
@@ -237,7 +237,7 @@ camel_transport_send_to (CamelTransport *transport,
  * camel_transport_send_to_finish:
  * @transport: a #CamelTransport
  * @result: a #GAsyncResult
- * @out_sent_message_saved: set to %TRUE, if the sent message was also saved
+ * @out_sent_message_saved: (out): set to %TRUE, if the sent message was also saved
  * @error: return locaton for a #GError, or %NULL
  *
  * Finishes the operation started with camel_transport_send_to().
diff --git a/camel/camel-uid-cache.c b/camel/camel-uid-cache.c
index 0b3a0be..2033894 100644
--- a/camel/camel-uid-cache.c
+++ b/camel/camel-uid-cache.c
@@ -252,12 +252,12 @@ camel_uid_cache_destroy (CamelUIDCache *cache)
 /**
  * camel_uid_cache_get_new_uids:
  * @cache: a CamelUIDCache
- * @uids: an array of UIDs
+ * @uids: (element-type utf8) (transfer none): an array of UIDs
  *
  * Returns an array of UIDs from @uids that are not in @cache, and
  * removes UIDs from @cache that aren't in @uids.
  *
- * Returns: an array of new UIDs, which must be freed with
+ * Returns: (element-type utf8) (transfer full): an array of new UIDs, which must be freed with
  * camel_uid_cache_free_uids().
  **/
 GPtrArray *
@@ -322,7 +322,7 @@ camel_uid_cache_save_uid (CamelUIDCache *cache,
 
 /**
  * camel_uid_cache_free_uids:
- * @uids: an array returned from camel_uid_cache_get_new_uids()
+ * @uids: (element-type utf8) (transfer full): an array returned from camel_uid_cache_get_new_uids()
  *
  * Frees the array of UIDs.
  **/
diff --git a/camel/camel-vee-data-cache.c b/camel/camel-vee-data-cache.c
index 1eb67aa..ba439e0 100644
--- a/camel/camel-vee-data-cache.c
+++ b/camel/camel-vee-data-cache.c
@@ -156,6 +156,8 @@ camel_vee_subfolder_data_new (CamelFolder *folder)
  *
  * FIXME Document me!
  *
+ * Returns: (transfer none):
+ *
  * Since: 3.6
  **/
 CamelFolder *
@@ -282,6 +284,8 @@ camel_vee_message_info_data_new (CamelVeeSubfolderData *subfolder_data,
  *
  * FIXME Document me!
  *
+ * Returns: (transfer none):
+ *
  * Since: 3.6
  **/
 CamelVeeSubfolderData *
@@ -575,6 +579,8 @@ camel_vee_data_cache_remove_subfolder (CamelVeeDataCache *data_cache,
  *
  * FIXME Document me!
  *
+ * Returns: (transfer full):
+ *
  * Since: 3.6
  **/
 CamelVeeSubfolderData *
@@ -643,6 +649,8 @@ camel_vee_data_cache_contains_message_info_data (CamelVeeDataCache *data_cache,
  *
  * FIXME Document me!
  *
+ * Returns: (transfer full):
+ *
  * Since: 3.6
  **/
 CamelVeeMessageInfoData *
@@ -705,6 +713,8 @@ camel_vee_data_cache_get_message_info_data (CamelVeeDataCache *data_cache,
  *
  * FIXME Document me!
  *
+ * Returns: (transfer full):
+ *
  * Since: 3.6
  **/
 CamelVeeMessageInfoData *
@@ -735,9 +745,7 @@ camel_vee_data_cache_get_message_info_data_by_vuid (CamelVeeDataCache *data_cach
 
 struct ForeachMiData {
        CamelFolder *fromfolder;
-       void (* func) (CamelVeeMessageInfoData *mi_data,
-                       CamelFolder *subfolder,
-                       gpointer user_data);
+       CamelForeachInfoData func;
        gpointer user_data;
 };
 
@@ -760,7 +768,7 @@ cvdc_foreach_mi_data_cb (gpointer key,
 
 /**
  * camel_vee_data_cache_foreach_message_info_data:
- *
+ * @func: (scope call) (closure user_data):
  * FIXME Document me!
  *
  * Since: 3.6
@@ -768,9 +776,7 @@ cvdc_foreach_mi_data_cb (gpointer key,
 void
 camel_vee_data_cache_foreach_message_info_data (CamelVeeDataCache *data_cache,
                                                 CamelFolder *fromfolder,
-                                                void (* func) (CamelVeeMessageInfoData *mi_data,
-                                                                CamelFolder *subfolder,
-                                                                gpointer user_data),
+                                                CamelForeachInfoData func,
                                                 gpointer user_data)
 {
        struct ForeachMiData fmd;
diff --git a/camel/camel-vee-data-cache.h b/camel/camel-vee-data-cache.h
index 85f8333..9c42cc4 100644
--- a/camel/camel-vee-data-cache.h
+++ b/camel/camel-vee-data-cache.h
@@ -96,6 +96,12 @@ typedef struct _CamelVeeDataCacheClass CamelVeeDataCacheClass;
 typedef struct _CamelVeeDataCachePrivate CamelVeeDataCachePrivate;
 
 /**
+ * CamelForeachInfoData:
+ *
+ **/
+typedef void (*CamelForeachInfoData) (CamelVeeMessageInfoData *mi_data, CamelFolder *subfolder, gpointer 
user_data);
+
+/**
  * CamelVeeSubfolderData:
  *
  * Since: 3.6
diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c
index afbf857..b076563 100644
--- a/camel/camel-vee-folder.c
+++ b/camel/camel-vee-folder.c
@@ -1452,7 +1452,7 @@ remove_folders (CamelFolder *folder,
 /**
  * camel_vee_folder_set_folders:
  * @vf:
- * @folders:
+ * @folders: (element-type CamelFolder) (transfer none):
  *
  * Set the whole list of folder sources on a vee folder.
  **/
@@ -1616,7 +1616,7 @@ camel_vee_folder_remove_vuid (CamelVeeFolder *vfolder,
  *
  * Find the real folder (and uid)
  *
- * Returns:
+ * Returns: (transfer none):
  **/
 CamelFolder *
 camel_vee_folder_get_location (CamelVeeFolder *vf,
@@ -1653,6 +1653,8 @@ camel_vee_folder_get_location (CamelVeeFolder *vf,
  *
  * FIXME Document me!
  *
+ * Returns: (transfer none):
+ *
  * Since: 3.6
  **/
 CamelFolder *
diff --git a/camel/camel-vee-folder.h b/camel/camel-vee-folder.h
index c0aeb7c..c1854bc 100644
--- a/camel/camel-vee-folder.h
+++ b/camel/camel-vee-folder.h
@@ -66,21 +66,21 @@ struct _CamelVeeFolderClass {
 
        /* TODO: Some of this may need some additional work/thinking through, it works for now*/
 
-       void            (*add_folder)           (CamelVeeFolder *vee_folder,
-                                                CamelFolder *folder,
+       void            (*add_folder)           (CamelVeeFolder *vfolder,
+                                                CamelFolder *subfolder,
                                                 GCancellable *cancellable);
-       void            (*remove_folder)        (CamelVeeFolder *vee_folder,
-                                                CamelFolder *folder,
+       void            (*remove_folder)        (CamelVeeFolder *vfolder,
+                                                CamelFolder *subfolder,
                                                 GCancellable *cancellable);
-       void            (*rebuild_folder)       (CamelVeeFolder *vee_folder,
-                                                CamelFolder *folder,
+       void            (*rebuild_folder)       (CamelVeeFolder *vfolder,
+                                                CamelFolder *subfolder,
                                                 GCancellable *cancellable);
 
-       void            (*set_expression)       (CamelVeeFolder *vee_folder,
+       void            (*set_expression)       (CamelVeeFolder *vfolder,
                                                 const gchar *expression);
 
        /* Called for a folder-changed event on a source folder */
-       void            (*folder_changed)       (CamelVeeFolder *vee_folder,
+       void            (*folder_changed)       (CamelVeeFolder *vfolder,
                                                 CamelFolder *subfolder,
                                                 CamelFolderChangeInfo *changes);
 };
diff --git a/camel/camel-vee-store.c b/camel/camel-vee-store.c
index 75737dd..97511cc 100644
--- a/camel/camel-vee-store.c
+++ b/camel/camel-vee-store.c
@@ -566,6 +566,8 @@ camel_vee_store_new (void)
  *
  * FIXME Document me!
  *
+ * Returns: (transfer none):
+ *
  * Since: 3.6
  **/
 CamelVeeDataCache *
@@ -581,6 +583,8 @@ camel_vee_store_get_vee_data_cache (CamelVeeStore *vstore)
  *
  * FIXME Document me!
  *
+ * Returns: (transfer none):
+ *
  * Since: 3.6
  **/
 CamelVeeFolder *
diff --git a/camel/camel-vee-summary.c b/camel/camel-vee-summary.c
index f602f2f..ef7a203 100644
--- a/camel/camel-vee-summary.c
+++ b/camel/camel-vee-summary.c
@@ -420,6 +420,8 @@ get_uids_for_subfolder (gpointer key,
  *
  * FIXME Document me!
  *
+ * Returns: (element-type utf8 utf8) (transfer container):
+ *
  * Since: 3.6
  **/
 GHashTable *
diff --git a/camel/camel.c b/camel/camel.c
index 8505c95..0789426 100644
--- a/camel/camel.c
+++ b/camel/camel.c
@@ -275,6 +275,8 @@ static GRecMutex camel_binding_lock;
  * Thread safe variant of g_object_bind_property(). See its documentation
  * for more information on arguments and return value.
  *
+ * Returns: (transfer none):
+ *
  * Since: 3.16
  **/
 GBinding *
@@ -297,10 +299,27 @@ camel_binding_bind_property (gpointer source,
 
 /**
  * camel_binding_bind_property_full:
+ * @source: (type GObject.Object): the source #GObject
+ * @source_property: the property on @source to bind
+ * @target: (type GObject.Object): the target #GObject
+ * @target_property: the property on @target to bind
+ * @flags: flags to pass to #GBinding
+ * @transform_to: (scope notified) (allow-none): the transformation function
+ *   from the @source to the @target, or %NULL to use the default
+ * @transform_from: (scope notified) (allow-none): the transformation function
+ *   from the @target to the @source, or %NULL to use the default
+ * @user_data: custom data to be passed to the transformation functions,
+ *   or %NULL
+ * @notify: function to be called when disposing the binding, to free the
+ *   resources used by the transformation functions
  *
  * Thread safe variant of g_object_bind_property_full(). See its documentation
  * for more information on arguments and return value.
  *
+ * Return value: (transfer none): the #GBinding instance representing the
+ *   binding between the two #GObject instances. The binding is released
+ *   whenever the #GBinding reference count reaches zero.
+ *
  * Since: 3.16
  **/
 GBinding *
@@ -327,11 +346,24 @@ camel_binding_bind_property_full (gpointer source,
 }
 
 /**
- * camel_binding_bind_property_with_closures:
+ * camel_binding_bind_property_with_closures: (rename-to camel_binding_bind_property_full)
+ * @source: (type GObject.Object): the source #GObject
+ * @source_property: the property on @source to bind
+ * @target: (type GObject.Object): the target #GObject
+ * @target_property: the property on @target to bind
+ * @flags: flags to pass to #GBinding
+ * @transform_to: a #GClosure wrapping the transformation function
+ *   from the @source to the @target, or %NULL to use the default
+ * @transform_from: a #GClosure wrapping the transformation function
+ *   from the @target to the @source, or %NULL to use the default
  *
  * Thread safe variant of g_object_bind_property_with_closures(). See its
  * documentation for more information on arguments and return value.
  *
+ * Return value: (transfer none): the #GBinding instance representing the
+ *   binding between the two #GObject instances. The binding is released
+ *   whenever the #GBinding reference count reaches zero.
+ *
  * Since: 3.16
  **/
 GBinding *
diff --git a/libedataserver/Makefile.am b/libedataserver/Makefile.am
index 57870d7..a71ea8f 100644
--- a/libedataserver/Makefile.am
+++ b/libedataserver/Makefile.am
@@ -268,7 +268,7 @@ introspection_sources = \
        $(NULL)
 
 EDataServer-1.2.gir: libedataserver-1.2.la
-EDataServer_1_2_gir_INCLUDES = GObject-2.0 libxml2-2.0 Gio-2.0
+EDataServer_1_2_gir_INCLUDES = GObject-2.0 libxml2-2.0 Gio-2.0 Soup-2.4
 EDataServer_1_2_gir_CFLAGS = \
        -I$(top_srcdir) \
        -I$(top_builddir) \
diff --git a/libedataserver/e-data-server-util.c b/libedataserver/e-data-server-util.c
index 7dc777c..1eead56 100644
--- a/libedataserver/e-data-server-util.c
+++ b/libedataserver/e-data-server-util.c
@@ -1151,7 +1151,7 @@ e_queue_transfer (GQueue *src_queue,
  *
  * Free the returned #GWeakRef with e_weak_ref_free().
  *
- * Returns: a new #GWeakRef
+ * Returns: (transfer full): a new #GWeakRef
  *
  * Since: 3.10
  **/
@@ -1331,7 +1331,7 @@ e_file_recursive_delete (GFile *file,
 /**
  * e_file_recursive_delete_finish:
  * @file: a #GFile to delete
- * @result: a #GAsyncResult
+ * @result: (transfer full): a #GAsyncResult
  * @error: return location for a #GError, or %NULL
  *
  * Finishes the operation started with e_file_recursive_delete().
@@ -1366,6 +1366,8 @@ e_file_recursive_delete_finish (GFile *file,
  * Thread safe variant of g_object_bind_property(). See its documentation
  * for more information on arguments and return value.
  *
+ * Returns: (transfer none):
+ *
  * Since: 3.16
  **/
 GBinding *
@@ -1380,10 +1382,27 @@ e_binding_bind_property (gpointer source,
 
 /**
  * e_binding_bind_property_full:
+ * @source: (type GObject.Object): the source #GObject
+ * @source_property: the property on @source to bind
+ * @target: (type GObject.Object): the target #GObject
+ * @target_property: the property on @target to bind
+ * @flags: flags to pass to #GBinding
+ * @transform_to: (scope notified) (allow-none): the transformation function
+ *   from the @source to the @target, or %NULL to use the default
+ * @transform_from: (scope notified) (allow-none): the transformation function
+ *   from the @target to the @source, or %NULL to use the default
+ * @user_data: custom data to be passed to the transformation functions,
+ *   or %NULL
+ * @notify: function to be called when disposing the binding, to free the
+ *   resources used by the transformation functions
  *
  * Thread safe variant of g_object_bind_property_full(). See its documentation
  * for more information on arguments and return value.
  *
+ * Return value: (transfer none): the #GBinding instance representing the
+ *   binding between the two #GObject instances. The binding is released
+ *   whenever the #GBinding reference count reaches zero.
+ *
  * Since: 3.16
  **/
 GBinding *
@@ -1402,11 +1421,24 @@ e_binding_bind_property_full (gpointer source,
 }
 
 /**
- * e_binding_bind_property_with_closures:
+ * e_binding_bind_property_with_closures: (rename-to e_binding_bind_property_full)
+ * @source: (type GObject.Object): the source #GObject
+ * @source_property: the property on @source to bind
+ * @target: (type GObject.Object): the target #GObject
+ * @target_property: the property on @target to bind
+ * @flags: flags to pass to #GBinding
+ * @transform_to: a #GClosure wrapping the transformation function
+ *   from the @source to the @target, or %NULL to use the default
+ * @transform_from: a #GClosure wrapping the transformation function
+ *   from the @target to the @source, or %NULL to use the default
  *
  * Thread safe variant of g_object_bind_property_with_closures(). See its
  * documentation for more information on arguments and return value.
  *
+ * Return value: (transfer none): the #GBinding instance representing the
+ *   binding between the two #GObject instances. The binding is released
+ *   whenever the #GBinding reference count reaches zero.
+ *
  * Since: 3.16
  **/
 GBinding *
@@ -2721,7 +2753,7 @@ e_source_registry_debug_print (const gchar *format,
 /**
  * e_type_traverse:
  * @parent_type: the root #GType to traverse from
- * @func: the function to call for each visited #GType
+ * @func: (scope call): the function to call for each visited #GType
  * @user_data: user data to pass to the function
  *
  * Calls @func for all instantiable subtypes of @parent_type.
@@ -2837,8 +2869,28 @@ e_util_get_source_full_name (ESourceRegistry *registry,
        return g_string_free (fullname, FALSE);
 }
 
+
+/**
+ * e_util_get_source_oauth2_access_token_sync:
+ * @source: an #ESource
+ * @credentials: an ENamedParameters
+ * @out_access_token: (allow-none) (out): return location for the access token,
+ *                    or %NULL
+ * @out_expires_in_seconds: (allow-none) (out): return location for the token expiry,
+ *                  or %NULL
+ * @cancellable: (allow-none): optional #GCancellable object, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * Obtains the OAuth 2.0 access token for @source along with its expiry
+ * in seconds from the current time (or 0 if unknown).
+ *
+ * Free the returned access token with g_free() when finished with it.
+ * If an error occurs, the function will set @error and return %FALSE.
+ *
+ * Returns: %TRUE on success, %FALSE on error
+ **/
 gboolean
-e_util_get_source_oauth2_access_token_sync (struct _ESource *source,
+e_util_get_source_oauth2_access_token_sync (ESource *source,
                                            const ENamedParameters *credentials,
                                            gchar **out_access_token,
                                            gint *out_expires_in_seconds,
diff --git a/libedataserver/e-extensible.c b/libedataserver/e-extensible.c
index fb57705..bcf1e57 100644
--- a/libedataserver/e-extensible.c
+++ b/libedataserver/e-extensible.c
@@ -168,7 +168,7 @@ e_extensible_load_extensions (EExtensible *extensible)
  * The list itself should be freed with g_list_free().  The extension
  * objects are owned by @extensible and should not be unreferenced.
  *
- * Returns: a list of extension objects derived from @extension_type
+ * Returns: (element-type EExtension) (transfer container): a list of extension objects derived from 
@extension_type
  *
  * Since: 3.4
  **/
diff --git a/libedataserver/e-extension.c b/libedataserver/e-extension.c
index 020e4a9..f9edd7d 100644
--- a/libedataserver/e-extension.c
+++ b/libedataserver/e-extension.c
@@ -178,7 +178,7 @@ e_extension_init (EExtension *extension)
  *
  * Returns the object that @extension extends.
  *
- * Returns: the object being extended
+ * Returns: (transfer none): the object being extended
  *
  * Since: 3.4
  **/
diff --git a/libedataserver/e-module.c b/libedataserver/e-module.c
index db3af10..b25c04f 100644
--- a/libedataserver/e-module.c
+++ b/libedataserver/e-module.c
@@ -251,7 +251,7 @@ e_module_new (const gchar *filename)
  * Returns the filename of the shared library for @module.  The
  * string is owned by @module and should not be modified or freed.
  *
- * Returns: the filename for @module
+ * Returns: (transfer none): the filename for @module
  *
  * Since: 3.4
  **/
@@ -272,7 +272,7 @@ e_module_get_filename (EModule *module)
  * g_type_module_unuse() on all the modules.  Free the returned list
  * with g_list_free().
  *
- * Returns: a list of #EModules loaded from @dirname
+ * Returns: (element-type EModule) (transfer container): a list of #EModules loaded from @dirname
  *
  * Since: 3.4
  **/
@@ -326,7 +326,7 @@ e_module_load_all_in_directory (const gchar *dirname)
  * you want to unload it (enabling on-demand loading) you must call
  * g_type_module_unuse() on the module.
  *
- * Returns: an #EModule loaded from @filename
+ * Returns: (transfer full): an #EModule loaded from @filename
  *
  * Since: 3.16
  **/
diff --git a/libedataserver/e-source-credentials-provider-impl.c 
b/libedataserver/e-source-credentials-provider-impl.c
index af44353..109e7f6 100644
--- a/libedataserver/e-source-credentials-provider-impl.c
+++ b/libedataserver/e-source-credentials-provider-impl.c
@@ -115,7 +115,7 @@ e_source_credentials_provider_impl_init (ESourceCredentialsProviderImpl *provide
  *
  * Returns an #ESourceCredentialsProvider with which the @provider_impl is associated.
  *
- * Returns: an #ESourceCredentialsProvider
+ * Returns: (transfer none) : an #ESourceCredentialsProvider
  *
  * Since: 3.16
  **/
@@ -210,7 +210,7 @@ e_source_credentials_provider_impl_can_prompt (ESourceCredentialsProviderImpl *p
  * @provider_impl: an #ESourceCredentialsProviderImpl
  * @source: an #ESource
  * @cancellable: (allow-none): optional #GCancellable object, or %NULL
- * @out_credentials: an #ENamedParameters to be set with stored credentials
+ * @out_credentials: (out): an #ENamedParameters to be set with stored credentials
  * @error: (allow-none): return location for a #GError, or %NULL
  *
  * Asks @provider_impl to lookup for stored credentials for @source.
diff --git a/libedataserver/e-source-credentials-provider.c b/libedataserver/e-source-credentials-provider.c
index 93a466e..2a9a8da 100644
--- a/libedataserver/e-source-credentials-provider.c
+++ b/libedataserver/e-source-credentials-provider.c
@@ -290,7 +290,7 @@ e_source_credentials_provider_new (ESourceRegistry *registry)
  *
  * Returns refenrenced registry associated with this @provider.
  *
- * Returns: Reference registry associated with this @provider. Unref it
+ * Returns: (transfer full): Reference registry associated with this @provider. Unref it
  *    with g_object_unref() when no longer needed.
  *
  * Since: 3.16
@@ -409,7 +409,7 @@ e_source_credentials_provider_ref_source (ESourceCredentialsProvider *provider,
  * sources. When ther eis no such parent source, a %NULL is returned, which
  * means the @source holds credentials for itself.
  *
- * Returns: referenced parent #ESource, which holds credentials, or %NULL. Unref
+ * Returns: (transfer full): referenced parent #ESource, which holds credentials, or %NULL. Unref
  *    the returned non-NULL #ESource with g_object_unref(), when no longer needed.
  *
  * Since: 3.16
diff --git a/libedataserver/e-source-extension.c b/libedataserver/e-source-extension.c
index 46a8316..3545e6f 100644
--- a/libedataserver/e-source-extension.c
+++ b/libedataserver/e-source-extension.c
@@ -180,7 +180,7 @@ e_source_extension_init (ESourceExtension *extension)
  * The returned #ESource is referenced for thread-safety.  Unreference
  * the #ESource with g_object_unref() when finished with it.
  *
- * Returns: the #ESource instance
+ * Returns: (transfer full): the #ESource instance
  *
  * Since: 3.8
  **/
diff --git a/libedataserver/e-source-local.c b/libedataserver/e-source-local.c
index f39564f..ec171fb 100644
--- a/libedataserver/e-source-local.c
+++ b/libedataserver/e-source-local.c
@@ -125,6 +125,12 @@ e_source_local_init (ESourceLocal *extension)
        extension->priv = E_SOURCE_LOCAL_GET_PRIVATE (extension);
 }
 
+/**
+ * e_source_local_get_custom_file:
+ * @extension: an #ESourceLocal
+ *
+ * Returns: (transfer none): the #GFile instance
+ **/
 GFile *
 e_source_local_get_custom_file (ESourceLocal *extension)
 {
@@ -133,6 +139,12 @@ e_source_local_get_custom_file (ESourceLocal *extension)
        return extension->priv->custom_file;
 }
 
+/**
+ * e_source_local_dup_custom_file:
+ * @extension: an #ESourceLocal
+ *
+ * Returns: (transfer full): the #GFile instance
+ **/
 GFile *
 e_source_local_dup_custom_file (ESourceLocal *extension)
 {
diff --git a/libedataserver/e-source-proxy.c b/libedataserver/e-source-proxy.c
index 4b5dd05..43c8a20 100644
--- a/libedataserver/e-source-proxy.c
+++ b/libedataserver/e-source-proxy.c
@@ -1613,7 +1613,7 @@ e_source_proxy_set_socks_port (ESourceProxy *extension,
  *
  * Free the returned proxy URIs with g_strfreev() when finished with them.
  *
- * Returns: a %NULL-terminated array of proxy URIs, or %NULL
+ * Returns: (transfer full): a %NULL-terminated array of proxy URIs, or %NULL
  *
  * Since: 3.12
  **/
@@ -1830,7 +1830,7 @@ e_source_proxy_lookup (ESource *source,
  *
  * Free the returned proxy URIs with g_strfreev() when finished with them.
  *
- * Returns: a %NULL-terminated array of proxy URIs, or %NULL
+ * Returns: (transfer full): a %NULL-terminated array of proxy URIs, or %NULL
  *
  * Since: 3.12
  **/
diff --git a/libedataserver/e-webdav-discover.c b/libedataserver/e-webdav-discover.c
index 35a1b2f..7c0f22b 100644
--- a/libedataserver/e-webdav-discover.c
+++ b/libedataserver/e-webdav-discover.c
@@ -1503,7 +1503,7 @@ e_webdav_discover_source_free (gpointer ptr)
 
 /**
  * e_webdav_discover_free_discovered_sources:
- * @discovered_sources: A #GSList of discovered sources
+ * @discovered_sources: (element-type EWebDAVDiscoveredSource): A #GSList of discovered sources
  *
  * Frees a @GSList of discovered sources returned from
  * e_webdav_discover_sources_finish() or e_webdav_discover_sources_sync().
@@ -1594,14 +1594,14 @@ e_webdav_discover_sources (ESource *source,
  * e_webdav_discover_sources_finish:
  * @source: an #ESource on which the operation was started
  * @result: a #GAsyncResult
- * @out_certificate_pem: (out): (allow-none): optional return location
+ * @out_certificate_pem: (out) (allow-none): optional return location
  *   for a server SSL certificate in PEM format, when the operation failed
  *   with an SSL error
- * @out_certificate_errors: (out): (allow-none): optional #GTlsCertificateFlags,
+ * @out_certificate_errors: (out) (allow-none): optional #GTlsCertificateFlags,
  *   with certificate error flags when the operation failed with SSL error
- * @out_discovered_sources: (out): (element-type EWebDAVDiscoveredSource): a #GSList
+ * @out_discovered_sources: (out) (element-type EWebDAVDiscoveredSource): a #GSList
  *   of all discovered sources
- * @out_calendar_user_addresses: (out): (allow-none): (element-type gchar *): a #GSList of
+ * @out_calendar_user_addresses: (out) (allow-none) (element-type utf8): a #GSList of
  *   all discovered mail addresses for calendar sources
  * @error: (allow-none): return location for a #GError, or %NULL
  *
@@ -1680,14 +1680,14 @@ e_webdav_discover_cancelled_cb (GCancellable *cancellable,
  * @url_use_path: (allow-none): optional URL override, or %NULL
  * @only_supports: bit-or of EWebDAVDiscoverSupports, to limit what type of sources to search
  * @credentials: (allow-none): credentials to use for authentication to the server
- * @out_certificate_pem: (out): (allow-none): optional return location
+ * @out_certificate_pem: (out) (allow-none): optional return location
  *   for a server SSL certificate in PEM format, when the operation failed
  *   with an SSL error
- * @out_certificate_errors: (out): (allow-none): optional #GTlsCertificateFlags,
+ * @out_certificate_errors: (out) (allow-none): optional #GTlsCertificateFlags,
  *   with certificate error flags when the operation failed with SSL error
- * @out_discovered_sources: (out): (element-type EWebDAVDiscoveredSource): a #GSList
+ * @out_discovered_sources: (out) (element-type EWebDAVDiscoveredSource): a #GSList
  *   of all discovered sources
- * @out_calendar_user_addresses: (out): (allow-none): (element-type gchar *): a #GSList of
+ * @out_calendar_user_addresses: (out) (allow-none) (element-type utf8): a #GSList of
  *   all discovered mail addresses for calendar sources
  * @cancellable: (allow-none): optional #GCancellable object, or %NULL
  * @error: (allow-none): return location for a #GError, or %NULL
diff --git a/libedataserver/e-xml-utils.c b/libedataserver/e-xml-utils.c
index c425577..77bf015 100644
--- a/libedataserver/e-xml-utils.c
+++ b/libedataserver/e-xml-utils.c
@@ -158,7 +158,7 @@ e_xml_save_file (const gchar *filename,
  * Attempts to find a child element of @parent named @child_name.
  * If no such child exists, the function returns %NULL.
  *
- * Returns: a child XML node structure, or %NULL
+ * Returns: (nullable): a child XML node structure, or %NULL
  **/
 xmlNode *
 e_xml_get_child_by_name (const xmlNode *parent,
diff --git a/libedataserver/eds-version.c b/libedataserver/eds-version.c
index c595626..447c115 100644
--- a/libedataserver/eds-version.c
+++ b/libedataserver/eds-version.c
@@ -23,7 +23,7 @@ const guint eds_minor_version = EDS_MINOR_VERSION;
 const guint eds_micro_version = EDS_MICRO_VERSION;
 
 /**
- * eds_check_version:
+ * eds_check_version: (rename-to e_check_version)
  * @required_major: the required major version
  * @required_minor: the required minor version
  * @required_micro: the required micro version
diff --git a/vala/Camel-1.2.metadata b/vala/Camel-1.2.metadata
new file mode 100644
index 0000000..8c3232c
--- /dev/null
+++ b/vala/Camel-1.2.metadata
@@ -0,0 +1,20 @@
+CipherValidity.sign skip
+CipherValidity.encrypt skip
+
+FilterGetFolderFunc skip=false
+FilterDriver.set* skip=false
+
+// We need to skip the methods because the signals and virtual methods have the same name
+Object.state_read#method skip
+Object.state_write#method skip
+Operation.pop_message skip
+Operation.progress skip
+
+Session* skip=false
+SExp* skip=false
+
+// Recursive structs are not allowed
+MessageContentInfo.next type="void*"
+MessageContentInfo.childs type="void*"
+MessageContentInfo.parent type="void*"
+SExpTerm.value.func.terms type="void*[]"
diff --git a/vala/EDataServer-1.2.metadata b/vala/EDataServer-1.2.metadata
index 82bc914..c00f113 100644
--- a/vala/EDataServer-1.2.metadata
+++ b/vala/EDataServer-1.2.metadata
@@ -1,3 +1,30 @@
 NamedParameters type="GLib.PtrArray"
 // libxml2: replace xml.NodePtr by xml.Node* used by Vala bindings
 xml_save_file.doc type="Xml.Doc*"
+xml_from_hash skip=false type="Xml.Doc*"
+xmlhash_new skip=false type="E.XmlHash"
+xml_parse_file skip=false type="Xml.Doc*"
+xml_get_child_by_name skip=false type="Xml.Node*?"
+xml_get_child_by_name.parent type="Xml.Node*"
+xml_get_child_by_name.child_name type="string"
+
+xmlhash_add parent="E.XmlHash"
+xmlhash_compare parent="E.XmlHash"
+xmlhash_destroy parent="E.XmlHash"
+xmlhash_foreach_key_remove parent="E.XmlHash"
+xmlhash_foreach_key parent="E.XmlHash"
+xmlhash_new parent="E.XmlHash"
+xmlhash_remove parent="E.XmlHash"
+xmlhash_write parent="E.XmlHash"
+
+time_parse_date.result type="Posix.tm"
+time_parse_date_and_time.result type="Posix.tm"
+time_parse_date_and_time_ex.result type="Posix.tm"
+time_parse_date_ex.result type="Posix.tm"
+time_parse_time.result type="Posix.tm"
+utf8_strftime.tm type="Posix.tm"
+localtime_with_offset.tm type="Posix.tm"
+strftime.tm type="Posix.tm"
+mktime_utc.tm type="Posix.tm"
+time_format_date_and_time.date_tm type="Posix.tm"
+time_format_time.date_tm type="Posix.tm"
diff --git a/vala/Makefile.am b/vala/Makefile.am
index 6f9d874..bd1c9aa 100644
--- a/vala/Makefile.am
+++ b/vala/Makefile.am
@@ -2,6 +2,7 @@ NULL =
 
 vapidir = $(datarootdir)/vala/vapi
 vapi_DATA = \
+       libcamel-1.2.vapi \
        libedataserver-1.2.vapi \
        libebook-1.2.vapi \
        libebook-contacts-1.2.vapi \
@@ -13,6 +14,7 @@ dist_vapi_DATA = \
        $(NULL)
 
 EXTRA_DIST = \
+       Camel-1.2.metadata \
        EBook-1.2.metadata \
        EBookContacts-1.2.metadata \
        libebook-contacts-1.2-custom.vala \
@@ -25,6 +27,18 @@ BUILT_SOURCES = \
 
 pkgconfigdir = ${libdir}/pkgconfig
 
+libcamel-1.2.vapi: $(top_builddir)/camel/Camel-1.2.gir
+       $(VAPIGEN_V)$(VAPIGEN) \
+               --vapidir=. \
+               --vapidir=$(srcdir) \
+               --girdir=$(top_builddir)/camel \
+               --pkg gio-2.0 \
+               --pkg libxml-2.0 \
+               --library libcamel-1.2 \
+               --metadatadir=$(srcdir) \
+               $< \
+               $(NULL)
+
 libedataserver-1.2.vapi: $(top_builddir)/libedataserver/EDataServer-1.2.gir  libedataserver-1.2.deps
        $(VAPIGEN_V)$(VAPIGEN) \
                --vapidir=. \
diff --git a/vala/libedataserver-1.2.deps b/vala/libedataserver-1.2.deps
index 4478fb0..f12c89b 100644
--- a/vala/libedataserver-1.2.deps
+++ b/vala/libedataserver-1.2.deps
@@ -1,2 +1,4 @@
 libxml-2.0
 gio-2.0
+libsoup-2.4
+posix


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