* add strbuf wrapper arround vcard parser
authorWilfried Göesgens <willi@citadel.org>
Sat, 25 Apr 2009 13:30:59 +0000 (13:30 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sat, 25 Apr 2009 13:30:59 +0000 (13:30 +0000)
libcitadel/lib/libcitadel.h
libcitadel/lib/vcard.c

index fe8e0d09aa5f535ea3aa1a6ad959ea3ed009cd72..eb3a5e362c256368eb76be1d7c14cec5bb7bbf52 100644 (file)
@@ -391,7 +391,9 @@ struct vCard {
 
 struct vCard *vcard_new(void);
 void vcard_add_prop(struct vCard *v, char *propname, char *propvalue);
-struct vCard *vcard_load(char *);
+struct vCard *vcard_load(char *vtext);
+struct vCard *VCardLoad(StrBuf *vbtext);
+
 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,
index 2c8a7b65f06047ea1a46a9ec6d9297ac06d85364..8acef10586a3548dce2d21fd158a646b257d9b0a 100644 (file)
@@ -91,7 +91,12 @@ void vcard_add_prop(struct vCard *v, char *propname, char *propvalue) {
        v->prop[v->numprops-1].value = strdup(propvalue);
 }
 
-
+/*
+ * Constructor - returns a new struct vcard given a serialized vcard
+ */
+struct vCard *VCardLoad(StrBuf *vbtext) {
+       return vcard_load((char*)ChrPtr(vbtext));
+}
 
 /*
  * Constructor - returns a new struct vcard given a serialized vcard