[evolution-data-server/wip/camel-more-gobject] Fixed more introspection and annotations.
- From: Corentin Noël <corentinnoel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/wip/camel-more-gobject] Fixed more introspection and annotations.
- Date: Tue, 27 Sep 2016 22:43:58 +0000 (UTC)
commit 7a5ed0c9150a0d0aefacab43c75436f1ec1aebbf
Author: Corentin Noël <corentin elementary io>
Date: Wed Sep 28 00:42:31 2016 +0200
Fixed more introspection and annotations.
camel/camel-charset-map.c | 12 ++-
camel/camel-cipher-context.c | 8 +-
camel/camel-db.h | 2 +-
camel/camel-filter-driver.c | 2 +-
camel/camel-filter-driver.h | 2 +-
camel/camel-filter-search.c | 4 +-
camel/camel-folder-search.c | 2 +-
camel/camel-folder-summary.c | 19 ++--
camel/camel-folder-summary.h | 6 +-
camel/camel-index.h | 2 +-
camel/camel-mime-filter-yenc.c | 30 +++---
camel/camel-mime-message.c | 2 +-
camel/camel-mime-parser.c | 8 +-
camel/camel-mime-parser.h | 2 +-
camel/camel-mime-part-utils.c | 2 +-
camel/camel-mime-part-utils.h | 4 +-
camel/camel-mime-part.c | 8 +-
camel/camel-mime-part.h | 2 +-
camel/camel-mime-utils.c | 118 ++++++++++++++++----
camel/camel-mime-utils.h | 23 ++--
camel/camel-movemail.c | 2 +-
camel/camel-msgport.c | 1 +
camel/camel-name-value-array.c | 2 +-
camel/camel-provider.c | 4 +-
camel/camel-sasl-gssapi.c | 4 +-
camel/camel-sasl.c | 2 +-
camel/camel-service.c | 6 +-
camel/camel-session.c | 2 +-
camel/camel-sexp.h | 6 +-
camel/camel-store-summary.c | 2 +-
camel/camel-store-summary.h | 4 +-
camel/camel-store.c | 6 +-
camel/camel-store.h | 8 ++
camel/camel-stream-buffer.c | 2 +-
camel/camel-stream.c | 6 +-
camel/camel-subscribable.c | 4 +-
camel/camel-trie.c | 6 +-
camel/camel-url-scanner.c | 11 ++
camel/camel-url.c | 42 +++++---
camel/camel-url.h | 6 +-
camel/camel-vee-data-cache.h | 4 +-
camel/camel-vee-folder.c | 6 +
camel/camel-vee-folder.h | 2 +-
camel/camel-vee-message-info.h | 8 +-
camel/camel-vee-store.c | 14 ++-
camel/camel-vee-summary.c | 10 ++-
camel/camel-vee-summary.h | 6 +-
camel/providers/local/camel-local-summary.c | 6 +-
camel/providers/local/camel-local-summary.h | 2 +-
camel/providers/local/camel-maildir-summary.c | 4 +-
camel/providers/local/camel-mbox-summary.c | 4 +-
camel/providers/local/camel-spool-summary.h | 2 +-
camel/providers/nntp/camel-nntp-folder.c | 6 +-
camel/providers/nntp/camel-nntp-summary.c | 6 +-
camel/providers/pop3/camel-pop3-folder.c | 2 +-
camel/providers/sendmail/camel-sendmail-provider.c | 4 +-
.../providers/sendmail/camel-sendmail-transport.c | 6 +-
camel/providers/smtp/camel-smtp-transport.c | 6 +-
vala/Camel-1.2.metadata | 12 ++
59 files changed, 325 insertions(+), 169 deletions(-)
---
diff --git a/camel/camel-charset-map.c b/camel/camel-charset-map.c
index 59ab17e..e8e9029 100644
--- a/camel/camel-charset-map.c
+++ b/camel/camel-charset-map.c
@@ -318,6 +318,10 @@ camel_charset_init (CamelCharset *c)
c->level = 0;
}
+/**
+ * camel_charset_step:
+ * @in: (array length=len) (type gchar):
+ **/
void
camel_charset_step (CamelCharset *cc,
const gchar *in,
@@ -383,7 +387,13 @@ camel_charset_best_name (CamelCharset *charset)
return NULL;
}
-/* finds the minimum charset for this string NULL means US-ASCII */
+/**
+ * camel_charset_best:
+ * @in: (array length=len) (type gchar):
+ *
+ * finds the minimum charset for this string NULL means US-ASCII
+ * Returns: (nullable): the minimum charset or NULL for US_ASCII.
+ **/
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 c20a70a..665f70f 100644
--- a/camel/camel-cipher-context.c
+++ b/camel/camel-cipher-context.c
@@ -1234,7 +1234,7 @@ camel_cipher_validity_add_certinfo_ex (CamelCipherValidity *vin,
*
* Gets a named property @name value for the given @info_index of the @mode validity part.
*
- * Returns: Value of a named property of a #CamelCipherCertInfo, or %NULL when no such
+ * Returns: (transfer none) (nullable): Value of a named property of a #CamelCipherCertInfo, or %NULL when
no such
* property exists. The returned value is owned by the associated #CamelCipherCertInfo
* and is valid until the cert info is freed.
*
@@ -1401,9 +1401,9 @@ camel_cipher_validity_free (CamelCipherValidity *validity)
*
* Gets a named property @name value for the given @cert_info.
*
- * Returns: Value of a named property of the @cert_info, or %NULL when no such
- * property exists. The returned value is owned by the @cert_info
- * and is valid until the @cert_info is freed.
+ * Returns: (transfer none) (nullable): Value of a named property of the @cert_info,
+ * or %NULL when no such property exists. The returned value is owned by
+ * the @cert_info and is valid until the @cert_info is freed.
*
* Since: 3.22
**/
diff --git a/camel/camel-db.h b/camel/camel-db.h
index b5dc9b0..726686c 100644
--- a/camel/camel-db.h
+++ b/camel/camel-db.h
@@ -268,7 +268,7 @@ CamelDBKnownColumnNames camel_db_get_column_ident (GHashTable **hash, gint index
*
* Since: 2.24
**/
-typedef gint (*CamelDBSelectCB) (gpointer data, gint ncol, gchar **colvalues, gchar **colnames);
+typedef gint (*CamelDBSelectCB) (gpointer user_data, gint ncol, gchar **colvalues, gchar **colnames);
CamelDB * camel_db_open (const gchar *path, GError **error);
CamelDB * camel_db_clone (CamelDB *cdb, GError **error);
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c
index bbff006..513354b 100644
--- a/camel/camel-filter-driver.c
+++ b/camel/camel-filter-driver.c
@@ -1693,7 +1693,7 @@ camel_filter_driver_filter_message (CamelFilterDriver *driver,
g_return_val_if_fail (message != NULL || (source != NULL && uid != NULL), -1);
if (info == NULL) {
- struct _camel_header_raw *h;
+ CamelHeaderRaw *h;
if (message) {
g_object_ref (message);
diff --git a/camel/camel-filter-driver.h b/camel/camel-filter-driver.h
index d0b7eda..383b5e0 100644
--- a/camel/camel-filter-driver.h
+++ b/camel/camel-filter-driver.h
@@ -74,7 +74,7 @@ enum camel_filter_status_t {
};
typedef CamelFolder * (*CamelFilterGetFolderFunc) (CamelFilterDriver *driver, const gchar *uri,
- gpointer data, GError **error);
+ gpointer user_data, GError **error);
/* report status */
typedef void (*CamelFilterStatusFunc) (CamelFilterDriver *driver, enum camel_filter_status_t status,
gint pc, const gchar *desc, gpointer user_data);
diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c
index d79f9ee..ebe5ae7 100644
--- a/camel/camel-filter-search.c
+++ b/camel/camel-filter-search.c
@@ -256,7 +256,7 @@ check_header (struct _CamelSExp *f,
} else if (fms->message || !check_header_in_message_info (fms->info, argc, argv, how,
&matched)) {
CamelMimeMessage *message;
CamelMimePart *mime_part;
- struct _camel_header_raw *header;
+ CamelHeaderRaw *header;
const gchar *charset = NULL;
camel_search_t type = CAMEL_SEARCH_TYPE_ENCODED;
CamelContentType *ct;
@@ -935,7 +935,7 @@ junk_test (struct _CamelSExp *f,
/* Not every message info has headers available, thus try headers of the message itself */
message = camel_filter_search_get_message (fms, f);
if (message) {
- struct _camel_header_raw *h;
+ CamelHeaderRaw *h;
for (h = CAMEL_MIME_PART (message)->headers; h; h = h->next) {
const gchar *value;
diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c
index b55454d..f8c1dd7 100644
--- a/camel/camel-folder-search.c
+++ b/camel/camel-folder-search.c
@@ -300,7 +300,7 @@ check_header (CamelSExp *sexp,
camel_search_t type = CAMEL_SEARCH_TYPE_ASIS;
struct _camel_search_words *words;
CamelMimeMessage *message = NULL;
- struct _camel_header_raw *raw_header;
+ CamelHeaderRaw *raw_header;
/* only a subset of headers are supported .. */
headername = argv[0]->value.string;
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index d5d35ff..4f4e513 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -118,7 +118,7 @@ static void cfs_schedule_info_release_timer (CamelFolderSummary *summary);
static void summary_traverse_content_with_parser (CamelFolderSummary *summary, CamelMessageInfo *msginfo,
CamelMimeParser *mp);
static void summary_traverse_content_with_part (CamelFolderSummary *summary, CamelMessageInfo *msginfo,
CamelMimePart *object);
-static CamelMessageInfo * message_info_new_from_header (CamelFolderSummary *, struct _camel_header_raw *);
+static CamelMessageInfo * message_info_new_from_header (CamelFolderSummary *, CamelHeaderRaw *);
static CamelMessageInfo * message_info_new_from_parser (CamelFolderSummary *, CamelMimeParser *);
static CamelMessageInfo * message_info_new_from_message (CamelFolderSummary *summary, CamelMimeMessage *msg);
@@ -750,7 +750,7 @@ camel_folder_summary_init (CamelFolderSummary *summary)
/**
* camel_folder_summary_new:
- * @folder: parent #CamelFolder object
+ * @folder: (type CamelFolder): parent #CamelFolder object
*
* Create a new #CamelFolderSummary object.
*
@@ -1154,6 +1154,7 @@ camel_folder_summary_get_hash (CamelFolderSummary *summary)
/**
* camel_folder_summary_peek_loaded:
*
+ * Returns: (nullable) (transfer full):
* Since: 2.26
**/
CamelMessageInfo *
@@ -1253,7 +1254,7 @@ message_info_from_uid (CamelFolderSummary *summary,
* A referenced to the summary item is returned, which may be
* ref'd or free'd as appropriate.
*
- * Returns: the summary item, or %NULL if the uid @uid is not available
+ * Returns: (nullable) (transfer full): the summary item, or %NULL if the uid @uid is not available
*
* See camel_folder_summary_get_info_flags().
*
@@ -2224,7 +2225,7 @@ camel_folder_summary_add (CamelFolderSummary *summary,
**/
CamelMessageInfo *
camel_folder_summary_info_new_from_header (CamelFolderSummary *summary,
- struct _camel_header_raw *h)
+ CamelHeaderRaw *h)
{
CamelFolderSummaryClass *class;
@@ -2607,7 +2608,7 @@ message_info_new_from_message (CamelFolderSummary *summary,
}
static gchar *
-summary_format_address (struct _camel_header_raw *h,
+summary_format_address (CamelHeaderRaw *h,
const gchar *name,
const gchar *charset)
{
@@ -2634,7 +2635,7 @@ summary_format_address (struct _camel_header_raw *h,
}
static gchar *
-summary_format_string (struct _camel_header_raw *h,
+summary_format_string (CamelHeaderRaw *h,
const gchar *name,
const gchar *charset)
{
@@ -2655,7 +2656,7 @@ summary_format_string (struct _camel_header_raw *h,
static CamelMessageInfo *
message_info_new_from_header (CamelFolderSummary *summary,
- struct _camel_header_raw *h)
+ CamelHeaderRaw *h)
{
const gchar *received, *date, *content, *charset = NULL;
GSList *refs, *irt, *scan;
@@ -2961,7 +2962,7 @@ summary_traverse_content_with_part (CamelFolderSummary *summary,
gint parts, i;
CamelFolderSummaryPrivate *p = summary->priv;
CamelContentType *ct;
- const struct _camel_header_raw *header;
+ const CamelHeaderRaw *header;
gboolean is_calendar = FALSE, is_note = FALSE;
containee = camel_medium_get_content (CAMEL_MEDIUM (object));
@@ -3125,7 +3126,7 @@ camel_system_flag_get (CamelMessageFlags flags,
**/
CamelMessageInfo *
camel_message_info_new_from_header (CamelFolderSummary *summary,
- struct _camel_header_raw *header)
+ CamelHeaderRaw *header)
{
if (summary != NULL)
return CAMEL_FOLDER_SUMMARY_GET_CLASS (summary)->message_info_new_from_header (summary,
header);
diff --git a/camel/camel-folder-summary.h b/camel/camel-folder-summary.h
index 1a0132d..6bf2dde 100644
--- a/camel/camel-folder-summary.h
+++ b/camel/camel-folder-summary.h
@@ -110,7 +110,7 @@ struct _CamelFolderSummaryClass {
CamelMessageInfo *
(*message_info_new_from_header)
(CamelFolderSummary *summary,
- struct _camel_header_raw *header);
+ CamelHeaderRaw *header);
CamelMessageInfo *
(*message_info_new_from_parser)
(CamelFolderSummary *summary,
@@ -189,7 +189,7 @@ void camel_folder_summary_touch (CamelFolderSummary *summary);
CamelMessageInfo *
camel_folder_summary_info_new_from_header
(CamelFolderSummary *summary,
- struct _camel_header_raw *headers);
+ CamelHeaderRaw *headers);
CamelMessageInfo *
camel_folder_summary_info_new_from_parser
(CamelFolderSummary *summary,
@@ -263,7 +263,7 @@ gboolean camel_system_flag_get (CamelMessageFlags flags,
CamelMessageInfo *
camel_message_info_new_from_header
(CamelFolderSummary *summary,
- struct _camel_header_raw *header);
+ CamelHeaderRaw *header);
G_END_DECLS
#endif /* CAMEL_FOLDER_SUMMARY_H */
diff --git a/camel/camel-index.h b/camel/camel-index.h
index 5bec6cf..8ed26bd 100644
--- a/camel/camel-index.h
+++ b/camel/camel-index.h
@@ -94,7 +94,7 @@ typedef struct _CamelIndexCursor CamelIndexCursor;
typedef struct _CamelIndexCursorClass CamelIndexCursorClass;
typedef struct _CamelIndexCursorPrivate CamelIndexCursorPrivate;
-typedef gchar * (*CamelIndexNorm)(CamelIndex *index, const gchar *word, gpointer data);
+typedef gchar * (*CamelIndexNorm)(CamelIndex *index, const gchar *word, gpointer user_data);
/* ********************************************************************** */
diff --git a/camel/camel-mime-filter-yenc.c b/camel/camel-mime-filter-yenc.c
index 0f18f0f..729ae77 100644
--- a/camel/camel-mime-filter-yenc.c
+++ b/camel/camel-mime-filter-yenc.c
@@ -382,12 +382,12 @@ static const gint yenc_crc_table[256] = {
/**
* camel_ydecode_step:
- * @in: input buffer
+ * @in: (type guchar) (array length=inlen): input buffer
* @inlen: input buffer length
- * @out: output buffer
- * @state: ydecode state
- * @pcrc: part crc state
- * @crc: crc state
+ * @out: (out) (array): output buffer
+ * @state: (out): ydecode state
+ * @pcrc: (out): part crc state
+ * @crc: (out): crc state
*
* Performs a 'decode step' on a chunk of yEncoded data of length
* @inlen pointed to by @in and writes to @out. Assumes the =ybegin
@@ -465,12 +465,12 @@ camel_ydecode_step (const guchar *in,
/**
* camel_yencode_step:
- * @in: input buffer
+ * @in: (type guchar) (array length=inlen): input buffer
* @inlen: input buffer length
- * @out: output buffer
- * @state: yencode state
- * @pcrc: part crc state
- * @crc: crc state
+ * @out: (array) (out): output buffer
+ * @state: (out): yencode state
+ * @pcrc: (out): part crc state
+ * @crc: (out): crc state
*
* Performs an yEncode 'encode step' on a chunk of raw data of length
* @inlen pointed to by @in and writes to @out.
@@ -534,12 +534,12 @@ camel_yencode_step (const guchar *in,
/**
* camel_yencode_close:
- * @in: input buffer
+ * @in: (type guchar) (array length=inlen): input buffer
* @inlen: input buffer length
- * @out: output buffer
- * @state: yencode state
- * @pcrc: part crc state
- * @crc: crc state
+ * @out: (array) (out): output buffer
+ * @state: (out): yencode state
+ * @pcrc: (out): part crc state
+ * @crc: (out): crc state
*
* Call this function when finished encoding data with
* camel_yencode_step() to flush off the remaining state.
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
index c877a7a..4810c9f 100644
--- a/camel/camel-mime-message.c
+++ b/camel/camel-mime-message.c
@@ -1219,7 +1219,7 @@ static const gchar tz_days[][4] = {
gchar *
camel_mime_message_build_mbox_from (CamelMimeMessage *message)
{
- struct _camel_header_raw *header = ((CamelMimePart *) message)->headers;
+ CamelHeaderRaw *header = ((CamelMimePart *) message)->headers;
GString *out = g_string_new ("From ");
gchar *ret;
const gchar *tmp;
diff --git a/camel/camel-mime-parser.c b/camel/camel-mime-parser.c
index dccf063..51fefcd 100644
--- a/camel/camel-mime-parser.c
+++ b/camel/camel-mime-parser.c
@@ -116,7 +116,7 @@ struct _header_scan_stack {
#ifdef MEMPOOL
CamelMemPool *pool; /* memory pool to keep track of headers/etc at this level */
#endif
- struct _camel_header_raw *headers; /* headers for this part */
+ CamelHeaderRaw *headers; /* headers for this part */
CamelContentType *content_type;
@@ -335,7 +335,7 @@ camel_mime_parser_header (CamelMimeParser *m,
*
* Since: 2.22
**/
-struct _camel_header_raw *
+CamelHeaderRaw *
camel_mime_parser_headers_raw (CamelMimeParser *m)
{
struct _header_scan_state *s = _PRIVATE (m);
@@ -1180,7 +1180,7 @@ header_append_mempool (struct _header_scan_state *s,
gchar *header,
gint offset)
{
- struct _camel_header_raw *l, *n;
+ CamelHeaderRaw *l, *n;
gchar *content;
content = strchr (header, ':');
@@ -1203,7 +1203,7 @@ header_append_mempool (struct _header_scan_state *s,
n->offset = offset;
- l = (struct _camel_header_raw *) &h->headers;
+ l = (CamelHeaderRaw *) &h->headers;
while (l->next) {
l = l->next;
}
diff --git a/camel/camel-mime-parser.h b/camel/camel-mime-parser.h
index ce5c098..a50da80 100644
--- a/camel/camel-mime-parser.h
+++ b/camel/camel-mime-parser.h
@@ -129,7 +129,7 @@ CamelContentType *camel_mime_parser_content_type (CamelMimeParser *parser);
const gchar *camel_mime_parser_header (CamelMimeParser *m, const gchar *name, gint *offset);
/* get all raw headers. READ ONLY! */
-struct _camel_header_raw *camel_mime_parser_headers_raw (CamelMimeParser *m);
+CamelHeaderRaw *camel_mime_parser_headers_raw (CamelMimeParser *m);
/* get multipart pre/postface */
const gchar *camel_mime_parser_preface (CamelMimeParser *m);
diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c
index 0975f71..5d26b75 100644
--- a/camel/camel-mime-part-utils.c
+++ b/camel/camel-mime-part-utils.c
@@ -228,7 +228,7 @@ camel_message_content_info_new_from_message (CamelMimePart *mp)
}
CamelMessageContentInfo *
-camel_message_content_info_new_from_header (struct _camel_header_raw *h)
+camel_message_content_info_new_from_header (CamelHeaderRaw *h)
{
CamelMessageContentInfo *ci;
const gchar *charset;
diff --git a/camel/camel-mime-part-utils.h b/camel/camel-mime-part-utils.h
index 0147ac5..c76a686 100644
--- a/camel/camel-mime-part-utils.h
+++ b/camel/camel-mime-part-utils.h
@@ -55,10 +55,10 @@ struct _CamelMessageContentInfo {
CamelMessageContentInfo *
camel_message_content_info_new (void);
-void camel_message_content_info_free (CamelMessageContentInfo *content_info);
+void camel_message_content_info_free (CamelMessageContentInfo *ci);
CamelMessageContentInfo *
camel_message_content_info_new_from_header
- (struct _camel_header_raw *header);
+ (CamelHeaderRaw *header);
CamelMessageContentInfo *
camel_message_content_info_new_from_parser
(CamelMimeParser *parser);
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index 263a041..215997c 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -522,7 +522,7 @@ mime_part_get_headers (CamelMedium *medium)
CamelMimePart *part = (CamelMimePart *) medium;
GArray *headers;
CamelMediumHeader header;
- struct _camel_header_raw *h;
+ CamelHeaderRaw *h;
headers = g_array_new (FALSE, FALSE, sizeof (CamelMediumHeader));
for (h = part->headers; h; h = h->next) {
@@ -583,7 +583,7 @@ mime_part_write_to_stream_sync (CamelDataWrapper *dw,
/* TODO: content-languages header? */
if (mp->headers) {
- struct _camel_header_raw *h = mp->headers;
+ CamelHeaderRaw *h = mp->headers;
gchar *val;
gssize (*writefn) (
gpointer stream,
@@ -776,7 +776,7 @@ mime_part_write_to_output_stream_sync (CamelDataWrapper *dw,
/* TODO: content-languages header? */
if (mp->headers) {
- struct _camel_header_raw *h = mp->headers;
+ CamelHeaderRaw *h = mp->headers;
gchar *val;
gssize (*writefn) (
gpointer stream,
@@ -974,7 +974,7 @@ mime_part_construct_from_parser_sync (CamelMimePart *mime_part,
GError **error)
{
CamelDataWrapper *dw = (CamelDataWrapper *) mime_part;
- struct _camel_header_raw *headers;
+ CamelHeaderRaw *headers;
const gchar *content;
gchar *buf;
gsize len;
diff --git a/camel/camel-mime-part.h b/camel/camel-mime-part.h
index bcacdcb..9284b17 100644
--- a/camel/camel-mime-part.h
+++ b/camel/camel-mime-part.h
@@ -59,7 +59,7 @@ struct _CamelMimePart {
CamelMedium parent;
CamelMimePartPrivate *priv;
- struct _camel_header_raw *headers; /* mime headers */
+ CamelHeaderRaw *headers; /* mime headers */
};
struct _CamelMimePartClass {
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 2ac7146..48f9335 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -4472,7 +4472,7 @@ camel_header_location_decode (const gchar *in)
#ifdef CHECKS
static void
-check_header (struct _camel_header_raw *header)
+check_header (CamelHeaderRaw *header)
{
guchar *cp;
@@ -4487,8 +4487,16 @@ check_header (struct _camel_header_raw *header)
}
#endif
+/**
+ * camel_header_raw_append_parse:
+ * @list: (array zero-terminated=1): a NULL-terminated list of #CamelHeaderRaw
+ * @header: an unparsed header
+ * @offset: the given offset
+ *
+ * Appends the parsed header to the list with the given offset.
+ **/
void
-camel_header_raw_append_parse (struct _camel_header_raw **list,
+camel_header_raw_append_parse (CamelHeaderRaw **list,
const gchar *header,
gint offset)
{
@@ -4513,13 +4521,22 @@ camel_header_raw_append_parse (struct _camel_header_raw **list,
camel_header_raw_append (list, name, in, offset);
}
+/**
+ * camel_header_raw_append:
+ * @list: (array zero-terminated=1): a NULL-terminated list of #CamelHeaderRaw
+ * @name: the given name
+ * @value: the given value
+ * @offset: the given offset
+ *
+ * Appends a value with the given name and the given value to the list.
+ **/
void
-camel_header_raw_append (struct _camel_header_raw **list,
+camel_header_raw_append (CamelHeaderRaw **list,
const gchar *name,
const gchar *value,
gint offset)
{
- struct _camel_header_raw *l, *n;
+ CamelHeaderRaw *l, *n;
d (printf ("Header: %s: %s\n", name, value));
@@ -4531,7 +4548,7 @@ camel_header_raw_append (struct _camel_header_raw **list,
#ifdef CHECKS
check_header (n);
#endif
- l = (struct _camel_header_raw *) list;
+ l = (CamelHeaderRaw *) list;
while (l->next) {
l = l->next;
}
@@ -4552,11 +4569,20 @@ camel_header_raw_append (struct _camel_header_raw **list,
#endif
}
-static struct _camel_header_raw *
-header_raw_find_node (struct _camel_header_raw **list,
+/**
+ * header_raw_find_node:
+ * @list: (array zero-terminated=1): a NULL-terminated list of #CamelHeaderRaw
+ * @name: the name to find
+ *
+ * Searches for the node with a given name.
+ *
+ * Returns: (transfer none) (nullable): the found #CamelHeaderRaw or NULL.
+ **/
+static CamelHeaderRaw *
+header_raw_find_node (CamelHeaderRaw **list,
const gchar *name)
{
- struct _camel_header_raw *l;
+ CamelHeaderRaw *l;
l = *list;
while (l) {
@@ -4567,12 +4593,22 @@ header_raw_find_node (struct _camel_header_raw **list,
return l;
}
+/**
+ * camel_header_raw_find:
+ * @list: (array zero-terminated=1): a NULL-terminated list of #CamelHeaderRaw
+ * @name: the name to find
+ * @offset: (out) (nullable): the offset corresponding to the name
+ *
+ * Searches for the first node with a given name and returns its value.
+ *
+ * Returns: (transfer none) (nullable): the value associated with the name
+ **/
const gchar *
-camel_header_raw_find (struct _camel_header_raw **list,
+camel_header_raw_find (CamelHeaderRaw **list,
const gchar *name,
gint *offset)
{
- struct _camel_header_raw *l;
+ CamelHeaderRaw *l;
l = header_raw_find_node (list, name);
if (l) {
@@ -4583,13 +4619,24 @@ camel_header_raw_find (struct _camel_header_raw **list,
return NULL;
}
+/**
+ * camel_header_raw_find_next:
+ * @list: (array zero-terminated=1): a NULL-terminated list of #CamelHeaderRaw
+ * @name: the name to find
+ * @offset: (out) (nullable): the offset corresponding to the name
+ * @last: the last found value
+ *
+ * Searches for the next node with a given name and returns its value.
+ *
+ * Returns: (transfer none) (nullable): the value associated with the name
+ **/
const gchar *
-camel_header_raw_find_next (struct _camel_header_raw **list,
+camel_header_raw_find_next (CamelHeaderRaw **list,
const gchar *name,
gint *offset,
const gchar *last)
{
- struct _camel_header_raw *l;
+ CamelHeaderRaw *l;
if (last == NULL || name == NULL)
return NULL;
@@ -4601,21 +4648,28 @@ camel_header_raw_find_next (struct _camel_header_raw **list,
}
static void
-header_raw_free (struct _camel_header_raw *l)
+header_raw_free (CamelHeaderRaw *l)
{
g_free (l->name);
g_free (l->value);
g_free (l);
}
+/**
+ * camel_header_raw_remove:
+ * @list: (array zero-terminated=1): a NULL-terminated list of #CamelHeaderRaw
+ * @name: the name to remove
+ *
+ * Remove all values associated with the given name
+ **/
void
-camel_header_raw_remove (struct _camel_header_raw **list,
+camel_header_raw_remove (CamelHeaderRaw **list,
const gchar *name)
{
- struct _camel_header_raw *l, *p;
+ CamelHeaderRaw *l, *p;
/* the next pointer is at the head of the structure, so this is safe */
- p = (struct _camel_header_raw *) list;
+ p = (CamelHeaderRaw *) list;
l = *list;
while (l) {
if (!g_ascii_strcasecmp (l->name, name)) {
@@ -4629,8 +4683,17 @@ camel_header_raw_remove (struct _camel_header_raw **list,
}
}
+/**
+ * camel_header_raw_replace:
+ * @list: (array zero-terminated=1): a NULL-terminated list of #CamelHeaderRaw
+ * @name: the name to remove
+ * @value: the new value
+ * @offset: the new offset
+ *
+ * Replace the row associated with the given name by another value and offset.
+ **/
void
-camel_header_raw_replace (struct _camel_header_raw **list,
+camel_header_raw_replace (CamelHeaderRaw **list,
const gchar *name,
const gchar *value,
gint offset)
@@ -4639,10 +4702,17 @@ camel_header_raw_replace (struct _camel_header_raw **list,
camel_header_raw_append (list, name, value, offset);
}
+
+/**
+ * camel_header_raw_clear:
+ * @list: (array zero-terminated=1): a NULL-terminated list of #CamelHeaderRaw
+ *
+ * Removes all the raws of the list.
+ **/
void
-camel_header_raw_clear (struct _camel_header_raw **list)
+camel_header_raw_clear (CamelHeaderRaw **list)
{
- struct _camel_header_raw *l, *n;
+ CamelHeaderRaw *l, *n;
l = *list;
while (l) {
n = l->next;
@@ -4778,8 +4848,16 @@ mailing_list_init (gpointer param)
return NULL;
}
+/**
+ * camel_header_raw_check_mailing_list:
+ * @list: (array zero-terminated=1): a NULL-terminated list of #CamelHeaderRaw
+ *
+ * TODO: Document me.
+ *
+ * Returns: (transfer full) (nullable):
+ **/
gchar *
-camel_header_raw_check_mailing_list (struct _camel_header_raw **list)
+camel_header_raw_check_mailing_list (CamelHeaderRaw **list)
{
static GOnce once = G_ONCE_INIT;
const gchar *v;
diff --git a/camel/camel-mime-utils.h b/camel/camel-mime-utils.h
index f692214..12c647e 100644
--- a/camel/camel-mime-utils.h
+++ b/camel/camel-mime-utils.h
@@ -62,12 +62,12 @@ typedef struct {
/* a raw rfc822 header */
/* the value MUST be US-ASCII */
-struct _camel_header_raw {
+typedef struct _camel_header_raw {
struct _camel_header_raw *next;
gchar *name;
gchar *value;
gint offset; /* in file, if known */
-};
+} CamelHeaderRaw;
typedef struct _CamelContentDisposition {
gchar *disposition;
@@ -154,16 +154,15 @@ gchar *camel_content_disposition_format (CamelContentDisposition *disposition);
gchar *camel_content_transfer_encoding_decode (const gchar *in);
/* raw headers */
-void camel_header_raw_append (struct _camel_header_raw **list, const gchar *name, const gchar *value, gint
offset);
-void camel_header_raw_append_parse (struct _camel_header_raw **list, const gchar *header, gint offset);
-const gchar *camel_header_raw_find (struct _camel_header_raw **list, const gchar *name, gint *offset);
-const gchar *camel_header_raw_find_next (struct _camel_header_raw **list, const gchar *name, gint *offset,
const gchar *last);
-void camel_header_raw_replace (struct _camel_header_raw **list, const gchar *name, const gchar *value, gint
offset);
-void camel_header_raw_remove (struct _camel_header_raw **list, const gchar *name);
-void camel_header_raw_fold (struct _camel_header_raw **list);
-void camel_header_raw_clear (struct _camel_header_raw **list);
-
-gchar *camel_header_raw_check_mailing_list (struct _camel_header_raw **list);
+void camel_header_raw_append (CamelHeaderRaw **list, const gchar *name, const gchar *value, gint offset);
+void camel_header_raw_append_parse (CamelHeaderRaw **list, const gchar *header, gint offset);
+const gchar *camel_header_raw_find (CamelHeaderRaw **list, const gchar *name, gint *offset);
+const gchar *camel_header_raw_find_next (CamelHeaderRaw **list, const gchar *name, gint *offset, const gchar
*last);
+void camel_header_raw_replace (CamelHeaderRaw **list, const gchar *name, const gchar *value, gint offset);
+void camel_header_raw_remove (CamelHeaderRaw **list, const gchar *name);
+void camel_header_raw_clear (CamelHeaderRaw **list);
+
+gchar *camel_header_raw_check_mailing_list (CamelHeaderRaw **list);
/* fold a header */
gchar *camel_header_address_fold (const gchar *in, gsize headerlen);
diff --git a/camel/camel-movemail.c b/camel/camel-movemail.c
index 9e4d067..04e11b7 100644
--- a/camel/camel-movemail.c
+++ b/camel/camel-movemail.c
@@ -433,7 +433,7 @@ camel_movemail_copy_filter (gint fromfd,
* want to maintain it! */
static gint
solaris_header_write (gint fd,
- struct _camel_header_raw *header)
+ CamelHeaderRaw *header)
{
struct iovec iv[4];
gint outlen = 0, len;
diff --git a/camel/camel-msgport.c b/camel/camel-msgport.c
index 210315d..8822051 100644
--- a/camel/camel-msgport.c
+++ b/camel/camel-msgport.c
@@ -306,6 +306,7 @@ camel_msgport_fd (CamelMsgPort *msgport)
/**
* camel_msgport_prfd:
*
+ * Returns: (transfer none):
* Since: 2.24
**/
PRFileDesc *
diff --git a/camel/camel-name-value-array.c b/camel/camel-name-value-array.c
index 48a11a4..4b76aeb 100644
--- a/camel/camel-name-value-array.c
+++ b/camel/camel-name-value-array.c
@@ -232,7 +232,7 @@ camel_name_value_array_find_named (const CamelNameValueArray *array,
}
/**
- * camel_name_value_array_set_named:
+ * camel_name_value_array_get_named:
* @array: a #CamelNameValueArray
* @case_sensitive: whether to compare names case sensitively
* @name: a name
diff --git a/camel/camel-provider.c b/camel/camel-provider.c
index c469270..e028627 100644
--- a/camel/camel-provider.c
+++ b/camel/camel-provider.c
@@ -140,8 +140,8 @@ provider_setup (gpointer param)
(GEqualFunc) camel_strcase_equal);
vee_provider.object_types[CAMEL_PROVIDER_STORE] = CAMEL_TYPE_VEE_STORE;
- vee_provider.url_hash = camel_url_hash;
- vee_provider.url_equal = camel_url_equal;
+ vee_provider.url_hash = (GHashFunc) camel_url_hash;
+ vee_provider.url_equal = (GEqualFunc) camel_url_equal;
provider_register_internal (&vee_provider);
return NULL;
diff --git a/camel/camel-sasl-gssapi.c b/camel/camel-sasl-gssapi.c
index b1f919d..0c7ba34 100644
--- a/camel/camel-sasl-gssapi.c
+++ b/camel/camel-sasl-gssapi.c
@@ -580,8 +580,8 @@ camel_sasl_gssapi_is_available (void)
/**
* camel_sasl_gssapi_override_host_and_user:
- * @override_host: Host name to use during challenge processing; can be %NULL
- * @override_user: User name to use during challenge processing; can be %NULL
+ * @override_host: (nullable): Host name to use during challenge processing; can be %NULL
+ * @override_user: (nullable): User name to use during challenge processing; can be %NULL
*
* Set host and user to use, instead of those in CamelService's settings.
* It's both or none, aka either set both, or the settings values are used.
diff --git a/camel/camel-sasl.c b/camel/camel-sasl.c
index 9096f88..2c8a497 100644
--- a/camel/camel-sasl.c
+++ b/camel/camel-sasl.c
@@ -343,7 +343,7 @@ camel_sasl_init (CamelSasl *sasl)
* @mechanism: the SASL mechanism
* @service: the CamelService that will be using this SASL
*
- * Returns: a new #CamelSasl object for the given @service_name,
+ * Returns: (nullable): a new #CamelSasl object for the given @service_name,
* @mechanism, and @service, or %NULL if the mechanism is not
* supported.
**/
diff --git a/camel/camel-service.c b/camel/camel-service.c
index ee669ff..202acf6 100644
--- a/camel/camel-service.c
+++ b/camel/camel-service.c
@@ -37,8 +37,8 @@
#include "camel-network-service.h"
#include "camel-network-settings.h"
#include "camel-operation.h"
-#include "camel-service.h"
#include "camel-session.h"
+#include "camel-service.h"
#define d(x)
#define w(x)
@@ -1562,14 +1562,14 @@ camel_service_set_proxy_resolver (CamelService *service,
/**
* camel_service_ref_session:
- * @service: (type CamelService): a #CamelService
+ * @service: a #CamelService
*
* Returns the #CamelSession associated with the service.
*
* The returned #CamelSession is referenced for thread-safety. Unreference
* the #CamelSession with g_object_unref() when finished with it.
*
- * Returns: (transfer full): the #CamelSession
+ * Returns: (transfer full) (type CamelSession): the #CamelSession
*
* Since: 3.8
**/
diff --git a/camel/camel-session.c b/camel/camel-session.c
index 10437dd..f4bcd98 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -706,7 +706,7 @@ camel_session_class_init (CamelSessionClass *class)
NULL, NULL, NULL,
G_TYPE_NONE, 2,
G_TYPE_CANCELLABLE,
- G_TYPE_POINTER);
+ G_TYPE_ERROR);
/**
* CamelSession::user-alert:
diff --git a/camel/camel-sexp.h b/camel/camel-sexp.h
index e0d824a..d4d9aa7 100644
--- a/camel/camel-sexp.h
+++ b/camel/camel-sexp.h
@@ -91,6 +91,7 @@ struct _CamelSExpResult {
/**
* CamelSExpFunc:
+ * @argv: (inout) (array length=argc):
*
* Since: 3.4
**/
@@ -98,17 +99,18 @@ typedef CamelSExpResult *
(*CamelSExpFunc) (CamelSExp *sexp,
gint argc,
CamelSExpResult **argv,
- gpointer data);
+ gpointer user_data);
/**
* CamelSExpIFunc:
+ * @argv: (inout) (array length=argc):
*
* Since: 3.4
**/
typedef CamelSExpResult *
(*CamelSExpIFunc) (CamelSExp *sexp, gint argc,
CamelSExpTerm **argv,
- gpointer data);
+ gpointer user_data);
/**
* CamelSExpTermType:
diff --git a/camel/camel-store-summary.c b/camel/camel-store-summary.c
index 94497f6..5664c6e 100644
--- a/camel/camel-store-summary.c
+++ b/camel/camel-store-summary.c
@@ -33,8 +33,8 @@
#include <glib/gstdio.h>
#include "camel-file-utils.h"
-#include "camel-store-summary.h"
#include "camel-folder-summary.h"
+#include "camel-store-summary.h"
#include "camel-url.h"
#include "camel-win32.h"
diff --git a/camel/camel-store-summary.h b/camel/camel-store-summary.h
index 68e1557..d46fa80 100644
--- a/camel/camel-store-summary.h
+++ b/camel/camel-store-summary.h
@@ -175,10 +175,10 @@ const gchar * camel_store_info_name (CamelStoreSummary *summary,
gboolean camel_store_summary_connect_folder_summary
(CamelStoreSummary *summary,
const gchar *path,
- struct _CamelFolderSummary *folder_summary);
+ CamelFolderSummary *folder_summary);
gboolean camel_store_summary_disconnect_folder_summary
(CamelStoreSummary *summary,
- struct _CamelFolderSummary *folder_summary);
+ CamelFolderSummary *folder_summary);
G_END_DECLS
diff --git a/camel/camel-store.c b/camel/camel-store.c
index 09f2163..ecad0da 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -608,7 +608,7 @@ camel_store_class_init (CamelStoreClass *class)
G_STRUCT_OFFSET (CamelStoreClass, folder_created),
NULL, NULL, NULL,
G_TYPE_NONE, 1,
- G_TYPE_POINTER);
+ CAMEL_TYPE_FOLDER_INFO);
signals[FOLDER_DELETED] = g_signal_new (
"folder-deleted",
@@ -617,7 +617,7 @@ camel_store_class_init (CamelStoreClass *class)
G_STRUCT_OFFSET (CamelStoreClass, folder_deleted),
NULL, NULL, NULL,
G_TYPE_NONE, 1,
- G_TYPE_POINTER);
+ CAMEL_TYPE_FOLDER_INFO);
/**
* CamelStore::folder-info-stale:
@@ -662,7 +662,7 @@ camel_store_class_init (CamelStoreClass *class)
NULL, NULL, NULL,
G_TYPE_NONE, 2,
G_TYPE_STRING,
- G_TYPE_POINTER);
+ CAMEL_TYPE_FOLDER_INFO);
}
static void
diff --git a/camel/camel-store.h b/camel/camel-store.h
index 19d930e..c0690cd 100644
--- a/camel/camel-store.h
+++ b/camel/camel-store.h
@@ -53,6 +53,14 @@
(G_TYPE_INSTANCE_GET_CLASS \
((obj), CAMEL_TYPE_STORE, CamelStoreClass))
+#define CAMEL_TYPE_FOLDER_INFO \
+ (camel_folder_info_get_type ())
+#define CAMEL_FOLDER_INFO(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), CAMEL_TYPE_FOLDER_INFO, CamelFolderInfo))
+#define CAMEL_IS_FOLDER_INFO(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), CAMEL_TYPE_FOLDER_INFO))
/**
* CAMEL_STORE_ERROR:
*
diff --git a/camel/camel-stream-buffer.c b/camel/camel-stream-buffer.c
index 4ef6d49..ce96195 100644
--- a/camel/camel-stream-buffer.c
+++ b/camel/camel-stream-buffer.c
@@ -402,7 +402,7 @@ camel_stream_buffer_new (CamelStream *stream,
/**
* camel_stream_buffer_gets:
* @sbf: a #CamelStreamBuffer object
- * @buf: (out) (array): Memory to write the string to.
+ * @buf: (array length=max) (type gchar): Memory to write the string to.
* @max: Maxmimum number of characters to store.
* @cancellable: optional #GCancellable object, or %NULL
* @error: return location for a #GError, or %NULL
diff --git a/camel/camel-stream.c b/camel/camel-stream.c
index 5973f48..8fa594a 100644
--- a/camel/camel-stream.c
+++ b/camel/camel-stream.c
@@ -478,12 +478,12 @@ camel_stream_set_base_stream (CamelStream *stream,
/**
* camel_stream_read:
* @stream: a #CamelStream object.
- * @buffer: output buffer
+ * @buffer: (array length=n) (type gchar): output buffer
* @n: max number of bytes to read.
* @cancellable: optional #GCancellable object, or %NULL
* @error: return location for a #GError, or %NULL
*
- * Attempts to read up to @len bytes from @stream into @buf.
+ * Attempts to read up to @n bytes from @stream into @buffer.
*
* Returns: the number of bytes actually read, or %-1 on error and set
* errno.
@@ -513,7 +513,7 @@ camel_stream_read (CamelStream *stream,
/**
* camel_stream_write:
* @stream: a #CamelStream object
- * @buffer: buffer to write.
+ * @buffer: (array length=n) (type gchar): buffer to write.
* @n: number of bytes to write
* @cancellable: optional #GCancellable object, or %NULL
* @error: return location for a #GError, or %NULL
diff --git a/camel/camel-subscribable.c b/camel/camel-subscribable.c
index a33c3a8..a872bc0 100644
--- a/camel/camel-subscribable.c
+++ b/camel/camel-subscribable.c
@@ -156,7 +156,7 @@ camel_subscribable_default_init (CamelSubscribableInterface *iface)
folder_subscribed),
NULL, NULL, NULL,
G_TYPE_NONE, 1,
- G_TYPE_POINTER);
+ CAMEL_TYPE_FOLDER_INFO);
signals[FOLDER_UNSUBSCRIBED] = g_signal_new (
"folder-unsubscribed",
@@ -167,7 +167,7 @@ camel_subscribable_default_init (CamelSubscribableInterface *iface)
folder_unsubscribed),
NULL, NULL, NULL,
G_TYPE_NONE, 1,
- G_TYPE_POINTER);
+ CAMEL_TYPE_FOLDER_INFO);
}
/**
diff --git a/camel/camel-trie.c b/camel/camel-trie.c
index bb414e5..f49119f 100644
--- a/camel/camel-trie.c
+++ b/camel/camel-trie.c
@@ -333,13 +333,13 @@ camel_trie_add (CamelTrie *trie,
/**
* camel_trie_search:
* @trie: The #CamelTrie to search in.
- * @buffer: The string to match against a pattern in @trie.
+ * @buffer: (array length=buflen) (type gchar): The string to match against a pattern in @trie.
* @buflen: The length of @buffer.
- * @matched_id: An integer address to store the matched pattern id in.
+ * @matched_id: (out): An integer address to store the matched pattern id in.
*
* Try to match the string @buffer with a pattern in @trie.
*
- * Returns: The matched pattern, or %NULL if no pattern is matched.
+ * Returns: (nullable): The matched pattern, or %NULL if no pattern is matched.
*
* Since: 2.24
**/
diff --git a/camel/camel-url-scanner.c b/camel/camel-url-scanner.c
index 773c6db..e8dbab1 100644
--- a/camel/camel-url-scanner.c
+++ b/camel/camel-url-scanner.c
@@ -66,6 +66,17 @@ camel_url_scanner_add (CamelUrlScanner *scanner,
g_ptr_array_add (scanner->patterns, pattern);
}
+/**
+ * camel_url_scanner_scan:
+ * @scanner: a #CamelUrlScanner object.
+ * @in: (array length=inlen) (type gchar): the url to scan.
+ * @inlen: length of the in array.
+ * @match: the #CamelUrlMatch structure containing the criterias.
+ *
+ * Scan the @in string with the @match criterias.
+ *
+ * Returns: %TRUE if there is a result.
+ **/
gboolean
camel_url_scanner_scan (CamelUrlScanner *scanner,
const gchar *in,
diff --git a/camel/camel-url.c b/camel/camel-url.c
index 5cc477f..ff18e4b 100644
--- a/camel/camel-url.c
+++ b/camel/camel-url.c
@@ -705,10 +705,15 @@ camel_url_decode (gchar *part)
} while (*s++);
}
+/**
+ * camel_url_hash:
+ * @u: the base URL
+ *
+ * Returns: the url hash
+ */
guint
-camel_url_hash (gconstpointer v)
+camel_url_hash (const CamelURL *u)
{
- const CamelURL *u = v;
guint hash = 0;
#define ADD_HASH(s) if (s) hash ^= g_str_hash (s);
@@ -724,7 +729,7 @@ camel_url_hash (gconstpointer v)
return hash;
}
-static gint
+static gboolean
check_equal (gchar *s1,
gchar *s2)
{
@@ -741,19 +746,24 @@ check_equal (gchar *s1,
return strcmp (s1, s2) == 0;
}
-gint
-camel_url_equal (gconstpointer v,
- gconstpointer v2)
+/**
+ * camel_url_equal:
+ * @u: the base URL
+ * @u2: the URL to compare
+ *
+ * Returns: return %TRUE if the two urls are equal
+ */
+gboolean
+camel_url_equal (const CamelURL *u,
+ const CamelURL *u2)
{
- const CamelURL *u1 = v, *u2 = v2;
-
- return check_equal (u1->protocol, u2->protocol)
- && check_equal (u1->user, u2->user)
- && check_equal (u1->authmech, u2->authmech)
- && check_equal (u1->host, u2->host)
- && check_equal (u1->path, u2->path)
- && check_equal (u1->query, u2->query)
- && u1->port == u2->port;
+ return check_equal (u->protocol, u2->protocol)
+ && check_equal (u->user, u2->user)
+ && check_equal (u->authmech, u2->authmech)
+ && check_equal (u->host, u2->host)
+ && check_equal (u->path, u2->path)
+ && check_equal (u->query, u2->query)
+ && u->port == u2->port;
}
/**
@@ -762,7 +772,7 @@ camel_url_equal (gconstpointer v,
*
* Copy a #CamelURL.
*
- * Returns: a duplicate copy of @in
+ * Returns:(transfer full): a duplicate copy of @in
**/
CamelURL *
camel_url_copy (CamelURL *in)
diff --git a/camel/camel-url.h b/camel/camel-url.h
index db3a26e..951a52a 100644
--- a/camel/camel-url.h
+++ b/camel/camel-url.h
@@ -62,9 +62,9 @@ CamelURL * camel_url_new (const gchar *url_string,
GError **error);
gchar * camel_url_to_string (CamelURL *url,
CamelURLFlags flags);
-guint camel_url_hash (gconstpointer v);
-gint camel_url_equal (gconstpointer v,
- gconstpointer v2);
+guint camel_url_hash (const CamelURL *u);
+gboolean camel_url_equal (const CamelURL *u,
+ const CamelURL *u2);
CamelURL * camel_url_copy (CamelURL *in);
void camel_url_free (CamelURL *url);
diff --git a/camel/camel-vee-data-cache.h b/camel/camel-vee-data-cache.h
index 9c42cc4..3228597 100644
--- a/camel/camel-vee-data-cache.h
+++ b/camel/camel-vee-data-cache.h
@@ -199,9 +199,7 @@ CamelVeeMessageInfoData *
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);
void camel_vee_data_cache_remove_message_info_data
(CamelVeeDataCache *data_cache,
diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c
index 745b8a9..e71b893 100644
--- a/camel/camel-vee-folder.c
+++ b/camel/camel-vee-folder.c
@@ -1533,6 +1533,9 @@ camel_vee_folder_set_folders (CamelVeeFolder *vf,
/**
* camel_vee_folder_add_vuid:
+ * @vfolder:
+ * @mi_data: (type CamelVeeMessageInfoData):
+ * @changes:
*
* FIXME Document me!
*
@@ -1584,6 +1587,9 @@ camel_vee_folder_add_vuid (CamelVeeFolder *vfolder,
/**
* camel_vee_folder_remove_vuid:
+ * @vfolder:
+ * @mi_data: (type CamelVeeMessageInfoData):
+ * @changes:
*
* FIXME Document me!
*
diff --git a/camel/camel-vee-folder.h b/camel/camel-vee-folder.h
index c1854bc..ebb43b7 100644
--- a/camel/camel-vee-folder.h
+++ b/camel/camel-vee-folder.h
@@ -95,7 +95,7 @@ void camel_vee_folder_construct (CamelVeeFolder *vf,
guint32 flags);
CamelFolder * camel_vee_folder_get_location (CamelVeeFolder *vf,
- const struct _CamelVeeMessageInfo *vinfo,
+ const CamelVeeMessageInfo *vinfo,
gchar **realuid);
CamelFolder * camel_vee_folder_get_vee_uid_folder (CamelVeeFolder *vf,
const gchar *vee_message_uid);
diff --git a/camel/camel-vee-message-info.h b/camel/camel-vee-message-info.h
index 469236d..fa79459 100644
--- a/camel/camel-vee-message-info.h
+++ b/camel/camel-vee-message-info.h
@@ -62,13 +62,13 @@ struct _CamelVeeMessageInfoClass {
GType camel_vee_message_info_get_type (void);
CamelMessageInfo *
- camel_vee_message_info_new (struct _CamelFolderSummary *summary,
- struct _CamelFolderSummary *original_summary,
+ camel_vee_message_info_new (CamelFolderSummary *summary,
+ CamelFolderSummary *original_summary,
const gchar *vuid);
-struct _CamelFolderSummary *
+CamelFolderSummary *
camel_vee_message_info_get_original_summary
(const CamelVeeMessageInfo *vmi);
-struct _CamelFolder *
+CamelFolder *
camel_vee_message_info_get_original_folder
(const CamelVeeMessageInfo *vmi);
diff --git a/camel/camel-vee-store.c b/camel/camel-vee-store.c
index 93697ba..bcc94ae 100644
--- a/camel/camel-vee-store.c
+++ b/camel/camel-vee-store.c
@@ -596,7 +596,7 @@ camel_vee_store_get_vee_data_cache (CamelVeeStore *vstore)
*
* FIXME Document me!
*
- * Returns: (transfer none):
+ * Returns: (type CamelVeeFolder) (transfer none):
*
* Since: 3.6
**/
@@ -688,6 +688,9 @@ add_to_unmatched_folder_cb (CamelVeeMessageInfoData *mi_data,
/**
* camel_vee_store_note_subfolder_used:
+ * @vstore:
+ * @subfolder:
+ * @used_by: (type CamelVeeFolder):
*
* FIXME Document me!
*
@@ -767,6 +770,9 @@ remove_vuid_count_record_cb (CamelVeeMessageInfoData *mi_data,
/**
* camel_vee_store_note_subfolder_unused:
+ * @vstore:
+ * @subfolder:
+ * @unused_by: (type CamelVeeFolder):
*
* FIXME Document me!
*
@@ -816,6 +822,9 @@ camel_vee_store_note_subfolder_unused (CamelVeeStore *vstore,
/**
* camel_vee_store_note_vuid_used:
+ * @vstore:
+ * @mi_data:
+ * @used_by: (type CamelVeeFolder):
*
* FIXME Document me!
*
@@ -873,6 +882,9 @@ camel_vee_store_note_vuid_used (CamelVeeStore *vstore,
/**
* camel_vee_store_note_vuid_unused:
+ * @vstore:
+ * @mi_data:
+ * @unused_by: (type CamelVeeFolder):
*
* FIXME Document me!
*
diff --git a/camel/camel-vee-summary.c b/camel/camel-vee-summary.c
index 2fdb7e4..78bcc94 100644
--- a/camel/camel-vee-summary.c
+++ b/camel/camel-vee-summary.c
@@ -198,7 +198,15 @@ camel_vee_summary_get_uids_for_subfolder (CamelVeeSummary *summary,
return known_uids;
}
-/* unref returned pointer with g_object_unref() */
+/**
+ * camel_vee_summary_add:
+ * @s: the CamelVeeSummary
+ * @mi_data: (type CamelVeeMessageInfoData): the #CamelVeeMessageInfoData to add
+ *
+ * Unref returned pointer with g_object_unref()
+ *
+ * Returns: (transfer full): A new #CamelVeeMessageInfo object.
+ **/
CamelVeeMessageInfo *
camel_vee_summary_add (CamelVeeSummary *s,
CamelVeeMessageInfoData *mi_data)
diff --git a/camel/camel-vee-summary.h b/camel/camel-vee-summary.h
index ed073c5..629b2f4 100644
--- a/camel/camel-vee-summary.h
+++ b/camel/camel-vee-summary.h
@@ -68,18 +68,18 @@ struct _CamelVeeSummaryClass {
GType camel_vee_summary_get_type (void);
CamelFolderSummary *
- camel_vee_summary_new (struct _CamelFolder *parent);
+ camel_vee_summary_new (CamelFolder *parent);
CamelVeeMessageInfo *
camel_vee_summary_add (CamelVeeSummary *s,
struct _CamelVeeMessageInfoData *mi_data);
void camel_vee_summary_remove (CamelVeeSummary *summary,
const gchar *vuid,
- struct _CamelFolder *subfolder);
+ CamelFolder *subfolder);
void camel_vee_summary_replace_flags (CamelVeeSummary *summary,
const gchar *uid);
GHashTable * camel_vee_summary_get_uids_for_subfolder
(CamelVeeSummary *summary,
- struct _CamelFolder *subfolder);
+ CamelFolder *subfolder);
G_END_DECLS
diff --git a/camel/providers/local/camel-local-summary.c b/camel/providers/local/camel-local-summary.c
index 77e2b4b..277f9a2 100644
--- a/camel/providers/local/camel-local-summary.c
+++ b/camel/providers/local/camel-local-summary.c
@@ -47,7 +47,7 @@ static gboolean summary_header_from_db (CamelFolderSummary *,
static CamelMessageInfo *
message_info_new_from_header (CamelFolderSummary *,
- struct _camel_header_raw *);
+ CamelHeaderRaw *);
static gint local_summary_decode_x_evolution
(CamelLocalSummary *cls,
@@ -389,7 +389,7 @@ camel_local_summary_add (CamelLocalSummary *cls,
**/
gint
camel_local_summary_write_headers (gint fd,
- struct _camel_header_raw *header,
+ CamelHeaderRaw *header,
const gchar *xevline,
const gchar *status,
const gchar *xstatus)
@@ -738,7 +738,7 @@ summary_header_to_db (CamelFolderSummary *s,
static CamelMessageInfo *
message_info_new_from_header (CamelFolderSummary *s,
- struct _camel_header_raw *h)
+ CamelHeaderRaw *h)
{
CamelMessageInfo *mi;
CamelLocalSummary *cls = (CamelLocalSummary *) s;
diff --git a/camel/providers/local/camel-local-summary.h b/camel/providers/local/camel-local-summary.h
index f6c5c7f..cd230e5 100644
--- a/camel/providers/local/camel-local-summary.h
+++ b/camel/providers/local/camel-local-summary.h
@@ -97,7 +97,7 @@ gchar *camel_local_summary_encode_x_evolution (CamelLocalSummary *cls, const Cam
gint camel_local_summary_decode_x_evolution (CamelLocalSummary *cls, const gchar *xev, CamelMessageInfo
*info);
/* utility functions - write headers to a file with optional X-Evolution header and/or status header */
-gint camel_local_summary_write_headers (gint fd, struct _camel_header_raw *header, const gchar *xevline,
const gchar *status, const gchar *xstatus);
+gint camel_local_summary_write_headers (gint fd, CamelHeaderRaw *header, const gchar *xevline, const gchar
*status, const gchar *xstatus);
G_END_DECLS
diff --git a/camel/providers/local/camel-maildir-summary.c b/camel/providers/local/camel-maildir-summary.c
index ddc1a12..9f83abd 100644
--- a/camel/providers/local/camel-maildir-summary.c
+++ b/camel/providers/local/camel-maildir-summary.c
@@ -51,7 +51,7 @@
static CamelMessageInfo *
message_info_new_from_header (CamelFolderSummary *,
- struct _camel_header_raw *);
+ CamelHeaderRaw *);
static gint maildir_summary_load (CamelLocalSummary *cls,
gint forceindex,
GError **error);
@@ -309,7 +309,7 @@ maildir_summary_add (CamelLocalSummary *cls,
static CamelMessageInfo *
message_info_new_from_header (CamelFolderSummary *s,
- struct _camel_header_raw *h)
+ CamelHeaderRaw *h)
{
CamelMessageInfo *mi, *info;
CamelMaildirSummary *mds = (CamelMaildirSummary *) s;
diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c
index e86a3b8..d92f51a 100644
--- a/camel/providers/local/camel-mbox-summary.c
+++ b/camel/providers/local/camel-mbox-summary.c
@@ -63,7 +63,7 @@ static gboolean summary_header_from_db (CamelFolderSummary *,
CamelFIRecord *);
static CamelMessageInfo *
message_info_new_from_header (CamelFolderSummary *,
- struct _camel_header_raw *);
+ CamelHeaderRaw *);
static CamelMessageInfo *
message_info_new_from_parser (CamelFolderSummary *,
CamelMimeParser *);
@@ -243,7 +243,7 @@ summary_header_to_db (CamelFolderSummary *s,
static CamelMessageInfo *
message_info_new_from_header (CamelFolderSummary *s,
- struct _camel_header_raw *h)
+ CamelHeaderRaw *h)
{
CamelMessageInfo *mi;
CamelMboxSummary *mbs = (CamelMboxSummary *) s;
diff --git a/camel/providers/local/camel-spool-summary.h b/camel/providers/local/camel-spool-summary.h
index b08adfb..fdd4f91 100644
--- a/camel/providers/local/camel-spool-summary.h
+++ b/camel/providers/local/camel-spool-summary.h
@@ -76,7 +76,7 @@ gchar *camel_spool_summary_encode_x_evolution (CamelSpoolSummary *cls, const Cam
gint camel_spool_summary_decode_x_evolution (CamelSpoolSummary *cls, const gchar *xev, CamelMessageInfo
*info);
/* utility functions - write headers to a file with optional X-Evolution header */
-gint camel_spool_summary_write_headers (gint fd, struct _camel_header_raw *header, gchar *xevline);
+gint camel_spool_summary_write_headers (gint fd, CamelHeaderRaw *header, gchar *xevline);
G_END_DECLS
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c
index 490348e..1493ece 100644
--- a/camel/providers/nntp/camel-nntp-folder.c
+++ b/camel/providers/nntp/camel-nntp-folder.c
@@ -407,7 +407,7 @@ nntp_folder_append_message_sync (CamelFolder *folder,
CamelMimeFilter *crlffilter;
gint ret;
guint u;
- struct _camel_header_raw *header, *savedhdrs, *n, *tail;
+ CamelHeaderRaw *header, *savedhdrs, *n, *tail;
const gchar *full_name;
gchar *group, *line;
gboolean success = TRUE;
@@ -443,9 +443,9 @@ nntp_folder_append_message_sync (CamelFolder *folder,
/* remove mail 'To', 'CC', and 'BCC' headers */
savedhdrs = NULL;
- tail = (struct _camel_header_raw *) &savedhdrs;
+ tail = (CamelHeaderRaw *) &savedhdrs;
- header = (struct _camel_header_raw *) &CAMEL_MIME_PART (message)->headers;
+ header = (CamelHeaderRaw *) &CAMEL_MIME_PART (message)->headers;
n = header->next;
while (n != NULL) {
if (!g_ascii_strcasecmp (n->name, "To") || !g_ascii_strcasecmp (n->name, "Cc") ||
!g_ascii_strcasecmp (n->name, "Bcc")) {
diff --git a/camel/providers/nntp/camel-nntp-summary.c b/camel/providers/nntp/camel-nntp-summary.c
index 2ae341e..023fc9e 100644
--- a/camel/providers/nntp/camel-nntp-summary.c
+++ b/camel/providers/nntp/camel-nntp-summary.c
@@ -53,7 +53,7 @@ struct _CamelNNTPSummaryPrivate {
gint xover_setup;
};
-static CamelMessageInfo * message_info_new_from_header (CamelFolderSummary *, struct _camel_header_raw *);
+static CamelMessageInfo * message_info_new_from_header (CamelFolderSummary *, CamelHeaderRaw *);
static gboolean summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *mir);
static CamelFIRecord * summary_header_to_db (CamelFolderSummary *s, GError **error);
@@ -95,7 +95,7 @@ camel_nntp_summary_new (CamelFolder *folder)
static CamelMessageInfo *
message_info_new_from_header (CamelFolderSummary *s,
- struct _camel_header_raw *h)
+ CamelHeaderRaw *h)
{
CamelMessageInfo *mi;
CamelNNTPSummary *cns = (CamelNNTPSummary *) s;
@@ -166,7 +166,7 @@ add_range_xover (CamelNNTPSummary *cns,
CamelSettings *settings;
CamelService *service;
CamelFolderSummary *s;
- struct _camel_header_raw *headers = NULL;
+ CamelHeaderRaw *headers = NULL;
gchar *line, *tab;
gchar *host;
guint len;
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
index 6e9b17b..2505675 100644
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ b/camel/providers/pop3/camel-pop3-folder.c
@@ -92,7 +92,7 @@ cmd_builduid (CamelPOP3Engine *pe,
{
GChecksum *checksum;
CamelPOP3FolderInfo *fi = data;
- struct _camel_header_raw *h;
+ CamelHeaderRaw *h;
CamelMimeParser *mp;
guint8 *digest;
gsize length;
diff --git a/camel/providers/sendmail/camel-sendmail-provider.c
b/camel/providers/sendmail/camel-sendmail-provider.c
index 4e92bd9..6460ee0 100644
--- a/camel/providers/sendmail/camel-sendmail-provider.c
+++ b/camel/providers/sendmail/camel-sendmail-provider.c
@@ -54,8 +54,8 @@ camel_provider_module_init (void)
sendmail_provider.object_types[CAMEL_PROVIDER_TRANSPORT] =
CAMEL_TYPE_SENDMAIL_TRANSPORT;
- sendmail_provider.url_hash = camel_url_hash;
- sendmail_provider.url_equal = camel_url_equal;
+ sendmail_provider.url_hash = (GHashFunc) camel_url_hash;
+ sendmail_provider.url_equal = (GEqualFunc) camel_url_equal;
sendmail_provider.translation_domain = GETTEXT_PACKAGE;
camel_provider_register (&sendmail_provider);
diff --git a/camel/providers/sendmail/camel-sendmail-transport.c
b/camel/providers/sendmail/camel-sendmail-transport.c
index 15c6288..996ed4a 100644
--- a/camel/providers/sendmail/camel-sendmail-transport.c
+++ b/camel/providers/sendmail/camel-sendmail-transport.c
@@ -114,7 +114,7 @@ sendmail_send_to_sync (CamelTransport *transport,
GCancellable *cancellable,
GError **error)
{
- struct _camel_header_raw *header, *savedbcc, *n, *tail;
+ CamelHeaderRaw *header, *savedbcc, *n, *tail;
const gchar *from_addr, *addr;
GPtrArray *argv_arr;
gint i, len, fd[2], nullfd, wstat;
@@ -206,9 +206,9 @@ sendmail_send_to_sync (CamelTransport *transport,
/* unlink the bcc headers */
savedbcc = NULL;
- tail = (struct _camel_header_raw *) &savedbcc;
+ tail = (CamelHeaderRaw *) &savedbcc;
- header = (struct _camel_header_raw *) &CAMEL_MIME_PART (message)->headers;
+ header = (CamelHeaderRaw *) &CAMEL_MIME_PART (message)->headers;
n = header->next;
while (n != NULL) {
if (!g_ascii_strcasecmp (n->name, "Bcc")) {
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index de6bc6f..197534b 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -1641,7 +1641,7 @@ smtp_data (CamelSmtpTransport *transport,
GCancellable *cancellable,
GError **error)
{
- struct _camel_header_raw *header, *savedbcc, *n, *tail;
+ CamelHeaderRaw *header, *savedbcc, *n, *tail;
CamelBestencEncoding enctype = CAMEL_BESTENC_8BIT;
CamelStream *filtered_stream;
gchar *cmdbuf, *respbuf = NULL;
@@ -1698,9 +1698,9 @@ smtp_data (CamelSmtpTransport *transport,
/* unlink the bcc headers */
savedbcc = NULL;
- tail = (struct _camel_header_raw *) &savedbcc;
+ tail = (CamelHeaderRaw *) &savedbcc;
- header = (struct _camel_header_raw *) &CAMEL_MIME_PART (message)->headers;
+ header = (CamelHeaderRaw *) &CAMEL_MIME_PART (message)->headers;
n = header->next;
while (n != NULL) {
if (!g_ascii_strcasecmp (n->name, "Bcc")) {
diff --git a/vala/Camel-1.2.metadata b/vala/Camel-1.2.metadata
index eb66385..74aded7 100644
--- a/vala/Camel-1.2.metadata
+++ b/vala/Camel-1.2.metadata
@@ -6,7 +6,9 @@ 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_read.fp type="GLib.FileStream"
Object.state_write#method skip
+Object.state_write.fp type="GLib.FileStream"
Operation.pop_message skip
Operation.progress skip
@@ -23,3 +25,13 @@ localtime_with_offset.tm type="Posix.tm"
mktime_utc.tm type="Posix.tm"
HeaderAddress.new_name#constructor name="with_name"
+
+// FILE* are supported by Vala
+StoreSummary.store_info_save.file type="GLib.FileStream"
+StoreSummary.summary_header_load.file type="GLib.FileStream"
+StoreSummary.summary_header_save.file type="GLib.FileStream"
+CertDB.cert_load.istream type="GLib.FileStream"
+CertDB.cert_save.ostream type="GLib.FileStream"
+CertDB.header_load.istream type="GLib.FileStream"
+CertDB.header_save.ostream type="GLib.FileStream"
+FilterDriver.set_logfile.logfile type="GLib.FileStream"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]