28#if OO_OXP_VERIFIER_ENABLED
32static NSString *
const kStageName =
@"Checking demoships.plist";
35@interface OOCheckDemoShipsPListVerifierStage (OOPrivate)
37- (void)runCheckWithDemoShips:(NSArray *)demoshipsPList shipData:(NSDictionary *)shipdataPList;
54 fileScanner = [[
self verifier] fileScannerStage];
55 return [fileScanner
fileExists:@"demoships.plist"
65 NSArray *demoshipsPList =
nil;
66 NSDictionary *shipdataPList =
nil;
68 fileScanner = [[
self verifier] fileScannerStage];
70 demoshipsPList = [fileScanner
plistNamed:@"demoships.plist"
75 if (demoshipsPList ==
nil)
return;
78 if (![demoshipsPList isKindOfClass:[NSArray
class]])
80 OOLog(
@"verifyOXP.demoshipsPList.notArray",
@"%@",
@"***** ERROR: demoships.plist is not an array.");
85 shipdataPList = [fileScanner
plistNamed:@"shipdata.plist"
90 if (shipdataPList ==
nil)
return;
93 if (![shipdataPList isKindOfClass:[NSDictionary
class]])
95 OOLog(
@"verifyOXP.demoshipsPList.notDict",
@"%@",
@"***** ERROR: shipdata.plist is not a dictionary.");
99 [
self runCheckWithDemoShips:demoshipsPList shipData:shipdataPList];
105@implementation OOCheckDemoShipsPListVerifierStage (OOPrivate)
107- (void)runCheckWithDemoShips:(NSArray *)demoshipsPList shipData:(NSDictionary *)shipdataPList
109 NSEnumerator *nameEnum =
nil;
110 NSString *name =
nil;
112 for (nameEnum = [demoshipsPList objectEnumerator]; (name = [nameEnum nextObject]); )
114 if ([shipdataPList objectForKey:name] ==
nil)
116 OOLog(
@"verifyOXP.demoshipsPList.unknownShip",
@"----- WARNING: demoships.plist entry \"%@\
" not found in shipdata.plist.", name);
static NSString *const kStageName
static NSString *const kStageName
#define OOLog(class, format,...)
id plistNamed:inFolder:referencedFrom:checkBuiltIn:(NSString *file,[inFolder] NSString *folder,[referencedFrom] NSString *context,[checkBuiltIn] BOOL checkBuiltIn)
BOOL fileExists:inFolder:referencedFrom:checkBuiltIn:(NSString *file,[inFolder] NSString *folder,[referencedFrom] NSString *context,[checkBuiltIn] BOOL checkBuiltIn)