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

A Downloader whose every request is session-signed and retried on a stale session. More...

#include <SessionDownloader.h>

Inheritance diagram for SessionDownloader:
Collaboration diagram for SessionDownloader:

Instance Methods

(instancetype) - initWithURL:postDictionary:delegate:
 Builds a signed POST from a URL and a parameter dictionary.
(instancetype) - initWithURL:delegate:
 Builds a signed GET-style request that carries a fresh random cnonce.
(instancetype) - initWithURL:postData:delegate:
 Builds a signed POST from a URL and a ready request body.
Instance Methods inherited from Downloader
(instancetype) - initWithURL:delegate:
 Builds a plain GET.
(instancetype) - initWithURL:postJsonData:delegate:
 Builds a JSON POST.
(instancetype) - initWithURL:postData:delegate:
 Builds a POST with an arbitrary body.
(void) - startDownloading
 Starts the request.
(void) - cancel
 Abandons the request.
(void) - connectionCancel
 Cancels the current session task and clears it.
(unsigned long long) - currentSize
 The total bytes downloaded so far.
(float) - currentProgress
 The fraction of the expected total that has arrived.
(nullable NSData *) - getData
 The body the request returned.
(nullable NSDictionary *) - getDataInJSON
 The body the request returned, parsed as JSON.

Properties

int apiTag
 The request's API tag, used to decide the session-retry behaviour.
Properties inherited from Downloader
int tag
 An integer tag the caller may attach to the request.

Additional Inherited Members

Public Attributes inherited from Downloader
NSURLRequest * request
 The request being run.
NSURLSession * session
 The session the request runs on.
NSURLSessionTask * sessionTask
 The task carrying the request.
NSMutableData * data
 The response body accumulated so far.
int64_t dl_size
 The total byte count the response declared.
__weak id< DownloaderDelegate > delegate
 The object told how the request finished.
int _tag
 The caller's tag, distinguishing concurrent requests sharing one delegate.

Detailed Description

A Downloader whose every request is session-signed and retried on a stale session.

Method Documentation

◆ initWithURL:delegate:

- (instancetype) initWithURL: (nullable NSURL *) url
delegate: (nullable id) aDelegate 

Builds a signed GET-style request that carries a fresh random cnonce.

Parameters
urlThe endpoint.
aDelegateThe object told how the request finished.
Returns
The initialised client.
Ghidra address:
0xffb48

◆ initWithURL:postData:delegate:

- (instancetype) initWithURL: (nullable NSURL *) url
postData: (nullable NSData *) postData
delegate: (nullable id) aDelegate 

Builds a signed POST from a URL and a ready request body.

Parameters
urlThe endpoint.
postDataThe request body.
aDelegateThe object told how the request finished.
Returns
The initialised client.
Ghidra address:
0xffe1c

◆ initWithURL:postDictionary:delegate:

- (instancetype) initWithURL: (nullable NSURL *) url
postDictionary: (nullable NSDictionary *) postDictionary
delegate: (nullable id) aDelegate 

Builds a signed POST from a URL and a parameter dictionary.

Copies postDictionary, ensures it carries a cnonce (a random one when absent), merges every +[JubeatAppDelegate clientInfo] entry, JSON-serialises it, and chains to -initWithURL:postData:delegate: .

Parameters
urlThe endpoint.
postDictionaryThe request parameters.
aDelegateThe object told how the request finished.
Returns
The initialised client.
Ghidra address:
0xff324

Property Documentation

◆ apiTag

- (int) apiTag
readwritenonatomicassign

The request's API tag, used to decide the session-retry behaviour.

Ghidra address:
0x100e3c

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