summaryrefslogtreecommitdiff
path: root/src/libical-glib
diff options
context:
space:
mode:
Diffstat (limited to 'src/libical-glib')
-rw-r--r--src/libical-glib/CMakeLists.txt58
-rw-r--r--src/libical-glib/api/i-cal-array.xml14
-rw-r--r--src/libical-glib/api/i-cal-attach.xml18
-rw-r--r--src/libical-glib/api/i-cal-comp-iter.xml12
-rw-r--r--src/libical-glib/api/i-cal-component.xml91
-rw-r--r--src/libical-glib/api/i-cal-datetimeperiod.xml12
-rw-r--r--src/libical-glib/api/i-cal-derived-parameter.xml169
-rw-r--r--src/libical-glib/api/i-cal-derived-property.xml12
-rw-r--r--src/libical-glib/api/i-cal-derived-value.xml48
-rw-r--r--src/libical-glib/api/i-cal-duration.xml12
-rw-r--r--src/libical-glib/api/i-cal-enums.xml12
-rw-r--r--src/libical-glib/api/i-cal-error.xml12
-rw-r--r--src/libical-glib/api/i-cal-geo.xml44
-rw-r--r--src/libical-glib/api/i-cal-memory.xml12
-rw-r--r--src/libical-glib/api/i-cal-mime.xml12
-rw-r--r--src/libical-glib/api/i-cal-parameter.xml20
-rw-r--r--src/libical-glib/api/i-cal-parser.xml18
-rw-r--r--src/libical-glib/api/i-cal-period.xml12
-rw-r--r--src/libical-glib/api/i-cal-property.xml12
-rw-r--r--src/libical-glib/api/i-cal-recur-iterator.xml12
-rw-r--r--src/libical-glib/api/i-cal-recur.xml12
-rw-r--r--src/libical-glib/api/i-cal-recurrence.xml12
-rw-r--r--src/libical-glib/api/i-cal-reqstat.xml12
-rw-r--r--src/libical-glib/api/i-cal-restriction.xml12
-rw-r--r--src/libical-glib/api/i-cal-time-span.xml12
-rw-r--r--src/libical-glib/api/i-cal-time.xml18
-rw-r--r--src/libical-glib/api/i-cal-timezone.xml14
-rw-r--r--src/libical-glib/api/i-cal-trigger.xml12
-rw-r--r--src/libical-glib/api/i-cal-unknowntokenhandling.xml12
-rw-r--r--src/libical-glib/api/i-cal-value.xml16
-rw-r--r--src/libical-glib/i-cal-object.c.in107
-rw-r--r--src/libical-glib/i-cal-object.h.in18
-rw-r--r--src/libical-glib/libical-glib.pc.in3
-rw-r--r--src/libical-glib/tools/generator.c49
-rw-r--r--src/libical-glib/tools/generator.h13
-rw-r--r--src/libical-glib/tools/header-forward-declarations-template14
-rw-r--r--src/libical-glib/tools/header-header-template18
-rw-r--r--src/libical-glib/tools/header-template14
-rw-r--r--src/libical-glib/tools/source-template14
-rw-r--r--src/libical-glib/tools/xml-parser.c13
-rw-r--r--src/libical-glib/tools/xml-parser.h12
41 files changed, 508 insertions, 511 deletions
diff --git a/src/libical-glib/CMakeLists.txt b/src/libical-glib/CMakeLists.txt
index 096f9bb4..967b4b98 100644
--- a/src/libical-glib/CMakeLists.txt
+++ b/src/libical-glib/CMakeLists.txt
@@ -1,5 +1,12 @@
+# SPDX-FileCopyrightText: Milan Crha <mcrha@redhat.com>
+# SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
+
add_definitions(-Dlibical_ical_EXPORTS)
+# a C11 compliant compiler is required to build this library
+set(CMAKE_C_STANDARD 11)
+set(CMAKE_C_STANDARD_REQUIRED ON)
+
# build ical-glib-src-generator
add_executable(ical-glib-src-generator
tools/generator.c
@@ -85,9 +92,14 @@ else()
endif()
add_custom_command (
- OUTPUT ${LIBICAL_GLIB_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/libical-glib-private.h ${CMAKE_CURRENT_BINARY_DIR}/i-cal-forward-declarations.h
- COMMAND ${ical-glib-src-generator_EXE} "${CMAKE_CURRENT_SOURCE_DIR}/tools" "${CMAKE_CURRENT_SOURCE_DIR}/api"
+ OUTPUT
+ ${LIBICAL_GLIB_SOURCES}
+ ${CMAKE_CURRENT_BINARY_DIR}/libical-glib-private.h
+ ${CMAKE_CURRENT_BINARY_DIR}/i-cal-forward-declarations.h
+ COMMAND
+ ${ical-glib-src-generator_EXE} "${CMAKE_CURRENT_SOURCE_DIR}/tools" "${CMAKE_CURRENT_SOURCE_DIR}/api"
DEPENDS ${ical-glib-src-generator_EXE} ${xml_files}
+ COMMENT "Generate libical-glib headers"
)
configure_file(
@@ -121,10 +133,14 @@ add_dependencies(ical-glib ical-header)
target_compile_options(ical-glib PRIVATE ${GLIB_CFLAGS})
target_compile_definitions(ical-glib PRIVATE -DG_LOG_DOMAIN="libical-glib" -DLIBICAL_GLIB_COMPILATION)
target_link_libraries(ical-glib PRIVATE ical ${GLIB_LIBRARIES})
-if(NOT SHARED_ONLY)
+if(NOT SHARED_ONLY AND NOT STATIC_ONLY)
add_library(ical-glib-static STATIC ${LIBICAL_GLIB_SOURCES})
add_dependencies(ical-glib-static ical-header)
- target_compile_options(ical-glib-static PUBLIC ${GLIB_CFLAGS} -DG_LOG_DOMAIN="libical-glib" -DLIBICAL_GLIB_COMPILATION)
+ target_compile_options(ical-glib-static
+ PUBLIC ${GLIB_CFLAGS}
+ -DG_LOG_DOMAIN="libical-glib"
+ -DLIBICAL_GLIB_COMPILATION
+ )
target_link_libraries(ical-glib-static ${GLIB_LIBRARIES})
endif()
@@ -172,7 +188,14 @@ if(HAVE_INTROSPECTION)
set(ICalGLib_${LIB_VERSION}_gir_VERSION ${LIBICAL_GLIB_GIR_VERSION_STRING})
set(ICalGLib_${LIB_VERSION}_gir_LIBRARY "ICalGLib")
set(ICalGLib_${LIB_VERSION}_gir_INCLUDES GObject-2.0 GLib-2.0)
- set(ICalGLib_${LIB_VERSION}_gir_CFLAGS ${_includes} ${GLIB_CFLAGS} -DLIBICAL_GLIB_COMPILATION -I${CMAKE_CURRENT_BINARY_DIR} -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_BINARY_DIR}/src/libical -I${CMAKE_SOURCE_DIR}/src/libical -I${CMAKE_BINARY_DIR}/src/libical-glib)
+ set(ICalGLib_${LIB_VERSION}_gir_CFLAGS ${GLIB_CFLAGS}
+ -DLIBICAL_GLIB_COMPILATION
+ -I${CMAKE_CURRENT_BINARY_DIR}
+ -I${CMAKE_CURRENT_SOURCE_DIR}
+ -I${CMAKE_BINARY_DIR}/src/libical
+ -I${CMAKE_SOURCE_DIR}/src/libical
+ -I${CMAKE_BINARY_DIR}/src/libical-glib
+ )
set(ICalGLib_${LIB_VERSION}_gir_LIBS ical-glib)
set(ICalGLib_${LIB_VERSION}_gir_FILES ${LIBICAL_GLIB_GIR_SOURCES})
@@ -182,7 +205,7 @@ if(HAVE_INTROSPECTION)
endif()
if(ICAL_GLIB_VAPI)
- add_custom_target(vala ALL)
+ add_custom_target(vala ALL COMMENT "Target to run vala")
set(gir_fullname ${CMAKE_BINARY_DIR}/src/libical-glib/ICalGLib-${LIBICAL_GLIB_GIR_VERSION_STRING}.gir)
set(metadata_fullname ${CMAKE_CURRENT_BINARY_DIR}/ICalGLib-${LIBICAL_GLIB_GIR_VERSION_STRING}.metadata)
set(vapi_file ${CMAKE_CURRENT_BINARY_DIR}/libical-glib.vapi)
@@ -206,9 +229,10 @@ if(ICAL_GLIB_VAPI)
DEPENDS
${gir_fullname}
${metadata_fullname}
+ COMMENT "Run the tool to generate the Vala API"
)
- add_custom_target(valafile DEPENDS ${vapi_file})
+ add_custom_target(valafile DEPENDS ${vapi_file} COMMENT "Target to run valafile")
add_dependencies(vala valafile)
@@ -217,11 +241,11 @@ endif()
if(MSVC)
set_target_properties(ical-glib PROPERTIES PREFIX "lib")
- if(NOT SHARED_ONLY)
+ if(NOT SHARED_ONLY AND NOT STATIC_ONLY)
set_target_properties(ical-glib-static PROPERTIES PREFIX "lib")
endif()
else()
- if(NOT SHARED_ONLY)
+ if(NOT SHARED_ONLY AND NOT STATIC_ONLY)
set_target_properties(ical-glib-static PROPERTIES OUTPUT_NAME "ical-glib")
endif()
endif()
@@ -230,7 +254,7 @@ set_target_properties(ical-glib PROPERTIES
SOVERSION ${LIBICAL_LIB_MAJOR_VERSION}
)
set_target_properties(ical-glib PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-if(NOT SHARED_ONLY)
+if(NOT SHARED_ONLY AND NOT STATIC_ONLY)
set_target_properties(ical-glib-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
endif()
@@ -239,7 +263,7 @@ install(
EXPORT icalTargets
DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS}
)
-if(NOT SHARED_ONLY)
+if(NOT SHARED_ONLY AND NOT STATIC_ONLY)
install(
TARGETS ical-glib-static
EXPORT icalTargets
@@ -257,8 +281,16 @@ install(FILES ${LIBICAL_GLIB_HEADERS}
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "\${prefix}")
-set(libdir "\${exec_prefix}/lib")
-set(includedir "\${prefix}/include")
+if(IS_ABSOLUTE ${LIB_INSTALL_DIR})
+ set(libdir "${LIB_INSTALL_DIR}")
+else()
+ set(libdir "\${exec_prefix}/${LIB_INSTALL_DIR}")
+endif()
+if(IS_ABSOLUTE ${INCLUDE_INSTALL_DIR})
+ set(includedir "${INCLUDE_INSTALL_DIR}")
+else()
+ set(includedir "\${prefix}/include")
+endif()
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/libical-glib.pc.in
diff --git a/src/libical-glib/api/i-cal-array.xml b/src/libical-glib/api/i-cal-array.xml
index 48edff92..5e8f4ba6 100644
--- a/src/libical-glib/api/i-cal-array.xml
+++ b/src/libical-glib/api/i-cal-array.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Array" native="icalarray" is_possible_global="true" destroy_func="icalarray_free">
<method name="i_cal_array_size" corresponds="CUSTOM" kind="other" since="1.0">
@@ -54,7 +46,7 @@
<method name="i_cal_array_element_at" corresponds="icalarray_element_at" annotation="skip" kind="private" since="1.0">
<parameter type="ICalArray *" name="array" comment="The #ICalArray to be queried"/>
<parameter type="gint" name="position" comment="The position the target element is located"/>
- <returns type="GObject *" annotation="transfer none, allow-none" comment="The element located at the @position in the @array"/>
+ <returns type="GObject *" annotation="transfer none, nullable" comment="The element located at the @position in the @array"/>
<comment xml:space="preserve">Gets the element located in the @position in the @array. NULL if position if out of bound.</comment>
</method>
<method name="i_cal_array_sort" corresponds="CUSTOM" annotation="skip" kind="others" since="1.0">
diff --git a/src/libical-glib/api/i-cal-attach.xml b/src/libical-glib/api/i-cal-attach.xml
index 8d3582d8..970a02cb 100644
--- a/src/libical-glib/api/i-cal-attach.xml
+++ b/src/libical-glib/api/i-cal-attach.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Attach" native="icalattach" destroy_func="icalattach_unref" new_full_extra_code="if (owner) { icalattach_ref (native); owner = NULL; }">
<method name="i_cal_attach_new_from_url" corresponds="icalattach_new_from_url" kind="constructor" since="1.0">
@@ -21,8 +13,8 @@
</method>
<method name="i_cal_attach_new_from_data" corresponds="CUSTOM" kind="constructor" since="1.0">
<parameter type="const gchar *" name="data" comment="The data used to create the #ICalAttach"/>
- <parameter type="GFunc" name="free_fn" translator="(icalattach_free_fn_t)" annotation="scope call, allow-none" comment="The function used to free the data when the create #ICalAttach is destroyed"/>
- <parameter type="void *" name="free_fn_data" annotation="allow-none" comment="The userdata used for the free function @free_fn"/>
+ <parameter type="GFunc" name="free_fn" translator="(icalattach_free_fn_t)" annotation="scope call, nullable" comment="The function used to free the data when the create #ICalAttach is destroyed"/>
+ <parameter type="void *" name="free_fn_data" annotation="nullable" comment="The userdata used for the free function @free_fn"/>
<returns type="ICalAttach *" annotation="transfer full" comment="The newly created #ICalAttach" />
<comment xml:space="preserve">Creates a new #ICalAttach from the data.</comment>
<custom> g_return_val_if_fail (data != NULL, NULL);
@@ -62,7 +54,7 @@ static void unref_g_bytes(char *data, void *user_data)
</method>
<method name="i_cal_attach_get_url" corresponds="icalattach_get_url" kind="others" since="1.0">
<parameter type="ICalAttach *" name="attach" comment="The #ICalAttach to be queried"/>
- <returns type="const gchar *" annotation="allow-none, transfer none" comment="The url component of the @attach. %NULL if it is built from data or there is an error." />
+ <returns type="const gchar *" annotation="nullable, transfer none" comment="The url component of the @attach. %NULL if it is built from data or there is an error." />
<comment xml:space="preserve">Gets the url, if the #ICalAttach is built from the url.</comment>
</method>
<method name="i_cal_attach_get_data" corresponds="CUSTOM" kind="others" since="1.0">
diff --git a/src/libical-glib/api/i-cal-comp-iter.xml b/src/libical-glib/api/i-cal-comp-iter.xml
index 549db8aa..9f690b66 100644
--- a/src/libical-glib/api/i-cal-comp-iter.xml
+++ b/src/libical-glib/api/i-cal-comp-iter.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="CompIter" native="struct icalcompiter" is_bare="true" default_native="i_cal_comp_iter_new_default ()">
<method name="i_cal_comp_iter_new_default" corresponds="CUSTOM" kind="private" since="1.0" annotation="skip">
diff --git a/src/libical-glib/api/i-cal-component.xml b/src/libical-glib/api/i-cal-component.xml
index 29d13e53..f466978a 100644
--- a/src/libical-glib/api/i-cal-component.xml
+++ b/src/libical-glib/api/i-cal-component.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Component" native="icalcomponent" destroy_func="icalcomponent_free" includes="libical-glib/i-cal-parameter.h">
<method name="i_cal_component_new" corresponds="icalcomponent_new" kind="constructor" since="1.0">
@@ -182,32 +174,89 @@
<returns type="ICalComponent *" annotation="transfer full, nullable" translator_argus="(GObject *)component" comment="The next #ICalComponent."/>
<comment xml:space="preserve">Gets the next #ICalComponent with specific kind in #ICalComponent.</comment>
</method>
- <method name="i_cal_component_begin_component" corresponds="icalcomponent_begin_component" since="1.0">
+ <method name="i_cal_component_begin_component" corresponds="CUSTOM" since="1.0">
<parameter type="ICalComponent *" name="component" comment="A #ICalComponent"/>
<parameter type="ICalComponentKind" name="kind" comment="A #ICalComponentKind"/>
<returns type="ICalCompIter *" annotation="transfer full" comment="A #ICalCompIter"/>
- <comment xml:space="preserve">Gets the #ICalCompIter pointing to the first child #ICalComponent. Use #ICalCompIter when you need remove the child component from the parent. For traversing, i_cal_object_set_owner needs to be called after this API. See component.py in tests for details.</comment>
+ <comment xml:space="preserve">Gets the #ICalCompIter pointing to the first child #ICalComponent.</comment>
+ <custom> ICalCompIter *iter;
+
+ g_return_val_if_fail (I_CAL_IS_COMPONENT (component), NULL);
+
+ iter = i_cal_comp_iter_new_full(icalcomponent_begin_component((icalcomponent *)i_cal_object_get_native(I_CAL_OBJECT (component)), (icalcomponent_kind) (kind)));
+ if (iter) {
+ i_cal_object_set_owner(I_CAL_OBJECT(iter), G_OBJECT(component));
+ i_cal_object_set_always_destroy(I_CAL_OBJECT(iter), TRUE);
+ }
+
+ return iter;</custom>
</method>
- <method name="i_cal_component_end_component" corresponds="icalcomponent_end_component" since="1.0">
+ <method name="i_cal_component_end_component" corresponds="CUSTOM" since="1.0">
<parameter type="ICalComponent *" name="component" comment="A #ICalComponent"/>
<parameter type="ICalComponentKind" name="kind" comment="A #ICalComponentKind"/>
<returns type="ICalCompIter *" annotation="transfer full" comment="A #ICalCompIter"/>
- <comment xml:space="preserve">Gets the #ICalCompIter pointing to the end child #ICalComponent. Use #ICalCompIter when you need remove the child component from the parent. For traversing, i_cal_object_set_owner needs to be called after this API. See component.py in tests for details.</comment>
+ <comment xml:space="preserve">Gets the #ICalCompIter pointing to the end child #ICalComponent.</comment>
+ <custom> ICalCompIter *iter;
+ g_return_val_if_fail (I_CAL_IS_COMPONENT (component), NULL);
+
+ iter = i_cal_comp_iter_new_full(icalcomponent_end_component((icalcomponent *)i_cal_object_get_native(I_CAL_OBJECT (component)), (icalcomponent_kind) (kind)));
+ if (iter) {
+ i_cal_object_set_owner(I_CAL_OBJECT(iter), G_OBJECT(component));
+ i_cal_object_set_always_destroy(I_CAL_OBJECT(iter), TRUE);
+ }
+
+ return iter;</custom>
</method>
- <method name="i_cal_comp_iter_next" corresponds="icalcompiter_next" since="1.0">
+ <method name="i_cal_comp_iter_next" corresponds="CUSTOM" since="1.0">
<parameter type="ICalCompIter *" name="i" native_op="POINTER" comment="A #ICalCompIter"/>
<returns type="ICalComponent *" annotation="transfer full" comment="A #ICalCompIter"/>
- <comment xml:space="preserve">Gets the next #ICalComponent pointed by #ICalCompIter. Use #ICalCompIter when you need remove the child component from the parent. For traversing, i_cal_object_set_owner needs to be called after this API. See component.py in tests for details.</comment>
+ <comment xml:space="preserve">Gets the next #ICalComponent pointed by #ICalCompIter.</comment>
+ <custom> ICalComponent *comp;
+
+ g_return_val_if_fail (I_CAL_IS_COMP_ITER (i), NULL);
+
+ comp = i_cal_component_new_full(icalcompiter_next((struct icalcompiter *)i_cal_object_get_native(I_CAL_OBJECT (i))), NULL);
+ if (comp) {
+ GObject *owner = i_cal_object_ref_owner(I_CAL_OBJECT(i));
+ i_cal_object_set_owner(I_CAL_OBJECT(comp), owner);
+ g_clear_object(&amp;owner);
+ }
+
+ return comp;</custom>
</method>
- <method name="i_cal_comp_iter_prior" corresponds="icalcompiter_prior" since="1.0">
+ <method name="i_cal_comp_iter_prior" corresponds="CUSTOM" since="1.0">
<parameter type="ICalCompIter *" name="i" native_op="POINTER" comment="A #ICalCompIter"/>
<returns type="ICalComponent *" annotation="transfer full" comment="A #ICalCompIter"/>
- <comment xml:space="preserve">Gets the prior #ICalComponent pointed by #ICalCompIter. Use #ICalCompIter when you need remove the child component from the parent. For traversing, i_cal_object_set_owner needs to be called after this API. See component.py in tests for details.</comment>
+ <comment xml:space="preserve">Gets the prior #ICalComponent pointed by #ICalCompIter.</comment>
+ <custom> ICalComponent *comp;
+
+ g_return_val_if_fail (I_CAL_IS_COMP_ITER (i), NULL);
+
+ comp = i_cal_component_new_full(icalcompiter_prior((struct icalcompiter *)i_cal_object_get_native(I_CAL_OBJECT (i))), NULL);
+ if (comp) {
+ GObject *owner = i_cal_object_ref_owner(I_CAL_OBJECT(i));
+ i_cal_object_set_owner(I_CAL_OBJECT(comp), owner);
+ g_clear_object(&amp;owner);
+ }
+
+ return comp;</custom>
</method>
- <method name="i_cal_comp_iter_deref" corresponds="icalcompiter_deref" since="1.0">
+ <method name="i_cal_comp_iter_deref" corresponds="CUSTOM" since="1.0">
<parameter type="ICalCompIter *" name="i" native_op="POINTER" comment="A #ICalCompIter"/>
<returns type="ICalComponent *" annotation="transfer full" comment="A #ICalComponent"/>
- <comment xml:space="preserve">Gets the current #ICalComponent pointed by #ICalCompIter. Use #ICalCompIter when you need remove the child component from the parent. For traversing, i_cal_object_set_owner needs to be called after this API. See component.py in tests for details.</comment>
+ <comment xml:space="preserve">Gets the current #ICalComponent pointed by #ICalCompIter.</comment>
+ <custom> ICalComponent *comp;
+
+ g_return_val_if_fail (I_CAL_IS_COMP_ITER (i), NULL);
+
+ comp = i_cal_component_new_full(icalcompiter_deref((struct icalcompiter *)i_cal_object_get_native(I_CAL_OBJECT (i))), NULL);
+ if (comp) {
+ GObject *owner = i_cal_object_ref_owner(I_CAL_OBJECT(i));
+ i_cal_object_set_owner(I_CAL_OBJECT(comp), owner);
+ g_clear_object(&amp;owner);
+ }
+
+ return comp;</custom>
</method>
<method name="i_cal_component_check_restrictions" corresponds="icalcomponent_check_restrictions" kind="other" since="1.0">
<parameter type="ICalComponent *" name="comp" comment="The #ICalComponent to be checked"/>
@@ -493,7 +542,7 @@ static void foreach_recurrence_cb(icalcomponent *in_comp, struct icaltime_span *
<method name="i_cal_component_get_timezone" corresponds="icalcomponent_get_timezone" kind="get" since="1.0">
<parameter type="ICalComponent *" name="comp" comment="A #ICalComponent"/>
<parameter type="const gchar *" name="tzid" comment="A string representing timezone"/>
- <returns type="ICalTimezone *" annotation="transfer full, allow-none" translator_argus="(GObject *)comp, FALSE" comment="A #ICalTimezone."/>
+ <returns type="ICalTimezone *" annotation="transfer full, nullable" translator_argus="(GObject *)comp, FALSE" comment="A #ICalTimezone."/>
<comment xml:space="preserve">Returns the icaltimezone in the component corresponding to the TZID, or NULL if it can't be found.</comment>
</method>
<method name="i_cal_property_recurrence_is_excluded" corresponds="icalproperty_recurrence_is_excluded" since="1.0">
diff --git a/src/libical-glib/api/i-cal-datetimeperiod.xml b/src/libical-glib/api/i-cal-datetimeperiod.xml
index bfeadab1..4a393740 100644
--- a/src/libical-glib/api/i-cal-datetimeperiod.xml
+++ b/src/libical-glib/api/i-cal-datetimeperiod.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Datetimeperiod" native="struct icaldatetimeperiodtype" is_bare="true" default_native="i_cal_datetimeperiod_new_default ()" includes="libical-glib/i-cal-time.h, libical-glib/i-cal-period.h">
<method name="i_cal_datetimeperiod_new_default" corresponds="CUSTOM" annotation="skip" kind="private" since="1.0">
diff --git a/src/libical-glib/api/i-cal-derived-parameter.xml b/src/libical-glib/api/i-cal-derived-parameter.xml
index 1a309e4a..4b85800d 100644
--- a/src/libical-glib/api/i-cal-derived-parameter.xml
+++ b/src/libical-glib/api/i-cal-derived-parameter.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="DerivedParameter">
<enum name="ICalParameterKind" native_name="icalparameter_kind" default_native="I_CAL_NO_PARAMETER">
@@ -24,13 +16,17 @@
<element name="ICAL_DELEGATEDFROM_PARAMETER"/>
<element name="ICAL_DELEGATEDTO_PARAMETER"/>
<element name="ICAL_DIR_PARAMETER"/>
+ <element name="ICAL_DISPLAY_PARAMETER"/>
+ <element name="ICAL_EMAIL_PARAMETER"/>
<element name="ICAL_ENABLE_PARAMETER"/>
<element name="ICAL_ENCODING_PARAMETER"/>
<element name="ICAL_FBTYPE_PARAMETER"/>
+ <element name="ICAL_FEATURE_PARAMETER"/>
<element name="ICAL_FILENAME_PARAMETER"/>
<element name="ICAL_FMTTYPE_PARAMETER"/>
<element name="ICAL_IANA_PARAMETER"/>
<element name="ICAL_ID_PARAMETER"/>
+ <element name="ICAL_LABEL_PARAMETER"/>
<element name="ICAL_LANGUAGE_PARAMETER"/>
<element name="ICAL_LATENCY_PARAMETER"/>
<element name="ICAL_LOCAL_PARAMETER"/>
@@ -40,6 +36,7 @@
<element name="ICAL_MODIFIED_PARAMETER"/>
<element name="ICAL_OPTIONS_PARAMETER"/>
<element name="ICAL_PARTSTAT_PARAMETER"/>
+ <element name="ICAL_PATCHACTION_PARAMETER"/>
<element name="ICAL_PUBLICCOMMENT_PARAMETER"/>
<element name="ICAL_RANGE_PARAMETER"/>
<element name="ICAL_REASON_PARAMETER"/>
@@ -78,6 +75,14 @@
<element name="ICAL_CUTYPE_UNKNOWN"/>
<element name="ICAL_CUTYPE_NONE"/>
</enum>
+ <enum name="ICalParameterDisplay" native_name="icalparameter_display" default_native="I_CAL_DISPLAY_NONE">
+ <element name="ICAL_DISPLAY_X"/>
+ <element name="ICAL_DISPLAY_BADGE"/>
+ <element name="ICAL_DISPLAY_GRAPHIC"/>
+ <element name="ICAL_DISPLAY_FULLSIZE"/>
+ <element name="ICAL_DISPLAY_THUMBNAIL"/>
+ <element name="ICAL_DISPLAY_NONE"/>
+ </enum>
<enum name="ICalParameterEnable" native_name="icalparameter_enable" default_native="I_CAL_ENABLE_NONE">
<element name="ICAL_ENABLE_X"/>
<element name="ICAL_ENABLE_TRUE"/>
@@ -98,6 +103,17 @@
<element name="ICAL_FBTYPE_BUSYTENTATIVE"/>
<element name="ICAL_FBTYPE_NONE"/>
</enum>
+ <enum name="ICalParameterFeature" native_name="icalparameter_feature" default_native="I_CAL_FEATURE_NONE">
+ <element name="ICAL_FEATURE_X"/>
+ <element name="ICAL_FEATURE_AUDIO"/>
+ <element name="ICAL_FEATURE_CHAT"/>
+ <element name="ICAL_FEATURE_FEED"/>
+ <element name="ICAL_FEATURE_MODERATOR"/>
+ <element name="ICAL_FEATURE_PHONE"/>
+ <element name="ICAL_FEATURE_SCREEN"/>
+ <element name="ICAL_FEATURE_VIDEO"/>
+ <element name="ICAL_FEATURE_NONE"/>
+ </enum>
<enum name="ICalParameterLocal" native_name="icalparameter_local" default_native="I_CAL_LOCAL_NONE">
<element name="ICAL_LOCAL_X"/>
<element name="ICAL_LOCAL_TRUE"/>
@@ -116,6 +132,14 @@
<element name="ICAL_PARTSTAT_FAILED"/>
<element name="ICAL_PARTSTAT_NONE"/>
</enum>
+ <enum name="ICalParameterPatchaction" native_name="icalparameter_patchaction" default_native="I_CAL_PATCHACTION_NONE">
+ <element name="ICAL_PATCHACTION_X"/>
+ <element name="ICAL_PATCHACTION_CREATE"/>
+ <element name="ICAL_PATCHACTION_BYNAME"/>
+ <element name="ICAL_PATCHACTION_BYVALUE"/>
+ <element name="ICAL_PATCHACTION_BYPARAM"/>
+ <element name="ICAL_PATCHACTION_NONE"/>
+ </enum>
<enum name="ICalParameterRange" native_name="icalparameter_range" default_native="I_CAL_RANGE_NONE">
<element name="ICAL_RANGE_X"/>
<element name="ICAL_RANGE_THISANDPRIOR"/>
@@ -247,7 +271,7 @@
</method>
<method name="i_cal_parameter_get_altrep" corresponds="icalparameter_get_altrep" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_altrep" corresponds="icalparameter_set_altrep" kind="set" since="1.0">
@@ -262,7 +286,7 @@
</method>
<method name="i_cal_parameter_get_charset" corresponds="icalparameter_get_charset" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_charset" corresponds="icalparameter_set_charset" kind="set" since="1.0">
@@ -277,7 +301,7 @@
</method>
<method name="i_cal_parameter_get_cn" corresponds="icalparameter_get_cn" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_cn" corresponds="icalparameter_set_cn" kind="set" since="1.0">
@@ -292,7 +316,7 @@
</method>
<method name="i_cal_parameter_get_cutype" corresponds="icalparameter_get_cutype" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="ICalParameterCutype" annotation="allow-none" comment="The property of the @value" />
+ <returns type="ICalParameterCutype" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_cutype" corresponds="icalparameter_set_cutype" kind="set" since="1.0">
@@ -307,7 +331,7 @@
</method>
<method name="i_cal_parameter_get_delegatedfrom" corresponds="icalparameter_get_delegatedfrom" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_delegatedfrom" corresponds="icalparameter_set_delegatedfrom" kind="set" since="1.0">
@@ -322,7 +346,7 @@
</method>
<method name="i_cal_parameter_get_delegatedto" corresponds="icalparameter_get_delegatedto" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_delegatedto" corresponds="icalparameter_set_delegatedto" kind="set" since="1.0">
@@ -337,7 +361,7 @@
</method>
<method name="i_cal_parameter_get_dir" corresponds="icalparameter_get_dir" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_dir" corresponds="icalparameter_set_dir" kind="set" since="1.0">
@@ -345,6 +369,36 @@
<parameter type="const gchar *" name="v" comment="The string used to set into the @value"/>
<comment xml:space="preserve"></comment>
</method>
+ <method name="i_cal_parameter_new_display" corresponds="icalparameter_new_display" kind="constructor" since="3.0.15">
+ <parameter type="ICalParameterDisplay" name="value" comment="The #ICalParameterDisplay value of the new #ICalParameter"/>
+ <returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter" />
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_get_display" corresponds="icalparameter_get_display" kind="get" since="3.0.15">
+ <parameter type="const ICalParameter *" name="param" comment="The #ICalParameter to be queried"/>
+ <returns type="ICalParameterDisplay" comment="The #ICalParameterDisplay value of the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_set_display" corresponds="icalparameter_set_display" kind="set" since="3.0.15">
+ <parameter type="ICalParameter *" name="param" comment="The #ICalParameter to be set"/>
+ <parameter type="ICalParameterDisplay" name="value" comment="The #ICalParameterDisplay to set into the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_new_email" corresponds="icalparameter_new_email" kind="constructor" since="3.0.15">
+ <parameter type="const gchar *" name="value" comment="The string value of the new #ICalParameter"/>
+ <returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter" />
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_get_email" corresponds="icalparameter_get_email" kind="get" since="3.0.15">
+ <parameter type="const ICalParameter *" name="param" comment="The #ICalParameter to be queried"/>
+ <returns type="const gchar *" annotation="nullable" comment="The string value of the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_set_email" corresponds="icalparameter_set_email" kind="set" since="3.0.15">
+ <parameter type="ICalParameter *" name="param" comment="The #ICalParameter to be set"/>
+ <parameter type="const gchar *" name="value" comment="The string value to set into the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
<method name="i_cal_parameter_new_enable" corresponds="icalparameter_new_enable" kind="constructor" since="1.0">
<parameter type="ICalParameterEnable" name="v" comment="The type of #ICalParameter to be created"/>
<returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter." />
@@ -390,6 +444,21 @@
<parameter type="ICalParameterFbtype" name="v" comment="The type of #ICalParameter to be set in the @value"/>
<comment xml:space="preserve"></comment>
</method>
+ <method name="i_cal_parameter_new_feature" corresponds="icalparameter_new_feature" kind="constructor" since="3.0.15">
+ <parameter type="ICalParameterFeature" name="value" comment="The #ICalParameterFeature value of the new #ICalParameter"/>
+ <returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter" />
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_get_feature" corresponds="icalparameter_get_feature" kind="get" since="3.0.15">
+ <parameter type="const ICalParameter *" name="param" comment="The #ICalParameter to be queried"/>
+ <returns type="ICalParameterFeature" comment="The #ICalParameterFeature value of the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_set_feature" corresponds="icalparameter_set_feature" kind="set" since="3.0.15">
+ <parameter type="ICalParameter *" name="param" comment="The #ICalParameter to be set"/>
+ <parameter type="ICalParameterFeature" name="value" comment="The #ICalParameterFeature to set into the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
<method name="i_cal_parameter_new_filename" corresponds="icalparameter_new_filename" kind="constructor" since="2.0">
<parameter type="const gchar *" name="v" comment="The string used to create the new #ICalParameter"/>
<returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter." />
@@ -397,7 +466,7 @@
</method>
<method name="i_cal_parameter_get_filename" corresponds="icalparameter_get_filename" kind="get" since="2.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_filename" corresponds="icalparameter_set_filename" kind="set" since="2.0">
@@ -412,7 +481,7 @@
</method>
<method name="i_cal_parameter_get_fmttype" corresponds="icalparameter_get_fmttype" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_fmttype" corresponds="icalparameter_set_fmttype" kind="set" since="1.0">
@@ -427,7 +496,7 @@
</method>
<method name="i_cal_parameter_get_iana" corresponds="icalparameter_get_iana" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_iana" corresponds="icalparameter_set_iana" kind="set" since="1.0">
@@ -442,7 +511,7 @@
</method>
<method name="i_cal_parameter_get_id" corresponds="icalparameter_get_id" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_id" corresponds="icalparameter_set_id" kind="set" since="1.0">
@@ -450,6 +519,21 @@
<parameter type="const gchar *" name="v" comment="The string used to set into the @value"/>
<comment xml:space="preserve"></comment>
</method>
+ <method name="i_cal_parameter_new_label" corresponds="icalparameter_new_label" kind="constructor" since="3.0.15">
+ <parameter type="const gchar *" name="value" comment="The string value of the new #ICalParameter"/>
+ <returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter" />
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_get_label" corresponds="icalparameter_get_label" kind="get" since="3.0.15">
+ <parameter type="const ICalParameter *" name="param" comment="The #ICalParameter to be queried"/>
+ <returns type="const gchar *" annotation="nullable" comment="The string value of the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_set_label" corresponds="icalparameter_set_label" kind="set" since="3.0.15">
+ <parameter type="ICalParameter *" name="param" comment="The #ICalParameter to be set"/>
+ <parameter type="const gchar *" name="value" comment="The string value to set into the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
<method name="i_cal_parameter_new_language" corresponds="icalparameter_new_language" kind="constructor" since="1.0">
<parameter type="const gchar *" name="v" comment="The string used to create the new #ICalParameter"/>
<returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter." />
@@ -457,7 +541,7 @@
</method>
<method name="i_cal_parameter_get_language" corresponds="icalparameter_get_language" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_language" corresponds="icalparameter_set_language" kind="set" since="1.0">
@@ -472,7 +556,7 @@
</method>
<method name="i_cal_parameter_get_latency" corresponds="icalparameter_get_latency" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_latency" corresponds="icalparameter_set_latency" kind="set" since="1.0">
@@ -502,7 +586,7 @@
</method>
<method name="i_cal_parameter_get_localize" corresponds="icalparameter_get_localize" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_localize" corresponds="icalparameter_set_localize" kind="set" since="1.0">
@@ -517,7 +601,7 @@
</method>
<method name="i_cal_parameter_get_managedid" corresponds="icalparameter_get_managedid" kind="get" since="2.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_managedid" corresponds="icalparameter_set_managedid" kind="set" since="2.0">
@@ -532,7 +616,7 @@
</method>
<method name="i_cal_parameter_get_member" corresponds="icalparameter_get_member" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_member" corresponds="icalparameter_set_member" kind="set" since="1.0">
@@ -547,7 +631,7 @@
</method>
<method name="i_cal_parameter_get_modified" corresponds="icalparameter_get_modified" kind="get" since="2.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_modified" corresponds="icalparameter_set_modified" kind="set" since="2.0">
@@ -562,7 +646,7 @@
</method>
<method name="i_cal_parameter_get_options" corresponds="icalparameter_get_options" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_options" corresponds="icalparameter_set_options" kind="set" since="1.0">
@@ -585,6 +669,21 @@
<parameter type="ICalParameterPartstat" name="v" comment="The type of #ICalParameter to be set in the @value"/>
<comment xml:space="preserve"></comment>
</method>
+ <method name="i_cal_parameter_new_patchaction" corresponds="icalparameter_new_patchaction" kind="constructor" since="3.0.15">
+ <parameter type="ICalParameterPatchaction" name="value" comment="The #ICalParameterPatchaction value of the new #ICalParameter"/>
+ <returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter" />
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_get_patchaction" corresponds="icalparameter_get_patchaction" kind="get" since="3.0.15">
+ <parameter type="const ICalParameter *" name="param" comment="The #ICalParameter to be queried"/>
+ <returns type="ICalParameterPatchaction" comment="The #ICalParameterPatchaction value of the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_set_patchaction" corresponds="icalparameter_set_patchaction" kind="set" since="3.0.15">
+ <parameter type="ICalParameter *" name="param" comment="The #ICalParameter to be set"/>
+ <parameter type="ICalParameterPatchaction" name="value" comment="The #ICalParameterPatchaction to set into the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
<method name="i_cal_parameter_new_publiccomment" corresponds="icalparameter_new_publiccomment" kind="constructor" since="2.0">
<parameter type="const gchar *" name="v" comment="The string used to create the new #ICalParameter"/>
<returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter." />
@@ -592,7 +691,7 @@
</method>
<method name="i_cal_parameter_get_publiccomment" corresponds="icalparameter_get_publiccomment" kind="get" since="2.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_publiccomment" corresponds="icalparameter_set_publiccomment" kind="set" since="2.0">
@@ -622,7 +721,7 @@
</method>
<method name="i_cal_parameter_get_reason" corresponds="icalparameter_get_reason" kind="get" since="2.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_reason" corresponds="icalparameter_set_reason" kind="set" since="2.0">
@@ -757,7 +856,7 @@
</method>
<method name="i_cal_parameter_get_schedulestatus" corresponds="icalparameter_get_schedulestatus" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_schedulestatus" corresponds="icalparameter_set_schedulestatus" kind="set" since="1.0">
@@ -772,7 +871,7 @@
</method>
<method name="i_cal_parameter_get_sentby" corresponds="icalparameter_get_sentby" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_sentby" corresponds="icalparameter_set_sentby" kind="set" since="1.0">
@@ -787,7 +886,7 @@
</method>
<method name="i_cal_parameter_get_size" corresponds="icalparameter_get_size" kind="get" since="2.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_size" corresponds="icalparameter_set_size" kind="set" since="2.0">
@@ -832,7 +931,7 @@
</method>
<method name="i_cal_parameter_get_tzid" corresponds="icalparameter_get_tzid" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_tzid" corresponds="icalparameter_set_tzid" kind="set" since="1.0">
@@ -862,7 +961,7 @@
</method>
<method name="i_cal_parameter_get_x" corresponds="icalparameter_get_x" kind="get" since="1.0">
<parameter type="const ICalParameter *" name="value" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve"></comment>
</method>
<method name="i_cal_parameter_set_x" corresponds="icalparameter_set_x" kind="set" since="1.0">
diff --git a/src/libical-glib/api/i-cal-derived-property.xml b/src/libical-glib/api/i-cal-derived-property.xml
index 24e31ef5..3ca15403 100644
--- a/src/libical-glib/api/i-cal-derived-property.xml
+++ b/src/libical-glib/api/i-cal-derived-property.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="DerivedProperty">
<enum name="ICalPropertyKind" native_name="icalproperty_kind" default_native="I_CAL_NO_PROPERTY">
diff --git a/src/libical-glib/api/i-cal-derived-value.xml b/src/libical-glib/api/i-cal-derived-value.xml
index aa58a233..92d94b8a 100644
--- a/src/libical-glib/api/i-cal-derived-value.xml
+++ b/src/libical-glib/api/i-cal-derived-value.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="DerivedValue">
<enum name="ICalValueKind" native_name="icalvalue_kind" default_native="I_CAL_NO_VALUE">
@@ -210,7 +202,7 @@
</method>
<method name="i_cal_value_get_x" corresponds="icalvalue_get_x" kind="get" since="1.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="const gchar *" annotation="allow-none, transfer none" comment="The x within #ICalValue"/>
+ <returns type="const gchar *" annotation="nullable, transfer none" comment="The x within #ICalValue"/>
<comment>Gets the x of #ICalValue.</comment>
</method>
<method name="i_cal_value_set_recur" corresponds="icalvalue_set_recur" kind="set" since="1.0">
@@ -225,7 +217,7 @@
</method>
<method name="i_cal_value_get_recur" corresponds="icalvalue_get_recur" kind="get" since="1.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="ICalRecurrence *" annotation="allow-none, transfer full" comment="The recur within #ICalValue"/>
+ <returns type="ICalRecurrence *" annotation="nullable, transfer full" comment="The recur within #ICalValue"/>
<comment>Gets the recur of #ICalValue.</comment>
</method>
<method name="i_cal_value_set_trigger" corresponds="icalvalue_set_trigger" kind="set" since="1.0">
@@ -240,7 +232,7 @@
</method>
<method name="i_cal_value_get_trigger" corresponds="icalvalue_get_trigger" kind="get" since="1.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="ICalTrigger *" annotation="allow-none, transfer full" comment="The trigger within #ICalValue"/>
+ <returns type="ICalTrigger *" annotation="nullable, transfer full" comment="The trigger within #ICalValue"/>
<comment>Gets the trigger of #ICalValue.</comment>
</method>
<method name="i_cal_value_set_datetime" corresponds="icalvalue_set_datetime" kind="set" since="1.0">
@@ -255,7 +247,7 @@
</method>
<method name="i_cal_value_get_datetime" corresponds="icalvalue_get_datetime" kind="get" since="1.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="ICalTime *" annotation="allow-none, transfer full" comment="The datetime within #ICalValue"/>
+ <returns type="ICalTime *" annotation="nullable, transfer full" comment="The datetime within #ICalValue"/>
<comment>Gets the datetime of #ICalValue.</comment>
</method>
<method name="i_cal_value_set_datetimedate" corresponds="icalvalue_set_datetimedate" kind="set" since="3.0">
@@ -270,7 +262,7 @@
</method>
<method name="i_cal_value_get_datetimedate" corresponds="icalvalue_get_datetimedate" kind="get" since="3.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="ICalTime *" annotation="allow-none, transfer full" comment="The datetimedate within #ICalValue"/>
+ <returns type="ICalTime *" annotation="nullable, transfer full" comment="The datetimedate within #ICalValue"/>
<comment>Gets the datetimedate (DATE-TIME or DATE) of #ICalValue.</comment>
</method>
<method name="i_cal_value_set_datetimeperiod" corresponds="icalvalue_set_datetimeperiod" kind="set" since="1.0">
@@ -285,7 +277,7 @@
</method>
<method name="i_cal_value_get_datetimeperiod" corresponds="icalvalue_get_datetimeperiod" kind="get" since="1.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="ICalDatetimeperiod *" annotation="allow-none, transfer full" comment="The datetimeperiod within #ICalValue"/>
+ <returns type="ICalDatetimeperiod *" annotation="nullable, transfer full" comment="The datetimeperiod within #ICalValue"/>
<comment>Gets the datetimeperiod of #ICalValue.</comment>
</method>
<method name="i_cal_value_set_geo" corresponds="icalvalue_set_geo" kind="set" since="1.0">
@@ -300,7 +292,7 @@
</method>
<method name="i_cal_value_get_geo" corresponds="icalvalue_get_geo" kind="get" since="1.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="ICalGeo *" annotation="allow-none, transfer full" comment="The geo within #ICalValue"/>
+ <returns type="ICalGeo *" annotation="nullable, transfer full" comment="The geo within #ICalValue"/>
<comment>Gets the geo of #ICalValue.</comment>
</method>
<method name="i_cal_value_set_attach" corresponds="icalvalue_set_attach" kind="set" since="1.0">
@@ -315,7 +307,7 @@
</method>
<method name="i_cal_value_get_attach" corresponds="icalvalue_get_attach" kind="get" since="1.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="ICalAttach *" annotation="allow-none, transfer none" translator_argus="(GObject *)value" comment="The attach within #ICalValue"/>
+ <returns type="ICalAttach *" annotation="nullable, transfer none" translator_argus="(GObject *)value" comment="The attach within #ICalValue"/>
<comment>Gets the attach of #ICalValue.</comment>
</method>
<method name="i_cal_value_reset_kind" corresponds="icalvalue_reset_kind" kind="other" since="1.0">
@@ -454,7 +446,7 @@
</method>
<method name="i_cal_value_get_caladdress" corresponds="icalvalue_get_caladdress" kind="get" since="1.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="const gchar *" annotation="allow-none, transfer none" comment="The caladdress within #ICalValue"/>
+ <returns type="const gchar *" annotation="nullable, transfer none" comment="The caladdress within #ICalValue"/>
<comment>Gets the caladdress of #ICalValue.</comment>
</method>
<method name="i_cal_value_set_period" corresponds="icalvalue_set_period" kind="set" since="1.0">
@@ -469,7 +461,7 @@
</method>
<method name="i_cal_value_get_period" corresponds="icalvalue_get_period" kind="get" since="1.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="ICalPeriod *" annotation="allow-none, transfer full" comment="The period within #ICalValue"/>
+ <returns type="ICalPeriod *" annotation="nullable, transfer full" comment="The period within #ICalValue"/>
<comment>Gets the period of #ICalValue.</comment>
</method>
<method name="i_cal_value_set_status" corresponds="icalvalue_set_status" kind="set" since="1.0">
@@ -499,7 +491,7 @@
</method>
<method name="i_cal_value_get_binary" corresponds="icalvalue_get_binary" kind="get" since="1.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="const gchar *" annotation="allow-none, transfer none" comment="The binary within #ICalValue"/>
+ <returns type="const gchar *" annotation="nullable, transfer none" comment="The binary within #ICalValue"/>
<comment>Gets the binary of #ICalValue.</comment>
</method>
<method name="i_cal_value_set_text" corresponds="icalvalue_set_text" kind="set" since="1.0">
@@ -514,7 +506,7 @@
</method>
<method name="i_cal_value_get_text" corresponds="icalvalue_get_text" kind="get" since="1.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="const gchar *" annotation="allow-none, transfer none" comment="The text within #ICalValue"/>
+ <returns type="const gchar *" annotation="nullable, transfer none" comment="The text within #ICalValue"/>
<comment>Gets the text of #ICalValue.</comment>
</method>
<method name="i_cal_value_set_duration" corresponds="icalvalue_set_duration" kind="set" since="1.0">
@@ -529,7 +521,7 @@
</method>
<method name="i_cal_value_get_duration" corresponds="icalvalue_get_duration" kind="get" since="1.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="ICalDuration *" annotation="allow-none, transfer full" comment="The duration within #ICalValue"/>
+ <returns type="ICalDuration *" annotation="nullable, transfer full" comment="The duration within #ICalValue"/>
<comment>Gets the duration of #ICalValue.</comment>
</method>
<method name="i_cal_value_set_integer" corresponds="icalvalue_set_integer" kind="set" since="1.0">
@@ -559,7 +551,7 @@
</method>
<method name="i_cal_value_get_uri" corresponds="icalvalue_get_uri" kind="get" since="1.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="const gchar *" annotation="allow-none, transfer none" comment="The uri within #ICalValue"/>
+ <returns type="const gchar *" annotation="nullable, transfer none" comment="The uri within #ICalValue"/>
<comment>Gets the uri of #ICalValue.</comment>
</method>
<method name="i_cal_value_set_class" corresponds="icalvalue_set_class" kind="set" since="1.0">
@@ -604,7 +596,7 @@
</method>
<method name="i_cal_value_get_query" corresponds="icalvalue_get_query" kind="get" since="1.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="const gchar *" annotation="allow-none, transfer none" comment="The query within #ICalValue"/>
+ <returns type="const gchar *" annotation="nullable, transfer none" comment="The query within #ICalValue"/>
<comment>Gets the query of #ICalValue.</comment>
</method>
<method name="i_cal_value_set_string" corresponds="icalvalue_set_string" kind="set" since="1.0">
@@ -619,7 +611,7 @@
</method>
<method name="i_cal_value_get_string" corresponds="icalvalue_get_string" kind="get" since="1.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="const gchar *" annotation="allow-none, transfer none" comment="The string within #ICalValue"/>
+ <returns type="const gchar *" annotation="nullable, transfer none" comment="The string within #ICalValue"/>
<comment>Gets the string of #ICalValue.</comment>
</method>
<method name="i_cal_value_set_transp" corresponds="icalvalue_set_transp" kind="set" since="1.0">
@@ -649,7 +641,7 @@
</method>
<method name="i_cal_value_get_requeststatus" corresponds="icalvalue_get_requeststatus" kind="get" since="1.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="ICalReqstat *" annotation="allow-none, transfer full" comment="The requeststatus within #ICalValue"/>
+ <returns type="ICalReqstat *" annotation="nullable, transfer full" comment="The requeststatus within #ICalValue"/>
<comment>Gets the requeststatus of #ICalValue.</comment>
</method>
<method name="i_cal_value_set_date" corresponds="icalvalue_set_date" kind="set" since="1.0">
@@ -664,7 +656,7 @@
</method>
<method name="i_cal_value_get_date" corresponds="icalvalue_get_date" kind="get" since="1.0">
<parameter type="ICalValue *" name="value" comment="The #ICalValue to be queried"/>
- <returns type="ICalTime *" annotation="allow-none, transfer full" comment="The date within #ICalValue"/>
+ <returns type="ICalTime *" annotation="nullable, transfer full" comment="The date within #ICalValue"/>
<comment>Gets the date of #ICalValue.</comment>
</method>
<method name="i_cal_value_set_action" corresponds="icalvalue_set_action" kind="set" since="1.0">
diff --git a/src/libical-glib/api/i-cal-duration.xml b/src/libical-glib/api/i-cal-duration.xml
index ec80208d..053cbee5 100644
--- a/src/libical-glib/api/i-cal-duration.xml
+++ b/src/libical-glib/api/i-cal-duration.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Duration" native="struct icaldurationtype" is_bare="true" default_native="icaldurationtype_null_duration()">
<method name="i_cal_duration_is_neg" corresponds="CUSTOM" kind="get" since="1.0">
diff --git a/src/libical-glib/api/i-cal-enums.xml b/src/libical-glib/api/i-cal-enums.xml
index 61e12a79..ac8a747a 100644
--- a/src/libical-glib/api/i-cal-enums.xml
+++ b/src/libical-glib/api/i-cal-enums.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Enums">
<enum name="ICalComponentKind" native_name="icalcomponent_kind" default_native="I_CAL_NO_COMPONENT">
diff --git a/src/libical-glib/api/i-cal-error.xml b/src/libical-glib/api/i-cal-error.xml
index e2692f71..9589ddd5 100644
--- a/src/libical-glib/api/i-cal-error.xml
+++ b/src/libical-glib/api/i-cal-error.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Error">
<enum name="ICalErrorEnum" native_name="icalerrorenum" default_native="I_CAL_UNKNOWN_ERROR">
diff --git a/src/libical-glib/api/i-cal-geo.xml b/src/libical-glib/api/i-cal-geo.xml
index 4d531387..b7645184 100644
--- a/src/libical-glib/api/i-cal-geo.xml
+++ b/src/libical-glib/api/i-cal-geo.xml
@@ -1,25 +1,17 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Geo" native="struct icalgeotype" is_bare="true" default_native="i_cal_geo_new_default ()">
<method name="i_cal_geo_new_default" corresponds="CUSTOM" annotation="skip" kind="private" since="1.0">
<returns type="struct icalgeotype" annotation="transfer full" comment="The newly created #ICalGeo" />
<comment xml:space="preserve">Creates a new default #ICalGeo.</comment>
<custom> struct icalgeotype geotype;
- geotype.lat = 0;
- geotype.lon = 0;
+ memset(geotype.lat, 0, ICAL_GEO_LEN);
+ memset(geotype.lon, 0, ICAL_GEO_LEN);
return geotype;</custom>
</method>
<method name="i_cal_geo_new" corresponds="CUSTOM" kind="constructor" since="1.0">
@@ -28,10 +20,14 @@
<returns type="ICalGeo *" annotation="transfer full" comment="The newly created #ICalGeo." />
<comment xml:space="preserve">Creates a new #ICalGeo.</comment>
<custom> struct icalgeotype geo;
-
+ char dval[ICAL_GEO_LEN];
geo = i_cal_geo_new_default();
- geo.lat = lat;
- geo.lon = lon;
+ memset(dval, 0, ICAL_GEO_LEN);
+ snprintf(dval, ICAL_GEO_LEN, "%lf", lat);
+ strncpy(geo.lat, dval, ICAL_GEO_LEN-1);
+ memset(dval, 0, ICAL_GEO_LEN);
+ snprintf(dval, ICAL_GEO_LEN, "%lf", lon);
+ strncpy(geo.lon, dval, ICAL_GEO_LEN-1);
return i_cal_geo_new_full(geo);</custom>
</method>
@@ -53,27 +49,33 @@
<returns type="gdouble" comment="The latitude." />
<comment xml:space="preserve">Gets the latitude of #ICalGeo.</comment>
<custom> g_return_val_if_fail (geo != NULL, 0);
- return ((struct icalgeotype *)i_cal_object_get_native ((ICalObject *)geo))->lat;</custom>
+ return atof(((struct icalgeotype *)i_cal_object_get_native ((ICalObject *)geo))->lat);</custom>
</method>
<method name="i_cal_geo_set_lat" corresponds="CUSTOM" kind="set" since="1.0">
<parameter type="ICalGeo *" name="geo" comment="The #ICalGeo to be set"/>
<parameter type="gdouble" name="lat" comment="The latitude"/>
<comment>Sets the latitude of #ICalGeo.</comment>
- <custom> g_return_if_fail (geo != NULL &amp;&amp; I_CAL_IS_GEO (geo));
- ((struct icalgeotype *)i_cal_object_get_native ((ICalObject *)geo))->lat = lat;</custom>
+ <custom> char dval[ICAL_GEO_LEN];
+ g_return_if_fail (geo != NULL &amp;&amp; I_CAL_IS_GEO (geo));
+ memset(dval, 0, ICAL_GEO_LEN);
+ snprintf(dval, ICAL_GEO_LEN, "%lf", lat);
+ strncpy(((struct icalgeotype *)i_cal_object_get_native ((ICalObject *)geo))->lat, dval, ICAL_GEO_LEN-1);</custom>
</method>
<method name="i_cal_geo_get_lon" corresponds="CUSTOM" kind="get" since="1.0">
<parameter type="ICalGeo *" name="geo" comment="The #ICalGeo to be queried"/>
<returns type="gdouble" comment="The longitude." />
<comment xml:space="preserve">Gets the longitude of #ICalGeo.</comment>
<custom> g_return_val_if_fail (geo != NULL, 0);
- return ((struct icalgeotype *)i_cal_object_get_native ((ICalObject *)geo))->lon;</custom>
+ return atof(((struct icalgeotype *)i_cal_object_get_native ((ICalObject *)geo))->lon);</custom>
</method>
<method name="i_cal_geo_set_lon" corresponds="CUSTOM" kind="set" since="1.0">
<parameter type="ICalGeo *" name="geo" comment="The #ICalGeo to be set"/>
<parameter type="gdouble" name="lon" comment="The longitude"/>
<comment>Sets the longitude of #ICalGeo.</comment>
- <custom> g_return_if_fail (geo != NULL &amp;&amp; I_CAL_IS_GEO (geo));
- ((struct icalgeotype *)i_cal_object_get_native ((ICalObject *)geo))->lon = lon;</custom>
+ <custom> char dval[ICAL_GEO_LEN];
+ g_return_if_fail (geo != NULL &amp;&amp; I_CAL_IS_GEO (geo));
+ memset(dval, 0, ICAL_GEO_LEN);
+ snprintf(dval, ICAL_GEO_LEN, "%lf", lon);
+ strncpy(((struct icalgeotype *)i_cal_object_get_native ((ICalObject *)geo))->lon, dval, ICAL_GEO_LEN-1);</custom>
</method>
</structure>
diff --git a/src/libical-glib/api/i-cal-memory.xml b/src/libical-glib/api/i-cal-memory.xml
index 49980a60..ffb2cac0 100644
--- a/src/libical-glib/api/i-cal-memory.xml
+++ b/src/libical-glib/api/i-cal-memory.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Memory">
<method name="i_cal_memory_tmp_buffer" corresponds="icalmemory_tmp_buffer" since="1.0">
diff --git a/src/libical-glib/api/i-cal-mime.xml b/src/libical-glib/api/i-cal-mime.xml
index 2fa40f9f..f2b1ff3c 100644
--- a/src/libical-glib/api/i-cal-mime.xml
+++ b/src/libical-glib/api/i-cal-mime.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Mime">
<declaration position="header">/**
diff --git a/src/libical-glib/api/i-cal-parameter.xml b/src/libical-glib/api/i-cal-parameter.xml
index c8bddb91..a3a6f919 100644
--- a/src/libical-glib/api/i-cal-parameter.xml
+++ b/src/libical-glib/api/i-cal-parameter.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Parameter" native="icalparameter" destroy_func="icalparameter_free">
<method name="i_cal_parameter_new" corresponds="icalparameter_new" kind="constructor" since="1.0">
@@ -61,7 +53,7 @@
</method>
<method name="i_cal_parameter_get_xname" corresponds="icalparameter_get_xname" kind="get" since="1.0">
<parameter type="ICalParameter *" name="param" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve">Gets the xname property of the native part of the #ICalParameter.</comment>
</method>
<method name="i_cal_parameter_set_xvalue" corresponds="icalparameter_set_xvalue" kind="set" since="1.0">
@@ -71,7 +63,7 @@
</method>
<method name="i_cal_parameter_get_xvalue" corresponds="icalparameter_get_xvalue" kind="get" since="1.0">
<parameter type="ICalParameter *" name="param" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve">Gets the xvalue property of the native part of the #ICalParameter.</comment>
</method>
<method name="i_cal_parameter_set_iana_name" corresponds="icalparameter_set_iana_name" kind="set" since="1.0">
@@ -81,7 +73,7 @@
</method>
<method name="i_cal_parameter_get_iana_name" corresponds="icalparameter_get_iana_name" kind="get" since="1.0">
<parameter type="ICalParameter *" name="param" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve">Gets the iana_name property of the native part of the #ICalParameter.</comment>
</method>
<method name="i_cal_parameter_set_iana_value" corresponds="icalparameter_set_iana_value" kind="set" since="1.0">
@@ -91,7 +83,7 @@
</method>
<method name="i_cal_parameter_get_iana_value" corresponds="icalparameter_get_iana_value" kind="get" since="1.0">
<parameter type="ICalParameter *" name="param" comment="The #ICalParameter to be queried"/>
- <returns type="const gchar *" annotation="allow-none" comment="The property of the @value" />
+ <returns type="const gchar *" annotation="nullable" comment="The property of the @value" />
<comment xml:space="preserve">Gets the iana_value property of the native part of the #ICalParameter.</comment>
</method>
<method name="i_cal_parameter_has_same_name" corresponds="icalparameter_has_same_name" kind="others" since="1.0">
diff --git a/src/libical-glib/api/i-cal-parser.xml b/src/libical-glib/api/i-cal-parser.xml
index 7e901de2..7bca47fa 100644
--- a/src/libical-glib/api/i-cal-parser.xml
+++ b/src/libical-glib/api/i-cal-parser.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Parser" native="icalparser" destroy_func="icalparser_free">
<enum name="ICalParserState" native_name="icalparserstate" default_native="I_CAL_PARSER_ERROR">
@@ -36,13 +28,13 @@ typedef gchar *(*ICalParserLineGenFunc)(gchar *bytes, size_t size, gpointer user
</method>
<method name="i_cal_parser_add_line" corresponds="icalparser_add_line" since="1.0">
<parameter type="ICalParser *" name="parser" annotation="in, transfer full" comment="The #ICalParser used to parse the string into the #ICalComponent"/>
- <parameter type="gchar *" name="str" annotation="allow-none, transfer none" comment="A line of string representation of the #ICalComponent"/>
- <returns type="ICalComponent *" annotation="allow-none, transfer full" translator_argus="(gpointer) parser" comment="The complete #ICalComponent."/>
+ <parameter type="gchar *" name="str" annotation="nullable, transfer none" comment="A line of string representation of the #ICalComponent"/>
+ <returns type="ICalComponent *" annotation="nullable, transfer full" translator_argus="(gpointer) parser" comment="The complete #ICalComponent."/>
<comment xml:space="preserve">Add a line at one time into the #ICalParser until the parsing is complete and #ICalComponent will be returned.</comment>
</method>
<method name="i_cal_parser_clean" corresponds="icalparser_clean" since="1.0">
<parameter type="ICalParser *" name="parser" comment="The parser to be cleaned and queried"/>
- <returns type="ICalComponent *" annotation="allow-none, transfer full" translator_argus="(gpointer) parser" comment="The root #ICalComponent in @parser."/>
+ <returns type="ICalComponent *" annotation="nullable, transfer full" translator_argus="(gpointer) parser" comment="The root #ICalComponent in @parser."/>
<comment xml:space="preserve">We won't get a clean exit if some components did not have an "END" tag. Clear off any component that may be left in the list.</comment>
</method>
<method name="i_cal_parser_get_state" corresponds="icalparser_get_state" kind="get" since="1.0">
diff --git a/src/libical-glib/api/i-cal-period.xml b/src/libical-glib/api/i-cal-period.xml
index 1b02bbc6..8e3fc2ca 100644
--- a/src/libical-glib/api/i-cal-period.xml
+++ b/src/libical-glib/api/i-cal-period.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Period" native="struct icalperiodtype" is_bare="true" default_native="icalperiodtype_null_period ()">
<method name="i_cal_period_get_start" corresponds="CUSTOM" kind="get" since="1.0">
diff --git a/src/libical-glib/api/i-cal-property.xml b/src/libical-glib/api/i-cal-property.xml
index 4d4151a7..5e874b66 100644
--- a/src/libical-glib/api/i-cal-property.xml
+++ b/src/libical-glib/api/i-cal-property.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Property" native="icalproperty" destroy_func="icalproperty_free">
<method name="i_cal_property_new" corresponds="icalproperty_new" kind="constructor" since="1.0">
diff --git a/src/libical-glib/api/i-cal-recur-iterator.xml b/src/libical-glib/api/i-cal-recur-iterator.xml
index 032c4257..7e0ad916 100644
--- a/src/libical-glib/api/i-cal-recur-iterator.xml
+++ b/src/libical-glib/api/i-cal-recur-iterator.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="RecurIterator" native="icalrecur_iterator" destroy_func="icalrecur_iterator_free">
<method name="i_cal_recur_iterator_new" corresponds="icalrecur_iterator_new" kind="constructor" since="1.0">
diff --git a/src/libical-glib/api/i-cal-recur.xml b/src/libical-glib/api/i-cal-recur.xml
index 870ea61b..e1d689b4 100644
--- a/src/libical-glib/api/i-cal-recur.xml
+++ b/src/libical-glib/api/i-cal-recur.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Recur">
<method name="i_cal_recur_expand_recurrence" corresponds="CUSTOM" since="1.0">
diff --git a/src/libical-glib/api/i-cal-recurrence.xml b/src/libical-glib/api/i-cal-recurrence.xml
index 0ebb4545..ce019dd4 100644
--- a/src/libical-glib/api/i-cal-recurrence.xml
+++ b/src/libical-glib/api/i-cal-recurrence.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Recurrence" native="struct icalrecurrencetype" is_bare="true" default_native="i_cal_recurrence_new_default ()">
<enum name="ICalRecurrenceFrequency" native_name="icalrecurrencetype_frequency" default_native="I_CAL_NO_RECURRENCE">
diff --git a/src/libical-glib/api/i-cal-reqstat.xml b/src/libical-glib/api/i-cal-reqstat.xml
index 738c8a32..dbbdd061 100644
--- a/src/libical-glib/api/i-cal-reqstat.xml
+++ b/src/libical-glib/api/i-cal-reqstat.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Reqstat" native="struct icalreqstattype" is_bare="true" default_native="i_cal_reqstat_new_default ()">
<method name="i_cal_reqstat_new_from_string" corresponds="icalreqstattype_from_string" kind="constructor" since="1.0">
diff --git a/src/libical-glib/api/i-cal-restriction.xml b/src/libical-glib/api/i-cal-restriction.xml
index 5bc4fe40..77fb117f 100644
--- a/src/libical-glib/api/i-cal-restriction.xml
+++ b/src/libical-glib/api/i-cal-restriction.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Restriction">
<enum name="ICalRestrictionKind" native_name="icalrestriction_kind" default_native="I_CAL_RESTRICTION_UNKNOWN">
diff --git a/src/libical-glib/api/i-cal-time-span.xml b/src/libical-glib/api/i-cal-time-span.xml
index 4c2aae18..ca8cfe9e 100644
--- a/src/libical-glib/api/i-cal-time-span.xml
+++ b/src/libical-glib/api/i-cal-time-span.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="TimeSpan" native="struct icaltime_span" is_bare="true" default_native="icaltime_span_new(icaltime_null_time(), icaltime_null_time(), 0)" includes="libical-glib/i-cal-time.h">
<method name="i_cal_time_span_new_timet" corresponds="CUSTOM" kind="constructor" since="3.0.5">
diff --git a/src/libical-glib/api/i-cal-time.xml b/src/libical-glib/api/i-cal-time.xml
index be6e2685..678be801 100644
--- a/src/libical-glib/api/i-cal-time.xml
+++ b/src/libical-glib/api/i-cal-time.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Time" native="struct icaltimetype" is_bare="true" default_native="icaltime_null_time()">
<method name="i_cal_time_new" corresponds="CUSTOM" kind="constructor" since="1.0">
@@ -86,7 +78,7 @@
<method name="i_cal_time_get_timezone" corresponds="(void *)icaltime_get_timezone" kind="get" since="1.0">
<parameter type="const ICalTime *" name="tt" annotation="in, transfer none" comment="The #ICalTime to be queried"/>
<returns type="ICalTimezone *" annotation="transfer none" translator_argus="(GObject *)tt, TRUE" comment="The timezone information" />
- <comment xml:space="preserve">Returns the timezone.</comment>
+ <comment xml:space="preserve">Returns the timezone, the #ICalTimezone object is cached and can be either unreferenced once the last instance is used or can be kept until i_cal_object_free_global_objects() is called (usually at the very end of the program).</comment>
</method>
<method name="i_cal_time_set_timezone" corresponds="icaltime_set_timezone" kind="set" since="1.0">
<parameter type="ICalTime *" name="tt" native_op="POINTER" comment="The #ICalTime"/>
@@ -95,7 +87,7 @@
</method>
<method name="i_cal_time_get_tzid" corresponds="icaltime_get_tzid" kind="get" since="1.0">
<parameter type="const ICalTime *" name="tt" annotation="in, transfer none" comment="The #ICalTime to be queried"/>
- <returns type="const gchar *" annotation="allow-none, transfer none" comment="The tzid of #ICalTime, or NULL if floating type" />
+ <returns type="const gchar *" annotation="nullable, transfer none" comment="The tzid of #ICalTime, or NULL if floating type" />
<comment xml:space="preserve">Returns the tzid, or NULL for a floating time.</comment>
</method>
<method name="i_cal_time_day_of_year" corresponds="icaltime_day_of_year" since="1.0">
@@ -143,7 +135,7 @@
<parameter type="const ICalTime *" name="a" annotation="in, transfer none" comment="The #ICalTime to be compared"/>
<parameter type="const ICalTime *" name="b" annotation="in, transfer none" comment="The #ICalTime to be compared"/>
<returns type="gint" comment="-1, 0, or 1 to indicate that a less than b, a==b or a larger than b." />
- <comment xml:space="preserve">Returns -1, 0, or 1 to indicate that a less than b, a==b or a larger than b.</comment>
+ <comment xml:space="preserve">i_cal_time_compare returns an integer indicating the result of the comparison, as follow:</comment>
</method>
<method name="i_cal_time_compare_date_only" corresponds="icaltime_compare_date_only" since="1.0">
<parameter type="const ICalTime *" name="a" annotation="in, transfer none" comment="The #ICalTime to be compared"/>
diff --git a/src/libical-glib/api/i-cal-timezone.xml b/src/libical-glib/api/i-cal-timezone.xml
index dfa4140d..0de66874 100644
--- a/src/libical-glib/api/i-cal-timezone.xml
+++ b/src/libical-glib/api/i-cal-timezone.xml
@@ -1,21 +1,13 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Timezone" native="icaltimezone" is_possible_global="true" destroy_func="i_cal_timezone_destroy">
<method name="i_cal_timezone_new" corresponds="icaltimezone_new" kind="constructor" since="1.0">
- <returns type="ICalTimezone *" annotation="transfer full, allow-none" translator="i_cal_timezone_new_full" translator_argus="NULL, FALSE" comment="The newly created object of the type #ICalTimezone." />
+ <returns type="ICalTimezone *" annotation="transfer full, nullable" translator="i_cal_timezone_new_full" translator_argus="NULL, FALSE" comment="The newly created object of the type #ICalTimezone." />
<comment xml:space="preserve">The constructor of the type #ICalTimezone.</comment>
</method>
<method name="i_cal_timezone_destroy" corresponds="CUSTOM" annotation="skip" kind="private" since="1.0">
diff --git a/src/libical-glib/api/i-cal-trigger.xml b/src/libical-glib/api/i-cal-trigger.xml
index 6d3d1ffb..81cc19ec 100644
--- a/src/libical-glib/api/i-cal-trigger.xml
+++ b/src/libical-glib/api/i-cal-trigger.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Trigger" native="struct icaltriggertype" is_bare="true" default_native="icaltriggertype_from_int (0)">
<method name="i_cal_trigger_new_from_int" corresponds="icaltriggertype_from_int" kind="constructor" since="1.0">
diff --git a/src/libical-glib/api/i-cal-unknowntokenhandling.xml b/src/libical-glib/api/i-cal-unknowntokenhandling.xml
index 5c08c7ba..7d656224 100644
--- a/src/libical-glib/api/i-cal-unknowntokenhandling.xml
+++ b/src/libical-glib/api/i-cal-unknowntokenhandling.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Unknowntokenhandling">
<enum name="ICalUnknowntokenhandling" native_name="ical_unknown_token_handling" default_native="0">
diff --git a/src/libical-glib/api/i-cal-value.xml b/src/libical-glib/api/i-cal-value.xml
index adfaf2a9..c7cf2c6e 100644
--- a/src/libical-glib/api/i-cal-value.xml
+++ b/src/libical-glib/api/i-cal-value.xml
@@ -1,17 +1,9 @@
<!--
- Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
- This library is free software: you can redistribute it and/or modify it
- under the terms of version 2.1. of the GNU Lesser General Public License
- as published by the Free Software Foundation.
+ SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Value" native="icalvalue" destroy_func="icalvalue_free" includes="string.h">
<method name="i_cal_value_new" corresponds="icalvalue_new" kind="constructor" since="1.0">
@@ -78,7 +70,7 @@ be cloned."/>
</method>
<method name="i_cal_value_encode_ical_string" corresponds="CUSTOM" since="1.0">
<parameter type="const gchar *" name="szText" comment="A string"/>
- <returns type="gchar *" annotation="allow-none, transfer full" comment="The encoded string. NULL if fail."/>
+ <returns type="gchar *" annotation="nullable, transfer full" comment="The encoded string. NULL if fail."/>
<comment xml:space="preserve">Encodes a character string in ical format, escape certain characters, etc.</comment>
<custom> gchar *szEncText;
gchar *buffer = NULL;
@@ -99,7 +91,7 @@ be cloned."/>
</method>
<method name="i_cal_value_decode_ical_string" corresponds="CUSTOM" since="1.0">
<parameter type="const gchar *" name="szText" comment="A string"/>
- <returns type="gchar *" annotation="allow-none, transfer full" comment="The decoded string. NULL if fail."/>
+ <returns type="gchar *" annotation="nullable, transfer full" comment="The decoded string. NULL if fail."/>
<comment xml:space="preserve">Extracts the original character string encoded by the above function.</comment>
<custom> gchar *szDecText;
gchar *buffer = NULL;
diff --git a/src/libical-glib/i-cal-object.c.in b/src/libical-glib/i-cal-object.c.in
index 4b2fa34e..95ab14b4 100644
--- a/src/libical-glib/i-cal-object.c.in
+++ b/src/libical-glib/i-cal-object.c.in
@@ -1,17 +1,7 @@
/*
- * Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ * SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
*
- * This library is free software: you can redistribute it and/or modify it
- * under the terms of version 2.1. of the GNU Lesser General Public License
- * as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <https://www.gnu.org/licenses/>.
+ * SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
*/
#ifdef HAVE_CONFIG_H
@@ -107,6 +97,7 @@ typedef struct
gpointer native;
GDestroyNotify native_destroy_func;
gboolean is_global_memory;
+ gboolean always_destroy;
GObject *owner;
GSList *dependers; /* referenced GObject-s */
} ICalObjectPrivate;
@@ -122,6 +113,7 @@ enum
PROP_NATIVE,
PROP_NATIVE_DESTROY_FUNC,
PROP_IS_GLOBAL_MEMORY,
+ PROP_ALWAYS_DESTROY,
PROP_OWNER
};
@@ -149,6 +141,10 @@ static void i_cal_object_set_property(GObject *object, guint property_id,
priv->is_global_memory = g_value_get_boolean(value);
return;
+ case PROP_ALWAYS_DESTROY:
+ i_cal_object_set_always_destroy(iobject, g_value_get_boolean(value));
+ return;
+
case PROP_OWNER:
i_cal_object_set_owner(iobject, g_value_get_object(value));
return;
@@ -177,6 +173,10 @@ static void i_cal_object_get_property(GObject *object, guint property_id,
g_value_set_boolean(value, i_cal_object_get_is_global_memory(iobject));
return;
+ case PROP_ALWAYS_DESTROY:
+ g_value_set_boolean(value, i_cal_object_get_always_destroy(iobject));
+ return;
+
case PROP_OWNER:
g_value_take_object(value, i_cal_object_ref_owner(iobject));
return;
@@ -190,7 +190,8 @@ static void i_cal_object_finalize(GObject *object)
ICalObject *iobject = I_CAL_OBJECT(object);
ICalObjectPrivate *priv = i_cal_object_get_instance_private(iobject);
- if (!priv->owner && !priv->is_global_memory &&
+ if ((priv->always_destroy || !priv->owner) &&
+ !priv->is_global_memory &&
priv->native && priv->native_destroy_func) {
g_clear_pointer(&priv->native, priv->native_destroy_func);
}
@@ -264,6 +265,25 @@ static void i_cal_object_class_init(ICalObjectClass * class)
G_PARAM_STATIC_STRINGS));
/**
+ * ICalObject:always-destroy:
+ *
+ * Whether free the native libical structure on #ICalObject's finalize even
+ * if the object has set an owner.
+ *
+ * Since: 3.0.11
+ **/
+ g_object_class_install_property(
+ object_class,
+ PROP_ALWAYS_DESTROY,
+ g_param_spec_boolean(
+ "always-destroy",
+ "Always-Destroy",
+ "Whether the native libical structure is freed even when the owner is set",
+ FALSE,
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
+ /**
* ICalObject:owner:
*
* Owner of the native libical structure. If set, then it is
@@ -294,7 +314,7 @@ static void i_cal_object_init(ICalObject *iobject)
* @native: a native libical structure
* @native_destroy_func: a function to be called on @native when it should be freed
* @is_global_memory: whether @native is a global shared memory structure
- * @owner: (allow-none): an owner of @native
+ * @owner: (nullable): an owner of @native
*
* Creates an #ICalObject descendant of type @type and initialize private members
* of it. The descendants should call this function in their _new() function, or use
@@ -556,8 +576,8 @@ void i_cal_object_set_owner(ICalObject *iobject, GObject *owner)
* if not NULL, is referenced for thread safety. Unref it with g_object_unref
* when done with it.
*
- * Returns: (transfer full) (allow-none): Current owner of the libical
- * native structure. returns NULL, when there is no owner.
+ * Returns: (transfer full) (nullable): Current owner of the libical
+ * native structure. Returns %NULL when there is no owner.
*
* Since: 1.0
**/
@@ -663,3 +683,58 @@ void i_cal_object_remove_depender(ICalObject *iobject, GObject *depender)
UNLOCK_PROPS(priv);
}
+
+/**
+ * i_cal_object_set_always_destroy:
+ * @iobject: an #ICalObject
+ * @value: value to set
+ *
+ * Sets the @ICalObject::always-destroy property value. When %TRUE, the native
+ * libical structure is always freed, even when an owner of the @iobject is set.
+ *
+ * Since: 3.0.11
+ **/
+void i_cal_object_set_always_destroy(ICalObject *iobject, gboolean value)
+{
+ ICalObjectPrivate *priv = i_cal_object_get_instance_private(iobject);
+ gboolean changed;
+
+ g_return_if_fail(I_CAL_IS_OBJECT(iobject));
+
+ LOCK_PROPS(priv);
+
+ changed = (value ? 1 : 0) != (priv->always_destroy ? 1 : 0);
+ if (changed)
+ priv->always_destroy = value;
+
+ UNLOCK_PROPS(priv);
+
+ if (changed)
+ g_object_notify(G_OBJECT(iobject), "always-destroy");
+}
+
+/**
+ * i_cal_object_get_always_destroy:
+ * @iobject: an #ICalObject
+ *
+ * Obtain the @ICalObject::always-destroy property value.
+ *
+ * Returns: Whether the native libical structure is freed even when an owner is set.
+ *
+ * Since: 3.0.11
+ **/
+gboolean i_cal_object_get_always_destroy(ICalObject *iobject)
+{
+ ICalObjectPrivate *priv = i_cal_object_get_instance_private(iobject);
+ gboolean value;
+
+ g_return_val_if_fail(I_CAL_IS_OBJECT(iobject), FALSE);
+
+ LOCK_PROPS(priv);
+
+ value = priv->always_destroy;
+
+ UNLOCK_PROPS(priv);
+
+ return value;
+}
diff --git a/src/libical-glib/i-cal-object.h.in b/src/libical-glib/i-cal-object.h.in
index 799e3112..9803b5c2 100644
--- a/src/libical-glib/i-cal-object.h.in
+++ b/src/libical-glib/i-cal-object.h.in
@@ -1,17 +1,7 @@
/*
- * Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ * SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
*
- * This library is free software: you can redistribute it and/or modify it
- * under the terms of version 2.1. of the GNU Lesser General Public License
- * as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <https://www.gnu.org/licenses/>.
+ * SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
*/
#if !defined (__LIBICAL_GLIB_H_INSIDE__) && !defined (LIBICAL_GLIB_COMPILATION)
@@ -77,6 +67,10 @@ LIBICAL_ICAL_EXPORT void i_cal_object_add_depender(ICalObject *iobject, GObject
LIBICAL_ICAL_EXPORT void i_cal_object_remove_depender(ICalObject *iobject, GObject *depender);
+LIBICAL_ICAL_EXPORT void i_cal_object_set_always_destroy(ICalObject *iobject, gboolean value);
+
+LIBICAL_ICAL_EXPORT gboolean i_cal_object_get_always_destroy(ICalObject *iobject);
+
LIBICAL_ICAL_EXPORT void i_cal_object_free_global_objects(void);
G_END_DECLS
diff --git a/src/libical-glib/libical-glib.pc.in b/src/libical-glib/libical-glib.pc.in
index e164cfb5..8938834f 100644
--- a/src/libical-glib/libical-glib.pc.in
+++ b/src/libical-glib/libical-glib.pc.in
@@ -1,3 +1,6 @@
+# SPDX-FileCopyrightText: Copyright Contributors to the libical project
+# SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
+
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
diff --git a/src/libical-glib/tools/generator.c b/src/libical-glib/tools/generator.c
index 609c9297..d1d3fc23 100644
--- a/src/libical-glib/tools/generator.c
+++ b/src/libical-glib/tools/generator.c
@@ -1,16 +1,7 @@
/*
- * Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ * SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
*
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of either:
- *
- * The LGPL as published by the Free Software Foundation, version
- * 2.1, available at: https://www.gnu.org/licenses/lgpl-2.1.html
- *
- * Or:
- *
- * The Mozilla Public License Version 2.0. You may obtain a copy of
- * the License at https://www.mozilla.org/MPL/
+ * SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
*/
#include "generator.h"
@@ -1575,13 +1566,39 @@ gchar *get_translator_for_return(Ret *ret)
return res;
}
+static gboolean parameter_is_out(Parameter *para)
+{
+ GList *link;
+ for (link = para->annotations; link; link = g_list_next(link)) {
+ if (g_strcmp0(link->data, "out") == 0 ||
+ g_strcmp0(link->data, "inout") == 0 ||
+ g_str_has_prefix(link->data, "out ")) {
+ break;
+ }
+ }
+
+ return link != NULL;
+}
+
static gboolean annotation_contains_nullable(GList *annotations) /* gchar * */
{
GList *link;
for (link = annotations; link; link = g_list_next(link)) {
- if (g_strcmp0(link->data, "allow-none") == 0 ||
- g_strcmp0(link->data, "nullable") == 0) {
+ if (g_strcmp0(link->data, "nullable") == 0) {
+ break;
+ }
+ }
+
+ return link != NULL;
+}
+
+static gboolean annotation_contains_optional(GList *annotations) /* gchar * */
+{
+ GList *link;
+
+ for (link = annotations; link; link = g_list_next(link)) {
+ if (g_strcmp0(link->data, "optional") == 0) {
break;
}
}
@@ -2033,6 +2050,7 @@ gchar *get_source_run_time_checkers(Method *method, const gchar *namespace)
gchar *defaultValue;
gchar *retTrueType;
guint namespace_len;
+ gboolean param_is_out;
g_return_val_if_fail(method != NULL, NULL);
g_return_val_if_fail(namespace != NULL && *namespace != '\0', NULL);
@@ -2095,7 +2113,10 @@ gchar *get_source_run_time_checkers(Method *method, const gchar *namespace)
(void)g_stpcpy(buffer + strlen(buffer), "\n");
}
- if (i != namespace_len && !annotation_contains_nullable(parameter->annotations)) {
+ param_is_out = parameter_is_out(parameter);
+ if (i != namespace_len && (
+ (!param_is_out && !annotation_contains_nullable(parameter->annotations)) ||
+ (param_is_out && !annotation_contains_optional(parameter->annotations)))) {
(void)g_stpcpy(buffer + strlen(buffer), "\t");
if (method->ret != NULL) {
(void)g_stpcpy(buffer + strlen(buffer), "g_return_val_if_fail (");
diff --git a/src/libical-glib/tools/generator.h b/src/libical-glib/tools/generator.h
index 4aa14693..31a4ea35 100644
--- a/src/libical-glib/tools/generator.h
+++ b/src/libical-glib/tools/generator.h
@@ -1,16 +1,7 @@
/*
- * Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ * SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
*
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of either:
- *
- * The LGPL as published by the Free Software Foundation, version
- * 2.1, available at: https://www.gnu.org/licenses/lgpl-2.1.html
- *
- * Or:
- *
- * The Mozilla Public License Version 2.0. You may obtain a copy of
- * the License at https://www.mozilla.org/MPL/
+ * SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
*/
#ifndef GENERATOR_H
diff --git a/src/libical-glib/tools/header-forward-declarations-template b/src/libical-glib/tools/header-forward-declarations-template
index 7ea06c29..95de7492 100644
--- a/src/libical-glib/tools/header-forward-declarations-template
+++ b/src/libical-glib/tools/header-forward-declarations-template
@@ -1,19 +1,9 @@
/* Generated file (by generator) */
/*
- * Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ * SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
*
- * This library is free software: you can redistribute it and/or modify it
- * under the terms of version 2.1. of the GNU Lesser General Public License
- * as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <https://www.gnu.org/licenses/>.
+ * SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
*/
#if !defined (__LIBICAL_GLIB_H_INSIDE__) && !defined (LIBICAL_GLIB_COMPILATION)
diff --git a/src/libical-glib/tools/header-header-template b/src/libical-glib/tools/header-header-template
index 9dde6369..b19012c2 100644
--- a/src/libical-glib/tools/header-header-template
+++ b/src/libical-glib/tools/header-header-template
@@ -1,19 +1,9 @@
/* Generated file (by generator) */
/*
- * Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ * SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
*
- * This library is free software: you can redistribute it and/or modify it
- * under the terms of version 2.1. of the GNU Lesser General Public License
- * as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <https://www.gnu.org/licenses/>.
+ * SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
*/
#ifndef LIBICAL_GLIB_H
@@ -21,10 +11,6 @@
#include <glib-object.h>
-#if !defined(LIBICAL_GLIB_UNSTABLE_API) && !defined(LIBICAL_GLIB_COMPILATION)
-#error "Define LIBICAL_GLIB_UNSTABLE_API, to indicate it's understood the libical-glib API is currently unstable"
-#endif
-
#define __LIBICAL_GLIB_H_INSIDE__
#include <libical-glib/i-cal-forward-declarations.h>
diff --git a/src/libical-glib/tools/header-template b/src/libical-glib/tools/header-template
index f4edf16f..a51c7331 100644
--- a/src/libical-glib/tools/header-template
+++ b/src/libical-glib/tools/header-template
@@ -1,19 +1,9 @@
/* Generated file (by generator) */
/*
- * Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ * SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
*
- * This library is free software: you can redistribute it and/or modify it
- * under the terms of version 2.1. of the GNU Lesser General Public License
- * as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <https://www.gnu.org/licenses/>.
+ * SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
*/
#if !defined (__LIBICAL_GLIB_H_INSIDE__) && !defined (LIBICAL_GLIB_COMPILATION)
diff --git a/src/libical-glib/tools/source-template b/src/libical-glib/tools/source-template
index 8b71354e..4a354b2c 100644
--- a/src/libical-glib/tools/source-template
+++ b/src/libical-glib/tools/source-template
@@ -1,19 +1,9 @@
/* Generated file (by generator) */
/*
- * Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ * SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
*
- * This library is free software: you can redistribute it and/or modify it
- * under the terms of version 2.1. of the GNU Lesser General Public License
- * as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <https://www.gnu.org/licenses/>.
+ * SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
*/
#ifdef HAVE_CONFIG_H
diff --git a/src/libical-glib/tools/xml-parser.c b/src/libical-glib/tools/xml-parser.c
index a9cf2704..76e39b7f 100644
--- a/src/libical-glib/tools/xml-parser.c
+++ b/src/libical-glib/tools/xml-parser.c
@@ -1,16 +1,7 @@
/*
- * Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ * SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
*
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of either:
- *
- * The LGPL as published by the Free Software Foundation, version
- * 2.1, available at: https://www.gnu.org/licenses/lgpl-2.1.html
- *
- * Or:
- *
- * The Mozilla Public License Version 2.0. You may obtain a copy of
- * the License at https://www.mozilla.org/MPL/
+ * SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
*/
#include "xml-parser.h"
diff --git a/src/libical-glib/tools/xml-parser.h b/src/libical-glib/tools/xml-parser.h
index bccbb4d3..403c40c0 100644
--- a/src/libical-glib/tools/xml-parser.h
+++ b/src/libical-glib/tools/xml-parser.h
@@ -1,16 +1,8 @@
/*
- * Copyright (C) 2015 William Yu <williamyu@gnome.org>
+ * SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
*
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of either:
+ * SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
*
- * The LGPL as published by the Free Software Foundation, version
- * 2.1, available at: https://www.gnu.org/licenses/lgpl-2.1.html
- *
- * Or:
- *
- * The Mozilla Public License Version 2.0. You may obtain a copy of
- * the License at https://www.mozilla.org/MPL/
*/
#ifndef XML_PARSER_H