Cédric Luthi

Hide xmlDocPtr from ASIWebPageRequest header

@@ -11,10 +11,6 @@ @@ -11,10 +11,6 @@
11 // Known issue: You cannot use startSychronous with an ASIWebPageRequest 11 // Known issue: You cannot use startSychronous with an ASIWebPageRequest
12 12
13 #import "ASIHTTPRequest.h" 13 #import "ASIHTTPRequest.h"
14 -#import <libxml/HTMLparser.h>  
15 -#import <libxml/xmlsave.h>  
16 -#import <libxml/xpath.h>  
17 -#import <libxml/xpathInternals.h>  
18 14
19 @class ASINetworkQueue; 15 @class ASINetworkQueue;
20 16
@@ -51,9 +47,6 @@ typedef enum _ASIURLReplacementMode { @@ -51,9 +47,6 @@ typedef enum _ASIURLReplacementMode {
51 // This dictionary stores a list of external resources to download, along with their content-type data or a path to the data 47 // This dictionary stores a list of external resources to download, along with their content-type data or a path to the data
52 NSMutableDictionary *resourceList; 48 NSMutableDictionary *resourceList;
53 49
54 - // Used internally for parsing HTML (with libxml)  
55 - xmlDocPtr doc;  
56 -  
57 // If the response is an HTML or CSS file, this will be set so the content can be correctly parsed when it has finished fetching external resources 50 // If the response is an HTML or CSS file, this will be set so the content can be correctly parsed when it has finished fetching external resources
58 ASIWebContentType webContentType; 51 ASIWebContentType webContentType;
59 52
@@ -10,6 +10,10 @@ @@ -10,6 +10,10 @@
10 #import "ASIWebPageRequest.h" 10 #import "ASIWebPageRequest.h"
11 #import "ASINetworkQueue.h" 11 #import "ASINetworkQueue.h"
12 #import <CommonCrypto/CommonHMAC.h> 12 #import <CommonCrypto/CommonHMAC.h>
  13 +#import <libxml/HTMLparser.h>
  14 +#import <libxml/xmlsave.h>
  15 +#import <libxml/xpath.h>
  16 +#import <libxml/xpathInternals.h>
13 17
14 // An xPath query that controls the external resources ASIWebPageRequest will fetch 18 // An xPath query that controls the external resources ASIWebPageRequest will fetch
15 // By default, it will fetch stylesheets, javascript files, images, frames, iframes, and html 5 video / audio 19 // By default, it will fetch stylesheets, javascript files, images, frames, iframes, and html 5 video / audio
@@ -33,10 +37,14 @@ static NSMutableArray *requestsUsingXMLParser = nil; @@ -33,10 +37,14 @@ static NSMutableArray *requestsUsingXMLParser = nil;
33 37
34 @property (retain, nonatomic) ASINetworkQueue *externalResourceQueue; 38 @property (retain, nonatomic) ASINetworkQueue *externalResourceQueue;
35 @property (retain, nonatomic) NSMutableDictionary *resourceList; 39 @property (retain, nonatomic) NSMutableDictionary *resourceList;
  40 +@property (assign, nonatomic) xmlDocPtr doc; // Declared as @property in order to get a "free" ivar and hide it from the header
  41 +
36 @end 42 @end
37 43
38 @implementation ASIWebPageRequest 44 @implementation ASIWebPageRequest
39 45
  46 +@synthesize doc;
  47 +
40 + (void)initialize 48 + (void)initialize
41 { 49 {
42 if (self == [ASIWebPageRequest class]) { 50 if (self == [ASIWebPageRequest class]) {