]> code.citadel.org Git - citadel.git/commitdiff
* List UID and SUMMARY properties of conflicting events
authorArt Cancro <ajc@citadel.org>
Mon, 21 Oct 2002 20:00:42 +0000 (20:00 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 21 Oct 2002 20:00:42 +0000 (20:00 +0000)
citadel/ChangeLog
citadel/serv_calendar.c

index 3b72b2f3185320bcd4ad3d89798225016c453c9d..f2d4970550a68ff23e2d4e7f4cc73f9079eef864 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 601.44  2002/10/21 20:00:41  ajc
+ * List UID and SUMMARY properties of conflicting events
+
  Revision 601.43  2002/10/21 17:14:42  ajc
  * More work on conflict detects
 
@@ -4132,4 +4135,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index 2142a9bda931d279cf105d7efd9248e92a710f2b..17411118d62286192cd87b91d7bd91adf9641672 100644 (file)
@@ -214,19 +214,6 @@ icalproperty *ical_ctdl_get_subprop(
 }
 
 
-/*
- * Helper function for ical_ctdl_is_overlap() to simplify the code when
- * comparing year/month/day.  The number doesn't have to be meaningful, only
- * consistent and unique for the supplied y/m/d combination.
- */
-inline int itymd(struct icaltimetype t) {
-       return (
-               (t.year * 416)
-               + (t.month * 32)
-               + (t.day)
-       );
-}
-
 /*
  * Check to see if two events overlap.  Returns nonzero if they do.
  */
@@ -290,8 +277,12 @@ void vcard_hunt_for_conflicts_backend(long msgnum, void *data) {
        struct ical_respond_data ird;
        struct icaltimetype t1start, t1end, t2start, t2end;
        icalproperty *p;
+       char conflict_event_uid[SIZ];
+       char conflict_event_summary[SIZ];
 
        cal = (icalcomponent *)data;
+       strcpy(conflict_event_uid, "");
+       strcpy(conflict_event_summary, "");
 
        msg = CtdlFetchMessage(msgnum);
        if (msg == NULL) return;
@@ -328,11 +319,23 @@ void vcard_hunt_for_conflicts_backend(long msgnum, void *data) {
        p = ical_ctdl_get_subprop(cal, ICAL_DTEND_PROPERTY);
        if (p != NULL) t1end = icalproperty_get_dtend(p);
        
+       p = ical_ctdl_get_subprop(ird.cal, ICAL_UID_PROPERTY);
+       if (p != NULL) {
+               strcpy(conflict_event_uid, icalproperty_get_comment(p));
+       }
+       p = ical_ctdl_get_subprop(ird.cal, ICAL_SUMMARY_PROPERTY);
+       if (p != NULL) {
+               strcpy(conflict_event_summary, icalproperty_get_comment(p));
+       }
+
+
        icalcomponent_free(ird.cal);
 
        if (ical_ctdl_is_overlap(t1start, t1end, t2start, t2end)) {
-               cprintf("%ld|FIXME put more here\n",
-                       msgnum
+               cprintf("%ld||%s|%s|\n",
+                       msgnum,
+                       conflict_event_uid,
+                       conflict_event_summary
                );
        }
 }