Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for MobileMe accounts and iCal subscribed calendars. Cred…
…it: David Barroso.
- Loading branch information
Showing
8 changed files
with
458 additions
and
1,389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// SPEmailMobileMeAccount.h | ||
// SpyPhone | ||
// | ||
// Created by Nicolas Seriot on 11/20/09. | ||
// Copyright 2009. | ||
// Licensed under GPL 2.0 http://www.gnu.org/licenses/gpl-2.0.txt | ||
// | ||
|
||
#import "SPEmailAccount.h" | ||
|
||
|
||
@interface SPEmailMobileMeAccount : SPEmailAccount { | ||
|
||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// SPEmailMobileMeAccount.m | ||
// SpyPhone | ||
// | ||
// Created by Nicolas Seriot on 11/20/09. | ||
// Copyright 2009. | ||
// Licensed under GPL 2.0 http://www.gnu.org/licenses/gpl-2.0.txt | ||
// | ||
|
||
#import "SPEmailMobileMeAccount.h" | ||
|
||
|
||
@implementation SPEmailMobileMeAccount | ||
|
||
+ (SPEmailAccount *)accountWithDictionary:(NSDictionary *)d { | ||
SPEmailMobileMeAccount *account = [[SPEmailMobileMeAccount alloc] init]; | ||
|
||
account.type = [d valueForKey:@"Short Type String"]; | ||
account.fullname = [d valueForKey:@"FullUserName"]; | ||
account.emails = [d valueForKey:@"EmailAddresses"]; | ||
account.username = [d valueForKey:@"Username"]; | ||
account.displayName = [d valueForKey:@"DisplayName"]; | ||
|
||
NSMutableArray *theCalendars = [NSMutableArray array]; | ||
NSDictionary *calendars = [d valueForKey:@"Subscribed Calendars"]; | ||
if (calendars) { | ||
for(id calendarItem in [calendars allValues]) { | ||
[theCalendars addObject:[calendarItem valueForKey:@"com.apple.ical.urlsubscribe.url"]]; | ||
} | ||
|
||
account.calendars = theCalendars; | ||
} | ||
return [account autorelease]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.