JubeatPlus 3.9.11
Loading...
Searching...
No Matches
StorePackDetailView Class Reference

A downloaded pack's detail card. More...

#include <StorePackDetailView.h>

Inheritance diagram for StorePackDetailView:
Collaboration diagram for StorePackDetailView:

Instance Methods

(instancetype) - initWithFrame:
 Builds the card: the pack background, the pack artwork, the name and comment labels, the copyright text view, the link button, the purchase button, the extend-download button, the scrolling tune list with its four seed tune views, the loading label, and the activity indicator.
(void) - removePackInfo
 Clears the pack and returns every subview to its empty state, and unsubscribes from the BGM finish notification.
(void) - cancelLoading
 Cancels the in-flight info download, if any.
(void) - stopSample
 Stops the sample tune: fades out the BGM, drops the sample downloader, resets every tune view, and clears the playing-row marker.
(void) - updatePurchaseState
 Refreshes the purchase button's colour, title, and enabled state, and shows or hides the extend-download button, from the pack's purchase state.
(void) - showPackInfo
 Populates the card from the loaded pack: sizes the tune list, fills the labels and artwork, lays out the link button, starts the artwork downloads, and subscribes to the BGM finish notification.
(void) - loadInfo
 Loads the pack detail: shows it directly when the track list is already present, otherwise starts the info download for the pack.
(void) - loadRestoreInfo
 Loads the pack detail for a restore: like -loadInfo but fetches the restore endpoint.
(void) - doPurchase:
 Purchase-button tap: stops the sample, then asks the delegate to start a redownload or a purchase depending on the pack's ownership.
(void) - downloadExtendMusic:
 Extend-download-button tap: stops the sample, hides the button, and asks the delegate to start the extend download.
(void) - handleLink:
 Link-button tap: builds the jump URL and raises a confirmation alert.
(void) - handleSample:
 Sample-button tap: toggles the tapped tune's preview.
(void) - finishBgm:
 BGM-finish notification handler: resets every tune view and clears the playing-row marker.
(void) - downloaderFinished:
 Downloader completion: parses the pack detail on the info download, or loads and plays the preview on the sample download.
(void) - downloaderError:
 Downloader failure: raises a network-error alert for the info or sample download.
(void) - downloaderProceed:
 Downloader progress.
(void) - alertSelect:
 Alert-button delegate: on the server-error alert closes the card; on the link alert opens iTunes with the jump URL when the confirm button was tapped.
(void) - alertClose:
 Alert-dismiss delegate: on the server-error alert tells the owning controller to close.
(void) - detailClose
 Closes any presented alert.

Properties

StorePackInfo * packInfo
 The pack being shown.
id< StoreDetailViewControllerDelegate > delegate
 The card's delegate, told when to start a purchase, redownload, or extend download.
UIViewController * viewController
 The controller that owns this card, messaged to close the card and to open iTunes.

Detailed Description

A downloaded pack's detail card.

Method Documentation

◆ alertClose:

- (void) alertClose: (nonnull NSDictionary *) info

Alert-dismiss delegate: on the server-error alert tells the owning controller to close.

Parameters
infoThe alert result dictionary.
Ghidra address:
0xb4c54

Reimplemented from <AlertViewManagerDelegate>.

◆ alertSelect:

- (void) alertSelect: (nonnull NSDictionary *) info

Alert-button delegate: on the server-error alert closes the card; on the link alert opens iTunes with the jump URL when the confirm button was tapped.

Parameters
infoThe alert result dictionary.
Ghidra address:
0xb4a68

Reimplemented from <AlertViewManagerDelegate>.

◆ cancelLoading

- (void) cancelLoading

Cancels the in-flight info download, if any.

Ghidra address:
0xb1b3c

◆ detailClose

- (void) detailClose

Closes any presented alert.

Ghidra address:
0xb4d50

◆ doPurchase:

- (void) doPurchase: (nullable id) sender

Purchase-button tap: stops the sample, then asks the delegate to start a redownload or a purchase depending on the pack's ownership.

Parameters
senderThe purchase button.
Ghidra address:
0xb34b8

◆ downloaderError:

- (void) downloaderError: (id) downloader

Downloader failure: raises a network-error alert for the info or sample download.

Parameters
downloaderThe failed request.
Ghidra address:
0xb4684
Ghidra address:
0xb4684

Reimplemented from <DownloaderDelegate>.

◆ downloaderFinished:

- (void) downloaderFinished: (id) downloader

Downloader completion: parses the pack detail on the info download, or loads and plays the preview on the sample download.

Parameters
downloaderThe finished request.
Ghidra address:
0xb42e0
Ghidra address:
0xb42e0

Reimplemented from <DownloaderDelegate>.

◆ downloaderProceed:

- (void) downloaderProceed: (id) downloader

Downloader progress.

The shipped body is empty.

Parameters
downloaderThe request.
Ghidra address:
0xb4a64
Ghidra address:
0xb4a64

Reimplemented from <DownloaderDelegate>.

◆ downloadExtendMusic:

- (void) downloadExtendMusic: (nullable id) sender

Extend-download-button tap: stops the sample, hides the button, and asks the delegate to start the extend download.

Parameters
senderThe extend-download button.
Ghidra address:
0xb3614

◆ finishBgm:

- (void) finishBgm: (nullable NSNotification *) notification

BGM-finish notification handler: resets every tune view and clears the playing-row marker.

Parameters
notificationThe notification.
Ghidra address:
0xb41a8

◆ handleLink:

- (void) handleLink: (nullable id) sender

Link-button tap: builds the jump URL and raises a confirmation alert.

The pack-level link button confirms opening the related site in Safari; a tune's link button confirms opening the iTunes Store.

Parameters
senderThe tapped link button.
Ghidra address:
0xb371c

◆ handleSample:

- (void) handleSample: (nullable id) sender

Sample-button tap: toggles the tapped tune's preview.

Stops it if already playing, otherwise stops any other playing tune and starts downloading the tapped tune's preview.

Parameters
senderThe tapped sample button.
Ghidra address:
0xb3d58

◆ initWithFrame:

- (instancetype) initWithFrame: (CGRect) frame

Builds the card: the pack background, the pack artwork, the name and comment labels, the copyright text view, the link button, the purchase button, the extend-download button, the scrolling tune list with its four seed tune views, the loading label, and the activity indicator.

Parameters
frameThe card's frame.
Returns
The initialised card.
Ghidra address:
0xb03c0
Ghidra address:
0xb03c0

◆ loadInfo

- (void) loadInfo

Loads the pack detail: shows it directly when the track list is already present, otherwise starts the info download for the pack.

Ghidra address:
0xb3080

◆ loadRestoreInfo

- (void) loadRestoreInfo

Loads the pack detail for a restore: like -loadInfo but fetches the restore endpoint.

Ghidra address:
0xb329c

◆ removePackInfo

- (void) removePackInfo

Clears the pack and returns every subview to its empty state, and unsubscribes from the BGM finish notification.

Ghidra address:
0xb17fc

◆ showPackInfo

- (void) showPackInfo

Populates the card from the loaded pack: sizes the tune list, fills the labels and artwork, lays out the link button, starts the artwork downloads, and subscribes to the BGM finish notification.

Runs once, guarded by the loaded flag.

Ghidra address:
0xb2374
Ghidra address:
0xb2374
Ghidra address:
0xb2e34
Ghidra address:
0xb2e7c
Ghidra address:
0xb2f14
Ghidra address:
0xb3038

◆ stopSample

- (void) stopSample

Stops the sample tune: fades out the BGM, drops the sample downloader, resets every tune view, and clears the playing-row marker.

Ghidra address:
0xb1b88

◆ updatePurchaseState

- (void) updatePurchaseState

Refreshes the purchase button's colour, title, and enabled state, and shows or hides the extend-download button, from the pack's purchase state.

Ghidra address:
0xb1d10

Property Documentation

◆ delegate

- (id<StoreDetailViewControllerDelegate>) delegate
readwritenonatomicweak

The card's delegate, told when to start a purchase, redownload, or extend download.

Held weakly.

Ghidra address:
0xb4e74 (getter)
Ghidra address:
0xb4e94 (setter)

◆ packInfo

- (StorePackInfo*) packInfo
readwritenonatomicstrong

The pack being shown.

Ghidra address:
0xb4e50 (getter)
Ghidra address:
0xb4e60 (setter)

◆ viewController

- (UIViewController*) viewController
readwritenonatomicweak

The controller that owns this card, messaged to close the card and to open iTunes.

Held weakly.

Ghidra address:
0xb4ea8 (getter)
Ghidra address:
0xb4ec8 (setter)

The documentation for this class was generated from the following files: