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 361 of file RESTClient.c.

361 {
362
363 static Class *clazz;
364 static Once once;
365
366 do_once(&once, {
367 clazz = _initialize(&(const ClassDef) {
368 .name = "RESTClient",
369 .superclass = _Object(),
370 .instanceSize = sizeof(RESTClient),
371 .interfaceSize = sizeof(RESTClientInterface),
372 .initialize = initialize,
373 .destroy = destroy,
374 });
375 });
376
377 return clazz;
378}
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:329
static void initialize(Class *clazz)
Definition RESTClient.c:333
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