Other Protocols
The following protocols are available globally.
-
Undocumented
See moreDeclaration
Objective-C
@protocol CredentialsExchanging -(void) exchangeEmail:(NSString *)email password:(NSString *)password completion:(CredentialsExchangeCompletionBlock)completion; -(void) validatedTokenWithForcedRefresh:(BOOL)forceRefresh completion:(CredentialsExchangeCompletionBlock)completion; -(void) signOut; -(nullable NSString *) username; -(nullable NSString *) password; -(nullable NSString *) jwtToken; // For migration to new credentials storage; may not be valid @end
Swift
protocol CredentialsExchanging
-
Undocumented
See moreDeclaration
Objective-C
@protocol MaggioAnalytics <NSObject> -(void) startSession; -(void) resume; -(void) close; /// Update the random screen identifier associated with future analytics events. -(void) updateScreenId; /// Update analytics data for use as `previous_analytics_data`. When you call this, /// `previous_analytics_data` will be set to the value provided by the *previous* /// call to this method. -(void) updateCurrentScreenAnalyticsData:(NSDictionary *)analyticsData; -(void) addEvent:(NSString *)event; -(void) addEvent:(NSString *)event attributes:(NSDictionary *)attributes; -(void) addEvent:(NSString *)event attributes:(NSDictionary *)attributes forceBackground:(BOOL)forceBackground; -(void) addContextAttributeValue:(id)value forKey:(NSString *)key; //!< Add values to be present in every event -(void) removeContextAttribute:(NSString *)key; -(void) setGlobalAttributes:(NSDictionary *)attributes; //!< Values typically gotten from an external source to be present in every event -(NSDictionary *) contextAttributes; //!< Values to be present in every event, doens't include globalAttributes @end
Swift
protocol MaggioAnalytics : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol MaggioAnalyticsTemplateRenderer <NSObject> -(NSString *) renderString:(NSString *)string inContext:(NSDictionary *)context; -(NSString *) renderString:(NSString *)string inContext:(NSDictionary *)context flags:(MaggioAnalyticsTemplateRenderingFlags)flags; @end
Swift
protocol MaggioAnalyticsTemplateRenderer : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieAdsViewDelegate <NSObject> @required -(nonnull UIViewController *) viewControllerForPresentingFromRichieAdsView:(nonnull RichieAdsView *)view; @optional -(void) richieAdsViewDidShowContent:(nonnull RichieAdsView *)view; //!< Called when RichieAdsView has loaded some content (placeholder image or HTML) for display. -(BOOL) richieAdsView:(nonnull RichieAdsView *)view wantsResizeToFrame:(CGRect)frame; //!< Return YES if the view will be (or already has been) resized to the supplied frame. -(void) richieAdsViewResizeEnded:(nonnull RichieAdsView *)view; @end
Swift
protocol RichieAdsViewDelegate : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieAudiobooksHostAppEventSink -(void) listenerForBookDidLoginWithUsername:(NSString *)username; @end
Swift
protocol RichieAudiobooksHostAppEventSink
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieBackgroundTask <NSObject> -(void) endTask; @property (nonatomic, readonly) BOOL isRunning; @end
Swift
protocol RichieBackgroundTask : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieBackgroundTaskSource -(UIBackgroundTaskIdentifier) beginBackgroundTaskWithName:(NSString *)taskName expirationHandler:(void(^)(void))handler; -(void) endBackgroundTask:(UIBackgroundTaskIdentifier)identifier; /** Returns a lifetime token. Background task is ended when token object is deallocated or -endTask is called explicitly. There is not expiration handler, because we don't do anything in them. */ -(id<RichieBackgroundTask>) backgroundTaskWithName:(NSString *)name; @end
Swift
protocol RichieBackgroundTaskSource
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieBooksBookListener <NSObject> -(void) bookDidChangeDiskState:(nonnull RichieBooksBook *)book; -(void) bookDidChangePresentationState:(nonnull RichieBooksBook *)book; -(void) bookDidChangeLoadingState:(nonnull RichieBooksBook *)book; -(void) bookDidStartLoading:(nonnull RichieBooksBook *)book withUserInfo:(nullable id)userInfo; -(void) bookDidSucceedLoading:(nonnull RichieBooksBook *)book withUserInfo:(nullable id)userInfo; -(void) bookDidStopLoading:(nonnull RichieBooksBook *)book; -(void) book:(nonnull RichieBooksBook *)book didFailLoadingWithError:(nullable NSError *)error; @end
Swift
protocol RichieBooksBookListener : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieBooksBookLoadingStateProvider <NSObject> -(void) addBookLoadingListener:(nonnull id<RichieBooksBookLoadingListener>)listener; -(void) removeBookLoadingListener:(nonnull id<RichieBooksBookLoadingListener>)listener; @end
Swift
protocol RichieBooksBookLoadingStateProvider : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieBooksBookLoadingListener <NSObject> -(void) bookLoadingStateProvider:(nonnull id<RichieBooksBookLoadingStateProvider>)stateProvider didStartLoadingBookWithId:(nonnull NSString *)bookId userInfo:(nullable id)userInfo; -(void) bookLoadingStateProvider:(nonnull id<RichieBooksBookLoadingStateProvider>)stateProvider didFinishLoadingBookWithId:(nonnull NSString *)bookId userInfo:(nullable id)userInfo; @end
Swift
protocol RichieBooksBookLoadingListener : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieBooksLibraryListener <NSObject> -(void) didLoadBooksFromDisk:(nonnull NSArray<RichieBooksBook *> *)books; -(void) didCreateBook:(nonnull RichieBooksBook *)book; -(void) didUpdateBook:(nonnull RichieBooksBook *)book; @end
Swift
protocol RichieBooksLibraryListener : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieBooksReaderUiEventListener <NSObject> -(void) readerForBook:(RichieBooksBook *)book didPresentWithTheme:(NSString *)themeIdentifier inOrientation:(RichieBooksOrientation)orientation; -(void) readerForBookDidDismiss:(RichieBooksBook *)book; -(void) readerForBook:(RichieBooksBook *)book didNavigateToPage:(NSInteger)pageNumber pageCount:(NSInteger)pageCount; -(void) readerForBook:(RichieBooksBook *)book didFinishBookLayoutWithPageCount:(NSInteger)pageCount; -(void) readerForBook:(RichieBooksBook *)book didChangeLayoutOrientation:(RichieBooksOrientation)orientation pageNumber:(NSInteger)pageNumber pageCount:(NSInteger)pageCount; -(void) readerForBookDidOpenTOC:(RichieBooksBook *)book; -(void) readerForBookDidCloseTOC:(RichieBooksBook *)book; @end
Swift
protocol RichieBooksReaderUiEventListener : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieCryptor <NSObject> /** Call this method repeatedly to feed data into the decrypt/encrypt process. @p resultHandler will be called with output data, possibly multiple times per call to this method. Final invocation needs to pass @p YES to @p isFinal. An empty @p NSData instance can be given then. **NOTE:** If the data provided is to used outside the scope of the callback the data needs to be copied. For performance the same output buffer is reused during processing and thus the contents of the data change. **NOTE:** Output data may have different length than input data. Due to padding used by encryption algorithm, when encrypting output can be longer than input, and when decrypting output can be shorter than input. @return Boolean indicating success or failure. If failure, the cryptor has failed and cannot continue. */ -(BOOL) processData:(nonnull NSData *)input isFinal:(BOOL)isFinal resultHandler:(void (^ NS_NOESCAPE _Nonnull)(NSData * _Nonnull ephemeralData))resultHandler; @end
Swift
protocol RichieCryptor : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichiePageScrollerViewDataSource <NSObject> -(NSInteger) numberOfPagesInPageScrollerView:(RichiePageScrollerView *)pageScrollerView; -(UIView *) pageScrollerView:(RichiePageScrollerView *)pageScrollerView pageAtIndex:(NSInteger)pageIndex; -(CGFloat) pageScrollerView:(RichiePageScrollerView *)pageScrollerView widthOfPageAtIndex:(NSInteger)pageIndex; //!< Controls the width (or height in non-horizontalMode) of page. Height (or width) of page is used as returned by -pageScrollerView:pageAtIndex:, centered and respecting autoresizing masks. @optional -(CGFloat) pageScrollerView:(RichiePageScrollerView *)pageScrollerView paddingAfterPageAtIndex:(NSInteger)pageIndex; -(void) pageScrollerView:(RichiePageScrollerView *)pageScrollerView didRemovePageView:(UIView *)view atIndex:(NSInteger)pageIndex; //!< Called after view has been removed from view hierarcy. @end
Swift
protocol RichiePageScrollerViewDataSource : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichiePageScrollerViewDelegate <NSObject> @optional -(void) pageScrollerViewWillBeginDragging:(RichiePageScrollerView *)pageScrollerView; //!< Called just as dragging starts. -(void) pageScrollerViewDidScroll:(RichiePageScrollerView *)pageScrollerView; //!< Called whenever view is scrolled. -(void) pageScrollerView:(RichiePageScrollerView *)pageScrollerView didScrollToPageAtIndex:(NSInteger)pageIndex fromPageAtIndex:(NSInteger)previousPageIndex; //!< Called when scrolling causes current page to change. -(void) pageScrollerView:(RichiePageScrollerView *)pageScrollerView didStopAtPageAtIndex:(NSInteger)pageIndex userGesture:(BOOL)userGesture; //!< Called after scrolling has stopped. -(void) pageScrollerViewDidEndDragging:(RichiePageScrollerView *)pageScrollerView; //!< Called after dragging ends. @end
Swift
protocol RichiePageScrollerViewDelegate : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieReusableView @property (nonatomic, readonly) NSString *reuseIdentifier; @optional -(void) prepareForReuse; @end
Swift
protocol RichieReusableView
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieSwiper <NSObject> -(CGRect) frameForPageAtIndex:(NSInteger)pageIndex; //!< Calculated frame for given pageIndex. Useful for returning views with correct frame from DataSource. @property (nonatomic) NSInteger numberOfPages; /** The index of the page currently being displayed in the swiper. Setting this property is same as calling -setCurrentPageIndex:newPageIndex animated:NO. Changing current page index programmatically will cause delegate notifications of page disappearing and appearing called normally. */ @property (nonatomic) NSInteger currentPageIndex; /** Changes the page currently being displayed in the swiper. If animated is YES, the change will happen with a scrolling animation. Changing current page index programmatically will cause delegate notifications of page disappearing and appearing called normally. */ -(void) setCurrentPageIndex:(NSInteger)newPageIndex animated:(BOOL)animated; /** Causes DataSource to be queried and all current data to be discarded. Analogous to UITableView method -reloadData. NOTE: Calling this won't cause -swiper:pageDidDisappear: delegate method to be called on possibly disappearing page, but -swiper:pageDidAppear: will be called for the new page. If all page data doesn't actually change underneath, the newly appearing page could've actually been the previously already appeared page. */ -(void) reloadData; /** Will cause DataSource to be queried if necessary (when the newly inserted page needs to be actually inserted to view hierarchy). */ -(void) insertPageAtIndex:(NSInteger)pageIndex; -(void) removePageAtIndex:(NSInteger)pageIndex; @end
Swift
protocol RichieSwiper : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieSwiperDataSource <NSObject> /** If the number of pages in Swiper changes, call -reloadData to let the know that. */ -(NSInteger) numberOfPagesInSwiper:(id<RichieSwiper>)swiper; /** DataSource is responsible for creating views for pages. It can use -[RichieSwiper frameForPageAtIndex:] for creating the view with correct size. RichieSwiper itself doesn't use auto layout, but pages can use auto layout internally. Note that the returned view will have it's frame set so it's as wide as the swiper view, and centered vertically if it's shorter than swiper view. */ -(UIView *) swiper:(id<RichieSwiper>)swiper pageAtIndex:(NSInteger)pageIndex; @optional /** Called after RichieSwiper has removed page view from view hierarchy. This is an opportunity for the DataSource to do any necessary tear down (clearing delegates, stopping operations) if page view instances aren't recycled or otherwise cached. Also, this method can be used to gather views for recycling (manually), similar to how UITableView recycles cell views. Views cached for recycling in this call can be later returned by -swiper:pageAtIndex:. */ -(void) swiper:(id<RichieSwiper>)swiper didRemovePage:(UIView *)view atIndex:(NSInteger)pageIndex; @end
Swift
protocol RichieSwiperDataSource : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieSwiperDataSourceAdViewPolicy <NSObject> -(UIView *) viewForSwiper:(id<RichieSwiper>)swiper atIndex:(NSInteger)pageIndex; -(void) pageWasRemoved:(__kindof UIView *)view inSwiper:(id<RichieSwiper> __unused)swiper atIndex:(NSInteger)pageIndex isAdPage:(BOOL)isAdPage; @property (nonatomic, readonly) NSInteger numberOfAdViews; -(void) pageDidAppear:(NSInteger)pageIndex inSwiper:(id<RichieSwiper>)swiper isAdPage:(BOOL)isAdPage isFirstAppearance:(BOOL)isFirstAppearance; -(void) pageDidDisappear:(NSInteger)pageIndex inSwiper:(id<RichieSwiper>)swiper isAdPage:(BOOL)isAdPage; -(NSInteger) currentPageIndexRestoringAdViewsWhenSettingCurrentPageIndex:(NSInteger)newPageIndex withNumberOfOriginPages:(NSInteger)numberOfOriginPages; -(BOOL) isAdIndex:(NSInteger)pageIndex; -(NSInteger) swiperIndexFromOriginIndex:(NSInteger)originIndex; -(NSInteger) originIndexFromSwiperIndex:(NSInteger)swiperIndex; -(void) willReloadDataWithNumberOfOriginPages:(NSInteger)numberOfOriginPages; -(void) didReloadData; -(void) didInsertPageAtOriginIndex:(NSInteger)originIndex inSwiper:(id<RichieSwiper>)swiper; @property (nonatomic, readonly) BOOL areAppearanceCallbacksDisabled; @end
Swift
protocol RichieSwiperDataSourceAdViewPolicy : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieSwiperDelegate <NSObject> @optional -(void) swiper:(id<RichieSwiper>)swiper pageDidAppear:(NSInteger)pageIndex userGesture:(BOOL)userGesture; -(void) swiper:(id<RichieSwiper>)swiper pageDidDisappear:(NSInteger)pageIndex; /** leftPage or rightPage can be -1 if it's not a valid page index, such as when past begin or end of swiper. Percentage ([-1, 1]) is the completeness of panning transition from left page to right page. Negative percentage values mean percentage is from rightPage to leftPage, positive percentage values mean distance is from leftPage to rightPage. When a page is invalid (-1), percentage is from the valid page. For example, leftPage == -1 and rightPage == 0, percentage will be negative (or zero), because panning is from the rightPage to left. When leftPage == <last page index> and rightPage == -1, percentage will be positive (or zero), signifying panning is to right from leftPage. Also, when leftPage == 1 and rightPage == 2, percentage == 0.75 and percentage == -0.25 are the same thing: panning transition is 75% complete from the left page to the right page. */ -(void) swiper:(id<RichieSwiper>)swiper didPanToPercent:(float)percent betweenPage:(NSInteger)leftPage andPage:(NSInteger)rightPage; @end
Swift
protocol RichieSwiperDelegate : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieSwiperSlotAdProvider <NSObject> -(RichieAdsSlotAdFlight *) nextFlight; -(RichieAdsView *) viewWithFrame:(CGRect)frame forAdFlight:(RichieAdsSlotAdFlight *)slotAdFlight; @end
Swift
protocol RichieSwiperSlotAdProvider : NSObjectProtocol
-
Protocol that represents a cancelable operation.
See moreDeclaration
Swift
public protocol Cancelable