insert_event #1

Merged
bjoernf merged 16 commits from insert_event into master 2023-09-09 08:26:50 +02:00
2 changed files with 14 additions and 0 deletions
Showing only changes of commit c6da11c540 - Show all commits

View File

@ -25,6 +25,9 @@ DTSTART;TZID=/freeassociation.sourceforge.net/Europe/Berlin:
DTEND;TZID=/freeassociation.sourceforge.net/Europe/Berlin: DTEND;TZID=/freeassociation.sourceforge.net/Europe/Berlin:
20230914T040000 20230914T040000
SEQUENCE is the number of times the event was modified.
Evolution sets this to 2 after it has been generated.
Appointments include the continent and city of the used time zone. Appointments include the continent and city of the used time zone.
"DESCRIPTION:" is an optional field. "DESCRIPTION:" is an optional field.

View File

@ -62,7 +62,18 @@ void insert_event(char *file_name) {
write(myfd, "\r\n", strlen("\r\n")); write(myfd, "\r\n", strlen("\r\n"));
write(myfd, dtstart_buffer, strlen(dtstart_buffer)); write(myfd, dtstart_buffer, strlen(dtstart_buffer));
write(myfd, dtend_buffer, strlen(dtend_buffer)); write(myfd, dtend_buffer, strlen(dtend_buffer));
write(myfd, "SEQUENCE:2\r\n", strlen("SEQUENCE:2\r\n"));
write(myfd, summary_buf, strlen(summary_buf)); write(myfd, summary_buf, strlen(summary_buf));
write(myfd, "TRANSP:OPAQUE\r\n", strlen("TRANSP:OPAQUE\r\n"));
write(myfd, "CLASS:PUBLIC\r\n", strlen("CLASS:PUBLIC\r\n"));
write(myfd, "CREATED:", strlen("CREATED:"));
write(myfd, dtstamp, strlen(dtstamp));
write(myfd, "\r\n", strlen("\r\n"));
write(myfd, "LAST-MODIFIED:", strlen("LAST-MODIFIED:"));
write(myfd, dtstamp, strlen(dtstamp));
write(myfd, "\r\n", strlen("\r\n"));
write(myfd, "END:VEVENT\r\n", strlen("END:VEVENT\r\n"));
write(myfd, "END:VCALENDAR\r\n", strlen("END:VCALENDAR\r\n")); write(myfd, "END:VCALENDAR\r\n", strlen("END:VCALENDAR\r\n"));
close(myfd); close(myfd);