diff options
Diffstat (limited to 'src/libical/icalcomponent.h')
-rw-r--r-- | src/libical/icalcomponent.h | 54 |
1 files changed, 35 insertions, 19 deletions
diff --git a/src/libical/icalcomponent.h b/src/libical/icalcomponent.h index e0501bca..ac0828f0 100644 --- a/src/libical/icalcomponent.h +++ b/src/libical/icalcomponent.h @@ -2,18 +2,10 @@ FILE: icalcomponent.h CREATOR: eric 20 March 1999 - (C) COPYRIGHT 2000, Eric Busboom <eric@civicknowledge.com> + SPDX-FileCopyrightText: 2000, Eric Busboom <eric@civicknowledge.com> - This library is free software; you can redistribute it and/or modify - it under the terms of either: + SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0 - The LGPL as published by the Free Software Foundation, version - 2.1, available at: https://www.gnu.org/licenses/lgpl-2.1.html - - Or: - - The Mozilla Public License Version 2.0. You may obtain a copy of - the License at https://www.mozilla.org/MPL/ ======================================================================*/ /** @@ -23,6 +15,7 @@ #ifndef ICALCOMPONENT_H #define ICALCOMPONENT_H +#include "libical_deprecated.h" #include "libical_ical_export.h" #include "icalenums.h" /* Defines icalcomponent_kind */ #include "icalproperty.h" @@ -43,9 +36,12 @@ typedef struct icalcompiter */ LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new(icalcomponent_kind kind); -/** @brief Constructor +/** + * @brief Deeply clones an icalcomponent. + * Returns a pointer to the memory for the newly cloned icalcomponent. + * @since 3.1.0 */ -LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_clone(icalcomponent *component); +LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_clone(const icalcomponent *component); /** @brief Constructor */ @@ -75,9 +71,25 @@ LIBICAL_ICAL_EXPORT icalcomponent_kind icalcomponent_isa(const icalcomponent *co LIBICAL_ICAL_EXPORT int icalcomponent_isa_component(void *component); -/* - * Working with properties +/* Deal with X components */ + +LIBICAL_ICAL_EXPORT void icalcomponent_set_x_name(icalcomponent *comp, const char *name); +LIBICAL_ICAL_EXPORT const char *icalcomponent_get_x_name(icalcomponent *comp); + +/** Returns the name of the component -- the type name converted to a + * string, or the value of _get_x_name if the type is and X component */ +LIBICAL_ICAL_EXPORT const char *icalcomponent_get_component_name(const icalcomponent *comp); +LIBICAL_ICAL_EXPORT char *icalcomponent_get_component_name_r(const icalcomponent *comp); + +/** + * @copydoc icalcomponent_clone() + * @deprecated Use icalcomponent_clone() instead + */ +LIBICAL_ICAL_EXPORT LIBICAL_DEPRECATED(icalcomponent *icalcomponent_new_clone( + icalcomponent *component)); + +/***** Working with Properties *****/ LIBICAL_ICAL_EXPORT void icalcomponent_add_property(icalcomponent *component, icalproperty *property); @@ -108,9 +120,7 @@ LIBICAL_ICAL_EXPORT icalproperty *icalcomponent_get_first_property(icalcomponent LIBICAL_ICAL_EXPORT icalproperty *icalcomponent_get_next_property(icalcomponent *component, icalproperty_kind kind); -/* - * Working with components - */ +/***** Working with Components *****/ /** Return the first VEVENT, VTODO or VJOURNAL sub-component of cop, or comp if it is one of those types */ @@ -158,7 +168,7 @@ LIBICAL_ICAL_EXPORT icalcomponent *icalcompiter_prior(icalcompiter * i); LIBICAL_ICAL_EXPORT icalcomponent *icalcompiter_deref(icalcompiter * i); -/* Working with embedded error properties */ +/***** Working with embedded error properties *****/ /* Check the component against itip rules and insert error properties*/ /* Working with embedded error properties */ @@ -205,7 +215,7 @@ LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_get_first_real_component(icalco /** @brief Gets the timespan covered by this component, in UTC. * * See icalcomponent_foreach_recurrence() for a better way to - * extract spans from an component. + * extract spans from a component. * * This method can be called on either a VCALENDAR or any real * component. If the VCALENDAR contains no real component, but @@ -519,4 +529,10 @@ LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vpatch(void); LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_xpatch(void); +LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_participant(void); + +LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vlocation(void); + +LIBICAL_ICAL_EXPORT icalcomponent *icalcomponent_new_vresource(void); + #endif /* !ICALCOMPONENT_H */ |