blob: 42f9ee6c06e490145b453e4eb2580fa4444bb7a3 (
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
|
//
// DownloadManager.h
// Liaison
//
// Created by Brian Cully on Wed Jun 04 2003.
// Copyright (c) 2003 Brian Cully. All rights reserved.
//
@interface DownloadManager : NSObject
{
NSMutableDictionary *theDownloads;
}
// The default download manager.
+ (DownloadManager *)defaultManager;
// Tell the manager to download a file. When it's finished, it'll
// call the selector, if it's there, and if context is supplied,
// it'll be passed on to the selector as well.
// The selector should have the following signature:
// - (void)fileHandleFinishedDownloading: (LiFileHandle *)aFileHandle
// context: (void *)someContext
// errorString: (NSString *)anError
// If errorString isn't nil, then the file did not finish downloading
// properly, either by user action or by some other error.
- (void)downloadFileHandle: (LiFileHandle *)aFileHandle
fromSocket: (NSFileHandle *)aSocket
target: (id)anObject
didFinishSelector: (SEL)aSelector
withContext: (void *)someContext;
@property (retain,getter=downloads) NSMutableDictionary *theDownloads;
@end
@interface DownloadManager (Accessors)
- (NSMutableDictionary *)downloads;
- (void)setDownloads: (NSMutableDictionary *)someDownloads;
@end
|