$darkmode
Libical API Documentation 4.0 STABLE VERSION Visit the v3.0 documentation
vcardstructured.h
Go to the documentation of this file.
1 /*======================================================================
2  FILE: vcardstructured.h
3  CREATOR: Ken Murchison 24 Aug 2022
4 
5  SPDX-FileCopyrightText: 2022, Fastmail Pty. Ltd. (https://fastmail.com)
6  SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
7  ======================================================================*/
8 
14 #ifndef VCARDSTRUCTURED_H
15 #define VCARDSTRUCTURED_H
16 
17 #include "libical_vcard_export.h"
18 #include "vcardstrarray.h"
19 
20 #include <stdbool.h>
21 
42 typedef struct vcardstructuredtype_impl vcardstructuredtype;
43 
53 LIBICAL_VCARD_EXPORT vcardstructuredtype *vcardstructured_new(size_t num_fields);
54 
64 LIBICAL_VCARD_EXPORT vcardstructuredtype *vcardstructured_new_from_string(const char *s);
65 
79 LIBICAL_VCARD_EXPORT vcardstructuredtype *vcardstructured_clone(const vcardstructuredtype *st);
80 
89 LIBICAL_VCARD_EXPORT size_t vcardstructured_num_fields(const vcardstructuredtype *st);
90 
102 LIBICAL_VCARD_EXPORT void vcardstructured_set_num_fields(vcardstructuredtype *st, size_t num_fields);
103 
114 LIBICAL_VCARD_EXPORT vcardstrarray *vcardstructured_field_at(const vcardstructuredtype *st, size_t position);
115 
129 LIBICAL_VCARD_EXPORT void vcardstructured_set_field_at(vcardstructuredtype *st, size_t position, vcardstrarray *field);
130 
140 LIBICAL_VCARD_EXPORT char *vcardstructured_as_vcard_string_r(const vcardstructuredtype *st, bool is_param);
141 
156 LIBICAL_VCARD_EXPORT void vcardstructured_ref(vcardstructuredtype *st);
157 
174 LIBICAL_VCARD_EXPORT void vcardstructured_unref(vcardstructuredtype *st);
175 
176 #endif /* VCARDSTRUCTURED_H */
char * vcardstructured_as_vcard_string_r(const vcardstructuredtype *st, bool is_param)
Formats a vcardstructuredtype as a vCard property or parameter value.
Definition: vcardvalue.c:780
struct vcardstructuredtype_impl vcardstructuredtype
Represents a decoded, structured text value.
Namespace the icalstrarray functions for vcard.
void vcardstructured_set_field_at(vcardstructuredtype *st, size_t position, vcardstrarray *field)
Sets the field at the given position in a vcardstructuredtype.
void vcardstructured_ref(vcardstructuredtype *st)
Increments the reference count of the vcardstructuredtype.
vcardstructuredtype * vcardstructured_new(size_t num_fields)
Creates a new instance of vcardstructuredtype.
void vcardstructured_unref(vcardstructuredtype *st)
Decrements the reference count of the vcardstructuredtype.
vcardstrarray * vcardstructured_field_at(const vcardstructuredtype *st, size_t position)
Returns the field at the given position in a vcardstructuredtype.
vcardstructuredtype * vcardstructured_clone(const vcardstructuredtype *st)
Clones a vcardstructuredtype.
vcardstructuredtype * vcardstructured_new_from_string(const char *s)
Creates a new instance of vcardstructuredtype from a string.
size_t vcardstructured_num_fields(const vcardstructuredtype *st)
Returns the number of fields in a vcardstructuredtype.
void vcardstructured_set_num_fields(vcardstructuredtype *st, size_t num_fields)
Sets the number of fields in a vcardstructuredtype.