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

A CAGradientLayer -backed licence-agreement sheet. More...

#include <LicenseAgreementView.h>

Inheritance diagram for LicenseAgreementView:
Collaboration diagram for LicenseAgreementView:

Instance Methods

(instancetype) - init:keyString:
 Designated initialiser: builds the board and starts the licence-date download.
(BOOL) - enablePadScale:
 Reports whether the given key participates in the pad-scaled layout.
(BOOL) - checkLicenseUpdate:currentDate:
 Reports whether the licence stored under the key predates the downloaded current date.
(void) - createLicenseBoard:
 Builds the gradient board, heading, scrollable policy text, and the two buttons.
(void) - displayMessage:
 Empty in the shipped binary.
(void) - sendErrorDelegate:
 Routes a download error message to the delegate's agreementError:msgStr: .
(void) - jubeatLabAccessProceed:
 jubeatLabAccess callback for download progress.
(void) - jubeatLabAccessError:
 jubeatLabAccess callback for a failed download; reports the error to the delegate.
(void) - jubeatLabAccessFinished:
 jubeatLabAccess callback for a finished download; parses the response and drives the flow.
(void) - downloaderFinished:
 Downloader callback for a finished download; parses the store or challenge response.
(void) - downloaderError:
 Downloader callback for a failed download; reports the error to the delegate.
(void) - downloaderProceed:
 Downloader callback for download progress.
(void) - pushAgree:
 Persists the agreed date and fades the board out, then notifies the delegate.
(void) - pushDisAgree:
 Notifies the delegate that the user declined.
(void) - scrollViewDidScroll:
 Enables the Agree button once the policy text is scrolled to the bottom.
(void) - scrollViewDidEndDragging:willDecelerate:
 Enables the Agree button when dragging ends at the bottom of the policy text.
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, so the view is backed by a CAGradientLayer .

Properties

UIView * weakCoverView
 The view that is dimmed behind the sheet.

Detailed Description

A CAGradientLayer -backed licence-agreement sheet.

Downloads the current licence date and message (through jubeatLabAccess , a Downloader , or a SessionDownloader depending on the preference key), presents the licence text in a scrollable UITextView with Agree and Disagree buttons, and records the agreed date against the key in NSUserDefaults . The Agree button becomes enabled only once the user scrolls the policy text to the bottom.

Method Documentation

◆ checkLicenseUpdate:currentDate:

- (BOOL) checkLicenseUpdate: (nullable NSString *) agreedDate
currentDate: (nullable NSString *) currentDate 

Reports whether the licence stored under the key predates the downloaded current date.

Parameters
agreedDateThe date last agreed to, or nil when nothing has been agreed.
currentDateThe current licence date from the server.
Returns
YES when no date has been agreed or the agreed date is earlier than currentDate .
Ghidra address:
0x1f64c8

◆ createLicenseBoard:

- (void) createLicenseBoard: (nullable NSString *) message

Builds the gradient board, heading, scrollable policy text, and the two buttons.

Parameters
messageThe licence policy text.
Ghidra address:
0x1f6604

◆ displayMessage:

- (void) displayMessage: (nullable NSString *) message

Empty in the shipped binary.

Parameters
messageThe message that would be displayed.
Ghidra address:
0x1f6600

◆ downloaderError:

- (void) downloaderError: (nullable id) downloader

Downloader callback for a failed download; reports the error to the delegate.

Parameters
downloaderThe download that failed.
Ghidra address:
0x1f64b4

◆ downloaderFinished:

- (void) downloaderFinished: (nullable id) downloader

Downloader callback for a finished download; parses the store or challenge response.

Parameters
downloaderThe download that finished.
Ghidra address:
0x1f5cd0

◆ downloaderProceed:

- (void) downloaderProceed: (nullable id) downloader

Downloader callback for download progress.

Empty in the shipped binary.

Parameters
downloaderThe download in progress.
Ghidra address:
0x1f64c4

◆ enablePadScale:

- (BOOL) enablePadScale: (nullable NSString *) key

Reports whether the given key participates in the pad-scaled layout.

Parameters
keyThe defaults key.
Returns
YES for the title, store, and challenge licence keys.
Ghidra address:
0x1f51ec

◆ init:keyString:

- (instancetype) init: (nullable id) delegate
keyString: (nullable NSString *) keyString 

Designated initialiser: builds the board and starts the licence-date download.

Stores delegate weakly and keyString as the defaults key, defaults the pad scale to 1.0 (raising it to 1.5 when running on a pad and the key is pad-scaled), then dispatches on the key: PrefAgreeLicenseVersion starts a jubeatLabAccess licence-version download; PrefTitleAgreeLicenseVersion compares the stored agreed date against the app delegate's current licence date and either notifies the delegate or builds the board; PrefStoreAgreeLicenseVersion starts a store-policy Downloader ; and PrefAgreeChallengePolicyVersion starts a challenge-policy SessionDownloader .

Parameters
delegateThe object notified of the agreement outcome. Held weakly.
keyStringThe NSUserDefaults key recording the agreed licence date.
Returns
The initialised view.
Ghidra address:
0x1f528c

◆ jubeatLabAccessError:

- (void) jubeatLabAccessError: (nullable id) access

jubeatLabAccess callback for a failed download; reports the error to the delegate.

Parameters
accessThe licence-access client.
Ghidra address:
0x1f59d4

◆ jubeatLabAccessFinished:

- (void) jubeatLabAccessFinished: (nullable id) access

jubeatLabAccess callback for a finished download; parses the response and drives the flow.

Parameters
accessThe licence-access client.
Ghidra address:
0x1f59e4

◆ jubeatLabAccessProceed:

- (void) jubeatLabAccessProceed: (nullable id) access

jubeatLabAccess callback for download progress.

Empty in the shipped binary.

Parameters
accessThe licence-access client.
Ghidra address:
0x1f59d0

◆ layerClass

+ (Class) layerClass

The layer class, so the view is backed by a CAGradientLayer .

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

◆ pushAgree:

- (void) pushAgree: (nullable id) sender

Persists the agreed date and fades the board out, then notifies the delegate.

Parameters
senderThe Agree button.
Ghidra address:
0x1f76c4

◆ pushDisAgree:

- (void) pushDisAgree: (nullable id) sender

Notifies the delegate that the user declined.

Parameters
senderThe Disagree button.
Ghidra address:
0x1f78b0

◆ scrollViewDidEndDragging:willDecelerate:

- (void) scrollViewDidEndDragging: (UIScrollView *) scrollView
willDecelerate: (BOOL) decelerate 

Enables the Agree button when dragging ends at the bottom of the policy text.

Parameters
scrollViewThe scrolling licence text view.
decelerateWhether scrolling will continue to decelerate.
Ghidra address:
0x1f75e0
Ghidra address:
0x1f75e0

◆ scrollViewDidScroll:

- (void) scrollViewDidScroll: (UIScrollView *) scrollView

Enables the Agree button once the policy text is scrolled to the bottom.

Parameters
scrollViewThe scrolling licence text view.
Ghidra address:
0x1f74fc
Ghidra address:
0x1f74fc

◆ sendErrorDelegate:

- (void) sendErrorDelegate: (nullable NSString *) msgStr

Routes a download error message to the delegate's agreementError:msgStr: .

Parameters
msgStrThe error message, or nil.
Ghidra address:
0x1f5928

Property Documentation

◆ weakCoverView

- (UIView*) weakCoverView
readwritenonatomicweak

The view that is dimmed behind the sheet.

Ghidra address:
0x1f7954 (getter), 0x1f7974 (setter).

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