JubeatPlus 3.9.11
Loading...
Searching...
No Matches
StoreDetailViewController.h
Go to the documentation of this file.
1
21
22#import <StoreKit/StoreKit.h>
23#import <UIKit/UIKit.h>
24
25#import "AlertViewManager.h"
26#import "Downloader.h"
27#import "ImageDownloader.h"
28
30@class StoreLoadingView;
31@class StorePackInfo;
32
33NS_ASSUME_NONNULL_BEGIN
34
41@protocol StoreDetailViewControllerDelegate <NSObject>
42@optional
47- (void)detailViewStartPurchase:(nullable StorePackInfo *)packInfo;
52- (void)detailViewStartRedownload:(nullable StorePackInfo *)packInfo;
57- (void)detailViewStartExtendDownload:(nullable StorePackInfo *)packInfo;
58@end
59
66@protocol StoreDetailViewControllerCloseDelegate <NSObject>
67@optional
72@end
73
77@interface StoreDetailViewController : UIViewController <UITableViewDataSource,
78 UITableViewDelegate,
82 SKStoreProductViewControllerDelegate>
83
89@property(nonatomic, strong, nullable) StorePackInfo *packInfo;
90
96@property(nonatomic, weak, nullable) id<StoreDetailViewControllerDelegate> delegate;
97
103@property(nonatomic, weak, nullable) id<StoreDetailViewControllerCloseDelegate> closeDelegate;
104
111@property(nonatomic) BOOL bRestore;
112
118- (instancetype)init;
119
125- (void)loadView;
126
132- (void)updatePurchaseState;
133
139- (void)showPackInfo;
140
146- (void)loadInfo;
147
152- (void)stopSample;
153
159- (void)finishBgm:(nullable NSNotification *)notification;
160
166- (void)doPurchase:(nullable id)sender;
167
173- (void)downloadExtendMusic:(nullable id)sender;
174
181- (void)storeDetailViewOpenItunesWithURL:(nullable NSURL *)url;
182
189- (void)productViewControllerDidFinish:(nonnull SKStoreProductViewController *)viewController;
190
197- (void)downloaderFinished:(nullable id)downloader;
198
205- (void)downloaderError:(nullable id)downloader;
206
212- (void)downloaderProceed:(nullable id)downloader;
213
221- (void)imageDownloader:(nonnull ImageDownloader *)downloader didLoad:(nullable id)key;
222
229- (void)alertSelect:(nonnull NSDictionary *)info;
230
236- (void)alertClose:(nonnull NSDictionary *)info;
237
243
248- (void)detailClose;
249
250@end
251
252NS_ASSUME_NONNULL_END
253
254// code: language=Objective-C
255// kate: hl Objective-C;
256// vim: set ft=objc :
A shared alert presenter that hides the UIAlertController/UIAlertView split behind one API.
The HTTP client.
A one-shot NSURLSession image downloader keyed for a cache.
Downloads one image over an NSURLSession and reports it to a delegate.
Definition ImageDownloader.h:33
A pack's detail header: artwork with its reflection, name, comment, purchase and extend buttons,...
Definition StoreDetailHeaderView.h:23
A store pack's detail screen.
Definition StoreDetailViewController.h:82
id< StoreDetailViewControllerDelegate > delegate
The action delegate for purchase, redownload, and extend-download.
Definition StoreDetailViewController.h:96
void loadInfo()
Shows the pack's detail: uses the already-loaded track list, or downloads it through a Downloader key...
Definition StoreDetailViewController.m:374
void stopSample()
Fades out the sample, drops the sample downloader, clears the playing row, and reloads.
Definition StoreDetailViewController.m:392
void stopDownloadArtworks()
Cancels every in-flight artwork downloader, detaches its delegate, and empties the map.
Definition StoreDetailViewController.m:600
void loadView()
Builds the gradient-backed root view, the detail table, the header, the loading overlay,...
Definition StoreDetailViewController.m:142
BOOL bRestore
Whether the detail was reached through the restore flow, selecting the restore-pack-info endpoint ove...
Definition StoreDetailViewController.h:111
instancetype init()
Sets the navigation title and, where available, opts out of opaque-bar layout.
Definition StoreDetailViewController.m:130
StorePackInfo * packInfo
The pack being displayed.
Definition StoreDetailViewController.h:89
void showPackInfo()
Installs the header, refreshes the purchase state, starts the header artwork download,...
Definition StoreDetailViewController.m:353
void updatePurchaseState()
Refreshes the purchase button's title, colour, and enabled state, and shows or hides the extend-downl...
Definition StoreDetailViewController.m:287
id< StoreDetailViewControllerCloseDelegate > closeDelegate
The delegate notified as the page closes its navigation.
Definition StoreDetailViewController.h:103
void detailClose()
Sends -detailClose to every cell that answers it so the rows can shut themselves.
Definition StoreDetailViewController.m:611
A spinner with a caption, swapped for a message when something fails.
Definition StoreLoadingView.h:23
A pack's identity, name, price, store flags, and track list.
Definition StorePackInfo.h:18
The optional delegate of AlertViewManager.
Definition AlertViewManager.h:18
Performs a single HTTP request.
Definition Downloader.h:30
Told when an ImageDownloader finishes loading its image.
Definition ImageDownloader.h:21
void detailViewCloseNavigation()
Sent as the page is being dismissed so the owner can tear down its navigation.