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

A gradient-backed board that resolves the pack owning a tune and reports the outcome. More...

#include <SearchPackIDView.h>

Inheritance diagram for SearchPackIDView:
Collaboration diagram for SearchPackIDView:

Instance Methods

(void) - createStoreBtn:
 A StoreButton factory helper.
(BOOL) - isBundleMusic:
 Whether a music id is a built-in bundle tune.
(instancetype) - initWithID:type:delegate:
 Builds the modal for the tune carried by a music object and starts the pack lookup.
(instancetype) - initWithTuneID:type:delegate:
 Builds the board, its label, the three buttons, and the spinner, then posts the lookup.
(void) - pushCancel:
 Cancel/Close button action: cancels the lookup and tells the delegate -packIDSearchCancel: .
(void) - startDownload
 Overlays the full-board progress label and starts the pack-lookup download.
(void) - downloaderError:
 DownloaderDelegate : the lookup failed; shows the failure message.
(void) - downloaderFinished:
 DownloaderDelegate : the lookup completed; parses the pack id and message, then reports end, not-found, or failure.
(void) - searchPackFailed
 Shows the download-failed message and retitles the button Close.
(void) - notFindPackID
 Shows the no-pack message, retitles the button Close, and tells the delegate -packIDSearchFailed: .
(nullable NSNumber *) - getPackID
 The pack id resolved by the lookup.
(nullable NSString *) - getRecommendString
 The recommend/message string the lookup returned.
Instance Methods inherited from <DownloaderDelegate>
(void) - downloaderProceed:
 Sent periodically as data arrives, and once more on completion.
(void) - downloaderFinished:
 Sent when the request completes.
(void) - downloaderError:
 Sent when the request fails.

Class Methods

(Class) + layerClass
 The layer class backing the board: a CAGradientLayer .

Detailed Description

A gradient-backed board that resolves the pack owning a tune and reports the outcome.

Method Documentation

◆ createStoreBtn:

- (void) createStoreBtn: (nullable id) sender

A StoreButton factory helper.

Builds a blue-green rounded StoreButton , but neither stores nor adds it: the binary discards the result, and the sender argument is ignored.

Parameters
senderIgnored.
Ghidra address:
0x114288

◆ downloaderError:

- (void) downloaderError: (nullable Downloader *) downloader

DownloaderDelegate : the lookup failed; shows the failure message.

Parameters
downloaderThe failed downloader.
Ghidra address:
0x115aa0

◆ downloaderFinished:

- (void) downloaderFinished: (nullable Downloader *) downloader

DownloaderDelegate : the lookup completed; parses the pack id and message, then reports end, not-found, or failure.

Parameters
downloaderThe finished downloader.
Ghidra address:
0x115ad8

◆ getPackID

- (NSNumber *) getPackID

The pack id resolved by the lookup.

Returns
The comprised-pack id, or nil when none was found.
Ghidra address:
0x115fd4
Ghidra address:
0x115fd4

◆ getRecommendString

- (NSString *) getRecommendString

The recommend/message string the lookup returned.

Returns
The "Message" text from the response, or nil.
Ghidra address:
0x115fe4
Ghidra address:
0x115fe4

◆ initWithID:type:delegate:

- (instancetype) initWithID: (nullable TuneInfo *) music
type: (nullable NSString *) type
delegate: (nullable id< SearchPackIDViewDelegate >) delegate 

Builds the modal for the tune carried by a music object and starts the pack lookup.

Forwards to -initWithTuneID:type:delegate: after reading the tune's -tuneID .

Parameters
musicThe tune whose -tuneID identifies it.
typeThe social service type, or nil for a plain pack lookup.
delegateThe object told the outcome; held weakly.
Returns
The initialised view.
Ghidra address:
0x1145d4

◆ initWithTuneID:type:delegate:

- (instancetype) initWithTuneID: (unsigned int) tuneID
type: (nullable NSString *) type
delegate: (nullable id< SearchPackIDViewDelegate >) delegate 

Builds the board, its label, the three buttons, and the spinner, then posts the lookup.

The board is 320 wide and 360 tall on a pad, and 300 square otherwise. The move-to-store (btnOK ) and end (btnEnd ) buttons start fully transparent, flanking the centre; the centred btnCancel is the visible one. The owned Downloader is built with a JSON POST to the recommend or pack-search endpoint but is not started here — -startDownload begins it.

Parameters
tuneIDThe tune id to search packs for.
typeThe social service type, or nil for a plain pack lookup.
delegateThe object told the outcome; held weakly.
Returns
The initialised view.
Ghidra address:
0x114684

◆ isBundleMusic:

- (BOOL) isBundleMusic: (int) musicID

Whether a music id is a built-in bundle tune.

True only when the app bundle carries a Music resource and the id appears in -[StoreMusicListManager builtinMusic] .

Parameters
musicIDThe music id to test.
Returns
YES if the tune ships with the app.
Ghidra address:
0x1143c0
Ghidra address:
0x1143c0

◆ layerClass

+ (Class) layerClass

The layer class backing the board: a CAGradientLayer .

Returns
The CAGradientLayer class.
Ghidra address:
0x114274
Ghidra address:
0x114274

◆ notFindPackID

- (void) notFindPackID

Shows the no-pack message, retitles the button Close, and tells the delegate -packIDSearchFailed: .

Ghidra address:
0x115e14

◆ pushCancel:

- (void) pushCancel: (nullable id) sender

Cancel/Close button action: cancels the lookup and tells the delegate -packIDSearchCancel: .

Parameters
senderThe button.
Ghidra address:
0x115830

◆ searchPackFailed

- (void) searchPackFailed

Shows the download-failed message and retitles the button Close.

Ghidra address:
0x115cd4

◆ startDownload

- (void) startDownload

Overlays the full-board progress label and starts the pack-lookup download.

Ghidra address:
0x1158f0

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