4 * Handles editing of vCard objects.
16 #include <sys/types.h>
18 #include <sys/socket.h>
21 #include <netinet/in.h>
34 void edit_vcard(void) {
36 char *serialized_vcard = NULL;
45 sprintf(buf, "OPNA %s|%s", bstr("msgnum"), bstr("partnum") );
53 total_len = atoi(&buf[4]);
54 serialized_vcard = malloc(total_len + 1);
55 while (bytes < total_len) {
57 if ((total_len - bytes) < thisblock) thisblock = total_len - bytes;
58 sprintf(buf, "READ %d|%d", bytes, thisblock);
62 thisblock = atoi(&buf[4]);
63 serv_read(&serialized_vcard[bytes], thisblock);
67 wprintf("Error: %s<BR>\n", &buf[4]);
73 serialized_vcard[total_len + 1] = 0;
75 v = vcard_load(serialized_vcard);
76 free(serialized_vcard);
78 wprintf("<BLINK> FIXME </BLINK><BR><BR>\n"
79 "This needs to be implemented as an editable form.<BR><BR>\n");
82 while (prop = vcard_get_prop(v, "", 0, i++), prop != NULL) {