Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
camelCase: Converted remaining code that was missed
[xestiacalendar/.git] / source / objects / CalDAV / CalDAV.cpp
index 6739d48..ecd91bd 100644 (file)
@@ -31,7 +31,7 @@ size_t CalDAVReceive(char *receivedBuffer, size_t size, size_t newMemoryBytes, s
 
 size_t CalDAVSend(char *sendBuffer, size_t size, size_t newMemoryBytes, void *dataStruct){
 
-       struct CalDAVSendData *uploadPtr = (struct calDAVSendData *)dataStruct;
+       struct CalDAVSendData *uploadPtr = (struct CalDAVSendData *)dataStruct;
        
        if (uploadPtr->sizeleft){
 
@@ -116,16 +116,16 @@ CalDAVServerResult CalDAV::Connect(){
 
        // Setup the server password.
        
-       ServerUserPass += connectionData.username;
-       ServerUserPass += ":";
-       ServerUserPass += connectionData.password;
+       serverUserPass += connectionData.username;
+       serverUserPass += ":";
+       serverUserPass += connectionData.password;
        
        curl_easy_setopt(connectionHandle, CURLOPT_URL, serverAddress.c_str());
        curl_easy_setopt(connectionHandle, CURLOPT_USERPWD, serverUserPass.c_str());
        curl_easy_setopt(connectionHandle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
        curl_easy_setopt(connectionHandle, CURLOPT_FAILONERROR, 1L);
        curl_easy_setopt(connectionHandle, CURLOPT_TIMEOUT, connectionData.timeout);
-       curl_easy_setopt(connectionHandle, CURLOPT_WRITEFUNCTION, calDAVReceive);
+       curl_easy_setopt(connectionHandle, CURLOPT_WRITEFUNCTION, CalDAVReceive);
        curl_easy_setopt(connectionHandle, CURLOPT_WRITEDATA, &serverData);
        curl_easy_setopt(connectionHandle, CURLOPT_WRITEHEADER, &serverHeader);
        
@@ -329,7 +329,7 @@ string CalDAV::GetUserPrincipal(){
        curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "PROPFIND");
        curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
        curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &userPrincipalSendData);
-       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
        
        // Process the data.
        
@@ -341,12 +341,12 @@ string CalDAV::GetUserPrincipal(){
        // Set the results.
        
        if (serverResult == CURLE_OK){
-               connectionServerResult.Result = CALDAVQUERYRESULT_OK;
+               connectionServerResult.result = CALDAVQUERYRESULT_OK;
        } else {
-               connectionServerResult.Result = CALDAVQUERYRESULT_SERVERERROR;          
+               connectionServerResult.result = CALDAVQUERYRESULT_SERVERERROR;          
        }
-       connectionServerResult.Code = serverResult;
-       curl_easy_getinfo(connectionHandle, CURLINFO_RESPONSE_CODE, &connectionServerResult.HTTPCode);
+       connectionServerResult.code = serverResult;
+       curl_easy_getinfo(connectionHandle, CURLINFO_RESPONSE_CODE, &connectionServerResult.httpCode);
        
        if (serverResult != CURLE_OK){
                
@@ -403,7 +403,7 @@ string CalDAV::GetCalendarHome(string userPrincipalURI){
        curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "PROPFIND");
        curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
        curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &calendarHomeSendData);
-       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
        
        // Process the data.
        
@@ -498,7 +498,7 @@ CalDAVCalendarList CalDAV::GetCalendars(){
        curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "PROPFIND");
        curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
        curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &calendarListSendData);
-       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
        
        // Process the data.
        
@@ -517,7 +517,7 @@ CalDAVCalendarList CalDAV::GetCalendars(){
        connectionServerResult.code = serverResult;
        curl_easy_getinfo(connectionHandle, CURLINFO_RESPONSE_CODE, &connectionServerResult.httpCode);
        
-       if (cerverResult != CURLE_OK){
+       if (serverResult != CURLE_OK){
                
                return serverList;
                
@@ -605,7 +605,7 @@ CalDAVEntryList CalDAV::GetEntryList(string *calendarHREF){
        curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "REPORT");
        curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
        curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &entryListSendData);
-       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
        
        // Process the data.
        
@@ -699,7 +699,7 @@ CalDAVEntryList CalDAV::GetEntryList(string *calendarHREF, string *calendarTag){
        curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "REPORT");
        curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
        curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &entryListSendData);
-       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
        
        // Process the data.
        
@@ -776,7 +776,7 @@ CalDAVEntryList CalDAV::GetEntryList(string *calendarHREF, string *calendarTag){
        curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "REPORT");
        curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
        curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &updatedEntryListSendData);
-       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
        
        // Get the updated calendar data.
        
@@ -846,7 +846,7 @@ CalDAVServerResult CalDAV::AddCalendar(string *calendarName, string *calendarSho
        
        if (userPrincipalURI.size() == 0){
                
-               return ServerResult;
+               return serverResult;
                
        }
        
@@ -903,7 +903,7 @@ CalDAVServerResult CalDAV::AddCalendar(string *calendarName, string *calendarSho
        curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "MKCALENDAR");
        curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
        curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &calendarAddSendData);
-       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
        
        // Process the data.
        
@@ -1031,7 +1031,7 @@ CalDAVServerResult CalDAV::EditCalendarProcess(string *calendarHREF,
        curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "PROPPATCH");
        curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
        curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &calendarEditSendData);
-       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
        
        // Process the data.
        
@@ -1040,7 +1040,7 @@ CalDAVServerResult CalDAV::EditCalendarProcess(string *calendarHREF,
        
        CURLcode serverConnectionResult = curl_easy_perform(connectionHandle);
        
-       if (serverConnectionRsult == CURLE_OK){
+       if (serverConnectionResult == CURLE_OK){
                serverResult.result = CALDAVQUERYRESULT_OK;
        } else {
                serverResult.result = CALDAVQUERYRESULT_SERVERERROR;            
@@ -1057,7 +1057,7 @@ CalDAVServerResult CalDAV::EditCalendarProcess(string *calendarHREF,
        curl_easy_setopt(connectionHandle, CURLOPT_READDATA, NULL);
        curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, NULL);
        
-       return ServerResult;
+       return serverResult;
 
 }
 
@@ -1079,9 +1079,8 @@ CalDAVServerResult CalDAV::EditCalendar(string *calendarHREF,
        
 }
 
-CalDAVServerResult CalDAV::EditCalendar(string *CalendarHREF,
-                       Colour *CalendarColour){
-       
+CalDAVServerResult CalDAV::EditCalendar(string *calendarHREF,
+                       Colour *calendarColour){
 
        CalDAVServerResult serverResult;
 
@@ -1187,9 +1186,9 @@ CalDAVServerResult CalDAV::DeleteCalendar(string *calendarHREF){
        CURLcode serverConnectionResult = curl_easy_perform(connectionHandle);
        
        if (serverConnectionResult == CURLE_OK){
-               serverResult.Result = CALDAVQUERYRESULT_OK;
+               serverResult.result = CALDAVQUERYRESULT_OK;
        } else {
-               serverResult.Result = CALDAVQUERYRESULT_SERVERERROR;            
+               serverResult.result = CALDAVQUERYRESULT_SERVERERROR;            
        }
        serverResult.code = serverConnectionResult;
        curl_easy_getinfo(connectionHandle, CURLINFO_RESPONSE_CODE, &serverResult.httpCode);
@@ -1264,7 +1263,7 @@ CalDAVServerResult CalDAV::GetEntryETag(string *calendarEntryHREF, string *eTagV
        curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "REPORT");
        curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
        curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &entryETagGetData);
-       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
        
        // Attempt to get the entity tag.
        
@@ -1326,7 +1325,7 @@ CalDAVServerResult CalDAV::AddEntry(string *calendarEntryHREF, string *entryData
        curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "PUT");
        curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
        curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &entryAddSendData);
-       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
        
        // Process the data.
        
@@ -1387,7 +1386,7 @@ CalDAVServerResult CalDAV::EditEntry(string *calendarEntryHREF, string *entryDat
        curl_easy_setopt(connectionHandle, CURLOPT_CUSTOMREQUEST, "PUT");
        curl_easy_setopt(connectionHandle, CURLOPT_UPLOAD, 1L);
        curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &entryAddSendData);
-       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, calDAVSend);
+       curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, CalDAVSend);
        
        // Process the data.
        
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy