summaryrefslogtreecommitdiffstats
path: root/libtdenetwork/gpgmepp
diff options
context:
space:
mode:
Diffstat (limited to 'libtdenetwork/gpgmepp')
-rw-r--r--libtdenetwork/gpgmepp/CMakeLists.txt6
-rw-r--r--libtdenetwork/gpgmepp/Makefile.am4
-rw-r--r--libtdenetwork/gpgmepp/context.cpp17
-rw-r--r--libtdenetwork/gpgmepp/context.h43
-rw-r--r--libtdenetwork/gpgmepp/context_p.h2
-rw-r--r--libtdenetwork/gpgmepp/data.h4
-rw-r--r--libtdenetwork/gpgmepp/decryptionresult.h6
-rw-r--r--libtdenetwork/gpgmepp/encryptionresult.h10
-rw-r--r--libtdenetwork/gpgmepp/engineinfo.h4
-rw-r--r--libtdenetwork/gpgmepp/eventloopinteractor.cpp8
-rw-r--r--libtdenetwork/gpgmepp/eventloopinteractor.h8
-rw-r--r--libtdenetwork/gpgmepp/gpgme-0-3-compat.h1
-rw-r--r--libtdenetwork/gpgmepp/gpgmefw.h3
-rw-r--r--libtdenetwork/gpgmepp/importresult.h6
-rw-r--r--libtdenetwork/gpgmepp/interfaces/dataprovider.h4
-rw-r--r--libtdenetwork/gpgmepp/key.h12
-rw-r--r--libtdenetwork/gpgmepp/keygenerationresult.h4
-rw-r--r--libtdenetwork/gpgmepp/keylistresult.h4
-rw-r--r--libtdenetwork/gpgmepp/signingresult.h14
-rw-r--r--libtdenetwork/gpgmepp/trustitem.cpp109
-rw-r--r--libtdenetwork/gpgmepp/trustitem.h59
-rw-r--r--libtdenetwork/gpgmepp/verificationresult.h16
22 files changed, 68 insertions, 276 deletions
diff --git a/libtdenetwork/gpgmepp/CMakeLists.txt b/libtdenetwork/gpgmepp/CMakeLists.txt
index 93bc16e5..844f34d2 100644
--- a/libtdenetwork/gpgmepp/CMakeLists.txt
+++ b/libtdenetwork/gpgmepp/CMakeLists.txt
@@ -30,7 +30,7 @@ link_directories(
##### headers ###################################
install( FILES
- context.h key.h trustitem.h eventloopinteractor.h
+ context.h key.h eventloopinteractor.h
data.h gpgmefw.h result.h keylistresult.h
keygenerationresult.h importresult.h decryptionresult.h
verificationresult.h signingresult.h encryptionresult.h
@@ -42,13 +42,13 @@ install( FILES
tde_add_library( gpgme++ SHARED
SOURCES
- context.cpp key.cpp trustitem.cpp data.cpp
+ context.cpp key.cpp data.cpp
callbacks.cpp eventloopinteractor.cpp
keylistresult.cpp keygenerationresult.cpp
importresult.cpp decryptionresult.cpp
verificationresult.cpp signingresult.cpp
encryptionresult.cpp engineinfo.cpp
- VERSION 0.4.0
+ VERSION 5.0.0
LINK ${TQT_LIBRARIES} ${GPGME_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR}
)
diff --git a/libtdenetwork/gpgmepp/Makefile.am b/libtdenetwork/gpgmepp/Makefile.am
index d4ebfde9..b4489217 100644
--- a/libtdenetwork/gpgmepp/Makefile.am
+++ b/libtdenetwork/gpgmepp/Makefile.am
@@ -9,7 +9,6 @@ INCLUDES = -I$(top_srcdir)/libtdenetwork -I$(top_srcdir)/libtdenetwork/gpgmepp \
gpgmeppdir = $(includedir)/gpgme++
gpgmepp_HEADERS = context.h \
key.h \
- trustitem.h \
eventloopinteractor.h \
data.h \
gpgmefw.h \
@@ -28,7 +27,6 @@ noinst_HEADERS = context_p.h data_p.h shared.h callbacks.h gpgme-0-3-compat.h re
lib_LTLIBRARIES = libgpgme++.la
libgpgme___la_SOURCES = context.cpp \
key.cpp \
- trustitem.cpp \
data.cpp \
callbacks.cpp \
eventloopinteractor.cpp \
@@ -46,7 +44,7 @@ libgpgme___la_SOURCES = context.cpp \
# (Interfaces added/removed/changed: CURRENT++, REVISION=0)
# (Interfaces added: AGE++)
# (Interfaces removed/changed: AGE=0)
-libgpgme___la_LDFLAGS = -no-undefined -version-info 4:0:4
+libgpgme___la_LDFLAGS = -no-undefined -version-info 5:0:0
libgpgme___la_LIBADD = $(GPGME_LIBS)
libgpgme___la_DEPENDENCIES = $(GPGME_LIBS_DEP)
diff --git a/libtdenetwork/gpgmepp/context.cpp b/libtdenetwork/gpgmepp/context.cpp
index 547adde9..5c61bd53 100644
--- a/libtdenetwork/gpgmepp/context.cpp
+++ b/libtdenetwork/gpgmepp/context.cpp
@@ -23,7 +23,7 @@
#include <gpgmepp/context.h>
#include <gpgmepp/eventloopinteractor.h>
-#include <gpgmepp/trustitem.h>
+#include <gpgmepp/key.h>
#include <gpgmepp/keylistresult.h>
#include <gpgmepp/keygenerationresult.h>
#include <gpgmepp/importresult.h>
@@ -348,21 +348,6 @@ namespace GpgME {
return d->lasterr = gpgme_op_delete_start( d->ctx, key.impl(), int( allowSecretKeyDeletion ) );
}
- Error Context::startTrustItemListing( const char * pattern, int maxLevel ) {
- d->lastop = Private::TrustList;
- return d->lasterr = gpgme_op_trustlist_start( d->ctx, pattern, maxLevel );
- }
-
- TrustItem Context::nextTrustItem( Error & e ) {
- gpgme_trust_item_t ti = 0;
- e = d->lasterr = gpgme_op_trustlist_next( d->ctx, &ti );
- return ti;
- }
-
- Error Context::endTrustItemListing() {
- return d->lasterr = gpgme_op_trustlist_end( d->ctx );
- }
-
DecryptionResult Context::decrypt( const Data & cipherText, Data & plainText ) {
d->lastop = Private::Decrypt;
Data::Private * cdp = cipherText.impl();
diff --git a/libtdenetwork/gpgmepp/context.h b/libtdenetwork/gpgmepp/context.h
index 2eaee660..580d766c 100644
--- a/libtdenetwork/gpgmepp/context.h
+++ b/libtdenetwork/gpgmepp/context.h
@@ -25,13 +25,12 @@
#include <utility>
#include <iosfwd>
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace GpgME {
class Key;
class Data;
- class TrustItem;
class ProgressProvider;
class PassphraseProvider;
class EventLoopInteractor;
@@ -46,7 +45,7 @@ namespace GpgME {
class EngineInfo;
- class KDE_EXPORT Error {
+ class TDE_EXPORT Error {
public:
Error( int e=0 ) : mErr( e ) {}
@@ -64,9 +63,9 @@ namespace GpgME {
int mErr;
};
- KDE_EXPORT std::ostream & operator<<( std::ostream & os, Error err );
+ TDE_EXPORT std::ostream & operator<<( std::ostream & os, Error err );
- class KDE_EXPORT Context {
+ class TDE_EXPORT Context {
Context( gpgme_ctx_t );
public:
enum Protocol { OpenPGP, CMS, Unknown };
@@ -180,14 +179,6 @@ namespace GpgME {
GpgME::Error startKeyDeletion( const Key & key, bool allowSecretKeyDeletion=false );
//
- // Trust Item Management
- //
-
- GpgME::Error startTrustItemListing( const char * pattern, int maxLevel );
- TrustItem nextTrustItem( GpgME::Error & e );
- GpgME::Error endTrustItemListing();
-
- //
//
// Crypto Operations
//
@@ -283,12 +274,12 @@ namespace GpgME {
const Context & operator=( const Context & );
};
- KDE_EXPORT std::ostream & operator<<( std::ostream & os, Context::Protocol proto );
- KDE_EXPORT std::ostream & operator<<( std::ostream & os, Context::CertificateInclusion incl );
- KDE_EXPORT std::ostream & operator<<( std::ostream & os, Context::KeyListMode mode );
- KDE_EXPORT std::ostream & operator<<( std::ostream & os, Context::SignatureMode mode );
- KDE_EXPORT std::ostream & operator<<( std::ostream & os, Context::EncryptionFlags flags );
- KDE_EXPORT std::ostream & operator<<( std::ostream & os, Context::AuditLogFlags flags );
+ TDE_EXPORT std::ostream & operator<<( std::ostream & os, Context::Protocol proto );
+ TDE_EXPORT std::ostream & operator<<( std::ostream & os, Context::CertificateInclusion incl );
+ TDE_EXPORT std::ostream & operator<<( std::ostream & os, Context::KeyListMode mode );
+ TDE_EXPORT std::ostream & operator<<( std::ostream & os, Context::SignatureMode mode );
+ TDE_EXPORT std::ostream & operator<<( std::ostream & os, Context::EncryptionFlags flags );
+ TDE_EXPORT std::ostream & operator<<( std::ostream & os, Context::AuditLogFlags flags );
//
//
@@ -296,19 +287,19 @@ namespace GpgME {
//
//
- KDE_EXPORT void initializeLibrary();
+ TDE_EXPORT void initializeLibrary();
- KDE_EXPORT GpgME::Error setDefaultLocale( int category, const char * value );
+ TDE_EXPORT GpgME::Error setDefaultLocale( int category, const char * value );
- KDE_EXPORT Context * wait( GpgME::Error & e, bool hang=true );
+ TDE_EXPORT Context * wait( GpgME::Error & e, bool hang=true );
typedef void (*IdleFunction)(void);
- KDE_EXPORT IdleFunction registerIdleFunction( IdleFunction idleFunction );
+ TDE_EXPORT IdleFunction registerIdleFunction( IdleFunction idleFunction );
typedef void (*IOCallback)( void * data, int fd );
- KDE_EXPORT EngineInfo engineInfo( Context::Protocol proto );
+ TDE_EXPORT EngineInfo engineInfo( Context::Protocol proto );
- KDE_EXPORT GpgME::Error checkEngine( Context::Protocol proto );
+ TDE_EXPORT GpgME::Error checkEngine( Context::Protocol proto );
enum Feature {
ValidatingKeylistModeFeature = 0x00000001,
@@ -319,7 +310,7 @@ namespace GpgME {
FeatureMaxValue = 0x80000000
};
- KDE_EXPORT bool hasFeature( unsigned long feature );
+ TDE_EXPORT bool hasFeature( unsigned long feature );
} // namespace GpgME
diff --git a/libtdenetwork/gpgmepp/context_p.h b/libtdenetwork/gpgmepp/context_p.h
index 5d44ba7c..c6f2da8e 100644
--- a/libtdenetwork/gpgmepp/context_p.h
+++ b/libtdenetwork/gpgmepp/context_p.h
@@ -43,7 +43,7 @@ namespace GpgME {
KeyGen = 0x080,
KeyList = 0x100,
- TrustList = 0x200, // gpgme_trustlist_result_t, but nevertheless...
+ NOT_USED = 0x200, // was TrustList, no more used
GetAuditLog = 0x1000 // no gpgme_getauditlog_result_t, but nevertheless...
};
diff --git a/libtdenetwork/gpgmepp/data.h b/libtdenetwork/gpgmepp/data.h
index b1c76029..b0bb6b02 100644
--- a/libtdenetwork/gpgmepp/data.h
+++ b/libtdenetwork/gpgmepp/data.h
@@ -25,14 +25,14 @@
#include <sys/types.h> // for size_t, off_t
#include <cstdio> // FILE
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace GpgME {
class DataProvider;
class Error;
- class KDE_EXPORT Data {
+ class TDE_EXPORT Data {
public:
Data();
Data( gpgme_data_t data );
diff --git a/libtdenetwork/gpgmepp/decryptionresult.h b/libtdenetwork/gpgmepp/decryptionresult.h
index 1721a19e..f23d5fc3 100644
--- a/libtdenetwork/gpgmepp/decryptionresult.h
+++ b/libtdenetwork/gpgmepp/decryptionresult.h
@@ -26,13 +26,13 @@
#include <iosfwd>
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace GpgME {
class Error;
- class KDE_EXPORT DecryptionResult : public Result {
+ class TDE_EXPORT DecryptionResult : public Result {
public:
DecryptionResult( gpgme_ctx_t ctx=0, int error=0 );
explicit DecryptionResult( const Error & err );
@@ -52,7 +52,7 @@ namespace GpgME {
Private * d;
};
- KDE_EXPORT std::ostream & operator<<( std::ostream & os, const DecryptionResult & result );
+ TDE_EXPORT std::ostream & operator<<( std::ostream & os, const DecryptionResult & result );
}
diff --git a/libtdenetwork/gpgmepp/encryptionresult.h b/libtdenetwork/gpgmepp/encryptionresult.h
index 44ea09a6..62649604 100644
--- a/libtdenetwork/gpgmepp/encryptionresult.h
+++ b/libtdenetwork/gpgmepp/encryptionresult.h
@@ -27,14 +27,14 @@
#include <vector>
#include <iosfwd>
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace GpgME {
class Error;
class InvalidRecipient;
- class KDE_EXPORT EncryptionResult : public Result {
+ class TDE_EXPORT EncryptionResult : public Result {
public:
EncryptionResult( gpgme_ctx_t ctx=0, int error=0 );
explicit EncryptionResult( const Error & err );
@@ -55,9 +55,9 @@ namespace GpgME {
Private * d;
};
- KDE_EXPORT std::ostream & operator<<( std::ostream & os, const EncryptionResult & result );
+ TDE_EXPORT std::ostream & operator<<( std::ostream & os, const EncryptionResult & result );
- class KDE_EXPORT InvalidRecipient {
+ class TDE_EXPORT InvalidRecipient {
friend class EncryptionResult;
InvalidRecipient( EncryptionResult::Private * parent, unsigned int index );
public:
@@ -77,7 +77,7 @@ namespace GpgME {
unsigned int idx;
};
- KDE_EXPORT std::ostream & operator<<( std::ostream & os, const InvalidRecipient & recipient );
+ TDE_EXPORT std::ostream & operator<<( std::ostream & os, const InvalidRecipient & recipient );
}
diff --git a/libtdenetwork/gpgmepp/engineinfo.h b/libtdenetwork/gpgmepp/engineinfo.h
index 5dcd2f83..98164c70 100644
--- a/libtdenetwork/gpgmepp/engineinfo.h
+++ b/libtdenetwork/gpgmepp/engineinfo.h
@@ -24,11 +24,11 @@
#include <gpgmepp/gpgmefw.h>
#include <gpgmepp/context.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace GpgME {
- class KDE_EXPORT EngineInfo {
+ class TDE_EXPORT EngineInfo {
public:
EngineInfo();
EngineInfo( gpgme_engine_info_t engine );
diff --git a/libtdenetwork/gpgmepp/eventloopinteractor.cpp b/libtdenetwork/gpgmepp/eventloopinteractor.cpp
index cdac7d56..b04a36c8 100644
--- a/libtdenetwork/gpgmepp/eventloopinteractor.cpp
+++ b/libtdenetwork/gpgmepp/eventloopinteractor.cpp
@@ -26,7 +26,6 @@
#include <gpgmepp/context.h>
#include "context_p.h"
#include <gpgmepp/key.h>
-#include <gpgmepp/trustitem.h>
#include <gpgme.h>
@@ -131,13 +130,6 @@ namespace GpgME {
instance()->nextKeyEvent( ctx, Key( key, false, ctx ? ctx->keyListMode() : 0 ) );
}
break;
- case GPGME_EVENT_NEXT_TRUSTITEM:
- {
- gpgme_trust_item_t item = static_cast<gpgme_trust_item_t>( type_data );
- instance()->nextTrustItemEvent( ctx, TrustItem( item ) );
- gpgme_trust_item_unref( item );
- }
- break;
default: // warn
;
}
diff --git a/libtdenetwork/gpgmepp/eventloopinteractor.h b/libtdenetwork/gpgmepp/eventloopinteractor.h
index 37acc0f8..9343b501 100644
--- a/libtdenetwork/gpgmepp/eventloopinteractor.h
+++ b/libtdenetwork/gpgmepp/eventloopinteractor.h
@@ -19,13 +19,12 @@
#ifndef __GPGMEPP_EVENTLOOPINTERACTOR_H__
#define __GPGMEPP_EVENTLOOPINTERACTOR_H__
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace GpgME {
class Context;
class Error;
- class TrustItem;
class Key;
/*! \file eventloopinteractor.h
@@ -38,7 +37,7 @@ namespace GpgME {
IO Callback handling and one for gpgme events. The IO Callback
interface consists of the three methods \c actOn(), \c
registerWatcher() and \c unregisterWatcher(). The event
- interface consists of the three methods \c nextTrustItemEvent(),
+ interface consists of the two methods
\c nextKeyEvent() and \c operationDoneEvent().
\sect General Usage
@@ -102,7 +101,7 @@ namespace GpgME {
*/
- class KDE_EXPORT EventLoopInteractor {
+ class TDE_EXPORT EventLoopInteractor {
protected:
EventLoopInteractor();
public:
@@ -130,7 +129,6 @@ namespace GpgME {
// Event Handler Interface
//
- virtual void nextTrustItemEvent( Context * context, const TrustItem & item ) = 0;
virtual void nextKeyEvent( Context * context, const Key & key ) = 0;
virtual void operationDoneEvent( Context * context, const Error & e ) = 0;
diff --git a/libtdenetwork/gpgmepp/gpgme-0-3-compat.h b/libtdenetwork/gpgmepp/gpgme-0-3-compat.h
index 5f8c5b61..1345cfd0 100644
--- a/libtdenetwork/gpgmepp/gpgme-0-3-compat.h
+++ b/libtdenetwork/gpgmepp/gpgme-0-3-compat.h
@@ -34,7 +34,6 @@ typedef GpgmeRegisterIOCb gpgme_register_io_cb_t;
typedef GpgmeRemoveIOCb gpgme_remove_io_cb_t;
typedef GpgmeSigStat gpgme_sig_stat_t;
typedef GpgmeAttr gpgme_attr_t;
-typedef GpgmeTrustItem gpgme_trust_item_t;
typedef GpgmeCtx gpgme_ctx_t;
typedef GpgmeProtocol gpgme_protocol_t;
typedef GpgmeData gpgme_data_t;
diff --git a/libtdenetwork/gpgmepp/gpgmefw.h b/libtdenetwork/gpgmepp/gpgmefw.h
index 8fe43746..90d958a1 100644
--- a/libtdenetwork/gpgmepp/gpgmefw.h
+++ b/libtdenetwork/gpgmepp/gpgmefw.h
@@ -36,9 +36,6 @@ struct gpgme_io_cbs;
struct _gpgme_key;
typedef struct _gpgme_key * gpgme_key_t;
-struct _gpgme_trust_item;
-typedef struct _gpgme_trust_item * gpgme_trust_item_t;
-
struct _gpgme_subkey;
typedef struct _gpgme_subkey * gpgme_sub_key_t;
diff --git a/libtdenetwork/gpgmepp/importresult.h b/libtdenetwork/gpgmepp/importresult.h
index 87f9aaf9..e85298e6 100644
--- a/libtdenetwork/gpgmepp/importresult.h
+++ b/libtdenetwork/gpgmepp/importresult.h
@@ -25,14 +25,14 @@
#include <gpgmepp/result.h>
#include <vector>
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace GpgME {
class Error;
class Import;
- class KDE_EXPORT ImportResult : public Result {
+ class TDE_EXPORT ImportResult : public Result {
public:
ImportResult( gpgme_ctx_t ctx=0, int error=0 );
explicit ImportResult( const Error & error );
@@ -68,7 +68,7 @@ namespace GpgME {
Private * d;
};
- class KDE_EXPORT Import {
+ class TDE_EXPORT Import {
friend class ImportResult;
Import( ImportResult::Private * parent, unsigned int idx );
public:
diff --git a/libtdenetwork/gpgmepp/interfaces/dataprovider.h b/libtdenetwork/gpgmepp/interfaces/dataprovider.h
index be926446..e9886eac 100644
--- a/libtdenetwork/gpgmepp/interfaces/dataprovider.h
+++ b/libtdenetwork/gpgmepp/interfaces/dataprovider.h
@@ -23,11 +23,11 @@
#include <sys/types.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace GpgME {
- class KDE_EXPORT DataProvider {
+ class TDE_EXPORT DataProvider {
public:
virtual ~DataProvider() {}
diff --git a/libtdenetwork/gpgmepp/key.h b/libtdenetwork/gpgmepp/key.h
index 4bbd24be..b64c564e 100644
--- a/libtdenetwork/gpgmepp/key.h
+++ b/libtdenetwork/gpgmepp/key.h
@@ -25,7 +25,7 @@
#include <sys/time.h>
#include <vector>
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace GpgME {
@@ -36,7 +36,7 @@ namespace GpgME {
// class Key
//
- class KDE_EXPORT Key {
+ class TDE_EXPORT Key {
friend class Context;
public:
Key();
@@ -110,7 +110,7 @@ namespace GpgME {
// class Subkey
//
- class KDE_EXPORT Subkey {
+ class TDE_EXPORT Subkey {
public:
Subkey( gpgme_key_t key=0, gpgme_sub_key_t subkey=0 );
Subkey( gpgme_key_t key, unsigned int idx );
@@ -156,7 +156,7 @@ namespace GpgME {
// class UserID
//
- class KDE_EXPORT UserID {
+ class TDE_EXPORT UserID {
public:
class Signature;
@@ -198,7 +198,7 @@ namespace GpgME {
// class UserID::Signature
//
- class KDE_EXPORT UserID::Signature {
+ class TDE_EXPORT UserID::Signature {
public:
class Notation;
@@ -255,7 +255,7 @@ namespace GpgME {
//
//
- class KDE_EXPORT UserID::Signature::Notation {
+ class TDE_EXPORT UserID::Signature::Notation {
public:
Notation( gpgme_key_t key=0, gpgme_user_id_t uid=0,
gpgme_key_sig_t sig=0, gpgme_sig_notation_t nota=0 );
diff --git a/libtdenetwork/gpgmepp/keygenerationresult.h b/libtdenetwork/gpgmepp/keygenerationresult.h
index 2cf8c8a7..dcfb56f2 100644
--- a/libtdenetwork/gpgmepp/keygenerationresult.h
+++ b/libtdenetwork/gpgmepp/keygenerationresult.h
@@ -23,12 +23,12 @@
#include <gpgmepp/gpgmefw.h>
#include <gpgmepp/result.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace GpgME {
class Error;
- class KDE_EXPORT KeyGenerationResult : public Result {
+ class TDE_EXPORT KeyGenerationResult : public Result {
public:
KeyGenerationResult( gpgme_ctx_t ctx=0, int error=0 );
explicit KeyGenerationResult( const Error & err );
diff --git a/libtdenetwork/gpgmepp/keylistresult.h b/libtdenetwork/gpgmepp/keylistresult.h
index 064539cf..877fd517 100644
--- a/libtdenetwork/gpgmepp/keylistresult.h
+++ b/libtdenetwork/gpgmepp/keylistresult.h
@@ -23,14 +23,14 @@
#include <gpgmepp/gpgmefw.h>
#include <gpgmepp/result.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace GpgME {
class Context;
class Error;
- class KDE_EXPORT KeyListResult : public Result {
+ class TDE_EXPORT KeyListResult : public Result {
public:
KeyListResult( gpgme_ctx_t ctx=0, int error=0 );
explicit KeyListResult( const Error & err );
diff --git a/libtdenetwork/gpgmepp/signingresult.h b/libtdenetwork/gpgmepp/signingresult.h
index a31b2928..c43b577e 100644
--- a/libtdenetwork/gpgmepp/signingresult.h
+++ b/libtdenetwork/gpgmepp/signingresult.h
@@ -30,7 +30,7 @@
#include <vector>
#include <iosfwd>
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace GpgME {
@@ -38,7 +38,7 @@ namespace GpgME {
class CreatedSignature;
class InvalidSigningKey;
- class KDE_EXPORT SigningResult : public Result {
+ class TDE_EXPORT SigningResult : public Result {
public:
SigningResult( gpgme_ctx_t ctx=0, int error=0 );
explicit SigningResult( const Error & err );
@@ -60,9 +60,9 @@ namespace GpgME {
Private * d;
};
- KDE_EXPORT std::ostream & operator<<( std::ostream & os, const SigningResult & result );
+ TDE_EXPORT std::ostream & operator<<( std::ostream & os, const SigningResult & result );
- class KDE_EXPORT InvalidSigningKey {
+ class TDE_EXPORT InvalidSigningKey {
friend class SigningResult;
InvalidSigningKey( SigningResult::Private * parent, unsigned int index );
public:
@@ -82,9 +82,9 @@ namespace GpgME {
unsigned int idx;
};
- KDE_EXPORT std::ostream & operator<<( std::ostream & os, const InvalidSigningKey & key );
+ TDE_EXPORT std::ostream & operator<<( std::ostream & os, const InvalidSigningKey & key );
- class KDE_EXPORT CreatedSignature {
+ class TDE_EXPORT CreatedSignature {
friend class SigningResult;
CreatedSignature( SigningResult::Private * parent, unsigned int index );
public:
@@ -117,7 +117,7 @@ namespace GpgME {
unsigned int idx;
};
- KDE_EXPORT std::ostream & operator<<( std::ostream & os, const CreatedSignature & sig );
+ TDE_EXPORT std::ostream & operator<<( std::ostream & os, const CreatedSignature & sig );
}
diff --git a/libtdenetwork/gpgmepp/trustitem.cpp b/libtdenetwork/gpgmepp/trustitem.cpp
deleted file mode 100644
index 59840ebb..00000000
--- a/libtdenetwork/gpgmepp/trustitem.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-/* trustitem.cpp - wraps a gpgme trust item
- Copyright (C) 2003 Klarälvdalens Datakonsult AB
-
- 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gpgmepp/trustitem.h>
-
-#include <gpgme.h>
-
-#include <cassert>
-
-namespace GpgME {
-
- struct TrustItem::Private {
- Private( gpgme_trust_item_t aItem )
- : item( aItem )
- {
- }
-
- gpgme_trust_item_t item;
- };
-
- TrustItem::TrustItem( gpgme_trust_item_t item ) {
- d = new Private( item );
- if ( d->item )
- gpgme_trust_item_ref( d->item );
- }
-
- TrustItem::TrustItem( const TrustItem & other ) {
- d = new Private( other.d->item );
- if ( d->item )
- gpgme_trust_item_ref( d->item );
- }
-
- const TrustItem & TrustItem::operator=( const TrustItem & other ) {
- if ( &other == this ) return *this;
-
- if ( other.d->item )
- gpgme_trust_item_ref( other.d->item );
- if ( d->item )
- gpgme_trust_item_unref( d->item );
- *d = *other.d;
- return *this;
- }
-
- TrustItem::~TrustItem() {
- if ( d->item )
- gpgme_trust_item_unref( d->item );
- delete d; d = 0;
- }
-
- bool TrustItem::isNull() const {
- return !d || !d->item;
- }
-
- gpgme_trust_item_t TrustItem::impl() const {
- return d->item;
- }
-
-
- const char * TrustItem::keyID() const {
- return d->item ? d->item->keyid : 0 ;
- }
-
- const char * TrustItem::userID() const {
- return d->item ? d->item->name : 0 ;
- }
-
- const char * TrustItem::ownerTrustAsString() const {
- return d->item ? d->item->owner_trust : 0 ;
- }
-
- const char * TrustItem::validityAsString() const {
- return d->item ? d->item->validity : 0 ;
- }
-
- int TrustItem::trustLevel() const {
- return d->item ? d->item->level : 0 ;
- }
-
- TrustItem::Type TrustItem::type() const {
- if ( !d->item )
- return Unknown;
- else
- return
- d->item->type == 1 ? Key :
- d->item->type == 2 ? UserID :
- Unknown ;
- }
-
-} // namespace GpgME
diff --git a/libtdenetwork/gpgmepp/trustitem.h b/libtdenetwork/gpgmepp/trustitem.h
deleted file mode 100644
index aa1850b5..00000000
--- a/libtdenetwork/gpgmepp/trustitem.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* trustitem.h - wraps a gpgme trust item
- Copyright (C) 2003 Klarälvdalens Datakonsult AB
-
- 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
-#ifndef __GPGMEPP_TRUSTITEM_H__
-#define __GPGMEPP_TRUSTITEM_H__
-
-#include <gpgmepp/gpgmefw.h>
-#include <gpgmepp/key.h>
-
-namespace GpgME {
-
- class Context;
-
- class TrustItem {
- friend class Context;
- public:
- TrustItem( gpgme_trust_item_t item=0 );
- TrustItem( const TrustItem & other );
- virtual ~TrustItem();
-
- const TrustItem & operator=( const TrustItem & other );
-
- bool isNull() const;
-
- const char * keyID() const;
- const char * userID() const;
-
- const char * ownerTrustAsString() const;
- const char * validityAsString() const;
-
- int trustLevel() const;
-
- enum Type { Unknown=0, Key=1, UserID=2 };
- Type type() const;
-
- private:
- gpgme_trust_item_t impl() const;
- class Private;
- Private * d;
- };
-
-} // namepace GpgME
-
-#endif // __GPGMEPP_TRUSTITEM_H__
diff --git a/libtdenetwork/gpgmepp/verificationresult.h b/libtdenetwork/gpgmepp/verificationresult.h
index 70269df3..86d54b8d 100644
--- a/libtdenetwork/gpgmepp/verificationresult.h
+++ b/libtdenetwork/gpgmepp/verificationresult.h
@@ -29,14 +29,14 @@
#include <vector>
#include <iosfwd>
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace GpgME {
class Error;
class Signature;
- class KDE_EXPORT VerificationResult : public Result {
+ class TDE_EXPORT VerificationResult : public Result {
public:
VerificationResult( gpgme_ctx_t ctx=0, int error=0 );
explicit VerificationResult( const Error & err );
@@ -55,9 +55,9 @@ namespace GpgME {
Private * d;
};
- KDE_EXPORT std::ostream & operator<<( std::ostream & os, const VerificationResult & result );
+ TDE_EXPORT std::ostream & operator<<( std::ostream & os, const VerificationResult & result );
- class KDE_EXPORT Signature {
+ class TDE_EXPORT Signature {
friend class VerificationResult;
Signature( VerificationResult::Private * parent, unsigned int index );
public:
@@ -113,10 +113,10 @@ namespace GpgME {
unsigned int idx;
};
- KDE_EXPORT std::ostream & operator<<( std::ostream & os, const Signature & sig );
- KDE_EXPORT std::ostream & operator<<( std::ostream & os, Signature::Summary summary );
+ TDE_EXPORT std::ostream & operator<<( std::ostream & os, const Signature & sig );
+ TDE_EXPORT std::ostream & operator<<( std::ostream & os, Signature::Summary summary );
- class KDE_EXPORT Signature::Notation {
+ class TDE_EXPORT Signature::Notation {
friend class Signature;
Notation( VerificationResult::Private * parent, unsigned int sindex, unsigned int nindex );
public:
@@ -137,7 +137,7 @@ namespace GpgME {
unsigned int nidx;
};
- KDE_EXPORT std::ostream & operator<<( std::ostream & os, const Signature::Notation & nota );
+ TDE_EXPORT std::ostream & operator<<( std::ostream & os, const Signature::Notation & nota );
}