-/* context.h
+/* context.h - Definitions for a GPGME context.
Copyright (C) 2000 Werner Koch (dd9jn)
Copyright (C) 2001, 2002, 2003 g10 Code GmbH
{
OPDATA_DECRYPT, OPDATA_SIGN, OPDATA_ENCRYPT, OPDATA_PASSPHRASE,
OPDATA_IMPORT, OPDATA_GENKEY, OPDATA_KEYLIST, OPDATA_EDIT,
- OPDATA_VERIFY_COLLECTING, OPDATA_VERIFY
+ OPDATA_VERIFY, OPDATA_TRUSTLIST
} ctx_op_data_type;
struct ctx_op_data
/* The operation data hooked into the context. */
struct ctx_op_data *op_data;
- /* Last signature notation. */
- GpgmeData notation;
/* Last operation info. */
GpgmeData op_info;
#ifndef GPGME_H
#define GPGME_H
-#include <stdio.h> /* For FILE *. */
+/* Include stdio.h for the FILE type definition. */
+#include <stdio.h>
+
#ifdef _MSC_VER
typedef long off_t;
typedef long ssize_t;
#endif
#endif
-
+\f
/* The version of this header should match the one of the library. Do
not use this symbol in your application, use gpgme_check_version
instead. The purpose of this macro is to let autoconf (using the
that for you! */
#define GPGME_VERSION "0.4.1"
-
+\f
/* The opaque data types used by GPGME. */
-/* The context holds some global state and configration options as
+/* The context holds some global state and configration options, as
well as the results of a crypto operation. */
struct gpgme_context_s;
typedef struct gpgme_context_s *GpgmeCtx;
-/* The data object used by GPGME to exchange arbitrary data. */
+/* The data object is used by GPGME to exchange arbitrary data. */
struct gpgme_data_s;
typedef struct gpgme_data_s *GpgmeData;
#define GPGME_Invalid_Recipient GPGME_Invalid_UserID
#define GPGME_No_Passphrase GPGME_Bad_Passphrase
+
/* The possible encoding mode of GpgmeData objects. */
typedef enum
{
- GPGME_DATA_ENCODING_NONE = 0, /* I.e. not specified. */
+ GPGME_DATA_ENCODING_NONE = 0, /* Not specified. */
GPGME_DATA_ENCODING_BINARY = 1,
GPGME_DATA_ENCODING_BASE64 = 2,
GPGME_DATA_ENCODING_ARMOR = 3 /* Either PEM or OpenPGP Armor. */
}
GpgmeSigMode;
+
/* The available key and signature attributes. */
typedef enum
{
}
GpgmeValidity;
+
/* The available protocols. */
typedef enum
{
}
GpgmeStatusCode;
-/* The available keylist mode flags. */
-#define GPGME_KEYLIST_MODE_LOCAL 1
-#define GPGME_KEYLIST_MODE_EXTERN 2
-#define GPGME_KEYLIST_MODE_SIGS 4
-
/* The engine information structure. */
struct _gpgme_engine_info
{
typedef GpgmeError (*GpgmeEditCb) (void *opaque, GpgmeStatusCode status,
const char *args, const char **reply);
+\f
/* Context management functions. */
/* Create a new context and return it in CTX. */
/* Return the number of certs to include in an S/MIME message. */
int gpgme_get_include_certs (GpgmeCtx ctx);
+/* The available keylist mode flags. */
+enum
+ {
+ GPGME_KEYLIST_MODE_LOCAL = 1,
+ GPGME_KEYLIST_MODE_EXTERN = 2,
+ GPGME_KEYLIST_MODE_SIGS = 4
+ };
+
/* Set keylist mode in CTX to MODE. */
GpgmeError gpgme_set_keylist_mode (GpgmeCtx ctx, int mode);
the pending operation to finish. */
GpgmeCtx gpgme_wait (GpgmeCtx ctx, GpgmeError *status, int hang);
-
+\f
/* Functions to handle recipients. */
/* Create a new recipients set and return it in R_RSET. */
GpgmeError gpgme_recipients_enum_close (const GpgmeRecipients rset,
void **iter);
-
+\f
/* Functions to handle data objects. */
/* Read up to SIZE bytes into buffer BUFFER from the data object with
gpgme_data_seek instead. */
GpgmeError gpgme_data_rewind (GpgmeData dh);
-
+\f
/* Key and trust functions. */
/* Get the key with the fingerprint FPR from the key cache or from the
/* Return a string describing ERR. */
const char *gpgme_strerror (GpgmeError err);
-
+\f
/* Engine support functions. */
/* Verify that the engine implementing PROTO is installed and