summaryrefslogtreecommitdiffstats
path: root/Classes/Fetcher.h
diff options
context:
space:
mode:
Diffstat (limited to 'Classes/Fetcher.h')
-rw-r--r--Classes/Fetcher.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/Classes/Fetcher.h b/Classes/Fetcher.h
new file mode 100644
index 0000000..d51a39d
--- /dev/null
+++ b/Classes/Fetcher.h
@@ -0,0 +1,29 @@
+//
+// Fetcher.h
+// PicCast
+//
+// Created by Matthew Handler on 4/26/11.
+// Copyright 2011 Earl Industries. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@protocol FetcherDelegate
+
+- (void) connection:(NSURLConnection *)connection failedWithError:(NSError *)error;
+- (void) connection:(NSURLConnection *)connection finishedWithData:(NSData *)data;
+
+@end
+
+
+@interface Fetcher : NSObject <NSURLProtocolClient> {
+ NSMutableData *receivedData;
+ id<FetcherDelegate> delegate;
+}
+
+@property (nonatomic, assign) id<FetcherDelegate> delegate;
+
++ (Fetcher *) initWithString:(NSString *)string andDelegate:(id <FetcherDelegate>)delegate;
+- (void) setUrlAndConnect:(NSString *)string;
+
+@end