- ConnTest.join();
-
- if (ServerResult == FALSE){
-
- lblServerConnResult->SetLabel(_("Failed"));
- lblConnectionResultText->SetLabel(_("An error occured whilst connnecting: ") + CardDAVConn.GetErrorMessage());
- return;
-
- } else {
-
- lblServerConnResult->SetLabel(_("Connected"));
-
- }
-
- if (CardDAVConn.CanDoSSL() == TRUE){
-
- lblServerSSLResult->SetLabel(_("Used"));
-
- } else {
-
- lblServerSSLResult->SetLabel(_("Not Used"));
- lblServerSSLValid->SetLabel(_("Not Applicable"));
-
- }
-
-#if defined(__APPLE__)
-
- // Evalulate the trust object.
-
- SecTrustResultType EvalResult = ProcessResultType(&CardDAVConn);
-
- switch(EvalResult){
- case kSecTrustResultProceed:
- lblServerSSLValid->SetLabel(_("Verified"));
- break;
- case kSecTrustResultConfirm:
- lblServerSSLValid->SetLabel(_("Verified (user)"));
- break;
- default:
- lblServerSSLValid->SetLabel(_("Unable to verify"));
- }
-
-#else
-
- if (CardDAVConn.SSLVerify() == TRUE && CardDAVConn.CanDoSSL() == TRUE){
-
- lblServerSSLValid->SetLabel(_("Verified"));
-
- } else if (CardDAVConn.SSLVerify() == FALSE && CardDAVConn.CanDoSSL() == TRUE && CardDAVConn.IsSelfSigned() == TRUE){
-
- lblServerSSLValid->SetLabel(_("Verified (user)"));
-
- } else if (CardDAVConn.SSLVerify() == FALSE && CardDAVConn.CanDoSSL() == TRUE) {
-
- lblServerSSLValid->SetLabel(_("Unable to verify"));
-
- }
-
-#endif
-
- if (CardDAVConn.CanDoCardDAV() == TRUE){
-
- lblCardDAVSupportResult->SetLabel(_("Supported"));
-
- } else {
-
- lblCardDAVSupportResult->SetLabel(_("Unsupported"));
- SetErrorMessageLabel();
- return;
-
- }
-
- if (CardDAVConn.AbleToLogin() == TRUE){
-
- lblAbleToLoginResult->SetLabel(_("Yes"));
-
- } else {
-
- lblAbleToLoginResult->SetLabel(_("No"));
- SetErrorMessageLabel();
- return;
-
- }
-
- // Get the address to process CardDAV requests.
-
- ServerPrefix = CardDAVConn.GetDefaultAddressBookURL();
-
- if (CardDAVConn.HasValidResponse() == TRUE){
-
- lblServerResponse->SetLabel(_("Yes"));
-
- } else {
-
- lblServerResponse->SetLabel(_("No"));
- SetErrorMessageLabel();
- return;
-
- }
-
- if (ServerResult == TRUE && CardDAVConn.HasValidResponse() == TRUE &&
-
- CardDAVConn.CanDoCardDAV() == TRUE && CardDAVConn.AbleToLogin() == TRUE){
-
- btnNext->Enable();
-
- lblConnectionResultText->SetLabel(_("Click on Next to set the account name."));
-
- } else {
-
- SetErrorMessageLabel();
-