4 * vNote implementation for Citadel
6 * Copyright (C) 1999-2007 by the citadel.org development team.
7 * This code is freely redistributable under the terms of the GNU General
8 * Public License. All other rights reserved.
18 #if TIME_WITH_SYS_TIME
19 # include <sys/time.h>
23 # include <sys/time.h>
34 #include <libcitadel.h>
37 /* move this into the header file when we're done */
38 #define CTDL_VNOTE_MAGIC 0xa1fa
44 struct vnote *vnote_new(void) {
47 v = (struct vnote *) malloc(sizeof(struct vnote));
49 memset(v, 0, sizeof(struct vnote));
50 v->magic = CTDL_VNOTE_MAGIC;
55 struct vnote *vnote_new_from_str(char *s) {
61 /* FIXME finish this */
64 void vnote_free(struct vnote *v) {
66 if (v->magic != CTDL_VNOTE_MAGIC) return;
68 memset(v, 0, sizeof(struct vnote));
73 #ifdef VNOTE_TEST_HARNESS
78 "PRODID://Bynari Insight Connector 3.1.3-0605191//Import from Outlook//EN\n"
80 "UID:040000008200E00074C5B7101A82E00800000000000000000000000000820425CE8571864B8D141CB3FB8CAC62\n"
81 "NOTE;ENCODING=QUOTED-PRINTABLE:blah blah blah=0D=0A=0D=0A\n"
82 "SUMMARY:blah blah blah=0D=0A=0D=0A\n"
83 "X-OUTLOOK-COLOR:#FFFF00\n"
84 "X-OUTLOOK-WIDTH:200\n"
85 "X-OUTLOOK-HEIGHT:166\n"
88 "X-OUTLOOK-CREATE-TIME:20070611T204615Z\n"
89 "REV:20070611T204621Z\n"
96 "UID:20061129111109.7chx73xdok1s at 172.16.45.2\n"
98 "DCREATED:20061129T101109Z\n"
104 struct vnote *v = vnote_new_from_str(bynari_sample);