[PATCH gpgme v3 3/5] Supply engine version to engine->ops->new
Daiki Ueno
ueno at gnu.org
Tue Feb 9 09:03:52 CET 2016
* src/engine-backend.h (struct engine_ops): Add VERSION argument in new
member. Change all implementations.
* src/engine.c (_gpgme_engine_new): Pass VERSION to engine->ops->new.
Signed-off-by: Daiki Ueno <ueno at gnu.org>
---
src/engine-assuan.c | 3 ++-
src/engine-backend.h | 3 ++-
src/engine-g13.c | 3 ++-
src/engine-gpg.c | 3 ++-
src/engine-gpgconf.c | 3 ++-
src/engine-gpgsm.c | 3 ++-
src/engine-spawn.c | 3 ++-
src/engine-uiserver.c | 3 ++-
src/engine.c | 3 ++-
9 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/src/engine-assuan.c b/src/engine-assuan.c
index 9902467..81fed31 100644
--- a/src/engine-assuan.c
+++ b/src/engine-assuan.c
@@ -212,7 +212,8 @@ llass_release (void *engine)
/* Create a new instance. If HOME_DIR is NULL standard options for use
with gpg-agent are issued. */
static gpgme_error_t
-llass_new (void **engine, const char *file_name, const char *home_dir)
+llass_new (void **engine, const char *file_name, const char *home_dir,
+ const char *version)
{
gpgme_error_t err = 0;
engine_llass_t llass;
diff --git a/src/engine-backend.h b/src/engine-backend.h
index 4f4519c..6f8bb1f 100644
--- a/src/engine-backend.h
+++ b/src/engine-backend.h
@@ -44,7 +44,8 @@ struct engine_ops
const char *(*get_req_version) (void);
gpgme_error_t (*new) (void **r_engine,
- const char *file_name, const char *home_dir);
+ const char *file_name, const char *home_dir,
+ const char *version);
/* Member functions. */
void (*release) (void *engine);
diff --git a/src/engine-g13.c b/src/engine-g13.c
index 4a7b75c..5c99465 100644
--- a/src/engine-g13.c
+++ b/src/engine-g13.c
@@ -212,7 +212,8 @@ g13_release (void *engine)
static gpgme_error_t
-g13_new (void **engine, const char *file_name, const char *home_dir)
+g13_new (void **engine, const char *file_name, const char *home_dir,
+ const char *version)
{
gpgme_error_t err = 0;
engine_g13_t g13;
diff --git a/src/engine-gpg.c b/src/engine-gpg.c
index 9efced2..f2d6613 100644
--- a/src/engine-gpg.c
+++ b/src/engine-gpg.c
@@ -414,7 +414,8 @@ gpg_release (void *engine)
static gpgme_error_t
-gpg_new (void **engine, const char *file_name, const char *home_dir)
+gpg_new (void **engine, const char *file_name, const char *home_dir,
+ const char *version)
{
engine_gpg_t gpg;
gpgme_error_t rc = 0;
diff --git a/src/engine-gpgconf.c b/src/engine-gpgconf.c
index a2407ac..051f1e9 100644
--- a/src/engine-gpgconf.c
+++ b/src/engine-gpgconf.c
@@ -90,7 +90,8 @@ gpgconf_release (void *engine)
static gpgme_error_t
-gpgconf_new (void **engine, const char *file_name, const char *home_dir)
+gpgconf_new (void **engine, const char *file_name, const char *home_dir,
+ const char *version)
{
gpgme_error_t err = 0;
engine_gpgconf_t gpgconf;
diff --git a/src/engine-gpgsm.c b/src/engine-gpgsm.c
index 476e9ef..5b4ca40 100644
--- a/src/engine-gpgsm.c
+++ b/src/engine-gpgsm.c
@@ -235,7 +235,8 @@ gpgsm_release (void *engine)
static gpgme_error_t
-gpgsm_new (void **engine, const char *file_name, const char *home_dir)
+gpgsm_new (void **engine, const char *file_name, const char *home_dir,
+ const char *version)
{
gpgme_error_t err = 0;
engine_gpgsm_t gpgsm;
diff --git a/src/engine-spawn.c b/src/engine-spawn.c
index eb4e038..f0fe1f0 100644
--- a/src/engine-spawn.c
+++ b/src/engine-spawn.c
@@ -324,7 +324,8 @@ engspawn_get_req_version (void)
static gpgme_error_t
-engspawn_new (void **engine, const char *file_name, const char *home_dir)
+engspawn_new (void **engine, const char *file_name, const char *home_dir,
+ const char *version)
{
engine_spawn_t esp;
diff --git a/src/engine-uiserver.c b/src/engine-uiserver.c
index e4fd47c..4923c3a 100644
--- a/src/engine-uiserver.c
+++ b/src/engine-uiserver.c
@@ -236,7 +236,8 @@ uiserver_release (void *engine)
static gpgme_error_t
-uiserver_new (void **engine, const char *file_name, const char *home_dir)
+uiserver_new (void **engine, const char *file_name, const char *home_dir,
+ const char *version)
{
gpgme_error_t err = 0;
engine_uiserver_t uiserver;
diff --git a/src/engine.c b/src/engine.c
index 8e84da9..8b1e7df 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -463,7 +463,8 @@ _gpgme_engine_new (gpgme_engine_info_t info, engine_t *r_engine)
{
gpgme_error_t err;
err = (*engine->ops->new) (&engine->engine,
- info->file_name, info->home_dir);
+ info->file_name, info->home_dir,
+ info->version);
if (err)
{
free (engine);
--
2.5.0
More information about the Gnupg-devel
mailing list