-
Notifications
You must be signed in to change notification settings - Fork 17
/
KBWebArchiver.h
51 lines (40 loc) · 1.27 KB
/
KBWebArchiver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// KBWebArchiver.h
// ---------------
//
// (c) Keith Blount 2005 (updated 2008)
//
// Takes a URL string and creates a webarchive. It can also retrieve the page title and the plain text string of the web page.
//
#import <Foundation/Foundation.h>
#import <WebKit/WebKit.h>
extern NSString *const KBWebArchiverErrorDomain;
typedef NS_ENUM(NSUInteger, KBWebArchiverErrorCode) {
KBWebArchiverErrorCodeUnknown = 0,
KBWebArchiverErrorCodeInvalidURL = 1,
KBWebArchiverErrorCodeLoadFailed = 2,
KBWebArchiverErrorCodeArchiveCreationFailed = 3
};
@interface KBWebArchiver : NSObject
{
NSURL *_URL;
NSString *_customJS;
NSMutableDictionary *_archiveInformation;
BOOL _finishedLoading;
BOOL _loadFailed;
BOOL _localResourceLoadingOnly;
}
@property (nonatomic, readwrite, strong) NSURL *URL;
@property (nonatomic, readwrite, strong) NSString *customJS;
@property (nonatomic) BOOL localResourceLoadingOnly;
- (id)initWithURLString:(NSString *)aURLString isFilePath:(BOOL)isFilePath;
- (id)initWithURLString:(NSString *)aURLString;
- (id)initWithURL:(NSURL *)aURL;
- (void)setURLString:(NSString *)aURLString isFilePath:(BOOL)isFilePath;
- (NSString *)URLString;
- (BOOL)isFilePath;
- (WebArchive *)webArchive;
- (NSString *)string;
- (NSString *)title;
- (NSError *)error;
@end