source: trunk/SapphireMetaData.h @ 8

Revision 8, 1.9 KB checked in by gbooker, 7 years ago (diff)

Predicate matching.

Line 
1//
2//  SapphireMetaData.h
3//  Sapphire
4//
5//  Created by Graham Booker on 6/22/07.
6//  Copyright 2007 __MyCompanyName__. All rights reserved.
7//
8
9#import <Cocoa/Cocoa.h>
10#import "SapphirePredicates.h"
11
12@class SapphireMetaData, SapphireFileMetaData, SapphireDirectoryMetaData;
13
14@protocol SapphireMetaDataDelegate <NSObject>
15- (void)updateComplete;
16@end
17
18@interface SapphireMetaData : NSObject {
19        NSMutableDictionary                             *metaData;
20        SapphireMetaData                                *parent;
21        NSString                                                *path;
22        id <SapphireMetaDataDelegate>   delegate;
23}
24
25- (NSString *)path;
26
27- (void)setDelegate:(id <SapphireMetaDataDelegate>)newDelegate;
28- (void)writeMetaData;
29- (void)cancelImport;
30- (void)resumeImport;
31
32@end
33
34@interface SapphireMetaDataCollection : SapphireMetaData {
35        SapphireDirectoryMetaData       *mainDirectory;
36        NSString                                        *dictionaryPath;
37}
38- (id)initWithFile:(NSString *)dictionary path:(NSString *)myPath;
39- (SapphireDirectoryMetaData *)rootDirectory;
40
41@end
42
43@interface SapphireDirectoryMetaData : SapphireMetaData {
44        NSMutableDictionary     *metaFiles;
45        NSMutableDictionary     *metaDirs;
46        NSMutableDictionary     *cachedMetaFiles;
47        NSMutableDictionary     *cachedMetaDirs;
48
49        NSMutableArray          *files;
50        NSMutableArray          *directories;
51       
52        NSTimer                         *importTimer;
53        NSMutableArray          *importArray;
54}
55
56- (void)reloadDirectoryContents;
57- (NSArray *)files;
58- (NSArray *)directories;
59- (NSArray *)predicatedFiles:(metaDataPredicate)predicate;
60- (NSArray *)predicatedDirectories:(metaDataPredicate)predicate;
61
62- (SapphireFileMetaData *)metaDataForFile:(NSString *)file;
63- (SapphireDirectoryMetaData *)metaDataForDirectory:(NSString *)file;
64
65- (BOOL)pruneMetaData;
66- (BOOL)updateMetaData;
67
68- (SapphireMetaData *)metaDataForSubPath:(NSString *)path;
69- (void)scanDirectory;
70@end
71
72@interface SapphireFileMetaData : SapphireMetaData {
73}
74
75- (int)modified;
76- (BOOL)watched;
77- (void)setWatched;
78- (long long)size;
79- (float)duration;
80- (int)sampleRate;
81
82@end
Note: See TracBrowser for help on using the repository browser.