Objectively
Ultra-lightweight object oriented framework for GNU C.
Loading...
Searching...
No Matches
URLSessionConfiguration Struct Reference

#include <URLSessionConfiguration.h>

Overview

Configuration bundle for URLSession.

Definition at line 44 of file URLSessionConfiguration.h.

Inheritance diagram for URLSessionConfiguration:
Object

Properties

long connectTimeout
 The timeout interval for establishing a connection, in seconds. 0 means no limit.
 
struct { 
 
   String *   password 
 The password. More...
 
   String *   username 
 The username. More...
 
credentials 
 Credentials for URLRequests requiring authentication.
 
DictionaryhttpHeaders
 The HTTP headers added to every HTTP URLRequest.
 
int httpMaximumConnectionsPerHost
 The maximum number of HTTP connections to open per host.
 
bool longPolling
 If true, disables stall detection (LOW_SPEED_LIMIT / LOW_SPEED_TIME). Use for requests that legitimately expect long periods of silence.
 
Object object
 The superclass.
 
long timeout
 The timeout for the entire transfer, in seconds. 0 means no limit.
 
URLCacheurlCache
 The cache for URL responses, or NULL to disable caching.
 
- Properties inherited from Object
Classclazz
 Every instance of Object begins with a pointer to its Class.
 
unsigned int magic
 A header to allow introspection of Object types.
 

Methods

Class_URLSessionConfiguration (void)
 The URLSessionConfiguration archetype.
 
URLSessionConfigurationinit (URLSessionConfiguration *self)
 Initializes this URLSessionConfiguration.
 
- Methods inherited from Object
Class_Object (void)
 The Object archetype.
 
Objectcopy (const Object *self)
 Creates a shallow copy of this Object.
 
void dealloc (Object *self)
 Frees all resources held by this Object.
 
Stringdescription (const Object *self)
 
int hash (const Object *self)
 
Objectinit (Object *self)
 Initializes this Object.
 
bool isEqual (const Object *self, const Object *other)
 Tests equality of the other Object.
 
bool isKindOfClass (const Object *self, const Class *clazz)
 Tests for Class hierarchy membership.
 

Protected Attributes

URLSessionConfigurationInterface * interface
 The interface.
 
- Protected Attributes inherited from Object
ObjectInterface * interface
 The interface.
 

Property Details

◆ connectTimeout

long URLSessionConfiguration::connectTimeout

The timeout interval for establishing a connection, in seconds. 0 means no limit.

Definition at line 86 of file URLSessionConfiguration.h.

◆ [struct]

struct { ... } URLSessionConfiguration::credentials

Credentials for URLRequests requiring authentication.

◆ httpHeaders

Dictionary* URLSessionConfiguration::httpHeaders

The HTTP headers added to every HTTP URLRequest.

Definition at line 76 of file URLSessionConfiguration.h.

◆ httpMaximumConnectionsPerHost

int URLSessionConfiguration::httpMaximumConnectionsPerHost

The maximum number of HTTP connections to open per host.

Definition at line 81 of file URLSessionConfiguration.h.

◆ interface

URLSessionConfigurationInterface* URLSessionConfiguration::interface
protected

The interface.

Definition at line 55 of file URLSessionConfiguration.h.

◆ longPolling

bool URLSessionConfiguration::longPolling

If true, disables stall detection (LOW_SPEED_LIMIT / LOW_SPEED_TIME). Use for requests that legitimately expect long periods of silence.

Definition at line 97 of file URLSessionConfiguration.h.

◆ object

Object URLSessionConfiguration::object

The superclass.

Definition at line 49 of file URLSessionConfiguration.h.

◆ password

String* URLSessionConfiguration::password

The password.

Definition at line 69 of file URLSessionConfiguration.h.

◆ timeout

long URLSessionConfiguration::timeout

The timeout for the entire transfer, in seconds. 0 means no limit.

Definition at line 91 of file URLSessionConfiguration.h.

◆ urlCache

URLCache* URLSessionConfiguration::urlCache

The cache for URL responses, or NULL to disable caching.

Definition at line 102 of file URLSessionConfiguration.h.

◆ username

String* URLSessionConfiguration::username

The username.

Definition at line 64 of file URLSessionConfiguration.h.

Method Details

◆ _URLSessionConfiguration()

Class * _URLSessionConfiguration ( void  )

The URLSessionConfiguration archetype.

Returns
The URLSessionConfiguration Class.

Definition at line 62 of file URLSessionConfiguration.c.

62 {
63 static Class *clazz;
64 static Once once;
65
66 do_once(&once, {
67 clazz = _initialize(&(const ClassDef) {
68 .name = "URLSessionConfiguration",
69 .superclass = _Object(),
70 .instanceSize = sizeof(URLSessionConfiguration),
71 .interfaceOffset = offsetof(URLSessionConfiguration, interface),
72 .interfaceSize = sizeof(URLSessionConfigurationInterface),
74 });
75 });
76
77 return clazz;
78}
static void initialize(Class *clazz)
Definition Array.c:710
Class * _initialize(const ClassDef *def)
Initializes the given Class.
Definition Class.c:86
long Once
The Once type.
Definition Once.h:37
#define do_once(once, block)
Executes the given block at most one time.
Definition Once.h:43
ClassDefs are passed to _initialize via an archetype to initialize a Class.
Definition Class.h:41
The runtime representation of a Class.
Definition Class.h:95
Class * clazz
Every instance of Object begins with a pointer to its Class.
Definition Object.h:55
Class * _Object(void)
The Object archetype.
Definition Object.c:136
Configuration bundle for URLSession.
URLSessionConfigurationInterface * interface
The interface.

◆ init()

Initializes this URLSessionConfiguration.

Parameters
selfThe URLSessionConfiguration.
Returns
The initialized configuration, or NULL on error.

Definition at line 35 of file URLSessionConfiguration.c.

35 {
36
37 self = (URLSessionConfiguration *) super(Object, self, init);
38 if (self) {
39 self->connectTimeout = 5;
40 self->urlCache = NULL;
41 }
42
43 return self;
44}
#define super(type, obj, method,...)
Object is the root Class of The Objectively Class hierarchy.
Definition Object.h:46
URLSessionConfiguration * init(URLSessionConfiguration *self)
Initializes this URLSessionConfiguration.
long connectTimeout
The timeout interval for establishing a connection, in seconds. 0 means no limit.
URLCache * urlCache
The cache for URL responses, or NULL to disable caching.

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