3

In Snow Leopard there is a possibility to show free/busy time in iCal event. I've searched the headers of CalStore.framework and couldn't find any property that describes this field. How can i retrieve free/busy property of calendar event?

Chris Martin
  • 30,334
  • 10
  • 78
  • 137
Nava Carmon
  • 4,523
  • 3
  • 40
  • 74

4 Answers4

1

iCal server has a method of retrieving free/busy, see: http://www.webdav.org/specs/rfc4791.html#rfc.section.7.8.4

However it's not trivial, you will have to essentially write your own API. You issue the server queries using NSURLRequest and NSURLConnection.

christo16
  • 4,843
  • 5
  • 42
  • 53
1

When I export an iCal 4 calendar I notice that "busy" is coded as "TRANSP:OPAQUE" and "free" as "TRANSP:TRANSPARENT". I have not been able to find something equivalent in the Applescript dictionary for iCal.

0

Pretty certain there is no public API in Calendar Store for this. You'll have to file a bug requesting it. Alternatives:

  • See if iCal has AppleScript support for the property
  • Use Sync Services which has access to the full iCal schema
Mike Abdullah
  • 14,933
  • 2
  • 50
  • 75
  • Thank you @Mike for answering this. The AppleScript dictionary of iCal doesn't mention this property.The documentation on iCal Schema doesn't relate to it either: http://developer.apple.com/mac/library/documentation/AppleApplications/Reference/SyncServicesSchemaRef/Articles/Calendars.html Can it be that Apple still didn't update the documentation? – Nava Carmon Oct 31 '09 at 20:28
  • 1
    I filed a radar on missing API. – Nava Carmon Nov 01 '09 at 09:15
  • There is not public cocoa API, but CalDAV is an open standard. You can query the server yourself. See my answer... – christo16 Jan 20 '11 at 14:10
  • Trouble is iCal supports the free/busy flag for local calendars too, so using CalDAV only gets you partway there. – Mike Abdullah Jan 20 '11 at 14:52
0

As a hack could you request a CalDav file for the event and parse that?

Jason Tholstrup
  • 2,036
  • 3
  • 21
  • 25
  • sounds interesting. How do i do that? can you provide an example? Thanks – Nava Carmon Nov 03 '09 at 08:10
  • You could I believe generate one by having the app export it from AppleScript. Would be very ugly/messy though. – Mike Abdullah Nov 03 '09 at 14:12
  • Like I said it would be a hack (and possibly dog slow depending on what you are doing). I just know that it is a documented format and would be one way to do what you want as it appears from other answers that the API is not readily available. Sorry no example, I'm just tossing out ideas at this point. – Jason Tholstrup Nov 03 '09 at 15:53
  • Well, as I wrote before, I filed a radar #7358129. Hopefully, it will be fixed in one of next releases. Thanks – Nava Carmon Nov 03 '09 at 18:13
  • Filed a duplicate: rdar://7376695 – Mike Abdullah Nov 09 '09 at 14:57