From 00846c463cba67f5784f9e289b0b531ead356fdc Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 18 Aug 2021 13:32:33 -0400 Subject: [PATCH] style(addressbook(obj-c)): add comments --- SoObjects/Contacts/NGVCard+SOGo.m | 6 ++++++ SoObjects/Contacts/SOGoContactFolder.h | 3 +-- SoObjects/Contacts/SOGoContactSourceFolder.m | 6 ++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/SoObjects/Contacts/NGVCard+SOGo.m b/SoObjects/Contacts/NGVCard+SOGo.m index 0f7912b4c..d5b5ed8c2 100644 --- a/SoObjects/Contacts/NGVCard+SOGo.m +++ b/SoObjects/Contacts/NGVCard+SOGo.m @@ -480,6 +480,7 @@ convention: max = [elements count]; if (max > 0) { + // We convert two email addresses at most workMail = [self _simpleValueForType: @"work" inArray: elements excluding: nil]; homeMail = [self _simpleValueForType: @"home" @@ -539,6 +540,11 @@ convention: } } +/** + * Convert vCard to LDIF using the Mozilla LDAP Address Book Schema + * + * https://wiki.mozilla.org/MailNews:Mozilla_LDAP_Address_Book_Schema + */ - (NSMutableDictionary *) asLDIFRecord { NSArray *elements, *categories; diff --git a/SoObjects/Contacts/SOGoContactFolder.h b/SoObjects/Contacts/SOGoContactFolder.h index 7d52b232d..65843f6c9 100644 --- a/SoObjects/Contacts/SOGoContactFolder.h +++ b/SoObjects/Contacts/SOGoContactFolder.h @@ -1,6 +1,5 @@ /* - Copyright (C) 2006-2011 Inverse inc. - Copyright (C) 2004-2005 SKYRIX Software AG + Copyright (C) 2006-2017 Inverse inc. This file is part of SOGo. diff --git a/SoObjects/Contacts/SOGoContactSourceFolder.m b/SoObjects/Contacts/SOGoContactSourceFolder.m index 23254a1c6..dd6121b64 100644 --- a/SoObjects/Contacts/SOGoContactSourceFolder.m +++ b/SoObjects/Contacts/SOGoContactSourceFolder.m @@ -136,8 +136,14 @@ NSArray *type; resourceType = [NSMutableArray arrayWithArray: [super davResourceType]]; + + // CARDDAV:addressbook + // https://datatracker.ietf.org/doc/html/rfc6352#section-5.2 type = [NSArray arrayWithObjects: @"addressbook", XMLNS_CARDDAV, nil]; [resourceType addObject: type]; + + // CARDDAV:directory + // https://datatracker.ietf.org/doc/html/draft-daboo-carddav-directory-gateway-02#section-4.1 type = [NSArray arrayWithObjects: @"directory", XMLNS_CARDDAV, nil]; [resourceType addObject: type];