<!--
  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 <http://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Attach" native="icalattach" destroy_func="icalattach_unref">
    <method name="i_cal_attach_new_from_url" corresponds="icalattach_new_from_url" kind="constructor" since="1.0">
        <parameter type="const gchar *" name="url" comment="The url from which the object is created"/>
        <returns type="ICalAttach *" annotation="transfer full" comment="The newly created #ICalAttach from the @url" />
        <comment xml:space="preserve">Create a new #ICalAttach from the url</comment>
    </method>
    <method name="i_cal_attach_new_from_data" corresponds="icalattach_new_from_data" 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 detroyed."/>
        <parameter type="void *" name="free_fn_data" annotation="allow-none" 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">Create a new #ICalAttach from the data.</comment>
    </method>
    <method name="i_cal_attach_ref" corresponds="icalattach_ref" annotation="skip" kind="others" since="1.0">
        <parameter type="ICalAttach *" name="attach" comment="The #ICalAttach to be referenced by once"/>
        <comment xml:space="preserve">Increase the ref counter by 1 for the @attach</comment>
    </method> 
    <method name="i_cal_attach_unref" corresponds="icalattach_unref" annotation="skip" kind="others" since="1.0">
        <parameter type="ICalAttach *" name="attach" comment="The #ICalAttach to be unreferenced by once"/>
        <comment xml:space="preserve">Decrese the ref counter by 1 for the @attach</comment>
    </method>  
    <method name="i_cal_attach_get_is_url" corresponds="icalattach_get_is_url" kind="others" since="1.0">
        <parameter type="ICalAttach *" name="attach" comment="The #ICalAttach to be queried"/>
        <returns type="gint" comment="1 if the @attach is built from url and 0 if not." />
        <comment xml:space="preserve">Check whether the #ICalAttach is built from url</comment>
    </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." />
        <comment xml:space="preserve">Get the url if the #ICalAttach is built from the url. NULL if else.</comment>
    </method>
    <method name="i_cal_attach_get_data" corresponds="icalattach_get_data" kind="others" since="1.0">
        <parameter type="ICalAttach *" name="attach" comment="The #ICalAttach to be queried"/>
        <returns type="guchar *" annotation="type utf8, allow-none, transfer none" comment="The data component of the @attach. NULL if it is built from url or there is an error." />
        <comment xml:space="preserve">Get the data if the #ICalAttach is built from the data. NULL if else.</comment>
    </method>
</structure>
