Show
Ignore:
Timestamp:
10/28/07 23:41:34 (1 year ago)
Author:
daboo
Message:

Calendar ctag handling. Don't list the calendars/address books when first starting up if
we have a fresh cache.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Mulberry/branches/v4.1d1/Sources_Common/Calendar_Store/Clients/CCalDAVCalendarClient.cpp

    r96 r113  
    198198bool CCalDAVCalendarClient::_CalendarChanged(const CCalendarStoreNode& node, iCal::CICalendar& cal) 
    199199{ 
    200         // For CalDAV we always have to do a component sync 
    201         return true; 
     200        // Start UI action 
     201        StINETClientAction _action(this, "Status::Calendar::Checking", "Error::Calendar::OSErrCheckCalendar", "Error::Calendar::NoBadCheckCalendar", node.GetName()); 
     202 
     203        // Determine URL and lock 
     204        cdstring rurl = GetRURL(&node); 
     205        cdstring lock_token = GetLockToken(rurl); 
     206 
     207        // Get current CTag 
     208        cdstring ctag = GetProperty(rurl, lock_token, http::calendarserver::cProperty_getctag); 
     209         
     210        // Changed if ctags are different 
     211        return ctag.empty() || (ctag != cal.GetETag()); 
     212} 
     213 
     214void CCalDAVCalendarClient::_UpdateSyncToken(const CCalendarStoreNode& node, iCal::CICalendar& cal) 
     215{ 
     216        // Start UI action 
     217        StINETClientAction _action(this, "Status::Calendar::Checking", "Error::Calendar::OSErrCheckCalendar", "Error::Calendar::NoBadCheckCalendar", node.GetName()); 
     218 
     219        // Determine URL and lock 
     220        cdstring rurl = GetRURL(&node); 
     221        cdstring lock_token = GetLockToken(rurl); 
     222 
     223        // Get current CTag 
     224        cdstring ctag = GetProperty(rurl, lock_token, http::calendarserver::cProperty_getctag); 
     225         
     226        cal.SetETag(ctag); 
    202227} 
    203228