SDK Reference Docs¶
Renderer¶
RendererViewController is a class exposed by Kitaboo SDK which renders the content based on their types [KitabooFixed (PDF version), EpubFixed or EpubReflowable]. This will take input as a path of content/book and create their respective view accordingly. This view consists of both the Reader shell and the content.
@class RendererViewController; /*! The type of Book. @discussion With the help of Asset Type user can get the type of any book, whether PDF, FixedEpub or ReflowableEpub. @field - PDF Book A book which is a type of PDF. @field - Fixed Epub Book Fixed Epub Book presentation is a type of EPUB content. @field - Reflow able Epub Book A reflow able Book is a type of EPUB that can adapt its presentation according to the output device. It is not like PDF, because pages are resizable in reflow able books. @field - Undefined Type Book A book which type is not identified. The book with Undefined type, won't be rendered and will through a exception. */ typedef enum { /** A book which type is not identified. The book with Undefined type, won't be rendered and will through an exception.*/ KAssetTypeUndefined = 0, /** A book which is a type of PDF.*/ kAssetTypePDF, /** Fixed Epub Book presentation is a type of EPUB content*/ kAssetTypeFixedEpub, /** A reflowable Book is a type of EPUB that can adapt its presentation according to the output device. It is not like PDF, because pages are resizable in reflow able books.*/ kAssetTypeReflowableEpub }AssetType; typedef enum { /** Renderer is about to load (ie. When the user navigates the pages/ or When the user launches the book) and not completely available for Action.*/ RendererAvailabilityForActionStateBegin = 0, /** Renderer is loaded completely and Available for Action.*/ RendererAvailabilityForActionStateComplete = 1 }RendererAvailabilityForActionState /*! * @protocol RendererViewControllerDelegate * @brief The delegate of a RendererViewController object must adopt the RendererViewControllerDelegate protocol. * @discussion RendererViewControllerDelegate Protocol used to handle all the callbacks of RendererViewController Class.The RendererViewControllerDelegate protocol defines methods that allow users to manage the selection and highlighting of items on a page and to perform actions on those items. The methods of this protocol are all optional. Some delegate methods of RendererViewControllerDelegate Protocol called before loading and unloading of a page, just for user customisation if any required. Many methods of RendererViewControllerDelegate Protocol takes a parameter of type NSNumber, to get to know which page is going to load or which page is loaded. * When configuring the renderer view object, assign your delegate object to its delegate property. */ @protocol RendererViewControllerDelegate<NSObject> @optional /*! * Will be called every time when page is about to load (ie. When user navigate the pages/ or When user launch the book) * @param1 rendererViewController Object of RendererViewController class. * @param2 number The Page number which will be loaded. * @param3 displayNum The number which will be displayed, Eg I,II,III. */ -(void)rendererViewController:(RendererViewController*)rendererViewController willLoadPageWithPageNumber:(NSNumber*)number WithDisplayNumber:(NSString*)displayNum; /*! * Will be called every time when page is about to be unloaded. * @param1 rendererViewController Object of RendererViewController class. * @param2 number The loaded Page Number which will be unloaded. * @param3 displayNum The number, Eg I,II,III. */ -(void)rendererViewController:(RendererViewController*)rendererViewController willUnloadPageWithPageNumber:(NSNumber*)number WithDisplayNumber:(NSString*)displayNum; /*! * Will be called every time when page is loaded (ie. When user navigate the pages/ or When user launch the book) * @param1 rendererViewController Object of RendererViewController class. * @param2 number The loaded Page Number. * @param3 displayNum The number, Eg I,II,III. */ -(void)rendererViewController:(RendererViewController*)rendererViewController didLoadPageWithPageNumber:(NSNumber*)number WithDisplayNumber:(NSString*)displayNum; /*! * Will be called when page loading is failed * @param1 rendererViewController Object of RendererViewController class. * @param2 number The Page number for which Page loading failed. * @param3 error The NSError object when Page loading failed. */ -(void)rendererViewController:(RendererViewController*)rendererViewController didPageLoadingFailedForPageNumber:(NSNumber*)number WithError:(NSError*)error; /*! * Will be called when book loading is failed. * @param1 rendererViewController Object of RendererViewController class. * @param2 error The NSError object when Book loading failed. */ -(void)rendererViewController:(RendererViewController*)rendererViewController didBookLoadingFailedWithError:(NSError*)error; /*! * Will be called when book is loaded successfully. * @param1 rendererViewController Object of RendererViewController class. * @param2 bookVO book Object of KitabooBookVO class. * @discussion Here User gets loaded book instance which is bookVO. The method permits the user to perform all the actions which can be done after loading of the book such as, save the book instance in database or implementation of all reflow able customisation if bookVO is type of Epub reflow able books. If this method is not implemented user can not get the book instance. */ -(void)rendererViewController:(RendererViewController*)rendererViewController didBookLoadedSuccessfullyWithBook:(KitabooBookVO*)bookVO; /*! * Will be called when page/chapter is scrolled. * @param1 pageNumber The Page number which will be loaded. * @discussion If book is type of Epub reflow able books, Only then this method will be called. */ -(void)didPageBeginScroll:(NSNumber *)pageNumber; /*! * Will be called when the page is Zoom In. * @param1 rendererViewController Object of RendererViewController class. * @param2 pageNumbers Array of Loaded Page. * @discussion - If Zooming is performed in portrait mode pageNumbers Array will have one page. - In landscape mode pageNumbers Array will have two pages. */ -(void)rendererViewController:(RendererViewController*)rendererViewController didZoomInPage:(NSArray*)pageNumbers; /*! * Will be called when the page is Zoom Out. * @param1 rendererViewController Object of RendererViewController class. * @param2 pageNumbers Array of Loaded Pages. * @discussion - If Zooming is performed in portrait mode pageNumbers Array will have one page. - In landscape mode pageNumbers Array will have two pages. */ -(void)rendererViewController:(RendererViewController*)rendererViewController didZoomOutPage:(NSArray*)pageNumbers; /*! * Will be called when single tap is performed on page. * @param1 rendererViewController Object of RendererViewController class. * @param2 pageNumber The Tapped Page Number. * @discussion The method permits the user to perform all the actions which can be done on single tap.If this method is not implemented user can not perform action on single tap. */ -(void)rendererViewController:(RendererViewController*)rendererViewController didSingleTapOnPage:(NSNumber*)pageNumber; /*! * Will be called before the Pages are displayed. * @return the Display number that need to be shown. * @param1 rendererViewController Object of RendererViewController class. * @discussion If this method is not implemented, Book will be launched with First Page. */ -(NSString*)initialDisplayNumber:(RendererViewController*)rendererViewController; /*! * Will be called when the user highlight text on the Page. * @param1 rendererViewController Object of RendererViewController class. * @param2 highlightSelectionRect Type of CGRect for Highlighted text. * @param3 pageNo Is the page number where user highlighted the text. * @discussion This method can be used to open HighlightActionView and user can change highlight color etc. */ -(void)rendererViewController:(RendererViewController*)rendererViewController didHighlightTextWithHighlightSelectionRect:(CGRect)highlightSelectionRect OnPageNo:(NSInteger)pageNo; /*! * Will be called when user completed the highlight on the particular Page. * @param1 highlightVO Object of SDKHighlightVO class. * @discussion Use this method to save the highlight after completion. Highlight can be updated or Deleted. */ -(void)didHighlighCompleteWithHighlight:(SDKHighlightVO*)highlightVO; /*! * Will be called when the user taps on note. * @param1 highlightVO Object of SDKHighlightVO class. * @discussion All the Actions after tapping on any note icon take place here.(eg. After tapping on the note icon user can show note controller for particular note and save or share the note controller's data.) */ -(void)didTapOnNoteHighligh:(SDKHighlightVO*)highlightVO; /*! * Returns the Note icon view associated to SDKHighlightVO instance. * @param1 highlightVO Object of SDKHighlightVO class to create Note icon view. * @return The Note icon view associated with the highlight. * @discussion All the customisation related to note highlight icon can be performed here.(eg. If SDKHighlightVO instance is a type of Sticky note, sticky note will be added else Contextual note will be added.) */ -(UGCLabel*)noteIconViewForHighlight:(SDKHighlightVO*)highlightVO; /*! * Will be called when Text Annotation is completed. * @discussion This method is called when any action related to text annotation either Adding a text annotation, Editing or Deleting a text annotation is completed. And also use this callback to save text annotation changes. * @param1 textAnnotationVO Object of SDKTextAnnotationVO */ -(void)didTextAnnotationCompleteWithTextAnnotation:(SDKTextAnnotationVO*)textAnnotationVO WithNewSDKTextAnnotationVO:(SDKTextAnnotationVO*)newSDKTextAnnotationVO; /*! * Tells the delegate that editing began in the Text Annotation. * @discussion This method notifies the delegate that the specified Text Annotation just became the first responder. Use this method to perform other tasks. For example, you might use this method to show overlay views that are visible only while editing. */ -(void)didTextAnnotationBeginEditing; /*! * Asks the delegate if editing should begin in the specified text annotation. * @discussion The text annotation calls this method when the user performs an action that would normally initiate the editing of the text annotation's text. Implement this method if you want to prevent editing from happening in some situations. For example, you could use this method to prevent the user from editing the text annotation's contents more than once. Most of the time, you should return YES to allow editing to proceed. - If you do not implement this method, the text annotation acts as if this method had returned YES. * @return YES if editing should begin or NO if it should not. */ -(BOOL)textAnnotationShouldBeginEditing; /*! * This will return the color of selection when user selects any text. * @return object of UIColor which is selected. */ -(UIColor*)colorForTextSelectionView; /*! * Will be called when highlight selection is changed. */ - (void)didChangeHighlightSelection; /*! * This method is used to check whether sticky note allows two Page Panning or Not. * @discussion When the user performs an action on Sticky Note that would normally initiate a Panning session, the Page Controller calls this method to see if Panning should actually proceed for Two Pages. - Implementation of this method by the delegate is optional. If it is not present, Panning proceeds for Single Page. */ -(BOOL)didStickyNoteAllowedTwoPagePanning; /*! * This method is used to set Zoom scale Percentage for current Book Pages. * @discussion To set zoom scale percentage for book pages. Zoom Scale Percentage Must be less than or equal to 1000. - Implementation of this method by the delegate is optional. If it is not present, the Default Zoom scale percentage is 400. */ -(BOOL)zoomScalePercentageForBook:(KitabooBookVO*)bookVO; /*! * Will be called when the user takes action to delete ProtractorDrawing. * @discussion All the Actions after the user confirms to delete any protractorDrawing take place here. *@param1 protractorVO Object of SDKProtractorVO class. */ -(BOOL)deleteProtractorWithProtractorVO:(SDKProtractorVO*)protractorVO; /*! * Will be called when the user selects ProtractorDrawing. * @discussion All the Actions after user select protractorDrawing take place here. * @param1 protractorVO Object of SDKProtractorVO class. */ -(BOOL)didSelectProtractorWithProtractorVO:(SDKProtractorVO*)protractorVO; /*! * Will be called every time when page is about to load (ie. When user navigate the pages/ or When user launch the book) * @param1 rendererViewController Object of RendererViewController class. * @param2 state The RendererAvailabilityForActionState Begin or Complete. * @param3 number The Page number which will be loaded. * @param4 displayNum The number which will be displayed, Eg I,II,III. */ -(BOOL)rendererViewController:(RendererViewController*)rendererViewController didRendererChangedAvailabilityForActionState:(RendererAvailabilityForActionState)state forPageNumber:(NSNumber*)number WithDisplayNumber:(NSString*)displayNum; /*! * Will be called every time when book loading is completed with content size. * @param1 contentSize Total content size of book */ -(void)bookLoadingCompletedWithContentSize:(NSInteger)contentSize; /*! * Will be called every time when every Chapter is processed. * @param1 chaptersIndex Current chapter index. * @param2 contentSize Current chapter content size. */ -(void)didBookChaptersProcessSuccessfully:(NSInteger)chaptersIndex withChapterContentSize:(NSInteger)contentSize; /*! * Will be called every time when the page is scrolled for reflowable books. * @param1 rendererViewController Object of RendererViewController class. * @param2 contentSize Current chapter content size. * @param3 chapterIndex Current chapter index. */ -(void)rendererViewController:(RendererViewController*)rendererViewController didChangeContentPosition:(CGFloat)contentSize forChapter:(NSInteger)chapterIndex; /*! * Will be called every time when CFI's is about to load (ie. When user navigate the pages/ or When user launch the book) * @param1 rendererViewController Object of RendererViewController class. * @param2 cfiArray collection of CFI's. * @param3 number The Page number for which CFI's will be loaded.* @param4 displayNum The number which will be displayed, Eg I,II,III. */ -(void)rendererViewController:(RendererViewController*)rendererViewController willLoadCFI:(NSArray*)cfiArray withPageNumber:(NSNumber*)number WithDisplayNumber:(NSString*)displayNum; /*! * Will be called every time when CFI's are about to unloaded. * @param1 rendererViewController Object of RendererViewController class. * @param2 cfiArray collection of CFI's. * @param3 number The Page Number for which CFI's will be unloaded. * @param4 displayNum The number, Eg I,II,III. */ -(void)rendererViewController:(RendererViewController*)rendererViewController willUnloadCFI:(NSArray*)cfiArray withPageNumber:(NSNumber*)number WithDisplayNumber:(NSString*)displayNum; /** * Will be called when Page/CFI position is changed. *@param pageOrCFI New Page/CFI. */ - (void)didChangePageIdentifier:(NSString *)pageOrCFI; /** Will be called when EpubElementModal popup gets opened.*/ -(void)didOpenEpubElementModal; /** Will be called when EpubElementModal popup gets closed. */ -(void)didCloseEpubElementModal; @end /** An Object that will be responsible for rendering a book. * @superclass SuperClass : UIViewController */ @interface RendererViewController : UIViewController <RendererProtocol> /*! * The object that acts as the delegate of the renderer view. * @code * [rendererViewController setDelegate:self] * @endcode * @discussion The delegate must adopt the RendererViewControllerDelegate protocol. */ @property (weak,nonatomic) id <RendererViewControllerDelegate> delegate; /*! * Boolean property used to enable/disable highlighting when users long press on text. By default it is set to true. * @code * rendererViewController.isHihghlightEnabled = false; * @endcode */ @property (nonatomic) BOOL isHihghlightEnabled; /*! * TO Initiate/Launch book * @param1 bookPath Device Physical path of book * @param2 assetType Type of book kAssetTypePDF/kAssetTypeFixedEpub/kAssetTypeReflowableEpub * @param3 delegate Callback listener of type RendererViewControllerDelegate * @discussion Initialises and returns a newly allocated view object with specified book path, Asset Type and delegate of type RendererViewControllerDelegate. * @code * [[RendererViewController alloc] initWithBookPath:bookPath WithBookType:assetType WithDelegate:self]; * @endcode */ - (id)initWithBookPath:(NSString*)bookPath WithBookType:(AssetType)assetType WithDelegate:(id<RendererViewControllerDelegate>)delegate; /*! * To Initiate/Launch book * @param1 bookPath Device Physical path of book * @param3 delegate Callback listener of type RendererViewControllerDelegate. * @discussion Initialises and returns a newly allocated view object with specified book path and delegate of type RendererViewControllerDelegate. * @code * [[RendererViewController alloc] initWithBookPath:bookPath WithDelegate:self]; * @endcode */ - (id)initWithBookPath:(NSString*)bookPath WithDelegate:(id<RendererViewControllerDelegate>)delegate; /*! * To Initiate/Launch book * @param1 bookPath Device Physical path of book * @param2 delegate Callback listener of type RendererViewControllerDelegate. * @param3 isbn ISBN value of the book * @discussion Initializes and returns a newly allocated view object with specified book path and delegate of type RendererViewControllerDelegate. * @code * [[RendererViewController alloc] initWithBookPath:bookPath WithDelegate:self withISBN:isbn]; * @endcode */ - (id)initWithBookPath:(NSString*)bookPath WithDelegate:(id<RendererViewControllerDelegate>)delegate withISBN:(NSString *)isbn; /*! * To Initiate/Launch book * @param1 bookPath Device Physical path of book * @param2 delegate Callback listener of type RendererViewControllerDelegate. * @param3 isbn ISBN value of the book. * @param4 additionalInfo Additional information if any. * @discussion Initializes and returns a newly allocated view object with specified book path and delegate of type RendererViewControllerDelegate. * @code * [[RendererViewController alloc] initWithBookPath:bookPath WithDelegate:self withISBN:isbn withAdditionalInfo:additionalInfo]; * @endcode */ - (id)initWithBookPath:(NSString*)bookPath WithDelegate:(id<RendererViewControllerDelegate>)delegate withISBN:(NSString *)isbn withAdditionalInfo:(NSDictionary *)additionalInfo; /*! * To Enable/Disable Logs. * @param1 logEnabled Enable/Disable Logs. * @discussion - If logEnabled has YES value, all the messages will be displayed on the console. If user does not want to print anything on console he/she has to set logEnabled to NO. * @code * [rendererViewController setLogsEnabled:YES]; * @endcode */ - (void)setLogsEnabled:(BOOL)logEnabled; /*! * To Enable/Disable Information/verbose. * @param1 verboseEnabled Enable/Disable Information/verbose. * @code * [rendererViewController setVerboseEnabled:YES]; * @endcode */ - (void)setVerboseEnabled:(BOOL)verboseEnabled; /*! * To Get currently shown/displayed Highlight Popup. * @return object of HighlightActionView. * @code * [rendererViewController getHighlightView]; * @endcode */ -(HighlightActionView*)getHighlightView; /*! * To set Highlight Popup. * @param1 highlightView Object of HighlightActionView. * @code * [rendererViewController setHighlightView:highlightView]; * @endcode */ -(void)setHighlightView:(HighlightActionView*)highlightView; /*! * To get an array that consist of Book TOC Content Data. * @return object of type NSArray. * @discussion This method returns toc Data where every toc element has the same level. There is no Parent Child Relationship between elements. * @code * [rendererViewController getTOCContentData]; * @endcode */ - (NSArray *)getTOCContentData; /*! * To get an array that consist of Book TOC Resource Data. * @return object of type NSArray. * @discussion This method returns Resources Data where every Resource element has the same level. There is no Parent Child Relationship between elements. * @code * [rendererViewController getTOCResourceData]; * @endcode */ - (NSArray *)getTOCResourceData; /*! * To get a dictionary with page identifier and Actual Touch Point * @param1 touchPoint Sticky Note Controller Touch Point * @return object of type NSDictionary. * @code * [rendererViewController validateAndGetRequiredDataForStickyNoteControllerTouchPoint: touchPoint]; * @endcode */ -(NSDictionary*)validateAndGetRequiredDataForStickyNoteControllerTouchPoint:(CGPoint)touchPoint; /*! * To get book path. * @return book path of type NSString. * @code * [rendererViewController getBookPath]; * @endcode */ -(NSString*)getBookPath; /*! * To get a current CFI position. * @return CFI position of type NSString. * @code * [rendererViewController getCurrentCFI]; * @endcode */ -(NSString*)getCurrentCFI; /*! * To jump to CFI position. * @param1 href as CFI position string. * @code * [rendererViewController jumpToCFIString:href]; * @endcode */ -(void)jumpToCFIString:(NSString*)href; /*! * To get current range position. * @return range position of type NSString. * @code * [rendererViewController getLastVisitedRangeInfo]; * @endcode */ -(NSString*)getLastVisitedRangeInfo; /*! * To get current book data-cfi from html page. * @return data-cfi from html page of type NSString. * @code * [rendererViewController getCurrentBookDataCFI]; * @endcode */ -(NSString*)getCurrentBookDataCFI; @end
RendererProtocol¶
The Renderer Protocol methods are used when the user wants to perform any action on book (KitabooFixed, Epub) content such as add bookmark, post note, delete note, open highlight pop up etc. All the methods of this protocol are optional. Some methods of Renderer Protocol are only used for Epub Reflowable books such as enable/disable pagination, text alignment, Reader Mode etc. Methods which are used for highlights take a parameter of type SDKHighlightVO which has all the information about the highlight/note eg. text, type of note (Sticky Note/Contextual Note) etc.
/*! Orientation mode of a book, Whether it is Portrait or Landscape. */ typedef enum { kBookOrientationModeDynamic = 0, /** Book will be in Landscape mode where only One page will be displayed.*/ kBookOrientationModeLandscapeOnePageOnly, /** Book will be in Landscape mode where two page will be displayed.*/ kBookOrientationModeLandscapeTwoPageOnly, kBookOrientationModePortrait } BookOrientationMode; /*! * @protocol RendererProtocol * @brief The Renderer Protocol. Any class that wants to implement methods of Renderer Protocol, has to adopt Renderer Protocol. * @discussion The Renderer Protocol methods are used when the user wants to perform any action on book(KitabooFixed, Epub) content such as add bookmark, post note, delete note, open highlight pop up etc. All the methods of this protocol are optional. Some methods of Renderer Protocol are only used for Epub Reflow able books such as enable/disable pagination, text alignment, Reader Mode etc. Methods which are used for highlights take a parameter of type SDKHighlightVO which has all the information about the highlight/note eg. text, type of note(Sticky Note/Contextual Note) etc. - There are some methods used for book Orientation to set/get orientation mode of a book whether it is in Portrait Mode or in Landscape Mode. */ @protocol RendererProtocol @optional /*! To Open Highlight Popup on given page number. * @discussion This method is used to open Highlight Popup on given page number at the particular coordinates. And returns Boolen value, to know if highlight is shown or not. Highlight is shown for YES value and not shown for NO value. * @param1 highlightView Object of type HighlightActionView. * @param2 pageNo Page number of page. * @param3 coordinates Coordinates on the page where highlight view needs to be shown. * @code * [rendererViewController openHighlightView:highlightView OnPageNo:pageNo AtCoordinates:CGPointMake(x,y)]; * @endcode * @return BOOL value */ -(BOOL)openHighlightView:(HighlightActionView*)highlightView OnPageNo:(NSInteger)pageNo AtCoordinates:(CGPoint)coordinates; /*! To add Bookmark view on given page number. * @discussion This method is responsible for a `view` where bookmark will be added. State of this view changes according to the data which is present in the view. - To add data/model to the view, simply call @c [rendererView addBookmark:bookmark OnPageNo:pageNo]; * @param1 bookmarkView Object of type BookMarkView. * @param2 pageNo Page Number where bookmark view should be added. * @code * [rendererViewController addBookmarkView:bookMarkView onPageNO:pageNo]; * @endcode */ - (void)addBookmarkView:(BookMarkView *)bookmarkView onPageNO:(NSInteger)pageNo; /*! To Highlight Text with given text and background color. * @discussion This method is used to create highlight for particular HighlightActionView object with given text color and background color. HighlightActionView is an object for which text color and background color needs to updated. Parameter `isImportant` is a BOOL type which is used for important/normal highlight/note. - If this has YES value, Important highlight/note will be created with the background color which is provide in `backgroundColor` parameter . Else, with NO value normal highlight/note will be created with the same background color. * @param1 highlightView Object of HighlightActionView. * @param2 textColor Text color to be applied on highlight. * @param3 backgroundColor Background color to be applied on highlight. * @param4 isImportant A Type of BOOL. * @code * [rendererViewController highlight:highlightView WithTextColor:textColor WithBackgroundColor:backgroundColor WithIsImportant:NO]; * @endcode */ -(void)highlight:(HighlightActionView*)highlightView WithTextColor:(NSString*)textColor WithBackgroundColor:(NSString*)backgroundColor WithIsImportant:(BOOL)isImportant; /*! To get Highlight Object of type SDKHighlightVO. * @discussion Returns an Object of type SDKHighlightVO for selected text with given text color and background color. * @param1 textColor Text color to be applied on selected text. * @param2 backgroundColor Background color to be applied to selected text. * @return Object of type SDKHighlightVO. * @code * [rendererViewController getHighlightForSelectedTextWithTextColor:textColor WithBackgroundColor:backgroundColor]; * @endcode */ -(SDKHighlightVO*)getHighlightForSelectedTextWithTextColor:(NSString *)textColor WithBackgroundColor:(NSString *)backgroundColor; /*! To get a Highlight Object of type SDKHighlightVO. This method is only used for kitaboo epub books. * @discussion Returns an Object of type SDKHighlightVO for selected text with given text color and background color. * @param1 textColor Text color to be applied on selected text. * @param2 backgroundColor Background color to be applied to selected text. * @callback Object of type SDKHighlightVO. * @code * [rendererViewController getHighlightForSelectedTextEpubWithTextColor:textColor WithBackgroundColor:backgroundColor andCallBack:^(SDKHighlightVO sdkHighlightVO){}]; * @endcode */ -(void)getHighlightForSelectedTextEpubWithTextColor :(NSString *)textColor WithBackgroundColor:(NSString *)backgroundColor andCallBack:(void (^)(SDKHighlightVO *))callback; /*! TO get selected text. @discussion This method is used to get selected text on the Page. - NOTE : This method only works for Kitaboo Fixed books(PDF). * @code * [rendererViewController getSelectedText]; * @endcode */ -(NSString*)getSelectedText; /*! To Show/Post Note on page. * @discussion Parameter `highlightVO` is an object of type SDKHighlightVO that needs to be shown/posted on page, `highlightVO` will have all the details about the note, Eg. Page Number, Text ,Text color, Background color etc. * @param1 highlightVO Object of type SDKHighlightVO. * @code * [rendererViewController postNoteWithHighlightVO:highlightVO]; * @endcode */ -(void)postNoteWithHighlightVO:(SDKHighlightVO*)highlightVO; /*! To Delete/Remove Note from page. * @discussion Parameter `highlightVO` is an object of type SDKHighlightVO that need's to be removed from the page, `highlightVO` will have all the details about the note, Eg. Page Number, Text ,Text color, Background color etc. * @param1 highlightVO Object of type SDKHighlightVO. * @code * [rendererViewController deleteNoteWithHighlightVO:highlightVO]; * @endcode */ -(void)deleteNoteWithHighlightVO:(SDKHighlightVO*)highlightVO; /*! To Remove Highlight Popup from renderer view. * @code * [rendererViewController removeHighlightView]; * @endcode */ -(void)removeHighlightView; /*! To Delete/Remove Highlight from page. * @discussion Parameter `highlight` is an object of type SDKHighlightVO that need's to be removed from the page, `highlight` will have all the details about the highlight, Eg. Page No, Text ,Text color, Background color etc. * @param1 highlight Object of type SDKHighlightVO. * @code * [rendererViewController deleteSelectedHighlight:highlight]; * @endcode */ - (void)deleteSelectedHighlight:(SDKHighlightVO *)highlight; /*! To Navigate on given page. * @discussion This method is used for navigation on a particular page. For Example in the case of Table of Content, My Data etc. user can use this method. * @param1 pageNo Page number of page. * @code * [rendererViewController navigateToPageNumber:pageNumber]; * @endcode */ -(void)navigateToPageNumber:(NSString *)pageNo; /*! * This method used to enable/disable the pagination configuration for reflowable epub books. @discussion Pagination, is the process of dividing a document into discrete pages, where page navigation direction is either from left to right or vertical scrolling. -If parameter `enable` has YES value, page navigation direction will be left to right or in case of NO it will be vertical scrolling. @param1 enable Is the boolean value which represents the pagination configuration. @code [rendererViewController enablePagination:YES]; @endcode */ -(void)enablePagination:(BOOL)enable; /*! To get Pagination status. @return Returns Pagination status for Reflowable Epub Books. */ -(BOOL)isPaginationEnabled; /*! To Enable Night Mode for Reflowable Epub Books. * @discussion Night Mode Uses a colour scheme that displays light text on a dark background. * @param1 enable Enable/Disable Night Mode. * @code * [rendererViewController enableNightMode:YES]; * @endcode */ - (void)enableNightMode:(BOOL)enable; /*! To Set Reader Mode for Reflowable Epub. * @discussion With the help of Reader mode Enable Feature user can change the appearance of a Page to Day mode, Sepia mode or night mode. * @param1 mode Choose any Mode from Reader Mode. * @code * [rendererViewController setReaderMode:DAY_MODE]; * @endcode */ -(void)setReaderMode:(READER_MODE)mode; /*! To Set Text Alignment for Reflowable Epub books. * @discussion With the help of Text alignment Feature user can change the alignment of text on a page using different text positioning. * @param1 textAlignment Choose any alignment from Left, Right, Center and Default. * @code * [rendererViewController setTextAlignment:LEFT_ALIGNMENT]; * @endcode */ -(void)setTextAlignment:(TEXT_ALIGNMENT)textAlignment; /*! To Set Line Spacing in content for Reflowable Epub books. * @discussion With the help of Line Spacing Feature users can change space between lines on a page using different text spacing Modes. * @param1 lineSpacing Choose any line spacing between Small, Medium and Large.. * @code * [rendererViewController setLineSpacing:MEDIUM_LINESPACING]; * @endcode */ -(void)setLineSpacing:(TEXT_LINESPACING)lineSpacing; /*! To Set Margin for Reflowable Epub books. * @discussion With the help of Margin Feature users can change space between data and border on a page using different margin Modes. * @param1 margin Choose any margin between Small, Medium and Large.. * @code * [rendererViewController setMargin:MEDIUM_MARGIN]; * @endcode */ -(void)setMargin:(READER_MARGIN)margin; /*! To Reset Reader Settings for Reflowable Epub. * @discussion resetReaderSetting is a method, that would be called when user wants to reset all the customization of Epub reflowable books. It sets all the Modes to their default value. * @code * [rendererViewController resetReaderSetting]; * @endcode */ -(void)resetReaderSetting; /*! *Set an array of font family for reflowable epub books. @discussion Array of String values. @code [rendererViewController setFontFamilyArray:[NSArray arrayWithObjects:@"Times New Roman",@"Athelas",@"Charter",@"Georgia",nil]]; @endcode */ -(void)setFontFamily:(NSString *)fontFamily; /*! * This method is used to set the font size to text for whole Page of reflowable epub books. @param1 fontSize Is the value of changed font. @code [rendererViewController setFontSizeForReflowable:25]; @endcode */ - (void)didFontSizeChanged:(NSUInteger)fontSize; /*! * This method used to set brightness configuration for reflowable epub books @param1 brightnessValue Represents the brightness configuration. @code [rendererViewController setCurrentBrightness:[UIScreen mainScreen].brightness]; @endcode */ -(void)setBrightnessForReflowable:(CGFloat)brightnessValue; /*! To get SDKBookmarkVO Object. * @discussion This method returns object of SDKBookmarkVO for given page number. * @param1 pageNo page number of page. * @return Object of Type SDKBookmarkVO. * @code * [rendererViewController getBookmarkVOForPageNo:pageNo]; * @endcode */ -(SDKBookmarkVO*)getBookmarkVOForPageNo:(NSInteger)pageNo; /*! TO set Bookmark. @discussion This method is used to set data/model to bookmark view. SDKBookmarkVO contains all the details about the bookmark. Eg. Text, Start Offset, End Offset etc. @param bookmarkVO Object of type SDKBookmarkVO. * @code * [rendererViewController setBookmarkVO:bookmarkVO]; * @endcode */ -(void)setBookmarkVO:(SDKBookmarkVO*)bookmarkVO; /*! To draw highlights on given Page number. * @discussion The method is used to draw highlights on given page number. Parameter `highlights` contains all the highlights of type SDKHighlightVO, which to be drawn on page. * @param1 highlights Array of type SDKHighlightVO Objects * @param2 pageNo page number of page. * @code * [rendererViewController drawHighlights:highlights OnPageNo:pageNo]; * @endcode */ -(void)drawHighlights:(NSArray*)highlights OnPageNo:(NSInteger)pageNo; /*! TO add Bookmark on given page. *@discussion This method is used to add data/model to bookmark view, Parameter `bookmarks` contains all the elements of type SDKBookmarkVO, that contains all the details about the bookmark. Eg. Text, Start Offset, End Offset etc. * @param bookmarks Array of type SDKBookmarkVO Objects. * @code * [rendererViewController addBookmark:bookmarks OnPageNo:pageNo]; * @endcode */ -(void)addBookmark:(NSArray *)bookmarks OnPageNo:(NSInteger)pageNo; /*! TO get the object of SDKHighlightVO for Sticky Note Touch Point. * @discussion Validate the Sticky note touch points and returns HighlightVO Object if note can be created on the touch points. * @param1 touchPoint Sticky Note touch point. * @return Object of type SDKHighlightVO. * @code * [rendererViewController getHighlightVOForStickyNoteTouchPoint:CGPoint(x,y)]; * @endcode */ -(SDKHighlightVO*)getHighlightVOForStickyNoteTouchPoint:(CGPoint)touchPoint; /*! * To enable drawing mode for renderer view. * @discussion This method permits user to perform drawing on any page based on parameter's value. If it is YES, user will be able to draw anything on Page and in case of NO this action will not be performed. - To draw anything on the canvas, simply call @c [rendererViewController drawPenDrawings:penToolArray OnPageNo:pageNo]; - NOTE : This method is not used for Epub Reflowable Books. * @param1 enabled Enable the mode by passing boolean value * @code * [rendererViewController setPenDrawingModeEnabled:YES]; * @endcode */ -(void)setPenDrawingModeEnabled:(BOOL)enabled; /*! * To get Pen Drawing Canvas for rendered pages. * @return Array of Pen Drawing Canvas. * @code * [rendererViewController getPenDrawingCanvas]; * @endcode */ -(NSArray*)getPenDrawingCanvas; /*! To draw pen drawings on canvas. * @discussion This method is used to draw anything on canvas. All the details related to the drawing will be contained in penToolArray objects, of type SDKPentoolVO. Eg. Pen Color Code, Pen Thickness, Pen Type etc. * @param1 penToolArray Array of SDKPentoolVO Object to be drawn on canvas * @param1 pageNo page number of canvas * @code * [rendererViewController drawPenDrawings:penToolArray OnPageNo:pageNo]; * @endcode */ -(void)drawPenDrawings:(NSArray *)penToolArray OnPageNo:(NSInteger)pageNo; /*! * To get currently rendered page ids. * @return Returns currently rendered page. * @code * [rendererViewController getActivePages]; * @endcode */ -(NSArray*)getActivePages; /*! *To Reload Active Page. *@discussion Call this method to reload the pages. - NOTE : This will only work for Kitaboo Fixed books. * @code * [rendererViewController reloadPages]; * @endcode */ -(void)reloadPages; /*! *To highlight Text on page. * @discussion This method is used to highlight particular text on given page with given color. * @param1 text Text to be highlighted * @param2 pageNo Page Number where text presents. * @param3 color Color of highlight. * @code * [rendererViewController highlightText:text OnPageNo:pageNo WithColor:color]; * @endcode */ -(void)highlightText:(NSString*)text OnPageNo:(NSInteger)pageNo WithColor:(NSString*)color; /*! *To highlight text on page * @param1 text Text to be highlighted * @param2 color Color of highlight * @param3 selectedWordColor Color of selected word * @param4 searchResultArray is the TextSearchResult array */ -(void)highlightText:(NSString*)text OnPageNo:(NSInteger)pageNo WithColor:(NSString*)color withSelectedWordHighlightColor:(NSString *)selectedWordColor withSearchArray:(NSArray *)searchResultArray withSelectedResult:(TextSearchResult *)searchResult; /** Returns Next Search Result status for navigating */ -(BOOL)isNextSearchResultAvailable; /** Returns Previous Search Result status for navigating */ - (BOOL)isPreviousSearchResultAvailable; /** Returns Last Previous Search Result status of Page for navigating */ - (BOOL)isLastPreviousSearchResult; /** Returns Last Next Search Result status of Page for navigating */ - (BOOL)isLastNextSearchResult; /** * To move to next selected search */ - (void)moveToNextSelectedSearch; /** * To move to previous selected search */ - (void)moveToPreviousSelectedSearch; /** *To highlight text on page * @param1 text Text to be highlighted * @param2 color Color of highlight * @param2 paragraph paragraph of highlight */ -(void)highlightText:(NSString*)text OnPageNo:(NSInteger)pageNo WithColor:(NSString*)color WithParagraph:(NSString*)paragraph; /*! *To highlight text with frame on page. * @discussion This method is used to add highlight on given page number with highlight color and given frame. Currently this is used for Audio Sync feature. * @param1 frame Frame to be highlighted on the page. * @param1 pageNo Page Number where text will be highlighted. * @param2 color Color of highlight. * @code * [rendererViewController highlightTextWithFrame:frame OnPageNo:pageNo WithColor:color]; * @endcode */ -(void)highlightTextWithFrame:(CGRect)frame OnPageNo:(NSInteger)pageNo WithColor:(NSString*)color; /*! To draw Markups on page * @param1 links Array of KFLinkVO Object to be drawn on page * @param1 pageNo page number of canvas */ -(void)drawMarkups:(NSArray *)links OnPageNo:(NSInteger)pageNo; /*! To add Inline Video on page. * @discussion Inline video refers to a video clip embedded in a web page that runs in real time without requiring a separate player, Parameter `view` is used to add a view for Inline Video Player on the page. * @param1 view Inline Video Player view to add on page. * @param2 frame Frame of Inline Video Player's view. * @param3 pageNo Page Number. * @code * [rendererViewController addInLineVideo:view atRect:frame onPageNO:pageNo]; * @endcode */ - (void)addInLineVideo:(UIView *)view atRect:(CGRect)frame onPageNO:(NSInteger)pageNo; /*! To add MultiLinkController on page. * @discussion This method is used to add/show MultiLinkController on given page number with respective to the position of given source view, multiLinkController is object of type UIViewController which will be added. * @param1 multiLinkController Object of type UIViewController. * @param2 sourceView To add MultiLinkController with respective Position of source View. * @param3 pageNo Page Number * @code * [rendererViewController addMultiLinkController:multiLinkController atSourceView:sourceView onPageNO:pageNo]; * @endcode */ - (void)addMultiLinkController:(UIViewController *)multiLinkController atSourceView:(UIView*)sourceView onPageNO:(NSInteger)pageNo; /*! To draw FIBs on page * @param1 fibs Array of FIB to be drawn on page * @param1 pageNo page number of canvas. * @code * [rendererViewController drawFIBs:fibs OnPageNo:pageNo]; * @endcode */ -(void)drawFIBs:(NSArray *)fibs OnPageNo:(NSInteger)pageNo; /*! To Open Highlight Popup on given page number. * @discussion This method is used to open Highlight Popup on given page number at the particular coordinates with Rect of highlighted text. And returns Boolen value, to know if highlight is shown or not. Highlight is shown for YES value and not shown for NO value. - Note: This will only work for Kitaboo Fixed type books. * @param1 pageNo Page number of page * @param2 coordinates Coordinates on the page where highlight view needs to be shown. * @param3 highlightedTextRect Coordinates of highlighted text. * @code * [rendererViewController openHighlightView:highlightView OnPageNo:pageNo AtCoordinates:CGPointMake(x,y) WithHighlightedTextRect:CGPointMake(x,y)]; * @endcode */ -(BOOL)openHighlightView:(HighlightActionView*)highlightView OnPageNo:(NSInteger)pageNo AtCoordinates:(CGPoint)coordinates WithHighlightedTextRect:(CGPoint)highlightedTextRect; /*! To set the color for shared Highlight/Notes. * @discussion This method is used to set color to that Highlight or note, which is shared to any user. If the hexColor is nil then the default color ugc will be applied. * @param1 hexColor is hex color for shared Highlight/Notes. * @code * [rendererViewController setColorForSharedUGC:hexColor]; * @endcode */ - (void)setColorForSharedUGC:(NSString *)hexColor; /*! * To set Book Orientation Mode, whether it is Portrait or Landscape. * @param bookOrientation Orientation Mode. * @code * [rendererViewController setBookOrientationMode:bookOrientation]; * @endcode */ - (void)setBookOrientationMode:(BookOrientationMode)bookOrientation; /*! * To get Book Orientation Mode. * @return Book Orientation Mode. * @code * [rendererViewController getBookOrientationMode]; * @endcode */ - (BookOrientationMode)getBookOrientationMode; /*! * To get SDKHighlightVO Object for StickyNote with Default Position. * @return Returns Object of type SDKHighlightVO. * @code * [rendererViewController getHighlightVOForStickyNoteWithDefaultPosition]; * @endcode */ -(SDKHighlightVO*)getHighlightVOForStickyNoteWithDefaultPosition; /*! * To get SDKHighlightVO Object for StickyNote with Default Position. (Center of Page in case of Landscape Left Page/or Portrait Mode, and Center Left Position in case of Landscape mode right mode). This method is used only for Kitaboo epub fixed books. * @return Returns Object of type SDKHighlightVO. * @code * [rendererViewController getHighlightVOForStickyNoteWithDefaultPositionWithCallBack^(SDKHighlightVO * result, NSError * error){}]; * @endcode */ -(SDKHighlightVO*)getHighlightVOForStickyNoteWithDefaultPositionWithCallBack:(void(^)(SDKHighlightVO *, NSError *error))callback; /*! * To get TextAnnotationVO Object with Default Position. * @return Returns Object of type SDKTextAnnotationVO. * @code * [rendererViewController getTextAnnotationVOWithDefaultPosition]; * @endcode */ -(SDKTextAnnotationVO*)getTextAnnotationVOWithDefaultPosition; /*! To draw TextAnnotations on page. * @discussion The method is used to draw TextAnnotations on given page number. First Parameter contains all the text annotation of type SDKTextAnnotationVO, which to be drawn on page. * @param1 textAnnotation Array of SDKTextAnnotationVO Objects. * @param2 pageNo page number of canvas. * @code * [rendererViewController drawTextAnnotation:textAnnotations OnPageNo:pageNo]; * @endcode */ -(void)drawTextAnnotation:(NSArray*)textAnnotation OnPageNo:(NSInteger)pageNo; /*! * To add new created TextAnnotation. * @discussion This method is used to add newly created text annotation. SDKTextAnnotationVO object has all the details about the text annotation eg. Text, Font Name, Font Size, Meta Data etc. * @param1 sdkTextAnnotationVO object of newly created SDKTextAnnotationVO * @code * [rendererViewController addTextAnnotation:sdkTextAnnotationVO]; * @endcode */ -(void)addTextAnnotation:(SDKTextAnnotationVO*)sdkTextAnnotationVO; /*! * To exit textAnnotation mode. * @code * [rendererViewController exitTextAnnotationMode]; * @endcode */ -(void)exitTextAnnotationMode; /*! * To delete text annotation. * @code * [rendererViewController deleteTextAnnotation]; * @endcode */ -(void)deleteTextAnnotation; /*! * To remove the text annotation without saving. * @code * [rendererViewController removeTextAnnotationModeWithoutSave]; * @endcode */ -(void)removeTextAnnotationModeWithoutSave:; /*! * To update the alignment of the text in the text annotation. * @param1 alignment object to set alignment of the text in the text annotation * @code * [rendererViewController updateTextAnnotationAlignment:NSTextAlignmentLeft]; * @endcode */ -(void)updateTextAnnotationAlignment:(NSTextAlignment)alignment; /*! * To update the text color of the text and the background color of the text annotation. * @param1 background object to update the background color of the text annotation. * @param2 textColor object to update the text color of the text annotation * @code * [rendererViewController updateTextAnnotationWithBackground:[UIColor blackColor] withTextColor:[UIColor whiteColor]]; * @endcode */ -(void)updateTextAnnotationWithBackground:(UIColor *)background withTextColor:(UIColor *)textColor; /*! * To set the Vertical margin For Reflowable Epub Books * @discussion This method is used to set Vertical margin For Reflowable Epub Books i.e,top and bottom. * @param1 marginValue Object is the integer value to be set. * @code * [rendererViewController setVerticalMarginForReflowableEpubBook:0]; * @endcode */ - (void)setVerticalMarginForReflowableEpubBook:(NSNumber *)marginValue; /*! * This method is used to set the Zoom Scale to Default. * @code * [rendererViewController resetZoomScaleToDefault]; * @endcode */ -(void)resetZoomScaleToDefault; /*! * To draw protractor drawings on canvas. * @discussion This method is used to draw protractors on canvas. All the details related to the drawing will be contained in protractorArray objects, of type SDKProtractorVO. *@param1 protractorArray Array of SDKProtractorVO Object to be drawn on canvas *@param2 pageNo page number of canvas * @code * [rendererViewController drawProtractorDrawings:protractorArray OnPageNo:pageNo]; * @endcode */ -(void)drawProtractorDrawings:(NSArray*)protractorArray OnPageNo:(NSInteger)pageNo; /*! * To get the FIBView for linkID. *@param1 linkID linkID of FIBView. *@return FIBView * @code * [rendererViewController getFIBViewForLinkId:linkID]; * @endcode */ -(UIView*)getFIBViewForLinkId:(NSInteger)linkID; /*! * To add Print page view on given page number. * @discussion This method is responsible for managing PrintView on the respective Page. *@param1 printPageView Object of type PrintPageView. *@param2 pageNo Page Number where PrintPage view should be added. * @code * [rendererViewController addPrintPageView:printPageView onPageNO:pageNo]; * @endcode */ -(void)addPrintPageView:(PrintPageButton*)printPageView onPageNO:(NSInteger)pageNo; /*! * To get the Page Image for Page Number. *@param1 pageNo Page Number of page. *@return Image of Page. * @code * [rendererViewController getPageImageToPrintForPageNumber:pageNo]; * @endcode */ -(UIImage*)getPageImageToPrintForPageNumber:(NSInteger)pageNo; /*! * To add WaterMark on page. *@discussion This method is responsible for adding WaterMark on the respective Page. *@param1 watermarkHolderView Object of type WatermarkHolderView. *@param2 pageNo Page Number where WaterMark should be added. * @code * [rendererView addWaterMark:waterMark onPageNumber:pageNo]; * @endcode */ -(void)addWatermark:(WatermarkHolderView*)watermarkHolderView onPageNumber:(NSInteger)pageNo; @end
Pentool¶
With the help of PenTool feature, user can draw a pen drawing on the page/canvas, where pen will be customisable by the user. And the PenToolController class is responsible for handling customisation of a pen such as pen color, pen thickness etc. It also handles action for pentool elements.
/*! @protocol PenToolControllerDelegate @brief The delegate of a PenToolController object must adopt the PenToolControllerDelegate protocol. @discussion PenToolControllerDelegate Protocol used to handle all the callbacks of PenToolController Class. All delegate methods are optional.The PenToolControllerDelegate protocol defines methods that allow users to perform actions when any drawing is created, updated or deleted by the user. Also when undoable status of pentool gets updated. When configuring the PenToolController object, assign your delegate object to its delegate property. */ @protocol PenToolControllerDelegate <NSObject> @optional /*! This method gets called when user create any drawing. @discussion When user create any new pen drawing then this method gets called. User can save drawing object in database or can update view. @param1 drawingObject Object of SDKPentoolVO */ - (void)didCreatePenDrawing:(SDKPentoolVO *)drawingObject; /*! This method gets called when user delete/update any drawing. @discussion When user delete any drawing object or redo then this method gets called. User can update drawing object in database and remove/redraw(redo) drawing and update view. @param1 drawingObject Object of SDKPentoolVO */ - (void)didUpdatePenDrawing:(SDKPentoolVO *)drawingObject; /*! This method gets called when user undo status is changed. @discussion further undo can be done or not, And to know this Use:isUndoable method of PenToolController. */ -(void)didChangeUndoableStatus; /*! This method gets called when user select or unselect any drawings. @discussion When user select, unselecct or delete pen drawings on page then this method gets called. User can update pen drawing object status when select or unselect it or can change pentool item property like if any object is deleted then user can enable undo button if user press on undo button then can disable it. */ -(void)didUpdatedSelectedPenDrawing; @end /** An Object that manage a Pentool. @discussion The PenToolController class is responsible for handling customisation of a pen such as pen color, pen thickness etc. It also handles action for pentool elements. @superclass SuperClass : NSObject */ @interface PenToolController : NSObject /*! To set the Drawing Mode. @discussion Support Mode "DRAWING_MODE_NORMAL". @code [penToolController setDrawingMode:DRAWING_MODE_NORMAL]; @endcode */ @property (assign, nonatomic) DRAWING_MODE mode; /*! The object that acts as the delegate of the PenToolController. @discussion The delegate must adopt the PenToolControllerDelegate protocol. The delegate is not retained. @code penToolController.delegate = self @endcode */ @property (weak, nonatomic) id<PenToolControllerDelegate> delegate; /*! This method is used to set the drawing canvas, where user will draw the pen drawings. @discussion User will receive canvas from RendererViewController Object by calling getPenDrawingCanvas (Will Return all active canvas). User can set canvas to drawing view. @param1 canvasArray Pass array of Canvas on which user will draw the pen drawings. @code [penToolController setPenDrawingCanvas:[rendererView getPenDrawingCanvas]]; @endcode */ -(void)setPenDrawingCanvas:(NSArray*)canvasArray; /*! To set Pen Stroke thickness. @discussion User can update pen thickness of canvas. @param1 thickness Required thickness of PenStroke. @code [penToolController setPenStrokeThickness:1]; @endcode */ -(void)setPenStrokeThickness:(float)thickness; /*! To get Pen Stroke thickness. @discussion User can set pen thickness by getting pen thickness from pentoolcontroller. @return float value thickness of pen stroke. @code [penToolController setPenStrokeThickness:penToolController.getPenStrokeThickness]; @endcode */ -(float)getPenStrokeThickness; /*! To set Pen color. @discussion User can set pen color depending on his/her need like can draw two pendrawing with two diiferent color one is red another is yellow. @param1 color is String value, Required color of Pen; @code [penToolController setPenColor:@RedColor]; @endcode */ -(void)setPenColor:(NSString*)color; /*! To get Pen color. @discussion User can set pen color by getting pen color from pentoolcontroller. @return string value color of pen. @code [penToolController setPenColor:penToolController.getPenColor]; @endcode */ -(NSString*)getPenColor; /*! To get Pen Mode. @discussion User can set pen penmode by getting pen mode from pentoolcontroller. @return penMode. @code [penToolController getPenMode]; @endcode */ -(PenMode)getPenMode; /*! To set Pen Mode. @discussion Supported Mode Are PenModeDrawing/PenModeSelection. PenModeDrawing for drawing on canvas and PenModeSelection for deleting any drawing from canvas. @param1 penMode Required Mode for Pen tool. @code [penToolController setPenMode:PenModeDrawing]; @endcode */ -(void)setPenMode:(PenMode)penMode; /*! To set Pen drawingMode. @discussion Currently only supported Mode is DRAWING_MODE_NORMAL. @param1 drawingMode Required Mode for Pen tool. @code [penToolController setDrawingMode:DRAWING_MODE_NORMAL]; @endcode */ -(void)setDrawingMode:(DRAWING_MODE)drawingMode; /*! To undo last drawing. @discussion User can draw pendrawing which was deleted and update undo array. @code [penToolController undoDrawing]; @endcode */ -(void)undoDrawing; /*! To know,if undo can be done or not. @discussion User can update undo button status depending on isUndoable status. @return BOOL value true/false. @code [penToolController isUndoable]; @endcode */ -(BOOL)isUndoable; /*! To know if any drawing is selected in Erase mode. @discussion User can send true if any drawing is selected or can send false if no drawing is selected. @return BOOL value true/false. @code [penToolController isAnyDrawingSelected] @endcode */ -(BOOL)isAnyDrawingSelected; /*! To Delete the selected drawings. @discussion User can delete selected drawing objcet from array and update drawings on page/canvas. @code [penToolController deleteSelectedDrawing]; @endcode */ - (void)deleteSelectedDrawing; /*! To enable delete on selection. @discussion Enabling this option will delete the pentool drawing, once it is selected/touched, and will not show any selctions. @param1 enabled bool value by enabling(true/YES) if any pen drawing get deleted once it is selected and by disabling(flase/NO) if any pen drawing get selected or shows selection around it and not directly deleted. @code [penToolController setDeleteOnSelectionEnabled:YES]; @endcode */ -(void)setDeleteOnSelectionEnabled:(BOOL)enabled; /*! To Delete All drawings available on active page. @discussion To Delete All drawings available on active page except submited drawings. User can remove/delete all pendrawings from array and update drawings on page/canvas. @code [penToolController deleteActivePagePenDrawings]; @endcode */ -(void)deleteActivePagePenDrawings; @end
PlayerActionBar¶
The PlayerActionDelegate Protocol handles all the callbacks of PlayerActionBar class. The PlayerActionDelegate protocol defines methods that allow users to perform action when any item from player action bar is selected. All methods of this protocol are optional.
@class PlayerActionBar; /*! * Player action bar item Alignment. */ typedef enum { PlayerActionBarAlignmentLeft, PlayerActionBarAlignmentRight, PlayerActionBarAlignmentCenter }PlayerActionBarAlignment; /*! * Player action bar item Mode. */ typedef enum { PlayerActionBarHorizontalMode, PlayerActionBarVerticalMode }PlayerActionBarAlignmentMode; /*! * **@protocol** PlayerActionDelegate * **@brief** The delegate of a PlayerActionBar object must adopt the PlayerActionDelegate protocol. * **@discussion** The PlayerActionDelegate Protocol handles all the callbacks of PlayerActionBar class. The PlayerActionDelegate protocol defines methods that allow user to perform action when any item from player action bar is selected. All methods of this protocol are optional. */ @protocol PlayerActionDelegate<NSObject> @optional /*! * Will be called when user select any item from the Action bar. * **@discussion** This is a delegate method called when user select any item from the Action bar. * **@param**1 playerActionBar Object of type PlayerActionBar from which item was tapped. * **@param**2 item Object of type PlayerActionBarItem which was tapped. */ -(void)didSelectedPlayerActionBar:(PlayerActionBar*)playerActionBar withItem:(PlayerActionBarItem *)item; /** * Will be called when user wants to reset Player Action bar. * **@discussion** This method set state of every item to unselected. * **@param**1 playerActionBar Object of type PlayerActionBar for which reset is required. */ -(void)willResetPlayerActionBar:(PlayerActionBar*)playerActionBar; @end /** * An Object that will be responsible for Creation of Player Action Bar, This is a container which contain object of PlayerActionBarItem * **@superclass** SuperClass : UIView */ @interface PlayerActionBar : UIView <PlayerItemDelegate> /** * To Add Items on the Action Bar. * **@discussion** This method is used to add a new item on Player Action Bar where parameter `item` contains all the information about the item. Item will be added with given width and alignment. - If `tappable`, user can tap on the item and perform required action else, the item won't be tappable. * **@param**1 item Object of type PlayerActionBarItem to be added on Action Bar. * **@param**2 width Width of item. * **@param**3 alignment Alignment of item on Action Bar. * **@param**4 tappable Bool value to check whether Item is Tappable or not. * **@code** * [playerActionBar addActionBarItem:item withItemsWidth:50 withItemAlignments:alignment isTappable:YES]; * **@endcode** */ -(void)addActionBarItem:(PlayerActionBarItem *)item withItemsWidth:(double)width withItemAlignments:(PlayerActionBarAlignment)alignment isTappable:(BOOL)tappable; /** * This method enable and disable Items on the Action Bar. * **@param**1 tag Item's Registered tag. * **@param**2 enabled Item enabled or disable. * **@code** * [playerActionBar enableItemWithTag:tag WithIsEnabled:YES]; * **@endcode** */ -(void)enableItemWithTag:(int)tag WithIsEnabled:(BOOL)enabled; /** * This method Hide and Unhide Items on the Action Bar. * **@param**1 tag Item's Registered tag. * **@param**2 hidden Item that hide or unhide. * **@code** * [playerActionBar hideItemWithTag:tag WithIsHidden:YES]; * **@endcode** */ -(void)hideItemWithTag:(int)tag WithIsHidden:(BOOL)hidden; /*! * The object that acts as the delegate of the PlayerActionBar. * **@code** * [playerActionBar setDelegate:self]; * **@endcode** * **@discussion** The delegate must adopt the PlayerActionDelegate protocol. */ @property (weak, nonatomic) id<PlayerActionDelegate> delegate; /** * To get selected item. * **@return** Returns selected item. * **@code** * [playerActionBar getSelectedItem]; * **@endcode** */ -(PlayerActionBarItem*)getSelectedItem; /** * To get all tappable items. * **@return** Returns All tappable items. * **@code** * [playerActionBar getTappableItems]; * **@endcode** */ -(NSArray*)getTappableItems; /*! * To reset the selected items. * **@discussion** It will set the state of all the items to UnSelected. * **@code** * [playerActionBar resetPlayerActionBarSelection]; * **@endcode** */ -(void)resetPlayerActionBarSelection; /*! * This method should be called when user want to set the PlayerActionBarHorizontalMode/PlayerActionBarVerticalMode of the PlayerActionBar.Default Value will be "layerActionBarHorizontalMode" * @param1 alignmentMode AlignmentMode PlayerActionBarAlignmentMode * @code * [playerActionBar setPlayerActionBarAlignmentMode:PlayerActionBarVerticalMode]; * @endcode */ - (void)setPlayerActionBarAlignmentMode:(PlayerActionBarAlignmentMode)alignmentMode; @end
PlayerActionBarItem
An Object that will be responsible for Creation of Player Action Bar Item.
@class PlayerActionBarItem; /*! * @protocol PlayerItemDelegate * @brief The delegate of a PlayerActionBarItem object must adopt the PlayerItemDelegate protocol. * @discussion The PlayerItemDelegate Protocol handles all the callbacks of PlayerActionBar class. The PlayerItemDelegate protocol defines methods that allow users to perform action when PlayerActionBarItem object is selected. All methods of this protocol are optional. When configuring the PlayerActionBarItem object, assign your delegate object to its delegate property. */ @protocol PlayerItemDelegate<NSObject> @optional /*! * Will be called when action bar item is selected. * @param item Object of type PlayerActionBarItem. */ -(void)didPlayerActionBarSelectItem:(PlayerActionBarItem *)item; @end /** * An Object that will be responsible for Creation of Player Action Bar Item. * @superclass SuperClass : UIView */ @interface PlayerActionBarItem : UIView /*! * Initiate Item. * @param frame Rect for item. * @discussion Initializes and returns a newly allocated view object with specified frame. * @code * [playerActionBarItem initWithFrame:frame]; * @endcode */ -(id)initWithFrame:(CGRect)frame; /*! * The object that acts as the delegate of the PlayerActionBarItem view. * @code * [playerActionBarItem setDelegate:self]; * @endcode * @discussion The delegate must adopt the PlayerItemDelegate protocol. */ @property (weak, nonatomic) id<PlayerItemDelegate> delegate; /*! * Use this to enable/disable item. * @code * [playerActionBarItem setEnabled:YES]; * @endcode */ @property (nonatomic) BOOL enabled; /*! * For Getter and Setter. * @discussion A BOOL value to know item's state(Selected/Unselected). If `selected` is YES, item state is Selected else Unselected. * @code * [playerActionBarItem setSelected:YES]; * @endcode */ @property (nonatomic) BOOL selected; /*! * Use this to get item width. * @code * [playerActionBarItem setWidth:50]; * @endcode */ @property (nonatomic) double width; /*! * Getter and Setter of metaData. * @discussion A Dictionary which contains/store additional information about item. * @code * [playerActionBarItem setMetaData:metaData]; * @endcode */ @property (nonatomic,strong) NSMutableDictionary *metaData; @end
HighlightActionView¶
An Object that will be responsible for creation of Highlight pop up. HighlightActionView is a container, which can contain multiple Items of Type HighlightItem.
/*! * @protocol HighlightActionViewDelegate * @brief The delegate of a HighlightActionView object must adopt the HighlightActionViewDelegate protocol. * @discussion The HighlightActionViewDelegate Protocol handles all the callbacks of HighlightActionView class. The HighlightActionViewDelegate protocol defines methods that allow users to perform action when any item from highlight pop up is selected. All methods of this protocol are optional. */ @protocol HighlightActionViewDelegate<NSObject> @optional /*! * Will be called when any item on highlight popup is selected. * @discussion This is a delegate method called when user tap on any item on highlight popup. * @param item Object of type HighlightItem which is selected. */ -(void)didSelectItem:(HighlightItem *)item; /*! * Delegate method when changes are made in SDKHighlightVO object. * @discussion Will be called when any change is made in SDKHighlightVO object (For which highlight popup was shown, The object is linked with HightlightActionView), here we should save the changed if needed. */ -(void)didUpdatedHighlight; /*! * Will be called when highlight pop up is closed. */ -(void)didHighlightClosed; @end /** * An Object that will be responsible for Creation of Highlight pop up,HighlightActionView is a container, which can contain multiple Items of Type HighlightItem. * @superclass SuperClass : UIView */ @interface HighlightActionView : UIView <HighlightItemDelegate> /*! * Initiate highlight view. * @param1 itemSize Item size(Height and Width). * @discussion Initializes and returns a newly allocated view object with specified item size. * @code * [highlightActionView initWithItemSize:itemSize]; * @endcode */ -(id)initWithItemSize:(CGSize)itemSize; /*! * To add item on highlight popup. * @discussion This method is used to add a new item (Object of Type HighlightItem) on highlight pop up. * @param1 item Item of Type HighlightItem to be added on highlight popup. * @code * [highlightActionView addHighlightItem:view]; * @endcode */ -(void)addHighlightItem:(HighlightItem *)item; /*! * To reset the selected items. * @discussion It will set the state of all the items to UnSelected. * @code * [highlightActionView resetHighlightSelection]; * @endcode */ -(void)resetHighlightSelection; /*! * TO remove highlight pop up from renderer. * @code * [highlightActionView remove]; * @endcode */ -(void)remove; /*! *Setter and getter for itemSize. * @code * [highlightActionView setItemSize:itemSize]; * @endcode */ @property (nonatomic) CGSize itemSize; /*! * Setter and getter for page number for which the highlight popup was shown. * @code * [highlightActionView setPageNumber:pageNumber]; * @endcode */ @property (nonatomic) NSInteger pageNumber; /*! * Setter and getter for SDKHighlightVO object for which highlight popup is shown. * @code * [highlightActionView setHighlightVO:highlightVO]; * @endcode */ @property (strong,nonatomic) SDKHighlightVO *highlightVO; /*! * Setter and getter for items added on highlight popup. * @code * [highlightActionView setHighlightItems:highlightItems]; * @endcode */ @property (strong, nonatomic) NSMutableArray *highlightItems; /*! * The object that acts as the delegate of the HighlightActionView. * @code * [highlightActionView setDelegate:self]; * @endcode * @discussion The delegate must adopt the HighlightActionViewDelegate protocol. */ @property (weak, nonatomic) id<HighlightActionViewDelegate> delegate; @end
HighlightItem¶
An Object that will be responsible for creation of Highlight Item.
@class HighlightItem; /*! * @protocol HighlightItemDelegate * @brief The delegate of a HighlightItem object must adopt the HighlightItemDelegate protocol. * @discussion The HighlightItemDelegate Protocol handles all the callbacks of HighlightItem class. The HighlightItemDelegate protocol defines methods that allow users to perform action when HighlightItem object is selected. All methods of this protocol are optional. */ @protocol HighlightItemDelegate<NSObject> @optional /*! * Will be called when item is selected. * @param item Object of type HighlightItem. */ -(void)didSelectItem:(HighlightItem*)item; @end /** * An Object that will be responsible for Creation of Highlight Item. * @superclass SuperClass : UIView */ @interface HighlightItem : UIView /*! * Initiate Item. * @param1 frame Rect for item, Note, The Size of Item should be given with respect to the size given to the container ie HightlightActionView. * @param1 action Action (Block) that need to be performed when user select the item. * @discussion Initializes and returns a newly allocated view object with specified frame and an Action that need to be performed when user select the item. * @code * [highlightItem initWithFrame:frame WithAction:action]; * @endcode */ - (id)initWithFrame:(CGRect)frame WithAction:(void (^)(void))action; /*! * For Getter and Setter. * @discussion A BOOL value to know item's state(Selected/Unselected). If `selected` is YES, item state is Selected else Unselected. * @code * [highlightItem setSelected:YES]; * @endcode */ @property (nonatomic) BOOL selected; /*! * Getter and Setting of metaData. * @discussion A Dictionary which contains/store additional information about item. * @code * [highlightItem setMetaData:metaData]; * @endcode */ @property (nonatomic) NSMutableDictionary *metaData; /*! * The object that acts as the delegate of the HighlightItem view. * @code * [highlightItem setDelegate:self]; * @endcode * @discussion The delegate must adopt the HighlightItemDelegate protocol. */ @property (weak, nonatomic) id<HighlightItemDelegate> delegate; /*! * Use this to enable/disable item. * @code * [highlightItem setEnabled:YES]; * @endcode */ @property (nonatomic) BOOL enabled; /*! * Call this to perform action which was defined initially. * @code * [highlightItem performAction]; * @endcode * @discussion It will set the state of item to selected and perform the action which is defined in init of HighlightItem. */ -(void)performAction; @end
Notes¶
KitabooSDK exposes a class "HSNoteController", which is responsible for Note (Creation, Deletion and Updation), HSNoteController takes input as SDKHightlightVO, which behaves as the data source for HSNoteController.
/*! @protocol HSNoteControllerDelegate @brief The delegate of a HSNoteController object must adopt the HSNoteControllerDelegate protocol. @discussion HSNoteControllerDelegate Protocol used to handle all the callbacks of HSNoteController Class. All delegate methods are optional. Delegate method gets called when the user selects any one of buttons (Cancel, Post, Share, Delete, Comment) available on note controller. When configuring the HSNoteController object, assign your delegate object to its delegate property. */ @protocol HSNoteControllerDelegate <NSObject> @optional /*! This Method gets called when user taps on cancel button on note. @param1 highlight is object of SDKHighlightVO. @discussion highlight is used to identify selected note for which NoteController is initiated. User can dismiss note controller in this method. */ - (void)didTapOnCancelNote:(SDKHighlightVO *)highlight; /*! This Method gets called when user taps on Post button on note. @param1 highlight is object of SDKHighlightVO. @discussion highlight is used to identify selected note for which NoteController is initiated. User can save or update note and dismiss note controller in this method. */ - (void)didTapOnPostNote:(SDKHighlightVO *)highlight; /*! This Method gets called when user tap on the Delete button on note. @param1 highlight is object of SDKHighlightVO. @discussion highlight is used to identify selected note for which NoteController is initiated. User can delete note object from array or database and remove that note from screen. */ - (void)didTapOnDeleteNote:(SDKHighlightVO *)highlight; /*! This Method gets called when user tap on Share button on note. @param1 highlight is object of SDKHighlightVO. @discussion highlight is used to identify selected note for which NoteController is initiated. User can update note object or can open new view to show list of members to which he/she can share notes. */ - (void)didTapOnShareNote:(SDKHighlightVO *)highlight; /*! This Method gets called when user taps on Post Comment button on note. @param1 highlight is object of SDKHighlightVO. @discussion highlight is used to identify selected note for which NoteController is initiated. User can update note object or can update view to add comments on note view. */ -(void)didTapOnPostNoteComment:(SDKHighlightVO *)highlight; @end /** An Object that manage operations on note. @discussion The HSNoteController class is used to show note where user can create note by using post button , delete note by using the delete button, update note by editing existing note, can make note as important by tapping on the top bar of note. @superclass SuperClass : UIViewController */ @interface HSNoteController : UIViewController /*! Setter/Getter for Highlight @discussion To open note controller, highlight object is mandatory. @code _noteController.highlight = highlight @endcode */ @property (strong, nonatomic) SDKHighlightVO *highlight; /*! The object that acts as the delegate of the hsnotecontroller. @discussion The delegate must adopt the HSNoteControllerDelegate protocol. @code _noteController.delegate = self (Object that conforms to HSNoteControllerDelegate) @endcode */ @property (weak, nonatomic) id<HSNoteControllerDelegate> delegate; /*! To Show/Hide Post Button. @discussion To show or hide Post button present on note, where user can pass YES/true to show Post button or NO/false to hide Post button. @param1 shouldShow is a boolean value where user can pass true/false depending on his/her need. @code [_noteController showPostButton:YES] @endcode */ -(void)showPostButton:(BOOL)shouldShow; /*! To Show/Hide Share Button. @discussion To show or hide share button present on note, where user can pass YES/true to show share button or NO/false to hide share button. @param1 shouldShow is a boolean value where user can true/false depending on his/her need. @code [_noteController showShareButton:YES] @endcode */ -(void)showShareButton:(BOOL)shouldShow; /*! To set the color for shared UGC. @discussion To set the color for shared Highlight/Notes, if the hexColor is nil/or we have not called this method, then the default colors(Blue) will be applied. @param1 hexColor is hex color for shared Highlight/Notes. @code [_noteController setColorForSharedUGC:@"ffffff"] @endcode */ - (void)setColorForSharedUGC:(NSString *)hexColor; /*! To set the color of cursor. @discussion To set the color of cursor of note controller textview, if the tintColor is nil then the default color (Black) will be applied. @param1 tintColor is UIColor which to be set to cursor. @code [_noteController setTextViewTintColor:@"ffffff"] @endcode */ -(void)setTextViewTintColor:(UIColor *)tintColor; /*! Setter/Getter for User (Object of Type KitabooUser). @discussion user object of Type KtabooUser is used to access user data. @code _noteController.user=_user; @endcode */ @property KitabooUser *user; @end
BookMarkView¶
The BookMarkView is a view whose state varies according to the condition, if bookmark is added or not added.
@class BookMarkView; /*! * @protocol BookMarkViewDelegate * @brief The delegate of a BookMarkView object must adopt the BookMarkViewDelegate protocol. * @discussion The BookMarkViewDelegate Protocol handles all the callbacks of BookMarkView class. The BookMarkViewDelegate protocol defines methods that allow user to perform action when bookmark icon is tapped. All methods of this protocol are optional. */ @protocol BookMarkViewDelegate <NSObject> @optional /*! * This method will be called when the user tap on bookmark in page * @param1 bookmarkView BookMarkView object */ - (void)didTapOnBookMark:(BookMarkView *)bookmarkView; @end /** An Object that show a bookmark icon. * @discussion The BookMarkView is a view whose state varies according to the condition that if bookmark added or not added. * @superclass SuperClass : UIViewController */ @interface BookMarkView : UIButton /*! * To initialize bookmarkview with customizable icon. * @param1 bookmarkIcon Icon to be shown on non-bookmarked page. * @param2 selectedBookmarkIcon Icon to be shown on bookmarked page. * @discussion Initializes and returns a newly allocated view object with specific bookmark Icon which needs to be shown on non-bookmarked page and selected Bookmark Icon which needs to be shown on page. * @code * [[BookMarkView alloc] initWithBookmarkIcon:bookmarkIcon WithSelectedBookmarkIcon:selectedBookmarkIcon]; * @endcode */ -(id)initWithBookmarkIcon:(NSString*)bookmarkIcon WithSelectedBookmarkIcon: (NSString*)selectedBookmarkIcon; /*! * To set the necessary frame where bookmark needs to added on page. * @param1 frame CGRect object where the bookmark icon needs to be added on page * @code * [bookMarkView setPositionForParentFrame:frame]; * @endcode */ - (void)setPositionForParentFrame:(CGRect)frame; /*! * To get the updated SDKBookmarkVO object. * @return Returns updated SDKBookmarkVO object. * @code * [bookMarkView getBookmarkVO]; * @endcode */ - (SDKBookmarkVO*)getBookmarkVO; /*! * To set the updated SDKBookmarkVO object. * @discussion This method is used to set data to bookmark view, where parameter `bookmarkVO` contains all the information about the bookmark like text. * @param1 bookmarkVO Is the SDKBookmarkVO object to be updated. * @code * [bookMarkView setBookmarkVO:bookmarkVO]; * @endcode */ - (void)setBookmarkVO:(SDKBookmarkVO *)bookmarkVO; /*! * The object that acts as the delegate of the BookMarkView view. * @code * [bookMarkView setDelegate:self]; * @endcode * @discussion The delegate must adopt the BookMarkViewDelegate protocol. */ @property (nonatomic, weak) id <BookMarkViewDelegate> delegate; /*! * Setter and getter for Page Number where bookmark is being created. * @code * [bookMarkView setPageNumber:10]; * @endcode */ @property (nonatomic,strong) NSNumber *pageNumber; /*! * Setter and Getter of bookmarkVO, which is an object of type SDKBookmarkVO. * @code * [bookMarkView setBookmarkVO]; * @endcode */ @property (nonatomic,strong) SDKBookmarkVO *bookmarkVO; /*! * Implement this method to set the color of bookmark for normal state * @param1 color Pass the UIColor to set color of bookmark for normal state * @code * [bookMarkView setBookmarkColorForNormalState:color]; * @endcode */ -(void)setBookmarkColorForNormalState:(UIColor *)color; /*! * Implement this method to set the color of bookmark for selected state * @param1 color Pass the UIColor to set color of bookmark for selected state * @code * [bookMarkView setBookmarkColorForSelectedState:color]; * @endcode */ -(void)setBookmarkColorForSelectedState:(UIColor *)color; /*! * Implement this method to set the background color of bookmark icon * @param1 color Pass the UIColor to set Bookmark background color. * @code * [bookMarkView setBackgroundColor:color]; * @endcode */ -(void)setBackgroundColor:(UIColor *)color; @end
BookMarkController¶
The BookMarkController is a container view where user can insert his/her bookmark data.
/*! * @protocol BookmarkControllerDelegate * @brief The delegate of a BookMarkController object must adopt the BookmarkControllerDelegate protocol. * @discussion The BookmarkControllerDelegate Protocol handles all the callbacks of BookMarkController class. The BookmarkControllerDelegate protocol defines methods that allow users to perform action when bookmark is completed. */ @protocol BookmarkControllerDelegate <NSObject> @optional /*! * This method is called when the bookmark is created/updated on page. * @param1 bookmarkVO Is the SDKBookmarkVO object */ - (void)didBookmarkCompleteWithBookmarkVO:(SDKBookmarkVO *)bookmarkVO; @end /** An object that manage a BookMark view. * @discussion The BookMarkController is a container view where user can insert his/her bookmark data. SDKBookmarkVO Object is the data source for BookMarkController. * @superclass SuperClass : UIViewController */ @interface BookMarkController : UIViewController{ } /*! * To get the updated SDKBookmarkVO object. * @return Returns updated SDKBookmarkVO object. * @code * [bookMarkController getBookmarkVO]; * @endcode */ - (SDKBookmarkVO *)getBookmarkVO; /*! * To set the updated SDKBookmarkVO object. * @discussion This method is used to set the data to bookmark view, where parameter `bookmarkVO` is the datasource of bookmark. * @param1 bookmarkVO SDKBookmarkVO object to be updated. * @code * [bookMarkController setBookmarkVO:bookmarkVO]; * @endcode */ - (void)setBookmarkVO:(SDKBookmarkVO *)bookmarkVO; /*! * Setter and getter for Page Number where bookmark is being created. * @code * [bookMarkController setPageNumber:10]; * @endcode */ @property (nonatomic,strong) NSNumber *pageNumber; /*! * The object that acts as the delegate of the BookMarkController view. * @code * [bookMarkController setDelegate:self]; * @endcode * @discussion The delegate must adopt the BookmarkControllerDelegate protocol. */ @property (nonatomic, weak) id <BookmarkControllerDelegate> delegate; /*! * Implement this method to set background color to Bookmark's Popover background. * @param1 color Pass the UIColor to set Bookmark's Popover background */ -(void)setBackgroundColorForView:(NSString *)color; /*! * Implement this method to set the tint color of the input field. * @param1 tintColor UIColor which will be applied to input field. */ -(void)setTextFieldTintColor:(UIColor *)tintColor; @end
TOCController¶
The TOCController class is responsible for displaying data on TOC sections.
typedef enum{ TOC = 0, RESOURCE = 1, BOOKMARK = 2, STANDARDS = 3 } Filter; /*! @protocol TOCControllerDelegate @brief The delegate of a TOCController object must adopt the TOCControllerDelegate protocol. @discussion TOCControllerDelegate Protocol used to handle all the callbacks of TOCController Class. The TOCControllerDelegate protocol defines methods that allow users to perform action when any segment is tapped i.e. content, resources and bookmark or any data row from the segment is tapped by the user. All Delegate methods are optional. When configuring the TOCController object, assign your delegate object to its delegate property. */ @protocol TOCControllerDelegate <NSObject> @optional /*! * Will be called when the user Navigate to specific pageID * @discussion When user select any data from contents, bookmark or resources and to navigate to specific page number on which selected data is present this method gets called. User can write code to show some message while navigating to page. * @param1 pageID is the Page Number where user navigates */ - (void)navigateTopage:(NSString *)pageID; /*! * Will be called when user tap on Content segment * @discussion There are three segment present Contents, Resources and Bookmarks when user selects content segment this method gets called. User can update tableview data to show content related data. */ - (void)didSelectContentSegment; /*! Will be called when user taps on specific resource in resource segment * @discussion When user select specific resource present in Resource segment this method gets called. User can write action that need to be performed when user tap on link. * @param1 linkVO is the KFLinkVO object of selected resource */ -(void)actionForLink:(KFLinkVO*)linkVO; /*! * Will be called when user tap on Resource segment * @discussion There are three segment present Contents, Resources and Bookmarks when user selects resource segment this method gets called. User can update tableview data to show resource related data. */ - (void)didSelectResourceSegment; /*! * Will be called when user tap on Bookmark segment * @discussion There are three segment present Contents, Resources and Bookmarks when user selects bookmark segment this method gets called. User can update tableview data to show bookmark related data. */ - (void)didSelectBookmarkSegment; /*! * Will be called when user perform action to close the TOC * @discussion When TOC is opened on mobile and user tap on back button present on toc view then this method gets called. User can write code to remove toc view when tapped on back button. */ -(void)didSelectActionToCloseTOC; /*! * Will be called while setting icon for resources present in resource segment. * @discussion While setting icon to resources present in resource segment this method gets called. User can return icon name which need to be set. * @return NSString */ - (NSString *)labelTextForLink:(KFLinkVO *)linkVO; @end /** An Object that manage a Toc view. @discussion The TOCController class is responsible for displaying data on Toc data and handling actions for TOC. @superclass SuperClass : UIViewController */ @interface TOCController : UIViewController @property (strong, nonatomic) IBOutlet UISegmentedControl *segmentController; /*! The object that acts as the delegate of the TOCController. @discussion The delegate must adopt the TOCControllerDelegate protocol. The delegate is not retained. @code _tOCController.delegate = self @endcode */ @property (nonatomic, weak) id <TOCControllerDelegate> delegate; /*!To set data for TOCController. @discussion User should set the necessary data for displaying the data/content for resources , bookmarks or content segment. @param1 data is the array object where user need to set for specific segment tap @code [_tocController setData:bookmarks]; @endcode */ - (void)setData:(NSArray *)data; /*! * This method used to set background color to TOC Popover @discussion To set background color to toc popover shown for IPad.User can set background color of popover. @param1 color pass the color to set the background color @code [_tocController setBackgroundColorForView:hdThemeVO.reader_default_panel_backgroundColor]; @endcode */ -(void)setBackgroundColorForView:(UIColor *)color; /*! * This method used to set Theme color to TOCPopOver controls @discussion User can use this method to set tint color to segmentController and to set color to TOC title label. @param1 color pass the color to set the Theme color @code [_tocController setThemeColorToView:hdThemeVO.reader_tab_color]; @endcode */ -(void)setThemeColorToView:(UIColor *)color; /*! * This method used to set color to data inside tableView @discussion User can use this method to set color to data inside table of TOCController. @param1 color pass the color to set the data color @code [_tocController setThemeColorToView:hdThemeVO.reader_tab_color]; @endcode */ -(void)setColorToDataInsideTable:(UIColor *)color ; /*! * This method used to set color to back button @discussion User can set color to back button present for mobile device(iPhone). @param1 backButtonColor pass the color to set the back button color @code [_tocController setColorToDataInsideTable:hdThemeVO.reader_default_panel_color]; @endcode */ -(void)setBackButtonColor:(UIColor *)backButtonColor; /*! * This method used to enable/disable Title @discussion User can enable or disable title shown on mobile device(iPhone). User can write code to hide/show title . @param1 enable A Boolean value that determines whether the Title is enable. * The default value is YES. @code [_tocController enableTitle:YES]; @endcode */ -(void)enableTitle:(BOOL)enable; @end
MyDataViewController¶
The MyDataViewController class is responsible for displaying data on MyData sections.
/*! @protocol MyDataControllerDelegate @brief The delegate of a MyDataController object must adopt the MyDataControllerDelegate protocol. @discussion MyDataControllerDelegate Protocol used to handle all the callbacks of MyDataController Class. The MyDataControllerDelegate protocol defines methods that allow user to perform action when any segment is tapped i.e. Highlights and notes or any data row from the segment is tapped by the user. All Delegate methods are optional. When configuring the MyDataController object, assign your delegate object to its delegate property. */ @protocol MyDataControllerDelegate <NSObject> @optional /*! * Will be called when the user tap on any row, in MyDataController, It also provide the pageID for which the row was selected, Use this PageID for Navigate to the respective PageID, Navigation to Specific can be done using Renderer Method * @discussion When user select any data from notes or highlights and to navigate to specific page number on which selected data is present this method gets called. User can write code to show some message while navigating to page. * @param1 pageID is the Page Number where user navigates. */ - (void)navigateTopage:(NSString *)pageID; /*! * Will be called when user taps on My highlights tab and user is on highlights segment. * @discussion Will be called when user is on Highlights segment and tap on My highlights. User can update tableview array to show highlights created by user. */ - (void)didTapOnHighlightsSegmentWithMyHighlights; /*! * Will be called when user taps on Shared with me tab and user is on highlights segment. * @discussion Will be called when user is on Highlights segmant and tap on Shared with me. User can update tableview array to show highlights shared with user. */ - (void)didTapOnHighlightsSegmentWithSharedWithMe; /*! * Will be called when user tap on Important button and user is on highlights segment. * @discussion Will be called when user is on Highlights segmant and tap on Important button to show important highlights only. User can update tableview array to show important highlights created by user. */ - (void)didTapOnImportantHighlights; /*! * Will be called when user taps on My notes tab and user is on notes segment. * @discussion Will be called when user is on Notes segmant and tap on Shared with me. User can update tableview array to show notes created by user. */ - (void)didTapOnNotesSegmentWithMyNotes; /*! * Will be called when user taps on Shared with me tab and user is on notes segment. * @discussion Will be called when user is on Notes segmant and tap on Shared with me. User can update tableview array to show notes shared with user. */ - (void)didTapOnNotesSegmentWithSharedWithMe; /*! * Will be called when user taps on Important button and user is on notes segment. * @discussion Will be called when user is on Notes segment and tap on Important button to show important notes only. User can update tableview array to show important notes created by user. */ - (void)didTapOnImportantNotes; /*! * Will be called when user tap on Share Settings. * @discussion when user is on myData and selects settings buttton then this method gets called. User can show/add new view that contains list of users to whom user can share data. */ - (void)didTapOnShareSettings; /*! * Will be called when user tap on Share button available in notes segment. * @discussion when user is on notes segment and selects share button available in list of note then this method gets called. User can show/add new view that contains list of users to whom user can share data. */ - (void)didTapOnNoteShareSettings:(SDKHighlightVO *)highlightVO; /*! * Will be called when user perform action to close the My Data * @discussion When MyData is opened on mobile and user tap on back button present on my data view then this method gets called. User can write code to remove my data view when tapped on back button. */ -(void)didSelectActionToCloseMyData; /*! Will be called when user tap on accept/reject in note/highlight tab @discussion when other user share highlights/notes with user then user receive notification in myData view that some User wants to share data with you, when user accepts or reject request then this method gets called. User can update data when user accepts request so that shared data can be shown or remove request entry when user rejects request. @param1 highlightVO is object of SDKHighlightVO @param2 accepted is boolean value */ - (void)didAnsweredHighlight:(SDKHighlightVO *)highlightVO accepted:(BOOL) accepted; @end /** An Object that manage a MyData view. @discussion The MyDataViewController class is responsible for displaying and handling action on MyData view(notes/highlights). @superclass SuperClass : UIViewController */ @interface MyDataViewController : UIViewController{ } /*!To set data for myData controller. *@discussion User should set the necessary data for displaying the data/content for notes, highlight segment. @param1 data is the array object where user need to set for specific segment tap. @code [_myDataViewController setData:myDataArray]; @endcode */ - (void)setData:(NSArray *)data; /*!To disable share settings button. *@discussion User should set the BOOL for disabling the Share Settings. User can hide/remove share settings button. @param1 disable is the Boolean object. @code [_myDataViewController disableShareSettings:YES]; @endcode */ - (void)disableShareSettings:(BOOL)disable; /*!To disable Shared with me tab. *@discussion User should set the BOOL for disabling the Share with me. User can remove shared with me tab. @param1 disable is the Boolean object. @code [_myDataViewController disableShareWithMeTab:YES]; @endcode */ - (void)disableShareWithMeTab:(BOOL)disable; /*! The object that acts as the delegate of the MyDataController. @discussion The delegate must adopt the MyDataControllerDelegate protocol. The delegate is not retained. @code _myDataController.delegate = self @endcode */ @property (nonatomic,weak)id<MyDataControllerDelegate>delegate; /*! * This method used to set background color to My data PopOver. @discussion To set background color to myData popover shown for IPad.User can set background color of popover. @param1 color pass the color to set the background color. @code [_tocController setBackgroundColorForView:@"#8fd5e1"]; @endcode */ -(void)setBackgroundColorForView:(UIColor *)color; /*! * This method used to set Theme color to Mydata controls. @discussion User can use this method to set tint color to segmentController and to set color to MyData title label, important button color , MyHighlights/MyNotes , shared with me label. @param1 color pass the color to set the Theme color. @code [_myDataViewController setThemeColorToView:@"#8fd5e1"]; @endcode */ -(void)setThemeColorToView:(UIColor *)color; /*! * This method used to set text color to no data label @param1 color pass the color to set the no data label text color @discussion User can set text color to noData label which is shown when there no data to display. @code [_myDataViewController setNoDataLabelTextColor:@"#8fd5e1"]; @endcode */ -(void)setNoDataLabelTextColor:(UIColor *)color; /*!To disable comments view for note. *@discussion User should set the BOOL for disabling the Comment in Note Segment. User can hide/remove comments view. @param1 disable is the Boolean object. @code [_myDataViewController disableCommentsForNote:YES]; @endcode */ - (void)disableCommentsForNote:(BOOL)disable; /*!To disable share button for note. *@discussion User should set the BOOL for disabling the Share in Note Segment. User can hide share button. @param1 disable is the Boolean object. @code [_myDataViewController disableShareForNote:YES]; @endcode */ - (void)disableShareForNote:(BOOL)disable; /*! * This method used to reload the MyData tableview to update the data @discussion User can use this method to reload data of myData view. User can update view , can set new data and reload table. @code [_myDataViewController reloadMyDataTableView]; @endcode */ - (void)reloadMyDataTableView; /*! To set the color for shared Highlight/Notes @discussion User can set color to the shared ugc if the hexColor is nil then the default color ugc will be applied. * @param1 hexColor is hexa color for shared Highlight/Notes @code [_myDataViewController setColorForSharedUGC:@"#8fd5e1"]; @endcode */ - (void)setColorForSharedUGC:(NSString *)hexColor; /*! * This method used to enable/disable Title * @discussion User can enable or disable title shown on mobile device(iPhone). User can write code to hide/show title . * @param1 enable A Boolean value that determines whether the Title is enable. * The default value is YES. * @code * [_myDataController enableTitle:YES]; * @endcode */ -(void)enableTitle:(BOOL)enable; /*! * Object of KitabooBookVO. */ @property (strong, nonatomic) KitabooBookVO * book; @end
HSDBManager¶
"An Object that will be responsible for persisting the SDK Data."
HSDBManager is a manager class which is used to handle all the communication of data, with database, such as saving highlight to database, deleting any highlight from the database, updating shared data to database etc.
/** An Object that will be responsible for Persisting the SDK Data, The Data is been stored using Core Data (ORM), and will use Sqlite for actual storage. * @discussion HSDBManager is a manager class which is used to handle all the communication of data, with database such as saving highlight to database, deleting any highlight from the database, updating shared data to database etc. * @superclass SuperClass : NSObject */ @interface HSDBManager : NSObject /** Object of type KitabooBookVO*/ @property (strong, nonatomic) KitabooBookVO * book; #pragma Highlight DB Calls /*! * To persist highlight. * @discussion This method is used when user wants to save highlight permanently in the database for given book. Parameter `highlightVO` contains all the information about the highlight eg. text of the highlight, color of the highlight etc. * @param1 highlightVO Object of type SDKHighlightVO, to be persisted. * @param1 bookID Book id for which UGC is created. * @param1 userID User who has created the UGC. * @code * [dbManager saveHighlight:highlightVO bookID:bookID userID:userID]; * @endcode */ - (BOOL)saveHighlight:(SDKHighlightVO *)highlightVO bookID:(NSNumber *)bookID userID:(NSNumber *)userID; /*! * To get persisted highlights for provided Bookid and page ID. * @discussion This method is used to return all the saved highlights of given page, for given book and user. * @param1 pageID An unique page Identifier. * @param2 displayNumber Page number eg. Eg I,II,III. * @param3 bookID Book id for which UGC is created. * @param4 userID User who has created the UGC. * @code * [dbManager highlightForPageID:pageID ForDisplayNumber:displayNumber bookID:bookID userID:userID]; * @endcode * @return Returns persisted highlights for given bookId and PageId. */ - (NSArray *)highlightForPageID:(NSString*)pageID ForDisplayNumber:(NSString*)displayNumber bookID:(NSNumber *)bookID userID:(NSNumber *)userID; /*! * To delete highlight. * @discussion When a highlight to be deleted for given book and user. - If given highlightVO is available for book, method returns YES else NO. Parameter `highlightVO` contains all the information about highlight. * @param1 highlightVO Object of type UGC, to be deleted. * @param1 bookID Book id for which UGC is created. * @param1 userID User who has created the UGC. * @code * [dbManager deleteHighlight:highlightVO bookID:bookID userID:userID]; * @endcode * @return Returns A BOOL Value. */ - (BOOL)deleteHighlight:(UGC *)highlightVO bookID:(NSNumber *)bookID userID:(NSNumber *)userID; /*! * To get persisted highlights for provided Book Id. * @discussion This method is used when user wants to get all the highlights of a book. * @param1 bookID Book id for which UGC is created. * @param1 userID User who has created the UGC. * @code * [dbManager highlightBookID:bookID userID:userID]; * @endcode * @return Returns persisted highlights for given bookId. */ - (NSArray *)highlightBookID:(NSNumber *)bookID userID:(NSNumber *)userID; #pragma Bookmark DB Calls /*! * To get persisted bookmarks for provided Book Id. * @discussion This method is used when user wants to get all the bookmarks of a book. * @param1 bookID Book id for which UGC is created. * @param1 userID User who has created the UGC. * @code * [dbManager bookMarkBookID:bookID userID:userID]; * @endcode * @return Returns persisted bookmarks for given bookId. */ - (NSArray *)bookMarkBookID:(NSNumber *)bookID userID:(NSNumber *)userID; /*! * To persist bookmark. * @discussion This method is used when user wants to save bookmark permanently in the database for given book. Parameter `bookmarkVO` contains all the information about the bookmark eg. text on the bookmark, creator name of the bookmark etc. * @param1 bookmarkVO Object of type SDKBookmarkVO, to be persisted. * @param1 bookID Book id for which UGC is created. * @param1 userID User who has created the UGC. * @code * [dbManager saveBookmark:bookmarkVO bookID:bookID userID:userID]; * @endcode */ - (BOOL)saveBookmark:(SDKBookmarkVO *)bookmarkVO bookID:(NSNumber *)bookID userID:(NSNumber *)userID; /*! * To get persisted bookmarks for provided Book Id and page ID. * @discussion This method is used to return all the saved bookmarks of given page, for given book and user. * @param1 pageID An unique page Identifier. * @param2 displayNumber Page number eg. Eg I,II,III. * @param3 bookID Book id for which UGC is created. * @param4 userID User who has created the UGC. * @code * [dbManager bookmarkForPageID:pageID ForDisplayNumber:displayNumber bookID:bookID userID:userID]; * @endcode * @return Returns persisted highlights for given bookId and PageId. */ - (NSArray *)bookmarkForPageID:(NSString*)pageID ForDisplayNumber:(NSString*)displayNumber bookID:(NSNumber *)bookID userID:(NSNumber *)userID; /*! * To delete Bookmark. * @discussion When a Bookmark to be deleted for given book and user. - If given bookmarkVO is available for book, method returns YES else NO. Parameter `bookmarkVO` contains all the information about bookmark. * @param1 bookmarkVO Object of type UGC, to be deleted. * @param1 bookID Book id for which UGC is created. * @param1 userID User who has created the UGC. * @code * [dbManager deleteBookmark:bookmarkVO bookID:bookID userID:userID]; * @endcode * @return Returns A BOOL Value. */ - (BOOL)deleteBookmark:(UGC *)bookmarkVO bookID:(NSNumber *)bookID userID:(NSNumber *)userID; #pragma Pentool DB Calls /*! * To persist pentool drawing. * @discussion This method is used when user wants to save pentool drawing permanently in the database for given book. Parameter `pentoolVO` contains all the information about the pentool drawing eg. Color Code, Pentool Thickness, Pen Color etc. * @param1 pentoolVO Object of type SDKPentoolVO, to be persisted. * @param1 bookID Book id for which UGC is created. * @param1 userID User who has created the UGC. * @code * [dbManager savePentoolDrawing:pentoolVO bookID:bookID userID:userID]; * @endcode */ - (BOOL)savePentoolDrawing:(SDKPentoolVO *)pentoolVO bookID:(NSNumber *)bookID userID:(NSNumber *)userID; /*! * To get persisted pentool drawings for provided Bookid and page ID. * @discussion This method is used to return all the saved pentool drawings of given page, for given book and user. * @param1 pageID An unique page Identifier. * @param2 displayNumber Page number eg. Eg I,II,III. * @param3 bookID Book id for which UGC is created. * @param4 userID User who has created the UGC. * @code * [dbManager pentoolDrawingForPageID:pageID ForDisplayNumber:displayNumber bookID:bookID userID:userID]; * @endcode * @return Returns persisted pentool drawings for provided Bookid and page ID. */ - (NSArray *)pentoolDrawingForPageID:(NSString*)pageID ForDisplayNumber:(NSString*)displayNumber bookID:(NSNumber *)bookID userID:(NSNumber *)userID; /*! * To delete Pentool Drawing. * @discussion When a Pentool Drawing to be deleted for given book and user. - If given pentoolVO is available for book, method returns YES else NO. Parameter `pentoolVO` contains all the information about pentool. * @param1 pentoolVO Object of type UGC, to be deleted. * @param1 bookID Book id for which UGC is created. * @param1 userID User who has created the UGC. * @code * [dbManager deletePentoolDrawing:pentoolVO bookID:bookID userID:userID]; * @endcode * @return Returns A BOOL Value. */ - (BOOL)deletePentoolDrawing:(UGC *)pentoolVO bookID:(NSNumber *)bookID userID:(NSNumber *)userID; #pragma mark BookClassInfo DB Calls /*! * To persist Book Information of type SDKBookClassInfoVO. * @discussion This method is used when user wants to save SDKBookClassInfoVO object permanently in the database for given book. Parameter `bookClassInfoVO` contains all the information about the Book eg. Title of the book, Total number of pages in book etc. * @param1 bookClassInfoVO Object of type SDKBookClassInfoVO, to be persisted. * @param1 bookGuid Book id for which SDKBookClassInfoVO is created. * @param1 userId User who has created the SDKBookClassInfoVO. * @code * [dbManager saveClassInfoOfBook:bookClassInfoVO ofBook:bookGuid forUser:userId]; * @endcode */ - (BOOL)saveClassInfoOfBook:(SDKBookClassInfoVO *)bookClassInfoVO ofBook:(NSNumber *)bookGuid forUser:(NSNumber *)userId; /*! * To get persisted SDKBookClassInfoVO for provided Book Id and user Id. * @discussion This method is used to return all the saved SDKBookClassInfoVO Objects for given book and user. * @param1 bookGuid Book id for which SDKBookClassInfoVO is created. * @param2 userId User who has created the SDKBookClassInfoVO. * @code * [dbManager bookClassInfoArrayForBookID:bookGuid forUser:userId]; * @endcode * @return Returns persisted SDKBookClassInfoVO for provided Book Id and user Id. */ - (NSArray *)bookClassInfoArrayForBookID:(NSNumber *)bookGuid forUser:(NSNumber *)userId; /*! * Should be called to save UGC. * @discussion This method is used to save dictionary of KitabooUGC in database for given book and user. Parameter `ugcDictionary` contains serverId and LocalId, with help of that user can get to know whether any KitabooUGC available in database or not. - If KitabooUGC is not available in database, it will return NO else return YES. @param1 ugcDictionary Is the KitabooUGC dictionary to be persisted. @param2 bookID Book id for which KitabooUGC is created. @param3 userID User id for which KitabooUGC is created. @param4 isSynced A BOOL value to be persisted. @param5 modifiedDate Last modified date to be persisted. * @code * [dbManager saveKitabooUGCWithDictionary:ugcDictionary withBookID:bookID userID:userID withIsSynced:YES WithModifiedDate:modifiedDate]; * @endcode * @return Returns A BOOL value. */ -(BOOL)saveKitabooUGCWithDictionary:(NSDictionary *)ugcDictionary withBookID:(NSNumber *)bookID userID:(NSNumber *)userID withIsSynced:(BOOL)isSynced WithModifiedDate:(NSDate*)modifiedDate; /*! * Should be called to update SharedCollabData. * @discussion SharedCollabData is nothing but shared notes. This method is used when user wants to update shared notes data for given book Id. Parameter `sharedUGCData` contains all the information about updated SharedCollabData. * @param1 sharedUGCData Is the dictionary to be persisted. * @param2 bookID Book id for which KitabooUGC is created. * @param3 userID User who has created the KitabooUGC. * @code * [dbManager updateSharedCollabData:sharedUGCData ofBook:bookID ForUserID:userId]; * @endcode */ -(void)updateSharedCollabData:(NSDictionary *)sharedUGCData ofBook:(NSNumber *)bookID ForUserID:(NSNumber*)userID; /*! * Should be called to update ugc data. * @discussion With the help of parameter `localId` user can get the existing UGC. If UGC with this local Id exists and its status is DELETE, UGC will be deleted. Otherwise server Id, date time, isSynced etc parameters will be updated in existing UGC according to given data. * @param1 localId Used to get existing UGC. * @param1 ugcId Is the ugc to be persisted. * @param2 dateTime Is the NSString value which to be persisted. * @param3 synced Is the boolean to be persisted. * @code * [dbManager updateUGC:localId ugcId:ugcId dateTime:dateTime synced:YES]; * @endcode */ - (void)updateUGC:(NSString *)localId ugcId:(NSString *)ugcId dateTime:(NSString *)dateTime synced:(BOOL)synced; /*! * To get the unsynced ugc data. * @discussion This method fetch all the unsynced ugc data, that stored in database and returns the unsynced ugc data for given user ID. * @param1 userID User id who has created the KitabooUGC. * @return Returns Dictionary of unsynced ugc data. * @code * [dbManager getUnsynedUGCDictionaryForUserID:userID]; * @endcode */ -(NSDictionary*)getUnsynedUGCDictionaryForUserID:(NSNumber*)userID; /*! * To get a string of last synced date for book. * @param1 bookID Book id. * @param2 userID User id who has created the BookSyncInfo. * @return String of last synced date for book. * @code * [dbManager getLastSyncedDateForBookID:bookID ForUserID:userID]; * @endcode */ -(NSString*)getLastSyncedDateForBookID:(NSNumber*)bookID ForUserID:(NSNumber*)userID; /*! * Should be called to set the last sync date for given book and user. * @param1 lastSyncDate To be persisted. * @param2 bookID Book id. * @param3 userID User id who has created the BookSyncInfo. * @code * [dbManager setLastSyncedDate:lastSyncDate ForBookID:bookID ForUserID:userID]; * @endcode */ -(void)setLastSyncedDate:(NSString*)lastSyncDate ForBookID:(NSNumber*)bookID ForUserID:(NSNumber*)userID; /*! * Should to called to submit the annotations. * @param1 bookID Book id. * @param2 userID User id who has created the KitabooUGC. * @code * [dbManager submitAnotationForBookID:bookID ForUserID:userID]; * @endcode */ -(void)submitAnotationForBookID:(NSNumber*)bookID ForUserID:(NSNumber*)userID; /*! * To get the SDKPentoolVO from ugc dictionary. * @discussion This method is used to return object of type SDKPentoolVO from given penToolUGCDict, which contains all the information about pentool as well UGC. * @param1 penToolUGCDict To be persisted. * @code * [dbManager getSDKPenToolVOFromUGCDictionary:penToolUGCDict]; * @endcode * @return Returns the SDKPentoolVO from ugc dictionary. */ -(SDKPentoolVO *)getSDKPenToolVOFromUGCDictionary:(NSDictionary *)penToolUGCDict; /*! *To get a dictionary format from SDKPenToolVO object. * @param1 penToolVO To be persisted. * @code * [dbManager getPenToolUGCDictionaryFromSDKPenToolVO:penToolVO]; * @endcode * @return Returns a dictionary format from SDKPenToolVO object. */ -(NSDictionary *)getPenToolUGCDictionaryFromSDKPenToolVO:(SDKPentoolVO *)penToolVO; /*! * To get to know for given book and user submission of Annotation is allowed or not. * @discussion If this returns YES, user will be able to submit annotation for the book else, he/she will not be able to submit annotation for particular book. * @param1 bookID Book id. * @param3 userID User id who has created the KitabooUGC. * @code * [dbManager isSubmitAnotationAllowedForBookID:bookID ForUserID:userID]; * @endcode * @return Returns a BOOL. */ -(BOOL)isSubmitAnotationAllowedForBookID:(NSNumber*)bookID ForUserID:(NSNumber*)userID; /*! * Should be called to delete saved received ugc from database. * @discussion This method is used to delete already saved received UGC for given book and user. * @param1 bookID Book id. * @param3 userID User id who has created the BookSyncInfo. * @code * [dbManager deleteAllReceivedUGCForBookID:bookID UserID:userID]; * @endcode */ -(void)deleteAllReceivedUGCForBookID:(NSNumber *)bookID UserID:(NSNumber *)userID; /*! * To get the unsynced Collab data. * @discussion This method is used to fetch Unsynced Collab Data which is shared/received notes data for given user. * @param1 userID User id who has created the KitabooUGC. * @return Returns unsynced Collab data. * @code * [dbManager getUnsyncedCollabDataDictionaryForUserID:userID]; * @endcode */ - (NSDictionary *)getUnsyncedCollabDataDictionaryForUserID:(NSNumber *)userID; /*! * Should be called to update Accept/Reject Collab data. * @param1 ugcId Is the ugc to be persisted * @param2 accepted Is the boolean to be persisted. * @param3 userId User id who has created the KitabooUGC. * @code * [dbManager updateAnsweredUGC:ugcId accepted:accepted andUserId:userId]; * @endcode */ - (void)updateAnsweredUGC:(NSString *)ugcId accepted:(BOOL)accepted andUserId:(NSString *)userId; /*! * Should be called to update the isCollabSubmitted. * @param1 userID User id who has created the KitabooUGC. * @code * [dbManager setCollabDataSubmittedForUserID:userId]; * @endcode */ - (void)setCollabDataSubmittedForUserID:(NSNumber *)userID; /*! * Should be called to check whether resources are decrypted or not. * @discussion Returns YES if resources are decrypted, NO if not decrypted. * @param1 bookID Book id. * @return A BOOL. * @code * [dbManager isResourcesDecryptedForBookID:bookID]; * @endcode */ - (BOOL)isResourcesDecryptedForBookID:(NSNumber *)bookID; /*! * Should be called to update whether resources are decrypted. * @param1 bookID Book id. * @param2 isDecrypted Is the boolean to be persisted. * @code * [dbManager updateResourceDecryption:isDecrypted ForBookID:bookID]; * @endcode */ - (void)updateResourceDecryption:(BOOL)isDecrypted ForBookID:(NSNumber *)bookID; /*! * Create Reader Analytics Session and return Session ID. * @code * [dbManager createReaderAnalyticsSessionForUserID:userID WithBookID:bookID WithAnalyticsData:analyticsData]; * @endcode */ - (NSString*)createReaderAnalyticsSessionForUserID:(NSString*)userID WithBookID:(NSString*)bookID withAnalyticsData:(NSString *)analyticsData; /*! *Should be called to update reader analytics for user @param1 userID user id who has created the reader analytics. @param2 bookID book id. @param3 analyticsJSON is the reader analytics tracked data. * @code * [dbManager updateReaderAnalyticsSessionForUser:userID WithBookID:bookID WithAnalyticsData:analyticsJSON]; * @endcode */ -(void)updateReaderAnalyticsSessionForUser:(NSNumber *)userID WithBookID:(NSNumber *)bookID WithAnalyticsData:(NSString*)analyticsJSON; /*! *Should be called to get reader analytics data for user @param1 userID user id who has created the reader analytics. @param2 bookID book id. * @code * [dbManager getReaderAnalyticsForUser:userID WithBookID:bookID]; * @endcode */ -(NSDictionary *)getReaderAnalyticsForUser:(NSNumber *)userID WithBookID:(NSNumber *)bookID; /*! *Should be called to delete reader analytics data for user @param1 userID user id who has created the reader analytics. @param2 bookID book id. * @code * [dbManager deleteReaderAnalyticsForUser:userID WithBookID:bookID withSessionID:sessionID]; * @endcode */ -(void)deleteReaderAnalyticsForUser:(NSNumber *)userID WithBookID:(NSNumber *)bookID withSessionID:(NSString *)sessionID; /*! *Should be called to get SDKFIBVO Object @param1 linkId link id of FIB. @param2 userId user id ho has created FIB. * @code * [dbManager getFIBObjectWithLinkId:linkId forUserId:userId]; * @endcode */ - (SDKFIBVO *) getFIBObjectWithLinkId:(NSNumber *)linkId forUserId:(NSNumber *) userId; /*! *Should to called to Save the FIB data @param1 fibVO fibVO Object of SDKFIBVO to save. @param2 bookID book id. @param3 userID user id who has created the FIB. * @code * [dbManager saveFIB:fibVO bookID:bookID userID:userID]; * @endcode */ - (BOOL)saveFIB:(SDKFIBVO *)fibVO bookID:(NSNumber *)bookID userID:(NSNumber *)userID; /*! *Should to called to Delete the FIB data @param1 fibVO fibVO Object of SDKFIBVO to delete. @param2 bookID book id. @param3 userID user id who has created the FIB. * @code * [dbManager deleteFIB:fibVO bookID:bookID userID:userID]; * @endcode */ - (BOOL)deleteFIB:(SDKFIBVO *)fibVO bookID:(NSNumber *)bookID userID:(NSNumber *)userID; /*! *Should to called to Update the FIB data @param1 fibVO fibVO Object of SDKFIBVO to update. @param2 bookID book id. @param3 userID user id who has created the FIB. * @code * [dbManager updateFIB:fibVO bookID:bookID userID:userID]; * @endcode */ - (void)updateFIB:(SDKFIBVO *)fibVO bookID:(NSNumber *)bookID userID:(NSNumber *)userID; /*! *Returns the SDKFIBVO from ugc dictionary @param1 fibUGCDict to be persisted. * @code * [dbManager getSDKFIBVOFromUGCDictionary:fibUGCDict]; * @endcode */ -(SDKFIBVO *)getSDKFIBVOFromUGCDictionary:(NSDictionary *)fibUGCDict; /*! *Returns a dictionary format from SDKFIBVO object @param1 fibVO to be persisted. * @code * [dbManager getFIBUCGDictionaryFromSDKFIBVO:fibVO]; * @endcode */ -(NSDictionary*)getFIBUCGDictionaryFromSDKFIBVO:(SDKFIBVO *)fibVO; /*! *Should to called to update share list and receive list @param1 shareRecieveListDic shareRecieveListDic dictionary of share and receive list @param2 bookGuid book id. @param3 userId user id who has created. * @code * [dbManager saveSharedReceivedInfo:shareRecieveListDic ofBook:bookGuid forUser:userId]; * @endcode */ - (BOOL)saveSharedReceivedInfo:(NSDictionary *)shareRecieveListDic ofBook:(NSNumber *)bookGuid forUser:(NSNumber *)userId; /*! To persist TextAnnotation @param1 textAnnotationVO SDKTextAnnotationVO(UGC) object be persisted @param2 bookID book id for which UGC is created. @param3 userID user id who has created the UGC. * @code * [dbManager saveTextAnnotation:textAnnotationVO bookID:bookID userID:userID]; * @endcode **/ - (BOOL)saveTextAnnotation:(SDKTextAnnotationVO *)textAnnotationVO bookID:(NSNumber *)bookID userID:(NSNumber *)userID; /*! Returns persisted textAnnotationVO for provided Bookid and page ID. @param1 pageID unique page Identifier @param2 displayNumber page display Number/folio Number @param3 bookID book id for which UGC is created. @param4 userID user id who has created the UGC. * @code * [dbManager textAnnotationVOForPageID:pageID ForDisplayNumber:displayNumber bookID:bookID userID:userID]; * @endcode */ - (NSArray *)textAnnotationVOForPageID:(NSString*)pageID ForDisplayNumber:(NSString*)displayNumber bookID:(NSNumber *)bookID userID:(NSNumber *)userID; /*! To delete TextAnnotationVO. @param1 ugc SDKTextAnnotationVO(UGC) object be deleted @param2 bookID book id for which UGC is created. @param3 userID user id who has created the UGC. * @code * [dbManager deleteTextAnnotation:ugc bookID:bookID userID:userID]; * @endcode */ - (BOOL)deleteTextAnnotation:(SDKTextAnnotationVO *)ugc bookID:(NSNumber *)bookID userID:(NSNumber *)userID; /*! * Should to called to fetch scorm data. @param1 bookID book id. @param2 userID user id of current user. @param3 classId classid of book. @param4 checkSynced whether to check for item is synced or not. * @return Returns scorm data. * @code * [dbManager fetchSCORMInfoFromDBWithBookID:bookID forUser:userID andClassId:classId checkIfSynced:YES]; * @endcode */ - (NSMutableArray *)fetchSCORMInfoFromDBWithBookID:(NSNumber *)bookID forUser:(NSNumber *)userID andClassId:(NSString *)classId checkIfSynced:(BOOL)checkSynced; /*! * Should to called to save scorm data. * @param1 bookID book id. * @param2 userID user id of current user. * @param3 scormId scorm id of scorm resource. * @param4 scormDataString scorm core_cmi data string. * @param5 classId classid of book. * @param6 activityName name of scorm * @param7 isSynced whether it is is synced or not * @code * [dbManager saveSCORMdataToDB:bookID forUser:userID forSCORMId:scormId withSCORMString:scormDataString andClassId:classId andPageID:pageID andActivityname:activityName andIsSynced:YES]; * @endcode */ - (void)saveSCORMdataToDB:(NSNumber *)bookID forUser:(NSNumber *)userID forSCORMId:(NSString *)scormId withSCORMString:(NSString *)scormDataString andClassId:(NSString *)classId andPageID:(NSNumber *)pageID andActivityname:(NSString *)activityName andIsSynced:(BOOL)isSynced; /*! * Should to called to fetch scorm data. * @discussion This method is used to fetch saved scorm Data for given book and user. * @param1 bookID Book id. * @param2 userID User id of current user. * @param3 scormId Scorm id of scorm resource. * @return Returns scorm data. * @code * [dbManager fetchScormDataWithBookID:bookID forUser:userID forSCORMId:scormId]; * @endcode */ -(NSString *)fetchScormDataWithBookID:(NSNumber *)bookID forUser:(NSNumber *)userID forSCORMId:(NSNumber *)scormId; /*! * To persist protractor drawing. * @discussion This method is used when user wants to save protractor drawing permanently in the database for given book. Parameter `protractorVO` contains all the information about the protractor drawing eg. Color Code, protractor data etc. * @param1 protractorVO Object of type SDKProtractorVO, to be persisted. * @param1 bookID Book id for which UGC is created. * @param1 userID User who has created the UGC. * @code * [dbManager saveProtractor:protractorVO bookID:bookID userID:userID]; * @endcode */ - (BOOL)saveProtractor:(SDKProtractorVO *)protractorVO bookID:(NSNumber *)bookID userID:(NSNumber *)userID; /*! * To get persisted protractor drawings for provided Bookid and page ID. * @discussion This method is used to return all the saved protractor drawings of given page, for given book and user. * @param1 pageID An unique page Identifier. * @param2 displayNumber Page number eg. Eg I,II,III. * @param3 bookID Book id for which UGC is created. * @param4 userID User who has created the UGC. * @code * [dbManager protractorDrawingForPageID:pageID ForDisplayNumber:displayNumber bookID:bookID userID:userID]; * @endcode * @return Returns persisted protractor drawings for provided Bookid and page ID. */ - (NSArray *)protractorDrawingForPageID:(NSString*)pageID ForDisplayNumber:(NSString*)displayNumber bookID:(NSNumber *)bookID userID:(NSNumber *)userID; /*! * To delete Protractor Drawing. * @discussion When a Protractor Drawing to be deleted for given book and user. - If given protractorVO is available for book, method returns YES else NO. Parameter `protractorVO` contains all the information about protractor. * @param1 protractorVO Object of type UGC, to be deleted. * @param1 bookID Book id for which UGC is created. * @param1 userID User who has created the UGC. * @code * [dbManager deleteProtractorDrawing:protractorVO bookID:bookID userID:userID]; * @endcode * @return Returns A BOOL Value. */ - (BOOL)deleteProtractorDrawing:(UGC *)protractorVO bookID:(NSNumber *)bookID userID:(NSNumber *)userID; /*! *Returns the SDKFIBVO for Equation Editor @param1 text equation editor text @param1 link object of type KFLinkVO @param1 userId User who has created the UGC * @code * [dbManager getEquationFIBObjectForText:text WithLink:link forUserId:userID]; * @endcode */ - (SDKFIBVO *)getEquationFIBObjectForText:(NSString*)text WithLink:(KFLinkVO *)link forUserId:(NSNumber *)userId; /*! * To Clear All FIBs on Page Number. * @discussion This method is used to clear/delete All unsubmitted FIBs,Dropdowns and EquationEditors for given page Number, book and user. * @param1 pageID An unique page Identifier. * @param2 displayNum page display Number/folio Number. * @param3 bookID Book id for which UGC is created. * @param4 userID User who has created the UGC. * @code * [dbManager clearAllFIBsOnPageNumber:pageID withDisplayNumber:displayNum bookID:bookID andUserID:userID]; * @endcode */ -(void)clearAllFIBsOnPageNumber:(NSString*)pageID withDisplayNumber:(NSString*)displayNum bookID:(NSNumber*)bookID andUserID:(NSNumber *)userID; /*! * Should be called to check whether unsubmitted FIBs Available on Page Number or not. * @discussion Returns YES if unsubmitted FIBs Available on Page, NO if unsubmitted FIBs not Available on Page. * @param1 pageID An unique page Identifier. * @param2 displayNum page display Number/folio Number. * @param3 bookID Book id for which UGC is created. * @param4 userID User who has created the UGC. * @return A BOOL. * @code * [dbManager isUnsubmittedFIBsAvailableOnPageID:pageID withDisplayNumber:displayNum bookID:bookID andUserID:userID]; * @endcode */ -(BOOL)isUnsubmittedFIBsAvailableOnPageID:(NSString*)pageID withDisplayNumber:(NSString*)displayNum bookID:(NSNumber*)bookID andUserID:(NSNumber *)userID; @end
KitabooDataSyncingManager¶
"An Object that will be responsible for Data Syncing."
KitabooDataSyncingManager is a manager class which is used to handle all the synchronization of data. It behaves like an intermediate class between local database and server, such as in case of fetch UGC (User Generated Code), data is fetched from the server and saved in database and in case of save UGC, data is fetched from database and saved on server.
/*! * @protocol KitabooDataSyncingManagerDelegate * @brief The delegate of a KitabooDataSyncingManager object must adopt the KitabooDataSyncingManagerDelegate protocol. * @discussion KitabooDataSyncingManagerDelegate Protocol used to handle all the callbacks of KitabooDataSyncingManager Class.The KitabooDataSyncingManagerDelegate protocol defines methods that allow user to perform actions when data is saved, fetched or synchronized successfully. The methods of this protocol are all optional. */ @protocol KitabooDataSyncingManagerDelegate <NSObject> @optional /*! * Will be called when Fetch UGC request is succeeded. * @discussion This is a delegate method used when Fetch UGC request execute successfully. */ -(void)didFetchedUGCSuccessfully; /*! * Will be called when Fetch UGC request is failed. * @discussion This is a delegate method used when Fetch UGC request failed with error. * @param1 error Is the Fetch UGC fail error of type NSError. */ -(void)didFailedToFetchUGCWithError:(NSError*)error; /*! * Will be called when Save UGC request is succeeded. * @discussion This is a delegate method used when Save UGC request execute successfully. */ -(void)didSavedUGCSuccessfully; /*! * Will be called when Save UGC request is failed. * @discussion This is a delegate method used when Save UGC request failed with error. * @param1 error Is the Save UGC fail error of type NSError. */ -(void)didFailedToSaveUGCWithError:(NSError*)error; /*! * Will be called when Sync UGC request execute successfully. * @discussion UGC Sync is a Process which uses combination of API Mentioned below to fetch UGC Data from server and Save to Local storage, and Vice versa. [For Managing Local Storage, it use HSDBManager]. - APIs which are used in UGC Sync, fetchBookClassInfo, fetchUGCOperation, fetchTeacherAnnotations, fetchCollabShare, saveUGCDataOperation, saveCollabData, fetchcollabUGC etc. */ -(void)didUGCSynchCompletedSuccessfully; /*! * Will be called when UGC Sync request is failed. * @discussion UGC Sync is a Process which uses combination of API Mentioned below to fetch UGC Data from server and Save to Local storage, and Vice versa. [For Managing Local Storage, it use HSDBManager]. - APIs which are used in UGC Sync, fetchBookClassInfo, fetchUGCOperation, fetchTeacherAnnotations, fetchCollabShare, saveUGCDataOperation, saveCollabData, fetchcollabUGC etc. * @param1 error Is the UGC Sync fail error of type NSError. */ -(void)didUGCSynchFailedWithError:(NSError*)error; /*! * Will be called when save teacher annotation request is succeeded. * @discussion Save Teacher Annotation is a process when teacher wants to save student's data with his/her reviews. - This is a delegate method used when save Teacher annotation request execute successfully. */ -(void)didSavedStudentAnotationSuccessfully; /*! * Will be called when save student annotation request is failed. * @discussion Save Teacher Annotation is a process when teacher wants to save student's data with his/her reviews. - This is a delegate method used when save student annotation request failed with error. * @param1 error Is the save student annotation fail error of type NSError. */ -(void)didFailedToSaveStudentAnotationWithError:(NSError*)error; /*! * Will be called when save student annotation request is succeeded. * @discussion Save Student Annotation is a process when student wants to save his/her data to teacher. - This is a delegate method used when save student annotation request execute successfully. */ -(void)didSubmitedAnotationSuccessfully; /*! * Will be called when save student annotation request is failed. * @discussion Save Student Annotation is a process when student wants to save his/her data to teacher. - This is a delegate method used when save student annotation request failed with error. * @param1 error Is the save student annotation fail error of type NSError. */ -(void)didFailedToSubmitAnotationWithError:(NSError*)error; /*! * Will be called when save scorm request is succeeded. */ -(void)didSavedScormDataSuccessfully; /*! * Will be called when save scorm request is failed. * @param1 error Is the scorm request fail error of type NSError. */ -(void)didFailedToSaveScormWithError:(NSError*)error; /*! * Will be called when fetch scorm request is succeeded. */ -(void)didFetchScormDataSuccessfully; /*! * Will be called when fetch scorm data request is failed. * @param1 error Is the Fetch request fail error of type NSError. */ -(void)didFailedToFetchScormWithError:(NSError*)error; /*! * Will be called when UGC Sync request is succeeded for given userID and bookID. * @discussion UGC Sync is a Process which uses combination of API Mentioned below to fetch UGC Data from server and Save to Local storage, and Vice versa. [For Managing Local Storage, it use HSDBManager]. - APIs which are used in UGC Sync, fetchBookClassInfo, fetchUGCOperation, fetchTeacherAnnotations, fetchCollabShare, saveUGCDataOperation, saveCollabData, fetchcollabUGC etc. * @param1 userID UserID for which synch succeeded. * @param2 bookID BookID for which synch succeeded. */ -(void)didUGCSynchCompletedSuccessfullyWithUserID:(NSString*)userID withBookID:(NSString*)bookID; /*! * Will be called when UGC Sync request is failed for given userID and bookID. * @discussion UGC Sync is a Process which uses combination of API Mentioned below to fetch UGC Data from server and Save to Local storage, and Vice versa. [For Managing Local Storage, it use HSDBManager]. - APIs which are used in UGC Sync, fetchBookClassInfo, fetchUGCOperation, fetchTeacherAnnotations, fetchCollabShare, saveUGCDataOperation, saveCollabData, fetchcollabUGC etc. *@param1 error Is the synch UGC request fail error of type NSError. *@param2 userID UserID for which synch failed. *@param3 bookID BookID for which synch failed. */ -(void)didUGCSynchFailedWithError:(NSError*)error withUserID:(NSString*)userID withBookID:(NSString*)bookID; /*! Will be called when UGC save request is succeeded for given userID and bookID. *@discussion Save UGC Operation is a Process which uses combination of API Mentioned below to fetch UGC Data from server and Save to Local storage, and Vice versa. [For Managing Local Storage, it use HSDBManager]. - APIs which are used in Save UGC Operation, saveUGCDataOperation, saveCollabData etc. *@param1 userID userID for which save succeeded. *@param2 bookID bookID for which save succeeded. */ -(void)didUGCSaveCompletedSuccessfullyWithUserID:(NSString*)userID withBookID:(NSString*)bookID; /*! Will be called when UGC save request is failed for given userID and bookID. *@discussion Save UGC Operation is a Process which uses combination of API Mentioned below to fetch UGC Data from server and Save to Local storage, and Vice versa. [For Managing Local Storage, it use HSDBManager]. - APIs which are used in Save UGC Operation, saveUGCDataOperation, saveCollabData etc. *@param1 error Is the save UGC request fail error of type NSError. *@param2 userID userID for which save failed *@param3 bookID bookID for which save failed */ -(void)didUGCSaveFailedWithError:(NSError*)error withUserID:(NSString*)userID withBookID:(NSString*)bookID; /*! Will be called when UGC fetch request is succeeded for given userID and bookID. *@discussion Fetch UGC Operation is a Process which uses combination of API Mentioned below to fetch UGC Data from server and Save to Local storage, and Vice versa. [For Managing Local Storage, it use HSDBManager]. - APIs which are used in Fetch UGC Operation, fetchBookClassInfo, fetchUGCOperation, fetchTeacherAnnotations, fetchCollabShare, fetchcollabUGC etc. *@param1 userID userID for which fetch succeeded. *@param2 bookID bookID for which fetch succeeded. */ -(void)didUGCFetchCompletedSuccessfullyWithUserID:(NSString*)userID withBookID:(NSString*)bookID; /*! Will be called when UGC fetch request is failed for given userID and bookID. *@discussion Fetch UGC Operation is a Process which uses combination of API Mentioned below to fetch UGC Data from server and Save to Local storage, and Vice versa. [For Managing Local Storage, it use HSDBManager]. - APIs which are used in Fetch UGC Operation, fetchBookClassInfo, fetchUGCOperation, fetchTeacherAnnotations, fetchCollabShare, fetchcollabUGC etc. *@param1 error error Is the save UGC request fail error of type NSError. *@param2 userID userID for which fetch failed. *@param3 bookID bookID for which fetch failed. */ -(void)didUGCFetchFailedWithError:(NSError*)error withUserID:(NSString*)userID withBookID:(NSString*)bookID; /*! * Will be called when save highlight request is succeeded. * @discussion This method is used for Shared/Received Highlights. When user wants to save shared highlight list and received highlight list, he/she will use this method. - This is a delegate method used when save highlight request execute successfully. */ - (void)didSaveHighlightDataSuccessfully; /*! * Will be called when save highlight request is failed. * @param1 error Is the save highlight request fail error of type NSError. */ - (void)didSaveHighlightDataFailedWithError:(NSError *)error; /*! * Will be called when save highlight request is failed. * @param1 error Is the save highlight request fail error of type NSError. * @param2 shareAndRecieveDict Is an object of type NSDictionary with highlight lists shareList and receiveList. * @param2 bookID BookId of the current book. */ - (void)didSaveHighlightDataFailedWithError:(NSError *)error withShareAndRecieveDict:(NSDictionary*)shareAndRecieveDict ForBookID:(NSNumber*)bookID; /*! * Will be called when save tracking request is succeeded. * @discussion This method is called when user wants to save tracked data(for example Highlight created, Note shared, User close the book etc.) for particular given book ID. Data will be fetched from local storage and saved on server. [For Managing Local Storage, it use HSDBManager]. - This is a delegate method used when save tracking request execute successfully. */ - (void)didSaveTrackingDataSuccessfully; /*! * Will be called when save tracking request is failed. * @param1 error Is the save tracking request fail error of type NSError. */ - (void)didSaveTrackingDataFailedWithError:(NSError *)error; /*! * Will be called when save tracking request is failed. * @param1 error Is the save tracking request fail error of type NSError. * @param2 bookID Is the book id for that save tracking request failed. * @param2 userID Is the user id for that save tracking request failed. */ - (void)didSaveTrackingDataFailedWithError:(NSError *)error ForBookID:(NSNumber*)bookID ForUserId:(NSNumber *)userID; /*! * Will be called when AcceptOrReject request is succeeded. * @discussion This Method is used for acceptance and rejection of collab (Note). Parameter `accepted` decides, whether the note will be accepted by the user or rejected by the user. Parameter `ugcID` is the that specific shared UGC (Collab/Note) which will be accepted or rejected. - This is a delegate method used when AcceptOrReject request execute successfully. */ - (void)didAcceptOrRejectDataSuccessfully; /*! * Will be called when AcceptOrReject request is succeeded. * @discussion This Method is used for acceptance and rejection of collab (Note). Parameter `accepted` decides, whether the note will be accepted by the user or rejected by the user. Parameter `ugcID` is the that specific shared UGC (Collab/Note) which will be accepted or rejected. * @param1 ugcID Is the that specific UGC (Collab/Note). * @param2 accepted Is the boolean which is YES for acceptance and NO for rejection. - This is a delegate method used when AcceptOrReject request execute successfully. */ - (void)didAcceptOrRejectDataSuccessfullywithUGCId:(NSString *)ugcID andIsAccepted:(BOOL)accepted; /*! * Will be called when AcceptOrReject request is failed. * @param1 error Is the AcceptOrReject request fail error of type NSError. */ - (void)didAcceptOrRejectDataFailedWithError:(NSError *)error; /*! * Will be called when AcceptOrReject request is failed. * @param1 error Is the AcceptOrReject request fail error of type NSError. * @param2 ugcID Is the that specific UGC (Collab/Note). * @param3 accepted Is the boolean which is YES for acceptance and NO for rejection. */ - (void)didAcceptOrRejectDataFailedWithError:(NSError *)error withUGCId:(NSString *)ugcID andIsAccepted:(BOOL)accepted; /*! * Will be called when save collab request is succeeded. * @discussion This method is used for Shared Notes (Collab Data). When user wants to save collab Data for book, he/she will use this method. Data will be fetched from local storage and saved on server.[For Managing Local Storage, it use HSDBManager]. - This is a delegate method used when save collab request execute successfully. */ - (void)didSaveCollabDataSuccessfully; /*! * Will be called when save collab request is failed. * @param1 error Is the save collab request fail error of type NSError. */ - (void)didSaveCollabDataFailedWithError:(NSError *)error; /*! * Will be called when save collab request is failed. * @param1 error Is the save collab request fail error of type NSError. * @param2 bookID Is the book id for that save collab request failed. * @param2 userID Is the user id for that save collab request failed. */ - (void)didSaveCollabDataFailedWithError:(NSError *)error ForBookID:(NSNumber*)bookID ForUserId:(NSNumber *)userID; @end /** An Object that will be responsible for Data Syncing. * @discussion KitabooDataSyncingManager is a manager class which is used to handle all the synchronization of data. It behaves like an intermediate class between local database and server, such as in case of fetch UGC, data is fetched from server and saved in database and in case of save UGC, data is fetched from database and saved on server. * @superclass SuperClass : NSObject */ @interface KitabooDataSyncingManager : NSObject /*! * To Initiate KitabooDataSyncingManager class. * @param1 baseURLString Is the base URL String Path. * @param2 clientID ClientID. * @code * [kitabooDataSyncingManager initWithBaseURLString:baseURLString clientID:clientID]; * @endcode * @discussion Initializes and returns a newly allocated object with specified Base URL and clientID. */ - (instancetype)initWithBaseURLString:(NSString*)baseURLString clientID:(NSString*)clientID; /*! * Should be called when user wants to fetch UGC for book. * @discussion This method is used when user wants to fetch UGC for a book for given bookId, userId , userToken and delegate of type KitabooDataSyncingManagerDelegate. Data will be fetched from server and saved into local storage.[For Managing Local Storage, it use HSDBManager]. * @param1 bookID Is the bookID of the current book. * @param2 userID Is the userId for the current logged in user. * @param3 delegate Callback listener of type KitabooDataSyncingManagerDelegate. * @param4 userToken Is userToken for the current logged in user. * @code * [kitabooDataSyncingManager fetchUGCForBookID:bookID ForUserID:userID WithDelegate:delegate WithUserToken:userToken]; * @endcode */ -(void)fetchUGCForBookID:(NSNumber*)bookID ForUserID:(NSNumber*)userID WithDelegate:(id<KitabooDataSyncingManagerDelegate>)delegate WithUserToken:(NSString*)userToken; /*! * Should be called when user save the shareList & receiveList for highlight. * @discussion This method is used for Shared/Received Highlights. When user wants to save shared highlight list and received highlight list, he/she will use this method. - Parameter `ShareAndRecieveDict` contains all the highlights to be saved either shared or received, or both the type. * @param1 ShareAndRecieveDict Is an object of type NSDictionary with highlight lists shareList and receiveList. * @param2 bookID BookId of the current book. * @param3 userToken UserToekn for the current logged in user. * @code * [kitabooDataSyncingManager saveHighlightData:ShareAndRecieveDict ForBookID:bookID ForUserToken:userToken]; * @endcode */ -(void)saveHighlightData:(NSDictionary*)ShareAndRecieveDict ForBookID:(NSNumber*)bookID ForUserToken:(NSString*)userToken; /*! * Should be called when user save the shareList for note. * @discussion This method is used for Shared Notes (Collab Data). When user wants to save collab Data for book, he/she will use this method. Data will be fetched from local storage and saved on server.[For Managing Local Storage, it use HSDBManager]. * @param1 bookID BookID of the current book. * @param2 userToken UserToken of the current logged in user. * @param3 userID UserToken of the current logged in user. * @code * [kitabooDataSyncingManager saveCollabDataForBookID:bookID ForUserToken:userToken ForUserId:userID]; * @endcode */ -(void)saveCollabDataForBookID:(NSNumber*)bookID ForUserToken:(NSString*)userToken ForUserId:(NSNumber *)userID; /*! * Should be called when user accept/reject the shared collab data. * @discussion This Method is used for acceptance and rejection of collab (Note). Parameter `accepted` decides, whether the note will be accepted by the user or rejected by the user. Parameter `ugcID` is the that specific shared UGC (Collab/Note) which will be accepted or rejected. * @param1 ugcID Is the that specific UGC (Collab/Note). * @param2 accepted Is the boolean which is YES for acceptance and NO for rejection. * @param3 userToken UserToken of the current logged in user. * @code * [kitabooDataSyncingManager acceptOrRejectCollab:ugcID andIsAccepted:accepted ForUserToken:userToken]; * @endcode */ - (void)acceptOrRejectCollab:(NSString *)ugcID andIsAccepted:(BOOL)accepted ForUserToken:(NSString *)userToken; /*! * Should be called when user wants to save UGC for user. * @discussion This method is used to save the UGC data (highlights and notes) for given user and delegate of type KitabooDataSyncingManagerDelegate. Data will be fetched from local storage and saved on server.[For Managing Local Storage, it use HSDBManager] * @param1 userID UserID of the current loggedin user. * @param2 delegate Callback listener of type KitabooDataSyncingManagerDelegate. * @param3 userToken UserToken of the current loggedin user. * @code * [kitabooDataSyncingManager saveUGCForUserID:userID WithDelegate:delegate WithUserToken:userToken]; * @endcode */ -(void)saveUGCForUserID:(NSNumber*)userID WithDelegate:(id<KitabooDataSyncingManagerDelegate>)delegate WithUserToken:(NSString*)userToken; /*! * Should be called when user wants to synch UGC for Book, for given bookId and user Id. * @discussion UGC Sync is a Process which uses combination of API Mentioned below to fetch UGC Data from server and Save to Local storage, and Vice versa. [For Managing Local Storage, it use HSDBManager]. - APIs which are used in UGC Sync, fetchBookClassInfo, fetchUGCOperation, fetchTeacherAnnotations, fetchCollabShare, saveUGCDataOperation, saveCollabData, fetchcollabUGC etc. * @param1 bookID BookID for the current loggedin user. * @param1 userID for the current loggedin user. * @param2 delegate Callback listener of type KitabooDataSyncingManagerDelegate. * @param2 userToken UserToken for the current loggedin user. * @code * [kitabooDataSyncingManager synchUGCForBookID:bookID ForUserID:userID WithDelegate:delegate WithUserToken:userToken]; * @endcode */ -(void)synchUGCForBookID:(NSNumber*)bookID ForUserID:(NSNumber*)userID WithDelegate:(id<KitabooDataSyncingManagerDelegate>)delegate WithUserToken:(NSString*)userToken; /*! * Should be called when user wants to synch UGC for book, for given bookId and user Id. * @discussion UGC Sync is a Process which uses combination of API Mentioned below to fetch UGC Data from server and Save to Local storage, and Vice versa. [For Managing Local Storage, it use HSDBManager]. - APIs which are used in UGC Sync, fetchBookClassInfo, fetchUGC, fetchTeacherAnnotations, fetchCollabShare, saveUGC, saveCollab, fetchcollabUGC. - Parameter `isUGCSharingEnabled` has a BOOL value which is related to Collab Sharing APLs. If it has YES value all Collab sharing APIs will be executed. In case of NO Collab sharing APIs will not be called. * @param1 bookID Book ID for the current loggedin user. * @param2 userID User ID for the current loggedin user * @param3 delegate Callback listener of type KitabooDataSyncingManagerDelegate. * @param3 userToken User Token for the current loggedin user * @param4 isUGCSharingEnabled Boolean value to check whether ugc sharing enabled or not * @code * [kitabooDataSyncingManager synchUGCForBookID:bookID ForUserID:userID WithDelegate:delegate WithUserToken:userToken withUGCSharingEnabled:YES]; * @endcode */ -(void)synchUGCForBookID:(NSNumber *)bookID ForUserID:(NSNumber*)userID WithDelegate:(id<KitabooDataSyncingManagerDelegate>)delegate WithUserToken:(NSString *)userToken withUGCSharingEnabled:(BOOL)isUGCSharingEnabled; /*! * Should be called to save Teacher annotation. * @discussion Teacher Annotation is the process to submitting student's pen tool data with his/her reviews. Data will be fetched from local storage and saved on server. [For Managing Local Storage, it use HSDBManager]. - Parameter `annotationArray` contains all the teacher annotations, to be saved and `learnerId` is the Id of that learner who created all the pen tool data. * @param1 annotationArray Contains all the teacher annotation. * @param2 learnerId Learner Id of the current learner. * @param3 bookId BookId of the current book. * @param4 delegate Callback listener of type KitabooDataSyncingManagerDelegate. * @param5 userToken UserToken for the current loggedin user. * @code * [kitabooDataSyncingManager saveTeacherAnnotationsForAnnotation:annotationArray forLearnerID:learnerId withBookID:bookId WithDelegate:delegate WithUserToken:userToken]; * @endcode */ -(void)saveTeacherAnnotationsForAnnotation:(NSArray*)annotationArray forLearnerID:(NSString*)learnerId withBookID:(NSNumber*)bookId WithDelegate:(id<KitabooDataSyncingManagerDelegate>)delegate WithUserToken:(NSString*)userToken; /*! * Should be called to submit Student annotation for given Book and user. * @discussion Student Annotation is the process to submitting student's pen tool data to teacher. Data will be fetched from local storage and saved on server. [For Managing Local Storage, it use HSDBManager]. * @param1 bookID of the current book * @param2 userID for the current loggedin user * @param3 delegate Callback listener of type KitabooDataSyncingManagerDelegate. * @param3 userToken for the current loggedin user * @code * [kitabooDataSyncingManager submitAnotationForBookID:bookID ForUserID:userID WithDelegate:delegate WithUserToken:userToken]; * @endcode */ -(void)submitAnotationForBookID:(NSNumber*)bookID ForUserID:(NSNumber*)userID WithDelegate:(id<KitabooDataSyncingManagerDelegate>)delegate WithUserToken:(NSString *)userToken; /*! * Should be called when user wants to save Tracking Data for Book. * @discussion This method is called when user wants to save tracked data(for example Highlight created, Note shared, User close the book etc.) for particular given book ID. Data will be fetched from local storage and saved on server. [For Managing Local Storage, it use HSDBManager]. * @param1 bookID Book ID of the current book. * @param2 userToken UserToken for the current loggedin user * @param3 userID User Id for the current loggedin user. * @code * [kitabooDataSyncingManager saveTrackingDataForBookID:bookID ForUserToken:userToken ForUserId:userID]; * @endcode */ - (void)saveTrackingDataForBookID:(NSNumber*)bookID ForUserToken:(NSString*)userToken ForUserId:(NSNumber *)userID; /*! * Should be called when scorm data will be saved for particular user and book. * @discussion Data will be fetched from local storage and saved on server. [For Managing Local Storage, it use HSDBManager]. * @param1 userID User Id for the current loggedin user. * @param2 bookID BookID of the current book. * @param3 classId ClassId for the current loggedin user. * @param4 delegate Callback listener of type KitabooDataSyncingManagerDelegate. * @param5 userToken UserToken for the current loggedin user. * @code * [kitabooDataSyncingManager saveSormDataForUserID:userID bookID:bookID andClassId:classId WithDelegate:delegate WithUserToken:userToken]; * @endcode */ -(void)saveSormDataForUserID:(NSNumber*)userID bookID:(NSNumber *)bookID andClassId:(NSString *)classId WithDelegate:(id<KitabooDataSyncingManagerDelegate>)delegate WithUserToken:(NSString *)userToken; /*! * Should be called when user wants to fetch Scorm data from Server. * @discussion Data will be fetched from Server and saved on local storage. [For Managing Local Storage, it use HSDBManager]. * @param1 userID for the current loggedin user * @param2 bookID of the current book * @param3 classId for the current loggedin user * @param4 delegate Callback listener of type KitabooDataSyncingManagerDelegate. * @param5 userToken for the current loggedin user * @code * [kitabooDataSyncingManager fetchAndSaveSormDataForUserID:userID bookID:bookID andClassId:classId WithDelegate:delegate WithUserToken:userToken]; * @endcode */ -(void)fetchAndSaveSormDataForUserID:(NSNumber*)userID bookID:(NSNumber *)bookID andClassId:(NSString *)classId WithDelegate:(id<KitabooDataSyncingManagerDelegate>)delegate WithUserToken:(NSString *)userToken; /*! * Should be called when user wants to save UGC Operation for given bookId and user Id. * @discussion Save UGC Operation is a Process which uses combination of API Mentioned below to fetch UGC Data from server and Save to Local storage, and Vice versa. [For Managing Local Storage, it use HSDBManager]. - APIs which are used in Save UGC Operation, saveUGCDataOperation, saveCollabData. * @param1 bookID BookID for the current loggedin user. * @param1 userID for the current loggedin user. * @param2 delegate Callback listener of type KitabooDataSyncingManagerDelegate. * @param2 userToken UserToken for the current loggedin user. * @code * [kitabooDataSyncingManager saveUGCOperationForBookID:bookID ForUserID:userID WithDelegate:delegate WithUserToken:userToken]; * @endcode */ -(void)saveUGCOperationForBookID:(NSNumber *)bookID ForUserID:(NSNumber*)userID WithDelegate:(id<KitabooDataSyncingManagerDelegate>)delegate WithUserToken:(NSString *)userToken; /*! * Should be called when user wants to fetch UGC Operation for given bookId and user Id. * @discussion Fetch UGC Operation is a Process which uses combination of API Mentioned below to fetch UGC Data from server and Save to Local storage, and Vice versa. [For Managing Local Storage, it use HSDBManager]. - APIs which are used in Fetch UGC Operation, fetchBookClassInfo, fetchUGCOperation, fetchTeacherAnnotations, fetchCollabShare, fetchcollabUGC . * @param1 bookID BookID for the current loggedin user. * @param1 userID for the current loggedin user. * @param2 delegate Callback listener of type KitabooDataSyncingManagerDelegate. * @param2 userToken UserToken for the current loggedin user. * @code * [kitabooDataSyncingManager fetchUGCOperationForBookID:bookID ForUserID:userID WithDelegate:delegate WithUserToken:userToken]; * @endcode */ -(void)fetchUGCOperationForBookID:(NSNumber *)bookID ForUserID:(NSNumber*)userID WithDelegate:(id<KitabooDataSyncingManagerDelegate>)delegate WithUserToken:(NSString *)userToken; @end
HDReflowableLayoutSettingController¶
"An Object that manage a view for Reflowable Layout Settings."
The HDReflowableLayoutSettingController class defines a Layout for Reflowable Books where users can change the Background color, Theme color, Font Size, Reader Mode, Text Alignment, Brightness, Margin, Line spacing for the particular book.
@interface HDReflowableLayoutSettingController : UIViewController /// <ul> /// <li> /// resetReaderSetting is a block that would be called when a user taps “Reset” button on reflowable setting view controller, Provide action that needs to be performed on tap of “Reset” button. /// </li> /// </ul> @property (nonatomic, copy) void (^ _Nullable resetReaderSetting)(void); /// fontFamilyDidChange is a block that would be called when a user taps on any font family from a given drop down box on a reflowable setting view controller, Provide action that needs to be performed on tap of that font family. /// Returns The Selected Font of type String. @property (nonatomic, copy) void (^ _Nullable fontFamilyDidChange)(NSString * _Nonnull); /// <ul> /// <li> /// fontSizeDidChange is a block that would be called when a user selects any option on slider on a reflowable setting view controller, Provide action that needs to be performed on selecting option on slider. /// </li> /// </ul> /// Returns The font size of type CGFloat. @property (nonatomic, copy) void (^ _Nullable fontSizeDidChange)(CGFloat); /// <ul> /// <li> /// didEnablePagination is a block that would be called when a user taps on “Scroll Mode ON/OFF” switch on reflowable setting view controller, Provide action that needs to be performed on tap of “Scroll Mode ON/OFF” switch. /// </li> /// </ul> /// Returns A BOOL value. @property (nonatomic, copy) void (^ _Nullable didEnablePagination)(BOOL); /// <ul> /// <li> /// didChangeReaderMode is a block that would be called when a user taps any mode on a reflowable setting view controller, Provide action that needs to be performed on tap of that mode. /// Returns The mode type of Type Int. /// </li> /// </ul> @property (nonatomic, copy) void (^ _Nullable didChangeReaderMode)(NSInteger); /// <ul> /// <li> /// didChangeTextAliginment is a block that would be called when a user taps any text alignment on a reflowable setting view controller, Provide action that needs to be performed on tap of that text alignment. /// </li> /// </ul> /// Returns The text alignment of Type Int. @property (nonatomic, copy) void (^ _Nullable didChangeTextAliginment)(NSInteger); /// <ul> /// <li> /// didChangeLineSpacing is a block that would be called when a user taps any line spacing on a reflowable setting view controller, Provide action that needs to be performed on tap of that line spacing. /// </li> /// </ul> /// Returns The line spacing of Type Int. @property (nonatomic, copy) void (^ _Nullable didChangeLineSpacing)(NSInteger); /// <ul> /// <li> /// didChangeMargin is a block that would be called when the user taps any margin on the reflowable setting view controller, Provide action that needs to be performed on tap of that margin. /// </li> /// </ul> /// Returns The line spacing of Type Int. @property (nonatomic, copy) void (^ _Nullable didChangeMargin)(NSInteger); /// <ul> /// <li> /// willDismissController is a block that would be called when a user taps on outside of a reflowable setting to remove the view controller. /// </li> /// </ul> @property (nonatomic, copy) void (^ _Nullable willDismissController)(void); /// List of font families to apply on page text. @property (nonatomic, strong) NSArray * _Nonnull fontFamilyArray; /// To enable font family view. /// \param isEnable Bool value /// - (void)enableFontFamilyView:(BOOL)isEnable; /// To enable font size view. /// \param isEnable Bool value /// - (void)enableFontSizeView:(BOOL)isEnable; /// To enable alignment view. /// \param isEnable Bool value /// - (void)enableAlignmentView:(BOOL)isEnable; /// To enable line spacing view. /// \param isEnable Bool value /// - (void)enableLineSpacingView:(BOOL)isEnable; /// To enable margin view. /// \param isEnable Bool value /// - (void)enableMarginView:(BOOL)isEnable; /// To enable reader mode view. /// \param isEnable Bool value /// - (void)enableReaderModeView:(BOOL)isEnable; /// To enable scroll mode view. /// \param isEnable Bool value /// - (void)enableScrollModeView:(BOOL)isEnable; /// This method is used to set background color to HDReflowableFontSettingViewController view. /// \param color Color of type UIColor to set the background color. /// - (void)setBackgroundColorForView:(UIColor * _Nonnull)color; /// This method is used to set Theme color to HDReflowableFontSettingViewController controls. /// \param color Color of type UIColor to set the Theme color. /// - (void)setThemeColorToView:(UIColor * _Nonnull)color; /// This method is used to set font size to text for the whole Page of reflowable epub books. /// \param currentFontSize currentFontSize is the value of changed font. /// - (void)setFontSize:(NSInteger)currentFontSize; /// This method used to enable/disable the pagination configuration for reflowable epub books. /// @discussion Pagination, is the process of dividing a document into discrete pages, where page navigation direction is either from left to right or vertical scrolling. /// <ul> /// <li> /// If enabled value is YES, page navigation direction will be left to right or in case of NO it will be vertical scrolling. /// </li> /// </ul> /// \param enabled Enabled is the boolean value which represents the pagination configuration. /// - (void)setPaginationEnable:(BOOL)enabled; /// This method used to set current Reader mode configuration for reflowable epub books. /// @discussion With the help of Reader mode Enable Feature users can change an appearance of Page to Day mode, Sepia mode or to night mode. /// <ul> /// <li> /// Day Mode Uses a colour scheme that displays dark text on a light background. /// </li> /// <li> /// Sepia Mode Is a reddish brown monochrome tint. When applied to a Page, it gives the Page a warm, antique feeling. /// </li> /// <li> /// Night Mode Uses a colour scheme that displays light text on a dark background. /// </li> /// </ul> /// \param modeType modeType is the ReaderModeType raw value which represents mode configuration /// - (void)setReaderModeEnable:(NSInteger)modeType; /// This method used to set text alignment configuration for reflowable epub books. /// @discussion With the help of Text alignment Feature users can change alignment of text on a page using different text positioning. /// <ul> /// <li> /// Left Alignment starts each new line of the document on the left-most margin. /// </li> /// <li> /// Center Alignment positions and starts each new line/text block in the center/middle margin on the page. /// </li> /// <li> /// Right Alignment starts each new line of the document on the right-most margin of the page. /// </li> /// <li> /// Justify Alignment aligns text with right and left margins and tries to fill as much empty space as possible. It enables a straight margin on both of the page’s horizontal edges. /// </li> /// </ul> /// \param alignmentType alignmentType represents the current text alignment configuration. /// - (void)setCurrentTextAlignment:(NSInteger)alignmentType; /// This method used to set current font family configuration for reflowable epub books. /// \param fontName fontName represents current font family configuration /// - (void)setCurrentFontFamily:(NSString * _Nonnull)fontName; /// This method used to set Line Spacing configuration for reflowable epub books. /// <ul> /// <li> /// With the help of Line Spacing Feature users can change The Spacing between lines on a page. /// </li> /// <li> /// Options- Small Line spacing,Medium Line spacing & Large Line spacing . /// </li> /// </ul> /// \param lineSpacing lineSpacing represents the current line spacing configuration. /// - (void)setCurrentLineSpacing:(NSInteger)lineSpacing; /// This method used to set Margin configuration for reflowable epub books. /// <ul> /// <li> /// With the help of margin Feature users can change the margin between text and border. /// </li> /// <li> /// Options- Small Margin, Medium Margin & Large Margin. /// </li> /// </ul> /// \param margin margin represents the current margin configuration. /// - (void)setCurrentMargin:(NSInteger)margin; @end
HDWebPlayer¶
The HDWebPlayer is responsible for Loading URL, which uses Kitaboo Defined UI for look and feel.
/*! @protocol HDWebPlayerDelegate @brief The delegate of a HDWebPlayer object must adopt the HDWebPlayerDelegate protocol. @discussion HDWebPlayerDelegate Protocol used to handle all the callbacks of HDWebPlayer Class. The HDWebPlayerDelegate protocol defines methods that allow user to perform actions when web player will be closed or failed to load url. All the methods of HDWebPlayerDelegate protocol are optional. When configuring the HDWebPlayer object, assign your delegate object to its delegate property. */ @protocol HDWebPlayerDelegate <NSObject> @optional /*! *Will be called when closing the web player. */ - (void)webViewPlayerDidClose; /*! *Will be called when web player failed to load the URL. @param error The NSError object when URL failed to load. */ - (void)webViewPlayerDidFailWithError:(NSError*)error; @end /** An Object that manage a player to load an URL. @discussion The HDWebPlayer is responsible for Loading URL, which Uses Kitaboo Defined UI for Look and feel. @superclass SuperClass : UIViewController */ @interface HDWebPlayer : UIViewController /*! * Initiate HDWebPlayer view with URL to be loaded. * @param1 htmlPath Is the absolute html Path URL to be loaded in webview. @code [hdWebPlayer initWithHTMLPathURL:[NSURL URLWithString:@"https://www.google.com"]] @endcode */ - (id)initWithHTMLPathURL:(NSURL *)htmlPath; /*! Setter/Getter for delegate (callback listener) @code [hdWebPlayer setDelegate:self] @endcode */ @property (nonatomic,weak) id<HDWebPlayerDelegate>delegate; @end
Audio Syncing¶
Audio synchronization is responsible for Handling Links of Type AudioSync. AudioSync is a feature which enables the user to read (Play Audio) each page content. Currently, this is only supported for Kitaboo Fixed Book.
/*! * @protocol AudioSyncControllerDelegate * @brief A protocol that allows a delegate to respond when an audio sync stopped, started or when an audio sync has finished . * @discussion The delegate of a AudioSyncController object must adopt the AudioSyncControllerDelegate protocol. All the methods of this protocol are optional. */ @protocol AudioSyncControllerDelegate<NSObject> @optional /*! * Will be called when audio sync text is detected, use this callback to highlight the text on Renderer. * @param1 frame Rect of text to be highlighted * @param2 pageIdentifier Page ID of page on which text needs to be highlighted. */ -(void)didJumpToTextWithFrame:(CGRect)frame WithPageIdentifier:(NSString*)pageIdentifier; /*! * Will be called when audio sync is completed. */ -(void)audioSyncdidComplete; /*! * Will be called when audio sync is Stopped. */ -(void)audioSyncDidStopped; /*! * Will be called when audio sync is Paused. */ -(void)audioSyncDidPaused; /*! * Will be called when audio sync is completed. * @param1 pageIdentifier Page ID of page on which audio sync is completed. */ -(void)audioSyncdidCompleteForPageIdentifier:(NSString*)pageIdentifier; @end /** An Object that manage Audio Sync. @discussion Audio synchronization is Responsible for Handling Links of Type AudioSync, AudioSync is a feature which enable user to read(Play Audio) each page content,Currently this is only supported for Kitaboo Fixed Book. @superclass SuperClass : NSObject */ @interface AudioSyncController : NSObject /*! * Setter/Getter for delegate (callback listener) * @code * [audioSyncController setDelegate:self]; * @endcode */ @property (nonatomic,weak) id<AudioSyncControllerDelegate> delegate; /*! * To initialize Audio Sync. * @param1 links Array of Object of KFLinkVO for which Audio Sync is available. (Currently works with Only One Link in Links Array) * @param2 delegate Delegate of type AudioSyncControllerDelegate. * @param3 book Book object for links * @param4 playerUIEnabled If YES then default UI will be available, else Developer can use customized UI and use the available methods to control the behaviour. * @discussion Initializes and returns a newly allocated AudioSyncController object with specified links Array, and Book object for links. * @code * [[AudioSyncController alloc] initWithLinks:links WithDelegate:delegate WithBook:book WithPlayerUIEnable:YES]; * @endcode */ -(id)initWithLinks:(NSArray*)links WithDelegate:(id<AudioSyncControllerDelegate>)delegate WithBook:(KFBookVO*)book WithPlayerUIEnable:(BOOL)playerUIEnabled; /*! * To Start Audio Sync. * @code * [audioSyncController start]; * @endcode */ -(void)start; /*! * To resume Audio Sync. * @code * [audioSyncController resume]; * @endcode */ -(void)resume; /*! * To pause Audio Sync. * @code * [audioSyncController pause]; * @endcode */ -(void)pause; /*! * To stop Audio Sync. * @code * [audioSyncController pause]; * @endcode */ -(void)stop; /*! * Returns the status of Audio Sync for page. * @param1 pageIdentifier Page ID of page to check status of Audio Sync. * @code * [audioSyncController isPlayingForPageIdentifier:pageIdentifier]; * @endcode */ -(BOOL)isPlayingForPageIdentifier:(NSString*)pageIdentifier; /*! * Returns the status of Audio Sync. * @code * [audioSyncController isPlaying]; * @endcode */ -(BOOL)isPlaying; /*! * Returns the default Player View. * @code * [audioSyncController getPlayerView]; * @endcode */ -(UIView*)getPlayerView; /*! * To play/pause Audio Sync. * @code * [audioSyncController playPauseAction]; * @endcode */ -(void)playPauseAction; /*! * Returns the Page ID on which audio is playing. * @code * [audioSyncController audioPlayingForPageIdentifier]; * @endcode */ -(NSString*)audioPlayingForPageIdentifier; /*! * To change Audio Sync speed. *@discussion default speed of 1.0 provides normal playback rate. The available range is from 0.5 for half-speed playback through 2.0 for double-speed playback. * @code * [audioSyncController changeAudioPlayingSpeed:speed]; * @endcode */ -(void)changeAudioPlayingSpeed:(float)speed; @end
Kitaboo Audio Player¶
The KitabooAudioPlayer class defines a Player to play an Audio sound. The KitabooAudioPlayer class lets you play sound in any audio format. You implement a delegate to handle, when a sound stops playing, or to update the user interface, when a sound has finished playing. To start and stop an audio player, call one of its methods.
/*! * @protocol AudioPlayerDelegate * @brief A protocol that allows a delegate to respond when an audio sound stopped playing, started playing or when a sound has finished playing. * @discussion The delegate of a KitabooAudioPlayer object must adopt the AudioPlayerDelegate protocol. All the methods of this protocol are optional. */ @protocol AudioPlayerDelegate <NSObject> @optional /*! * Will be call when Audio Player Finished Playing. **/ - (void)audioPlayerFinishPlaying; /*! * Will be call when Audio Player Stopped Playing. **/ -(void)audioPlayerDidStopped; /*! * Will be call when Audio Player Started Playing. **/ -(void)audioPlayerDidStart; @end /** An Object that manage an Audio Player. @discussion The KitabooAudioPlayer class defines a Player to play an Audio sound. The KitabooAudioPlayer class lets you play sound in any audio format. You implement a delegate to handle, when a sound stopped playing or to update the user interface, when a sound has finished playing. To start and stop an audio player, call one of its methods. @superclass SuperClass : UIViewController */ @interface KitabooAudioPlayer : UIViewController /*! * Setter/Getter for delegate (callback listener) * @code * [kitabooAudioPlayer setDelegate:self]; * @endcode */ @property (nonatomic, weak) id<AudioPlayerDelegate> delegate; /*! * Initiate Audio Player. * @param1 targetURL Audio URL. * @param2 bookPath Book path. * @param3 isbn Book ISBN Number. * @param4 playerUIEnabled Enable or disable Audio player UI. * @param5 encrypted Audio URL is encrypted or decrypted. * @discussion Initializes and returns a newly allocated KitabooAudioPlayer object with specified audio URL, book path and Book ISBN Number. * @code * [[KitabooAudioPlayer alloc] initWithURL:targetURL withBookPath:bookPath withISBN:isbn WithPlayerUIEnable:YES withIsEncrypted:YES]; * @endcode **/ -(id)initWithURL:(NSString *)targetURL withBookPath:(NSString*)bookPath withISBN:(NSString*)isbn WithPlayerUIEnable:(BOOL)playerUIEnabled withIsEncrypted:(BOOL)encrypted; /*! * Returns Audio Player View. * @code * [kitabooAudioPlayer getPlayerView]; * @endcode **/ -(UIView*)getPlayerView; /*! * To Start Audio. * @code * [kitabooAudioPlayer start]; * @endcode */ -(void)start; /*! * To Stop Audio. * @code * [kitabooAudioPlayer stop]; * @endcode */ -(void)stop; @end
Kitaboo Document Player¶
The KitabooDocumentPlayer class lets you open a document on a web player, with added features like Print Document, you implement a delegate to handle, when document player is closed.
/*! * @protocol KitabooDocumentPlayerDelegate * @brief A protocol that allows a delegate to respond when document player closed. * @discussion The delegate of a KitabooDocumentPlayer object must adopt the KitabooDocumentPlayerDelegate protocol. All the methods of this protocol are optional. */ @protocol KitabooDocumentPlayerDelegate <NSObject> @optional /*! * Will be called when Document Player Closed. */ - (void)documentPLayerDidClosed; @end /** An Object that manage a Player to open a document. * @discussion The KitabooDocumentPlayer class lets you open a document on a web player, With Added features Like Print Document, You implement a delegate to handle, when document player closed. * @superclass SuperClass : UIViewController */ @interface KitabooDocumentPlayer : UIViewController /*! * Initiate Document Player view. * @param1 targetURL Is the NSURL to be loaded in webview. * @discussion Initializes and returns a newly allocated KitabooDocumentPlayer object with specified URL. * @code * [[KitabooDocumentPlayer alloc] initWithURL:targetURL]; * @endcode */ - (id)initWithURL:(NSURL*)targetURL; /*! * Should be called to disable the Print Button. * @param1 disable Is a Bool type to set print button enable/disable. * @code * [kitabooDocumentPlayer disablePrint:YES]; * @endcode */ - (void)disablePrint:(BOOL)disable; /*! * This method used to set Theme color to Document Player. * @param1 color Pass the color to set the Theme color. * @code * [kitabooDocumentPlayer setThemeColorToView:color]; * @endcode */ -(void)setThemeColorToView:(UIColor *)color; /*! * Setting/Getter for delegate (callback listener). * @code * [kitabooDocumentPlayer setDelegate:self]; * @endcode */ @property (nonatomic,weak) id<KitabooDocumentPlayerDelegate>delegate; @end
Kitaboo Image Controller¶
The KitabooImageController class lets user to open an image or multiple images, in a separate view. You implement a delegate to handle, when image loading view is closed or image loading has failed.
/*! * @protocol KitabooImageControllerDelegate * @brief A protocol that allows a delegate to respond when image loading view is closed or image loading is failed. * @discussion The delegate of a KitabooImageController object must adopt the KitabooImageControllerDelegate protocol. All the methods of this protocol are optional. */ @protocol KitabooImageControllerDelegate<NSObject> @optional /*! * This will be called when image controller view is closed. */ -(void)didTapOnCloseForImageContoller; /*! * This will be called when image failed to load. */ -(void)didFailedLoadingImage; @end /** An Object that manage a view to open an image. * @discussion The KitabooImageController class lets user to open an image or multiple images, in a separate view. You implement a delegate to handle, when image loading view is closed or image loading is failed. * @superclass SuperClass : UIViewController */ @interface KitabooImageController : UIViewController<UIGestureRecognizerDelegate,UICollectionViewDataSource,UICollectionViewDelegate,UIScrollViewDelegate> /*! * To initialise image controller view. * @param1 imagesURLs Array of imagesURLs. * @param2 properties Array of property of image. * @param3 ISBN ISBN of Book. * @param4 encryption Encryption status of imagePath. * @param5 zoom Zoom feature of image. * @param6 delegate Delegate of type KitabooImageControllerDelegate. * @discussion Initializes and returns a newly allocated KitabooImageController object with specified image imagesURLs, properties and ISBN of Book. * @code * [[KitabooImageController alloc] initWithImageURLs:imagesURLs withProperties:properties withISBN:ISBN isEncrypted:YES isZoomable:YES WithDelegate:self]; * @endcode */ -(id)initWithImageURLs:(NSArray *)imagesURLs withProperties:(NSArray *)properties withISBN:(NSString *)ISBN isEncrypted:(BOOL)encryption isZoomable:(BOOL)zoom WithDelegate:(id<KitabooImageControllerDelegate>)delegate; @end
Kitaboo Video Player¶
The KitabooVideoPlayer class defines a Player to play an Video. You implement a delegate to handle, when a video stops playing or to update the user interface, when a video has finished playing.
typedef enum { kVideoTypeLocal=0, kVideoTypeVimeo=1, kVideoTypeKaltura }VIDEOTYPE; /*! * @protocol KitabooVideoPlayerDelegate * @brief A protocol that allows a delegate to respond when an video stopped playing, paused playing or when a video has finished playing. * @discussion The delegate of a KitabooVideoPlayer object must adopt the KitabooVideoPlayerDelegate protocol. All the methods of this protocol are optional. */ @protocol KitabooVideoPlayerDelegate <NSObject> @optional /*! * Will be called when video player is stopped explicitly. */ - (void)videoPlayerDidStopPlaying; /*! * Will be called when video player is finished playing. */ - (void)videoPlayerDidFinishPlaying; /*! * Will be called when video is paused. */ - (void)videoPlayerDidPausePlaying; /*! * Will be called when video player entered in full screen. */ - (void)videoPlayerDidEnterFullScreen; @end /** An Object that manage a Video Player. * @discussion The KitabooVideoPlayer class defines a Player to play an Video. You implement a delegate to handle, when a video stopped playing or to update the user interface, when a video has finished playing. * @superclass SuperClass : UIViewController */ @interface KitabooVideoPlayer : UIViewController /*! * Setter/Getter for delegate (callback listener) * @code * [kitabooVideoPlayer setDelegate:self]; * @endcode */ @property (nonatomic, weak) id<KitabooVideoPlayerDelegate> delegate; /*! * Should be called to initiate the video player. * @param1 videoPath Is the location of video in library. * @param2 bookVO Is the KFBookVO object. * @param3 linkVO Is the KFLinkVO object. * @discussion Initializes and returns a newly allocated KitabooVideoPlayer object with specified video path, object of type KFBookVO and object of type KFLinkVO. * @code * [[KitabooVideoPlayer alloc] initWithVideoPath:videoPath withBookVO:bookVO withLinkVO:linkVO]; * @endcode */ - (id)initWithVideoPath:(NSString *)videoPath withBookVO:(KFBookVO *)bookVO withLinkVO:(KFLinkVO *)linkVO; /*! * Should be called to initiate the video player. * @param1 videoPath Is the location of video in library. * @param2 videoType Set the video type which needs to played. * @param3 frame Rect of video with respect to parent view. * @discussion Initializes and returns a newly allocated KitabooVideoPlayer object with specified video path, type of video and Rect of video. * @code * [[KitabooVideoPlayer alloc] initWithVideoPath:videoPath withType:videoType withRect:frame]; * @endcode */ - (id)initWithVideoPath:(NSString *)videoPath withType:(VIDEOTYPE)videoType withRect:(CGRect)frame; /*! * Should be called to initiate the video player. * @param1 videoPath Is the location of video in library. * @param2 videoType Set the video type which needs to played. * @discussion Initializes and returns a newly allocated KitabooVideoPlayer object with specified video path, type of video and decryption key. * @code * [[KitabooVideoPlayer alloc] initWithVideoPath:videoPath withType:videoType withDecrytionKey:key]; * @endcode */ - (id)initWithVideoPath:(NSString *)videoPath withType:(VIDEOTYPE)videoType withDecrytionKey:(NSString *)key; /*! * Should be called to play the video. * @code * [kitabooVideoPlayer playVideo]; * @endcode */ - (void)playVideo; /*! * Should be called to get the Video Player view. * @code * [kitabooVideoPlayer getInlineVideoPlayer]; * @endcode */ - (UIView *)getInlineVideoPlayer; @end
Kitaboo Web Player¶
The KitabooWebPlayer is responsible for loading URL.
/*! * @protocol KitabooWebPlayerDelegate * @brief The delegate of a KitabooWebPlayer object must adopt the KitabooWebPlayerDelegate protocol. * @discussion The KitabooWebPlayerDelegate protocol defines methods that allow user to perform actions when web player will be closed or failed to load url. All the methods of KitabooWebPlayerDelegate protocol are optional. When configuring the KitabooWebPlayer object, assign your delegate object to its delegate property. */ @protocol KitabooWebPlayerDelegate <NSObject> @optional /*! * Will be called when web player is closed. */ - (void)webPLayerDidClosed; /*! * Will be called when URL failed to load. */ - (void)webPlayerDidFailedWithError:(NSError*)error; /*! * Will be called when web player is closed with scorm data. * @param1 ScormData Scorm Data. * @param2 activityName Activity Name. * @param3 scormID Scorm ID. * @param4 pageID Page ID. */ -(void)webPlayerWillCloseWithScormData:(NSString *)ScormData activityName:(NSString *)activityName withScormID:(NSString *)scormID withPageID:(NSString *)pageID; @end /** An Object that manage a player to load an URL. * @discussion The KitabooWebPlayer is responsible for Loading URL. * @superclass SuperClass : UIViewController */ @interface KitabooWebPlayer : UIViewController /*! * Initiate Web Player view. * @param1 targetURL Is the NSURL to be loaded in webview. * @param2 linkVO Is the KFLinkVO object. * @param3 bookVO Is the KFBookVO object. * @discussion Initializes and returns a newly allocated KitabooWebPlayer object with specified URL, object of type KFLinkVO and object of type KFBookVO. * @code * [[KitabooWebPlayer alloc] initWithURL:targetURL withLinkVO:linkVO WithBook:bookVO]; * @endcode */ - (id)initWithURL:(NSURL*)targetURL withLinkVO:(KFLinkVO *)linkVO WithBook:(KFBookVO *)bookVO; /*! * Initiate Web Player view. * @param1 targetURL Is the NSURL to be loaded in webview. * @discussion Initializes and returns a newly allocated KitabooWebPlayer object with specified URL. * @code * [[KitabooWebPlayer alloc] initWithURL:targetURL]; * @endcode */ - (id)initWithURL:(NSString*)targetURL; /*! * Initiate Document Player view. * @param1 targetURL Is the NSURL to be loaded in webview. * @param2 scormID Is unique id for a book. * @param3 scormData For existing scorm. * @param4 isDoneButtonVisible For done button visibility. * @discussion Initializes and returns a newly allocated KitabooWebPlayer object with specified URL, scorm ID and scorm data. * @code * [[KitabooWebPlayer alloc] initWithScormPackageURL:targetURL withScormID:scormID withScormData:scormData isDoneButtonVisible:YES]; * @endcode */ -(id)initWithScormPackageURL:(NSString*)targetURL withScormID:(NSString *)scormID withScormData:(NSString *)scormData isDoneButtonVisible:(BOOL)isDoneButtonVisible; /*! * Setter/Getter for delegate (callback listener) * @code * [kitabooWebPlayer setDelegate:self]; * @endcode */ @property (nonatomic,weak) id<KitabooWebPlayerDelegate>delegate; /*! * This method used to set Theme color to WebPlayer. * @param1 color Pass the color to set the Theme color. * @code * [kitabooWebPlayer setThemeColorToView:color]; * @endcode */ -(void)setThemeColorToView:(UIColor *)color; /*! * This method used to close WebPlayer. * @code * [kitabooWebPlayer closePlayer]; * @endcode */ -(void)closePlayer; @end
Kitaboo YouTube Player¶
The KitabooYTPlayer class defines a Player to play a YouTube Video. You implement a delegate to handle, when YouTube player closed.
/*! * @protocol KitabooYTPlayerDelegate * @brief A protocol that allows a delegate to respond when a YouTube video player closed. * @discussion The delegate of a KitabooYTPlayer object must adopt the KitabooYTPlayerDelegate protocol. All the methods of this protocol are optional. */ @protocol KitabooYTPlayerDelegate<NSObject> @optional /*! * Will be called when YouTube Player closed. **/ -(void)didCloseYoutubePlayer; @end /** An Object that manage a YouTube Player. * @discussion The KitabooYTPlayer class defines a Player to play a YouTube Video. You implement a delegate to handle, when YouTube player closed. * @superclass SuperClass : UIViewController */ @interface KitabooYTPlayer : UIViewController /*! * Setter/Getter for delegate (callback listener) * @code * [kitabooYTPlayer setDelegate:self]; * @endcode */ @property (weak, nonatomic) id<KitabooYTPlayerDelegate> delegate; /*! * Initiate Youtube Player. * @param linkVo Is the KFLinkVO object. * @discussion Initializes and returns a newly allocated KitabooYTPlayer object with specified object of type KFLinkVO. * @code * [[KitabooYTPlayer alloc] initWithLinkVO:linkVo]; * @endcode **/ -(id)initWithLinkVO:(KFLinkVO*)linkVo; /*! * Initiate Youtube Player. * @param videoURL Is the Video URL. * @discussion Initializes and returns a newly allocated KitabooYTPlayer object with specified video URL. * @code * [[KitabooYTPlayer alloc] initWithURL:videoURL]; * @endcode **/ -(id)initWithURL:(NSString *)videoURL; /*! * Initiate Youtube Player. * @param1 videoURL URL of Video. * @param2 frame Rect of video with respect to parent view. * @discussion Initializes and returns a newly allocated KitabooYTPlayer object with specified video URL and Rect of video player view. * @code * [[KitabooYTPlayer alloc] initWithURL:videoURL withRect:frame]; * @endcode **/ -(id)initWithURL:(NSString *)videoURL withRect:(CGRect)frame; /*! * Return Inline Youtube Player View. * @code * [kitabooYTPlayer getYoutubeInlinePlayer]; * @endcode **/ - (UIView *)getYoutubeInlinePlayer; /*! * Close Youtube Player. * @code * [kitabooYTPlayer close]; * @endcode **/ - (void)close; /*! * Returns a Boolean value that indicates whether the Youtube Player is Inline or not. * @code * [kitabooYTPlayer isInline]; * @endcode **/ -(BOOL)isInline; @end
Share Settings Controller¶
ShareSettingsController defines a view, which appears, when users tap on the share button of note controller. It opens a setting panel which contains information such as, with which teacher or student, the user wants to share his/her notes.
typedef enum : short { NoteShareSettings = 1, HighlightShareSettings = 2 } SettingsType; /*! @protocol ShareSettingsControllerDelegate @brief The delegate of a ShareSettingsController object must adopt the ShareSettingsControllerDelegate protocol. @discussion All delegate methods are optional. ShareSettingsControllerDelegate method gets called when user selects any one of buttons (Cancel, Save) available on the share settings controller. When configuring the ShareSettingsController object, assign your delegate object to its delegate property. */ @protocol ShareSettingsControllerDelegate <NSObject> @optional /*! * Will be called when cancel button is tapped. */ - (void)didClickOnShareSettingsCancelButton; /*! * Will be called when Done button is tapped. * @param1 bookClassInfoVO Is the SDKBookClassInfoVO object. */ - (void)didClickOnShareSettingsSaveButton:(SDKBookClassInfoVO *)bookClassInfoVO; /*! * Will be called when Done button is tapped. * @param1 highlightVO Is the SDKHighlightVO object. */ - (void)didClickOnNoteShareSettingsSaveButton:(SDKHighlightVO *)highlightVO; @end /** An Object that manage a view for sharing a note. @discussion ShareSettingsController defines a view, which appears, when user tap on share button of note controller. It opens a setting panel which contains information such as, To which teacher or student, user wants to share his/her note. @superclass SuperClass : UIViewController */ @interface ShareSettingsController : UIViewController /*! * The object that acts as the delegate of the ShareSettingsController. * @discussion The delegate must adopt the ShareSettingsControllerDelegate protocol. * @code * shareSettingsController.delegate = self (Object that conforms to ShareSettingsControllerDelegate) * @endcode */ @property (nonatomic, weak) id<ShareSettingsControllerDelegate> delegate; /*! * User should define the preferred setting type to NoteShareSettings/HighlightShareSettings. * @code * [shareSettingsController setSettingsType:NoteShareSettings]; * @endcode */ @property (nonatomic, assign) SettingsType settingsType; /*! * Setter/Getting for Highlight, To open note controller highlight is mandatory. * @code * [shareSettingsController setHighlightVO:highlightVO]; * @endcode */ @property (strong, nonatomic) SDKHighlightVO *highlightVO; /*! * User should set the necessary background color for the view. * @param1 color Is the UIColor object which to be applied. * @code * [shareSettingsController setBackgroundColorForView:color]; * @endcode */ -(void)setBackgroundColorForView:(UIColor *)color; /*! * User should set the necessary theme color for the view. * @param1 color Is the UIColor object which to be applied. * @code * [shareSettingsController setThemeColorToView:color]; * @endcode */ -(void)setThemeColorToView:(UIColor *)color; /*! * This method used to set color to data inside tableView. * @param1 color Is the UIColor object which to be applied. * @code * [shareSettingsController setColorToDataInsideTable:color]; * @endcode */ -(void)setColorToDataInsideTable:(UIColor *)color ; /*! * User should set the necessary data for displaying the data/content. * @param1 data Is the array object which user need to set for specific segment. * @code * [shareSettingsController setData:data]; * @endcode */ - (void)setData:(NSArray *)data; @end
Markup¶
MarkupView is used to manage the look and feel of links available on pages, it is also responsible for handling action when user selects a specific markup. MarkupView is extended from UIButton, so to add action, UIButton standards need to followed.
The MarkupView contains information about position, linkID and pageID that are needed to draw markup.
/** * MarkupView is used to manage the look and feel of links available on pages, also it is responsible for handling action when user select the specific markup. MarkupView is extended from UIButton, so to add action, UIButton standards need to followed. @discussion The MarkupView contains information about position, linkID and pageID that are needed to draw markup. @superclass SuperClass : UIButton */ @interface MarkupView : UIButton /*! * Setter/Getter for pageID where markup is being added. * @code * [markupView setpageID:pageID]; * @endcode */ @property (nonatomic) NSInteger pageID; /*! * Setter/Getter for linkID. * @code * [markupView setlinkID:linkID]; * @endcode */ @property (nonatomic) NSInteger linkID; /*! * Setter/Getter for xCordinate i.e,X-Position of the markupView on the page. * @code * [markupView setxCordinate:xCordinate]; * @endcode */ @property (nonatomic) NSString *xCordinate; /*! * Setter/Getter for yCordinate i.e,Y-Position of the markupView on the page. * @code * [markupView setyCordinate:yCordinate]; * @endcode */ @property (nonatomic) NSString *yCordinate; /*! To make markup as invisible. @discussion This method is used to make markup as invisible, invisible markup is tappable or user can interact with it. For example,some markups on page are not visible but they are present and can receive touch events @code [multiLink.iconView setAsInvisibleMarkup]; @endcode */ - (void)setAsInvisibleMarkup; /*! To make markup as hidden. @discussion This method is used to hide and disable the user interaction of markup @code [multiLink.iconView setAsHiddenMarkup]; @endcode */ - (void)setAsHiddenMarkup; /*! * To set DropDown markup Alignment. * @discussion This method is used to set Alignment,Text color,DropDown markup bordercolor,borderwidth etc. * @param1 inputText dropDown input Text * @param2 properties properties contains FontType,FontSize,TextColor,Alignment * @code * [link.iconView updateForDropDownWithInputText:fibVO.text withLinkProperties:link.properties]; * @endcode */ - (void)updateForDropDownWithInputText:(NSString *)inputText withLinkProperties:(NSString*)properties; @end
Event Tracking¶
The AnalyticsManager class is responsible for keeping track of analytics data for page, note, highlight and link.
Class: AnalyticsManager
/** An object that manage analytics. @discussion The AnalyticsManager class is responsible for keeping track of analytics data for page, note, highlight and link. @superclass SuperClass : NSObject */ @interface AnalyticsManager : NSObject /*! * Returns Singleton instance of AnalyticsManager */ + (AnalyticsManager*)getInstance; /*! * Implement this method to track event, it's a one stop method to track any event, Tracking is done based on the parameters * @param1 eventName Name of event that needs to be tracked, if Same event is tracked multiple times, name would be unique in the end result, however info will be appended with same event name. * @param2 eventInfo Event info with all the information that needs to be tracked. * @param3 uniqueID uniqueID of event, No duplicate (Event name and Unique ID) can be added. */ -(void)trackEvent:(NSString *)eventName WithEventInfo:(NSDictionary *)eventInfo WihUniqueID:(NSString*)uniqueID; /*! * Implement this method to notify application events, its a one stop method to notify any event i.e,login, action on button etc * @param1 eventName Name of event that needs to be notified * @param2 eventInfo Event info with all the information that needs to be notified. * @discussion The event will be notified when user add NSNotification Observer with notification name "KitabooAnalyticsEvent".The output of the notification user info will be { EventName = Login;Parameters = { }; } */ -(void)notifyEvent:(NSString *)eventName WithEventInfo:(NSDictionary *)eventInfo; /*! * Returns event tracking JSON. All the data will be cleared when this method is called. */ -(NSString*)getTrackingJSON; /*! * Implement this method to set the event tracking data * @param1 jsonData JSON formatted string of event, the structure should be same as returned by getTrackingJSON method. */ -(void)setTrackingDataFromJSONString:(NSString*)jsonData; /*! * Returns AnalyticsEvents as type NSDictionary. */ -(NSDictionary*)getAnalyticsEvents; @end
Class: KitabooAnalyticsAdapter
/** An object that manage analytics. @discussion The KitabooAnalyticsAdapter class is responsible to convert the data of AnalyticsManager to specific json format which is required for Kitaboo. @superclass SuperClass : NSObject */ @interface KitabooAnalyticsAdapter : NSObject /*! *Implement this method to get the data of AnalyticsManager to specific json format which is required for Kitaboo. *@discussion To get analytics data such as how many pages have been swiped, how much time spent on each page, notes created, deleted, updated, shared or recieved and normal or important highlight created or deleted or any link opened. * @return Returns Kitaboo Reader Analytics JSON String * @param1 analyticsData JSON String of Events, Use Analytics Manager to get analytics JSON *@code [analyticsAdapter getAnalyticsData:[[AnalyticsManager getInstance] getTrackingJSON]]; *@endcode */ - (NSString *)getAnalyticsData:(NSString *)analyticsData; @end
Reading Time Manager¶
An Object that will be responsible to represent remaining time to completely read a book.
Class: ReadingTimeManager
/*! * An Object that will be responsible to represent remaining time to completely read a book. */ @interface ReadingTimeManager : NSObject /*! * To Initiate ReadingTimeManager * @param1 bookPath Device Physical path of book * @discussion Initializes and returns a newly allocated view object with specified book path. * @code * [[RendererViewController aloc] initWithBookPath:bookPath]; * @endcode */ - (id)initWithBookPath:(NSString*)bookPath; /// To get total time left to complete the book. /// @param pageIdentifier page or cfi /// @param averageTime average time per page in seconds - (NSInteger)getTimeLeftForpage:(NSString*)pageIdentifier withAverageTimePerPage:(double)averageTime; /// To set the default average time per page. /// @param averageTime average time per page - (void)setDefaultAverageTimePerPage:(double)averageTime; /// To check if CFI data is available or not. -(BOOL)isCFIDataAvailable; @end
Glossary¶
GlossaryViewController is a class which will be responsible for loading/displaying content related to the selected glossary and gives callback when any item is selected so one can perform respective action.
Class: GlossaryViewController
/** The delegate of a GlossaryViewController object must adopt the GlossaryViewControllerDelegate protocol. * GlossaryViewControllerDelegate Protocol used to handle all the callbacks of GlossaryViewController Class.The GlossaryViewControllerDelegate protocol defines methods that allow user to manage all the actions/events when any Glossary Item is selected. * When configuring the GlossaryViewController object, assign your delegate object to its delegate property. */ @protocol GlossaryViewControllerDelegate /// Tells the delegate that the glossary item is now selected. /// The delegate handles selections in this method. This method will be called when the glossary Item is Select. /// \param selectedType Selected GlossaryResourceType. /// /// \param resorcePath Path of resource for selected glossary item /// - (void)didSelectGlossaryItemWithType:(enum GlossaryResourceType)selectedType withPath:(NSString * _Nonnull)resorcePath; @end /** * GlossaryViewController is a class which will be responsible for loading/displaying content related to the selected glossary and gives callback when any item is selected, so one can perform respective actions. */ @interface GlossaryViewController : UIViewController /// The object that acts as the delegate of the GlossaryViewController. /// The delegate must adopt the GlossaryViewControllerDelegate protocol. @property (nonatomic, strong) id <GlossaryViewControllerDelegate> _Nullable delegate; /// object of type KFGlossaryVO which has all information related to the selected glossary. @property (nonatomic, strong) KFGlossaryVO * _Nullable glossaryItem; /// To set colors for items which are present in glossary view. /// <h3>Usage Example:</h3> /// \code /// [glossaryViewController setColorsForGlossaryViewWithIconColor:hdThemeVO.glossary_icon_color iconBorderColor:hdThemeVO.glossary_icon_border_color alphabetTextColor:hdThemeVO.glossary_alphabet_label_color keyWordTextColor:hdThemeVO.glossary_keyword_label_color descriptionTextColor:hdThemeVO.glossary_description_color]; /// /// \endcode\param iconColor color for icons which are present in glossary controller /// /// \param iconBorderColor boreder color for icons /// /// \param alphabetTextColor text color for alphabet text /// /// \param keyWordTextColor text color for keyword text /// /// \param descriptionTextColor text color for description text /// - (void)setColorsForGlossaryViewWithIconColor:(UIColor * _Nonnull)iconColor iconBorderColor:(UIColor * _Nonnull)iconBorderColor alphabetTextColor:(UIColor * _Nonnull)alphabetTextColor keyWordTextColor:(UIColor * _Nonnull)keyWordTextColor descriptionTextColor:(UIColor * _Nonnull)descriptionTextColor; @end
Print Page¶
Class: PrintPageViewController
An object that manages printing user interface. - The shared instance of it represents a print job, printing page status. - Responding to user interactions with Print Controller.
/** The delegate of a PrintPageViewController object must adopt the PrintPageViewControllerDelegate protocol. PrintPageViewControllerDelegate Protocol used to handle all the callbacks of PrintPageViewController Class.The PrintPageViewControllerDelegate protocol defines a method that allow user to manage print task. When configuring the PrintPageViewController object, assign your delegate object to its delegate property. */ @protocol PrintPageViewControllerDelegate /// Tells the delegate that the PrintPageViewController is being dismissed. /// This callback will be initialised when the user taps Print on the printing-options view or when the user dismisses the view by tapping outside it. - (void)printPageViewControllerDidDismiss; /// Tells the delegate that the PrintPageViewController has finished its Task . - (void)PrintPageViewControllerDidFinishJob; /// Tells the delegate that the device does not support printing. - (void)deviceNotSupportsPagePrinting; /// Tells the delegate that the Page Printed Successfully. - (void)didPagePrintedSuccessFully; /// Tells the delegate that the Page Printing Task failed with error. /// \param error Instance of Error. /// - (void)didPagePrintingFailedWithError:(NSError * _Nullable)error; @end /** An object that manages printing user interface. The shared instance of it represents a print job, printing page status. Responding to user interactions with Print Controller. */ @interface PrintPageViewController : UIViewController <UIPrintInteractionControllerDelegate> /// The object that acts as the delegate of the PrintPageViewController. /// The delegate must adopt the PrintPageViewControllerDelegate protocol. @property (nonatomic, strong) id <PrintPageViewControllerDelegate> _Nullable delegate; /// Initializes an allocated PrintPageViewController object with Print Image. /// \param printImage printImage of Type UIImage for print. /// - (nonnull instancetype)initWithPrintImage:(UIImage * _Nonnull)printImage; @end
Class: PrintPageButton
A control that executes Print page controller code in response to user
/** The delegate of a PrintPageButton object must adopt the PrintPageViewDelegate protocol. PrintPageViewDelegate Protocol used to handle all the callbacks of PrintPageButton Class.The PrintPageViewDelegate protocol defines a method that allows the user to manage interactions. When configuring the PrintPageButton object, assign your delegate object to its delegate property. */ @protocol PrintPageViewDelegate /// Tells the delegate that the specified Print Button is now Tapped. /// \param pageNumber Selected Print Button Page Number. /// - (void)didTapOnPrintPageWithPageNumber:(NSNumber * _Nullable)pageNumber; @end /** A control that executes Print page controller code in response to user interactions. */ @interface PrintPageButton : UIButton /// The object that acts as the delegate of the PrintPageButton. /// The delegate must adopt the PrintPageViewDelegate protocol. The delegate is not retained. @property (nonatomic, strong) id <PrintPageViewDelegate> _Nullable delegate; /// An unique page Identifier. @property (nonatomic, strong) NSNumber * _Nullable pageNumber; @end
Drop Down ¶
Class: HDDropDownController
An object that manages the content of ShareSetting classes. A HDDropDownController object manages content of classes in dropdown list and selection of class from dropdown list.
/// Methods for managing selection of items in Dropdown of ShareSettings. @protocol HDDropDownDelegate /// *This method will be called when user select item from table/list and returns selected item name - (void)didSelectItemWithName:(NSString * _Nonnull)name; @end /** An object that manages the content of ShareSetting classes. A HDDropDownController object manages content of classes in dropdown list and selection of class from dropdown list. */ @interface HDDropDownController : UIViewController /// The object that acts as the delegate of the HDDropDownController. /// The delegate must adopt the HDDropDownDelegate protocol. @property (nonatomic, strong) id <HDDropDownDelegate> _Nullable delegate; /// To initialize HDDropDowncontroller /// \param dataArray array of type string which is used to display name in drop down list /// /// \param dropDownFrame CGRect used to set frame for drop down controller /// - (nonnull instancetype)initWithDataArray:(NSArray<NSString *> * _Nonnull)dataArray dropDownFrame:(CGRect)dropDownFrame OBJC_DESIGNATED_INITIALIZER; @end
Link Drop Down ¶
Class: LinkDropDownViewController
An object that manages the content for links in Dropdown. A LinkDropDownViewController object manages the content of the link in the dropdown list and allows the selection of items from the dropdown list.
/// Methods for managing selection,close actions in a DropDown @protocol LinkDropDownViewControllerDelegate /// Tells the delegate that the specified DropDown item is now selected. /// The delegate handles selections in this method. One of the things it can do is save the selected DropDown Text. This method will be called when the DropDown Item is Select. /// \param selectedText Selected DropDown Item Text. /// /// \param dropDown Selected DropDown /// - (void)didSelectDropDownItemWithText:(NSString * _Nonnull)selectedText forDropDown:(UIButton * _Nonnull)dropDown; /// Tells the delegate that the specified DropDown needs to close. /// Use this method to detect when a DropDown is needed to be removed. - (void)didSelectActionToCloseDropDown; @end /** An object that manages the content for links in Dropdown. A LinkDropDownViewController object manages the content of the link in the dropdown list and allows the selection of items from the dropdown list. */ @interface LinkDropDownViewController : UIViewController <UIGestureRecognizerDelegate> /// The object that acts as the delegate of the LinkDropDownViewController. /// The delegate must adopt the LinkDropDownViewControllerDelegate protocol. The delegate is not retained. @property (nonatomic, strong) id <LinkDropDownViewControllerDelegate> _Nullable delegate; /// Initializes an allocated LinkDropDownViewController object with DropDown Items and a DropDown. /// \param dropDownItemsArray DropDown Items /// /// \param dropDown Selected DropDown /// - (nonnull instancetype)initWithDropDownData:(NSArray<NSString *> * _Nonnull)dropDownItemsArray withDropDown:(UIButton * _Nonnull)dropDown; @end
Protractor ¶
Class: ProtractorViewController
An object that manages Protractor behaviour. A ProtractorViewController's main responsibilities include the following: - Responding to user interactions with Protractor. - Resizing protractor view and managing the layout of the overall interface. - Coordinating with protractor web content data. - Updating the contents of the views, providing detailed data about the protractor.
/** The delegate of a ProtractorViewController object must adopt the ProtractorViewControllerDelegate protocol. ProtractorViewControllerDelegate Protocol used to handle all the callbacks of ProtractorViewController Class.The ProtractorViewControllerDelegate protocol defines method that allow user to manage clean-up and saving protractor data. When configuring the Protractor View Controller object, assign your delegate object to its delegate property. */ @protocol ProtractorViewControllerDelegate /// Tells the delegate that the Protractor needs to be closed. /// You can implement this method to do clean-up tasks related to Protractor and save protractor data. /// \param protractorVO protractorVO is object of type SDKProtractorVO /// - (void)didCloseProtractorWithProtractorVO:(SDKProtractorVO * _Nullable)protractorVO; @end /** An object that manages Protractor behaviour. A ProtractorViewController's main responsibilities include the following: - Responding to user interactions with Protractor. - Resizing protractor view and managing the layout of the overall interface. - Coordinating with protractor web content data. - Updating the contents of the views, providing detailed data about the protractor. */ @interface ProtractorViewController : UIViewController <WKNavigationDelegate, WKUIDelegate> /// The object that acts as the delegate of the ProtractorViewController. /// The delegate must adopt the ProtractorViewControllerDelegate protocol. @property (nonatomic, strong) id <ProtractorViewControllerDelegate> _Nullable delegate; /// To set Protractor canvas. /// This method is used to set canvas for Protractor /// \param canvas canvas is a object of type PenDrawingView /// - (void)setProtractorCanvasWithCanvas:(PenDrawingView * _Nonnull)canvas; @end
Class: ProtractorSelectionButton
A control that is used to handle Protractor selection. When you select a button that has focus, the button performs any actions attached to it.
/** A control that use to handle Protractor selection. When User selects any button that has focus, the button performs any actions attached to it. */ @interface ProtractorSelectionButton : UIButton /// A universally unique value that can be used to identify a selected Protractor. @property (nonatomic, copy) NSString * _Nullable penToolUUID; @end
Watermark ¶
Class: WatermarkHolderView
A WatermarkHolderView object adds content within its bounds rectangle and handles any interactions with that content. Use WatermarkHolderView to add watermark, it can be a label, image etc.
/// WatermarkPosition is used to set position to WatermarkHolderView. typedef SWIFT_ENUM(NSInteger, WatermarkPosition, closed) { /// Top Left Position of Page WatermarkPositionTopLeft = 0, /// Top center Position of Page WatermarkPositionTopCenter = 1, /// Top Right Position of Page WatermarkPositionTopRight = 2, /// Bottom Left Position of Page WatermarkPositionBottomLeft = 3, /// Bottom Center Position of Page WatermarkPositionBottomCenter = 4, /// Bottom Right Position of Page WatermarkPositionBottomRight = 5, }; /** An object that manages the content for the watermark on the screen. A WatermarkHolderView object adds content within its bounds rectangle and handles any interactions with that content. Use WatermarkHolderView to add watermark, it can be a label, image etc. - SuperClass : UIView */ @interface WatermarkHolderView : UIView /// To display WatermarkHolderView. /// Used this method to show hidden watermarks . - (void)showWatermark; /// To hide WatermarkHolderView. /// A hidden view disappears from its window. It remains in its superview’s list of subviews. - (void)hideWatermark; /// To set WaterMark Position. /// Use this method to set <em>waterMark Position</em>. Default Position of waterMark is bottomLeft. /// \param position WaterMarkPosition. /// - (void)setWatermarkHolderViewPosition:(enum WatermarkPosition)position; /// To get WaterMark Position. /// Use this method to get <em>waterMark Position</em>. /// /// returns: /// WatermarkPosition . - (enum WatermarkPosition)getWatermarkHolderViewPosition ; @end
Audiobook ¶
Class: HDKitabooAudioBookPlayerController
HDKitabooAudioBookPlayerController has the set of classes which consumes SDK Component and creates a fully functional controller for AudioBook, so that the AudioBooks can be Launched and predefined actions can be done, which includes Adding Bookmark, Updating narration speed of audio, TOC etc. A HDKitabooAudioBookPlayerController initializes all the components which are part of the AudioBook and handles all call backs of the components.
/** Initializes the HDKitabooAudioBookPlayerController object This method should be called to initialize the HDKitabooAudioBookPlayerController object - parameter audioBookModel :audioBookModel is the HDAudioBookModel instance. - parameter themeColor :themeColor is the UIColor instance. This is used to update the components which needs to be updated from theme. */ init(_ audioBookPath:String?, _ thumbnailURL:String?) /** To set the text color for apply button title and selected narrated speed text This method should be called to set the text color for apply button title and selected narrated speed text - parameter color :color is the UIColor instance.This is used to update the components apply button title and selected narrated speed text */ func setColor(color:UIColor?) Protocol: HDKitabooAudioBookPlayerControllerDelegate /** Delegate method when tapped on back button This method will be called when user tap on the back button */ func didTapOnBackButton()
Class: HDAudioBookPlayer
HDAudioBookPlayer object is be responsible to play the audio file. It initialises the AVPlayer to play the audio.
/** To resume the audio This method should be called to resume the audio play */ func play() /** To resume the audio from specific time This method should be called to resume the audio play from specific time period - parameter value :value is the Int value.It should be time period in seconds */ func playToSeekTime(_ value: Int64) /** To stop the audio This method should be called to stop the audio play */ func stop() /** To pause the audio This method should be called to pause the audio play */ func pause() /** To set the reading of the audio This method should be called to set the reading/narration speed of the audio. */ func mute() /** To set the reading speed of the audio This method should be called set the reading speed of the audio play - parameter audioBookModel :audioBookModel is the instance of HDAudioBookModel. */ func setReadingSpeed(audioBookModel: HDAudioBookModel) /** To forward the audio This method should be called to forward the audio play - parameter time :time is the Int value which represents the number of seconds to be forwarded. */ func playForwardWithTime(_ time: Float64) /** To rewind the audio This method should be called to rewind the audio play - parameter time :time is the Int value which represents the number of seconds to be rewinded */ func playBackwardWithTime(_ time: Float64) /** To play the audio from specific chapter This method should be called to navigate between chapter i.e to play the audio from the specific chapter */ func navigateToChapter() /** To get the current playing time of the audio This method should be called to get the current playing time of the audio */ func getSeekTime() -> Int
Class: HDAudioBookTOCController
HDAudioBookTOCController object manages the UI and provides call backs for multiple actions performed. Use HDAudioBookTOCController to add the view of TOC for AudioBook.
/** Initializes the HDAudioBookTOCViewController object This method should be called to initialize the HDAudioBookTOCViewController object - parameter audioBookModel :audioBookModel is the HDAudioBookModel instance. */ init(_ audioBookModel:HDAudioBookModel) /** To set the data to specific selected segment This method should be called everytime when user receive the callbacks to set the data for specific selected segment - parameter data :data is the NSArray instance. */ func setData(_ data:NSArray) /** To set the text color for apply button title and selected narrated speed text This method should be called to set the text color for apply button title and selected narrated speed text - parameter color :color is the UIColor instance.This is used to update the components apply button title and selected narrated speed text */ func setColor(forText color:UIColor?) Protocol: HDAudioBookTOCControllerDelegate /** Delegate method when tapped on chapter segment This method will be called when user tap on the chapter segment.It allows the user to set the data for this segment. */ func didTapOnChapterSegment() /** Delegate method when tapped on Transcript segment This method will be called when user tap on the Transcript segment.It allows the user to set the data for this segment. */ func didTapOnTranscriptSegment() /** Delegate method when tapped on Bookmark segment This method will be called when user tap on the Bookmark segment.It allows the user to set the data for this segment. */ func didTapOnBookmarkSegment() /** Delegate method when tapped on specific cell of the chapter segment This method will be called when user tap on any of specific cell of the chapter segment. - parameter audioBookParser :audioBookParser is the HDAudioBookParser instance. */ func didTapOnChapter(_ audioBookParser:HDAudioBookParser) /** Delegate method when tapped on specific cell of the Transcript segment This method will be called when user tap on any of specific cell of the Transcript segment. - parameter audioBookParser :audioBookParser is the HDAudioBookParser instance. */ func didTapOnTranscript(_ audioBookParser:HDAudioBookParser) /** Delegate method when tapped on specific cell of the Bookmark segment This method will be called when user tap on any of specific cell of the Bookmark segment. - parameter audioBookParser :audioBookParser is the HDAudioBookParser instance. */ func didTapOnBookmark(_ bookmarkVO:SDKBookmarkVO) /** Delegate method when tapped on play/pause button on any specific cell of the chapter segment This method will be called when user tap on play/pause button on any specific cell of the chapter segment - parameter audioBookParser :audioBookModel is the HDAudioBookModel instance. */ func didTapOnPlayPauseButton(_ audioBookModel: HDAudioBookModel) /** Delegate method when tapped on delete button on any specific cell of the Bookmark segment This method will be called when user tap on delete button on any specific cell of the Bookmark segment - parameter audioBookParser :bookmarkVO is the SDKBookmarkVO instance. */ func didTapOnBookmarkDeleteBtn(_ bookmarkVO:SDKBookmarkVO)
Class: HDAudioBookNarrationSpeedController
HDAudioBookNarrationSpeedController object manages the UI and provides call backs when the narration speed is updated. Use HDAudioBookNarrationSpeedController to add this view.
/** Initializes the HDAudioBookNarrationSpeedController object This method should be called to initialize the HDAudioBookNarrationSpeedController object - parameter audioBookModel :audioBookModel is the HDAudioBookModel instance. */ init(_ audioBookModel: HDAudioBookModel?) /** To set the text color for apply button title and selected narrated speed text This method should be called to set the text color for apply button title and selected narrated speed text - parameter color :color is the UIColor instance.This is used to update the components apply button title and selected narrated speed text */ func setColor(forText color:UIColor?) Protocol:HDAudioBookNarrationSpeedControllerDelegate /** Delegate method to update change in reading speed of the audio This method will be called when narration speed of the audio is updated. - parameter audioBookModel :audioBookModel is the instance of HDAudioBookModel.We can get the updated narration speed from audioNarrationSpeedRate from HDAudioBookModel object. */ func didNarrationSpeedValueChanges(_ audioBookModel:HDAudioBookModel?)
Class: HDAudioBookBookmarkController
HDAudioBookBookmarkController object manages the UI and provides callbacks when the narration speed is updated.
/** Initializes the HDAudioBookBookmarkController object This method should be called to initialize the HDAudioBookBookmarkController object to update the existing bookmark - parameter bookmarkVO :bookmarkVO is the SDKBookmarkVO instance. */ init(_ bookmarkVO:SDKBookmarkVO) /** Initializes the HDAudioBookBookmarkController object This method should be called to initialize the HDAudioBookBookmarkController object when user need to add a new bookmark */ init() /** To set the text color for apply button title and selected narrated speed text This method should be called to set the text color for apply button title and selected narrated speed text - parameter color :color is the UIColor instance.This is used to update the components apply button title and selected narrated speed text */ func setColor(forText color:UIColor?) Protocol :HDAudioBookBookmarkControllerDelegate /** Delegate method when tapped on add bookmark button This method will be called when user tap on the add bookmark button - parameter bookmarkVO :bookmarkVO is the SDKBookmarkVO instance.It is used to add/update the bookmark in database */ func didTapOnAddBookmarkButton(_ bookmarkVO:SDKBookmarkVO) /** Delegate method when tapped on delete bookmark button This method will be called when user tap on the delete bookmark button - parameter bookmarkVO :bookmarkVO is the SDKBookmarkVO instance.It is used to delete the bookmark in database */ func didTapOnDeleteBookmarkButton(_ bookmarkVO:SDKBookmarkVO) /** Delegate method when tapped on cancel bookmark button This method will be called when user tap on the cancel bookmark button - parameter bookmarkVO :bookmarkVO is the SDKBookmarkVO instance. */ func didTapOnCancelBookmarkButton(_ bookmarkVO:SDKBookmarkVO)
Class: HDAudioBookPlayerViewController
HDAudioBookPlayerViewController object manages the UI and provides callbacks for multiple actions performed.
/** Initializes the HDAudioBookPlayerViewController object This method should be called to initialize the HDAudioBookPlayerViewController object - parameter audioBookModel :audioBookModel is the HDAudioBookModel instance. */ init(_ audioBookModel:HDAudioBookModel?) /** To set the text color for apply button title and selected narrated speed text This method should be called to set the text color for apply button title and selected narrated speed text - parameter color :color is the UIColor instance.This is used to update the components apply button title and selected narrated speed text */ func setColor(forText color:UIColor?) /** To update the text of the narration speed label This method should be called to change the narration speed label text when user update the narration speed value from HDAudioBookNarrationSpeedController */ func updateNarrationSpeedLabel() /** To update the slider progress and time label text This method should be called to update the progress of the slider with respect to current time of the audio and to update the time labels text with current time and total time of the audio */ func setTimeLabelValues() Protocol: HDAudioBookPlayerViewControllerDelegate /** Delegate method when tapped on back button This method will be called when user tap on the back button */ func didTapOnBackButton() /** Delegate method when tapped on bookmark button This method will be called when user tap on the bookmark button */ func didTapOnBookmarkButton() /** Delegate method when tapped on play/pause button This method will be called when user tap on the play/pause button - parameter audioBookModel :audioBookModel is the HDAudioBookModel instance. */ func didTapOnPlayPauseButton(_ audioBookModel: HDAudioBookModel) /** Delegate method when tapped on Narration Speed button This method will be called when user tap on the Narration Speed button */ func didTapOnNarrationSpeedButton(_ button:UIButton) /** Delegate method when tapped on forward button This method will be called when user tap on the forward button */ func didTapOnForwardButton() /** Delegate method when tapped on backward button This method will be called when user tap on the backward button */ func didTapOnRewindButton() /** Delegate method when tapped on next chapter button This method will be called when user tap on the next chapter button */ func didTapOnNextChapterButton() /** Delegate method when tapped on previous chapter button This method will be called when user tap on the previous chapter button */ func didTapOnPreviousChapterButton() /** Delegate method when update the UISlider position This method will be called when user update the UISlider position */ func didSeekBarValueChanged()