Develop and Download Open Source Software

Browse CVS Repository

Contents of /undmail/guiproto/DUMMailBoxManager.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sat Jan 25 13:23:47 2003 UTC (21 years, 2 months ago) by footashida
Branch: MAIN
*** empty log message ***

1 #import "DUMMailBoxManager.h"
2 #import "DUMMailBox.h"
3
4 @implementation DUMMailBoxManager
5 -(id)init{
6 DUMMailBox *inbox;
7 DUMMailBox *outbox;
8 DUMMailBox *sent;
9 NSBundle *mainBundle;
10 NSString *resourcePath;
11
12 self = [super init];
13 mainBundle = [NSBundle mainBundle];
14 resourcePath = [mainBundle pathForResource:@"undmail-dev" ofType:@"txt"];
15
16 // デフォルトのメールボックスを作成
17 root = [[self createMailBox:@"/"] retain];
18 inbox = [[DUMMailBox alloc] initWithName:
19 [mainBundle localizedStringForKey:@"FolderLabel_Inbox"
20 value:nil
21 table:nil]
22 dataFilePath:resourcePath];
23 outbox = [[DUMMailBox alloc] initWithName:
24 [mainBundle localizedStringForKey:@"FolderLabel_Outbox"
25 value:nil
26 table:nil]
27 dataFilePath:nil];
28 sent = [[DUMMailBox alloc] initWithName:
29 [mainBundle localizedStringForKey:@"FolderLabel_Sent"
30 value:nil
31 table:nil]
32 dataFilePath:nil];
33
34 [root addMailBox:inbox];
35 [root addMailBox:outbox];
36 [root addMailBox:sent];
37
38 [inbox release];
39 [outbox release];
40 [sent release];
41
42 return self;
43 }
44 -(void)dealloc{
45 [root release];
46 [super dealloc];
47 }
48 -(DUMMailBox *)rootMailBox{
49 return root;
50 }
51 -(DUMMailBox *)createMailBox:(NSString *)name{
52 return [[[DUMMailBox alloc] initWithName:name dataFilePath:nil] autorelease];
53 }
54
55 @end

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26