CatNiP docutest
Sähköinen nuottikirja, HY-TKTKL-OHTUPROJ KESÄ11
/Users/awniemel/Notepad-SVN/svn/trunk/CatNiP/CatNiP/MediaWikiQuery.h
Go to the documentation of this file.
00001 //
00002 //  MediaWikiQuery.h
00003 //  WebConnectionProto
00004 //
00005 //  Created by Antti V J Niemela, tkol on 5/24/11.
00006 //  Copyright 2011 University of Helsinki. All rights reserved.
00007 //
00008 
00009 #import <Foundation/Foundation.h>
00010 #import "MediaWikiQueryDelegate.h"
00011 #import "CatNiPErrorManager.h"
00012 #import "MediaWikiProgressListener.h"
00013 
00014 
00015 @class MediaWikiQueryDelegate;
00016 
00017 @interface MediaWikiQuery : NSObject {
00018     id <MediaWikiQueryDelegate> queryDelegate;
00019     NSString* mediaWikiURLString;
00020     NSURLRequest* mediaWikiRequest;
00021     NSURLConnection* mediaWikiConnection;
00022     NSMutableData* receivedData;
00023     NSMutableSet* progressListeners;
00024     NSInteger expectedSize;
00025     NSInteger currentBytes;
00026     BOOL working;
00027     
00028 }
00030 - (id)initWithDelegate:(id <MediaWikiQueryDelegate>)mediaWikiQueryDelegate;
00032 - (id)initWithDelegate:(id <MediaWikiQueryDelegate>)mediaWikiQueryDelegate mediaWikiURL:(NSString*) mwURLString;
00034 - (BOOL)startQuery;
00036 - (NSString*) buildQueryURL;
00037 
00039 - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response;
00041 - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data;
00043 - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error;
00045 - (void)connectionDidFinishLoading:(NSURLConnection *)connection;
00046 
00047 
00048 -(void)addProgressListener:(id <MediaWikiProgressListener>)listener;
00049 -(void)removeProgressListener:(id <MediaWikiProgressListener>)listener;
00050 
00051 
00053 @property(copy,readwrite) NSString* mediaWikiURLString;
00054 @property(readonly) NSInteger expectedSize;
00055 @property(readonly) NSInteger currentBytes;
00056 
00057 @end
 All Classes Files Functions Variables Enumerations Enumerator Properties Defines