libkdenetwork Library API Documentation

engine.h

00001 /* engine.h -  GPGME engine interface.
00002    Copyright (C) 2000 Werner Koch (dd9jn)
00003    Copyright (C) 2001, 2002, 2003 g10 Code GmbH
00004  
00005    This file is part of GPGME.
00006  
00007    GPGME is free software; you can redistribute it and/or modify it
00008    under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 2 of the License, or
00010    (at your option) any later version.
00011  
00012    GPGME is distributed in the hope that it will be useful, but
00013    WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    General Public License for more details.
00016  
00017    You should have received a copy of the GNU General Public License
00018    along with GPGME; if not, write to the Free Software Foundation,
00019    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
00020 
00021 #ifndef ENGINE_H
00022 #define ENGINE_H
00023 
00024 #include "gpgme.h"
00025  
00026 struct engine;
00027 typedef struct engine *engine_t;
00028 
00029 typedef gpgme_error_t (*engine_status_handler_t) (void *priv,
00030                           gpgme_status_code_t code,
00031                           char *args);
00032 typedef gpgme_error_t (*engine_colon_line_handler_t) (void *priv, char *line);
00033 typedef gpgme_error_t (*engine_command_handler_t) (void *priv,
00034                            gpgme_status_code_t code,
00035                            const char *keyword,
00036                            int fd);
00037 
00038 gpgme_error_t _gpgme_engine_new (gpgme_protocol_t proto,
00039                  engine_t *r_engine,
00040                  const char *lc_ctype,
00041                  const char *lc_messages);
00042 void _gpgme_engine_release (engine_t engine);
00043 void _gpgme_engine_set_status_handler (engine_t engine,
00044                        engine_status_handler_t fnc,
00045                        void *fnc_value);
00046 gpgme_error_t _gpgme_engine_set_command_handler (engine_t engine,
00047                          engine_command_handler_t fnc,
00048                          void *fnc_value,
00049                          gpgme_data_t data);
00050 gpgme_error_t
00051 _gpgme_engine_set_colon_line_handler (engine_t engine,
00052                       engine_colon_line_handler_t fnc,
00053                       void *fnc_value);
00054 gpgme_error_t _gpgme_engine_op_decrypt (engine_t engine,
00055                     gpgme_data_t ciph,
00056                     gpgme_data_t plain);
00057 gpgme_error_t _gpgme_engine_op_delete (engine_t engine, gpgme_key_t key,
00058                        int allow_secret);
00059 gpgme_error_t _gpgme_engine_op_edit (engine_t engine, int type,
00060                      gpgme_key_t key, gpgme_data_t out,
00061                      gpgme_ctx_t ctx /* FIXME */);
00062 gpgme_error_t _gpgme_engine_op_encrypt (engine_t engine,
00063                     gpgme_key_t recp[],
00064                     gpgme_encrypt_flags_t flags,
00065                     gpgme_data_t plain, gpgme_data_t ciph,
00066                     int use_armor);
00067 gpgme_error_t _gpgme_engine_op_encrypt_sign (engine_t engine,
00068                          gpgme_key_t recp[],
00069                          gpgme_encrypt_flags_t flags,
00070                          gpgme_data_t plain,
00071                          gpgme_data_t ciph,
00072                          int use_armor,
00073                          gpgme_ctx_t ctx /* FIXME */);
00074 gpgme_error_t _gpgme_engine_op_export (engine_t engine, const char *pattern,
00075                        unsigned int reserved,
00076                        gpgme_data_t keydata, int use_armor);
00077 gpgme_error_t _gpgme_engine_op_export_ext (engine_t engine,
00078                        const char *pattern[],
00079                        unsigned int reserved,
00080                        gpgme_data_t keydata,
00081                        int use_armor);
00082 gpgme_error_t _gpgme_engine_op_genkey (engine_t engine,
00083                        gpgme_data_t help_data,
00084                        int use_armor, gpgme_data_t pubkey,
00085                        gpgme_data_t seckey);
00086 gpgme_error_t _gpgme_engine_op_import (engine_t engine,
00087                        gpgme_data_t keydata);
00088 gpgme_error_t _gpgme_engine_op_keylist (engine_t engine,
00089                     const char *pattern,
00090                     int secret_only,
00091                     gpgme_keylist_mode_t mode);
00092 gpgme_error_t _gpgme_engine_op_keylist_ext (engine_t engine,
00093                         const char *pattern[],
00094                         int secret_only,
00095                         int reserved,
00096                         gpgme_keylist_mode_t mode);
00097 gpgme_error_t _gpgme_engine_op_sign (engine_t engine, gpgme_data_t in,
00098                      gpgme_data_t out, gpgme_sig_mode_t mode,
00099                      int use_armor, int use_textmode,
00100                      int include_certs,
00101                      gpgme_ctx_t ctx /* FIXME */);
00102 gpgme_error_t _gpgme_engine_op_trustlist (engine_t engine,
00103                       const char *pattern);
00104 gpgme_error_t _gpgme_engine_op_verify (engine_t engine, gpgme_data_t sig,
00105                        gpgme_data_t signed_text,
00106                        gpgme_data_t plaintext);
00107 
00108 void _gpgme_engine_set_io_cbs (engine_t engine,
00109                    gpgme_io_cbs_t io_cbs);
00110 void _gpgme_engine_io_event (engine_t engine,
00111                  gpgme_event_io_t type, void *type_data);
00112 
00113 gpgme_error_t _gpgme_engine_cancel (engine_t engine);
00114 
00115 #endif /* ENGINE_H */
KDE Logo
This file is part of the documentation for libkdenetwork Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 25 11:16:57 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003