Deepening in the code

Published by: 0

spent last few days exploring the code base and setting up the environment to debug Thunderbird.  Used sogo server to configure the CalDav. As I have installed a 32bit version of ubuntu, had to switch on Intel’s virtuaization feature in order to use sogo’s 64bit zeg image.

A summary on some frequent files would have been a little useful.

calUtils.js

This contains utility methods to be used in Lightning operations. ie: cal.LOG(); for logging messages in the error console.  This is loaded in many of the source codes.

calIitipUtils.jsm

Most of the operations related to itip is contained in this file. i.e: determining the latest resource of a event file by examining the sequence number and the datetime stamp.

calProviderUtils.jsm

This contains function implementations for provider services. ie: SendHttprequest to send the queried XML message to the server.

calDavCalendar.js

contains all the methods to send the initiate the PROPFIND request to the server to, deleting a calendar resource object from the remote calendar. ie:

Sending the initial PROPFIND request to find  the remote calendar.

sending a PROPFIND request with a “allprop” element is described here.

Initial PROPFIND request:

[xml]<D:propfind xmlns:D=”DAV:” xmlns: CS=”http://calendarserver.org/ns/” xmlns:C=”urn:ietf:params:xml:ns:caldav”>
<D:prop>
<D:resourcetype/>
<D:owner/>
<D:current-user-principal/>
<D:supported-report-set/>
<C:supported-calendar-component-set/>
<CS:getctag/>
</D:prop>
</D:propfind>[/xml]

Response from the server:

 <?xml version=”1.0″ encoding=”utf-8″?>
<D:multistatus xmlns:a=”urn:ietf:params:xml:ns:caldav” xmlns:b=”http://calendarserver.org/ns/” xmlns:D=”DAV:”>
<D:response>
<D:href>/SOGo/dav/sogo1/Calendar/personal/</D:href>
<D:propstat>
<D:status>HTTP/1.1 200 OK</D:status>
<D:prop>
<D:resourcetype>
<D:collection/><calendar xmlns=”urn:ietf:params:xml:ns:caldav”/>
<vevent-collection xmlns=”http://groupdav.org/”/>
<vtodo-collection xmlns=”http://groupdav.org/”/>
<schedule-outbox xmlns=”urn:ietf:params:xml:ns:caldav”/>
</D:resourcetype>
<D:owner xmlns:D=”DAV:”>
<D:href>/SOGo/dav/sogo1/</D:href>
</D:owner>
<D:current-user-principal xmlns:D=”DAV:”>
<D:href>/SOGo/dav/sogo1</D:href>
</D:current-user-principal>
<D:supported-report-set xmlns:n2=”urn:inverse:params:xml:ns:inverse-dav” xmlns:n3=”urn:ietf:params:xml:ns:carddav”           xmlns:D=”DAV:” xmlns:n1=”urn:ietf:params:xml:ns:caldav”>
<D:supported-report>
<D:report><n1:calendar-multiget/>
</D:report></D:supported-report>
<D:supported-report>
<D:report>
<n1:calendar-query/>
</D:report>
</D:supported-report>
<D:supported-report>
<D:report>
<n2:acl-query/>
</D:report>
</D:supported-report>
<D:supported-report>
<D:report>
<D:sync-collection/>
</D:report>
</D:supported-report>
<D:supported-report>
<D:report><D:expand-property/>
</D:report></D:supported-report>
<D:supported-report>
<D:report>
<n3:addressbook-query/>
</D:report>
</D:supported-report>
</D:supported-report-set>
<n1:supported-calendar-component-set xmlns:n1=”urn:ietf:params:xml:ns:caldav” xmlns:D=”DAV:”>
<n1:comp name=”VEVENT”/>
<n1:comp name=”VTODO”/>
</n1:supported-calendar-component-set>
<b:getctag>1399188135</b:getctag>
</D:prop></D:propstat>
</D:response>
</D:multistatus>

I’m trying to send a HTTPrequest to get a property by name. It is done by the “propname” element.

my request:

<D:propfind xmlns:D=”DAV:” xmlns: CS=”http://calendarserver.org/ns/” xmlns:C=”urn:ietf:params:xml:ns:caldav”>
<propname/>
</propfind>

As long as the property name is not mentioned, it will be considered as “allprop” request.

As the next step I hope to jump into the implementation of schedule-calendar-transp property.