blob: d51a39dafa247d7f2269fca632c5e0ff1ce04de3 (
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
|
//
// 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
|