source: trunk/SapphirePredicates.m @ 123

Last change on this file since 123 was 123, checked in by pmerrill, 10 years ago
  • changed MyCompany? name to www.nanopi.net
  • added xml importing to the file import tool
File size: 1003 bytes
Line 
1//
2//  SapphirePredicates.m
3//  Sapphire
4//
5//  Created by Graham Booker on 6/23/07.
6//  Copyright 2007 __www.nanopi.net__. All rights reserved.
7//
8
9#import "SapphirePredicates.h"
10#import "SapphireMetaData.h"
11
12@implementation SapphirePredicate
13
14- (BOOL)accept:(NSString *)path meta:(SapphireFileMetaData *)metaData
15{
16        return NO;
17}
18
19@end
20
21@implementation SapphireUnwatchedPredicate
22
23- (BOOL)accept:(NSString *)path meta:(SapphireFileMetaData *)metaData
24{
25        if(metaData == nil)
26                return YES;
27        else if(![metaData watched])
28                return YES;
29        return NO;
30}
31
32@end
33
34@implementation SapphireFavoritePredicate
35
36- (BOOL)accept:(NSString *)path meta:(SapphireFileMetaData *)metaData
37{
38
39        if(metaData == nil)
40                return NO;
41        else if([metaData favorite])
42                return YES;
43        return NO;
44
45}
46
47@end
48
49@implementation SapphireTopShowPredicate
50
51- (BOOL)accept:(NSString *)path meta:(SapphireFileMetaData *)metaData
52{
53/*
54        if(metaData == nil)
55                return YES;
56        else if(![metaData topShow])
57                return YES;
58        return NO;
59*/
60        return YES ;
61}
62
63@end
Note: See TracBrowser for help on using the repository browser.