Objectively
Ultra-lightweight object oriented framework for GNU 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 *user_data)
 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 332 of file RESTClient.c.

332 {
333
334 static Class *clazz;
335 static Once once;
336
337 do_once(&once, {
338 clazz = _initialize(&(const ClassDef) {
339 .name = "RESTClient",
340 .superclass = _Object(),
341 .instanceSize = sizeof(RESTClient),
342 .interfaceOffset = offsetof(RESTClient, interface),
343 .interfaceSize = sizeof(RESTClientInterface),
345 .destroy = destroy,
346 });
347 });
348
349 return clazz;
350}
Class * _initialize(const ClassDef *def)
Initializes the given Class.
Definition Class.c:86
Class * _Object(void)
Definition Object.c:136
static void destroy(Class *clazz)
Definition RESTClient.c:300
static void initialize(Class *clazz)
Definition RESTClient.c:304
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
An HTTP REST client backed by URLSession.
Definition RESTClient.h:61