json: Add command "decrypt" to gpgme-json.
[gpgme.git] / src / engine-backend.h
index 144b156..f692666 100644 (file)
@@ -14,7 +14,7 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with this program; if not, see <http://www.gnu.org/licenses/>.
+   License along with this program; if not, see <https://www.gnu.org/licenses/>.
  */
 
 #ifndef ENGINE_BACKEND_H
@@ -61,18 +61,23 @@ struct engine_ops
                                           void *fnc_value);
   gpgme_error_t (*set_locale) (void *engine, int category, const char *value);
   gpgme_error_t (*set_protocol) (void *engine, gpgme_protocol_t protocol);
-  gpgme_error_t (*decrypt) (void *engine, gpgme_data_t ciph,
-                           gpgme_data_t plain, int export_session_key);
-  gpgme_error_t (*decrypt_verify) (void *engine, gpgme_data_t ciph,
-                                  gpgme_data_t plain, int export_session_key);
-  gpgme_error_t (*delete) (void *engine, gpgme_key_t key, int allow_secret);
+  void (*set_engine_flags) (void *engine, gpgme_ctx_t ctx);
+  gpgme_error_t (*decrypt) (void *engine,
+                            gpgme_decrypt_flags_t flags,
+                            gpgme_data_t ciph,
+                           gpgme_data_t plain, int export_session_key,
+                            const char *override_session_key,
+                            int auto_key_retrieve);
+  gpgme_error_t (*delete) (void *engine, gpgme_key_t key, unsigned int flags);
   gpgme_error_t (*edit) (void *engine, int type, gpgme_key_t key,
                         gpgme_data_t out, gpgme_ctx_t ctx /* FIXME */);
   gpgme_error_t (*encrypt) (void *engine, gpgme_key_t recp[],
+                            const char *recpstring,
                            gpgme_encrypt_flags_t flags,
                            gpgme_data_t plain, gpgme_data_t ciph,
                            int use_armor);
   gpgme_error_t (*encrypt_sign) (void *engine, gpgme_key_t recp[],
+                                 const char *recpstring,
                                 gpgme_encrypt_flags_t flags,
                                 gpgme_data_t plain, gpgme_data_t ciph,
                                 int use_armor, gpgme_ctx_t ctx /* FIXME */);
@@ -98,6 +103,7 @@ struct engine_ops
                                int secret_only, int reserved,
                                gpgme_keylist_mode_t mode,
                                int engine_flags);
+  gpgme_error_t (*keylist_data) (void *engine, gpgme_data_t data);
   gpgme_error_t (*keysign) (void *engine,
                             gpgme_key_t key, const char *userid,
                             unsigned long expires, unsigned int flags,
@@ -126,6 +132,7 @@ struct engine_ops
 
   gpgme_error_t  (*conf_load) (void *engine, gpgme_conf_comp_t *conf_p);
   gpgme_error_t  (*conf_save) (void *engine, gpgme_conf_comp_t conf);
+  gpgme_error_t  (*conf_dir) (void *engine, const char *what, char **result);
 
   gpgme_error_t  (*query_swdb) (void *engine,
                                 const char *name, const char *iversion,