Libical API Documentation 4.0 UNRELEASED Go to the stable 3.0 documentation
Loading...
Searching...
No Matches
icalproperty.h
Go to the documentation of this file.
1/*======================================================================
2 FILE: icalproperty.h
3 CREATOR: eric 20 March 1999
4
5 SPDX-FileCopyrightText: 2000, Eric Busboom <eric@civicknowledge.com>
6 SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
7======================================================================*/
8
13
14#ifndef ICALPROPERTY_H
15#define ICALPROPERTY_H
16
17#include "libical_ical_export.h"
18#include "icalderivedproperty.h" /* To get icalproperty_kind enumerations */
19
20#include <stdarg.h> /* for va_... */
21
23/* This is exposed so that callers will not have to allocate and
24 * deallocate iterators. Pretend that you can't see it. */
25struct icalpvl_elem_t;
26typedef struct icalparamiter {
27 icalparameter_kind kind;
28 struct icalpvl_elem_t *iter;
29} icalparamiter;
31
41LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new(icalproperty_kind kind);
42
51LIBICAL_ICAL_EXPORT icalproperty *icalproperty_clone(const icalproperty *old);
52
61LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new_from_string(const char *str);
62
73LIBICAL_ICAL_EXPORT const char *icalproperty_as_ical_string(icalproperty *prop);
74
85LIBICAL_ICAL_EXPORT char *icalproperty_as_ical_string_r(icalproperty *prop);
86
92LIBICAL_ICAL_EXPORT void icalproperty_free(icalproperty *prop);
93
102LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_isa(const icalproperty *property);
103
113LIBICAL_ICAL_EXPORT bool icalproperty_isa_property(void *property);
114
127LIBICAL_ICAL_EXPORT void icalproperty_add_parameters(icalproperty *prop, va_list args);
128
137LIBICAL_ICAL_EXPORT void icalproperty_add_parameter(icalproperty *prop, icalparameter *parameter);
138
150LIBICAL_ICAL_EXPORT void icalproperty_set_parameter(icalproperty *prop, icalparameter *parameter);
151
164LIBICAL_ICAL_EXPORT void icalproperty_set_parameter_from_string(icalproperty *prop,
165 const char *name,
166 const char *value);
167
180LIBICAL_ICAL_EXPORT const char *icalproperty_get_parameter_as_string(icalproperty *prop,
181 const char *name);
182
195LIBICAL_ICAL_EXPORT char *icalproperty_get_parameter_as_string_r(icalproperty *prop,
196 const char *name);
197
207LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_kind(icalproperty *prop,
208 icalparameter_kind kind);
209
223LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_name(icalproperty *prop,
224 const char *name);
225
234LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_ref(icalproperty *prop,
235 icalparameter *param);
236
245LIBICAL_ICAL_EXPORT int icalproperty_count_parameters(const icalproperty *prop);
246
247/* Iterate through the parameters */
248
260LIBICAL_ICAL_EXPORT icalparameter *icalproperty_get_first_parameter(icalproperty *prop,
261 icalparameter_kind kind);
262
273LIBICAL_ICAL_EXPORT icalparameter *icalproperty_get_next_parameter(icalproperty *prop,
274 icalparameter_kind kind);
275
276/* Access the value of the property */
277
286LIBICAL_ICAL_EXPORT void icalproperty_set_value(icalproperty *prop, icalvalue *value);
287
301LIBICAL_ICAL_EXPORT void icalproperty_set_value_from_string(icalproperty *prop, const char *str,
302 const char *type);
303
312LIBICAL_ICAL_EXPORT icalvalue *icalproperty_get_value(const icalproperty *prop);
313
324LIBICAL_ICAL_EXPORT const char *icalproperty_get_value_as_string(const icalproperty *prop);
325
336LIBICAL_ICAL_EXPORT char *icalproperty_get_value_as_string_r(const icalproperty *prop);
337
344LIBICAL_ICAL_EXPORT void icalvalue_set_parent(icalvalue *value, icalproperty *property);
345
354LIBICAL_ICAL_EXPORT icalproperty *icalvalue_get_parent(const icalvalue *value);
355
356/* Deal with X properties */
357
364LIBICAL_ICAL_EXPORT void icalproperty_set_x_name(icalproperty *prop, const char *name);
365
376LIBICAL_ICAL_EXPORT const char *icalproperty_get_x_name(const icalproperty *prop);
377
378/* Deal with IANA properties */
379
387LIBICAL_ICAL_EXPORT void icalproperty_set_iana_name(icalproperty *prop, const char *name);
388
398LIBICAL_ICAL_EXPORT const char *icalproperty_get_iana_name(const icalproperty *prop);
399
412LIBICAL_ICAL_EXPORT const char *icalproperty_get_property_name(const icalproperty *prop);
413
426LIBICAL_ICAL_EXPORT char *icalproperty_get_property_name_r(const icalproperty *prop);
427
436LIBICAL_ICAL_EXPORT icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value);
437
446LIBICAL_ICAL_EXPORT void icalparameter_set_parent(icalparameter *param, icalproperty *property);
447
456LIBICAL_ICAL_EXPORT icalproperty *icalparameter_get_parent(const icalparameter *param);
457
458/* Convert kinds to string and get default value type */
459
468LIBICAL_ICAL_EXPORT icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);
469
478LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_value_kind_to_kind(icalvalue_kind kind);
479
488LIBICAL_ICAL_EXPORT const char *icalproperty_kind_to_string(icalproperty_kind kind);
489
500LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_string_to_kind(const char *string);
501
509LIBICAL_ICAL_EXPORT bool icalproperty_kind_is_valid(const icalproperty_kind kind);
510
521LIBICAL_ICAL_EXPORT icalproperty_method icalproperty_string_to_method(const char *str);
522
531LIBICAL_ICAL_EXPORT const char *icalproperty_method_to_string(icalproperty_method method);
532
544LIBICAL_ICAL_EXPORT const char *icalproperty_enum_to_string(int e);
545
557LIBICAL_ICAL_EXPORT char *icalproperty_enum_to_string_r(int e);
558
571LIBICAL_ICAL_EXPORT int icalproperty_kind_and_string_to_enum(const int kind, const char *str);
572
581LIBICAL_ICAL_EXPORT const char *icalproperty_status_to_string(icalproperty_status status);
582
592LIBICAL_ICAL_EXPORT icalproperty_status icalproperty_string_to_status(const char *string);
593
602LIBICAL_ICAL_EXPORT const char *icalproperty_action_to_string(icalproperty_action action);
603
613LIBICAL_ICAL_EXPORT icalproperty_action icalproperty_string_to_action(const char *string);
614
623LIBICAL_ICAL_EXPORT const char *icalproperty_transp_to_string(icalproperty_transp transp);
624
634LIBICAL_ICAL_EXPORT icalproperty_transp icalproperty_string_to_transp(const char *string);
635
644LIBICAL_ICAL_EXPORT const char *icalproperty_class_to_string(icalproperty_class propclass);
645
656LIBICAL_ICAL_EXPORT icalproperty_class icalproperty_string_to_class(const char *string);
657
666LIBICAL_ICAL_EXPORT const char *icalproperty_participanttype_to_string(icalproperty_participanttype participanttype);
667
677LIBICAL_ICAL_EXPORT icalproperty_participanttype icalproperty_string_to_participanttype(const char *string);
678
687LIBICAL_ICAL_EXPORT const char *icalproperty_resourcetype_to_string(icalproperty_resourcetype resourcetype);
688
698LIBICAL_ICAL_EXPORT icalproperty_resourcetype icalproperty_string_to_resourcetype(const char *string);
699
709LIBICAL_ICAL_EXPORT bool icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e);
710
718LIBICAL_ICAL_EXPORT void icalproperty_normalize(icalproperty *prop);
719
734LIBICAL_ICAL_EXPORT void icalproperty_set_allow_empty_properties(bool enable);
735
743LIBICAL_ICAL_EXPORT bool icalproperty_get_allow_empty_properties(void);
744
746LIBICAL_ICAL_EXPORT icalparamiter icalproperty_begin_parameter(icalproperty *property, icalparameter_kind kind);
747
748LIBICAL_ICAL_EXPORT icalparameter *icalparamiter_next(icalparamiter *i);
749
750LIBICAL_ICAL_EXPORT icalparameter *icalparamiter_deref(icalparamiter *i);
752
753#endif /*ICALPROPERTY_H */
icalvalue * icalproperty_get_value(const icalproperty *prop)
icalproperty_kind icalproperty_string_to_kind(const char *string)
icalproperty * icalvalue_get_parent(const icalvalue *value)
Definition icalvalue.c:1548
void icalproperty_add_parameters(icalproperty *prop, va_list args)
icalproperty * icalparameter_get_parent(const icalparameter *param)
icalproperty_class icalproperty_string_to_class(const char *string)
bool icalproperty_isa_property(void *property)
icalproperty_participanttype icalproperty_string_to_participanttype(const char *string)
icalproperty_kind icalproperty_isa(const icalproperty *property)
char * icalproperty_enum_to_string_r(int e)
void icalproperty_free(icalproperty *prop)
void icalproperty_remove_parameter_by_ref(icalproperty *prop, icalparameter *param)
Removes the specified parameter reference from the property.
char * icalproperty_as_ical_string_r(icalproperty *prop)
void icalproperty_set_parameter_from_string(icalproperty *prop, const char *name, const char *value)
char * icalproperty_get_property_name_r(const icalproperty *prop)
void icalproperty_set_allow_empty_properties(bool enable)
void icalproperty_remove_parameter_by_name(icalproperty *prop, const char *name)
Removes all parameters with the specified name.
bool icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e)
icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value)
int icalproperty_count_parameters(const icalproperty *prop)
icalparameter * icalproperty_get_first_parameter(icalproperty *prop, icalparameter_kind kind)
const char * icalproperty_get_value_as_string(const icalproperty *prop)
void icalproperty_remove_parameter_by_kind(icalproperty *prop, icalparameter_kind kind)
Removes all parameters with the specified kind.
const char * icalproperty_get_property_name(const icalproperty *prop)
bool icalproperty_get_allow_empty_properties(void)
icalproperty_method icalproperty_string_to_method(const char *str)
const char * icalproperty_as_ical_string(icalproperty *prop)
const char * icalproperty_enum_to_string(int e)
void icalproperty_set_value(icalproperty *prop, icalvalue *value)
char * icalproperty_get_parameter_as_string_r(icalproperty *prop, const char *name)
void icalproperty_normalize(icalproperty *prop)
icalproperty_resourcetype icalproperty_string_to_resourcetype(const char *string)
icalproperty_status icalproperty_string_to_status(const char *string)
void icalvalue_set_parent(icalvalue *value, icalproperty *property)
Definition icalvalue.c:1541
const char * icalproperty_resourcetype_to_string(icalproperty_resourcetype resourcetype)
const char * icalproperty_transp_to_string(icalproperty_transp transp)
char * icalproperty_get_value_as_string_r(const icalproperty *prop)
const char * icalproperty_action_to_string(icalproperty_action action)
icalproperty * icalproperty_clone(const icalproperty *old)
const char * icalproperty_get_x_name(const icalproperty *prop)
icalproperty_kind icalproperty_value_kind_to_kind(icalvalue_kind kind)
const char * icalproperty_class_to_string(icalproperty_class propclass)
icalproperty_transp icalproperty_string_to_transp(const char *string)
void icalproperty_set_parameter(icalproperty *prop, icalparameter *parameter)
const char * icalproperty_get_iana_name(const icalproperty *prop)
const char * icalproperty_method_to_string(icalproperty_method method)
icalproperty * icalproperty_new(icalproperty_kind kind)
void icalproperty_set_iana_name(icalproperty *prop, const char *name)
const char * icalproperty_status_to_string(icalproperty_status status)
int icalproperty_kind_and_string_to_enum(const int kind, const char *str)
icalproperty * icalproperty_new_from_string(const char *str)
const char * icalproperty_participanttype_to_string(icalproperty_participanttype participanttype)
icalproperty_action icalproperty_string_to_action(const char *string)
icalparameter * icalproperty_get_next_parameter(icalproperty *prop, icalparameter_kind kind)
void icalproperty_add_parameter(icalproperty *prop, icalparameter *parameter)
icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind)
void icalparameter_set_parent(icalparameter *param, icalproperty *property)
void icalproperty_set_value_from_string(icalproperty *prop, const char *str, const char *type)
const char * icalproperty_get_parameter_as_string(icalproperty *prop, const char *name)
void icalproperty_set_x_name(icalproperty *prop, const char *name)
bool icalproperty_kind_is_valid(const icalproperty_kind kind)
const char * icalproperty_kind_to_string(icalproperty_kind kind)