Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
json_processor.h
Go to the documentation of this file.
1 /*
2  * json_processor.h
3  *
4  * Created on: 2 Dec 2019
5  * Author: billy
6  */
7 
8 #ifndef SERVICES_FIELD_TRIALS_INCLUDE_JSON_PROCESSOR_H_
9 #define SERVICES_FIELD_TRIALS_INCLUDE_JSON_PROCESSOR_H_
10 
13 #include "jansson.h"
14 
15 
16 struct Plot;
17 struct Row;
18 struct JSONProcessor;
19 
20 
21 typedef struct JSONProcessor
22 {
23  json_t *(*jp_process_plot_json_fn) (struct JSONProcessor *processor_p, struct Plot *plot_p, ViewFormat format, const FieldTrialServiceData *service_data_p);
24 
25 
26  json_t *(*jp_process_row_json_fn) (struct JSONProcessor *processor_p, struct Row *row_p, ViewFormat format, const FieldTrialServiceData *service_data_p);
27 
28  void (*jp_free_fn) (struct JSONProcessor *processor_p);
30 
31 
32 #ifdef __cplusplus
33 extern "C"
34 {
35 #endif
36 
38  struct JSONProcessor *processor_p,
39  json_t *(*process_plot_json_fn) (struct JSONProcessor *processor_p, struct Plot *plot_p, ViewFormat format, const FieldTrialServiceData *service_data_p),
40  json_t *(*process_row_json_fn) (struct JSONProcessor *processor_p, struct Row *row_p, ViewFormat format, const FieldTrialServiceData *service_data_p),
41  void (*free_fn) (struct JSONProcessor *processor_p)
42 );
43 
44 
46 
47 
48 DFW_FIELD_TRIAL_SERVICE_LOCAL json_t *ProcessPlotJSON (struct JSONProcessor *processor_p, struct Plot *plot_p, ViewFormat format, const FieldTrialServiceData *service_data_p);
49 
50 
51 DFW_FIELD_TRIAL_SERVICE_LOCAL json_t *ProcessRowJSON (struct JSONProcessor *processor_p, struct Row *row_p, ViewFormat format, const FieldTrialServiceData *service_data_p);
52 
53 
54 #ifdef __cplusplus
55 }
56 #endif
57 
58 #endif /* SERVICES_FIELD_TRIALS_INCLUDE_JSON_PROCESSOR_H_ */
Plot
Definition: plot.h:84
JSONProcessor::jp_free_fn
void(* jp_free_fn)(struct JSONProcessor *processor_p)
Definition: json_processor.h:28
ProcessPlotJSON
json_t * ProcessPlotJSON(struct JSONProcessor *processor_p, struct Plot *plot_p, ViewFormat format, const FieldTrialServiceData *service_data_p)
JSONProcessor
Definition: json_processor.h:21
dfw_field_trial_service_library.h
DFW_FIELD_TRIAL_SERVICE_LOCAL
#define DFW_FIELD_TRIAL_SERVICE_LOCAL
Definition: dfw_field_trial_service_library.h:43
ProcessRowJSON
json_t * ProcessRowJSON(struct JSONProcessor *processor_p, struct Row *row_p, ViewFormat format, const FieldTrialServiceData *service_data_p)
InitialiseJSONProcessor
void InitialiseJSONProcessor(struct JSONProcessor *processor_p, json_t *(*process_plot_json_fn)(struct JSONProcessor *processor_p, struct Plot *plot_p, ViewFormat format, const FieldTrialServiceData *service_data_p), json_t *(*process_row_json_fn)(struct JSONProcessor *processor_p, struct Row *row_p, ViewFormat format, const FieldTrialServiceData *service_data_p), void(*free_fn)(struct JSONProcessor *processor_p))
FreeJSONProcessor
void FreeJSONProcessor(struct JSONProcessor *processor_p)
dfw_field_trial_service_data.h
FieldTrialServiceData
The configuration data used by the DFW Field Trial Service.
Definition: dfw_field_trial_service_data.h:118
ViewFormat
ViewFormat
An indicator of what the output destination is for the JSON data values.
Definition: view_format.h:19
Row
Definition: row.h:54