summaryrefslogtreecommitdiff
path: root/src/libical-glib/api/i-cal-mime.xml
blob: 9294c9dca035949c0ef579c21b1db68fd032dd93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!--
  Copyright (C) 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/>.
-->
<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="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 (user_data != NULL, NULL);

	return i_cal_component_new_full (icalmime_parse(func, user_data), NULL);</custom>
    </method>
</structure>