2002-10-09 Marcus Brinkmann <marcus@g10code.de>
* rungpg.h (GpgStatusHandler): Rename type to GpgmeStatusHandler and move to ... * types.h (GpgmeStatusHandler): ... here. * rungpg.h (GpgColonLineHandler): Rename type to GpgmeColonLineHandler. and move to ... * types.h (GpgmeColonLineHandler): ... here. * rungpg.h (GpgCommandHandler): Rename type to GpgmeCommandHandler. and move to ... * types.h (GpgmeCommandHandler): ... here. * engine.h: Don't include "rungpg.h". (_gpgme_engine_set_status_handler): Change type of argument from GpgStatusHandler to GpgmeStatusHandler. (_gpgme_engine_set_colon_line_handler): Change type of argument from GpgColonLineHandler to GpgmeColonLineHandler. (_gpgme_engine_set_command_handler): Change type of argument from GpgCommandHandler to GpgmeCommandHandler. * engine-gpgsm.h: Don't include "rungpg.h". (_gpgme_gpgsm_set_status_handler): Change type of argument from GpgStatusHandler to GpgmeStatusHandler. (_gpgme_gpgsm_set_colon_line_handler): Change type of argument from GpgColonLineHandler to GpgmeColonLineHandler. * engine-gpgsm.c: Do not include "rungpg.h". (struct gpgsm_object_s): Change type of status.fnc to GpgmeStatusHandler. Change type of colon.fnc to GpgmeColonLineHandler. (gpgsm_assuan_simple_command): Change type of argument from GpgStatusHandler to GpgmeStatusHandler. (_gpgme_gpgsm_set_status_handler): Likewise. (_gpgme_gpgsm_set_colon_line_handler): Change type of argument from GpgColonLineHandler to GpgmeColonLineHandler. * rungpg.h (_gpgme_gpg_set_status_handler): Change type of argument from GpgStatusHandler to GpgmeStatusHandler. (_gpgme_gpg_set_colon_line_handler): Change type of argument from GpgColonLineHandler to GpgmeColonLineHandler. (_gpgme_gpg_set_command_handler): Change type of argument from GpgCommandHandler to GpgmeCommandHandler. * rungpg.c (struct gpg_object_s): Change type of status.fnc to GpgmeStatusHandler. Change type of colon.fnc to GpgmeColonLineHandler. Change type of cmd.fnc to GpgmeCommandLineHandler. (_gpgme_gpg_set_status_handler): Change type of argument FNC to GpgmeStatusHandler. (_gpgme_gpg_set_colon_line_handler): Change type of argument FNC to GpgmeColonLineHandler. (_gpgme_gpg_set_command_handler): Change type of argument FNC to GpgmeCommandHandler. * engine.c (_gpgme_engine_set_status_handler): Change type of argument FNC to GpgmeStatusHandler. (_gpgme_engine_set_colon_line_handler): Change type of argument FNC to GpgmeColonLineHandler. (_gpgme_engine_set_command_handler): Change type of argument FNC to GpgmeCommandHandler.
This commit is contained in:
parent
291b5c78f4
commit
dba1515d9c
@ -1,5 +1,58 @@
|
|||||||
2002-10-09 Marcus Brinkmann <marcus@g10code.de>
|
2002-10-09 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
|
* rungpg.h (GpgStatusHandler): Rename type to GpgmeStatusHandler
|
||||||
|
and move to ...
|
||||||
|
* types.h (GpgmeStatusHandler): ... here.
|
||||||
|
* rungpg.h (GpgColonLineHandler): Rename type to GpgmeColonLineHandler.
|
||||||
|
and move to ...
|
||||||
|
* types.h (GpgmeColonLineHandler): ... here.
|
||||||
|
* rungpg.h (GpgCommandHandler): Rename type to GpgmeCommandHandler.
|
||||||
|
and move to ...
|
||||||
|
* types.h (GpgmeCommandHandler): ... here.
|
||||||
|
* engine.h: Don't include "rungpg.h".
|
||||||
|
(_gpgme_engine_set_status_handler): Change type of
|
||||||
|
argument from GpgStatusHandler to GpgmeStatusHandler.
|
||||||
|
(_gpgme_engine_set_colon_line_handler): Change type of
|
||||||
|
argument from GpgColonLineHandler to GpgmeColonLineHandler.
|
||||||
|
(_gpgme_engine_set_command_handler): Change type of
|
||||||
|
argument from GpgCommandHandler to GpgmeCommandHandler.
|
||||||
|
* engine-gpgsm.h: Don't include "rungpg.h".
|
||||||
|
(_gpgme_gpgsm_set_status_handler): Change type of
|
||||||
|
argument from GpgStatusHandler to GpgmeStatusHandler.
|
||||||
|
(_gpgme_gpgsm_set_colon_line_handler): Change type of
|
||||||
|
argument from GpgColonLineHandler to GpgmeColonLineHandler.
|
||||||
|
* engine-gpgsm.c: Do not include "rungpg.h".
|
||||||
|
(struct gpgsm_object_s): Change type of
|
||||||
|
status.fnc to GpgmeStatusHandler. Change type of colon.fnc to
|
||||||
|
GpgmeColonLineHandler.
|
||||||
|
(gpgsm_assuan_simple_command): Change type of argument from
|
||||||
|
GpgStatusHandler to GpgmeStatusHandler.
|
||||||
|
(_gpgme_gpgsm_set_status_handler): Likewise.
|
||||||
|
(_gpgme_gpgsm_set_colon_line_handler): Change type of argument from
|
||||||
|
GpgColonLineHandler to GpgmeColonLineHandler.
|
||||||
|
* rungpg.h (_gpgme_gpg_set_status_handler): Change type of
|
||||||
|
argument from GpgStatusHandler to GpgmeStatusHandler.
|
||||||
|
(_gpgme_gpg_set_colon_line_handler): Change type of
|
||||||
|
argument from GpgColonLineHandler to GpgmeColonLineHandler.
|
||||||
|
(_gpgme_gpg_set_command_handler): Change type of
|
||||||
|
argument from GpgCommandHandler to GpgmeCommandHandler.
|
||||||
|
* rungpg.c (struct gpg_object_s): Change type of status.fnc to
|
||||||
|
GpgmeStatusHandler. Change type of colon.fnc to
|
||||||
|
GpgmeColonLineHandler. Change type of cmd.fnc to
|
||||||
|
GpgmeCommandLineHandler.
|
||||||
|
(_gpgme_gpg_set_status_handler): Change type of argument FNC to
|
||||||
|
GpgmeStatusHandler.
|
||||||
|
(_gpgme_gpg_set_colon_line_handler): Change type of argument FNC
|
||||||
|
to GpgmeColonLineHandler.
|
||||||
|
(_gpgme_gpg_set_command_handler): Change type of argument FNC to
|
||||||
|
GpgmeCommandHandler.
|
||||||
|
* engine.c (_gpgme_engine_set_status_handler): Change type of
|
||||||
|
argument FNC to GpgmeStatusHandler.
|
||||||
|
(_gpgme_engine_set_colon_line_handler): Change type of argument FNC
|
||||||
|
to GpgmeColonLineHandler.
|
||||||
|
(_gpgme_engine_set_command_handler): Change type of argument FNC to
|
||||||
|
GpgmeCommandHandler.
|
||||||
|
|
||||||
* rungpg.h (_gpgme_gpg_enable_pipemode): Remove prototype.
|
* rungpg.h (_gpgme_gpg_enable_pipemode): Remove prototype.
|
||||||
* rungpg.c (struct gpg_object_s): Remove PM.
|
* rungpg.c (struct gpg_object_s): Remove PM.
|
||||||
(pipemode_cb): Prototype removed.
|
(pipemode_cb): Prototype removed.
|
||||||
|
@ -1,23 +1,22 @@
|
|||||||
/* engine-gpgsm.c - GpgSM engine
|
/* engine-gpgsm.c - GpgSM engine.
|
||||||
* Copyright (C) 2000 Werner Koch (dd9jn)
|
Copyright (C) 2000 Werner Koch (dd9jn)
|
||||||
* Copyright (C) 2001, 2002 g10 Code GmbH
|
Copyright (C) 2001, 2002 g10 Code GmbH
|
||||||
*
|
|
||||||
* This file is part of GPGME.
|
This file is part of GPGME.
|
||||||
*
|
|
||||||
* GPGME is free software; you can redistribute it and/or modify
|
GPGME is free software; you can redistribute it and/or modify it
|
||||||
* it under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
(at your option) any later version.
|
||||||
*
|
|
||||||
* GPGME is distributed in the hope that it will be useful,
|
GPGME is distributed in the hope that it will be useful, but
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* GNU General Public License for more details.
|
General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
along with GPGME; if not, write to the Free Software Foundation,
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
*/
|
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
#if HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
@ -38,9 +37,6 @@
|
|||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <fcntl.h> /* FIXME */
|
#include <fcntl.h> /* FIXME */
|
||||||
|
|
||||||
#include "rungpg.h"
|
|
||||||
#include "status-table.h"
|
|
||||||
|
|
||||||
#include "gpgme.h"
|
#include "gpgme.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
@ -50,6 +46,8 @@
|
|||||||
#include "key.h"
|
#include "key.h"
|
||||||
#include "sema.h"
|
#include "sema.h"
|
||||||
|
|
||||||
|
#include "status-table.h"
|
||||||
|
|
||||||
#include "engine-gpgsm.h"
|
#include "engine-gpgsm.h"
|
||||||
|
|
||||||
#include "assuan.h"
|
#include "assuan.h"
|
||||||
@ -88,13 +86,13 @@ struct gpgsm_object_s
|
|||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
GpgStatusHandler fnc;
|
GpgmeStatusHandler fnc;
|
||||||
void *fnc_value;
|
void *fnc_value;
|
||||||
} status;
|
} status;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
GpgColonLineHandler fnc;
|
GpgmeColonLineHandler fnc;
|
||||||
void *fnc_value;
|
void *fnc_value;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
@ -550,7 +548,7 @@ _gpgme_gpgsm_release (GpgsmObject gpgsm)
|
|||||||
static GpgmeStatusCode parse_status (const char *name);
|
static GpgmeStatusCode parse_status (const char *name);
|
||||||
|
|
||||||
static GpgmeError
|
static GpgmeError
|
||||||
gpgsm_assuan_simple_command (ASSUAN_CONTEXT ctx, char *cmd, GpgStatusHandler status_fnc,
|
gpgsm_assuan_simple_command (ASSUAN_CONTEXT ctx, char *cmd, GpgmeStatusHandler status_fnc,
|
||||||
void *status_fnc_value)
|
void *status_fnc_value)
|
||||||
{
|
{
|
||||||
AssuanError err;
|
AssuanError err;
|
||||||
@ -1362,7 +1360,7 @@ gpgsm_status_handler (void *opaque, int fd)
|
|||||||
|
|
||||||
void
|
void
|
||||||
_gpgme_gpgsm_set_status_handler (GpgsmObject gpgsm,
|
_gpgme_gpgsm_set_status_handler (GpgsmObject gpgsm,
|
||||||
GpgStatusHandler fnc, void *fnc_value)
|
GpgmeStatusHandler fnc, void *fnc_value)
|
||||||
{
|
{
|
||||||
assert (gpgsm);
|
assert (gpgsm);
|
||||||
|
|
||||||
@ -1373,7 +1371,7 @@ _gpgme_gpgsm_set_status_handler (GpgsmObject gpgsm,
|
|||||||
|
|
||||||
void
|
void
|
||||||
_gpgme_gpgsm_set_colon_line_handler (GpgsmObject gpgsm,
|
_gpgme_gpgsm_set_colon_line_handler (GpgsmObject gpgsm,
|
||||||
GpgColonLineHandler fnc, void *fnc_value)
|
GpgmeColonLineHandler fnc, void *fnc_value)
|
||||||
{
|
{
|
||||||
assert (gpgsm);
|
assert (gpgsm);
|
||||||
|
|
||||||
@ -1481,7 +1479,7 @@ _gpgme_gpgsm_release (GpgsmObject gpgsm)
|
|||||||
|
|
||||||
void
|
void
|
||||||
_gpgme_gpgsm_set_status_handler (GpgsmObject gpgsm,
|
_gpgme_gpgsm_set_status_handler (GpgsmObject gpgsm,
|
||||||
GpgStatusHandler fnc, void *fnc_value)
|
GpgmeStatusHandler fnc, void *fnc_value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1573,7 +1571,7 @@ _gpgme_gpgsm_op_verify (GpgsmObject gpgsm, GpgmeData sig, GpgmeData text)
|
|||||||
|
|
||||||
void
|
void
|
||||||
_gpgme_gpgsm_set_colon_line_handler (GpgsmObject gpgsm,
|
_gpgme_gpgsm_set_colon_line_handler (GpgsmObject gpgsm,
|
||||||
GpgColonLineHandler fnc, void *fnc_value)
|
GpgmeColonLineHandler fnc, void *fnc_value)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,29 +1,27 @@
|
|||||||
/* engine-gpgsm.h - GPGME GpgSM engine calling functions
|
/* engine-gpgsm.h - GPGME GpgSM engine calling functions
|
||||||
* Copyright (C) 2000 Werner Koch (dd9jn)
|
Copyright (C) 2000 Werner Koch (dd9jn)
|
||||||
* Copyright (C) 2001, 2002 g10 Code GmbH
|
Copyright (C) 2001, 2002 g10 Code GmbH
|
||||||
*
|
|
||||||
* This file is part of GPGME.
|
This file is part of GPGME.
|
||||||
*
|
|
||||||
* GPGME is free software; you can redistribute it and/or modify
|
GPGME is free software; you can redistribute it and/or modify it
|
||||||
* it under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
(at your option) any later version.
|
||||||
*
|
|
||||||
* GPGME is distributed in the hope that it will be useful,
|
GPGME is distributed in the hope that it will be useful, but
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* GNU General Public License for more details.
|
General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
along with GPGME; if not, write to the Free Software Foundation,
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef ENGINE_GPGSM_H
|
#ifndef ENGINE_GPGSM_H
|
||||||
#define ENGINE_GPGSM_H
|
#define ENGINE_GPGSM_H
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "rungpg.h" /* FIXME statusHandler */
|
|
||||||
|
|
||||||
const char *_gpgme_gpgsm_get_version (void);
|
const char *_gpgme_gpgsm_get_version (void);
|
||||||
GpgmeError _gpgme_gpgsm_check_version (void);
|
GpgmeError _gpgme_gpgsm_check_version (void);
|
||||||
@ -32,9 +30,9 @@ GpgmeError _gpgme_gpgsm_new (GpgsmObject *r_gpg);
|
|||||||
void _gpgme_gpgsm_release (GpgsmObject gpg);
|
void _gpgme_gpgsm_release (GpgsmObject gpg);
|
||||||
|
|
||||||
void _gpgme_gpgsm_set_status_handler (GpgsmObject gpgsm,
|
void _gpgme_gpgsm_set_status_handler (GpgsmObject gpgsm,
|
||||||
GpgStatusHandler fnc, void *fnc_value);
|
GpgmeStatusHandler fnc, void *fnc_value);
|
||||||
void _gpgme_gpgsm_set_colon_line_handler (GpgsmObject gpgsm,
|
void _gpgme_gpgsm_set_colon_line_handler (GpgsmObject gpgsm,
|
||||||
GpgColonLineHandler fnc, void *fnc_value) ;
|
GpgmeColonLineHandler fnc, void *fnc_value) ;
|
||||||
GpgmeError _gpgme_gpgsm_op_decrypt (GpgsmObject gpgsm, GpgmeData ciph,
|
GpgmeError _gpgme_gpgsm_op_decrypt (GpgsmObject gpgsm, GpgmeData ciph,
|
||||||
GpgmeData plain);
|
GpgmeData plain);
|
||||||
GpgmeError _gpgme_gpgsm_op_delete (GpgsmObject gpgsm, GpgmeKey key,
|
GpgmeError _gpgme_gpgsm_op_delete (GpgsmObject gpgsm, GpgmeKey key,
|
||||||
|
@ -1,23 +1,22 @@
|
|||||||
/* engine.c
|
/* engine.c
|
||||||
* Copyright (C) 2000 Werner Koch (dd9jn)
|
Copyright (C) 2000 Werner Koch (dd9jn)
|
||||||
* Copyright (C) 2001 g10 Code GmbH
|
Copyright (C) 2001, 2002 g10 Code GmbH
|
||||||
*
|
|
||||||
* This file is part of GPGME.
|
This file is part of GPGME.
|
||||||
*
|
|
||||||
* GPGME is free software; you can redistribute it and/or modify
|
GPGME is free software; you can redistribute it and/or modify it
|
||||||
* it under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
(at your option) any later version.
|
||||||
*
|
|
||||||
* GPGME is distributed in the hope that it will be useful,
|
GPGME is distributed in the hope that it will be useful, but
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* GNU General Public License for more details.
|
General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
along with GPGME; if not, write to the Free Software Foundation,
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
@ -229,7 +228,7 @@ _gpgme_engine_set_verbosity (EngineObject engine, int verbosity)
|
|||||||
|
|
||||||
void
|
void
|
||||||
_gpgme_engine_set_status_handler (EngineObject engine,
|
_gpgme_engine_set_status_handler (EngineObject engine,
|
||||||
GpgStatusHandler fnc, void *fnc_value)
|
GpgmeStatusHandler fnc, void *fnc_value)
|
||||||
{
|
{
|
||||||
if (!engine)
|
if (!engine)
|
||||||
return;
|
return;
|
||||||
@ -249,7 +248,7 @@ _gpgme_engine_set_status_handler (EngineObject engine,
|
|||||||
|
|
||||||
GpgmeError
|
GpgmeError
|
||||||
_gpgme_engine_set_command_handler (EngineObject engine,
|
_gpgme_engine_set_command_handler (EngineObject engine,
|
||||||
GpgCommandHandler fnc, void *fnc_value,
|
GpgmeCommandHandler fnc, void *fnc_value,
|
||||||
GpgmeData linked_data)
|
GpgmeData linked_data)
|
||||||
{
|
{
|
||||||
if (!engine)
|
if (!engine)
|
||||||
@ -270,7 +269,7 @@ _gpgme_engine_set_command_handler (EngineObject engine,
|
|||||||
}
|
}
|
||||||
|
|
||||||
GpgmeError _gpgme_engine_set_colon_line_handler (EngineObject engine,
|
GpgmeError _gpgme_engine_set_colon_line_handler (EngineObject engine,
|
||||||
GpgColonLineHandler fnc,
|
GpgmeColonLineHandler fnc,
|
||||||
void *fnc_value)
|
void *fnc_value)
|
||||||
{
|
{
|
||||||
if (!engine)
|
if (!engine)
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#define ENGINE_H
|
#define ENGINE_H
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "rungpg.h"
|
|
||||||
|
|
||||||
const char *_gpgme_engine_get_path (GpgmeProtocol proto);
|
const char *_gpgme_engine_get_path (GpgmeProtocol proto);
|
||||||
const char *_gpgme_engine_get_version (GpgmeProtocol proto);
|
const char *_gpgme_engine_get_version (GpgmeProtocol proto);
|
||||||
@ -31,13 +30,13 @@ const char * _gpgme_engine_get_info (GpgmeProtocol proto);
|
|||||||
GpgmeError _gpgme_engine_new (GpgmeProtocol proto, EngineObject *r_engine);
|
GpgmeError _gpgme_engine_new (GpgmeProtocol proto, EngineObject *r_engine);
|
||||||
void _gpgme_engine_release (EngineObject engine);
|
void _gpgme_engine_release (EngineObject engine);
|
||||||
void _gpgme_engine_set_status_handler (EngineObject engine,
|
void _gpgme_engine_set_status_handler (EngineObject engine,
|
||||||
GpgStatusHandler fnc, void *fnc_value);
|
GpgmeStatusHandler fnc, void *fnc_value);
|
||||||
GpgmeError _gpgme_engine_set_command_handler (EngineObject engine,
|
GpgmeError _gpgme_engine_set_command_handler (EngineObject engine,
|
||||||
GpgCommandHandler fnc,
|
GpgmeCommandHandler fnc,
|
||||||
void *fnc_value,
|
void *fnc_value,
|
||||||
GpgmeData data);
|
GpgmeData data);
|
||||||
GpgmeError _gpgme_engine_set_colon_line_handler (EngineObject gpg,
|
GpgmeError _gpgme_engine_set_colon_line_handler (EngineObject gpg,
|
||||||
GpgColonLineHandler fnc,
|
GpgmeColonLineHandler fnc,
|
||||||
void *fnc_value);
|
void *fnc_value);
|
||||||
void _gpgme_engine_set_verbosity (EngineObject engine, int verbosity);
|
void _gpgme_engine_set_verbosity (EngineObject engine, int verbosity);
|
||||||
GpgmeError _gpgme_engine_op_decrypt (EngineObject engine, GpgmeData ciph,
|
GpgmeError _gpgme_engine_op_decrypt (EngineObject engine, GpgmeData ciph,
|
||||||
|
@ -80,7 +80,7 @@ struct gpg_object_s
|
|||||||
char *buffer;
|
char *buffer;
|
||||||
size_t readpos;
|
size_t readpos;
|
||||||
int eof;
|
int eof;
|
||||||
GpgStatusHandler fnc;
|
GpgmeStatusHandler fnc;
|
||||||
void *fnc_value;
|
void *fnc_value;
|
||||||
void *tag;
|
void *tag;
|
||||||
} status;
|
} status;
|
||||||
@ -93,7 +93,7 @@ struct gpg_object_s
|
|||||||
char *buffer;
|
char *buffer;
|
||||||
size_t readpos;
|
size_t readpos;
|
||||||
int eof;
|
int eof;
|
||||||
GpgColonLineHandler fnc; /* this indicate use of this structrue */
|
GpgmeColonLineHandler fnc; /* this indicate use of this structrue */
|
||||||
void *fnc_value;
|
void *fnc_value;
|
||||||
void *tag;
|
void *tag;
|
||||||
} colon;
|
} colon;
|
||||||
@ -110,7 +110,7 @@ struct gpg_object_s
|
|||||||
GpgmeData cb_data; /* hack to get init the above idx later */
|
GpgmeData cb_data; /* hack to get init the above idx later */
|
||||||
GpgmeStatusCode code; /* last code */
|
GpgmeStatusCode code; /* last code */
|
||||||
char *keyword; /* what has been requested (malloced) */
|
char *keyword; /* what has been requested (malloced) */
|
||||||
GpgCommandHandler fnc;
|
GpgmeCommandHandler fnc;
|
||||||
void *fnc_value;
|
void *fnc_value;
|
||||||
/* The kludges never end. This is used to couple command handlers
|
/* The kludges never end. This is used to couple command handlers
|
||||||
with output data in edit key mode. */
|
with output data in edit key mode. */
|
||||||
@ -403,7 +403,7 @@ _gpgme_gpg_set_verbosity (GpgObject gpg, int verbosity)
|
|||||||
value. */
|
value. */
|
||||||
void
|
void
|
||||||
_gpgme_gpg_set_status_handler (GpgObject gpg,
|
_gpgme_gpg_set_status_handler (GpgObject gpg,
|
||||||
GpgStatusHandler fnc, void *fnc_value)
|
GpgmeStatusHandler fnc, void *fnc_value)
|
||||||
{
|
{
|
||||||
assert (gpg);
|
assert (gpg);
|
||||||
|
|
||||||
@ -414,7 +414,7 @@ _gpgme_gpg_set_status_handler (GpgObject gpg,
|
|||||||
/* Kludge to process --with-colon output. */
|
/* Kludge to process --with-colon output. */
|
||||||
GpgmeError
|
GpgmeError
|
||||||
_gpgme_gpg_set_colon_line_handler (GpgObject gpg,
|
_gpgme_gpg_set_colon_line_handler (GpgObject gpg,
|
||||||
GpgColonLineHandler fnc, void *fnc_value)
|
GpgmeColonLineHandler fnc, void *fnc_value)
|
||||||
{
|
{
|
||||||
assert (gpg);
|
assert (gpg);
|
||||||
|
|
||||||
@ -448,7 +448,7 @@ _gpgme_gpg_set_colon_line_handler (GpgObject gpg,
|
|||||||
the first call is passed as keyword. */
|
the first call is passed as keyword. */
|
||||||
GpgmeError
|
GpgmeError
|
||||||
_gpgme_gpg_set_command_handler (GpgObject gpg,
|
_gpgme_gpg_set_command_handler (GpgObject gpg,
|
||||||
GpgCommandHandler fnc, void *fnc_value,
|
GpgmeCommandHandler fnc, void *fnc_value,
|
||||||
GpgmeData linked_data)
|
GpgmeData linked_data)
|
||||||
{
|
{
|
||||||
GpgmeData tmp;
|
GpgmeData tmp;
|
||||||
|
@ -23,24 +23,19 @@
|
|||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
typedef void (*GpgStatusHandler) (GpgmeCtx, GpgmeStatusCode code, char *args);
|
|
||||||
typedef void (*GpgColonLineHandler)( GpgmeCtx, char *line);
|
|
||||||
typedef const char *(*GpgCommandHandler) (void*, GpgmeStatusCode code,
|
|
||||||
const char *keyword);
|
|
||||||
|
|
||||||
const char *_gpgme_gpg_get_version (void);
|
const char *_gpgme_gpg_get_version (void);
|
||||||
GpgmeError _gpgme_gpg_check_version (void);
|
GpgmeError _gpgme_gpg_check_version (void);
|
||||||
|
|
||||||
GpgmeError _gpgme_gpg_new (GpgObject *r_gpg);
|
GpgmeError _gpgme_gpg_new (GpgObject *r_gpg);
|
||||||
void _gpgme_gpg_release (GpgObject gpg);
|
void _gpgme_gpg_release (GpgObject gpg);
|
||||||
GpgmeError _gpgme_gpg_set_verbosity (GpgObject gpg, int verbosity);
|
GpgmeError _gpgme_gpg_set_verbosity (GpgObject gpg, int verbosity);
|
||||||
void _gpgme_gpg_set_status_handler (GpgObject gpg, GpgStatusHandler fnc,
|
void _gpgme_gpg_set_status_handler (GpgObject gpg, GpgmeStatusHandler fnc,
|
||||||
void *fnc_value);
|
void *fnc_value);
|
||||||
GpgmeError _gpgme_gpg_set_colon_line_handler (GpgObject gpg,
|
GpgmeError _gpgme_gpg_set_colon_line_handler (GpgObject gpg,
|
||||||
GpgColonLineHandler fnc,
|
GpgmeColonLineHandler fnc,
|
||||||
void *fnc_value);
|
void *fnc_value);
|
||||||
GpgmeError _gpgme_gpg_set_command_handler (GpgObject gpg,
|
GpgmeError _gpgme_gpg_set_command_handler (GpgObject gpg,
|
||||||
GpgCommandHandler fnc,
|
GpgmeCommandHandler fnc,
|
||||||
void *fnc_value,
|
void *fnc_value,
|
||||||
GpgmeData linked_data);
|
GpgmeData linked_data);
|
||||||
|
|
||||||
|
@ -1,23 +1,22 @@
|
|||||||
/* types.h - Some type definitions
|
/* types.h - Some type definitions
|
||||||
* Copyright (C) 2000 Werner Koch (dd9jn)
|
Copyright (C) 2000 Werner Koch (dd9jn)
|
||||||
* Copyright (C) 2001, 2002 g10 Code GmbH
|
Copyright (C) 2001, 2002 g10 Code GmbH
|
||||||
*
|
|
||||||
* This file is part of GPGME.
|
This file is part of GPGME.
|
||||||
*
|
|
||||||
* GPGME is free software; you can redistribute it and/or modify
|
GPGME is free software; you can redistribute it and/or modify it
|
||||||
* it under the terms of the GNU General Public License as published by
|
under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
(at your option) any later version.
|
||||||
*
|
|
||||||
* GPGME is distributed in the hope that it will be useful,
|
GPGME is distributed in the hope that it will be useful, but
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* GNU General Public License for more details.
|
General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
along with GPGME; if not, write to the Free Software Foundation,
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef TYPES_H
|
#ifndef TYPES_H
|
||||||
#define TYPES_H
|
#define TYPES_H
|
||||||
@ -36,6 +35,13 @@ typedef unsigned long ulong;
|
|||||||
* Declaration of internal objects
|
* Declaration of internal objects
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
typedef void (*GpgmeStatusHandler) (GpgmeCtx, GpgmeStatusCode code,
|
||||||
|
char *args);
|
||||||
|
typedef void (*GpgmeColonLineHandler) (GpgmeCtx, char *line);
|
||||||
|
typedef const char *(*GpgmeCommandHandler) (void*, GpgmeStatusCode code,
|
||||||
|
const char *keyword);
|
||||||
|
|
||||||
|
|
||||||
/*-- engine.c --*/
|
/*-- engine.c --*/
|
||||||
struct engine_object_s;
|
struct engine_object_s;
|
||||||
typedef struct engine_object_s *EngineObject;
|
typedef struct engine_object_s *EngineObject;
|
||||||
|
Loading…
Reference in New Issue
Block a user