From 5b9dfdbcb6c0ab7be6988b58da32e60d7cee3ec0 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Tue, 27 Sep 2016 21:04:39 +0100 Subject: [PATCH] Implemented macOS (OSX) support for ConnectionObject/CardDAV2 and updated files needed in Xcode. --- .../project.pbxproj | 77 +++++-------- source/actmgr/frmActivityMgr.cpp | 105 +++++++++++++++++- source/actmgr/frmActivityMgr.mm | 3 +- source/frmEditAccount.cpp | 18 ++- source/frmEditAccount.h | 4 +- source/frmEditAccount.mm | 6 +- source/frmNewAccount-CardDAV2.cpp | 47 +++++++- source/frmNewAccount.h | 4 +- source/frmNewAccount.mm | 12 +- 9 files changed, 208 insertions(+), 68 deletions(-) diff --git a/projects/osx/XestiaAddressBook.xcodeproj/project.pbxproj b/projects/osx/XestiaAddressBook.xcodeproj/project.pbxproj index d35a087..6b89d51 100644 --- a/projects/osx/XestiaAddressBook.xcodeproj/project.pbxproj +++ b/projects/osx/XestiaAddressBook.xcodeproj/project.pbxproj @@ -7,17 +7,13 @@ objects = { /* Begin PBXBuildFile section */ + 4A4891891D972347002EB687 /* carddav2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A4891831D96EB50002EB687 /* carddav2.cpp */; }; + 4A48918A1D972347002EB687 /* ConnectionObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A4891861D96EB6A002EB687 /* ConnectionObject.cpp */; }; + 4A48918E1D9733DA002EB687 /* frmNewAccount-CardDAV2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A48918C1D973121002EB687 /* frmNewAccount-CardDAV2.cpp */; }; 4A616E961D31A7B000BFF63E /* ContactDataObject-Save.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A616E951D31A7B000BFF63E /* ContactDataObject-Save.cpp */; }; 4A6DA3471CAC049B00A15B3D /* frmActivityMgr-tasks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA3441CAC049B00A15B3D /* frmActivityMgr-tasks.cpp */; }; 4A6DA3481CAC049B00A15B3D /* frmActivityMgr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA3451CAC049B00A15B3D /* frmActivityMgr.cpp */; }; 4A6DA34B1CAC04AD00A15B3D /* convert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA3491CAC04AD00A15B3D /* convert.cpp */; }; - 4A6DA3531CAC04E100A15B3D /* carddav-connect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA34C1CAC04E100A15B3D /* carddav-connect.cpp */; }; - 4A6DA3541CAC04E100A15B3D /* carddav-contactlist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA34D1CAC04E100A15B3D /* carddav-contactlist.cpp */; }; - 4A6DA3551CAC04E100A15B3D /* carddav-defaultadrurl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA34E1CAC04E100A15B3D /* carddav-defaultadrurl.cpp */; }; - 4A6DA3561CAC04E100A15B3D /* carddav-processdata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA34F1CAC04E100A15B3D /* carddav-processdata.cpp */; }; - 4A6DA3571CAC04E100A15B3D /* carddav-servercontact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA3501CAC04E100A15B3D /* carddav-servercontact.cpp */; }; - 4A6DA3581CAC04E100A15B3D /* carddav-serveretag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA3511CAC04E100A15B3D /* carddav-serveretag.cpp */; }; - 4A6DA3591CAC04E100A15B3D /* carddav-sslverify.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA3521CAC04E100A15B3D /* carddav-sslverify.cpp */; }; 4A6DA35D1CAC068900A15B3D /* ContactDataObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA35B1CAC068900A15B3D /* ContactDataObject.cpp */; }; 4A6DA39C1CAC069D00A15B3D /* frmContactEditor-Business.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA35E1CAC069D00A15B3D /* frmContactEditor-Business.cpp */; }; 4A6DA39D1CAC069D00A15B3D /* frmContactEditor-Calendar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA35F1CAC069D00A15B3D /* frmContactEditor-Calendar.cpp */; }; @@ -71,7 +67,6 @@ 4A6DA3EC1CAC0B9F00A15B3D /* libwx_osx_cocoa.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4ABACCAC1B20F69C001368B0 /* libwx_osx_cocoa.dylib */; }; 4A6DA3EF1CAC0FCB00A15B3D /* libwx_osx_cocoa.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4ABACCAC1B20F69C001368B0 /* libwx_osx_cocoa.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 4A6DA3F11CB044EA00A15B3D /* frmNewAccount.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA3F01CB044EA00A15B3D /* frmNewAccount.mm */; }; - 4A6DA3F81CB0F54A00A15B3D /* carddav-sslverify.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA3F71CB0F54A00A15B3D /* carddav-sslverify.mm */; }; 4A6DA3FE1CB19BDF00A15B3D /* frmActivityMgr.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA3FD1CB19BDF00A15B3D /* frmActivityMgr.mm */; }; 4A6DA4001CB1CE0400A15B3D /* frmMain.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA3FF1CB1CE0400A15B3D /* frmMain.mm */; }; 4A6DA4021CBD8D9300A15B3D /* frmEditAccount.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A6DA4011CBD8D9200A15B3D /* frmEditAccount.mm */; }; @@ -100,7 +95,6 @@ 4A83E3471B236DD7003294C2 /* frmPreferences.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A83E3361B236DD7003294C2 /* frmPreferences.cpp */; }; 4A83E3491B236DD7003294C2 /* frmSSLCertificate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A83E33A1B236DD7003294C2 /* frmSSLCertificate.cpp */; }; 4A83E34A1B236DD7003294C2 /* frmUpdate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A83E33C1B236DD7003294C2 /* frmUpdate.cpp */; }; - 4A83E34E1B236E12003294C2 /* carddav.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A83E34C1B236E12003294C2 /* carddav.cpp */; }; 4A83E36B1B236F21003294C2 /* base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A83E3501B236F21003294C2 /* base64.cpp */; }; 4A83E36C1B236F21003294C2 /* defaults.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A83E3521B236F21003294C2 /* defaults.cpp */; }; 4A83E36D1B236F21003294C2 /* dirs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A83E3541B236F21003294C2 /* dirs.cpp */; }; @@ -178,19 +172,17 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 4A4891831D96EB50002EB687 /* carddav2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = carddav2.cpp; path = ../../source/carddav2/carddav2.cpp; sourceTree = ""; }; + 4A4891841D96EB50002EB687 /* carddav2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = carddav2.h; path = ../../source/carddav2/carddav2.h; sourceTree = ""; }; + 4A4891861D96EB6A002EB687 /* ConnectionObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConnectionObject.cpp; path = ../../source/connobject/ConnectionObject.cpp; sourceTree = ""; }; + 4A4891871D96EB6A002EB687 /* ConnectionObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ConnectionObject.h; path = ../../source/connobject/ConnectionObject.h; sourceTree = ""; }; + 4A48918C1D973121002EB687 /* frmNewAccount-CardDAV2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "frmNewAccount-CardDAV2.cpp"; path = "../../source/frmNewAccount-CardDAV2.cpp"; sourceTree = ""; }; 4A616E951D31A7B000BFF63E /* ContactDataObject-Save.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "ContactDataObject-Save.cpp"; path = "../../source/contacteditor/cdo/ContactDataObject-Save.cpp"; sourceTree = ""; }; 4A6DA3441CAC049B00A15B3D /* frmActivityMgr-tasks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.cpp.cpp; name = "frmActivityMgr-tasks.cpp"; path = "../../source/actmgr/frmActivityMgr-tasks.cpp"; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; 4A6DA3451CAC049B00A15B3D /* frmActivityMgr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.cpp.cpp; name = frmActivityMgr.cpp; path = ../../source/actmgr/frmActivityMgr.cpp; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; 4A6DA3461CAC049B00A15B3D /* frmActivityMgr.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; indentWidth = 8; name = frmActivityMgr.h; path = ../../source/actmgr/frmActivityMgr.h; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; 4A6DA3491CAC04AD00A15B3D /* convert.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = convert.cpp; path = ../../source/convert.cpp; sourceTree = ""; }; 4A6DA34A1CAC04AD00A15B3D /* convert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = convert.h; path = ../../source/convert.h; sourceTree = ""; }; - 4A6DA34C1CAC04E100A15B3D /* carddav-connect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.cpp.cpp; name = "carddav-connect.cpp"; path = "../../source/carddav/carddav-connect.cpp"; sourceTree = ""; tabWidth = 8; }; - 4A6DA34D1CAC04E100A15B3D /* carddav-contactlist.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.cpp.cpp; name = "carddav-contactlist.cpp"; path = "../../source/carddav/carddav-contactlist.cpp"; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; - 4A6DA34E1CAC04E100A15B3D /* carddav-defaultadrurl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.cpp.cpp; name = "carddav-defaultadrurl.cpp"; path = "../../source/carddav/carddav-defaultadrurl.cpp"; sourceTree = ""; tabWidth = 8; }; - 4A6DA34F1CAC04E100A15B3D /* carddav-processdata.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.cpp.cpp; name = "carddav-processdata.cpp"; path = "../../source/carddav/carddav-processdata.cpp"; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; - 4A6DA3501CAC04E100A15B3D /* carddav-servercontact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.cpp.cpp; name = "carddav-servercontact.cpp"; path = "../../source/carddav/carddav-servercontact.cpp"; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; - 4A6DA3511CAC04E100A15B3D /* carddav-serveretag.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.cpp.cpp; name = "carddav-serveretag.cpp"; path = "../../source/carddav/carddav-serveretag.cpp"; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; - 4A6DA3521CAC04E100A15B3D /* carddav-sslverify.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.cpp.cpp; name = "carddav-sslverify.cpp"; path = "../../source/carddav/carddav-sslverify.cpp"; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; 4A6DA35B1CAC068900A15B3D /* ContactDataObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ContactDataObject.cpp; path = ../../source/contacteditor/cdo/ContactDataObject.cpp; sourceTree = ""; }; 4A6DA35C1CAC068900A15B3D /* ContactDataObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ContactDataObject.h; path = ../../source/contacteditor/cdo/ContactDataObject.h; sourceTree = ""; }; 4A6DA35E1CAC069D00A15B3D /* frmContactEditor-Business.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "frmContactEditor-Business.cpp"; path = "../../source/contacteditor/frmContactEditor-Business.cpp"; sourceTree = ""; }; @@ -271,7 +263,6 @@ 4A6DA3E21CAC0B3E00A15B3D /* bitmaphelper */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = bitmaphelper; sourceTree = BUILT_PRODUCTS_DIR; }; 4A6DA3EA1CAC0B8C00A15B3D /* bitmapcode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = bitmapcode.cpp; path = ../../source/tools/bitmapcode.cpp; sourceTree = ""; }; 4A6DA3F01CB044EA00A15B3D /* frmNewAccount.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.cpp.objcpp; name = frmNewAccount.mm; path = ../../source/frmNewAccount.mm; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; - 4A6DA3F71CB0F54A00A15B3D /* carddav-sslverify.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.cpp.objcpp; name = "carddav-sslverify.mm"; path = "../../source/carddav/carddav-sslverify.mm"; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; 4A6DA3FD1CB19BDF00A15B3D /* frmActivityMgr.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.cpp.objcpp; name = frmActivityMgr.mm; path = ../../source/actmgr/frmActivityMgr.mm; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; 4A6DA3FF1CB1CE0400A15B3D /* frmMain.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.cpp.objcpp; name = frmMain.mm; path = ../../source/frmMain.mm; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; 4A6DA4011CBD8D9200A15B3D /* frmEditAccount.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; name = frmEditAccount.mm; path = ../../source/frmEditAccount.mm; sourceTree = ""; }; @@ -304,8 +295,6 @@ 4A83E33B1B236DD7003294C2 /* frmSSLCertificate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = frmSSLCertificate.h; path = ../../source/frmSSLCertificate.h; sourceTree = ""; }; 4A83E33C1B236DD7003294C2 /* frmUpdate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = frmUpdate.cpp; path = ../../source/frmUpdate.cpp; sourceTree = ""; }; 4A83E33D1B236DD7003294C2 /* frmUpdate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = frmUpdate.h; path = ../../source/frmUpdate.h; sourceTree = ""; }; - 4A83E34C1B236E12003294C2 /* carddav.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.cpp.cpp; name = carddav.cpp; path = ../../source/carddav/carddav.cpp; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; - 4A83E34D1B236E12003294C2 /* carddav.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.c.h; name = carddav.h; path = ../../source/carddav/carddav.h; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; 4A83E3501B236F21003294C2 /* base64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = base64.cpp; path = ../../source/common/base64.cpp; sourceTree = ""; }; 4A83E3511B236F21003294C2 /* base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = base64.h; path = ../../source/common/base64.h; sourceTree = ""; }; 4A83E3521B236F21003294C2 /* defaults.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 8; lastKnownFileType = sourcecode.cpp.cpp; name = defaults.cpp; path = ../../source/common/defaults.cpp; sourceTree = ""; tabWidth = 8; usesTabs = 1; }; @@ -401,6 +390,15 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 4A4891821D96EAAD002EB687 /* connobject */ = { + isa = PBXGroup; + children = ( + 4A4891861D96EB6A002EB687 /* ConnectionObject.cpp */, + 4A4891871D96EB6A002EB687 /* ConnectionObject.h */, + ); + name = connobject; + sourceTree = ""; + }; 4A6DA3431CAC047600A15B3D /* actmgr */ = { isa = PBXGroup; children = ( @@ -451,8 +449,9 @@ children = ( 4A6DA3431CAC047600A15B3D /* actmgr */, 4A83E3CB1B2370CE003294C2 /* search */, - 4A83E34B1B236E01003294C2 /* carddav */, + 4A83E34B1B236E01003294C2 /* carddav2 */, 4A83E34F1B236F06003294C2 /* common */, + 4A4891821D96EAAD002EB687 /* connobject */, 4A83E3781B236F54003294C2 /* contacteditor */, 4A83E3C01B237022003294C2 /* export */, 4A83E3CA1B2370A3003294C2 /* import */, @@ -481,6 +480,7 @@ 4A83E3341B236DD7003294C2 /* frmNewAccount.cpp */, 4A83E3351B236DD7003294C2 /* frmNewAccount.h */, 4A6DA3F01CB044EA00A15B3D /* frmNewAccount.mm */, + 4A48918C1D973121002EB687 /* frmNewAccount-CardDAV2.cpp */, 4A83E3361B236DD7003294C2 /* frmPreferences.cpp */, 4A83E3371B236DD7003294C2 /* frmPreferences.h */, 4A83E33A1B236DD7003294C2 /* frmSSLCertificate.cpp */, @@ -493,21 +493,13 @@ name = src; sourceTree = ""; }; - 4A83E34B1B236E01003294C2 /* carddav */ = { + 4A83E34B1B236E01003294C2 /* carddav2 */ = { isa = PBXGroup; children = ( - 4A83E34C1B236E12003294C2 /* carddav.cpp */, - 4A83E34D1B236E12003294C2 /* carddav.h */, - 4A6DA34C1CAC04E100A15B3D /* carddav-connect.cpp */, - 4A6DA34D1CAC04E100A15B3D /* carddav-contactlist.cpp */, - 4A6DA34E1CAC04E100A15B3D /* carddav-defaultadrurl.cpp */, - 4A6DA34F1CAC04E100A15B3D /* carddav-processdata.cpp */, - 4A6DA3501CAC04E100A15B3D /* carddav-servercontact.cpp */, - 4A6DA3511CAC04E100A15B3D /* carddav-serveretag.cpp */, - 4A6DA3521CAC04E100A15B3D /* carddav-sslverify.cpp */, - 4A6DA3F71CB0F54A00A15B3D /* carddav-sslverify.mm */, + 4A4891831D96EB50002EB687 /* carddav2.cpp */, + 4A4891841D96EB50002EB687 /* carddav2.h */, ); - name = carddav; + name = carddav2; sourceTree = ""; }; 4A83E34F1B236F06003294C2 /* common */ = { @@ -753,6 +745,7 @@ }; 4ABACC681B20E7AE001368B0 = { CreatedOnToolsVersion = 6.3.2; + ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.ApplicationGroups.Mac = { enabled = 0; @@ -808,6 +801,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 4A48918E1D9733DA002EB687 /* frmNewAccount-CardDAV2.cpp in Sources */, + 4A4891891D972347002EB687 /* carddav2.cpp in Sources */, + 4A48918A1D972347002EB687 /* ConnectionObject.cpp in Sources */, 4A6DA3A81CAC069D00A15B3D /* frmContactEditor-Picture.cpp in Sources */, 4A6DA39E1CAC069D00A15B3D /* frmContactEditor-Category.cpp in Sources */, 4A6DA4001CB1CE0400A15B3D /* frmMain.mm in Sources */, @@ -820,7 +816,6 @@ 4A83E3D81B237157003294C2 /* vcard34conv.cpp in Sources */, 4A83E3771B236F21003294C2 /* uuid.cpp in Sources */, 4A6DA3BE1CAC069D00A15B3D /* frmContactEditorTimezones.cpp in Sources */, - 4A6DA3531CAC04E100A15B3D /* carddav-connect.cpp in Sources */, 4A6DA3A71CAC069D00A15B3D /* frmContactEditor-Other.cpp in Sources */, 4A83E3DC1B237178003294C2 /* XABAccountView.cpp in Sources */, 4A6DA3AF1CAC069D00A15B3D /* frmContactEditorCategory.cpp in Sources */, @@ -850,7 +845,6 @@ 4A6DA3471CAC049B00A15B3D /* frmActivityMgr-tasks.cpp in Sources */, 4A6DA3B01CAC069D00A15B3D /* frmContactEditorEmail.cpp in Sources */, 4A83E3471B236DD7003294C2 /* frmPreferences.cpp in Sources */, - 4A6DA3561CAC04E100A15B3D /* carddav-processdata.cpp in Sources */, 4A6DA3AE1CAC069D00A15B3D /* frmContactEditorCalAdr.cpp in Sources */, 4A6DA3AA1CAC069D00A15B3D /* frmContactEditor-Save.cpp in Sources */, 4A6DA3481CAC049B00A15B3D /* frmActivityMgr.cpp in Sources */, @@ -871,16 +865,12 @@ 4A6DA3BA1CAC069D00A15B3D /* frmContactEditorRelated.cpp in Sources */, 4A6DA3B91CAC069D00A15B3D /* frmContactEditorPicture.cpp in Sources */, 4A6DA39C1CAC069D00A15B3D /* frmContactEditor-Business.cpp in Sources */, - 4A6DA3541CAC04E100A15B3D /* carddav-contactlist.cpp in Sources */, - 4A6DA3591CAC04E100A15B3D /* carddav-sslverify.cpp in Sources */, 4A83E3F01B238813003294C2 /* import.cpp in Sources */, 4A6DA3D91CAC0AAC00A15B3D /* XABContactMenu.cpp in Sources */, 4A6DA3A11CAC069D00A15B3D /* frmContactEditor-Groups.cpp in Sources */, - 4A83E34E1B236E12003294C2 /* carddav.cpp in Sources */, 4ADDA7F51B222936007AD131 /* main.cpp in Sources */, 4A6DA3D11CAC0A8900A15B3D /* frmSearchAccounts.cpp in Sources */, 4A83E3751B236F21003294C2 /* textprocessing.cpp in Sources */, - 4A6DA3F81CB0F54A00A15B3D /* carddav-sslverify.mm in Sources */, 4A83E3491B236DD7003294C2 /* frmSSLCertificate.cpp in Sources */, 4A83E36D1B236F21003294C2 /* dirs.cpp in Sources */, 4A83E3701B236F21003294C2 /* filename.cpp in Sources */, @@ -897,10 +887,8 @@ 4A83E3C71B237033003294C2 /* export-vcard3.cpp in Sources */, 4A6DA3BB1CAC069D00A15B3D /* frmContactEditorRoles.cpp in Sources */, 4A6DA3F11CB044EA00A15B3D /* frmNewAccount.mm in Sources */, - 4A6DA3581CAC04E100A15B3D /* carddav-serveretag.cpp in Sources */, 4A6DA3AC1CAC069D00A15B3D /* frmContactEditor.cpp in Sources */, 4A83E3411B236DD7003294C2 /* frmConflictResolution.cpp in Sources */, - 4A6DA3551CAC04E100A15B3D /* carddav-defaultadrurl.cpp in Sources */, 4A83E3461B236DD7003294C2 /* frmNewAccount.cpp in Sources */, 4A83E3C91B237033003294C2 /* export.cpp in Sources */, 4A83E3421B236DD7003294C2 /* frmContact.cpp in Sources */, @@ -908,7 +896,6 @@ 4A83E3441B236DD7003294C2 /* frmInvalidSSLCertificate.cpp in Sources */, 4A83E3711B236F21003294C2 /* getcontactinfo.cpp in Sources */, 4A83E3741B236F21003294C2 /* svrblist.cpp in Sources */, - 4A6DA3571CAC04E100A15B3D /* carddav-servercontact.cpp in Sources */, 4A6DA3A31CAC069D00A15B3D /* frmContactEditor-Init.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1018,7 +1005,6 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -1064,7 +1050,6 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; @@ -1095,7 +1080,6 @@ CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; CODE_SIGN_ENTITLEMENTS = ""; - CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; CURL_FRAMEWORKPATH = "/Volumes/XestiaDevel/Library/curl-7.49.0/"; FRAMEWORK_SEARCH_PATHS = ( @@ -1125,7 +1109,7 @@ "$(WXROOT)/include", "$(WXROOT)/build/osx/setup/cocoa/include", "$(WXROOT)/samples/minimal", - "$(LIBXML2_PATH)/include", + "$(LIBXML2_PATH)/include/", "$(inherited)", ); INFOPLIST_FILE = "$(SRCROOT)/Info_cocoa.plist"; @@ -1178,7 +1162,6 @@ CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; CODE_SIGN_ENTITLEMENTS = ""; - CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; CURL_FRAMEWORKPATH = "/Volumes/XestiaDevel/Library/curl-7.49.0/"; FRAMEWORK_SEARCH_PATHS = ( @@ -1208,7 +1191,7 @@ "$(WXROOT)/include", "$(WXROOT)/build/osx/setup/cocoa/include", "$(WXROOT)/samples/minimal", - "$(LIBXML2_PATH)/include", + "$(LIBXML2_PATH)/include/", "$(inherited)", ); INFOPLIST_FILE = "$(SRCROOT)/Info_cocoa.plist"; diff --git a/source/actmgr/frmActivityMgr.cpp b/source/actmgr/frmActivityMgr.cpp index 7232694..af6b832 100644 --- a/source/actmgr/frmActivityMgr.cpp +++ b/source/actmgr/frmActivityMgr.cpp @@ -330,6 +330,27 @@ void frmActivityMgr::ProcessTasksThread() frmMainPtrGet->PauseAllTimers(); #if defined(__APPLE__) + + ConnObjectIter->second->BypassSSLVerification(true); + + COConnectResult ConnectionSSLResult = ConnObjectIter->second->Connect(false); + + ConnObjectIter->second->BypassSSLVerification(false); + + int SSLResult = DisplayTrustPanel(ConnObjectIter->second->BuildSSLCollection(), AccountNameFriendly); + + if (SSLResult != NSOKButton){ + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnObjectIter->second->BuildSSLCollection()); + iter->second = 2; + break; + + } else { + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); + + } + #elif defined(__WIN32__) ConnObjectIter->second->BypassSSLVerification(true); @@ -462,7 +483,7 @@ void frmActivityMgr::ProcessTasksThread() #if defined(__APPLE__) - frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetTrustObject()); + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); #elif defined(__WIN32__) @@ -553,6 +574,27 @@ void frmActivityMgr::ProcessTasksThread() frmMainPtrGet->PauseAllTimers(); #if defined(__APPLE__) + + ConnObjectIter->second->BypassSSLVerification(true); + + COConnectResult ConnectionSSLResult = ConnObjectIter->second->Connect(false); + + ConnObjectIter->second->BypassSSLVerification(false); + + int SSLResult = DisplayTrustPanel(ConnObjectIter->second->BuildSSLCollection(), AccountNameFriendly); + + if (SSLResult != NSOKButton){ + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnObjectIter->second->BuildSSLCollection()); + iter->second = 2; + break; + + } else { + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); + + } + #elif defined(__WIN32__) ConnObjectIter->second->BypassSSLVerification(true); @@ -847,6 +889,27 @@ void frmActivityMgr::ProcessTasksThread() frmMainPtrGet->PauseAllTimers(); #if defined(__APPLE__) + + ConnObjectIter->second->BypassSSLVerification(true); + + COConnectResult ConnectionSSLResult = ConnObjectIter->second->Connect(false); + + ConnObjectIter->second->BypassSSLVerification(false); + + int SSLResult = DisplayTrustPanel(ConnObjectIter->second->BuildSSLCollection(), AccountNameFriendly); + + if (SSLResult != NSOKButton){ + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnObjectIter->second->BuildSSLCollection()); + iter->second = 2; + break; + + } else { + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); + + } + #elif defined(__WIN32__) ConnObjectIter->second->BypassSSLVerification(true); @@ -979,7 +1042,7 @@ void frmActivityMgr::ProcessTasksThread() #if defined(__APPLE__) - frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetTrustObject()); + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); #elif defined(__WIN32__) @@ -1102,6 +1165,27 @@ void frmActivityMgr::ProcessTasksThread() frmMainPtrGet->PauseAllTimers(); #if defined(__APPLE__) + + ConnObjectIter->second->BypassSSLVerification(true); + + COConnectResult ConnectionSSLResult = ConnObjectIter->second->Connect(false); + + ConnObjectIter->second->BypassSSLVerification(false); + + int SSLResult = DisplayTrustPanel(ConnObjectIter->second->BuildSSLCollection(), AccountNameFriendly); + + if (SSLResult != NSOKButton){ + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnObjectIter->second->BuildSSLCollection()); + iter->second = 2; + break; + + } else { + + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); + + } + #elif defined(__WIN32__) ConnObjectIter->second->BypassSSLVerification(true); @@ -1215,6 +1299,19 @@ void frmActivityMgr::ProcessTasksThread() ConnectResponse = ConnObjectIter->second->Connect(true); + if (ConnectResponse == COCONNECT_OK){ + + ExitLoop = true; + break; + + } else { + + ExitLoop = true; + iter->second = 2; + break; + + } + ExitLoop = true; break; @@ -1230,7 +1327,7 @@ void frmActivityMgr::ProcessTasksThread() #if defined(__APPLE__) - frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetTrustObject()); + frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnObjectIter->second->BuildSSLCollection()); #elif defined(__WIN32__) @@ -2180,4 +2277,4 @@ void frmActivityMgr::UpdateStatusLabel(wxCommandEvent& event){ } -} \ No newline at end of file +} diff --git a/source/actmgr/frmActivityMgr.mm b/source/actmgr/frmActivityMgr.mm index 799ae8f..5757b1d 100644 --- a/source/actmgr/frmActivityMgr.mm +++ b/source/actmgr/frmActivityMgr.mm @@ -17,7 +17,6 @@ // with Xestia Address Book. If not, see #include "frmActivityMgr.h" -#include "../carddav/carddav.h" int frmActivityMgr::DisplayTrustPanel(SecTrustRef SecurityTrustObject, wxString AccountNameFriendly){ @@ -48,4 +47,4 @@ int frmActivityMgr::DisplayTrustPanel(SecTrustRef SecurityTrustObject, wxString return ResultValue; -} \ No newline at end of file +} diff --git a/source/frmEditAccount.cpp b/source/frmEditAccount.cpp index d0f7eff..b4f25a7 100644 --- a/source/frmEditAccount.cpp +++ b/source/frmEditAccount.cpp @@ -93,6 +93,22 @@ void frmEditAccount::DetectAddressBook( wxCommandEvent& event ) if (TestConnection.SSLVerify() == COSSL_UNABLETOVERIFY){ #if defined(__APPLE__) + + TestConnection.BypassSSLVerification(true); + + COConnectResult TestConnectionResult = TestConnection.Connect(false); + + TestConnection.BypassSSLVerification(false); + + int SSLResult = DisplayTrustPanel(&TestConnection); + + if (SSLResult != NSOKButton){ + + wxMessageBox(_("An error occured whilst connnecting: ") + TestConnection.GetErrorMessage(), _("Failed"), wxOK+wxICON_ERROR); + return; + + } + #elif defined(__WIN32__) TestConnection.BypassSSLVerification(true); @@ -354,4 +370,4 @@ bool frmEditAccount::GetDialogResult(){ return DialogResult; -} \ No newline at end of file +} diff --git a/source/frmEditAccount.h b/source/frmEditAccount.h index 2cc4bd8..a151528 100644 --- a/source/frmEditAccount.h +++ b/source/frmEditAccount.h @@ -28,7 +28,7 @@ Subclass of frmEditAccountADT, which is generated by wxFormBuilder. #include #include "frmInvalidSSLCertificate.h" #include "common/svrblist.h" -#include "carddav2/carddav2.h" +#include "connobject/ConnectionObject.h" #if defined(__WIN32__) #include "common/win32ssl.h" @@ -57,7 +57,7 @@ class frmEditAccount : public frmEditAccountADT wxString AccName; bool DialogResult = false; #if defined(__APPLE__) - int DisplayTrustPanel(CardDAV *Connection); + int DisplayTrustPanel(ConnectionObject *Connection); #endif //// end generated class members diff --git a/source/frmEditAccount.mm b/source/frmEditAccount.mm index 1db02ab..9e5bc52 100644 --- a/source/frmEditAccount.mm +++ b/source/frmEditAccount.mm @@ -20,7 +20,7 @@ #include "frmEditAccount.h" -int frmEditAccount::DisplayTrustPanel(CardDAV *Connection){ +int frmEditAccount::DisplayTrustPanel(ConnectionObject *Connection){ NSInteger ResultValue; @@ -33,8 +33,8 @@ int frmEditAccount::DisplayTrustPanel(CardDAV *Connection){ [secpanel setParentWindow:(NSWindow*)this->GetHandle()]; - ResultValue = [secpanel runModalForTrust:Connection->GetTrustObject() message:@"Certificate not trusted"]; + ResultValue = [secpanel runModalForTrust:Connection->BuildSSLCollection() message:@"Certificate not trusted"]; return (int)ResultValue; -} \ No newline at end of file +} diff --git a/source/frmNewAccount-CardDAV2.cpp b/source/frmNewAccount-CardDAV2.cpp index 8e5fe3c..214e84f 100644 --- a/source/frmNewAccount-CardDAV2.cpp +++ b/source/frmNewAccount-CardDAV2.cpp @@ -48,6 +48,51 @@ void frmNewAccount::RunCardDAV2Test( wxCommandEvent& event ){ if (TestConnection.SSLVerify() == COSSL_UNABLETOVERIFY){ #if defined(__APPLE__) + + TestConnection.BypassSSLVerification(true); + + COConnectResult TestConnectionResult = TestConnection.Connect(false); + + TestConnection.BypassSSLVerification(false); + + int SSLResult = DisplayTrustPanel(&TestConnection); + + if (SSLResult != NSOKButton){ + + lblServerConnResult->SetLabel(_("Failed")); + lblServerResponse->SetLabel(_("Not applicable")); + lblServerSSLResult->SetLabel(_("Used")); + lblServerSSLValid->SetLabel(_("No")); + lblConnectionResultText->SetLabel(_("An error occured whilst connnecting: ") + TestConnection.GetErrorMessage()); + btnPrevious->Enable(true); + return; + + } else { + + // Evalulate the trust object. + + SecTrustResultType EvalResult = ProcessResultType(&TestConnection); + + switch(EvalResult){ + case kSecTrustResultProceed: + lblServerSSLValid->SetLabel(_("Verified")); + break; + case kSecTrustResultConfirm: + lblServerSSLValid->SetLabel(_("Verified (user)")); + break; + default: + lblServerSSLValid->SetLabel(_("Unable to verify")); + } + + lblServerResponse->SetLabel(_("Not applicable")); + lblServerSSLResult->SetLabel(_("Used")); + + if (EvalResult != kSecTrustResultProceed){ + return; + } + + } + #elif defined(__WIN32__) TestConnection.BypassSSLVerification(true); @@ -160,4 +205,4 @@ void frmNewAccount::RunCardDAV2Test( wxCommandEvent& event ){ ResultsEvent.SetClientData(ResultData); wxPostEvent(this, ResultsEvent); -} \ No newline at end of file +} diff --git a/source/frmNewAccount.h b/source/frmNewAccount.h index 30e2a3e..6ef8b0c 100644 --- a/source/frmNewAccount.h +++ b/source/frmNewAccount.h @@ -51,8 +51,8 @@ protected: void WriteAccountDetails( wxFileConfig *cfgfilein, wxString AccountType, wxString DirectoryName ); void RunCardDAV2Test( wxCommandEvent& event ); #if defined(__APPLE__) - int DisplayTrustPanel(CardDAV *Connection); - SecTrustResultType ProcessResultType(CardDAV *Connection); + int DisplayTrustPanel(ConnectionObject *Connection); + SecTrustResultType ProcessResultType(ConnectionObject *Connection); #endif public: /** Constructor */ diff --git a/source/frmNewAccount.mm b/source/frmNewAccount.mm index 690d1f2..2531ba0 100644 --- a/source/frmNewAccount.mm +++ b/source/frmNewAccount.mm @@ -20,9 +20,9 @@ #import #include "frmNewAccount.h" -#include "carddav/carddav.h" +#include "connobject/ConnectionObject.h" -int frmNewAccount::DisplayTrustPanel(CardDAV *Connection){ +int frmNewAccount::DisplayTrustPanel(ConnectionObject *Connection){ NSInteger ResultValue; @@ -35,18 +35,18 @@ int frmNewAccount::DisplayTrustPanel(CardDAV *Connection){ [secpanel setParentWindow:(NSWindow*)this->GetHandle()]; - ResultValue = [secpanel runModalForTrust:Connection->GetTrustObject() message:@"Certificate not trusted"]; + ResultValue = [secpanel runModalForTrust:Connection->BuildSSLCollection() message:@"Certificate not trusted"]; return (int)ResultValue; } -SecTrustResultType frmNewAccount::ProcessResultType(CardDAV *Connection){ +SecTrustResultType frmNewAccount::ProcessResultType(ConnectionObject *Connection){ SecTrustResultType EvalResult; - SecTrustEvaluate(Connection->GetTrustObject(), &EvalResult); + SecTrustEvaluate(Connection->BuildSSLCollection(), &EvalResult); return EvalResult; -} \ No newline at end of file +} -- 2.39.5