[evolution-data-server/tintou/add-vala-metadata] Vala: Add more .metadata fixes
- From: Corentin Noël <corentinnoel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/tintou/add-vala-metadata] Vala: Add more .metadata fixes
- Date: Tue, 21 Jan 2020 17:26:12 +0000 (UTC)
commit 6ec2820beacf44e761ea2d63b0095f3c74ef4537
Author: Corentin Noël <corentin noel collabora com>
Date: Tue Jan 21 18:25:14 2020 +0100
Vala: Add more .metadata fixes
This allows to make the binding more complete and avoid memory leaks
src/calendar/libedata-cal/e-cal-cache.c | 14 ++--
src/camel/camel-mime-utils.c | 2 +-
src/vala/CMakeLists.txt | 4 +-
src/vala/Camel-1.2.metadata | 122 ++++++++++++++++++++++++++++++--
src/vala/EBackend-1.2.metadata | 2 +
src/vala/EBookContacts-1.2.metadata | 2 +
src/vala/EDataBook-1.2.metadata | 6 ++
src/vala/EDataCal-2.0.metadata | 1 +
src/vala/camel-1.2-custom.vala | 6 ++
9 files changed, 147 insertions(+), 12 deletions(-)
---
diff --git a/src/calendar/libedata-cal/e-cal-cache.c b/src/calendar/libedata-cal/e-cal-cache.c
index b2f95ebf3..c96998116 100644
--- a/src/calendar/libedata-cal/e-cal-cache.c
+++ b/src/calendar/libedata-cal/e-cal-cache.c
@@ -4520,10 +4520,14 @@ e_cal_cache_class_init (ECalCacheClass *klass)
klass->dup_component_revision = ecc_dup_component_revision;
/**
- * ECalCache:dup-component-revision:
+ * ECalCache::dup-component-revision:
+ * @cal_cache: an #ECalCache
+ * @icomp: an #ICalComponent
* A signal being called to get revision of an ICalComponent.
* The default implementation uses a concatenation of
* DTSTAMP '-' LASTMODIFIED '-' SEQUENCE.
+ *
+ * Returns: the revision string
**/
signals[DUP_COMPONENT_REVISION] = g_signal_new (
"dup-component-revision",
@@ -4534,10 +4538,10 @@ e_cal_cache_class_init (ECalCacheClass *klass)
NULL,
g_cclosure_marshal_generic,
G_TYPE_STRING, 1,
- G_TYPE_POINTER);
+ I_CAL_TYPE_COMPONENT);
/**
- * ECalCache:get-timezone:
+ * ECalCache::get-timezone:
* @cal_cache: an #ECalCache
* @tzid: timezone ID
*
@@ -4546,6 +4550,8 @@ e_cal_cache_class_init (ECalCacheClass *klass)
* all timezones which are needed by the component. The returned
* ICalTimezone will not be freed.
*
+ * Returns: (transfer none): an #ICalTimezone
+ *
* Since: 3.30
**/
signals[GET_TIMEZONE] = g_signal_new (
@@ -4556,7 +4562,7 @@ e_cal_cache_class_init (ECalCacheClass *klass)
g_signal_accumulator_first_wins,
NULL,
g_cclosure_marshal_generic,
- G_TYPE_POINTER, 1,
+ I_CAL_TYPE_TIMEZONE, 1,
G_TYPE_STRING);
}
diff --git a/src/camel/camel-mime-utils.c b/src/camel/camel-mime-utils.c
index 9e09f386f..3394707e2 100644
--- a/src/camel/camel-mime-utils.c
+++ b/src/camel/camel-mime-utils.c
@@ -2329,7 +2329,7 @@ rfc2184_decode (const gchar *in,
*
* Searches @params for a param named @name and gets the value.
*
- * Returns: the value of the @name param
+ * Returns: (transfer none): the value of the @name param
**/
gchar *
camel_header_param (struct _camel_header_param *params,
diff --git a/src/vala/CMakeLists.txt b/src/vala/CMakeLists.txt
index ecfcef892..4693fd0e2 100644
--- a/src/vala/CMakeLists.txt
+++ b/src/vala/CMakeLists.txt
@@ -78,7 +78,9 @@ set(vala_deps
posix
)
-set(extra_vapigen_files)
+set(extra_vapigen_files
+ ${CMAKE_CURRENT_SOURCE_DIR}/camel-${API_VERSION}-custom.vala
+)
_build_vala_files(camel-${API_VERSION}
gir_fullname
diff --git a/src/vala/Camel-1.2.metadata b/src/vala/Camel-1.2.metadata
index 6798d5cdd..c29dccf21 100644
--- a/src/vala/Camel-1.2.metadata
+++ b/src/vala/Camel-1.2.metadata
@@ -1,3 +1,5 @@
+*.*.cancellable default=null
+
CipherValidity.sign skip
CipherValidity.encrypt skip
@@ -9,24 +11,123 @@ 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
+Operation.push_message#signal name="pushed_message"
+Operation.push_message#function skip=false symbol_type="method" instance_idx=0 printf_format=true
+Operation.pop_message#function symbol_type="method" instance_idx=0
+Operation.progress#function symbol_type="method" instance_idx=0
+
+ContentDisposition.disposition unowned=false
+ContentDisposition.params type="Camel.HeaderParam"
+
+ContentType.type unowned=false
+ContentType.subtype unowned=false
+ContentType.params type="Camel.HeaderParam"
+
+CipherCertInfo.properties type_arguments="Camel.CipherCertInfoProperty"
+cipher_certinfo_get_property parent="Camel.CipherCertInfo" symbol_type="method" instance_idx=0
name="get_property"
+cipher_certinfo_set_property parent="Camel.CipherCertInfo" symbol_type="method" instance_idx=0
name="set_property"
+
+Cert.fingerprint unowned=false
+Cert.hostname unowned=false
+Cert.issuer unowned=false
+Cert.rawcert unowned=false
+Cert.subject unowned=false
Session* skip=false
SExp* skip=false
+SExp.* skip=false
+
+MimeFilter.new symbol_type="function"
+
+Folder.get_parent_store type="unowned Camel.Store"
+
+FolderInfo.display_name unowned=false
+FolderInfo.full_name unowned=false
+FolderInfo.child type="Camel.FolderInfo?"
+FolderInfo.next type="Camel.FolderInfo?"
+FolderInfo.parent type="unowned Camel.FolderInfo?"
+
+FolderQuotaInfo.name unowned=false
+FolderQuotaInfo.next type="Camel.FolderQuotaInfo?"
+
+FolderSummary.free_array skip
+FolderSummary.get_folder type="unowned Camel.Folder"
+FolderSummary.header_load.store type="Camel.Store"
// Recursive structs are not allowed
-MessageContentInfo.next type="void*"
-MessageContentInfo.childs type="void*"
-MessageContentInfo.parent type="void*"
-SExpTerm.value.func.terms type="void*[]"
+MessageContentInfo.next type="Camel.MessageContentInfo?"
+MessageContentInfo.childs type="Camel.MessageContentInfo?"
+MessageContentInfo.parent type="unowned Camel.MessageContentInfo?"
+MessageContentInfo.type unowned=false
+MessageContentInfo.disposition unowned=false
+MessageContentInfo.id unowned=false
+MessageContentInfo.description unowned=false
+MessageContentInfo.encoding unowned=false
+
+SExpTerm.value.func.terms type="Camel.SExpTerm[]"
+HeaderParam.next type="Camel.HeaderParam?"
+header_param_list_decode type="Camel.HeaderParam?" parent="Camel.HeaderParam" name="decode"
localtime_with_offset.tm type="Posix.tm"
mktime_utc.tm type="Posix.tm"
+HeaderParam struct=false
+HeaderParam.name unowned=false
+HeaderParam.value unowned=false
+header_param parent="Camel.HeaderParam" symbol_type="method" instance_idx=0 name="get_value"
+header_param_list_format parent="Camel.HeaderParam" symbol_type="method" instance_idx=0 name="format"
+header_param_list_format_append parent="Camel.HeaderParam" symbol_type="method" instance_idx=1
name="format_append"
+header_param_list_free parent="Camel.HeaderParam" symbol_type="method" instance_idx=0 name="free"
destroys_instance=true
+
HeaderAddress.new_name#constructor name="with_name"
+HeaderAddress.name unowned=false
+HeaderAddress.next type="Camel.HeaderAddress?"
+HeaderAddress.v.addr unowned=false
+HeaderAddress.v.members type="Camel.HeaderAddress?"
+
+// They are already covered by FolderSummary.new_message_info_ or FolderSummary.get
+MessageInfo.new skip
+MessageInfo.new_from_headers skip
+MessageInfo.ref_summary type="Camel.FolderSummary?"
+MessageInfo.references type_arguments="uint64"
+
+MimeFilter.outreal unowned=false
+MimeFilter.backbuf unowned=false
+
+Provider.priv skip
+Provider.authtypes type_arguments="unowned Camel.ServiceAuthType"
+
+VeeFolder.add_vuid.mi_data type="Camel.VeeMessageInfoData"
+VeeFolder.remove_vuid.mi_data type="Camel.VeeMessageInfoData"
+
+SMIMEContext.describe_part.part type="Camel.MimePart"
+
+Trie.add skip=false
+Trie.search skip=false
+
+UrlScanner.add skip=false
+UrlScanner.scan skip=false
+
+NetworkService.new_connectable skip=false
+
+Folder.threaded_messages_dump parent="Camel.FolderThreadNode" symbol_type="method" instance_idx=0 name="dump"
+
+FolderSummary.summary_header_load name="header_load_impl"
+FolderSummary.summary_header_load.fir type="Camel.FIRecord"
+FolderSummary.summary_header_save name="header_save_impl" type="Camel.FIRecord"
+
+FolderThread.folder unowned=false
+FolderThread.node_chunks unowned=false
+FolderThread.summary type="GLib.GenericArray<Camel.MessageInfo>"
+FolderThread.tree type="Camel.FolderThreadNode"
+
+FolderThreadNode.next type="unowned Camel.FolderThreadNode?"
+FolderThreadNode.parent type="unowned Camel.FolderThreadNode?"
+FolderThreadNode.child type="unowned Camel.FolderThreadNode?"
// FILE* are supported by Vala
+StoreSummary.* skip=false
+StoreSummary.store_info_load.file type="GLib.FileStream"
StoreSummary.store_info_save.file type="GLib.FileStream"
StoreSummary.summary_header_load.file type="GLib.FileStream"
StoreSummary.summary_header_save.file type="GLib.FileStream"
@@ -38,5 +139,14 @@ FilterDriver.set_logfile.logfile type="GLib.FileStream"
FolderSummary.prepare_fetch_all#virtual_method name="prepare_fetch_all_v"
+VeeStore.get_unmatched_folder type="unowned Camel.VeeFolder"
+
+WeakRefGroup.get type="GLib.Object"
+WeakRefGroup.set.object type="owned GLib.Object"
+
+ServiceAuthType.authproto unowned=false
+ServiceAuthType.description unowned=false
+ServiceAuthType.name unowned=false
+
// Abstract classes can't have creation methods
Sasl.new symbol_type="function" name="for_service"
diff --git a/src/vala/EBackend-1.2.metadata b/src/vala/EBackend-1.2.metadata
new file mode 100644
index 000000000..18d2a328d
--- /dev/null
+++ b/src/vala/EBackend-1.2.metadata
@@ -0,0 +1,2 @@
+Cache.before_put#virtual_method name="before_put_impl"
+Cache.before_remove#virtual_method name="before_remove_impl"
diff --git a/src/vala/EBookContacts-1.2.metadata b/src/vala/EBookContacts-1.2.metadata
index 7b3023204..0459b3bd9 100644
--- a/src/vala/EBookContacts-1.2.metadata
+++ b/src/vala/EBookContacts-1.2.metadata
@@ -21,3 +21,5 @@ VCard.get_attribute nullable=true
VCard.get_attribute_if_parsed nullable=true
VCardAttribute.get_group nullable=true
VCardAttribute.get_value nullable=true
+book_client_error_create skip
+book_client_error_to_string skip
diff --git a/src/vala/EDataBook-1.2.metadata b/src/vala/EDataBook-1.2.metadata
new file mode 100644
index 000000000..c83aec74c
--- /dev/null
+++ b/src/vala/EDataBook-1.2.metadata
@@ -0,0 +1,6 @@
+BookSqlite.before_insert_contact#signal.p4 skip
+BookSqlite.before_remove_contact#signal.p2 skip
+DataBookCursor.get_position#virtual_method name="impl_get_position"
+DataBookCursor.load_locale#virtual_method name="impl_load_locale"
+DataBookCursor.set_alphabetic_index#virtual_method name="impl_set_alphabetic_index"
+DataBookCursor.set_sexp#virtual_method name="impl_set_sexp"
diff --git a/src/vala/EDataCal-2.0.metadata b/src/vala/EDataCal-2.0.metadata
new file mode 100644
index 000000000..7d867814e
--- /dev/null
+++ b/src/vala/EDataCal-2.0.metadata
@@ -0,0 +1 @@
+CalCache.get_timezone#signal name="get_timezone_impl"
diff --git a/src/vala/camel-1.2-custom.vala b/src/vala/camel-1.2-custom.vala
new file mode 100644
index 000000000..48e10dc61
--- /dev/null
+++ b/src/vala/camel-1.2-custom.vala
@@ -0,0 +1,6 @@
+namespace Camel {
+ [CCode (cheader_filename = "camel/camel.h", free_function = "camel_header_param_list_free", has_type_id =
false)]
+ [Compact]
+ public class HeaderParam {
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]