Reviewed by Alice.
[WebKit-https.git] / WebKit / WebView / WebDataSourceInternal.h
1 /*
2  * Copyright (C) 2005, 2006 Apple Computer, Inc.  All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * 1.  Redistributions of source code must retain the above copyright
9  *     notice, this list of conditions and the following disclaimer. 
10  * 2.  Redistributions in binary form must reproduce the above copyright
11  *     notice, this list of conditions and the following disclaimer in the
12  *     documentation and/or other materials provided with the distribution. 
13  * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
14  *     its contributors may be used to endorse or promote products derived
15  *     from this software without specific prior written permission. 
16  *
17  * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
18  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20  * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28
29 #import <WebKit/WebDataSourcePrivate.h>
30 #import <WebKitSystemInterface.h>
31
32 @class NSURL;
33
34 @class DOMDocumentFragment;
35 @class DOMElement;
36 @class DOMRange;
37 @class NSError;
38 @class NSURLRequest;
39 @class NSURLResponse;
40 @class WebArchive;
41 @class WebLoader;
42 @class WebFrameBridge;
43 @class WebHistoryItem;
44 @class WebMainResourceLoader;
45 @class WebPolicyDecisionListener;
46 @class WebResource;
47 @class WebUnarchivingState;
48 @class WebView;
49 @class WebDocumentLoadState;
50 @class WebDocumentLoadStateMac;
51
52 @protocol WebDocumentRepresentation;
53
54 @interface WebDataSource (WebInternal)
55 - (void)_setTitle:(NSString *)title;
56 - (NSString *)_overrideEncoding;
57 - (void)_setOverrideEncoding:(NSString *)overrideEncoding;
58 - (void)_addToUnarchiveState:(WebArchive *)archive;
59 - (NSURL *)_URLForHistory;
60 - (BOOL)_isClientRedirect;
61 - (void)_makeRepresentation;
62 - (BOOL)_loadingFromPageCache;
63 - (NSArray *)_responses;
64 - (void)_setPrimaryLoadComplete:(BOOL)flag;
65 - (BOOL)_isDocumentHTML;
66 - (void)_setTriggeringAction:(NSDictionary *)action;
67 - (NSDictionary *)_triggeringAction;
68 - (WebView *)_webView;
69 - (WebFrameBridge *)_bridge;
70 - (void)_stopLoadingWithError:(NSError *)error;
71 - (NSURLRequest *)_lastCheckedRequest;
72 - (void)_setLastCheckedRequest:(NSURLRequest *)request;
73 - (void)_setIsClientRedirect:(BOOL)flag;
74 - (WebArchive *)_popSubframeArchiveWithName:(NSString *)frameName;
75 - (void)_loadFromPageCache:(NSDictionary *)pageCache;
76 - (NSURL *)_URL;
77 - (NSString *)_title;
78 - (DOMElement *)_imageElementWithImageResource:(WebResource *)resource;
79 - (DOMDocumentFragment *)_documentFragmentWithImageResource:(WebResource *)resource;
80 - (DOMDocumentFragment *)_documentFragmentWithArchive:(WebArchive *)archive;
81 + (NSMutableDictionary *)_repTypesAllowImageTypeOmission:(BOOL)allowImageTypeOmission;
82 - (void)_replaceSelectionWithArchive:(WebArchive *)archive selectReplacement:(BOOL)selectReplacement;
83 - (double)_loadingStartedTime;
84 - (void)_stopRecordingResponses;
85 - (void)_startLoading;
86 - (WebResource *)_archivedSubresourceForURL:(NSURL *)URL;
87 - (double)_loadingStartedTime;
88 - (void)_stopRecordingResponses;
89 - (void)_startLoading;
90 - (WebResource *)_archivedSubresourceForURL:(NSURL *)URL;
91 - (id)_identifierForInitialRequest:(NSURLRequest *)clientRequest;
92 - (NSURLRequest *)_willSendRequest:(NSMutableURLRequest *)clientRequest forResource:(id)identifier redirectResponse:(NSURLResponse *)redirectResponse;
93 - (void)_didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)currentWebChallenge forResource:(id)identifier;
94 - (void)_didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)currentWebChallenge forResource:(id)identifier;
95 - (void)_didReceiveResponse:(NSURLResponse *)r forResource:(id)identifier;
96 - (void)_didReceiveData:(NSData *)data contentLength:(int)lengthReceived forResource:(id)identifier;
97 - (void)_didFinishLoadingForResource:(id)identifier;
98 - (void)_didFailLoadingWithError:(NSError *)error forResource:(id)identifier;
99 - (void)_downloadWithLoadingConnection:(NSURLConnection *)connection request:(NSURLRequest *)request response:(NSURLResponse *)r proxy:(WKNSURLConnectionDelegateProxyPtr) proxy;
100 - (void)_receivedMainResourceError:(NSError *)error complete:(BOOL)isComplete;
101 - (void)_decidePolicyForMIMEType:(NSString *)MIMEType decisionListener:(WebPolicyDecisionListener *)listener;
102 - (WebDocumentLoadState *)_documentLoadState;
103 - (id)_initWithDocumentLoadState:(WebDocumentLoadStateMac *)loadState;
104 - (void)_finishedLoading;
105 - (void)_receivedData:(NSData *)data;
106 - (void)_revertToProvisionalState;
107 - (void)_setMainDocumentError:(NSError *)error;
108 - (void)_clearUnarchivingState;
109
110 @end