libkdenetwork Library API Documentation

context_p.h

00001 /* context_p.h - wraps a gpgme key context (private part)
00002    Copyright (C) 2003 Klarälvdalens Datakonsult AB
00003 
00004    This file is part of GPGME++.
00005  
00006    GPGME++ is free software; you can redistribute it and/or modify it
00007    under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2 of the License, or
00009    (at your option) any later version.
00010  
00011    GPGME++ is distributed in the hope that it will be useful, but
00012    WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with GPGME; if not, write to the Free Software Foundation,
00018    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.  */
00019 
00020 
00021 // -*- c++ -*- 
00022 #ifndef __GPGMEPP_CONTEXT_P_H__
00023 #define __GPGMEPP_CONTEXT_P_H__
00024 
00025 #include <gpgmepp/context.h>
00026 
00027 #include <gpgme.h>
00028 
00029 namespace GpgME {
00030 
00031 
00032   struct Context::Private {
00033     enum Operation {
00034       None = 0,
00035 
00036       Encrypt   = 0x001,
00037       Decrypt   = 0x002,
00038       Sign      = 0x004,
00039       Verify    = 0x008,
00040       DecryptAndVerify = Decrypt|Verify,
00041       SignAndEncrypt   = Sign|Encrypt,
00042 
00043       Import    = 0x010,
00044       Export    = 0x020, // no gpgme_export_result_t, but nevertheless...
00045       Delete    = 0x040, // no gpgme_delete_result_t, but nevertheless...
00046 
00047       KeyGen    = 0x080,
00048       KeyList   = 0x100,
00049       TrustList = 0x200 // gpgme_trustlist_result_t, but nevertheless...
00050     };
00051 
00052     Private( gpgme_ctx_t c=0 )
00053       : ctx( c ),
00054      iocbs( 0 ),
00055      lastop( None ),
00056      lasterr( GPG_ERR_NO_ERROR ) {}
00057     ~Private() {
00058       if ( ctx ) {
00059     gpgme_release( ctx );
00060     ctx = 0;
00061       }
00062       delete iocbs;
00063     }
00064 
00065     gpgme_ctx_t ctx;
00066     gpgme_io_cbs * iocbs;
00067     //EditInteractor * edit;
00068     Operation lastop;
00069     gpgme_error_t lasterr;
00070   };
00071 
00072 } // namespace GpgME
00073 
00074 #endif // __GPGMEPP_CONTEXT_P_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 Oct 17 09:52:20 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003