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_attribute_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_Claim **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_Claim **attr)
 JSON Specification for Reclaim attestation claims. More...
 
struct GNUNET_JSON_Specification GNUNET_RECLAIM_JSON_spec_claim_attest_ref (struct GNUNET_RECLAIM_ATTESTATION_REFERENCE **attr)
 JSON Specification for Reclaim attestation references. More...
 

Function Documentation

◆ GNUNET_RECLAIM_JSON_spec_claim()

struct GNUNET_JSON_Specification GNUNET_RECLAIM_JSON_spec_claim ( struct GNUNET_RECLAIM_ATTRIBUTE_Claim **  attr)

JSON Specification for Reclaim claims.

Parameters
ticketstruct of GNUNET_RECLAIM_ATTRIBUTE_Claim to fill
Returns
JSON Specification

Definition at line 136 of file json_reclaim.c.

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

Referenced by add_attribute_cont().

137 {
138  struct GNUNET_JSON_Specification ret = { .parser = &parse_attr,
139  .cleaner = &clean_attr,
140  .cls = NULL,
141  .field = NULL,
142  .ptr = attr,
143  .ptr_size = 0,
144  .size_ptr = NULL };
145 
146  *attr = NULL;
147  return ret;
148 }
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:116
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 257 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().

258 {
259  struct GNUNET_JSON_Specification ret = { .parser = &parse_ticket,
260  .cleaner = &clean_ticket,
261  .cls = NULL,
262  .field = NULL,
263  .ptr = ticket,
264  .ptr_size = 0,
265  .size_ptr = NULL };
266 
267  *ticket = NULL;
268  return ret;
269 }
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:160
static void clean_ticket(void *cls, struct GNUNET_JSON_Specification *spec)
Cleanup data left from parsing RSA public key.
Definition: json_reclaim.c:237
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_Claim **  attr)

JSON Specification for Reclaim attestation claims.

Parameters
ticketstruct of GNUNET_RECLAIM_ATTESTATION_Claim to fill
Returns
JSON Specification

Definition at line 366 of file json_reclaim.c.

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

Referenced by add_attestation_cont().

368 {
369  struct GNUNET_JSON_Specification ret = { .parser = &parse_attest,
370  .cleaner = &clean_attest,
371  .cls = NULL,
372  .field = NULL,
373  .ptr = attr,
374  .ptr_size = 0,
375  .size_ptr = NULL };
376 
377  *attr = NULL;
378  return ret;
379 }
static void clean_attest(void *cls, struct GNUNET_JSON_Specification *spec)
Cleanup data left from parsing RSA public key.
Definition: json_reclaim.c:348
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:280
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GNUNET_RECLAIM_JSON_spec_claim_attest_ref()

struct GNUNET_JSON_Specification GNUNET_RECLAIM_JSON_spec_claim_attest_ref ( struct GNUNET_RECLAIM_ATTESTATION_REFERENCE **  attr)

JSON Specification for Reclaim attestation references.

Parameters
ticketstruct of GNUNET_RECLAIM_ATTESTATION_REFERENCE to fill
Returns
JSON Specification

Definition at line 469 of file json_reclaim.c.

References clean_attest_ref(), parse_attest_ref(), GNUNET_JSON_Specification::parser, and ret.

Referenced by add_attestation_ref_cont(), and delete_attestation_ref_cont().

472 {
473  struct GNUNET_JSON_Specification ret = { .parser = &parse_attest_ref,
474  .cleaner = &clean_attest_ref,
475  .cls = NULL,
476  .field = NULL,
477  .ptr = attr,
478  .ptr_size = 0,
479  .size_ptr = NULL };
480 
481  *attr = NULL;
482  return ret;
483 }
static int ret
Return value of the commandline.
Definition: gnunet-abd.c:81
Entry in parser specification for GNUNET_JSON_parse().
static void clean_attest_ref(void *cls, struct GNUNET_JSON_Specification *spec)
Cleanup data left from parsing RSA public key.
Definition: json_reclaim.c:450
static int parse_attest_ref(void *cls, json_t *root, struct GNUNET_JSON_Specification *spec)
Parse given JSON object to an attestation claim.
Definition: json_reclaim.c:390
Here is the call graph for this function:
Here is the caller graph for this function: