/* Generated file (by generator) */

/*
 * SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>
 *
 * SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include "i-cal-vcard-parser.h"
#include "libical-glib-private.h"
#include "i-cal-vcard-component.h"

/**
 * i_cal_vcard_parser_parse_string:
 * @str: A vCard string to parse
 *
 * Parses the vCard string @str and returns an #ICalVcardComponent, or %NULL when the parse failed.
 *
 * Returns: (transfer full) (nullable): A newly created #ICalVcardComponent, or %NULL on error.
 *
 * Since: 4.0
 *
 **/
ICalVcardComponent *
i_cal_vcard_parser_parse_string (const char *str)
{
    g_return_val_if_fail (str != NULL, NULL);

	return i_cal_vcard_component_new_full (vcardparser_parse_string (str), NULL);
}

/**
 * i_cal_vcard_parser_errstr:
 * @err: error code
 *
 * Converts an error code into its text representation.
 *
 * Returns: Text representation of the @err code.
 *
 * Since: 4.0
 *
 **/
const char *
i_cal_vcard_parser_errstr (int err)
{
	return vcardparser_errstr (err);
}

/**
 * i_cal_vcard_parser_set_xprop_value_kind:
 * @callback: (scope call) (closure data): The callback function
 * @data: (nullable): The user data for the callback function
 *
 * Registers a parser callback to override the default value type of an x-property.
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_parser_set_xprop_value_kind (ICalVcardXpropValueKindFunc callback, 
                                         gpointer data)
{
	vcardparser_set_xprop_value_kind (callback, data);
}
