2005-07-14 Helge Hess <helge.hess@opengroupware.org>
+ * SOGoSharedMailAccount.m: prepared code to support a shared INBOX
+ folder (v0.9.101)
+
* v0.9.100
* SOGoMailAccounts.m: create an object of class SOGoSharedMailAccount
mail accounts
* added SOGoSharedMailAccount class for shared mailboxes
-
+
2005-07-12 Helge Hess <helge.hess@opengroupware.org>
* SOGoMailAccounts.m: use new SoUser API instead of AgenorUserManager
/* listing the available folders */
- (NSArray *)toManyRelationshipKeys {
- NSArray *a, *b;
+ NSMutableArray *m;
+ NSArray *b;
- a = [self additionalRootFolderNames];
- // TODO: we also need to add the INBOX here (the 'real' INBOX is the root)
+ m = [NSMutableArray arrayWithCapacity:16];
- b = [[self imap4Connection] subfoldersForURL:[self imap4URL]];
- return [b count] > 0 ? [b arrayByAddingObjectsFromArray:a] : a;
+ [m addObject:@"INBOX"]; /* special for shared, see -lookupInboxFolder:.. */
+
+ if ((b = [[self imap4Connection] subfoldersForURL:[self imap4URL]]) != nil)
+ [m addObjectsFromArray:b];
+
+ [m addObjectsFromArray:[self additionalRootFolderNames]];
+ return m;
}
/* IMAP4 locator */
return s;
}
+/* lookup */
+
+- (id)lookupInboxFolder:(NSString *)_key inContext:(id)_ctx {
+ /*
+ Note: We have a choice: Cyrus does both, it gives the user an own
+ INBOX folder, but it also provides access to the mailbox INBOX
+ folder.
+ However the mailbox INBOX folder is NOT returned as an "INBOX"
+ subcollection as usual, but is the primary mailbox name.
+ Eg:
+ 2 list "*" "*"
+ * LIST (\Noinferiors) "/" "INBOX"
+ * LIST (\HasChildren) "/" "Boite partag&AOk-e/alienor.a"
+
+ The first INBOX is auto-assigned for the user by Cyrus, the second entry
+ is actually the INBOX of the mailbox itself (alienor.a).
+ */
+ [self logWithFormat:@"TODO: return shared Inbox folder ..."];
+ return nil;
+}
+
+- (id)lookupName:(NSString *)_key inContext:(id)_ctx acquire:(BOOL)_flag {
+ if ([_key isEqualToString:@"INBOX"])
+ return [self lookupInboxFolder:_key inContext:_ctx];
+
+ return [super lookupName:_key inContext:_ctx acquire:_flag];
+}
+
@end /* SOGoSharedMailAccount */
# Version file
-SUBMINOR_VERSION:=100
+SUBMINOR_VERSION:=101
# v0.9.96 requires libNGMime v4.5.223
# v0.9.91 requires libNGMime v4.5.222
+2005-07-14 Helge Hess <helge.hess@opengroupware.org>
+
+ * UIxMailAccountView.m: removed methods to detect whether the
+ clientObject is a shared account (done by the clientObject itself)
+ (v0.9.140)
+
2005-07-12 Helge Hess <helge.hess@opengroupware.org>
* UIxMailEditor.m: perform some validation plus error handling prior
return [[[self clientObject] nameInContainer] titleForSOGoIMAP4String];
}
-- (BOOL)isShareAccount {
- return [[[self clientObject] nameInContainer] rangeOfString:@".-."].length >0
- ? YES : NO;
-}
-
-- (NSString *)fullSharePath {
- NSRange r;
- NSString *s;
-
- s = [[self clientObject] nameInContainer];
- r = [s rangeOfString:@".-."];
- if (r.length == 0) return nil;
-
- s = [s substringFromIndex:(r.location + r.length)];
- r = [s rangeOfString:@"@"];
- if (r.length == 0) return s;
-
- return [s substringToIndex:r.location];
-}
-
- (NSString *)panelTitle {
NSString *s;
# version file
-SUBMINOR_VERSION:=139
+SUBMINOR_VERSION:=140
+# v0.9.140 requires SoObjects/Mailer v0.9.100
# v0.9.134 requires libSOGo v0.9.41
# v0.9.100 requires libNGMime v4.5.213
# v0.9.99 requires libNGMime v4.5.212
+2005-07-14 Helge Hess <helge.hess@opengroupware.org>
+
+ * UIxMailAccountView.wox: directly access the clientObject to get share
+ information
+
2005-07-14 Marcus Mueller <znek@mulle-kybernetik.com>
* UIxCalSelectTab.wox: removed 'Schedule' tab.
title="panelTitle"
>
<div class="titlediv">
- <var:if condition="isShareAccount">
+ <var:if condition="clientObject.isSharedAccount">
<var:string label:value="Share: " />
</var:if>
- <var:if condition="isShareAccount" const:negate="1">
+ <var:if condition="clientObject.isSharedAccount" const:negate="1">
<var:string label:value="Account: " />
</var:if>
<var:string value="objectTitle"/>
<div style="font-weight: bold; font-size: 16px;">
SOGo Mail -
- <var:if condition="isShareAccount">
+ <var:if condition="clientObject.isSharedAccount">
<var:string label:value="Shared Account: " />
</var:if>
<var:string value="objectTitle"/>
</div>
<br />
- <var:if condition="isShareAccount">
+ <var:if condition="clientObject.isSharedAccount">
<div>
<var:string label:value="Share: " />
- <var:string value="fullSharePath" />
+ <var:string value="clientObject.sharedAccountName" />
</div>
</var:if>
<br />