Objectively
Object oriented framework for C.
Loading...
Searching...
No Matches
RESTClient.h File Reference

An HTTP REST client backed by URLSession. More...

Go to the source code of this file.

Data Structures

struct  RESTClient
 An HTTP REST client backed by URLSession. More...
 

Typedefs

typedef void(* RESTClientCompletion) (int status, Data *data, void *userData)
 A completion handler for asynchronous RESTClient requests.
 

Functions

OBJECTIVELY_EXPORT Class * _RESTClient (void)
 

Detailed Description

An HTTP REST client backed by URLSession.

Definition in file RESTClient.h.

Function Documentation

◆ _RESTClient()

OBJECTIVELY_EXPORT Class * _RESTClient ( void  )

Definition at line 342 of file RESTClient.c.

342 {
343
344 static Class *clazz;
345 static Once once;
346
347 do_once(&once, {
348 clazz = _initialize(&(const ClassDef) {
349 .name = "RESTClient",
350 .superclass = _Object(),
351 .instanceSize = sizeof(RESTClient),
352 .interfaceSize = sizeof(RESTClientInterface),
353 .initialize = initialize,
354 .destroy = destroy,
355 });
356 });
357
358 return clazz;
359}
Class * _initialize(const ClassDef *def)
Initializes the given Class.
Definition Class.c:151
Class * _Object(void)
Definition Object.c:136
static void destroy(Class *clazz)
Definition RESTClient.c:310
static void initialize(Class *clazz)
Definition RESTClient.c:314
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:90
An HTTP REST client backed by URLSession.
Definition RESTClient.h:62