Closed Bug 398975 Opened 16 years ago Closed 15 years ago

Implement calIFreeBusyProvider for CalDav Provider


(Calendar :: Provider: CalDAV, enhancement)

Not set


(Not tracked)



(Reporter: informatique.internet, Assigned: browning)


(Blocks 1 open bug)



(2 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv: Gecko/20070914 Firefox/
Build Identifier: 

There's a way to retrieve free busy information from caldav server 
Refer to RFC 4791  
     7.10. CALDAV:free-busy-query REPORT  . . . . . . . . . . . . . . 66
       7.10.1. Example: Successful CALDAV:free-busy-query REPORT  . . 68

It would be very great to have this nice feature in lightning...

I use an hack made be "inverse lightning enhancer" to provide FB information in ICS format... 

Reproducible: Always

Steps to Reproduce:
1.Open a caldav calendar
2.Add an attendee
3.The FreeBusy information is never displayer

Expected Results:  
It should works (with the caldav protocol)

Example of caldav freebusy request

>> Request <<

   REPORT /bernard/work/ HTTP/1.1
   Depth: 1
   Content-Type: application/xml; charset="utf-8"
   Content-Length: xxxx

   <?xml version="1.0" encoding="utf-8" ?>
   <C:free-busy-query xmlns:C="urn:ietf:params:xml:ns:caldav">
     <C:time-range start="20060104T140000Z"

   >> Response <<

   HTTP/1.1 200 OK
   Date: Sat, 11 Nov 2006 09:32:12 GMT
   Content-Type: text/calendar
   Content-Length: xxxx

   PRODID:-//Example Corp.//CalDAV Server//EN
I'd like to stick to (draft) CalDAV scheduling which is AFAIK the recommended way to get free-busy information of a specific user, e.g. <>. This allows to incorporate multiple calendars of a user.
Ever confirmed: true
no problem...
Blocks: 400694
Is there any schedule for implementation of the CalDAV scheduling? The Cosmo developers are currently designing the scheduling implementation and they will probably come up with something in the next few months. It would be really great if Lightning support was moving along with the developments. I think the Darwin server already has some kind of CalDAV scheduling support if i am not mistaken.
No schedule, but progress is being made and the beginnings of scheduling support (initially in the form of a patch for this bug) should appear soon.
Assignee: nobody → browning
Patch adds various kinds of discovery needed for CalDAV-scheduling as well as implementing getFreeBusyIntervals(). Currently only working with the Apple server, and that with a long (~15sec) delay at program startup. The discovery parts will doubtless want to change as servers (and the standard) mature - but this gets us a basis on which to begin implementing the rest of the draft scheduling standard.
Attachment #289981 - Flags: review?(daniel.boelzle)
Hi Bruno,

+    // implementations. So provisionally we assume the 99% case, where the
+    // calendar's principal-URL is the immediate parent of the calendar itself

It would be good if this was a fallback for when you couldn't retrieve the principal-URL through a PROPFIND.

Comment on attachment 289981 [details] [diff] [review]
patch version 1 [checked in]

r=dbo; thanks for the patch!

Checked in on HEAD and MOZILLA_1_8_BRANCH.
Attachment #289981 - Flags: review?(daniel.boelzle) → review+
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → 0.8
Since this bug is still open, I'll post a follow-on patch here instead of in a different bug. This patch (which assumes the first is already in-tree):
* uses clearer naming wrt calendar-home-set
* makes more efficient queries
* checks to prevent accepting data about a different user (e.g. queries about user2 ignore data about user22)
* does not assume that all responses have <?xml ... headers
Attachment #291014 - Flags: review?(daniel.boelzle)
Comment on attachment 291014 [details] [diff] [review]
follow-on patch with improvements

Attachment #291014 - Flags: review?(daniel.boelzle) → review+
Attachment #289981 - Attachment description: patch version 1 → patch version 1 [checked in]
I would like to know how lightning knows where to look at, to search freebusy information from an attendee.
Or how an attendee is linked to a cal provider (Google, Caldav, WCAP)
Have you a link or spec, forum's thread that explain this ?
(In reply to comment #10)
> Hi, 
> I would like to know how lightning knows where to look at, to search freebusy
> information from an attendee.
> Or how an attendee is linked to a cal provider (Google, Caldav, WCAP)
> Have you a link or spec, forum's thread that explain this ?
> Cheers

Please see:

which is where it is defined. 
Please commit the second patch as it corrects many issue i have...
patch #2 checked in on MOZILLA_1_8_BRANCH and trunk.

Closing this bug before I spam it again.

Closed: 15 years ago
Resolution: --- → FIXED
Does this in fact still only work with the Apple Calendar Server or is it simply untested with others? I would be interested in using free-busy with the Chandler Server, but i am not even entirely sure to what degree Cosmo supports free-busy (last state for free-busy in Cosmo i heard of is "experimental" and little tested) .
I haven't tested it with Chandler yet. I have tested it with a couple of other CalDAV servers, where it fails in different ways for what look to me to be server-side issues; I'll be following in up on that with the respective server groups. I wasn't aware that Chandler had any part of CalDAV-scheduling implemented yet; please do mail me about what you find in that regard.
Cosmo does not yet implement CalDAV scheduling, so this free-busy feature won't work with Cosmo (for now).
You need to log in before you can comment on or make changes to this bug.