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

The recommend network's advert-data model store. More...

#include <RecommendAdData.h>

Inheritance diagram for RecommendAdData:
Collaboration diagram for RecommendAdData:

Class Methods

(nullable NSArray *) + getBannerDisplayStatusList
 The archived banner-display-status list.
(nullable NSArray *) + getAdModelSettingList
 The archived advert-model setting list.
(nullable NSArray *) + getAdList
 The archived advert list.
(nullable NSArray *) + getSelfList
 The archived self-advert list.
(nullable NSData *) + getResponseNsData
 The raw network response data cached under the ApplilinkNetwork.responseNsData key.
(nullable NSDictionary *) + getInterstitialSpecList
 The archived interstitial-specification dictionary.
(int) + getAdStatusByAdModel:
 The cached advert status for an advert model.
(nullable NSArray *) + getAdDataByAdId:
 The advert-data records for an advert identifier.
(nullable NSDictionary *) + getAdDataList:adType:
 The first record of a list whose ad_type equals a value.
(nullable NSDictionary *) + getAdDataWithAppliId:
 The advert-data record for an application identifier.
(nullable NSArray *) + getAdListByAdType:
 The advert list narrowed to a single advert type.
(nullable NSArray *) + getAppBannerList
 The application-banner records for the lottery banner.
(nullable NSArray *) + getAppIconList
 The application-icon records for the lottery icons.
(nullable NSArray *) + getAppInterstitialList:
 The application-interstitial records for the lottery interstitial.
(nullable NSDictionary *) + getLotteryBannerData
 Draw a lottery banner record.
(nullable NSArray *) + getLotteryIconData
 Draw up to four lottery icon records.
(nullable NSDictionary *) + getLotteryInterstitialDataForMovie:
 Draw a lottery interstitial record.
(nullable NSDictionary *) + getLotteryInterstitialDataWithList:
 Draw one record from a priority-weighted list.
(nullable NSArray *) + getInterstitialSpecPriorityList
 The interstitial display-specification list sorted by descending priority.
(nullable NSArray *) + getInterstitialSpecCountForAdDisplaySpecList:
 Filter a display-specification list by remaining display count.
(nullable NSArray *) + getInterstitialSpecInstallForAdDisplaySpecList:movieFlg:
 Filter a display-specification list by install state, movie capability, and display term.
(BOOL) + checkMovieWithAdData:
 Whether an advert-data record describes a movie creative.
(nullable NSArray *) + getAdInterstitialUrlListTermForAdDisplaySpecList:
 The interstitial advert records for a display-specification list.
(nullable NSArray *) + getPosterUrlList
 The de-duplicated poster-rectangle records for every movie advert.
(nullable NSArray *) + getAdInterstitialUrlListTermForList:
 The de-duplicated interstitial banner URLs of a list.
(nullable NSArray *) + getMovieUrlList
 The de-duplicated movie URLs decoded from every advert's movie_url_list.
(nullable NSDictionary *) + getAdDisplayCountDailyDictionary
 The archived daily advert-display-count dictionary, valid only for today.
(nullable NSDictionary *) + getAdDisplayCountTotalDictionary
 The archived total advert-display-count dictionary.
(int) + getAdTypeWithAdModel:adLocation:
 The advert type for an advert model at an ad location.
(nullable NSArray *) + getAdListTermForList:
 Filter a list to the records still within their display term.
(nullable NSArray *) + getAdBannerListForList:
 The de-duplicated banner URLs of a list, gathered from each record's banner_url_list.
(nullable NSArray *) + shuffled:
 A randomly shuffled copy of a list.
(nullable NSError *) + lotteryInterstitialWithAdLocation:
 Run the interstitial-display frequency lottery for an ad location.
(nullable NSString *) + getInstallFlgWithAdData:
 The install-flag string for an advert-data record.
(nullable NSDictionary *) + getMovieAdData:
 The debug movie advert-data record for a movie URL.

Detailed Description

The recommend network's advert-data model store.

Method Documentation

◆ checkMovieWithAdData:

+ (BOOL) checkMovieWithAdData: (nullable NSDictionary *) adData

Whether an advert-data record describes a movie creative.

The record is a movie when its external_ad_disp_mng.ad_content_kind equals the movie kind and it carries a non-empty movie_url.

Parameters
adDataThe advert-data record.
Returns
YES when the record is a playable movie creative.
Ghidra address:
0x25a860

◆ getAdBannerListForList:

+ (nullable NSArray *) getAdBannerListForList: (nullable NSArray *) list

The de-duplicated banner URLs of a list, gathered from each record's banner_url_list.

Parameters
listThe advert records to gather from.
Returns
The non-empty banner_url_list entries.
Ghidra address:
0x25c38c

◆ getAdDataByAdId:

+ (NSArray *) getAdDataByAdId: (int) adId

The advert-data records for an advert identifier.

Narrows the advert list to the records whose ad_id equals adId.

Parameters
adIdThe advert identifier.
Returns
The narrowed advert records, or nil when the list is empty.
Ghidra address:
0x257c14

◆ getAdDataList:adType:

+ (nullable NSDictionary *) getAdDataList: (nullable NSArray *) list
adType: (int) adType 

The first record of a list whose ad_type equals a value.

Parameters
listThe advert records to search.
adTypeThe advert-type identifier.
Returns
The first matching record, or nil.
Ghidra address:
0x257d0c

◆ getAdDataWithAppliId:

+ (nullable NSDictionary *) getAdDataWithAppliId: (nullable NSString *) appliId

The advert-data record for an application identifier.

Narrows the advert list to the records whose appli_id equals appliId, preferring a record whose primary_flg is set, and returns that record.

Parameters
appliIdThe advert application identifier.
Returns
The advert-data record, or nil.
Ghidra address:
0x257ee0

◆ getAdDisplayCountDailyDictionary

+ (NSDictionary *) getAdDisplayCountDailyDictionary

The archived daily advert-display-count dictionary, valid only for today.

Unarchives the adDisplayCountDaily blob and returns it only when its recorded adDisplayDate matches the current day; otherwise nil.

Returns
The daily display-count dictionary, or nil.
Ghidra address:
0x25ba64

◆ getAdDisplayCountTotalDictionary

+ (NSDictionary *) getAdDisplayCountTotalDictionary

The archived total advert-display-count dictionary.

Returns
The total display-count dictionary, or nil.
Ghidra address:
0x25bc60

◆ getAdInterstitialUrlListTermForAdDisplaySpecList:

+ (nullable NSArray *) getAdInterstitialUrlListTermForAdDisplaySpecList: (nullable NSArray *) list

The interstitial advert records for a display-specification list.

Resolves each entry's advert data by ad_id_to, narrows it to the interstitial advert type, keeps the records that carry a non-empty interstitial_banner_url, and de-duplicates them.

Parameters
listThe ad_display_spec entries.
Returns
The de-duplicated interstitial advert records.
Ghidra address:
0x25aa08

◆ getAdInterstitialUrlListTermForList:

+ (nullable NSArray *) getAdInterstitialUrlListTermForList: (nullable NSArray *) list

The de-duplicated interstitial banner URLs of a list.

Parameters
listThe advert records to gather from.
Returns
The non-empty interstitial_banner_url_list entries, de-duplicated.
Ghidra address:
0x25b21c

◆ getAdList

+ (NSArray *) getAdList

The archived advert list.

Unarchived from the ApplilinkRecommend.allAdData blob under its list key.

Returns
The advert records, or nil.
Ghidra address:
0x257730

◆ getAdListByAdType:

+ (NSArray *) getAdListByAdType: (int) adType

The advert list narrowed to a single advert type.

Parameters
adTypeThe advert-type identifier.
Returns
The advert records whose ad_type equals adType.
Ghidra address:
0x258144

◆ getAdListTermForList:

+ (nullable NSArray *) getAdListTermForList: (nullable NSArray *) list

Filter a list to the records still within their display term.

Keeps the records whose external_ad_disp_mng.end_date is at or after the current time.

Parameters
listThe advert records to filter.
Returns
The records still within their display term.
Ghidra address:
0x25c008

◆ getAdModelSettingList

+ (NSArray *) getAdModelSettingList

The archived advert-model setting list.

In debug mode the list comes from RecommendDebug; otherwise it is unarchived from the ApplilinkRecommend.allAdData blob under its ad_model_setting_list key.

Returns
The advert-model setting records, or nil.
Ghidra address:
0x257604

◆ getAdStatusByAdModel:

+ (int) getAdStatusByAdModel: (int) adModel

The cached advert status for an advert model.

Looks the advert model up in the banner-display-status list and returns its status value.

Parameters
adModelThe advert-model identifier.
Returns
The advert status value, or zero when the model is absent or malformed.
Ghidra address:
0x257a58

◆ getAdTypeWithAdModel:adLocation:

+ (int) getAdTypeWithAdModel: (int) adModel
adLocation: (nullable NSString *) adLocation 

The advert type for an advert model at an ad location.

Searches the advert-model setting list for the entry matching adLocation and adModel and returns its ad_type value, defaulting to the app-banner type when there is no match.

Parameters
adModelThe advert-model identifier.
adLocationThe ad-location identifier.
Returns
The advert-type identifier.
Ghidra address:
0x25bd10

◆ getAppBannerList

+ (NSArray *) getAppBannerList

The application-banner records for the lottery banner.

Draws a lottery banner, resolves its cached banner_url (picked at random from banner_url_list) to the on-disk banner-cache path, and records the creative identifier and install flag.

Returns
An array with the single resolved banner record, or nil.
Ghidra address:
0x258208

◆ getAppIconList

+ (NSArray *) getAppIconList

The application-icon records for the lottery icons.

Resolves each drawn lottery-icon banner_icon_url (picked at random from banner_icon_url_list) to its cached file name and records the creative identifier and install flag.

Returns
The resolved icon records.
Ghidra address:
0x258780

◆ getAppInterstitialList:

+ (NSArray *) getAppInterstitialList: (BOOL) movieFlg

The application-interstitial records for the lottery interstitial.

Draws a lottery interstitial, and for a movie creative resolves the movie and poster URLs, otherwise resolves the interstitial banner. The resolved creative is copied to the on-disk banner-cache path, the creative identifier is recorded, and the install-flag string is attached.

Parameters
movieFlgWhether only movie-capable interstitials are eligible.
Returns
An array with the single resolved interstitial record, or nil.
Ghidra address:
0x258cbc

◆ getBannerDisplayStatusList

+ (NSArray *) getBannerDisplayStatusList

The archived banner-display-status list.

In debug mode the list comes from RecommendDebug; otherwise it is unarchived from the ApplilinkRecommend.allAdData blob under its banner_display_status_list key.

Returns
The banner-display-status records, or nil.
Ghidra address:
0x2574d8

◆ getInstallFlgWithAdData:

+ (nullable NSString *) getInstallFlgWithAdData: (nullable NSDictionary *) adData

The install-flag string for an advert-data record.

Returns "1" when the record's install_flg is already set, or when the record's default_scheme URL can be opened by the device; otherwise "0".

Parameters
adDataThe advert-data record.
Returns
"1" or "0".
Ghidra address:
0x25cfec

◆ getInterstitialSpecCountForAdDisplaySpecList:

+ (nullable NSArray *) getInterstitialSpecCountForAdDisplaySpecList: (nullable NSArray *) list

Filter a display-specification list by remaining display count.

Keeps the entries whose recorded daily and total display counts are still below their max_display_count_daily and max_display_count_total limits.

Parameters
listThe ad_display_spec entries to filter.
Returns
The entries that may still be displayed.
Ghidra address:
0x259b70

◆ getInterstitialSpecInstallForAdDisplaySpecList:movieFlg:

+ (nullable NSArray *) getInterstitialSpecInstallForAdDisplaySpecList: (nullable NSArray *) list
movieFlg: (BOOL) movieFlg 

Filter a display-specification list by install state, movie capability, and display term.

Keeps the entries whose advert is installed (or whose install is not required), which are movie capable when movieFlg is set, and whose display term has not expired, carrying the priority through to each surviving record.

Parameters
listThe ad_display_spec entries to filter.
movieFlgWhether only movie-capable interstitials are eligible.
Returns
The entries that may still be displayed.
Ghidra address:
0x25a0bc

◆ getInterstitialSpecList

+ (NSDictionary *) getInterstitialSpecList

The archived interstitial-specification dictionary.

Unarchived from the ApplilinkRecommend.allAdData blob under its interstitial_spec_list key.

Returns
The interstitial-specification dictionary, or nil.
Ghidra address:
0x25797c

◆ getInterstitialSpecPriorityList

+ (NSArray *) getInterstitialSpecPriorityList

The interstitial display-specification list sorted by descending priority.

Returns
The ad_display_spec entries sorted by priority.
Ghidra address:
0x259a60

◆ getLotteryBannerData

+ (NSDictionary *) getLotteryBannerData

Draw a lottery banner record.

Filters the banner-type adverts to the ones still within their display term, then picks one uniformly at random.

Returns
The drawn banner record, or nil.
Ghidra address:
0x259420

◆ getLotteryIconData

+ (NSArray *) getLotteryIconData

Draw up to four lottery icon records.

Filters the icon-type adverts to the ones still within their display term, shuffles them, and returns the first four (or fewer).

Returns
The drawn icon records, or nil.
Ghidra address:
0x25951c

◆ getLotteryInterstitialDataForMovie:

+ (NSDictionary *) getLotteryInterstitialDataForMovie: (BOOL) movieFlg

Draw a lottery interstitial record.

Reduces the interstitial display-specification list to the entries whose daily and total display counts, install state, and movie capability still allow a display, then draws one weighted by priority.

Parameters
movieFlgWhether only movie-capable interstitials are eligible.
Returns
The drawn interstitial record, or nil.
Ghidra address:
0x259678

◆ getLotteryInterstitialDataWithList:

+ (nullable NSDictionary *) getLotteryInterstitialDataWithList: (nullable NSArray *) list

Draw one record from a priority-weighted list.

Sums every record's priority, draws a value in that range, and returns the record whose cumulative priority window contains the draw.

Parameters
listThe candidate records, each carrying a priority.
Returns
The drawn record, or nil.
Ghidra address:
0x2597cc

◆ getMovieAdData:

+ (nullable NSDictionary *) getMovieAdData: (nullable NSString *) movieUrl

The debug movie advert-data record for a movie URL.

Searches movieList (RecommendDebug) for the record whose movie_url equals movieUrl, copies it, and attaches the install-flag string.

Parameters
movieUrlThe movie URL to match.
Returns
The movie advert-data record, or nil.
Ghidra address:
0x25d284

◆ getMovieUrlList

+ (NSArray *) getMovieUrlList

The de-duplicated movie URLs decoded from every advert's movie_url_list.

Strips the applilink://ext-app:80/movie? prefix, URL-decodes the payload, splits it on &, strips the movie_url= prefix from each field, URL-decodes it, and keeps the non-empty results.

Returns
The decoded movie URLs, de-duplicated.
Ghidra address:
0x25b558

◆ getPosterUrlList

+ (NSArray *) getPosterUrlList

The de-duplicated poster-rectangle records for every movie advert.

Returns
The poster_url_rect_list entries of the movie adverts, de-duplicated.
Ghidra address:
0x25ae10

◆ getResponseNsData

+ (NSData *) getResponseNsData

The raw network response data cached under the ApplilinkNetwork.responseNsData key.

Returns
The cached response object, or nil.
Ghidra address:
0x2578e8

◆ getSelfList

+ (NSArray *) getSelfList

The archived self-advert list.

Unarchived from the ApplilinkRecommend.allAdData blob under its self key.

Returns
The self-advert records, or nil.
Ghidra address:
0x25780c

◆ lotteryInterstitialWithAdLocation:

+ (nullable NSError *) lotteryInterstitialWithAdLocation: (nullable NSString *) adLocation

Run the interstitial-display frequency lottery for an ad location.

Reads the frequency_n / frequency_m specification for adLocation, advances the persisted per-location frequency counters, and decides whether the interstitial should be shown this time.

Parameters
adLocationThe ad-location identifier.
Returns
nil when the interstitial should be shown, otherwise a localised NSError describing why it was suppressed.
Ghidra address:
0x25c834

◆ shuffled:

+ (nullable NSArray *) shuffled: (nullable NSArray *) list

A randomly shuffled copy of a list.

Parameters
listThe list to shuffle.
Returns
A new array with the elements of list in random order.
Ghidra address:
0x25c690

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