]> code.citadel.org Git - citadel.git/blobdiff - webcit/groupdav_get.c
* create function to parse the output of goto into our folder structure
[citadel.git] / webcit / groupdav_get.c
index 7977eb0933c9e49928a95bf2893989a3d6355abd..f3f99440537a7596593236f556e1ebc4f65926cc 100644 (file)
@@ -24,7 +24,7 @@ void groupdav_get_big_ics(void) {
                groupdav_common_headers();
                hprintf("Content-Type: text/plain\r\n");
                begin_burst();
-               wprintf("%s\r\n",
+               wc_printf("%s\r\n",
                        &buf[4]
                        );
                end_burst();
@@ -36,7 +36,7 @@ void groupdav_get_big_ics(void) {
        hprintf("Content-type: text/calendar; charset=UTF-8\r\n");
        begin_burst();
        while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
-               wprintf("%s\r\n", buf);
+               wc_printf("%s\r\n", buf);
        }
        end_burst();
 }
@@ -112,7 +112,7 @@ void groupdav_get(void)
                hprintf("HTTP/1.1 404 not found\r\n");
                groupdav_common_headers();
                hprintf("Content-Type: text/plain\r\n");
-               wprintf("The object you requested was not found.\r\n");
+               wc_printf("The object you requested was not found.\r\n");
                end_burst();
                return;
        }
@@ -127,14 +127,14 @@ void groupdav_get(void)
        }
 
        /* Go to the correct room. */
-       if (strcasecmp(ChrPtr(WCC->wc_roomname), ChrPtr(dav_roomname))) {
+       if (strcasecmp(ChrPtr(WCC->CurRoom.name), ChrPtr(dav_roomname))) {
                gotoroom(dav_roomname);
        }
-       if (strcasecmp(ChrPtr(WCC->wc_roomname), ChrPtr(dav_roomname))) {
+       if (strcasecmp(ChrPtr(WCC->CurRoom.name), ChrPtr(dav_roomname))) {
                hprintf("HTTP/1.1 404 not found\r\n");
                groupdav_common_headers();
                hprintf("Content-Type: text/plain\r\n");
-               wprintf("There is no folder called \"%s\" on this server.\r\n",
+               wc_printf("There is no folder called \"%s\" on this server.\r\n",
                        ChrPtr(dav_roomname));
                end_burst();
                FreeStrBuf(&dav_roomname);
@@ -158,7 +158,7 @@ void groupdav_get(void)
                hprintf("HTTP/1.1 404 not found\r\n");
                groupdav_common_headers();
                hprintf("Content-Type: text/plain\r\n");
-               wprintf("Object \"%s\" was not found in the \"%s\" folder.\r\n",
+               wc_printf("Object \"%s\" was not found in the \"%s\" folder.\r\n",
                        ChrPtr(dav_uid),
                        ChrPtr(dav_roomname));
                end_burst();
@@ -230,11 +230,11 @@ void groupdav_get(void)
         */
        if (!strncasecmp(content_type, "multipart/", 10)) {
 
-               if ( (WCC->wc_default_view == VIEW_CALENDAR) || (WCC->wc_default_view == VIEW_TASKS) ) {
+               if ( (WCC->CurRoom.defview == VIEW_CALENDAR) || (WCC->CurRoom.defview == VIEW_TASKS) ) {
                        strcpy(epdata.desired_content_type_1, "text/calendar");
                }
 
-               else if (WCC->wc_default_view == VIEW_ADDRESSBOOK) {
+               else if (WCC->CurRoom.defview == VIEW_ADDRESSBOOK) {
                        strcpy(epdata.desired_content_type_1, "text/vcard");
                        strcpy(epdata.desired_content_type_2, "text/x-vcard");
                }
@@ -255,7 +255,7 @@ void groupdav_get(void)
                        ptr = memreadline(ptr, buf, sizeof buf);
        
                        if (in_body) {
-                               wprintf("%s\r\n", buf);
+                               wc_printf("%s\r\n", buf);
                        }
                        else if ((buf[0] == 0) && (in_body == 0)) {
                                in_body = 1;