summaryrefslogtreecommitdiff
path: root/src/libical/icalattachimpl.h
blob: 7ca144418a9eb4af7536069b95d72f846255f417 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*======================================================================
 FILE: icalattachimpl.h
 CREATOR: acampi 28 May 02

 SPDX-FileCopyrightText: 2000, Andrea Campi <a.campi@inet.it>

 SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0

======================================================================*/

#ifndef ICALATTACHIMPL_H
#define ICALATTACHIMPL_H

#include "icalattach.h"

/* Private structure for ATTACH values */
struct icalattach_impl
{
    /* Reference count */
    int refcount;

    union
    {
        /* URL attachment data */
        struct
        {
            char *url;
        } url;

        /* Inline data */
        struct
        {
            char *data;
            icalattach_free_fn_t free_fn;
            void *free_fn_data;
        } data;
    } u;

    /* TRUE if URL, FALSE if inline data */
    unsigned int is_url:1;
};

#endif