doc/
[gpgme.git] / gpgme / engine.c
index a7ca624..a64b462 100644 (file)
@@ -389,8 +389,7 @@ gpgme_set_engine_info (gpgme_protocol_t proto,
 
 \f
 gpgme_error_t
-_gpgme_engine_new (gpgme_engine_info_t info, engine_t *r_engine,
-                  const char *lc_ctype, const char *lc_messages)
+_gpgme_engine_new (gpgme_engine_info_t info, engine_t *r_engine)
 {
   engine_t engine;
 
@@ -404,9 +403,9 @@ _gpgme_engine_new (gpgme_engine_info_t info, engine_t *r_engine,
   engine->ops = engine_ops[info->protocol];
   if (engine->ops->new)
     {
-      gpgme_error_t err = (*engine->ops->new) (&engine->engine,
-                                              info->file_name, info->home_dir,
-                                              lc_ctype, lc_messages);
+      gpgme_error_t err;
+      err = (*engine->ops->new) (&engine->engine,
+                                info->file_name, info->home_dir);
       if (err)
        {
          free (engine);
@@ -421,6 +420,19 @@ _gpgme_engine_new (gpgme_engine_info_t info, engine_t *r_engine,
 }
 
 
+gpgme_error_t
+_gpgme_engine_reset (engine_t engine)
+{
+  if (!engine)
+    return gpg_error (GPG_ERR_INV_VALUE);
+
+  if (!engine->ops->reset)
+    return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
+
+  return (*engine->ops->reset) (engine->engine);
+}
+
+
 void
 _gpgme_engine_release (engine_t engine)
 {
@@ -477,6 +489,19 @@ _gpgme_engine_set_colon_line_handler (engine_t engine,
 }
 
 gpgme_error_t
+_gpgme_engine_set_locale (engine_t engine, int category,
+                         const char *value)
+{
+  if (!engine)
+    return gpg_error (GPG_ERR_INV_VALUE);
+
+  if (!engine->ops->set_locale)
+    return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
+
+  return (*engine->ops->set_locale) (engine->engine, category, value);
+}
+
+gpgme_error_t
 _gpgme_engine_op_decrypt (engine_t engine, gpgme_data_t ciph,
                          gpgme_data_t plain)
 {