9 #import <Foundation/Foundation.h>
10 #import "SearchResult.h"
13 #define SpreadLandscape 1
14 #define SpreadPortrait 2
20 #define DeviceTablet 1
21 #define DeviceDesktop 2
22 #define DeviceConsole 3
26 #define RightExtract 1
37 NSString *mediaOverlayIdentifier;
42 @property (nonatomic,retain) NSString *href;
43 @property (nonatomic,retain) NSString *identifier;
44 @property (nonatomic,retain) NSString *mediaType;
45 @property (nonatomic,retain) NSString *mediaOverlayIdentifier;
46 @property (nonatomic,retain) NSString *properties;
47 @property BOOL hasMediaOverlay;
57 NSString *mediaOverlayPath;
61 @property (nonatomic,retain) NSString *idref;
62 @property (nonatomic,retain) NSString *linear;
63 @property (nonatomic,retain) NSString *fullPath;
64 @property (nonatomic,retain) NSString *href;
65 @property (nonatomic,retain) NSString *mediaOverlayPath;
66 @property BOOL hasMediaOverlay;
77 @property (nonatomic,retain) NSString *href;
78 @property (nonatomic,retain) NSString *type;
79 @property (nonatomic,retain) NSString *title;
100 NSString *originalContent;
105 @property (nonatomic,retain) NSString *identifier,*text,*content,*originalContent,*hashLocation;
106 @property int chapterIndex,playOrder,depth;
115 @property (nonatomic,retain) NSString *name,*value;
120 NSMutableArray *platformOptions;
122 @property (nonatomic,retain) NSString *name;
123 @property (nonatomic,retain) NSMutableArray *platformOptions;
128 NSMutableArray *platforms;
130 @property (nonatomic,retain) NSMutableArray *platforms;
143 NSString *identifier;
144 NSString *textReference;
147 @property (nonatomic,retain) NSMutableArray *mos;
148 @property (nonatomic,retain) NSString* identifier;
149 @property (nonatomic,retain) NSString* textReference;
150 @property (nonatomic,retain) NSString* type;
152 -(NSMutableArray*)getParallelsByPageIndex:(
int)pageIndex;
153 -(NSMutableArray*)getParallels;
157 NSString *identifier;
161 NSTimeInterval intervalBegin;
162 NSTimeInterval intervalEnd;
165 @property (nonatomic,retain) NSString* identifier;
166 @property (nonatomic,retain) NSString* source;
167 @property (nonatomic,retain) NSString* fullPath;
168 @property (nonatomic,retain) NSString* clipBegin;
169 @property (nonatomic,retain) NSString* clipEnd;
170 @property NSTimeInterval intervalBegin;
171 @property NSTimeInterval intervalEnd;
178 NSString *identifier;
185 @property (nonatomic,retain) NSString* identifier;
186 @property (nonatomic,retain) NSString* source;
188 @property (nonatomic,retain) NSString* content;
189 @property int startOffset;
190 @property int endOffset;
199 NSString *identifier;
204 @property (nonatomic,retain) NSString* identifier;
205 @property (nonatomic,retain) NSString* type;
206 @property (nonatomic,retain)
Audio* audio;
207 @property (nonatomic,retain)
Text* text;
208 @property (nonatomic,retain) NSString* hash;
209 @property int pageIndex,parallelIndex;
216 -(void)didComplete:(
SkyPlayer*)skyPlayer;
224 NSTimeInterval clipBegin,clipEnd;
225 NSTimeInterval currentTime;
226 NSTimeInterval oldTime;
230 id <SkyPlayerDelegate>delegate;
232 @property (nonatomic,retain) AVPlayer* player;
233 @property (nonatomic,retain) NSURL *mediaURL;
234 @property (nonatomic,retain)
id delegate;
235 @property BOOL isPaused;
236 -(void)play:(NSURL*)url clipBegin:(NSTimeInterval)begin clipEnd:(NSTimeInterval)end;
245 -(void)makeParallels:(NSMutableArray*)parallels forMediaOverlay:(
MediaOverlay*)mediaOverlay;
246 -(int)pageIndexForMediaOverlay:(
MediaOverlay*)mediaOverlay;
252 -(void)parallelsDidComplete:(
MediaOverlay*)mediaOverlay;
258 NSMutableArray* parallels;
261 __weak id <MediaOverlayDataSource> dataSource;
262 __weak id <MediaOverlayDelegate> delegate;
264 @property (nonatomic,weak)
id delegate;
265 @property (nonatomic,weak)
id dataSource;
266 @property BOOL isStarted;
267 -(void)playParallel:(
Parallel*)parallel;
268 -(void)playParallels;
269 -(void)playParallelByIndex:(
int)pi;
286 NSMutableArray* parallels;
291 int firstCharacterOffsetInPage;
296 __weak id <MediaOverlayDataSource> dataSource;
297 __weak id <MediaOverlayDelegate> delegate;
299 @property (nonatomic,weak)
id delegate;
300 @property (nonatomic,weak)
id dataSource;
301 @property BOOL isStarted;
302 @property int bookCode;
303 @property int chapterIndex;
304 @property int firstCharacterOffsetInPage;
305 @property (nonatomic,retain) NSString* text;
307 -(void)setLanguage:(NSString*)language;
309 -(void)setPitch:(
float)pitch;
310 -(void)setRate:(
float)rate;
311 -(void)setText:(NSString*)text bookCode:(
int)bookCode chapterIndex:(
int)chapterIndex firstCharacterOffsetInPage:(
int)firstCharacterOffsetInPage;
312 -(void)playParallel:(
Parallel*)parallel;
313 -(void)playParallels;
314 -(void)playParallelByIndex:(
int)pi;
336 @property int deviceId;
337 @property BOOL isAvailable;
341 BOOL displayAllChapters;
342 BOOL watermarkAllChapters;
344 int startChapterIndex;
346 int startChapterIndexForWatermark;
347 int endChapterIndexForWatermark;
348 NSString* watermarkText;
350 @property BOOL displayAllChapters;
351 @property BOOL watermarkAllChapters;
352 @property BOOL isWatermarked;
353 @property int startChapterIndex;
354 @property int endChapterIndex;
355 @property int startChapterIndexForWatermark;
356 @property int endChapterIndexForWatermark;
357 @property (nonatomic,copy) NSString* watermarkText;
364 NSDate *expireDateTime;
366 @property BOOL isLendable;
367 @property long lendSeconds;
368 @property (nonatomic,retain) NSDate *expireDate;
369 @property (nonatomic,retain) NSDate *expireDateTime;
375 NSMutableArray* devices;
378 @property int rightId;
379 @property (nonatomic,retain) NSMutableArray* devices;
380 @property BOOL forAllDevices;
381 -(id)initWithRightId:(
int)rightId;
382 -(
Device*)getDevice:(
int)deviceId;
383 -(BOOL)supportsAllDevices;
384 -(BOOL)supportsNoneDevice;
385 -(void)excludeAllDevices;
386 -(void)includeAllDevices;
394 @property (nonatomic,retain)
Lend *lend;
395 @property (nonatomic,retain)
Contents *contents;
405 @property int resolutionMin;
406 @property int resolutionMax;
407 @property int countMax;
408 @property (nonatomic,retain)
Lend *lend;
409 @property (nonatomic,retain)
Contents *contents;
416 BOOL highlightAvailable;
418 BOOL bookmarkAvailable;
419 BOOL excerptAvailable;
420 BOOL screenshotAvailable;
422 @property int countMax;
423 @property (nonatomic,retain)
Lend *lend;
424 @property BOOL allAvailable;
425 @property BOOL highlightAvailable;
426 @property BOOL noteAvailable;
427 @property BOOL bookmarkAvailable;
428 @property BOOL excerptAvailable;
429 @property BOOL screenshotAvailable;
430 -(BOOL)supportsAllExtracts;
431 -(void)excludeAllExtracts;
432 -(void)includeAllExtracts;
441 @property (nonatomic,retain)
ReadRight* readRight;
442 @property (nonatomic,retain)
ExtractRight* extractRight;
443 @property (nonatomic,retain)
PrintRight* printRight;
446 @interface Book : NSObject <NSXMLParserDelegate> {
464 NSMutableString *currentElementValue;
500 NSString* downloadDate;
501 NSString* lastReadDate;
503 NSMutableArray *Manifest;
504 NSMutableArray *Spine;
505 NSMutableArray *SpineForLinearNo;
506 NSMutableArray *Guide;
510 NSString *currentImagePath;
515 float fixedAspectRatio;
520 NSXMLParser *containerXMLParser;
521 NSXMLParser *opfParser;
522 NSXMLParser *ncxParser;
523 NSXMLParser *chapterParser;
532 NSString *displayOptionsXMLPath;
533 NSString *baseDirectory;
536 BOOL isVerticalWriting;
544 Encryption* encryption;
549 -(BOOL)parseXML:(NSString*)fileName;
550 -(BOOL)parseChapter:(NSString*)path;
554 -(BOOL)parseContainerXML;
555 -(NSString *)getChapterTitle:(
int)chapterIndex;
556 -(BOOL)parseOpfSampleBook;
557 -(BOOL)parseXMLSampleBook:(NSString *)name;
558 -(int)getChapterIndexByNCXIndex:(
int)ni;
559 -(int)getChapterIndexByNavPoint:(
NavPoint*)navPoint;
560 -(NSString*)getOriginalContentByNCXIndex:(
int)ni;
561 -(NSString *)getChapterTitle:(
int)ci;
562 -(NSString *)getCoverURL;
563 -(BOOL)parseDisplayOptions;
567 @property (nonatomic,copy) NSString *fileName,*fontName;
568 @property (nonatomic,copy) NSString *ePubPath;
569 @property (nonatomic,copy) NSString *opfPath,*opfDir,*ncxPath,*ncxName,*ncxId,*imagePath;
570 @property int parserType;
571 @property (nonatomic,retain) NSMutableArray *Manifest;
572 @property (nonatomic,retain) NSMutableArray *Spine;
573 @property (nonatomic,retain) NSMutableArray *SpineForLinearNo;
574 @property (nonatomic,retain) NSMutableArray *Guide;
575 @property (nonatomic,retain) NSMutableArray *NavMap;
576 @property (nonatomic,copy) NSString *currentImagePath;
577 @property (nonatomic,copy) NSString *title,*creator,*publisher,*subject,*source,*identifier,*language,*date,*type,*bookCover,*description;
578 @property (nonatomic,retain)
Rights* rights;
579 @property (nonatomic,copy) NSString* right;
580 @property BOOL isCartoon,isRent,isSerial;
581 @property int bookCode,fontSize,chapterIndex,pTagCount,imgTagCount,readCount;
582 @property double pagePercent;
583 @property (nonatomic,retain) NSDate *dueDate;
584 @property (nonatomic,retain) NSString*lastReadDate;
585 @property (nonatomic,retain) NSString*downloadDate;
586 @property (nonatomic,copy) NSString* stackNo;
587 @property BOOL isFixedLayout,isRTL,isVerticalWriting;
588 @property int fixedWidth;
589 @property int fixedHeight;
590 @property float fixedAspectRatio;
591 @property int lineSpacing;
593 @property (nonatomic,retain) NSString *displayOptionsXMLPath;
594 @property (nonatomic,retain) NSString *baseDirectory;
595 @property (nonatomic,retain)
Item *coverItem;
596 @property (nonatomic,retain) Encryption *encryption;
597 @property int spread;
598 @property BOOL isPubCoder;
599 @property BOOL isEncrypted;
600 @property BOOL hasRights;