forked from bps/scrobblepod
-
Notifications
You must be signed in to change notification settings - Fork 3
/
FileWatcher.h
40 lines (32 loc) · 924 Bytes
/
FileWatcher.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// FileWatcher.h
// ScrobblePod
//
// Created by Ben Gummer on 31/08/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "UKKQueue.h"
@interface FileWatcher : NSObject {
BOOL xmlFileIsLocal;
NSTimer *pollTimer;
NSDate *lastModificationDate;
}
@property (retain) NSDate *lastModificationDate;
@property (assign) BOOL xmlFileIsLocal;
- (id)init;
#pragma mark General Methods
-(NSString *)fullXmlPath;
-(void)updateLocationFlag;
-(void)postXMLChangeMessage;
-(void)startWatchingXMLFile;
-(void)stopWatchingXMLFile;
#pragma mark Poll-Related Methods
-(void)startPollTimer;
-(void)stopPollTimer;
-(void)pollXMLFile:(NSTimer *)timer;
#pragma mark UKKQueue-Related Methods
-(void)applyForXmlChangeNotification;
-(void)watcher:(id<UKFileWatcher>)watcher receivedNotification:(NSString *)notification forPath:(NSString *)path;//XML
-(void)stopEventBasedMonitoring;
@end