CatNiP -test sprint-4-interim
catnip
|
00001 // 00002 // MediaWikiDownload.h 00003 // CatNiP 00004 // 00005 // Created by Antti V J Niemela, tkol on 6/7/11. 00006 // Copyright 2011 University of Helsinki. All rights reserved. 00007 // 00008 00009 #import <Foundation/Foundation.h> 00010 #import "MediaWikiDownloadDelegate.h" 00011 00012 @interface MediaWikiDownload : NSObject { 00013 id <MediaWikiDownloadDelegate> queryDelegate; 00014 NSString* mediaWikiURLString; 00015 NSString* mediaWikiFilename; 00016 NSMutableURLRequest* mediaWikiRequest; 00017 NSURLConnection* mediaWikiConnection; 00018 NSMutableData* receivedData; 00019 NSFileHandle* outHandle; 00020 NSString* outputPath; 00021 BOOL working; 00022 00023 } 00025 - (id)initWithDelegate:(id <MediaWikiDownloadDelegate>)mediaWikiDownloadDelegate; 00027 - (id)initWithDelegate:(id <MediaWikiDownloadDelegate>)mediaWikiDownloadDelegate mediaWikiURL:(NSString*) mwURLString; 00029 - (BOOL)startQuery; 00031 - (NSString*) buildQueryURL; 00032 00034 - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response; 00036 - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data; 00038 - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error; 00040 - (void)connectionDidFinishLoading:(NSURLConnection *)connection; 00041 00043 @property(copy,readwrite) NSString* mediaWikiURLString; 00045 @property(copy,readwrite) NSString* mediaWikiFilename; 00046 @end