]>
Commit | Line | Data |
---|---|---|
aa039bee MR |
1 | /* |
2 | * vcard-parser.h | |
3 | * | |
4 | * Copyright 2019 Michael Rasmussen <mir@datanom.net> | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation; either version 2 of the License, or | |
9 | * (at your option) any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | * GNU General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program; if not, write to the Free Software | |
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
19 | * MA 02110-1301, USA. | |
20 | */ | |
21 | ||
22 | #ifndef __VCARD_H__ | |
23 | #define __VCARD_H__ | |
24 | ||
25 | #include <glib.h> | |
26 | ||
27 | G_BEGIN_DECLS | |
28 | ||
29 | typedef enum { | |
30 | // vCard 2.1 properties and up | |
31 | N = 0, | |
32 | FN, | |
33 | PHOTO, | |
34 | BDAY, | |
35 | ADR, | |
36 | LABEL, // Removed in vCard 4.0 | |
37 | TEL, | |
38 | EMAIL, | |
39 | MAILER, // Removed in vCard 4.0 | |
40 | GEO, | |
41 | TITLE, | |
42 | ROLE, | |
43 | LOGO, | |
44 | ORG, | |
45 | NOTE, | |
46 | REV, | |
47 | SOUND, | |
48 | URL, | |
49 | UID, | |
50 | VERSION, | |
51 | KEY, | |
52 | TZ, | |
53 | // vCard 3.0 properties | |
54 | CATEGORIES, | |
55 | SORT_STRING, | |
56 | PRODID, | |
57 | NICKNAME, | |
58 | CLASS, // Removed in vCard 4.0 | |
59 | // rfc2739 properties | |
60 | FBURL, | |
61 | CAPURI, | |
62 | CALURI, | |
63 | CALADRURI, | |
64 | // rfc4770 properties | |
65 | IMPP, | |
66 | // vCard 4.0 properties | |
67 | SOURCE, | |
68 | XML, | |
69 | ANNIVERSARY, | |
70 | CLIENTPIDMAP, | |
71 | LANG, | |
72 | GENDER, | |
73 | KIND, | |
74 | MEMBER, | |
75 | RELATED, | |
76 | // rfc6474 properties | |
77 | BIRTHPLACE, | |
78 | DEATHPLACE, | |
79 | DEATHDATE, | |
80 | // rfc6715 properties | |
81 | EXPERTISE, | |
82 | HOBBY, | |
83 | INTEREST, | |
84 | ORG_DIRECTORY, | |
85 | VCARD_PROPERTIES, | |
86 | } Property; | |
87 | ||
88 | gchar* Proterties[VCARD_PROPERTIES+1] = { | |
89 | "N", | |
90 | "FN", | |
91 | "PHOTO", | |
92 | "BDAY", | |
93 | "ADR", | |
94 | "LABEL", | |
95 | "TEL", | |
96 | "EMAIL", | |
97 | "MAILER", | |
98 | "GEO", | |
99 | "TITLE", | |
100 | "ROLE", | |
101 | "LOGO", | |
102 | "ORG", | |
103 | "NOTE", | |
104 | "REV", | |
105 | "SOUND", | |
106 | "URL", | |
107 | "UID", | |
108 | "VERSION", | |
109 | "KEY", | |
110 | "TZ", | |
111 | "CATEGORIES", | |
112 | "SORT-STRING", | |
113 | "PRODID", | |
114 | "NICKNAME", | |
115 | "CLASS", | |
116 | "FBURL", | |
117 | "CAPURI", | |
118 | "CALURI", | |
119 | "CALADRURI", | |
120 | "IMPP", | |
121 | "SOURCE", | |
122 | "XML", | |
123 | "ANNIVERSARY", | |
124 | "CLIENTPIDMAP", | |
125 | "LANG", | |
126 | "GENDER", | |
127 | "KIND", | |
128 | "MEMBER", | |
129 | "RELATED", | |
130 | "BIRTHPLACE", | |
131 | "DEATHPLACE", | |
132 | "DEATHDATE", | |
133 | "EXPERTISE", | |
134 | "HOBBY", | |
135 | "INTEREST", | |
136 | "ORG-DIRECTORY", | |
137 | NULL | |
138 | }; | |
139 | ||
140 | G_END_DECLS | |
141 | ||
142 | gboolean vcard_parse_text(); | |
143 | ||
144 | #endif |