Monotone-Parent: de6d837f5c2b62b4ad465872fdc54602b3d1009c

Monotone-Revision: 1ccd34fd9ea99e675935d745db7e70d19716428a

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-05-05T13:56:19
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2010-05-05 13:56:19 +00:00
parent 82a38c87fb
commit f7799b9cf8
9 changed files with 68 additions and 150 deletions
+23 -23
View File
@@ -57,40 +57,40 @@ NSNumber *iCalDistantFutureNumber = nil;
}
}
- (BOOL) userIsParticipant: (SOGoUser *) user
- (BOOL) userIsAttendee: (SOGoUser *) user
{
NSEnumerator *participants;
iCalPerson *currentParticipant;
BOOL isParticipant;
NSEnumerator *attendees;
iCalPerson *currentAttendee;
BOOL isAttendee;
isParticipant = NO;
isAttendee = NO;
participants = [[self participants] objectEnumerator];
currentParticipant = [participants nextObject];
while (!isParticipant
&& currentParticipant)
if ([user hasEmail: [currentParticipant rfc822Email]])
isParticipant = YES;
attendees = [[self attendees] objectEnumerator];
currentAttendee = [attendees nextObject];
while (!isAttendee
&& currentAttendee)
if ([user hasEmail: [currentAttendee rfc822Email]])
isAttendee = YES;
else
currentParticipant = [participants nextObject];
currentAttendee = [attendees nextObject];
return isParticipant;
return isAttendee;
}
- (iCalPerson *) userAsParticipant: (SOGoUser *) user
- (iCalPerson *) userAsAttendee: (SOGoUser *) user
{
NSEnumerator *participants;
iCalPerson *currentParticipant, *userParticipant;
NSEnumerator *attendees;
iCalPerson *currentAttendee, *userAttendee;
userParticipant = nil;
userAttendee = nil;
participants = [[self participants] objectEnumerator];
while (!userParticipant
&& (currentParticipant = [participants nextObject]))
if ([user hasEmail: [currentParticipant rfc822Email]])
userParticipant = currentParticipant;
attendees = [[self attendees] objectEnumerator];
while (!userAttendee
&& (currentAttendee = [attendees nextObject]))
if ([user hasEmail: [currentAttendee rfc822Email]])
userAttendee = currentAttendee;
return userParticipant;
return userAttendee;
}
- (BOOL) userIsOrganizer: (SOGoUser *) user