GNUnet  0.11.x
Functions
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_claim (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_claim_attest (struct GNUNET_RECLAIM_Attestation **attr)
 JSON Specification for Reclaim attestation claims. More...
 

Function Documentation

◆ GNUNET_RECLAIM_JSON_spec_claim()

struct GNUNET_JSON_Specification GNUNET_RECLAIM_JSON_spec_claim ( struct GNUNET_RECLAIM_Attribute **  attr)

JSON Specification for Reclaim claims.

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

Definition at line 147 of file json_reclaim.c.

References clean_attr(), parse_attr(), GNUNET_JSON_Specification::parser, and ret.

Referenced by add_attribute_cont().

148 {
149  struct GNUNET_JSON_Specification ret = { .parser = &parse_attr,
150  .cleaner = &clean_attr,
151  .cls = NULL,
152  .field = NULL,
153  .ptr = attr,
154  .ptr_size = 0,
155  .size_ptr = NULL };
156 
157  *attr = NULL;
158  return ret;
159 }
static int ret
Return value of the commandline.
Definition: gnunet-abd.c:81
Entry in parser specification for GNUNET_JSON_parse().
static void clean_attr(void *cls, struct GNUNET_JSON_Specification *spec)
Cleanup data left from parsing RSA public key.
Definition: json_reclaim.c:127
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:44
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 268 of file json_reclaim.c.

References clean_ticket(), parse_ticket(), GNUNET_JSON_Specification::parser, ret, and ticket.

Referenced by consume_ticket_cont(), and revoke_ticket_cont().

269 {
270  struct GNUNET_JSON_Specification ret = { .parser = &parse_ticket,
271  .cleaner = &clean_ticket,
272  .cls = NULL,
273  .field = NULL,
274  .ptr = ticket,
275  .ptr_size = 0,
276  .size_ptr = NULL };
277 
278  *ticket = NULL;
279  return ret;
280 }
static int ret
Return value of the commandline.
Definition: gnunet-abd.c:81
Entry in parser specification for GNUNET_JSON_parse().
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:171
static void clean_ticket(void *cls, struct GNUNET_JSON_Specification *spec)
Cleanup data left from parsing RSA public key.
Definition: json_reclaim.c:248
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GNUNET_RECLAIM_JSON_spec_claim_attest()

struct GNUNET_JSON_Specification GNUNET_RECLAIM_JSON_spec_claim_attest ( struct GNUNET_RECLAIM_Attestation **  attr)

JSON Specification for Reclaim attestation claims.

Parameters
ticketstruct of GNUNET_RECLAIM_Attestation to fill
Returns
JSON Specification
Parameters
ticketstruct of GNUNET_RECLAIM_ATTESTATION_Claim to fill
Returns
JSON Specification

Definition at line 377 of file json_reclaim.c.

References clean_attest(), parse_attest(), GNUNET_JSON_Specification::parser, and ret.

Referenced by add_attestation_cont().

379 {
380  struct GNUNET_JSON_Specification ret = { .parser = &parse_attest,
381  .cleaner = &clean_attest,
382  .cls = NULL,
383  .field = NULL,
384  .ptr = attr,
385  .ptr_size = 0,
386  .size_ptr = NULL };
387 
388  *attr = NULL;
389  return ret;
390 }
static void clean_attest(void *cls, struct GNUNET_JSON_Specification *spec)
Cleanup data left from parsing RSA public key.
Definition: json_reclaim.c:359
static int ret
Return value of the commandline.
Definition: gnunet-abd.c:81
Entry in parser specification for GNUNET_JSON_parse().
static int parse_attest(void *cls, json_t *root, struct GNUNET_JSON_Specification *spec)
Parse given JSON object to an attestation claim.
Definition: json_reclaim.c:291
Here is the call graph for this function:
Here is the caller graph for this function: