/* 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-derived-value.h"
#include "libical-glib-private.h"
#include "i-cal-vcard-time.h"
#include "i-cal-vcard-str-array.h"
#include "i-cal-vcard-structured.h"
#include "i-cal-vcard-tz.h"
#include "i-cal-vcard-geo.h"
#include "i-cal-vcard-value.h"

/**
 * i_cal_vcard_value_new_x:
 * @value: the text value
 *
 * Creates a new #ICalVcardValue holding X.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding X
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_x (const gchar *value)
{
    g_return_val_if_fail (value != NULL, NULL);

	return i_cal_vcard_value_new_full (vcardvalue_new_x (value), NULL);
}

/**
 * i_cal_vcard_value_get_x:
 * @self: the #ICalVcardValue of X
 *
 * Returns value of the X @self
 *
 * Returns: the X value
 *
 * Since: 4.0
 *
 **/
const gchar *
i_cal_vcard_value_get_x (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), NULL);

	return vcardvalue_get_x ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)));
}

/**
 * i_cal_vcard_value_set_x:
 * @self: the #ICalVcardValue of X
 * @value: the X value
 *
 * Sets value to the X @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_x (ICalVcardValue *self, 
                         const gchar *value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));
    g_return_if_fail (value != NULL);

	vcardvalue_set_x ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), value);
}

/**
 * i_cal_vcard_value_new_structured:
 * @value: the #ICalVcardStructured value
 *
 * Creates a new #ICalVcardValue holding STRUCTURED.
 *
 * Note: this uses a copy of the structured type,
 * not the one stored in the @value
 *
 * Returns: (transfer full): a new #ICalVcardValue holding STRUCTURED
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_structured (const ICalVcardStructured *value)
{
    vcardstructuredtype *val;
    g_return_val_if_fail(value != NULL, NULL);
    val = (vcardstructuredtype *)i_cal_object_get_native((ICalObject *)value);
    if (val == NULL) {
        return NULL;
    }
    return i_cal_vcard_value_new_full(vcardvalue_new_structured(vcardstructured_clone(val)), NULL);
}

/**
 * i_cal_vcard_value_get_structured:
 * @self: the #ICalVcardValue of STRUCTURED
 *
 * Returns value of the STRUCTURED @self
 *
 * Note: this uses a copy of the structured type, not the one
 * stored in the @self
 *
 * Returns: (transfer full): the STRUCTURED value
 *
 * Since: 4.0
 *
 **/
ICalVcardStructured *
i_cal_vcard_value_get_structured (const ICalVcardValue *self)
{
    vcardstructuredtype *val;
    g_return_val_if_fail(self != NULL, NULL);
    val = vcardvalue_get_structured((vcardvalue *)i_cal_object_get_native((ICalObject *)self));
    if (val == NULL) {
        return NULL;
    }
    return i_cal_vcard_structured_new_full(vcardstructured_clone(val), NULL);
}

/**
 * i_cal_vcard_value_set_structured:
 * @self: the #ICalVcardValue of STRUCTURED
 * @value: the STRUCTURED value
 *
 * Sets value to the STRUCTURED @self
 *
 * Note: this uses a copy of the structured type, not the one stored
 * in the @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_structured (ICalVcardValue *self, 
                                  const ICalVcardStructured *value)
{
    g_return_if_fail(self != NULL);
    vcardvalue_set_structured((vcardvalue *)i_cal_object_get_native((ICalObject *)self),
        vcardstructured_clone((vcardstructuredtype *)i_cal_object_get_native((ICalObject *)value)));
}

/**
 * i_cal_vcard_value_new_geo:
 * @value: the #ICalVcardGeo value
 *
 * Creates a new #ICalVcardValue holding GEO.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding GEO
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_geo (const ICalVcardGeo *value)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_GEO ((ICalVcardGeo*)value), NULL);

	return i_cal_vcard_value_new_full (vcardvalue_new_geo (* (vcardgeotype *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)value))), NULL);
}

/**
 * i_cal_vcard_value_get_geo:
 * @self: the #ICalVcardValue of GEO
 *
 * Returns value of the GEO @self
 *
 * Returns: (transfer full): the GEO value
 *
 * Since: 4.0
 *
 **/
ICalVcardGeo *
i_cal_vcard_value_get_geo (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), NULL);

	return i_cal_vcard_geo_new_full (vcardvalue_get_geo ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self))));
}

/**
 * i_cal_vcard_value_set_geo:
 * @self: the #ICalVcardValue of GEO
 * @value: the GEO value
 *
 * Sets value to the GEO @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_geo (ICalVcardValue *self, 
                           const ICalVcardGeo *value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));
    g_return_if_fail (I_CAL_VCARD_IS_GEO ((ICalVcardGeo*)value));

	vcardvalue_set_geo ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), * (vcardgeotype *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)value)));
}

/**
 * i_cal_vcard_value_new_tz:
 * @value: the #ICalVcardTz value
 *
 * Creates a new #ICalVcardValue holding TZ.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding TZ
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_tz (const ICalVcardTz *value)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_TZ ((ICalVcardTz*)value), NULL);

	return i_cal_vcard_value_new_full (vcardvalue_new_tz (* (vcardtztype *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)value))), NULL);
}

/**
 * i_cal_vcard_value_get_tz:
 * @self: the #ICalVcardValue of TZ
 *
 * Returns value of the TZ @self
 *
 * Returns: (transfer full): the TZ value
 *
 * Since: 4.0
 *
 **/
ICalVcardTz *
i_cal_vcard_value_get_tz (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), NULL);

	return i_cal_vcard_tz_new_full (vcardvalue_get_tz ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self))));
}

/**
 * i_cal_vcard_value_set_tz:
 * @self: the #ICalVcardValue of TZ
 * @value: the TZ value
 *
 * Sets value to the TZ @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_tz (ICalVcardValue *self, 
                          const ICalVcardTz *value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));
    g_return_if_fail (I_CAL_VCARD_IS_TZ ((ICalVcardTz*)value));

	vcardvalue_set_tz ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), * (vcardtztype *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)value)));
}

/**
 * i_cal_vcard_value_new_boolean:
 * @value: the boolean value
 *
 * Creates a new #ICalVcardValue holding BOOLEAN.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding BOOLEAN
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_boolean (gboolean value)
{
	return i_cal_vcard_value_new_full (vcardvalue_new_boolean (value), NULL);
}

/**
 * i_cal_vcard_value_get_boolean:
 * @self: the #ICalVcardValue of BOOLEAN
 *
 * Returns value of the BOOLEAN @self
 *
 * Returns: the BOOLEAN value
 *
 * Since: 4.0
 *
 **/
gboolean
i_cal_vcard_value_get_boolean (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), FALSE);

	return vcardvalue_get_boolean ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)));
}

/**
 * i_cal_vcard_value_set_boolean:
 * @self: the #ICalVcardValue of BOOLEAN
 * @value: the BOOLEAN value
 *
 * Sets value to the BOOLEAN @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_boolean (ICalVcardValue *self, 
                               gboolean value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));

	vcardvalue_set_boolean ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), value);
}

/**
 * i_cal_vcard_value_new_date:
 * @value: the #ICalVcardTime value
 *
 * Creates a new #ICalVcardValue holding DATE.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding DATE
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_date (const ICalVcardTime *value)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_TIME ((ICalVcardTime*)value), NULL);

	return i_cal_vcard_value_new_full (vcardvalue_new_date (* (vcardtimetype *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)value))), NULL);
}

/**
 * i_cal_vcard_value_get_date:
 * @self: the #ICalVcardValue of DATE
 *
 * Returns value of the DATE @self
 *
 * Returns: (transfer full): the DATE value
 *
 * Since: 4.0
 *
 **/
ICalVcardTime *
i_cal_vcard_value_get_date (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), NULL);

	return i_cal_vcard_time_new_full (vcardvalue_get_date ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self))));
}

/**
 * i_cal_vcard_value_set_date:
 * @self: the #ICalVcardValue of DATE
 * @value: the DATE value
 *
 * Sets value to the DATE @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_date (ICalVcardValue *self, 
                            const ICalVcardTime *value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));
    g_return_if_fail (I_CAL_VCARD_IS_TIME ((ICalVcardTime*)value));

	vcardvalue_set_date ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), * (vcardtimetype *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)value)));
}

/**
 * i_cal_vcard_value_new_dateandortime:
 * @value: the #ICalVcardTime value
 *
 * Creates a new #ICalVcardValue holding DATEANDORTIME.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding DATEANDORTIME
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_dateandortime (const ICalVcardTime *value)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_TIME ((ICalVcardTime*)value), NULL);

	return i_cal_vcard_value_new_full (vcardvalue_new_dateandortime (* (vcardtimetype *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)value))), NULL);
}

/**
 * i_cal_vcard_value_get_dateandortime:
 * @self: the #ICalVcardValue of DATEANDORTIME
 *
 * Returns value of the DATEANDORTIME @self
 *
 * Returns: (transfer full): the DATEANDORTIME value
 *
 * Since: 4.0
 *
 **/
ICalVcardTime *
i_cal_vcard_value_get_dateandortime (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), NULL);

	return i_cal_vcard_time_new_full (vcardvalue_get_dateandortime ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self))));
}

/**
 * i_cal_vcard_value_set_dateandortime:
 * @self: the #ICalVcardValue of DATEANDORTIME
 * @value: the DATEANDORTIME value
 *
 * Sets value to the DATEANDORTIME @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_dateandortime (ICalVcardValue *self, 
                                     const ICalVcardTime *value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));
    g_return_if_fail (I_CAL_VCARD_IS_TIME ((ICalVcardTime*)value));

	vcardvalue_set_dateandortime ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), * (vcardtimetype *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)value)));
}

/**
 * i_cal_vcard_value_new_datetime:
 * @value: the #ICalVcardTime value
 *
 * Creates a new #ICalVcardValue holding DATETIME.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding DATETIME
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_datetime (const ICalVcardTime *value)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_TIME ((ICalVcardTime*)value), NULL);

	return i_cal_vcard_value_new_full (vcardvalue_new_datetime (* (vcardtimetype *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)value))), NULL);
}

/**
 * i_cal_vcard_value_get_datetime:
 * @self: the #ICalVcardValue of DATETIME
 *
 * Returns value of the DATETIME @self
 *
 * Returns: (transfer full): the DATETIME value
 *
 * Since: 4.0
 *
 **/
ICalVcardTime *
i_cal_vcard_value_get_datetime (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), NULL);

	return i_cal_vcard_time_new_full (vcardvalue_get_datetime ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self))));
}

/**
 * i_cal_vcard_value_set_datetime:
 * @self: the #ICalVcardValue of DATETIME
 * @value: the DATETIME value
 *
 * Sets value to the DATETIME @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_datetime (ICalVcardValue *self, 
                                const ICalVcardTime *value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));
    g_return_if_fail (I_CAL_VCARD_IS_TIME ((ICalVcardTime*)value));

	vcardvalue_set_datetime ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), * (vcardtimetype *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)value)));
}

/**
 * i_cal_vcard_value_new_float:
 * @value: the double value
 *
 * Creates a new #ICalVcardValue holding FLOAT.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding FLOAT
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_float (gdouble value)
{
	return i_cal_vcard_value_new_full (vcardvalue_new_float (value), NULL);
}

/**
 * i_cal_vcard_value_get_float:
 * @self: the #ICalVcardValue of FLOAT
 *
 * Returns value of the FLOAT @self
 *
 * Returns: the FLOAT value
 *
 * Since: 4.0
 *
 **/
gdouble
i_cal_vcard_value_get_float (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), 0);

	return vcardvalue_get_float ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)));
}

/**
 * i_cal_vcard_value_set_float:
 * @self: the #ICalVcardValue of FLOAT
 * @value: the FLOAT value
 *
 * Sets value to the FLOAT @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_float (ICalVcardValue *self, 
                             gdouble value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));

	vcardvalue_set_float ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), value);
}

/**
 * i_cal_vcard_value_new_gramgender:
 * @value: the #ICalVcardPropertyGramgender value
 *
 * Creates a new #ICalVcardValue holding GRAMGENDER.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding GRAMGENDER
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_gramgender (ICalVcardPropertyGramgender value)
{
	return i_cal_vcard_value_new_full (vcardvalue_new_gramgender ((vcardproperty_gramgender) (value)), NULL);
}

/**
 * i_cal_vcard_value_get_gramgender:
 * @self: the #ICalVcardValue of GRAMGENDER
 *
 * Returns value of the GRAMGENDER @self
 *
 * Returns: the GRAMGENDER value
 *
 * Since: 4.0
 *
 **/
ICalVcardPropertyGramgender
i_cal_vcard_value_get_gramgender (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), I_CAL_VCARD_GRAMGENDER_NONE);

	return (ICalVcardPropertyGramgender) (vcardvalue_get_gramgender ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self))));
}

/**
 * i_cal_vcard_value_set_gramgender:
 * @self: the #ICalVcardValue of GRAMGENDER
 * @value: the GRAMGENDER value
 *
 * Sets value to the GRAMGENDER @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_gramgender (ICalVcardValue *self, 
                                  ICalVcardPropertyGramgender value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));

	vcardvalue_set_gramgender ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), (vcardproperty_gramgender) (value));
}

/**
 * i_cal_vcard_value_new_integer:
 * @value: the integer value
 *
 * Creates a new #ICalVcardValue holding INTEGER.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding INTEGER
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_integer (gint value)
{
	return i_cal_vcard_value_new_full (vcardvalue_new_integer (value), NULL);
}

/**
 * i_cal_vcard_value_get_integer:
 * @self: the #ICalVcardValue of INTEGER
 *
 * Returns value of the INTEGER @self
 *
 * Returns: the INTEGER value
 *
 * Since: 4.0
 *
 **/
gint
i_cal_vcard_value_get_integer (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), 0);

	return vcardvalue_get_integer ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)));
}

/**
 * i_cal_vcard_value_set_integer:
 * @self: the #ICalVcardValue of INTEGER
 * @value: the INTEGER value
 *
 * Sets value to the INTEGER @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_integer (ICalVcardValue *self, 
                               gint value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));

	vcardvalue_set_integer ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), value);
}

/**
 * i_cal_vcard_value_new_kind:
 * @value: the #ICalVcardPropertyKindenum value
 *
 * Creates a new #ICalVcardValue holding KIND.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding KIND
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_kind (ICalVcardPropertyKindenum value)
{
	return i_cal_vcard_value_new_full (vcardvalue_new_kind ((vcardproperty_kindenum) (value)), NULL);
}

/**
 * i_cal_vcard_value_get_kind:
 * @self: the #ICalVcardValue of KIND
 *
 * Returns value of the KIND @self
 *
 * Returns: the KIND value
 *
 * Since: 4.0
 *
 **/
ICalVcardPropertyKindenum
i_cal_vcard_value_get_kind (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), I_CAL_VCARD_KIND_NONE);

	return (ICalVcardPropertyKindenum) (vcardvalue_get_kind ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self))));
}

/**
 * i_cal_vcard_value_set_kind:
 * @self: the #ICalVcardValue of KIND
 * @value: the KIND value
 *
 * Sets value to the KIND @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_kind (ICalVcardValue *self, 
                            ICalVcardPropertyKindenum value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));

	vcardvalue_set_kind ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), (vcardproperty_kindenum) (value));
}

/**
 * i_cal_vcard_value_new_languagetag:
 * @value: the text value
 *
 * Creates a new #ICalVcardValue holding LANGUAGETAG.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding LANGUAGETAG
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_languagetag (const gchar *value)
{
    g_return_val_if_fail (value != NULL, NULL);

	return i_cal_vcard_value_new_full (vcardvalue_new_languagetag (value), NULL);
}

/**
 * i_cal_vcard_value_get_languagetag:
 * @self: the #ICalVcardValue of LANGUAGETAG
 *
 * Returns value of the LANGUAGETAG @self
 *
 * Returns: the LANGUAGETAG value
 *
 * Since: 4.0
 *
 **/
const gchar *
i_cal_vcard_value_get_languagetag (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), NULL);

	return vcardvalue_get_languagetag ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)));
}

/**
 * i_cal_vcard_value_set_languagetag:
 * @self: the #ICalVcardValue of LANGUAGETAG
 * @value: the LANGUAGETAG value
 *
 * Sets value to the LANGUAGETAG @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_languagetag (ICalVcardValue *self, 
                                   const gchar *value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));
    g_return_if_fail (value != NULL);

	vcardvalue_set_languagetag ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), value);
}

/**
 * i_cal_vcard_value_new_text:
 * @value: the text value
 *
 * Creates a new #ICalVcardValue holding TEXT.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding TEXT
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_text (const gchar *value)
{
    g_return_val_if_fail (value != NULL, NULL);

	return i_cal_vcard_value_new_full (vcardvalue_new_text (value), NULL);
}

/**
 * i_cal_vcard_value_get_text:
 * @self: the #ICalVcardValue of TEXT
 *
 * Returns value of the TEXT @self
 *
 * Returns: the TEXT value
 *
 * Since: 4.0
 *
 **/
const gchar *
i_cal_vcard_value_get_text (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), NULL);

	return vcardvalue_get_text ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)));
}

/**
 * i_cal_vcard_value_set_text:
 * @self: the #ICalVcardValue of TEXT
 * @value: the TEXT value
 *
 * Sets value to the TEXT @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_text (ICalVcardValue *self, 
                            const gchar *value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));
    g_return_if_fail (value != NULL);

	vcardvalue_set_text ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), value);
}

/**
 * i_cal_vcard_value_new_textlist:
 * @value: (transfer none): the string array as a value for the new ICalVcardValue holding TEXTLIST
 *
 * Creates a new #ICalVcardValue holding TEXTLIST.
 *
 * Note: this uses a copy of the string array, not
 * the one stored in the @value
 *
 * Returns: (transfer full) (nullable): a new #ICalVcardValue holding TEXTLIST
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_textlist (const ICalVcardStrArray *value)
{
    vcardstrarray *val;
    g_return_val_if_fail(value != NULL, NULL);
    val = (vcardstrarray *)i_cal_object_get_native((ICalObject *)value);
    if (val == NULL) {
        return NULL;
    }
    return i_cal_vcard_value_new_full(vcardvalue_new_textlist(vcardstrarray_clone(val)), NULL);
}

/**
 * i_cal_vcard_value_get_textlist:
 * @self: the #ICalVcardValue of TEXTLIST
 *
 * Gets the value of the @self of TEXTLIST.
 *
 * Note: this returns copy of the string array, not the one
 * stored in the @self
 *
 * Returns: (transfer full): the #ICalVcardStrArray value of the @self
 *
 * Since: 4.0
 *
 **/
ICalVcardStrArray *
i_cal_vcard_value_get_textlist (const ICalVcardValue *self)
{
    vcardstrarray *val;
    g_return_val_if_fail(self != NULL, NULL);
    val = vcardvalue_get_textlist((vcardvalue *)i_cal_object_get_native((ICalObject *)self));
    if (val == NULL) {
        return NULL;
    }
    return i_cal_vcard_str_array_new_full(vcardstrarray_clone(val), NULL);
}

/**
 * i_cal_vcard_value_set_textlist:
 * @self: the #ICalVcardValue of TEXTLIST
 * @value: the string array value
 *
 * Sets the value of the @self of TEXTLIST.
 *
 * Note: this uses a copy of the string array, not the one
 * stored in the @value
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_textlist (ICalVcardValue *self, 
                                const ICalVcardStrArray *value)
{
    g_return_if_fail(self != NULL);
    vcardvalue_set_textlist((vcardvalue *)i_cal_object_get_native((ICalObject *)self),
        vcardstrarray_clone((vcardstrarray *)i_cal_object_get_native((ICalObject *)value)));
}

/**
 * i_cal_vcard_value_new_time:
 * @value: the #ICalVcardTime value
 *
 * Creates a new #ICalVcardValue holding TIME.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding TIME
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_time (const ICalVcardTime *value)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_TIME ((ICalVcardTime*)value), NULL);

	return i_cal_vcard_value_new_full (vcardvalue_new_time (* (vcardtimetype *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)value))), NULL);
}

/**
 * i_cal_vcard_value_get_time:
 * @self: the #ICalVcardValue of TIME
 *
 * Returns value of the TIME @self
 *
 * Returns: (transfer full): the TIME value
 *
 * Since: 4.0
 *
 **/
ICalVcardTime *
i_cal_vcard_value_get_time (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), NULL);

	return i_cal_vcard_time_new_full (vcardvalue_get_time ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self))));
}

/**
 * i_cal_vcard_value_set_time:
 * @self: the #ICalVcardValue of TIME
 * @value: the TIME value
 *
 * Sets value to the TIME @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_time (ICalVcardValue *self, 
                            const ICalVcardTime *value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));
    g_return_if_fail (I_CAL_VCARD_IS_TIME ((ICalVcardTime*)value));

	vcardvalue_set_time ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), * (vcardtimetype *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)value)));
}

/**
 * i_cal_vcard_value_new_timestamp:
 * @value: the #ICalVcardTime value
 *
 * Creates a new #ICalVcardValue holding TIMESTAMP.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding TIMESTAMP
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_timestamp (const ICalVcardTime *value)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_TIME ((ICalVcardTime*)value), NULL);

	return i_cal_vcard_value_new_full (vcardvalue_new_timestamp (* (vcardtimetype *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)value))), NULL);
}

/**
 * i_cal_vcard_value_get_timestamp:
 * @self: the #ICalVcardValue of TIMESTAMP
 *
 * Returns value of the TIMESTAMP @self
 *
 * Returns: (transfer full): the TIMESTAMP value
 *
 * Since: 4.0
 *
 **/
ICalVcardTime *
i_cal_vcard_value_get_timestamp (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), NULL);

	return i_cal_vcard_time_new_full (vcardvalue_get_timestamp ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self))));
}

/**
 * i_cal_vcard_value_set_timestamp:
 * @self: the #ICalVcardValue of TIMESTAMP
 * @value: the TIMESTAMP value
 *
 * Sets value to the TIMESTAMP @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_timestamp (ICalVcardValue *self, 
                                 const ICalVcardTime *value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));
    g_return_if_fail (I_CAL_VCARD_IS_TIME ((ICalVcardTime*)value));

	vcardvalue_set_timestamp ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), * (vcardtimetype *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)value)));
}

/**
 * i_cal_vcard_value_new_uri:
 * @value: the text value
 *
 * Creates a new #ICalVcardValue holding URI.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding URI
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_uri (const gchar *value)
{
    g_return_val_if_fail (value != NULL, NULL);

	return i_cal_vcard_value_new_full (vcardvalue_new_uri (value), NULL);
}

/**
 * i_cal_vcard_value_get_uri:
 * @self: the #ICalVcardValue of URI
 *
 * Returns value of the URI @self
 *
 * Returns: the URI value
 *
 * Since: 4.0
 *
 **/
const gchar *
i_cal_vcard_value_get_uri (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), NULL);

	return vcardvalue_get_uri ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)));
}

/**
 * i_cal_vcard_value_set_uri:
 * @self: the #ICalVcardValue of URI
 * @value: the URI value
 *
 * Sets value to the URI @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_uri (ICalVcardValue *self, 
                           const gchar *value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));
    g_return_if_fail (value != NULL);

	vcardvalue_set_uri ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), value);
}

/**
 * i_cal_vcard_value_new_utcoffset:
 * @value: the integer value
 *
 * Creates a new #ICalVcardValue holding UTCOFFSET.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding UTCOFFSET
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_utcoffset (gint value)
{
	return i_cal_vcard_value_new_full (vcardvalue_new_utcoffset (value), NULL);
}

/**
 * i_cal_vcard_value_get_utcoffset:
 * @self: the #ICalVcardValue of UTCOFFSET
 *
 * Returns value of the UTCOFFSET @self
 *
 * Returns: the UTCOFFSET value
 *
 * Since: 4.0
 *
 **/
gint
i_cal_vcard_value_get_utcoffset (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), 0);

	return vcardvalue_get_utcoffset ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)));
}

/**
 * i_cal_vcard_value_set_utcoffset:
 * @self: the #ICalVcardValue of UTCOFFSET
 * @value: the UTCOFFSET value
 *
 * Sets value to the UTCOFFSET @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_utcoffset (ICalVcardValue *self, 
                                 gint value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));

	vcardvalue_set_utcoffset ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), value);
}

/**
 * i_cal_vcard_value_new_version:
 * @value: the #ICalVcardPropertyVersion value
 *
 * Creates a new #ICalVcardValue holding VERSION.
 *
 * Returns: (transfer full): a new #ICalVcardValue holding VERSION
 *
 * Since: 4.0
 *
 **/
ICalVcardValue *
i_cal_vcard_value_new_version (ICalVcardPropertyVersion value)
{
	return i_cal_vcard_value_new_full (vcardvalue_new_version ((vcardproperty_version) (value)), NULL);
}

/**
 * i_cal_vcard_value_get_version:
 * @self: the #ICalVcardValue of VERSION
 *
 * Returns value of the VERSION @self
 *
 * Returns: the VERSION value
 *
 * Since: 4.0
 *
 **/
ICalVcardPropertyVersion
i_cal_vcard_value_get_version (const ICalVcardValue *self)
{
    g_return_val_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self), I_CAL_VCARD_VERSION_NONE);

	return (ICalVcardPropertyVersion) (vcardvalue_get_version ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self))));
}

/**
 * i_cal_vcard_value_set_version:
 * @self: the #ICalVcardValue of VERSION
 * @value: the VERSION value
 *
 * Sets value to the VERSION @self
 *
 * Since: 4.0
 *
 **/
void
i_cal_vcard_value_set_version (ICalVcardValue *self, 
                               ICalVcardPropertyVersion value)
{
    g_return_if_fail (I_CAL_VCARD_IS_VALUE ((ICalVcardValue*)self));

	vcardvalue_set_version ((vcardvalue *)i_cal_object_get_native (I_CAL_OBJECT ((ICalObject *)self)), (vcardproperty_version) (value));
}
