forked from hac/googlebookdownloader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GoogleBook.h
52 lines (33 loc) · 1.1 KB
/
GoogleBook.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
52
#import <Foundation/Foundation.h>
#import "GoogleBookDelegate.h"
// We use PDFKit from Quartz to make a PDF of the book from the JPEGs that Google Books returns.
#import <Quartz/Quartz.h>
#import "ResourceDownloader.h"
@interface GoogleBook : ResourceDownloader
{
id <GoogleBookDelegate> delegate;
NSString *bookId, *folderPath;
NSString *startPage;
int pageLimit;
NSMutableString *htmlBody;
NSMutableArray *pdfIndex;
NSMutableDictionary *pageNumberMap;
BOOL shouldAbortAsSoonAsPossible, scrollComplete, isPDF, zoomedIn;
int pagesDownloaded;
PDFDocument *pdfDocument;
}
- (void)setDelegate:(id)newDelegate;
- (id)delegate;
- (void)setBookId:(NSString *)newBookId;
- (NSString *)bookId;
- (void)setStartPage:(NSString *)newStartPage;
- (NSString *)startPage;
- (void)setPageLimit:(int)newPageLimit;
- (int)pageLimit;
- (NSString *)bookTitle;
- (BOOL)bookExists;
- (PDFDocument *)pdfDocument;
- (BOOL)saveImagesToFolder:(NSString *)folderPath;
// Calling this stops completeIndex or pdfDocument as soon as possible. It is called when the user clicks the cancel button.
- (void)abortProcedures;
@end