CatNiP docutest
Sähköinen nuottikirja, HY-TKTKL-OHTUPROJ KESÄ11
/Users/awniemel/Notepad-SVN/svn/trunk/CatNiP/CatNiP/MediaWikiDownload.h
Go to the documentation of this file.
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 #import "CatNiPErrorManager.h"
00012 #import "MediaWikiProgressListener.h"
00013 
00014 
00015 @interface MediaWikiDownload : NSObject {
00016     id <MediaWikiDownloadDelegate> queryDelegate;
00017     NSString* mediaWikiURLString;
00018     NSString* mediaWikiFilename;
00019     NSMutableURLRequest* mediaWikiRequest;
00020     NSURLConnection* mediaWikiConnection;
00021     NSMutableData* receivedData;
00022     NSFileHandle* outHandle;
00023     NSString* outputPath;
00024     NSInteger expectedSize;
00025     NSInteger currentBytes;
00026     NSMutableSet* progressListeners;
00027     BOOL working;
00028   
00029 }
00031 - (id)initWithDelegate:(id <MediaWikiDownloadDelegate>)mediaWikiDownloadDelegate;
00033 - (id)initWithDelegate:(id <MediaWikiDownloadDelegate>)mediaWikiDownloadDelegate mediaWikiURL:(NSString*) mwURLString;
00035 - (BOOL)startQuery;
00037 - (NSString*) buildQueryURL;
00038 
00040 - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response;
00042 - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data;
00044 - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error;
00046 - (void)connectionDidFinishLoading:(NSURLConnection *)connection;
00047 
00048 -(void)addProgressListener:(id <MediaWikiProgressListener>)listener;
00049 -(void)removeProgressListener:(id <MediaWikiProgressListener>)listener;
00050 -(void)abortRead;
00051 
00053 @property(copy,readwrite) NSString* mediaWikiURLString;
00055 @property(copy,readwrite) NSString* mediaWikiFilename;
00056 @property(readonly) NSInteger expectedSize;
00057 @property(readonly) NSInteger currentBytes;
00058 @end
 All Classes Files Functions Variables Enumerations Enumerator Properties Defines