Browse code

core: new rpc api to add values in an array

- memeber named array_add

Daniel-Constantin Mierla authored on 23/04/2014 20:59:22
Showing 1 changed files
... ...
@@ -51,7 +51,8 @@ typedef void (*rpc_fault_f)(void* ctx, int code, char* fmt, ...);          /* Si
51 51
 typedef int (*rpc_add_f)(void* ctx, char* fmt, ...);                       /* Add a new piece of data to the result */
52 52
 typedef int (*rpc_scan_f)(void* ctx, char* fmt, ...);                      /* Retrieve request parameters */
53 53
 typedef int (*rpc_printf_f)(void* ctx, char* fmt, ...);                    /* Add printf-like formated data to the result set */
54
-typedef int (*rpc_struct_add_f)(void* ctx, char* fmt, ...);                /* Create a new structure */
54
+typedef int (*rpc_struct_add_f)(void* ctx, char* fmt, ...);                /* Add fields in a structure */
55
+typedef int (*rpc_array_add_f)(void* ctx, char* fmt, ...);                 /* Add values in an array */
55 56
 typedef int (*rpc_struct_scan_f)(void* ctx, char* fmt, ...);               /* Scan attributes of a structure */
56 57
 typedef int (*rpc_struct_printf_f)(void* ctx, char* name, char* fmt, ...); /* Struct version of rpc_printf */
57 58
 
... ...
@@ -74,6 +75,7 @@ typedef struct rpc {
74 74
 	rpc_scan_f scan;
75 75
 	rpc_printf_f printf;
76 76
 	rpc_struct_add_f struct_add;
77
+	rpc_array_add_f array_add;
77 78
 	rpc_struct_scan_f struct_scan;
78 79
 	rpc_struct_printf_f struct_printf;
79 80
 	rpc_capabilities_f capabilities;