diff options
author | Corentin Noël <corentin.noel@collabora.com> | 2019-04-27 15:45:38 +0200 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2019-05-01 16:19:30 -0400 |
commit | 6b809eae8bb41c1e74d72f8798352d4ee762caae (patch) | |
tree | 0e1d97d266071746c7ce9f051d71ffb3455e0698 /src/libical-glib/api/i-cal-mime.xml | |
parent | 40b8bd225c7d3279b483498cbf7a68369ddfceb0 (diff) | |
download | libical-git-6b809eae8bb41c1e74d72f8798352d4ee762caae.tar.gz |
[libical-glib] Add annotations and delegates to the mime parser
Add documentation to the delegate and provide the right annotations.
Diffstat (limited to 'src/libical-glib/api/i-cal-mime.xml')
-rw-r--r-- | src/libical-glib/api/i-cal-mime.xml | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/libical-glib/api/i-cal-mime.xml b/src/libical-glib/api/i-cal-mime.xml index 8c8953eb..20a40a3a 100644 --- a/src/libical-glib/api/i-cal-mime.xml +++ b/src/libical-glib/api/i-cal-mime.xml @@ -14,14 +14,23 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. --> <structure namespace="ICal" name="Mime"> + <declaration position="header">/** + * ICalMimeParseFunc: + * @bytes: (array length=size) (element-type gchar): the bytes to process + * @size: the length of the bytes array + * @user_data: the user data + * + * Returns: A #ICalComponent as a string + */ +typedef gchar *(*ICalMimeParseFunc)(gchar *bytes, size_t size, gpointer user_data);</declaration> <method name="i_cal_mime_parse" corresponds="CUSTOM" since="1.0"> - <parameter type="gchar *" name="(*func)(gchar *,size_t,void *)" comment="FULL: @func: The parsing function."/> - <parameter type="void *" name="data" comment="The source to be parsed."/> - <returns type="ICalComponent *" annotation="transfer full" comment="The #ICalComponent parsed from @data"/> - <comment xml:space="preserve">Parse from the data to #ICalComponent.</comment> + <parameter type="ICalMimeParseFunc" name="func" annotation="scope call" comment="The parsing function."/> + <parameter type="gpointer" name="user_data" annotation="closure" comment="The date given to @func."/> + <returns type="ICalComponent *" annotation="transfer full" comment="The parsed #ICalComponent"/> + <comment xml:space="preserve">Parse data to #ICalComponent using the given function.</comment> <custom> g_return_val_if_fail (func != NULL, NULL); - g_return_val_if_fail (data != NULL, NULL); + g_return_val_if_fail (user_data != NULL, NULL); - return i_cal_component_new_full (icalmime_parse(func, data), NULL);</custom> + return i_cal_component_new_full (icalmime_parse(func, user_data), NULL);</custom> </method> </structure> |