Move vcard.c into libcitadel.
[citadel.git] / libcitadel / lib / libcitadel.h
index 99a3a27fb39f6adf3234a02fa88a2d04a62193ec..62d3a4f29afc95d484bc52b3c80d101aa885cfc7 100644 (file)
@@ -189,3 +189,30 @@ int is_msg_in_mset(char *mset, long msgnum);
 int pattern2(char *search, char *patn);
 void stripltlen(char *, int *);
 
+
+
+/* vCard stuff */
+
+#define CTDL_VCARD_MAGIC       0xa1f9
+
+/* This data structure represents a vCard object currently in memory. */
+struct vCard {
+       int magic;
+       int numprops;
+       struct vCardProp {
+               char *name;
+               char *value;
+       } *prop;
+};
+
+
+struct vCard *vcard_new(void);
+void vcard_add_prop(struct vCard *v, char *propname, char *propvalue);
+struct vCard *vcard_load(char *);
+void vcard_free(struct vCard *);
+void vcard_set_prop(struct vCard *v, char *name, char *value, int append);
+char *vcard_get_prop(struct vCard *v, char *propname, int is_partial,
+                       int instance, int return_propname);
+char *vcard_serialize(struct vCard *);
+void vcard_fn_to_n(char *vname, char *n, size_t vname_size);
+void remove_charset_attribute(char *strbuf);