X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcarddav%2Fcarddav.cpp;h=095ab9534ce9c860d4c4b69269d027c786f82c2b;hb=9dda85fb380dbaa06e14a0263daad4723d231f6c;hp=5a07c417705ff024fc1d26cc1cd7a8dc201184ae;hpb=45729fca56479bd9158486e0cda0c4a94b4dd1dc;p=xestiaab%2F.git diff --git a/source/carddav/carddav.cpp b/source/carddav/carddav.cpp index 5a07c41..095ab95 100644 --- a/source/carddav/carddav.cpp +++ b/source/carddav/carddav.cpp @@ -13,7 +13,6 @@ size_t WritebackFunc(char *ptr, size_t size, size_t nmemb, wxString *stream){ wxString Data; - wxString *PageInput; Data = wxString::FromUTF8((char *)ptr); stream->Append(Data); @@ -496,7 +495,7 @@ void CardDAV::ProcessDataThread(){ struct UploadDataStruc UploadData; - ActIter = ActivityListPtr->find(ItemIndex); + ActIter = ActivityListPtr->find((int)ItemIndex); // Update result flag. @@ -768,7 +767,7 @@ void CardDAV::ProcessDataThread(){ fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(claconncode)); - long http_code = 0; + int http_code = 0; curl_easy_getinfo(conn, CURLINFO_RESPONSE_CODE, &http_code); fprintf(stderr, "Error code was: %d\n", http_code); @@ -778,7 +777,7 @@ void CardDAV::ProcessDataThread(){ fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(claconncode)); - long http_code = 0; + int http_code = 0; curl_easy_getinfo(conn, CURLINFO_RESPONSE_CODE, &http_code); fprintf(stderr, "Error code was: %d\n", http_code); @@ -1062,7 +1061,7 @@ void CardDAV::GetServerContactData() struct UploadDataStruc UploadData; - ActIter = ActivityListPtr->find(ItemIndex); + ActIter = ActivityListPtr->find((int)ItemIndex); //ActIter->second = 1; @@ -1299,7 +1298,7 @@ void CardDAV::GetServerContactData() fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(claconncode)); - long http_code = 0; + int http_code = 0; curl_easy_getinfo(conn, CURLINFO_RESPONSE_CODE, &http_code); fprintf(stderr, "Error code was: %d\n", http_code); @@ -1309,7 +1308,7 @@ void CardDAV::GetServerContactData() fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(claconncode)); - long http_code = 0; + int http_code = 0; curl_easy_getinfo(conn, CURLINFO_RESPONSE_CODE, &http_code); fprintf(stderr, "Error code was: %d\n", http_code); @@ -1452,7 +1451,7 @@ void CardDAV::GetServerETagValueThread() struct UploadDataStruc UploadData; - ActIter = ActivityListPtr->find(ItemIndex); + ActIter = ActivityListPtr->find((int)ItemIndex); static const char* query = "" @@ -1702,7 +1701,7 @@ void CardDAV::GetServerETagValueThread() fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(claconncode)); - long http_code = 0; + int http_code = 0; curl_easy_getinfo(conn, CURLINFO_RESPONSE_CODE, &http_code); fprintf(stderr, "Error code was: %d\n", http_code); @@ -1712,7 +1711,7 @@ void CardDAV::GetServerETagValueThread() fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(claconncode)); - long http_code = 0; + int http_code = 0; curl_easy_getinfo(conn, CURLINFO_RESPONSE_CODE, &http_code); fprintf(stderr, "Error code was: %d\n", http_code); @@ -1778,7 +1777,7 @@ void CardDAV::GetServerETagValueThread() xmlDocPtr xmlCardDAVDoc; - xmlCardDAVDoc = xmlReadMemory(PageData.mb_str(wxConvUTF8), PageData.Len(), "noname.xml", NULL, 0); + xmlCardDAVDoc = xmlReadMemory(PageData.mb_str(wxConvUTF8), (int)PageData.Len(), "noname.xml", NULL, 0); xmlNodePtr nodeLevel1; xmlNodePtr nodeLevel2; @@ -1892,7 +1891,7 @@ void CardDAV::GetServerETagValueThread() } - if (HREFFound = TRUE && ETagFound == TRUE){ + if (HREFFound == TRUE && ETagFound == TRUE){ // Add to the map data. @@ -1915,7 +1914,6 @@ void CardDAV::GetServerETagValueThread() xmlFreeDoc(xmlCardDAVDoc); // Get the first result. - for (std::map::iterator iter = xmlDataMap.begin(); iter != xmlDataMap.end(); ++iter){ @@ -2005,12 +2003,10 @@ ContactListData CardDAV::GetContactList(wxString SyncTokenInc){ AbortConnection = FALSE; CURL *conn; - CURLcode conncode; wxString ServerAddressURL; wxString ServerAuth; wxString ServerAddressSSL; - wxString ServerAddressNormal; - + wxString ServerAddressNormal; conn = curl_easy_init(); @@ -2098,7 +2094,7 @@ ContactListData CardDAV::GetContactList(wxString SyncTokenInc){ std::map::iterator ActIter; struct UploadDataStruc UploadData; - ActIter = ActivityListPtr->find(ItemIndex); + ActIter = ActivityListPtr->find((int)ItemIndex); curl_slist *slist = NULL; @@ -2346,7 +2342,7 @@ ContactListData CardDAV::GetContactList(wxString SyncTokenInc){ fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(claconncode)); - long http_code = 0; + int http_code = 0; curl_easy_getinfo(conn, CURLINFO_RESPONSE_CODE, &http_code); fprintf(stderr, "Error code was: %d\n", http_code); @@ -2356,7 +2352,7 @@ ContactListData CardDAV::GetContactList(wxString SyncTokenInc){ fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(claconncode)); - long http_code = 0; + int http_code = 0; curl_easy_getinfo(conn, CURLINFO_RESPONSE_CODE, &http_code); fprintf(stderr, "Error code was: %d\n", http_code); @@ -2411,9 +2407,9 @@ ContactListData CardDAV::GetContactList(wxString SyncTokenInc){ fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(claconncode)); - long http_code = 0; + int http_code = 0; curl_easy_getinfo(conn, CURLINFO_RESPONSE_CODE, &http_code); - fprintf(stderr, "Error code was: %l\n", http_code); + fprintf(stderr, "Error code was: %i\n", http_code); return ContactListFinal; @@ -2421,9 +2417,9 @@ ContactListData CardDAV::GetContactList(wxString SyncTokenInc){ fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(claconncode)); - long http_code = 0; + int http_code = 0; curl_easy_getinfo(conn, CURLINFO_RESPONSE_CODE, &http_code); - fprintf(stderr, "Error code was: %l\n", http_code); + fprintf(stderr, "Error code was: %i\n", http_code); return ContactListFinal; @@ -2432,7 +2428,7 @@ ContactListData CardDAV::GetContactList(wxString SyncTokenInc){ } xmlDocPtr xmlCardDAVDoc; - xmlCardDAVDoc = xmlReadMemory(PageData.mb_str(wxConvUTF8), PageData.Len(), "noname.xml", NULL, 0); + xmlCardDAVDoc = xmlReadMemory(PageData.mb_str(wxConvUTF8), (int)PageData.Len(), "noname.xml", NULL, 0); xmlNodePtr nodeLevel1; xmlNodePtr nodeLevel2; @@ -2541,8 +2537,8 @@ ContactListData CardDAV::GetContactList(wxString SyncTokenInc){ if ((!xmlStrcmp(nodeStatusLv1->name, (const xmlChar *)"status") || !xmlStrcmp(nodeStatusLv1->name, (const xmlChar *)"d:status") || - !xmlStrcmp(nodeStatusLv1->name, (const xmlChar *)"D:status") && HTTPStatus == FALSE) - ){ + !xmlStrcmp(nodeStatusLv1->name, (const xmlChar *)"D:status")) && HTTPStatus == FALSE) + { // Get the filename. @@ -2750,8 +2746,8 @@ ContactListData CardDAV::GetContactList(wxString SyncTokenInc){ if ((!xmlStrcmp(nodeStatusLv1->name, (const xmlChar *)"status") || !xmlStrcmp(nodeStatusLv1->name, (const xmlChar *)"d:status") || - !xmlStrcmp(nodeStatusLv1->name, (const xmlChar *)"D:status") && HTTPStatus == FALSE) - ){ + !xmlStrcmp(nodeStatusLv1->name, (const xmlChar *)"D:status")) && HTTPStatus == FALSE) + { // Get the filename. @@ -3147,7 +3143,7 @@ wxString CardDAV::GetDefaultAddressBookURL(){ // Process the XML data from the application. xmlDocPtr xmlCardDAVDoc; - xmlCardDAVDoc = xmlReadMemory(PageData.mb_str(wxConvUTF8), PageData.Len(), "noname.xml", NULL, 0); + xmlCardDAVDoc = xmlReadMemory(PageData.mb_str(wxConvUTF8), (int)PageData.Len(), "noname.xml", NULL, 0); xmlNodePtr nodeLevel1; xmlNodePtr nodeLevel2; @@ -3326,7 +3322,7 @@ wxString CardDAV::GetDefaultAddressBookURL(){ } - xmlCardDAVDoc = xmlReadMemory(PageData.mb_str(wxConvUTF8), PageData.Len(), "noname.xml", NULL, 0); + xmlCardDAVDoc = xmlReadMemory(PageData.mb_str(wxConvUTF8), (int)PageData.Len(), "noname.xml", NULL, 0); for (nodeLevel1 = xmlCardDAVDoc->children; nodeLevel1 != NULL; @@ -3497,7 +3493,7 @@ wxString CardDAV::GetDefaultAddressBookURL(){ } - xmlCardDAVDoc = xmlReadMemory(PageData.mb_str(wxConvUTF8), PageData.Len(), "noname.xml", NULL, 0); + xmlCardDAVDoc = xmlReadMemory(PageData.mb_str(wxConvUTF8), (int)PageData.Len(), "noname.xml", NULL, 0); for (nodeLevel1 = xmlCardDAVDoc->children; nodeLevel1 != NULL;