From 703e5def72f12602ef3e9e639b7d5fde2ec7ba51 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Sat, 14 Jul 2012 00:02:40 +0000 Subject: [PATCH] Removed usages of gpg.h and cleaned pro-files for Windows. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5296 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/libretroshare.pro | 7 +- libretroshare/src/pqi/authgpg.h | 95 ------------------- libretroshare/src/rsserver/p3peers.cc | 27 +++--- retroshare-gui/src/RetroShare.pro | 8 +- .../src/gui/connect/FriendRequest.cpp | 1 - retroshare-nogui/src/retroshare-nogui.pro | 2 +- 6 files changed, 17 insertions(+), 123 deletions(-) diff --git a/libretroshare/src/libretroshare.pro b/libretroshare/src/libretroshare.pro index 9ae55db4e..036c7d20c 100644 --- a/libretroshare/src/libretroshare.pro +++ b/libretroshare/src/libretroshare.pro @@ -287,19 +287,14 @@ win32 { HEADERS += upnp/upnputil.h SOURCES += upnp/upnputil.c - UPNPC_DIR = ../../../miniupnpc-1.3 - GPG_ERROR_DIR = ../../../libgpg-error-1.10 - GPGME_DIR = ../../../gpgme-1.1.8 PTHREADS_DIR = ../../../pthreads-w32-2-8-0-release ZLIB_DIR = ../../../zlib-1.2.3 SSL_DIR = ../../../../OpenSSL - OPENPGPSDK_DIR = ../../openpgpsdk/src - INCLUDEPATH *= $${OPENPGPSDK_DIR} - INCLUDEPATH += . $${SSL_DIR}/include $${UPNPC_DIR} $${PTHREADS_DIR} $${ZLIB_DIR} $${GPGME_DIR}/src $${GPG_ERROR_DIR}/src + INCLUDEPATH += . $${SSL_DIR}/include $${UPNPC_DIR} $${PTHREADS_DIR} $${ZLIB_DIR} $${OPENPGPSDK_DIR} } diff --git a/libretroshare/src/pqi/authgpg.h b/libretroshare/src/pqi/authgpg.h index 121e5a81d..e4576cb4b 100644 --- a/libretroshare/src/pqi/authgpg.h +++ b/libretroshare/src/pqi/authgpg.h @@ -40,7 +40,6 @@ #define RS_GPG_AUTH_HEADER #include "util/rswin.h" -#include #include #include #include "util/rsthreads.h" @@ -296,98 +295,4 @@ class AuthGPG: public p3Config, public RsThread, public PGPHandler static AuthGPG *_instance ; }; - /*! - * Sign a key - **/ - typedef enum - { - SIGN_START, - SIGN_COMMAND, - SIGN_UIDS, - SIGN_SET_EXPIRE, - SIGN_SET_CHECK_LEVEL, - SIGN_ENTER_PASSPHRASE, - SIGN_CONFIRM, - SIGN_QUIT, - SIGN_SAVE, - SIGN_ERROR - } SignState; - - - /*! - * Change the key ownertrust - **/ - typedef enum - { - TRUST_START, - TRUST_COMMAND, - TRUST_VALUE, - TRUST_REALLY_ULTIMATE, - TRUST_QUIT, - TRUST_SAVE, - TRUST_ERROR - } TrustState; - - - - /*! - * This is the generic data object passed to the - * callback function in a gpgme_op_edit operation. - * The contents of this object are modified during - * each callback, to keep track of states, errors - * and other data. - */ - class EditParams - { - public: - int state; - - /*! - * The return code of gpgme_op_edit() is the return value of - * the last invocation of the callback. But returning an error - * from the callback does not abort the edit operation, so we - * must remember any error. - */ - gpg_error_t err; - - /// Parameters specific to the key operation - void *oParams; - - EditParams(int state, void *oParams) { - this->state = state; - this->err = gpgme_error(GPG_ERR_NO_ERROR); - this->oParams = oParams; - } - - }; - - /*! - * Data specific to key signing - **/ - class SignParams - { - public: - - std::string checkLvl; - - SignParams(std::string checkLvl) { - this->checkLvl = checkLvl; - } - }; - - /*! - * Data specific to key signing - **/ - class TrustParams - { - public: - - std::string trustLvl; - - TrustParams(std::string trustLvl) { - this->trustLvl = trustLvl; - } - }; - #endif - diff --git a/libretroshare/src/rsserver/p3peers.cc b/libretroshare/src/rsserver/p3peers.cc index b9d08e432..5d96a08d1 100644 --- a/libretroshare/src/rsserver/p3peers.cc +++ b/libretroshare/src/rsserver/p3peers.cc @@ -39,8 +39,6 @@ #include #include -#include - const std::string CERT_SSL_ID = "--SSLID--"; const std::string CERT_LOCATION = "--LOCATION--"; const std::string CERT_LOCAL_IP = "--LOCAL--"; @@ -63,29 +61,28 @@ RsPeers *rsPeers = NULL; std::string RsPeerTrustString(uint32_t trustLvl) { - std::string str; switch(trustLvl) { default: - case GPGME_VALIDITY_UNKNOWN: - str = "GPGME_VALIDITY_UNKNOWN"; + case RS_TRUST_LVL_UNKNOWN: + str = "VALIDITY_UNKNOWN"; break; - case GPGME_VALIDITY_UNDEFINED: - str = "GPGME_VALIDITY_UNDEFINED"; + case RS_TRUST_LVL_UNDEFINED: + str = "VALIDITY_UNDEFINED"; break; - case GPGME_VALIDITY_NEVER: - str = "GPGME_VALIDITY_NEVER"; + case RS_TRUST_LVL_NEVER: + str = "VALIDITY_NEVER"; break; - case GPGME_VALIDITY_MARGINAL: - str = "GPGME_VALIDITY_MARGINAL"; + case RS_TRUST_LVL_MARGINAL: + str = "VALIDITY_MARGINAL"; break; - case GPGME_VALIDITY_FULL: - str = "GPGME_VALIDITY_FULL"; + case RS_TRUST_LVL_FULL: + str = "VALIDITY_FULL"; break; - case GPGME_VALIDITY_ULTIMATE: - str = "GPGME_VALIDITY_ULTIMATE"; + case RS_TRUST_LVL_ULTIMATE: + str = "VALIDITY_ULTIMATE"; break; } return str; diff --git a/retroshare-gui/src/RetroShare.pro b/retroshare-gui/src/RetroShare.pro index 5fd886b9e..bb9570d66 100644 --- a/retroshare-gui/src/RetroShare.pro +++ b/retroshare-gui/src/RetroShare.pro @@ -108,9 +108,9 @@ win32 { LIBS += ../../libretroshare/src/lib/libretroshare.a LIBS += ../../openpgpsdk/src/lib/libops.a -lbz2 LIBS += -L"../../../lib" - LIBS += -lssl -lcrypto -lgpgme -lpthreadGC2d -lminiupnpc -lz + LIBS += -lssl -lcrypto -lpthreadGC2d -lminiupnpc -lz # added after bitdht -# LIBS += -lws2_32 +# LIBS += -lws2_32 LIBS += -luuid -lole32 -liphlpapi -lcrypt32-cygwin -lgdi32 LIBS += -lole32 -lwinmm RC_FILE = gui/images/retroshare_win.rc @@ -123,9 +123,7 @@ win32 { DEFINES += WINDOWS_SYS - GPG_ERROR_DIR = ../../../libgpg-error-1.10 - GPGME_DIR = ../../../gpgme-1.1.8 - INCLUDEPATH += . $${GPGME_DIR}/src $${GPG_ERROR_DIR}/src + INCLUDEPATH += . } ##################################### MacOS ###################################### diff --git a/retroshare-gui/src/gui/connect/FriendRequest.cpp b/retroshare-gui/src/gui/connect/FriendRequest.cpp index b2a8f53b2..eb0ccd8a9 100644 --- a/retroshare-gui/src/gui/connect/FriendRequest.cpp +++ b/retroshare-gui/src/gui/connect/FriendRequest.cpp @@ -18,7 +18,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. ****************************************************************/ -#include #include "FriendRequest.h" diff --git a/retroshare-nogui/src/retroshare-nogui.pro b/retroshare-nogui/src/retroshare-nogui.pro index aafdd22ab..6e6df0fb7 100644 --- a/retroshare-nogui/src/retroshare-nogui.pro +++ b/retroshare-nogui/src/retroshare-nogui.pro @@ -58,7 +58,7 @@ win32 { LIBS += ../../libretroshare/src/lib/libretroshare.a LIBS += ../../openpgpsdk/src/lib/libops.a -lbz2 LIBS += -L"../../../lib" -lssl -lcrypto -lpthreadGC2d -lminiupnpc -lz - LIBS += -lssl -lcrypto -lgpgme -lpthreadGC2d -lminiupnpc -lz + LIBS += -lssl -lcrypto -lpthreadGC2d -lminiupnpc -lz # added after bitdht # LIBS += -lws2_32 LIBS += -luuid -lole32 -liphlpapi -lcrypt32-cygwin -lgdi32