GNUnet  0.10.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...
 

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 130 of file json_reclaim.c.

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

Referenced by add_attribute_cont().

131 {
132  struct GNUNET_JSON_Specification ret = {.parser = &parse_attr,
133  .cleaner = &clean_attr,
134  .cls = NULL,
135  .field = NULL,
136  .ptr = attr,
137  .ptr_size = 0,
138  .size_ptr = NULL};
139  *attr = NULL;
140  return ret;
141 }
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:112
static int ret
Final status code.
Definition: gnunet-arm.c:89
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 244 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().

245 {
246  struct GNUNET_JSON_Specification ret = {.parser = &parse_ticket,
247  .cleaner = &clean_ticket,
248  .cls = NULL,
249  .field = NULL,
250  .ptr = ticket,
251  .ptr_size = 0,
252  .size_ptr = NULL};
253  *ticket = NULL;
254  return ret;
255 }
Entry in parser specification for GNUNET_JSON_parse().
static int ret
Final status code.
Definition: gnunet-arm.c:89
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:151
static void clean_ticket(void *cls, struct GNUNET_JSON_Specification *spec)
Cleanup data left from parsing RSA public key.
Definition: json_reclaim.c:226
Here is the call graph for this function:
Here is the caller graph for this function: