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

The recommend network's advert-cache store. More...

#include <RecommendAdCache.h>

Inheritance diagram for RecommendAdCache:
Collaboration diagram for RecommendAdCache:

Class Methods

(void) + getAllAdStatus
 Refresh the aggregated advert-status table.
(void) + getAllAdDataWithCallBack:
 Fetch every advert-data record through the recommend session, then report completion.
(void) + clearAllAdData
 Clear the cached aggregated advert-data record from NSUserDefaults.
(nullable NSDate *) + getAllAdDataInfoExpire
 The cached advert-data expiry date.
(void) + clearAllAdDataInfoExpire
 Clear the in-memory expiry record for the cached advert data.
(void) + getBannerDataWithList:max:
 Pre-load the banner images for a list of advert records, up to a success quota.
(BOOL) + getResourceDataWithList:
 Fetch and cache every resource file in a list.
(void) + getCacheDataWithList:max:
 Pre-load the cached-data (movie) files for a list, up to a success quota.
(void) + getTemplateFiles
 Download and cache every advert template file listed in the SDK template list.
(void) + saveTemplateData:path:file:
 Write template data into the contents folder, creating the intermediate directories named by path.
(nullable NSError *) + createHtmlWithAdModel:adLocation:verticalAlign:impressionId:
 Create the cached HTML advert body for an advert model, writing it to the contents folder.
(nullable NSString *) + convertHtmlWithAdModel:adLocation:adType:verticalAlign:bannerList:impressionId:selfList:comResData:
 Fill the advert-type HTML template with the banner list, self list, common-resource payload, and environment placeholders.
(void) + setTargetUrl:adType:adModel:adLocation:
 Build and store the click-through target URL on every banner record.
(void) + setAdDisplayCountWithAdId:
 Increment both the daily and the total display counters for an advert identifier.
(void) + setAdDisplayCountDailyWithAdId:
 Increment the daily display counter for an advert identifier, resetting it at the start of a new local day.
(void) + setAdDisplayCountTotalWithAdId:
 Increment the lifetime total display counter for an advert identifier.
(void) + clearAdDisplayCount
 Clear both the daily and the total display counters.
(void) + setHtmlAdDataWithAdModel:adLocation:bannerList:
 Store the cached HTML advert records for an advert model at an ad location.
(nullable NSArray *) + getHtmlAdDataWithAdModel:adLocation:
 The cached HTML advert records for an advert model at an ad location.
(BOOL) + getMoviePlayerIcon
 Pre-load the movie-player icon resource files.
(nullable id) + getMoviewQuaryWithAdModel:adLocation:verticalAlign:impressionId:errorObj:
 Build the interstitial movie query records, or report why none is available.

Detailed Description

The recommend network's advert-cache store.

Method Documentation

◆ clearAdDisplayCount

+ (void) clearAdDisplayCount

Clear both the daily and the total display counters.

Ghidra address:
0x277fa4

◆ clearAllAdData

+ (void) clearAllAdData

Clear the cached aggregated advert-data record from NSUserDefaults.

Ghidra address:
0x275a54

◆ clearAllAdDataInfoExpire

+ (void) clearAllAdDataInfoExpire

Clear the in-memory expiry record for the cached advert data.

Ghidra address:
0x275b74

◆ convertHtmlWithAdModel:adLocation:adType:verticalAlign:bannerList:impressionId:selfList:comResData:

+ (nullable NSString *) convertHtmlWithAdModel: (int) adModel
adLocation: (nullable NSString *) adLocation
adType: (int) adType
verticalAlign: (int) verticalAlign
bannerList: (nullable id) bannerList
impressionId: (nullable NSString *) impressionId
selfList: (nullable id) selfList
comResData: (nullable id) comResData 

Fill the advert-type HTML template with the banner list, self list, common-resource payload, and environment placeholders.

Parameters
adModelThe advert-model identifier.
adLocationThe ad-location identifier.
adTypeThe advert-type identifier, selecting the ad_type<adType>.html template.
verticalAlignThe vertical-alignment identifier.
bannerListThe banner records to embed.
impressionIdThe impression identifier, embedded only when non-nil.
selfListThe self advert records to embed.
comResDataThe common-resource payload to embed.
Returns
The rendered HTML string.
Ghidra address:
0x276a80

◆ createHtmlWithAdModel:adLocation:verticalAlign:impressionId:

+ (nullable NSError *) createHtmlWithAdModel: (int) adModel
adLocation: (nullable NSString *) adLocation
verticalAlign: (int) verticalAlign
impressionId: (nullable NSString *) impressionId 

Create the cached HTML advert body for an advert model, writing it to the contents folder.

Parameters
adModelThe advert-model identifier.
adLocationThe ad-location identifier.
verticalAlignThe vertical-alignment identifier.
impressionIdThe impression identifier embedded in the rendered HTML.
Returns
A localised error when the body could not be created, otherwise nil.
Ghidra address:
0x276598

◆ getAllAdDataInfoExpire

+ (NSDate *) getAllAdDataInfoExpire

The cached advert-data expiry date.

The expiry archive is held in a process-lifetime global, not in NSUserDefaults.

Returns
The expiry date, or nil when no valid date is cached.
Ghidra address:
0x275aac

◆ getAllAdDataWithCallBack:

+ (void) getAllAdDataWithCallBack: (RecommendAdCacheAllAdDataCallback) callBack

Fetch every advert-data record through the recommend session, then report completion.

Parameters
callBackThe completion callback. Its first argument is always nil; only the error ever carries a value.
Ghidra address:
0x27525c
Ghidra address:
0x275320
Ghidra address:
0x2753c8
Ghidra address:
0x275498

◆ getAllAdStatus

+ (void) getAllAdStatus

Refresh the aggregated advert-status table.

If the cached advert-data expiry date is still in the future the call returns early; otherwise it recreates the cache folder and requests a fresh layout index from the web API, then refreshes the templates, wipes the on-disk caches, and kicks off a full advert-data fetch.

Ghidra address:
0x274d3c
Ghidra address:
0x274e40
Ghidra address:
0x274eec
Ghidra address:
0x274f5c

◆ getBannerDataWithList:max:

+ (void) getBannerDataWithList: (nullable NSArray *) list
max: (int) max 

Pre-load the banner images for a list of advert records, up to a success quota.

Parameters
listThe advert-image URLs whose files should be cached.
maxThe maximum number of successful downloads before stopping.
Ghidra address:
0x275b84

◆ getCacheDataWithList:max:

+ (void) getCacheDataWithList: (nullable NSArray *) list
max: (int) max 

Pre-load the cached-data (movie) files for a list, up to a success quota.

Parameters
listThe data-file URLs whose files should be cached.
maxThe maximum number of successful downloads before stopping.
Ghidra address:
0x275eb4

◆ getHtmlAdDataWithAdModel:adLocation:

+ (nullable NSArray *) getHtmlAdDataWithAdModel: (int) adModel
adLocation: (nullable NSString *) adLocation 

The cached HTML advert records for an advert model at an ad location.

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

◆ getMoviePlayerIcon

+ (BOOL) getMoviePlayerIcon

Pre-load the movie-player icon resource files.

Returns
YES when every resource fetch succeeded.
Ghidra address:
0x278320

◆ getMoviewQuaryWithAdModel:adLocation:verticalAlign:impressionId:errorObj:

+ (nullable id) getMoviewQuaryWithAdModel: (int) adModel
adLocation: (nullable NSString *) adLocation
verticalAlign: (int) verticalAlign
impressionId: (nullable NSString *) impressionId
errorObj: (NSError *_Nullable *_Nullable) errorObj 

Build the interstitial movie query records, or report why none is available.

On success the first interstitial record (with its target URL filled and its display counter incremented) is returned. On failure nil is returned and errorObj is set to a localised error. The selector keeps the binary's misspellings "Moview" and "Quary" verbatim, and the verticalAlign and impressionId arguments are accepted but never read.

Parameters
adModelThe advert-model identifier.
adLocationThe ad-location identifier.
verticalAlignIgnored. The body never reads it.
impressionIdIgnored. The body never reads it.
errorObjOn failure, set to the localised error.
Returns
The interstitial movie query record, or nil on failure.
Ghidra address:
0x278524

◆ getResourceDataWithList:

+ (BOOL) getResourceDataWithList: (nullable NSArray *) list

Fetch and cache every resource file in a list.

Parameters
listThe resource-image URLs to cache.
Returns
YES when every fetch succeeded, NO as soon as one fails.
Ghidra address:
0x275d74

◆ getTemplateFiles

+ (void) getTemplateFiles

Download and cache every advert template file listed in the SDK template list.

Ghidra address:
0x2760a4

◆ saveTemplateData:path:file:

+ (void) saveTemplateData: (nullable NSData *) data
path: (nullable NSString *) path
file: (nullable NSString *) file 

Write template data into the contents folder, creating the intermediate directories named by path.

Parameters
dataThe template data to write.
pathThe slash-separated relative directory path.
fileThe template file name.
Ghidra address:
0x2762ac

◆ setAdDisplayCountDailyWithAdId:

+ (void) setAdDisplayCountDailyWithAdId: (nullable NSString *) adId

Increment the daily display counter for an advert identifier, resetting it at the start of a new local day.

Parameters
adIdThe advert identifier.
Ghidra address:
0x277820

◆ setAdDisplayCountTotalWithAdId:

+ (void) setAdDisplayCountTotalWithAdId: (nullable NSString *) adId

Increment the lifetime total display counter for an advert identifier.

Parameters
adIdThe advert identifier.
Ghidra address:
0x277d50

◆ setAdDisplayCountWithAdId:

+ (void) setAdDisplayCountWithAdId: (nullable NSString *) adId

Increment both the daily and the total display counters for an advert identifier.

Parameters
adIdThe advert identifier.
Ghidra address:
0x2777b8

◆ setHtmlAdDataWithAdModel:adLocation:bannerList:

+ (void) setHtmlAdDataWithAdModel: (int) adModel
adLocation: (nullable NSString *) adLocation
bannerList: (nullable id) bannerList 

Store the cached HTML advert records for an advert model at an ad location.

Parameters
adModelThe advert-model identifier.
adLocationThe ad-location identifier.
bannerListThe advert records to cache.
Ghidra address:
0x278014

◆ setTargetUrl:adType:adModel:adLocation:

+ (void) setTargetUrl: (nullable NSArray *) targetUrl
adType: (int) adType
adModel: (int) adModel
adLocation: (nullable NSString *) adLocation 

Build and store the click-through target URL on every banner record.

Parameters
targetUrlThe mutable banner records to annotate with their target URLs.
adTypeThe advert-type identifier.
adModelThe advert-model identifier.
adLocationThe ad-location identifier.
Ghidra address:
0x277150

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