@LINK=silcutil.html:SILC Util Interface
@LINK=silclist.html:SILC List Interface
@LINK=silcdlist.html:SILC Dynamic List Interface
+@LINK=silcvcard.html:SILC VCard Interface
@LINK=silczip.html:SILC Zip API
-->
GNU General Public License for more details.
*/
+/* $Id$ */
/* Implementation of the VCard (RFC 2426) */
#include "silcincludes.h"
/* Encode VCard */
-char *silc_vcard_encode(SilcVCard vcard, SilcUInt32 *vcard_len)
+unsigned char *silc_vcard_encode(SilcVCard vcard, SilcUInt32 *vcard_len)
{
SilcBufferStruct buffer;
int i;
return buffer.head;
}
+/* Take one token */
#define VCARD_TOKEN(x) \
if (!(x)) { \
(x) = silc_memdup(val + off, i - off); \
continue; \
}
+/* Take on TYPE= token and prepare for next token */
#define VCARD_TYPETOKEN(x) \
if (!(x)) { \
int tmpi; \
i = tmpi; \
}
+/* Take last token */
#define VCARD_LASTTOKEN(x) \
if (!(x)) { \
if (off < len) \
break;
}
}
+ /* It's possible to have ORG without last ';', so check for it */
if (!vcard->org_name) {
VCARD_LASTTOKEN(vcard->org_name);
} else {
char *bday; /* birth day, UTC date string */
char *title; /* job title X.520, string */
char *role; /* job role X.520, string */
- char *org_name; /* organization name */
- char *org_unit; /* organization unit */
+ char *org_name; /* organization name, string */
+ char *org_unit; /* organization unit, string */
char *categories; /* application category, string */
char *class; /* class (public, private, confidental), string */
char *url; /* home page, URI string */
* buffer. Returns NULL on error.
*
***/
-char *silc_vcard_encode(SilcVCard vcard, SilcUInt32 *vcard_len);
+unsigned char *silc_vcard_encode(SilcVCard vcard, SilcUInt32 *vcard_len);
/****f* silcutil/SilcVCard/silc_vcard_decode
*