/* 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-component.h"
#include "libical-glib-private.h"
#include "i-cal-vcard-derived-value.h"
#include "i-cal-vcard-derived-property.h"
#include "i-cal-vcard-property.h"

G_DEFINE_TYPE (ICalVcardComponent, i_cal_vcard_component, I_CAL_TYPE_OBJECT)

static void i_cal_vcard_component_class_init (G_GNUC_UNUSED ICalVcardComponentClass *klass)
{
}

static void i_cal_vcard_component_init (G_GNUC_UNUSED ICalVcardComponent *self)
{
}

/**
 * i_cal_vcard_component_new_full: (skip)
 * @native: The native libical object.
 * @owner: The parent.
 *
 * Create a new libical-glib object from the native libical object and the owner.
 *
 * Returns: (transfer full): The newly create libical-glib object.
 *
 * Since: 1.0
 **/
ICalVcardComponent *
i_cal_vcard_component_new_full (vcardcomponent *native, 
                                GObject *owner)
{
    ICalVcardComponent *object;
    if (native == NULL) {
        return NULL;
    }
    
    
    object = i_cal_object_construct (I_CAL_VCARD_TYPE_COMPONENT,
                            (gpointer) native,
                            (GDestroyNotify) vcardcomponent_free,
                            FALSE,
                            owner);

    return object;
}


/**
 * i_cal_vcard_component_new:
 * @kind: The #ICalVcardComponentKind
 *
 * Creates a new #ICalVcardComponent with specified kind.
 *
 * Returns: (transfer full): The newly created #ICalVcardComponent.
 *
 * Since: 4.0
 *
 **/
ICalVcardComponent *
i_cal_vcard_component_new (ICalVcardComponentKind kind)
{
	return i_cal_vcard_component_new_full (vcardcomponent_new ((vcardcomponent_kind) (kind)), NULL);
}

/**
 * i_cal_vcard_component_clone:
 * @component: An #ICalVcardComponent to clone.
 *
 * Deeply clone @component.
 *
 * Returns: (transfer full): The newly deeply cloned #ICalVcardComponent.
 *
 * Since: 4.0
 *
 **/
ICalVcardComponent *
i_cal_vcard_component_clone (const ICalVcardComponent *component)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)component), NULL);

	return i_cal_vcard_component_new_full (vcardcomponent_clone ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)component))), NULL);
}

/**
 * i_cal_vcard_component_new_from_string:
 * @str: The string used to create #ICalVcardComponent
 *
 * Creates a new #ICalVcardComponent based on a string.
 *
 * Returns: (transfer full): The newly created #ICalVcardComponent based on @str.
 *
 * Since: 4.0
 *
 **/
ICalVcardComponent *
i_cal_vcard_component_new_from_string (const gchar *str)
{
    g_return_val_if_fail (str != NULL, NULL);

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

/**
 * i_cal_vcard_component_free: (skip)
 * @component: The #ICalVcardComponent to be freed
 *
 * Frees an #ICalVcardComponent.
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_component_free (ICalVcardComponent *component)
{
    g_return_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)component));

	vcardcomponent_free ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)component)));
}

/**
 * i_cal_vcard_component_as_vcard_string:
 * @component: The #ICalVcardComponent to be converted
 *
 * Converts an #ICalVcardComponent to a string.
 *
 * Returns: (transfer full): The string representation of #ICalVcardComponent.
 *
 * Since: 4.0
 *
 **/
gchar *
i_cal_vcard_component_as_vcard_string (ICalVcardComponent *component)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)component), NULL);

	return i_cal_memory_str_to_glib (vcardcomponent_as_vcard_string_r ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)component))));
}

/**
 * i_cal_vcard_component_is_valid:
 * @component: The #ICalVcardComponent to be checked
 *
 * Checks whether #ICalVcardComponent is valid.
 *
 * Returns: true if yes, false if not.
 *
 * Since: 4.0
 *
 **/
gboolean
i_cal_vcard_component_is_valid (ICalVcardComponent *component)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)component), FALSE);

	return vcardcomponent_is_valid ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)component)));
}

/**
 * i_cal_vcard_component_isa:
 * @component: The #ICalVcardComponent to be checked
 *
 * Gets the type of #ICalVcardComponent.
 *
 * Returns: An #ICalVcardComponentKind.
 *
 * Since: 4.0
 *
 **/
ICalVcardComponentKind
i_cal_vcard_component_isa (const ICalVcardComponent *component)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)component), I_CAL_VCARD_NO_COMPONENT);

	return (ICalVcardComponentKind) (vcardcomponent_isa ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)component))));
}

/**
 * i_cal_vcard_component_isa_component:
 * @component: The #ICalVcardComponent to be checked
 *
 * Checks whether the native part of #ICalVcardComponent is #ICalVcardComponent.
 *
 * Returns: true if yes, false if not.
 *
 * Since: 4.0
 *
 **/
gboolean
i_cal_vcard_component_isa_component (ICalVcardComponent *component)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)component), FALSE);

	return vcardcomponent_isa_component ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)component)));
}

/**
 * i_cal_vcard_component_add_property:
 * @component: An #ICalVcardComponent
 * @property: An #ICalVcardProperty
 *
 * Adds an #ICalVcardProperty into #ICalVcardComponent.
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_component_add_property (ICalVcardComponent *component, 
                                    ICalVcardProperty *property)
{
    g_return_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)component));
    g_return_if_fail (I_CAL_VCARD_IS_PROPERTY ((ICalVcardProperty*)property));

	i_cal_object_set_owner ((ICalObject *)property, (GObject *)component);
	vcardcomponent_add_property ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)component)), (vcardproperty *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)property)));
}

/**
 * i_cal_vcard_component_take_property: (skip)
 * @component: An #ICalVcardComponent
 * @property: (transfer full): An #ICalVcardProperty
 *
 * Adds the @property into the @component and unrefs the @property.
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_component_take_property (ICalVcardComponent *component, 
                                     ICalVcardProperty *property)
{
    g_return_if_fail(I_CAL_VCARD_IS_COMPONENT(component));
    g_return_if_fail(I_CAL_IS_PROPERTY(property));

    i_cal_vcard_component_add_property(component, property);
    g_object_unref(property);
}

/**
 * i_cal_vcard_component_remove_property:
 * @component: An #ICalVcardComponent
 * @property: An #ICalVcardProperty
 *
 * Removes #ICalVcardProperty from #ICalVcardComponent. Caution: The compare is based on address. So you
 * must use the original #ICalVcardProperty as the target.
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_component_remove_property (ICalVcardComponent *component, 
                                       ICalVcardProperty *property)
{
    g_return_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)component));
    g_return_if_fail (I_CAL_VCARD_IS_PROPERTY ((ICalVcardProperty*)property));

	i_cal_object_remove_owner (I_CAL_OBJECT (property));
	vcardcomponent_remove_property ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)component)), (vcardproperty *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)property)));
}

/**
 * i_cal_vcard_component_count_properties:
 * @component: The #ICalVcardComponent
 * @kind: An #ICalVcardPropertyKind
 * @ignore_alts: whether to ignore alternatives
 *
 * Counts the number of #ICalVcardProperty in #ICalVcardComponent.
 *
 * Returns: The number of #ICalVcardProperty.
 *
 * Since: 4.0
 *
 **/
gint
i_cal_vcard_component_count_properties (ICalVcardComponent *component, 
                                        ICalVcardPropertyKind kind, 
                                        gboolean ignore_alts)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)component), 0);

	return vcardcomponent_count_properties ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)component)), (vcardproperty_kind) (kind), ignore_alts);
}

/**
 * i_cal_vcard_component_add_component:
 * @parent: An #ICalVcardComponent
 * @child: A child #ICalVcardComponent
 *
 * Adds an #ICalVcardComponent into another #ICalVcardComponent as a child component.
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_component_add_component (ICalVcardComponent *parent, 
                                     ICalVcardComponent *child)
{
    g_return_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)parent));
    g_return_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)child));

	i_cal_object_set_owner ((ICalObject *)child, (GObject *)(GObject*) parent);
	vcardcomponent_add_component ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)parent)), (vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)child)));
}

/**
 * i_cal_vcard_component_take_component: (skip)
 * @parent: An #ICalVcardComponent
 * @child: (transfer full): A child #ICalVcardComponent
 *
 * Adds the @child into the @parent as a child component and unrefs the @child.
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_component_take_component (ICalVcardComponent *parent, 
                                      ICalVcardComponent *child)
{
    g_return_if_fail(I_CAL_IS_COMPONENT(parent));
    g_return_if_fail(I_CAL_IS_COMPONENT(child));

    i_cal_vcard_component_add_component(parent, child);
    g_object_unref(child);
}

/**
 * i_cal_vcard_component_remove_component:
 * @parent: An #ICalVcardComponent
 * @child: A child #ICalVcardComponent
 *
 * Removes a child #ICalVcardComponent from another #ICalVcardComponent.
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_component_remove_component (ICalVcardComponent *parent, 
                                        ICalVcardComponent *child)
{
    g_return_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)parent));
    g_return_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)child));

	i_cal_object_remove_owner (I_CAL_OBJECT (child));
	vcardcomponent_remove_component ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)parent)), (vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)child)));
}

/**
 * i_cal_vcard_component_count_components:
 * @component: The #ICalVcardComponent to be checked
 * @kind: The target #ICalVcardComponentKind
 *
 * Counts the child #ICalVcardComponent with the target kind in the parent one.
 *
 * Returns: The count of child #ICalVcardComponent in the parent one.
 *
 * Since: 4.0
 *
 **/
gint
i_cal_vcard_component_count_components (ICalVcardComponent *component, 
                                        ICalVcardComponentKind kind)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)component), 0);

	return vcardcomponent_count_components ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)component)), (vcardcomponent_kind) (kind));
}

/**
 * i_cal_vcard_component_kind_is_valid:
 * @kind: An #ICalVcardComponentKind
 *
 * Checks if an #ICalVcardComponentKind is valid.
 *
 * Returns: true if @kind id an #ICalVcardComponent but not the I_CAL_VCARD_NO_COMPONENT, false if not.
 *
 * Since: 4.0
 *
 **/
gboolean
i_cal_vcard_component_kind_is_valid (ICalVcardComponentKind kind)
{
	return vcardcomponent_kind_is_valid ((vcardcomponent_kind) (kind));
}

/**
 * i_cal_vcard_component_kind_from_string:
 * @string: A string
 *
 * Converts a string to an #ICalVcardComponentKind.
 *
 * Returns: An #ICalVcardComponentKind
 *
 * Since: 4.0
 *
 **/
ICalVcardComponentKind
i_cal_vcard_component_kind_from_string (const gchar *string)
{
    g_return_val_if_fail (string != NULL, I_CAL_VCARD_NO_COMPONENT);

	return (ICalVcardComponentKind) (vcardcomponent_string_to_kind (string));
}

/**
 * i_cal_vcard_component_kind_to_string:
 * @kind: An #ICalVcardComponentKind
 *
 * Converts an #ICalVcardComponentKind to a string.
 *
 * Returns: (transfer none): The string representation of @kind.
 *
 * Since: 4.0
 *
 **/
const gchar *
i_cal_vcard_component_kind_to_string (ICalVcardComponentKind kind)
{
	return vcardcomponent_kind_to_string ((vcardcomponent_kind) (kind));
}

/**
 * i_cal_vcard_component_get_current_component:
 * @component: An #ICalVcardComponent
 *
 * Gets the current #ICalVcardComponent in #ICalVcardComponent.
 *
 * Returns: (transfer full): The current #ICalVcardComponent.
 *
 * Since: 4.0
 *
 **/
ICalVcardComponent *
i_cal_vcard_component_get_current_component (ICalVcardComponent *component)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)component), NULL);

	return i_cal_vcard_component_new_full (vcardcomponent_get_current_component ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)component))), (GObject *)component);
}

/**
 * i_cal_vcard_component_get_first_component:
 * @component: An #ICalVcardComponent
 * @kind: An #ICalVcardComponentKind
 *
 * Gets the first #ICalVcardComponent with specific kind in #ICalVcardComponent.
 *
 * Returns: (transfer full) (nullable): The first #ICalVcardComponent.
 *
 * Since: 4.0
 *
 **/
ICalVcardComponent *
i_cal_vcard_component_get_first_component (ICalVcardComponent *component, 
                                           ICalVcardComponentKind kind)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)component), NULL);

	return i_cal_vcard_component_new_full (vcardcomponent_get_first_component ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)component)), (vcardcomponent_kind) (kind)), (GObject *)component);
}

/**
 * i_cal_vcard_component_get_next_component:
 * @component: An #ICalVcardComponent
 * @kind: An #ICalVcardComponentKind
 *
 * Gets the next #ICalVcardComponent with specific kind in #ICalVcardComponent.
 *
 * Returns: (transfer full) (nullable): The next #ICalVcardComponent.
 *
 * Since: 4.0
 *
 **/
ICalVcardComponent *
i_cal_vcard_component_get_next_component (ICalVcardComponent *component, 
                                          ICalVcardComponentKind kind)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)component), NULL);

	return i_cal_vcard_component_new_full (vcardcomponent_get_next_component ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)component)), (vcardcomponent_kind) (kind)), (GObject *)component);
}

/**
 * i_cal_vcard_property_set_parent:
 * @property: An #ICalVcardProperty
 * @component: (nullable): An #ICalVcardComponent
 *
 * Sets the parent #ICalVcardComponent of the specified #ICalVcardProperty.
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_property_set_parent (ICalVcardProperty *property, 
                                 ICalVcardComponent *component)
{
    g_return_if_fail (I_CAL_VCARD_IS_PROPERTY ((ICalVcardProperty*)property));
    if (component) {
        g_return_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)component));
    }

	vcardproperty_set_parent ((vcardproperty *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)property)), ((component)?((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)component))):NULL));
}

/**
 * i_cal_vcard_property_get_parent:
 * @property: The #ICalVcardProperty
 *
 * Gets the parent component of the property. Use with caution. When icalproperty is deallocated, it won't
 * deallocate its parent. However the #ICalVcardComponent object created using this method will be deallocated
 * (if no reference in other places). So You need to make sure there is another reference except the one
 * in #ICalVcardProperty.
 *
 * Returns: (transfer full) (nullable): The parent #ICalVcardComponent of #ICalVcardProperty.
 *
 * Since: 4.0
 *
 **/
ICalVcardComponent *
i_cal_vcard_property_get_parent (ICalVcardProperty *property)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_PROPERTY ((ICalVcardProperty*)property), NULL);

	return i_cal_vcard_component_new_full (vcardproperty_get_parent ((vcardproperty *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)property))), (GObject *)property);
}

/**
 * i_cal_vcard_component_get_current_property:
 * @component: An #ICalVcardComponent
 *
 * Gets the current #ICalVcardProperty in #ICalVcardComponent.
 *
 * Returns: (transfer full): The current #ICalVcardProperty.
 *
 * Since: 4.0
 *
 **/
ICalVcardProperty *
i_cal_vcard_component_get_current_property (ICalVcardComponent *component)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)component), NULL);

	return i_cal_vcard_property_new_full (vcardcomponent_get_current_property ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)component))), (GObject *)component);
}

/**
 * i_cal_vcard_component_get_first_property:
 * @component: An #ICalVcardComponent
 * @kind: An #ICalVcardPropertyKind
 *
 * Gets the first #ICalVcardProperty with specific kind in #ICalVcardComponent.
 *
 * Returns: (transfer full) (nullable): The first #ICalVcardProperty.
 *
 * Since: 4.0
 *
 **/
ICalVcardProperty *
i_cal_vcard_component_get_first_property (ICalVcardComponent *component, 
                                          ICalVcardPropertyKind kind)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)component), NULL);

	return i_cal_vcard_property_new_full (vcardcomponent_get_first_property ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)component)), (vcardproperty_kind) (kind)), (GObject *)component);
}

/**
 * i_cal_vcard_component_get_next_property:
 * @component: An #ICalVcardComponent
 * @kind: An #ICalVcardPropertyKind
 *
 * Gets the next #ICalVcardProperty with specific kind in #ICalVcardComponent.
 *
 * Returns: (transfer full) (nullable): The next #ICalVcardProperty.
 *
 * Since: 4.0
 *
 **/
ICalVcardProperty *
i_cal_vcard_component_get_next_property (ICalVcardComponent *component, 
                                         ICalVcardPropertyKind kind)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)component), NULL);

	return i_cal_vcard_property_new_full (vcardcomponent_get_next_property ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)component)), (vcardproperty_kind) (kind)), (GObject *)component);
}

/**
 * i_cal_vcard_component_check_restrictions:
 * @comp: The #ICalVcardComponent to be checked
 *
 * Checks the number of restrictions in #ICalVcardComponent.
 *
 * Returns: The number of restrictions in @comp
 *
 * Since: 4.0
 *
 **/
gint
i_cal_vcard_component_check_restrictions (ICalVcardComponent *comp)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)comp), 0);

	return vcardcomponent_check_restrictions ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)comp)));
}

/**
 * i_cal_vcard_component_count_errors:
 * @comp: An #ICalVcardComponent
 *
 * Counts the number of errors in #ICalVcardComponent.
 *
 * Returns: The count of errors.
 *
 * Since: 4.0
 *
 **/
gint
i_cal_vcard_component_count_errors (ICalVcardComponent *comp)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)comp), 0);

	return vcardcomponent_count_errors ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)comp)));
}

/**
 * i_cal_vcard_component_strip_errors:
 * @comp: An #ICalVcardComponent
 *
 * Removes all X-LIC-ERROR properties.
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_component_strip_errors (ICalVcardComponent *comp)
{
    g_return_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)comp));

	vcardcomponent_strip_errors ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)comp)));
}

/**
 * i_cal_vcard_component_normalize:
 * @comp: An #ICalVcardComponent
 *
 * Normalizes (reorders and sorts the properties) the specified vCard @comp.
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_component_normalize (ICalVcardComponent *comp)
{
    g_return_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)comp));

	vcardcomponent_normalize ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)comp)));
}

/**
 * i_cal_vcard_component_transform:
 * @comp: An #ICalVcardComponent
 * @version: An #ICalVcardPropertyVersion
 *
 * Transforms (converts) the @comp properties to specified vCard @version.
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_component_transform (ICalVcardComponent *comp, 
                                 ICalVcardPropertyVersion version)
{
    g_return_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)comp));

	vcardcomponent_transform ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)comp)), (vcardproperty_version) (version));
}

/**
 * i_cal_vcard_component_get_version:
 * @comp: An #ICalVcardComponent
 *
 * Returns the current vCard version of th @comp as #ICalVcardPropertyVersion.
 *
 * Returns: Current vCard version of the @comp. VCARD_VERSION_NONE is returned if the version property is empty or @comp is null.
 *
 * Since: 4.0
 *
 **/
ICalVcardPropertyVersion
i_cal_vcard_component_get_version (ICalVcardComponent *comp)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)comp), I_CAL_VCARD_VERSION_NONE);

	return (ICalVcardPropertyVersion) (vcardcomponent_get_version ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)comp))));
}

/**
 * i_cal_vcard_component_get_uid:
 * @comp: An #ICalVcardComponent
 *
 * Gets the UID of the @comp.
 *
 * Returns: The UID of the @comp.
 *
 * Since: 4.0
 *
 **/
const gchar *
i_cal_vcard_component_get_uid (ICalVcardComponent *comp)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)comp), NULL);

	return vcardcomponent_get_uid ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)comp)));
}

/**
 * i_cal_vcard_component_get_fn:
 * @comp: An #ICalVcardComponent
 *
 * Gets the FN property value of the @comp.
 *
 * Returns: The FN property value of the @comp.
 *
 * Since: 4.0
 *
 **/
const gchar *
i_cal_vcard_component_get_fn (ICalVcardComponent *comp)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_COMPONENT ((ICalVcardComponent*)comp), NULL);

	return vcardcomponent_get_fn ((vcardcomponent *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)comp)));
}
