string CalendarHomeURI = "";
CalendarHomeURI = GetCalendarHome(UserPrincipalURI);
- cout << ServerData << endl;
-
string CalendarListURLAddress = BuildServerAddress(&ConnectionData, CalendarHomeURI);
- cout << CalendarListURLAddress << endl;
-
string CalendarListRequest = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<d:propfind xmlns:d=\"DAV:\" xmlns:cs=\"http://calendarserver.org/ns/\""
" xmlns:c=\"urn:ietf:params:xml:ns:caldav\" xmlns:x0=\"http://apple.com/ns/ical/\">\n"
" <x0:calendar-order />\n"
" <cs:getctag />\n"
" <c:supported-calendar-component-set />\n"
+ " <c:calendar-description />\n"
" </d:prop>\n"
"</d:propfind>";
CURLcode ServerResult = curl_easy_perform(ConnectionHandle);
- cout << ServerData << endl;
-
//ServerList = ProcessXMLCalendarList();
// Restore the original settings.
curl_easy_setopt(ConnectionHandle, CURLOPT_READDATA, NULL);
curl_easy_setopt(ConnectionHandle, CURLOPT_READFUNCTION, NULL);
+ // Process the received XML data into a list of calendars
+ // and locations.
+
+ if (ServerResult != CURLE_OK){
+
+ return ServerList;
+
+ }
+
+ ServerList = ProcessXMLCalendarList();
+
return ServerList;
}