JubeatPlus 3.9.11
Loading...
Searching...
No Matches
StoreDetailViewControllerV2.h
Go to the documentation of this file.
1
27
28#import <StoreKit/StoreKit.h>
29#import <UIKit/UIKit.h>
30
31#import "AlertViewManager.h"
32#import "Downloader.h"
33#import "ImageDownloader.h"
34
36@class StorePackInfo;
37
38NS_ASSUME_NONNULL_BEGIN
39
47@protocol StoreDetailViewControllerV2Delegate <NSObject>
48@optional
53- (void)detailViewStartPurchase:(nullable StoreDetailViewControllerV2 *)controller;
58- (void)detailViewStartRedownload:(nullable StoreDetailViewControllerV2 *)controller;
63- (void)detailViewStartExtendDownload:(nullable StorePackInfo *)packInfo;
64@end
65
72@protocol StoreDetailViewControllerV2CloseDelegate <NSObject>
73@optional
78@end
79
83@interface StoreDetailViewControllerV2 : UIViewController <UITableViewDataSource,
84 UITableViewDelegate,
88 SKProductsRequestDelegate,
89 SKStoreProductViewControllerDelegate>
90
96@property(nonatomic, strong, nullable) StorePackInfo *packInfo;
97
103@property(nonatomic, weak, nullable) id<StoreDetailViewControllerV2Delegate> delegate;
104
110@property(nonatomic, weak, nullable) id<StoreDetailViewControllerV2CloseDelegate> closeDelegate;
111
118@property(nonatomic) BOOL bRestore;
119
125- (instancetype)init;
126
133- (void)loadView;
134
140- (void)updatePurchaseState;
141
147- (void)showPackInfo;
148
154- (void)loadInfo;
155
160- (void)stopSample;
161
167- (void)finishBgm:(nullable NSNotification *)notification;
168
174- (void)doPurchase:(nullable id)sender;
175
182- (void)downloadExtendMusic:(nullable id)sender;
183
190- (void)storeDetailViewOpenItunesWithURL:(nullable NSURL *)url;
191
198- (void)productViewControllerDidFinish:(nonnull SKStoreProductViewController *)viewController;
199
207- (void)downloaderFinished:(nullable id)downloader;
208
215- (void)downloaderError:(nullable id)downloader;
216
222- (void)downloaderProceed:(nullable id)downloader;
223
231- (void)imageDownloader:(nonnull ImageDownloader *)downloader didLoad:(nullable id)key;
232
239- (void)alertSelect:(nonnull NSDictionary *)info;
240
246- (void)alertClose:(nonnull NSDictionary *)info;
247
253
258- (void)detailClose;
259
266- (void)tapRelationButton:(nullable id)sender;
267
276- (void)productsRequest:(nonnull SKProductsRequest *)request
277 didReceiveResponse:(nonnull SKProductsResponse *)response;
278
279@end
280
281NS_ASSUME_NONNULL_END
282
283// code: language=Objective-C
284// kate: hl Objective-C;
285// 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 store pack's detail screen (version 2).
Definition StoreDetailViewControllerV2.h:89
void updatePurchaseState()
Refreshes each header's purchase button title, colour, and enabled state, and shows or hides the exte...
Definition StoreDetailViewControllerV2.m:365
void stopSample()
Fades out the sample, drops the sample downloader, clears the playing row, and reloads.
Definition StoreDetailViewControllerV2.m:508
StorePackInfo * packInfo
The pack being displayed.
Definition StoreDetailViewControllerV2.h:96
void showPackInfo()
Installs the headers, refreshes the purchase state, starts the header artwork download,...
Definition StoreDetailViewControllerV2.m:450
BOOL bRestore
Whether the detail was reached through the restore flow, selecting the restore-pack-info endpoint ove...
Definition StoreDetailViewControllerV2.h:118
id< StoreDetailViewControllerV2Delegate > delegate
The action delegate for purchase, redownload, and extend-download.
Definition StoreDetailViewControllerV2.h:103
id< StoreDetailViewControllerV2CloseDelegate > closeDelegate
The delegate notified as the page closes its navigation.
Definition StoreDetailViewControllerV2.h:110
void detailClose()
Sends -detailClose to every cell that answers it so the rows can shut themselves.
Definition StoreDetailViewControllerV2.m:817
instancetype init()
Sets the navigation title and, where available, opts out of opaque-bar layout.
Definition StoreDetailViewControllerV2.m:166
void stopDownloadArtworks()
Cancels every in-flight artwork downloader, detaches its delegate, and empties the map.
Definition StoreDetailViewControllerV2.m:806
void loadInfo()
Shows the pack's detail: uses the already-loaded track list, or downloads it through a Downloader key...
Definition StoreDetailViewControllerV2.m:490
void loadView()
Builds the gradient-backed root view, the three tables (tune list, recommended-pack list,...
Definition StoreDetailViewControllerV2.m:178
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.