Line data Source code
1 : #pragma once
2 :
3 : #include <prefixdb/api/inc.hpp>
4 : #include <prefixdb/api/add.hpp>
5 : #include <prefixdb/api/fields_json.hpp>
6 : #include <prefixdb/api/common_status_json.hpp>
7 : #include <wfc/json.hpp>
8 :
9 : namespace wamba { namespace prefixdb {
10 :
11 : namespace request
12 : {
13 : struct inc_json
14 : {
15 0 : JSON_NAME(prefix)
16 0 : JSON_NAME(sync)
17 0 : JSON_NAME(nores)
18 0 : JSON_NAME(update)
19 0 : JSON_NAME(snapshot)
20 :
21 : typedef wfc::json::object<
22 : inc,
23 : wfc::json::member_list<
24 : wfc::json::member<n_prefix, inc, std::string, &inc::prefix>,
25 : wfc::json::member<n_sync, inc, bool, &inc::sync>,
26 : wfc::json::member<n_nores, inc, bool, &inc::nores>,
27 : wfc::json::member<n_snapshot, inc, size_t, &inc::snapshot>,
28 : wfc::json::member<n_update, inc, field_list_t, &inc::fields, fields_list_json>
29 : >
30 : > type;
31 : typedef type::target target;
32 : typedef type::serializer serializer;
33 : typedef type::member_list member_list;
34 : };
35 : }
36 :
37 : namespace response
38 : {
39 : struct inc_json
40 : {
41 0 : JSON_NAME(prefix)
42 0 : JSON_NAME(status)
43 0 : JSON_NAME(fields)
44 :
45 : typedef wfc::json::object<
46 : inc,
47 : wfc::json::member_list<
48 : wfc::json::member<n_prefix, inc, std::string, &inc::prefix>,
49 : wfc::json::member<n_status, inc, common_status, &inc::status, common_status_json>,
50 : wfc::json::member<n_fields, inc, field_list_t, &inc::fields, fields_list_json>
51 : >
52 : > type;
53 : typedef type::target target;
54 : typedef type::serializer serializer;
55 : typedef type::member_list member_list;
56 : };
57 : }
58 :
59 : }}
|