summaryrefslogtreecommitdiffstats
path: root/Liaison/DownloadManager.h
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2008-04-14 21:45:08 -0400
committerBrian Cully <github.20.shmit@spamgourmet.com>2008-04-14 21:45:08 -0400
commit17349a5e426dc7acf1216a3767a22f69974cbca0 (patch)
tree20029d02f07ab6257cccec36d34fb312f796e1d1 /Liaison/DownloadManager.h
downloadliaison-17349a5e426dc7acf1216a3767a22f69974cbca0.tar.gz
liaison-17349a5e426dc7acf1216a3767a22f69974cbca0.zip
Initial commit.
Diffstat (limited to 'Liaison/DownloadManager.h')
-rw-r--r--Liaison/DownloadManager.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/Liaison/DownloadManager.h b/Liaison/DownloadManager.h
new file mode 100644
index 0000000..42f9ee6
--- /dev/null
+++ b/Liaison/DownloadManager.h
@@ -0,0 +1,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 \ No newline at end of file