source: trunk/SapphireMultipleImporter.m @ 409

Revision 409, 2.0 KB checked in by gbooker, 7 years ago (diff)

Background importer of file data. Handles crashes gracefully.

Line 
1/*
2 * SapphireMultipleImporter.m
3 * Sapphire
4 *
5 * Created by Graham Booker on Aug. 29, 2007.
6 * Copyright 2007 Sapphire Development Team and/or www.nanopi.net
7 * All rights reserved.
8 *
9 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
10 * General Public License as published by the Free Software Foundation; either version 3 of the License,
11 * or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
14 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
15 * Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along with this program; if not,
18 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19 */
20
21#import "SapphireMultipleImporter.h"
22
23
24@implementation SapphireMultipleImporter
25
26- (id)initWithImporters:(NSArray *)importerList
27{
28        self = [super init];
29        if(self == nil)
30                return nil;
31       
32        importers = [importerList retain];
33       
34        return self;
35}
36
37- (void) dealloc
38{
39        [importers release];
40        [super dealloc];
41}
42
43- (BOOL)importMetaData:(id <SapphireFileMetaDataProtocol>)metaData
44{
45        BOOL ret = NO;
46        NSEnumerator *importEnum = [importers objectEnumerator];
47        id <SapphireImporter> importer = nil;
48        while((importer = [importEnum nextObject]) != nil)
49                ret |= [importer importMetaData:metaData];
50       
51        return ret;
52}
53
54- (void)setImporterDataMenu:(SapphireImporterDataMenu *)theDataMenu
55{
56        [importers makeObjectsPerformSelector:@selector(setImporterDataMenu:) withObject:theDataMenu];
57}
58
59- (NSString *)completionText
60{
61        return @"";
62}
63
64- (NSString *)initialText
65{
66        return @"";
67}
68
69- (NSString *)informativeText
70{
71        return @"";
72}
73
74- (NSString *)buttonTitle
75{
76        return @"";
77}
78
79- (void) wasExhumedByPoppingController:(BRLayerController *) controller
80{
81        [importers makeObjectsPerformSelector:@selector(wasExhumedByPoppingController:) withObject:controller];
82}
83
84@end
Note: See TracBrowser for help on using the repository browser.