Home GnuPG
Diffusion GPGME 906ea48df3e1

json: Add direct way to query a config option

Description

json: Add direct way to query a config option

* src/gpgme-json.c (op_config_opt, hlp_config_opt): New operation.
(process_request, hlp_help): Add it.

This is more conveniant API for most query operations where
a single option is required.

An example would be:
{

"op": "config_opt",
"component": "gpg",
"option": "default-key"

}

Which results in:
{

"option":       {
        "name": "default-key",
        "description":  "use NAME as default secret key",
        "argname":      "NAME",
        "flags":        0,
        "level":        0,
        "type": 1,
        "alt_type":     1,
        "value":        [{
                        "string":       "F462B6B1",
                        "is_none":      false
                }]
}

}

Details

Provenance
aheineckeAuthored on Jun 7 2018, 11:42 AM
Parents
rM7e18c7a07a1e: json: Add op_config to query gpgconf
Branches
Unknown
Tags
Unknown