Home GnuPG
Diffusion GPGME ed1052842df6

json: Add command "getmore" to gpgme-json.

Description

json: Add command "getmore" to gpgme-json.

* src/gpgme-json.c (MIN_REPLY_CHUNK_SIZE): New const.
(DEF_REPLY_CHUNK_SIZE): New const.
(MAX_REPLY_CHUNK_SIZE): New const.
(pending_data): New var.
(add_base64_to_object): Chnage to take a plain data pointer.
(get_chunksize): New.
(make_data_object): New.
(op_encrypt): Get chunksize and use make_data_object.
(op_getmore): New.
(process_request): Release pending data for all commands but "getmore"
and "help".

Native messaging has a limit on the data it may receive in one
request. Thus the caller needs to watch for the "more" flag and
request the remaining data using "getmore" in a loop.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Apr 18 2018, 11:12 AM
Parents
rMe69b175e8ed5: json: Add meta command ,read to gpgme-json.
Branches
Unknown
Tags
Unknown