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

Applilink SDK banner, resource, and data file cache utilities. More...

#include <ApplilinkFile.h>

Inheritance diagram for ApplilinkFile:
Collaboration diagram for ApplilinkFile:

Class Methods

(ApplilinkFileFetchResult) + getBannerWithUrl:
 Fetch a banner image, caching it under the banner-image cache directory.
(ApplilinkFileFetchResult) + getResourceWithUrl:
 Fetch a resource image, caching it under the resource cache directory.
(ApplilinkFileFetchResult) + getDataWithUrl:
 Fetch a data file, caching it under the resource cache directory.
(ApplilinkFileFetchResult) + getCacheDataWithUrl:
 Fetch a data file, caching it under the cache-data directory.
(nullable NSData *) + getFileWithUrl:
 Download the contents of a URL synchronously.
(void) + saveData:file:path:
 Write data to a named file under a directory.
(void) + deleteFile:path:
 Delete a named file under a directory.
(void) + deleteFile:
 Delete a file at a path.
(BOOL) + existFile:path:
 Test whether a named file exists under a directory.
(BOOL) + existImageFile:path:
 Test whether a named image file exists and is loadable under a directory.
(void) + createFolder
 Create the applilink cache folder tree if it is missing.
(nullable NSString *) + getContentsPath
 The applilink/contents directory under the temporary directory.
(nullable NSString *) + getBannerCachePath
 The banner-image cache directory (contents/cache_img).
(nullable NSString *) + getResourcePath
 The resource directory (contents/res).
(nullable NSString *) + getCacheDataPath
 The cache-data directory (contents/cache_data).
(nullable NSString *) + getTemplatePathWithAdModel:adLocation:
 Build the HTML template path for an ad model and location.
(void) + delateFolder
 Delete the entire contents directory tree.
(void) + clearCacheBannerImage
 Prune stale banner-image cache files.
(void) + clearCacheData
 Prune stale cache-data files.
(void) + allClearCacheBannerImage
 Delete and recreate the banner-image cache directory.

Detailed Description

Applilink SDK banner, resource, and data file cache utilities.

Method Documentation

◆ allClearCacheBannerImage

+ (void) allClearCacheBannerImage

Delete and recreate the banner-image cache directory.

Ghidra address:
0x238cc0

◆ clearCacheBannerImage

+ (void) clearCacheBannerImage

Prune stale banner-image cache files.

Ensures the banner cache directory exists, then removes every file whose modification date is more than one day old.

Ghidra address:
0x238578

◆ clearCacheData

+ (void) clearCacheData

Prune stale cache-data files.

Ensures the cache-data directory exists, then removes every file whose modification date is more than one day old.

Ghidra address:
0x23891c

◆ createFolder

+ (void) createFolder

Create the applilink cache folder tree if it is missing.

Ensures the applilink directory in the temporary directory and, beneath its contents subdirectory, the cache_img, cache_data, and res directories all exist.

Ghidra address:
0x237f08

◆ delateFolder

+ (void) delateFolder

Delete the entire contents directory tree.

The selector keeps the binary's misspelling (delateFolder) verbatim.

Ghidra address:
0x2384bc

◆ deleteFile:

+ (void) deleteFile: (nullable NSString *) path

Delete a file at a path.

The path is deleted only when it is non-nil and non-empty.

Parameters
pathThe path to delete.
Ghidra address:
0x237c88

◆ deleteFile:path:

+ (void) deleteFile: (nullable NSString *) file
path: (nullable NSString *) path 

Delete a named file under a directory.

Parameters
fileThe file name to delete under path.
pathThe directory containing the file.
Ghidra address:
0x237bd8

◆ existFile:path:

+ (BOOL) existFile: (nullable NSString *) file
path: (nullable NSString *) path 

Test whether a named file exists under a directory.

Parameters
fileThe file name to test under path.
pathThe directory to look in.
Returns
YES when the file exists.
Ghidra address:
0x237d20

◆ existImageFile:path:

+ (BOOL) existImageFile: (nullable NSString *) file
path: (nullable NSString *) path 

Test whether a named image file exists and is loadable under a directory.

When the file exists but cannot be decoded as a UIImage, it is deleted and NO is returned.

Parameters
fileThe image file name to test under path.
pathThe directory to look in.
Returns
YES when the file exists and decodes as an image.
Ghidra address:
0x237dd0

◆ getBannerCachePath

+ (NSString *) getBannerCachePath

The banner-image cache directory (contents/cache_img).

Returns
The banner cache directory path.
Ghidra address:
0x2382bc

◆ getBannerWithUrl:

+ (ApplilinkFileFetchResult) getBannerWithUrl: (nullable id) url

Fetch a banner image, caching it under the banner-image cache directory.

When url is an NSNull, or the banner is already cached, the file is left untouched. Otherwise the file is downloaded, decoded as a UIImage to validate it, and written to the cache under the URL's trailing file-name component.

Parameters
urlThe banner URL, or an NSNull to skip the fetch.
Returns
The fetch outcome.
Ghidra address:
0x23750c

◆ getCacheDataPath

+ (NSString *) getCacheDataPath

The cache-data directory (contents/cache_data).

Returns
The cache-data directory path.
Ghidra address:
0x238384

◆ getCacheDataWithUrl:

+ (ApplilinkFileFetchResult) getCacheDataWithUrl: (nullable NSString *) url

Fetch a data file, caching it under the cache-data directory.

Parameters
urlThe data URL.
Returns
The fetch outcome.
Ghidra address:
0x237920

◆ getContentsPath

+ (NSString *) getContentsPath

The applilink/contents directory under the temporary directory.

Returns
The contents directory path.
Ghidra address:
0x238230

◆ getDataWithUrl:

+ (ApplilinkFileFetchResult) getDataWithUrl: (nullable NSString *) url

Fetch a data file, caching it under the resource cache directory.

Unlike +getResourceWithUrl: the payload is not decoded as an image; any downloaded data is written to the cache under the URL's trailing file-name component.

Parameters
urlThe data URL.
Returns
The fetch outcome.
Ghidra address:
0x237800

◆ getFileWithUrl:

+ (nullable NSData *) getFileWithUrl: (nullable NSString *) url

Download the contents of a URL synchronously.

Parameters
urlThe URL to download.
Returns
The downloaded data, or nil when the request failed.
Ghidra address:
0x237a40

◆ getResourcePath

+ (NSString *) getResourcePath

The resource directory (contents/res).

Returns
The resource directory path.
Ghidra address:
0x238320

◆ getResourceWithUrl:

+ (ApplilinkFileFetchResult) getResourceWithUrl: (nullable NSString *) url

Fetch a resource image, caching it under the resource cache directory.

The resource is downloaded and validated as a UIImage before being written to the cache under the URL's trailing file-name component; an already-cached resource is left untouched.

Parameters
urlThe resource URL.
Returns
The fetch outcome.
Ghidra address:
0x2376a4

◆ getTemplatePathWithAdModel:adLocation:

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

Build the HTML template path for an ad model and location.

The file name is formatted as "<adModel>_<adLocation>.html" under the contents directory.

Parameters
adModelThe ad-model identifier.
adLocationThe ad-location identifier.
Returns
The template file path.
Ghidra address:
0x2383e8

◆ saveData:file:path:

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

Write data to a named file under a directory.

Parameters
dataThe data to write.
fileThe file name to write under path.
pathThe directory to write into.
Ghidra address:
0x237b3c

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