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.c (struct gpg_object_s): Remove PM.
(pipemode_cb): Prototype removed.
-/* engine-gpgsm.c - GpgSM engine
- * Copyright (C) 2000 Werner Koch (dd9jn)
- * Copyright (C) 2001, 2002 g10 Code GmbH
- *
- * This file is part of GPGME.
- *
- * GPGME is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * GPGME is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
+/* engine-gpgsm.c - GpgSM engine.
+ Copyright (C) 2000 Werner Koch (dd9jn)
+ Copyright (C) 2001, 2002 g10 Code GmbH
+
+ This file is part of GPGME.
+
+ GPGME is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ GPGME is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GPGME; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#if HAVE_CONFIG_H
#include <config.h>
#include <locale.h>
#include <fcntl.h> /* FIXME */
-#include "rungpg.h"
-#include "status-table.h"
-
#include "gpgme.h"
#include "util.h"
#include "types.h"
#include "key.h"
#include "sema.h"
+#include "status-table.h"
+
#include "engine-gpgsm.h"
#include "assuan.h"
struct
{
- GpgStatusHandler fnc;
+ GpgmeStatusHandler fnc;
void *fnc_value;
} status;
struct
{
- GpgColonLineHandler fnc;
+ GpgmeColonLineHandler fnc;
void *fnc_value;
struct
{
static GpgmeStatusCode parse_status (const char *name);
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)
{
AssuanError err;
void
_gpgme_gpgsm_set_status_handler (GpgsmObject gpgsm,
- GpgStatusHandler fnc, void *fnc_value)
+ GpgmeStatusHandler fnc, void *fnc_value)
{
assert (gpgsm);
void
_gpgme_gpgsm_set_colon_line_handler (GpgsmObject gpgsm,
- GpgColonLineHandler fnc, void *fnc_value)
+ GpgmeColonLineHandler fnc, void *fnc_value)
{
assert (gpgsm);
void
_gpgme_gpgsm_set_status_handler (GpgsmObject gpgsm,
- GpgStatusHandler fnc, void *fnc_value)
+ GpgmeStatusHandler fnc, void *fnc_value)
{
return;
}
void
_gpgme_gpgsm_set_colon_line_handler (GpgsmObject gpgsm,
- GpgColonLineHandler fnc, void *fnc_value)
+ GpgmeColonLineHandler fnc, void *fnc_value)
{
}
/* engine-gpgsm.h - GPGME GpgSM engine calling functions
- * Copyright (C) 2000 Werner Koch (dd9jn)
- * Copyright (C) 2001, 2002 g10 Code GmbH
- *
- * This file is part of GPGME.
- *
- * GPGME is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * GPGME is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
+ Copyright (C) 2000 Werner Koch (dd9jn)
+ Copyright (C) 2001, 2002 g10 Code GmbH
+
+ This file is part of GPGME.
+
+ GPGME is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ GPGME is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GPGME; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef ENGINE_GPGSM_H
#define ENGINE_GPGSM_H
#include "types.h"
-#include "rungpg.h" /* FIXME statusHandler */
const char *_gpgme_gpgsm_get_version (void);
GpgmeError _gpgme_gpgsm_check_version (void);
void _gpgme_gpgsm_release (GpgsmObject gpg);
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,
- GpgColonLineHandler fnc, void *fnc_value) ;
+ GpgmeColonLineHandler fnc, void *fnc_value) ;
GpgmeError _gpgme_gpgsm_op_decrypt (GpgsmObject gpgsm, GpgmeData ciph,
GpgmeData plain);
GpgmeError _gpgme_gpgsm_op_delete (GpgsmObject gpgsm, GpgmeKey key,
/* engine.c
- * Copyright (C) 2000 Werner Koch (dd9jn)
- * Copyright (C) 2001 g10 Code GmbH
- *
- * This file is part of GPGME.
- *
- * GPGME is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * GPGME is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
+ Copyright (C) 2000 Werner Koch (dd9jn)
+ Copyright (C) 2001, 2002 g10 Code GmbH
+
+ This file is part of GPGME.
+
+ GPGME is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ GPGME is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GPGME; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
void
_gpgme_engine_set_status_handler (EngineObject engine,
- GpgStatusHandler fnc, void *fnc_value)
+ GpgmeStatusHandler fnc, void *fnc_value)
{
if (!engine)
return;
GpgmeError
_gpgme_engine_set_command_handler (EngineObject engine,
- GpgCommandHandler fnc, void *fnc_value,
+ GpgmeCommandHandler fnc, void *fnc_value,
GpgmeData linked_data)
{
if (!engine)
}
GpgmeError _gpgme_engine_set_colon_line_handler (EngineObject engine,
- GpgColonLineHandler fnc,
+ GpgmeColonLineHandler fnc,
void *fnc_value)
{
if (!engine)
#define ENGINE_H
#include "types.h"
-#include "rungpg.h"
-
+
const char *_gpgme_engine_get_path (GpgmeProtocol proto);
const char *_gpgme_engine_get_version (GpgmeProtocol proto);
const char * _gpgme_engine_get_info (GpgmeProtocol proto);
GpgmeError _gpgme_engine_new (GpgmeProtocol proto, EngineObject *r_engine);
void _gpgme_engine_release (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,
- GpgCommandHandler fnc,
+ GpgmeCommandHandler fnc,
void *fnc_value,
GpgmeData data);
GpgmeError _gpgme_engine_set_colon_line_handler (EngineObject gpg,
- GpgColonLineHandler fnc,
+ GpgmeColonLineHandler fnc,
void *fnc_value);
void _gpgme_engine_set_verbosity (EngineObject engine, int verbosity);
GpgmeError _gpgme_engine_op_decrypt (EngineObject engine, GpgmeData ciph,
char *buffer;
size_t readpos;
int eof;
- GpgStatusHandler fnc;
+ GpgmeStatusHandler fnc;
void *fnc_value;
void *tag;
} status;
char *buffer;
size_t readpos;
int eof;
- GpgColonLineHandler fnc; /* this indicate use of this structrue */
+ GpgmeColonLineHandler fnc; /* this indicate use of this structrue */
void *fnc_value;
void *tag;
} colon;
GpgmeData cb_data; /* hack to get init the above idx later */
GpgmeStatusCode code; /* last code */
char *keyword; /* what has been requested (malloced) */
- GpgCommandHandler fnc;
+ GpgmeCommandHandler fnc;
void *fnc_value;
/* The kludges never end. This is used to couple command handlers
with output data in edit key mode. */
value. */
void
_gpgme_gpg_set_status_handler (GpgObject gpg,
- GpgStatusHandler fnc, void *fnc_value)
+ GpgmeStatusHandler fnc, void *fnc_value)
{
assert (gpg);
/* Kludge to process --with-colon output. */
GpgmeError
_gpgme_gpg_set_colon_line_handler (GpgObject gpg,
- GpgColonLineHandler fnc, void *fnc_value)
+ GpgmeColonLineHandler fnc, void *fnc_value)
{
assert (gpg);
the first call is passed as keyword. */
GpgmeError
_gpgme_gpg_set_command_handler (GpgObject gpg,
- GpgCommandHandler fnc, void *fnc_value,
+ GpgmeCommandHandler fnc, void *fnc_value,
GpgmeData linked_data)
{
GpgmeData tmp;
/* rungpg.h - GPGME GnuPG engine calling functions.
- Copyright (C) 2000 Werner Koch (dd9jn)
- Copyright (C) 2001, 2002 g10 Code GmbH
+ Copyright (C) 2000 Werner Koch (dd9jn)
+ Copyright (C) 2001, 2002 g10 Code GmbH
This file is part of GPGME.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with GPGME; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with GPGME; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef RUNGPG_H
#define RUNGPG_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);
GpgmeError _gpgme_gpg_check_version (void);
GpgmeError _gpgme_gpg_new (GpgObject *r_gpg);
void _gpgme_gpg_release (GpgObject gpg);
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);
GpgmeError _gpgme_gpg_set_colon_line_handler (GpgObject gpg,
- GpgColonLineHandler fnc,
+ GpgmeColonLineHandler fnc,
void *fnc_value);
GpgmeError _gpgme_gpg_set_command_handler (GpgObject gpg,
- GpgCommandHandler fnc,
+ GpgmeCommandHandler fnc,
void *fnc_value,
GpgmeData linked_data);
/* types.h - Some type definitions
- * Copyright (C) 2000 Werner Koch (dd9jn)
- * Copyright (C) 2001, 2002 g10 Code GmbH
- *
- * This file is part of GPGME.
- *
- * GPGME is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * GPGME is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
+ Copyright (C) 2000 Werner Koch (dd9jn)
+ Copyright (C) 2001, 2002 g10 Code GmbH
+
+ This file is part of GPGME.
+
+ GPGME is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ GPGME is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GPGME; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef TYPES_H
#define TYPES_H
* 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 --*/
struct engine_object_s;
typedef struct engine_object_s *EngineObject;