Giving up on doing citserver-side REPORT parsing.
[citadel.git] / webcit-ng / server / caldav_reports.c
index d253b777b602ce03d12c8514c61b3ee829c70265..de35081a8de8df3310db77ab3a6f68aa3a0d16ff 100644 (file)
@@ -234,11 +234,23 @@ void caldav_report(struct http_transaction *h, struct ctdlsession *c) {
 
        // RFC4791 7.8 "calendar-query" REPORT - Client will send a lot of search criteria.
        if (crp.report_type == cr_calendar_query) {
-               // FIXME build this REPORT.  At the moment we send an empty multistatus.
+               int i = 0;
+               Array *msglist = get_msglist(c, "ALL");
+               if (msglist != NULL) {
+                       for (i = 0; i < array_len(msglist); ++i) {
+                               long m;
+                               memcpy(&m, array_get_element_at(msglist, i), sizeof(long));
+                               TRACE;
+                               syslog(LOG_DEBUG, "evaluating message %ld", m);
+                       }
+                       array_free(msglist);
+               }
        }
 
        // RFC4791 7.9 "calendar-multiget" REPORT - go get the specific Hrefs the client asked for.
+       // Can we move this back into citserver too?
        else if ( (crp.report_type == cr_calendar_multiget) && (crp.Hrefs != NULL) ) {
+
                StrBuf *ThisHref = NewStrBuf();
                const char *pvset = NULL;
                while (StrBufExtract_NextToken(ThisHref, crp.Hrefs, &pvset, '|') >= 0) {