GNUnet 0.21.1
json_reclaim.h File Reference
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_json_lib.h"
#include "gnunet_reclaim_service.h"
#include "gnunet_reclaim_lib.h"
Include dependency graph for json_reclaim.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct GNUNET_JSON_Specification GNUNET_RECLAIM_JSON_spec_attribute (struct GNUNET_RECLAIM_Attribute **attr)
 JSON Specification for Reclaim claims. More...
 
struct GNUNET_JSON_Specification GNUNET_RECLAIM_JSON_spec_ticket (struct GNUNET_RECLAIM_Ticket **ticket)
 JSON Specification for Reclaim tickets. More...
 
struct GNUNET_JSON_Specification GNUNET_RECLAIM_JSON_spec_credential (struct GNUNET_RECLAIM_Credential **cred)
 JSON Specification for credentials. More...
 

Function Documentation

◆ GNUNET_RECLAIM_JSON_spec_attribute()

struct GNUNET_JSON_Specification GNUNET_RECLAIM_JSON_spec_attribute ( struct GNUNET_RECLAIM_Attribute **  attr)

JSON Specification for Reclaim claims.

Parameters
attrstruct of GNUNET_RECLAIM_Attribute to fill
Returns
JSON Specification
Parameters
ticketstruct of GNUNET_RECLAIM_Attribute to fill
Returns
JSON Specification

Definition at line 146 of file json_reclaim.c.

147{
148 struct GNUNET_JSON_Specification ret = { .parser = &parse_attr,
149 .cleaner = &clean_attr,
150 .cls = NULL,
151 .field = NULL,
152 .ptr = attr,
153 .ptr_size = 0,
154 .size_ptr = NULL };
155
156 *attr = NULL;
157 return ret;
158}
static int ret
Final status code.
Definition: gnunet-arm.c:94
static void clean_attr(void *cls, struct GNUNET_JSON_Specification *spec)
Cleanup data left from parsing RSA public key.
Definition: json_reclaim.c:126
static int parse_attr(void *cls, json_t *root, struct GNUNET_JSON_Specification *spec)
Parse given JSON object to a claim.
Definition: json_reclaim.c:42
Entry in parser specification for GNUNET_JSON_parse().

References clean_attr(), parse_attr(), and ret.

Referenced by add_attribute_cont().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GNUNET_RECLAIM_JSON_spec_ticket()

struct GNUNET_JSON_Specification GNUNET_RECLAIM_JSON_spec_ticket ( struct GNUNET_RECLAIM_Ticket **  ticket)

JSON Specification for Reclaim tickets.

Parameters
ticketstruct of GNUNET_RECLAIM_Ticket to fill
Returns
JSON Specification

Definition at line 265 of file json_reclaim.c.

266{
267 struct GNUNET_JSON_Specification ret = { .parser = &parse_ticket,
268 .cleaner = &clean_ticket,
269 .cls = NULL,
270 .field = NULL,
271 .ptr = ticket,
272 .ptr_size = 0,
273 .size_ptr = NULL };
274
275 *ticket = NULL;
276 return ret;
277}
static struct GNUNET_RECLAIM_Ticket ticket
Ticket to consume.
static int parse_ticket(void *cls, json_t *root, struct GNUNET_JSON_Specification *spec)
Parse given JSON object to a ticket.
Definition: json_reclaim.c:170
static void clean_ticket(void *cls, struct GNUNET_JSON_Specification *spec)
Cleanup data left from parsing RSA public key.
Definition: json_reclaim.c:245

References clean_ticket(), parse_ticket(), ret, and ticket.

Referenced by consume_ticket_cont(), and revoke_ticket_cont().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GNUNET_RECLAIM_JSON_spec_credential()

struct GNUNET_JSON_Specification GNUNET_RECLAIM_JSON_spec_credential ( struct GNUNET_RECLAIM_Credential **  cred)

JSON Specification for credentials.

Parameters
credstruct of GNUNET_RECLAIM_Credential to fill
Returns
JSON Specification

JSON Specification for credentials.

Parameters
attrstruct of GNUNET_RECLAIM_Credential to fill
Returns
JSON Specification

Definition at line 385 of file json_reclaim.c.

387{
388 struct GNUNET_JSON_Specification ret = { .parser = &parse_credential,
389 .cleaner = &clean_credential,
390 .cls = NULL,
391 .field = NULL,
392 .ptr = cred,
393 .ptr_size = 0,
394 .size_ptr = NULL };
395
396 *cred = NULL;
397 return ret;
398}
static int parse_credential(void *cls, json_t *root, struct GNUNET_JSON_Specification *spec)
Parse given JSON object to a credential claim.
Definition: json_reclaim.c:289
static void clean_credential(void *cls, struct GNUNET_JSON_Specification *spec)
Cleanup data left from parsing RSA public key.
Definition: json_reclaim.c:365

References clean_credential(), parse_credential(), and ret.

Referenced by add_credential_cont().

Here is the call graph for this function:
Here is the caller graph for this function: