Objectively 1.0.0
Ultra-lightweight object oriented framework for GNU C.
Properties | Methods | Protected Attributes
URLSessionDataTask Struct Reference

#include <URLSessionDataTask.h>

Overview

Use data tasks to send and receive Data in-memory.

Data tasks are well suited for web service invocations.

Definition at line 43 of file URLSessionDataTask.h.

Inheritance diagram for URLSessionDataTask:
URLSessionTask Object

Properties

Datadata
 The data received. More...
 
URLSessionTask urlSessionTask
 The superclass. More...
 
- Properties inherited from URLSessionTask
size_t bytesExpectedToReceive
 The count of bytes this task expects to receive. More...
 
size_t bytesExpectedToSend
 The count of bytes this task expects to send. More...
 
size_t bytesReceived
 The count of bytes received. More...
 
size_t bytesSent
 The count of bytes sent. More...
 
URLSessionTaskCompletion completion
 The completion function. More...
 
ident data
 User data. More...
 
char * error
 The error buffer. More...
 
Object object
 The superclass. More...
 
URLSessionTaskProgress progress
 The progress function. More...
 
struct URLRequestrequest
 The request. More...
 
struct URLResponseresponse
 The response. More...
 
struct URLSessionsession
 The session. More...
 
URLSessionTaskState state
 The state. More...
 
ident handle
 The backing libcurl handle. More...
 
ident requestHeaders
 HTTP headers, in libcurl list structure. More...
 
- Properties inherited from Object
Classclazz
 Every instance of Object begins with a pointer to its Class. More...
 

Methods

Class_URLSessionDataTask (void)
 The URLSessionDataTask archetype. More...
 
- Methods inherited from URLSessionTask
Class_URLSessionTask (void)
 The URLSessionTask archetype. More...
 
void cancel (URLSessionTask *)
 Cancels this task. More...
 
void execute (URLSessionTask *)
 Executes this task synchronously, on the calling thread. More...
 
URLSessionTaskinitWithRequestInSession (URLSessionTask *, struct URLRequest *, struct URLSession *, URLSessionTaskCompletion)
 Initializes this task with the given URLRequest. More...
 
void resume (URLSessionTask *)
 Starts or resumes this task. More...
 
void setup (URLSessionTask *)
 Sets up this task. More...
 
void suspend (URLSessionTask *)
 Suspends this task. More...
 
void teardown (URLSessionTask *)
 Tears down this task. More...
 
- Methods inherited from Object
Class_Object (void)
 The Object archetype. More...
 
Objectcopy (const Object *self)
 Creates a shallow copy of this Object. More...
 
void dealloc (Object *self)
 Frees all resources held by this Object. More...
 
Stringdescription (const Object *self)
 
int hash (const Object *self)
 
Objectinit (Object *self)
 Initializes this Object. More...
 
_Bool isEqual (const Object *self, const Object *other)
 Tests equality of the other Object. More...
 
_Bool isKindOfClass (const Object *self, const Class *clazz)
 Tests for Class hierarchy membership. More...
 

Protected Attributes

URLSessionDataTaskInterface * interface
 The interface. More...
 
- Protected Attributes inherited from URLSessionTask
URLSessionTaskInterface * interface
 The interface. More...
 
- Protected Attributes inherited from Object
ObjectInterface * interface
 The interface. More...
 

Property Details

◆ data

Data* URLSessionDataTask::data ( void  )

The data received.

Definition at line 59 of file URLSessionDataTask.h.

◆ interface

URLSessionDataTaskInterface* URLSessionDataTask::interface
protected

The interface.

Definition at line 54 of file URLSessionDataTask.h.

◆ urlSessionTask

URLSessionTask URLSessionDataTask::urlSessionTask

The superclass.

Definition at line 48 of file URLSessionDataTask.h.

Method Details

◆ _URLSessionDataTask()

Class * _URLSessionDataTask ( void  )

The URLSessionDataTask archetype.

Returns
The URLSessionDataTask Class.

Definition at line 99 of file URLSessionDataTask.c.

99 {
100 static Class *clazz;
101 static Once once;
102
103 do_once(&once, {
104 clazz = _initialize(&(const ClassDef) {
105 .name = "URLSessionDataTask",
106 .superclass = _URLSessionTask(),
107 .instanceSize = sizeof(URLSessionDataTask),
108 .interfaceOffset = offsetof(URLSessionDataTask, interface),
109 .interfaceSize = sizeof(URLSessionDataTaskInterface),
111 });
112 });
113
114 return clazz;
115}
Class * _initialize(const ClassDef *def)
Initializes the given Class.
Definition: Class.c:91
static void initialize(Class *clazz)
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:51
Use data tasks to send and receive Data in-memory.
URLSessionDataTaskInterface * interface
The interface.
Class * _URLSessionTask(void)
The URLSessionTask archetype.

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