Changeset 96 for Mulberry/branches/v4.1d1/Sources_Common/Calendar_Store/Clients/CCalDAVCalendarClient.cpp
- Timestamp:
- 07/09/07 21:40:14 (1 year ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
Mulberry/branches/v4.1d1/Sources_Common/Calendar_Store/Clients/CCalDAVCalendarClient.cpp
r86 r96 359 359 if (no_report) 360 360 { 361 for(cdstrvect::const_iterator iter = hrefs.begin(); iter != hrefs.end(); iter++)362 {363 // Read in the component364 ReadCalendarComponent(*iter, cal);365 }361 for(cdstrvect::const_iterator iter = hrefs.begin(); iter != hrefs.end(); iter++) 362 { 363 // Read in the component 364 ReadCalendarComponent(*iter, cal); 365 } 366 366 } 367 367 else 368 368 { 369 // Don't bother with this if empty (actually spec requires at least one href)370 if (hrefs.empty())371 return;372 373 // Run the calendar-multiget report374 cdstring rurl = GetRURL(&node);375 376 // Create WebDAV REPORT377 bool old_style = false;369 // Don't bother with this if empty (actually spec requires at least one href) 370 if (hrefs.empty()) 371 return; 372 373 // Run the calendar-multiget report 374 cdstring rurl = GetRURL(&node); 375 376 // Create WebDAV REPORT 377 bool old_style = false; 378 378 #ifdef OLD_STYLE_CALENDAR_DATA 379 old_style = (GetCalendarProtocol()->GetAccount()->GetName().find("oldstyle") != cdstring::npos);379 old_style = (GetCalendarProtocol()->GetAccount()->GetName().find("oldstyle") != cdstring::npos); 380 380 #endif 381 auto_ptr<http::caldav::CCalDAVMultigetReport> request(new http::caldav::CCalDAVMultigetReport(this, rurl, hrefs, old_style));382 http::CHTTPOutputDataString dout;383 request->SetOutput(&dout);384 385 // Process it386 RunSession(request.get());387 388 // Check response status389 switch(request->GetStatusCode())390 {391 case http::webdav::eStatus_MultiStatus:392 // Do default action393 break;394 default:395 // Handle error and exit here396 HandleHTTPError(request.get());397 return;398 }399 400 http::caldav::CCalDAVReportParser parser(cal);401 parser.ParseData(dout.GetData());381 auto_ptr<http::caldav::CCalDAVMultigetReport> request(new http::caldav::CCalDAVMultigetReport(this, rurl, hrefs, old_style)); 382 http::CHTTPOutputDataString dout; 383 request->SetOutput(&dout); 384 385 // Process it 386 RunSession(request.get()); 387 388 // Check response status 389 switch(request->GetStatusCode()) 390 { 391 case http::webdav::eStatus_MultiStatus: 392 // Do default action 393 break; 394 default: 395 // Handle error and exit here 396 HandleHTTPError(request.get()); 397 return; 398 } 399 400 http::caldav::CCalDAVReportParser parser(cal); 401 parser.ParseData(dout.GetData()); 402 402 } 403 403 }