* types.h: File removed.
* Makefile.am (libgpgme_la_SOURCES): Remove types.h.
* io.h (struct spawn_fd_item_s): Do not include "types.h".
* key.h: Likewise.
* context.h: Likewise.
* cengine-gpgsm.h: Likewise.
* engine.h: Include "gpgme.h" instead "types.h". Add prototypes
for EngineStatusHandler, EngineColonLineHandler and
EngineCommandHandler.
(_gpgme_engine_set_status_handler): Change parameter type from
GpgmeStatusHandler to EngineStatusHandler.
(_gpgme_engine_set_command_handler): Change parameter type from
GpgmeCommandHandler to EngineCommandHandler.
(_gpgme_engine_set_colon_line_handler): Change parameter type from
GpgmeColonLineHandler to EngineColonLineHandler.
* engine-backend.h: Include "engine.h" instead "types.h".
(struct engine_ops): Change Gpgme*Handler parameters in members
set_command_handler, set_colon_line_handler and set_status_handler
to Engine*Handler.
* engine.c (_gpgme_engine_set_status_handler): Change parameter
type from GpgmeStatusHandler to EngineStatusHandler.
(_gpgme_engine_set_command_handler): Change parameter type from
GpgmeCommandHandler to EngineCommandHandler.
(_gpgme_engine_set_colon_line_handler): Change parameter type from
GpgmeColonLineHandler to EngineColonLineHandler.
* rungpg.c (struct gpg_object_s): Change type of member status.fnc
from GpgmeStatusHandler to EngineStatusHandler. Change type of
member colon.fnc from GpgmeColonLineHandler to
EngineColonLineHandler. Change type of member cmd.fnc from
GpgmeCommandHandler to EngineCommandHandler.
* engine-gpgsm.c (struct gpgsm_object_s): Likewise.
* rungpg.c (gpg_set_status_handler): Change parameter type from
GpgmeStatusHandler to EngineStatusHandler.
* engine-gpgsm.c (gpgsm_set_status_handler): Likewise.
(assuan_simple_command): Likewise.
* rungpg.c (gpg_set_colon_line_handler): Change parameter type
from GpgmeColonLineHandler to EngineColonLineHandler.
* engine-gpgsm.c (gpgsm_set_colon_line_handler): Likewise.
* rungpg.c (gpg_set_command_handler): Change parameter type from
GpgmeCommandHandler to EngineCommandHandler.
2003-01-30 Marcus Brinkmann <marcus@g10code.de>
+ * types.h: File removed.
+ * Makefile.am (libgpgme_la_SOURCES): Remove types.h.
+ * io.h (struct spawn_fd_item_s): Do not include "types.h".
+ * key.h: Likewise.
+ * context.h: Likewise.
+ * cengine-gpgsm.h: Likewise.
+ * engine.h: Include "gpgme.h" instead "types.h". Add prototypes
+ for EngineStatusHandler, EngineColonLineHandler and
+ EngineCommandHandler.
+ (_gpgme_engine_set_status_handler): Change parameter type from
+ GpgmeStatusHandler to EngineStatusHandler.
+ (_gpgme_engine_set_command_handler): Change parameter type from
+ GpgmeCommandHandler to EngineCommandHandler.
+ (_gpgme_engine_set_colon_line_handler): Change parameter type from
+ GpgmeColonLineHandler to EngineColonLineHandler.
+ * engine-backend.h: Include "engine.h" instead "types.h".
+ (struct engine_ops): Change Gpgme*Handler parameters in members
+ set_command_handler, set_colon_line_handler and set_status_handler
+ to Engine*Handler.
+ * engine.c (_gpgme_engine_set_status_handler): Change parameter
+ type from GpgmeStatusHandler to EngineStatusHandler.
+ (_gpgme_engine_set_command_handler): Change parameter type from
+ GpgmeCommandHandler to EngineCommandHandler.
+ (_gpgme_engine_set_colon_line_handler): Change parameter type from
+ GpgmeColonLineHandler to EngineColonLineHandler.
+ * rungpg.c (struct gpg_object_s): Change type of member status.fnc
+ from GpgmeStatusHandler to EngineStatusHandler. Change type of
+ member colon.fnc from GpgmeColonLineHandler to
+ EngineColonLineHandler. Change type of member cmd.fnc from
+ GpgmeCommandHandler to EngineCommandHandler.
+ * engine-gpgsm.c (struct gpgsm_object_s): Likewise.
+ * rungpg.c (gpg_set_status_handler): Change parameter type from
+ GpgmeStatusHandler to EngineStatusHandler.
+ * engine-gpgsm.c (gpgsm_set_status_handler): Likewise.
+ (assuan_simple_command): Likewise.
+ * rungpg.c (gpg_set_colon_line_handler): Change parameter type
+ from GpgmeColonLineHandler to EngineColonLineHandler.
+ * engine-gpgsm.c (gpgsm_set_colon_line_handler): Likewise.
+ * rungpg.c (gpg_set_command_handler): Change parameter type from
+ GpgmeCommandHandler to EngineCommandHandler.
+
* engine-gpgsm.c (status_handler): Do not close status fd at end
of function.
# Copyright (C) 2000 Werner Koch (dd9jn)
-# Copyright (C) 2001, 2002 g10 Code GmbH
+# Copyright (C) 2001, 2002, 2003 g10 Code GmbH
#
# This file is part of GPGME.
#
endif
libgpgme_la_SOURCES = \
- gpgme.h types.h util.h conversion.c context.h ops.h \
+ gpgme.h util.h conversion.c context.h ops.h \
data.h data.c data-fd.c data-stream.c data-mem.c data-user.c \
data-compat.c \
recipient.c signers.c \
#define CONTEXT_H
#include "gpgme.h"
-#include "types.h"
#include "engine.h"
#include "wait.h"
#ifndef ENGINE_BACKEND_H
#define ENGINE_BACKEND_H
-#include "types.h"
-
+#include "engine.h"
/* FIXME: Correct check? */
#ifdef GPGSM_PATH
#define ENABLE_GPGSM 1
#endif
-
struct engine_ops
{
/* Static functions. */
/* Member functions. */
void (*release) (void *engine);
- void (*set_status_handler) (void *engine, GpgmeStatusHandler fnc,
+ void (*set_status_handler) (void *engine, EngineStatusHandler fnc,
void *fnc_value);
- GpgmeError (*set_command_handler) (void *engine, GpgmeCommandHandler fnc,
+ GpgmeError (*set_command_handler) (void *engine, EngineCommandHandler fnc,
void *fnc_value, GpgmeData data);
GpgmeError (*set_colon_line_handler) (void *engine,
- GpgmeColonLineHandler fnc,
+ EngineColonLineHandler fnc,
void *fnc_value);
GpgmeError (*set_verbosity) (void *engine, int verbosity);
GpgmeError (*decrypt) (void *engine, GpgmeData ciph, GpgmeData plain);
#include "gpgme.h"
#include "util.h"
-#include "types.h"
#include "ops.h"
#include "wait.h"
#include "io.h"
struct
{
- GpgmeStatusHandler fnc;
+ EngineStatusHandler fnc;
void *fnc_value;
} status;
struct
{
- GpgmeColonLineHandler fnc;
+ EngineColonLineHandler fnc;
void *fnc_value;
struct
{
static GpgmeStatusCode parse_status (const char *name);
static GpgmeError
-gpgsm_assuan_simple_command (ASSUAN_CONTEXT ctx, char *cmd, GpgmeStatusHandler status_fnc,
+gpgsm_assuan_simple_command (ASSUAN_CONTEXT ctx, char *cmd, EngineStatusHandler status_fnc,
void *status_fnc_value)
{
AssuanError err;
static void
-gpgsm_set_status_handler (void *engine, GpgmeStatusHandler fnc,
+gpgsm_set_status_handler (void *engine, EngineStatusHandler fnc,
void *fnc_value)
{
GpgsmObject gpgsm = engine;
static GpgmeError
-gpgsm_set_colon_line_handler (void *engine, GpgmeColonLineHandler fnc,
+gpgsm_set_colon_line_handler (void *engine, EngineColonLineHandler fnc,
void *fnc_value)
{
GpgsmObject gpgsm = engine;
void
_gpgme_engine_set_status_handler (EngineObject engine,
- GpgmeStatusHandler fnc, void *fnc_value)
+ EngineStatusHandler fnc, void *fnc_value)
{
if (!engine)
return;
GpgmeError
_gpgme_engine_set_command_handler (EngineObject engine,
- GpgmeCommandHandler fnc, void *fnc_value,
+ EngineCommandHandler fnc, void *fnc_value,
GpgmeData linked_data)
{
if (!engine)
}
GpgmeError _gpgme_engine_set_colon_line_handler (EngineObject engine,
- GpgmeColonLineHandler fnc,
+ EngineColonLineHandler fnc,
void *fnc_value)
{
if (!engine)
#ifndef ENGINE_H
#define ENGINE_H
-#include "types.h"
+#include "gpgme.h"
struct engine_object_s;
typedef struct engine_object_s *EngineObject;
+typedef GpgmeError (*EngineStatusHandler) (void *priv, GpgmeStatusCode code,
+ char *args);
+typedef GpgmeError (*EngineColonLineHandler) (void *priv, char *line);
+typedef GpgmeError (*EngineCommandHandler) (void *priv, GpgmeStatusCode code,
+ const char *keyword,
+ const char **result);
+
GpgmeError _gpgme_engine_new (GpgmeProtocol proto, EngineObject *r_engine);
void _gpgme_engine_release (EngineObject engine);
void _gpgme_engine_set_status_handler (EngineObject engine,
- GpgmeStatusHandler fnc,
+ EngineStatusHandler fnc,
void *fnc_value);
GpgmeError _gpgme_engine_set_command_handler (EngineObject engine,
- GpgmeCommandHandler fnc,
+ EngineCommandHandler fnc,
void *fnc_value,
GpgmeData data);
GpgmeError _gpgme_engine_set_colon_line_handler (EngineObject engine,
- GpgmeColonLineHandler fnc,
+ EngineColonLineHandler fnc,
void *fnc_value);
void _gpgme_engine_set_verbosity (EngineObject engine, int verbosity);
GpgmeError _gpgme_engine_op_decrypt (EngineObject engine, GpgmeData ciph,
/* io.h - Interface to the I/O 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, 2003 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 IO_H
#define IO_H
-#include "types.h"
-
/* A single file descriptor passed to spawn. For child fds, dup_to
specifies the fd it should become in the child. */
struct spawn_fd_item_s
/* key.h - Key handling interface.
Copyright (C) 2000 Werner Koch (dd9jn)
- Copyright (C) 2001, 2002 g10 Code GmbH
+ Copyright (C) 2001, 2002, 2003 g10 Code GmbH
This file is part of GPGME.
#define KEY_H
#include <time.h>
-#include "types.h"
#include "context.h"
\f
char *buffer;
size_t readpos;
int eof;
- GpgmeStatusHandler fnc;
+ EngineStatusHandler fnc;
void *fnc_value;
void *tag;
} status;
char *buffer;
size_t readpos;
int eof;
- GpgmeColonLineHandler fnc; /* this indicate use of this structrue */
+ EngineColonLineHandler 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) */
- GpgmeCommandHandler fnc;
+ EngineCommandHandler fnc;
void *fnc_value;
/* The kludges never end. This is used to couple command handlers
with output data in edit key mode. */
/* Note, that the status_handler is allowed to modifiy the args
value. */
static void
-gpg_set_status_handler (void *engine, GpgmeStatusHandler fnc, void *fnc_value)
+gpg_set_status_handler (void *engine, EngineStatusHandler fnc, void *fnc_value)
{
GpgObject gpg = engine;
/* Kludge to process --with-colon output. */
static GpgmeError
-gpg_set_colon_line_handler (void *engine, GpgmeColonLineHandler fnc,
+gpg_set_colon_line_handler (void *engine, EngineColonLineHandler fnc,
void *fnc_value)
{
GpgObject gpg = engine;
match such a second call to a first call, the returned value from
the first call is passed as keyword. */
static GpgmeError
-gpg_set_command_handler (void *engine, GpgmeCommandHandler fnc,
+gpg_set_command_handler (void *engine, EngineCommandHandler fnc,
void *fnc_value, GpgmeData linked_data)
{
GpgObject gpg = engine;
+++ /dev/null
-/* types.h - Type definitions.
- Copyright (C) 2000 Werner Koch (dd9jn)
- Copyright (C) 2001, 2002, 2003 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
-
-#include "gpgme.h"
-
-/* Declaration of internal objects. */
-
-typedef GpgmeError (*GpgmeStatusHandler) (GpgmeCtx, GpgmeStatusCode code,
- char *args);
-typedef GpgmeError (*GpgmeColonLineHandler) (GpgmeCtx, char *line);
-typedef GpgmeError (*GpgmeCommandHandler) (void*, GpgmeStatusCode code,
- const char *keyword, const char **result);
-
-
-#endif /* TYPES_H */