// // Fetcher.h // PicCast // // Created by Matthew Handler on 4/26/11. // Copyright 2011 Earl Industries. All rights reserved. // #import @protocol FetcherDelegate - (void) connection:(NSURLConnection *)connection failedWithError:(NSError *)error; - (void) connection:(NSURLConnection *)connection finishedWithData:(NSData *)data; @optional - (void) connection:(NSURLConnection *)connection failedWithError:(NSError *)error andPayload:(id)payload; - (void) connection:(NSURLConnection *)connection finishedWithData:(NSData *)data andPayload:(id)payload; @end @interface Fetcher : NSObject { NSMutableData *receivedData; id delegate; id payload; } @property (nonatomic, assign) id delegate; @property (nonatomic, retain) id payload; + (Fetcher *) initWithString:(NSString *)string payload:(id)p andDelegate:(id )d; + (Fetcher *) initWithString:(NSString *)string andDelegate:(id )d; - (void) setUrlAndConnect:(NSString *)string; @end