char *OutputWriter::end_group(bool append)
{
get_buf(append);
+ if (limit >= 0) {
+ get_output(OT_SEP, OT_INT, "limit", limit, OT_END);
+ }
+ if (offset >= 0) {
+ get_output(OT_SEP, OT_INT, "offset", offset, OT_END);
+ }
return get_output(OT_SEP,
OT_INT32, "error", error,
OT_STRING, "errmsg", NPRTB(errmsg),
need_separator=false;
will_need_separator=true;
+ limit = -1; // not set
+ offset = -1; // not set
error = 0;
errmsg = NULL;
};
const char *close_hash;
const char *label;
+ int limit;
+ int offset;
int error;
char *errmsg;
virtual char *start_list(const char *name, bool append=true);
virtual char *end_list(bool append=true);
+ void set_limit_offset(int l, int o) {
+ limit = l;
+ offset = o;
+ };
void set_label(const char *l) {
label = l;
};