Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
CalDAV: WIP CalDAV support
[xestiacalendar/.git] / source / forms / newaccount / frmNewAccount.cpp
index ec9aa1b..fc1ae8a 100644 (file)
@@ -410,7 +410,7 @@ void frmNewAccount::RunCalDAVTest( wxCommandEvent &event )
        connData.port = wxAtoi(txtServerPort->GetValue());
        connData.username = txtUsername->GetValue().ToStdString();
        connData.password = txtPassword->GetValue().ToStdString();
-       connData.useSSL = chkUseSSL->GetValue() ? true : false);
+       connData.useSSL = chkUseSSL->GetValue() ? true : false;
 
        CalDAV testConnection;
        testConnection.SetupConnectionData(&connData);
@@ -423,8 +423,8 @@ void frmNewAccount::RunCalDAVTest( wxCommandEvent &event )
        
        // Test the connection.
        
-       testConnection.SetupConnectionObject();
-       CalDAVServerResult testConnectionResult = testConnection.Connect(false);
+       //testConnection.SetupConnectionObject();
+       CalDAVServerResult testConnectionResult = testConnection.Connect();
        
        // If server is using SSL, verify that the SSL connection is valid.
        
@@ -509,14 +509,14 @@ void frmNewAccount::RunCalDAVTest( wxCommandEvent &event )
                
                testConnection.BypassSSLVerification(true);
                
-               CalDAVServerResult testConnectionResult = testConnection.Connect(false);
+               CalDAVServerResult testConnectionResult = testConnection.Connect();
                
                testConnection.BypassSSLVerification(false);
 
                SSLCertCollectionString certData = testConnection.BuildSSLCollection();
                frmInvalidSSLCertificate *frmICPtr = new frmInvalidSSLCertificate(this);
                
-               frmICPtr->LoadDataNew(CertData, txtServerAddress->GetValue().ToStdString());
+               frmICPtr->LoadDataNew(certData, txtServerAddress->GetValue().ToStdString());
                frmICPtr->ShowModal();
                                                                
                int sslResult = frmICPtr->GetResult();
@@ -535,7 +535,7 @@ void frmNewAccount::RunCalDAVTest( wxCommandEvent &event )
                        usingSSLBypass = true;
                        testConnection.BypassSSLVerification(true);
                
-                       CalDAVServerResult testConnectionResult = testConnection.Connect(true);
+                       CalDAVServerResult testConnectionResult = testConnection.Connect();
                
                        testConnection.BypassSSLVerification(false);
                                                                
@@ -546,17 +546,17 @@ void frmNewAccount::RunCalDAVTest( wxCommandEvent &event )
                        // TODO: Integrate into the code.
                        
                        //lblConnectionResultText->SetLabel(_("An error occured whilst connnecting: ") + CardDAVConn.GetErrorMessage() + wxString::Format(wxT(" (%i)\n%s"), sslcode, CardDAVConn.GetErrorBuffer().mb_str()));
-                                                               
+                                               
                }               
                
 #endif
        }
        
-       testConnectionResult = testConnection.Connect(true);
+       testConnectionResult = testConnection.Connect();
 
        // Get the server prefix if the connection was successful.
        
-       if (testConnectionResult == COCONNECT_OK){
+       if (testConnectionResult.result == CALDAVQUERYRESULT_OK){
 
                if (usingSSLBypass == true){
                        testConnection.BypassSSLVerification(true);                     
@@ -573,14 +573,14 @@ void frmNewAccount::RunCalDAVTest( wxCommandEvent &event )
                
        }
        
-       testConnectionResult == COCONNECT_OK ? resultData->Connected = true : resultData->Connected = false;
+       testConnectionResult.result == CALDAVQUERYRESULT_OK ? resultData->Connected = true : resultData->Connected = false;
        
-       resultData->SSLStatus = TestConnection.CanDoSSL();
-       resultData->SSLVerified = TestConnection.SSLVerify();
-       resultData->ValidResponse = TestConnection.HasValidResponse();
-       resultData->AuthPassed = TestConnection.AbleToLogin();
-       resultData->CanProcess = TestConnection.CanDoProcessing();
-       resultData->ErrorMessage = TestConnection.GetErrorMessage();
+       resultData->SSLStatus = testConnection.CanDoSSL();
+       resultData->SSLVerified = testConnection.SSLVerify();
+       resultData->ValidResponse = testConnection.HasValidResponse();
+       resultData->AuthPassed = testConnection.AbleToLogin();
+       resultData->CanProcess = testConnection.CanDoProcessing();
+       resultData->ErrorMessage = testConnection.GetErrorMessage();
        
        // Post event back confirming the tests.
        
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