summaryrefslogtreecommitdiffstats
path: root/Liaison/Downloader.h
blob: efe7f97708cddfa316f122307c9ab7951e242a3c (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//
//  Downloader.h
//  Liaison
//
//  Created by Brian Cully on Fri Jun 06 2003.
//  Copyright (c) 2003 Brian Cully. All rights reserved.
//

@class DownloadStatusView;

@interface Downloader : NSObject
{
    DownloadStatusView *theStatusView;
    LiFileHandle *theRemoteFileHandle;
    NSDictionary *theFileAttributes;
    NSFileHandle *theSocket;
    NSFileHandle *theLocalFile;
    NSString *theLocalFilePath;
    void *theCallbackContext;
    id theCallbackTarget;
    SEL theCallbackSelector;

    unsigned long theBytesInLocalFile;
}
- (id)initWithSocket: (NSFileHandle *)aSocket
              target: (id)aTarget
            selector: (SEL)aSelector
             context: (void *)someContext;

- (void)downloadFileHandle: (LiFileHandle *)aFileHandle;
@property (retain,getter=localFilePath) NSString *theLocalFilePath;
@property (getter=callbackContext,setter=setCallbackContext:) void *theCallbackContext;
@property (retain,getter=statusView) DownloadStatusView *theStatusView;
@property (getter=callbackSelector,setter=setCallbackSelector:) SEL theCallbackSelector;
@property (retain,getter=socket) NSFileHandle *theSocket;
@property (retain,getter=callbackTarget) id theCallbackTarget;
@property (retain,getter=fileAttributes) NSDictionary *theFileAttributes;
@property (retain,getter=remoteFileHandle) LiFileHandle *theRemoteFileHandle;
@property (retain,getter=localFile) NSFileHandle *theLocalFile;
@property unsigned long theBytesInLocalFile;
@end

@interface Downloader (Accessors)
- (LiFileHandle *)remoteFileHandle;
- (void)setRemoteFileHandle: (LiFileHandle *)aFileHandle;
- (NSFileHandle *)localFile;
- (void)setLocalFile: (NSFileHandle *)aFile;
- (NSString *)localFilePath;
- (void)setLocalFilePath: (NSString *)aPath;
- (DownloadStatusView *)statusView;
- (void)setStatusView: (DownloadStatusView *)aStatusView;

- (NSDictionary *)fileAttributes;
- (void)setFileAttributes: (NSDictionary *)someAttributes;
- (NSFileHandle *)socket;
- (void)setSocket: (NSFileHandle *)aSocket;
- (id)callbackTarget;
- (void)setCallbackTarget: (id)aTarget;
- (SEL)callbackSelector;
- (void)setCallbackSelector: (SEL)aSelector;
- (void *)callbackContext;
- (void)setCallbackContext: (void *)someContext;
@end