mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-09 23:02:29 -04:00
Starting to clean libretroshare
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/ammorais_branch@1341 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
511e040dcb
commit
a8838b25fd
13 changed files with 2815 additions and 330 deletions
48
libretroshare/src/_rsiface/notifybase.cc
Normal file
48
libretroshare/src/_rsiface/notifybase.cc
Normal file
|
@ -0,0 +1,48 @@
|
|||
#include "notifybase.h"
|
||||
|
||||
NotifyBase::NotifyBase()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
NotifyBase::~NotifyBase()
|
||||
{
|
||||
}
|
||||
|
||||
void NotifyBase::notifyListPreChange(int list, int type)
|
||||
{
|
||||
(void) list;
|
||||
(void) type;
|
||||
}
|
||||
|
||||
void NotifyBase::notifyListChange(int list, int type)
|
||||
{
|
||||
(void) list;
|
||||
(void) type;
|
||||
}
|
||||
|
||||
void NotifyBase::notifyErrorMsg(int list, int sev, std::string msg)
|
||||
{
|
||||
(void) list;
|
||||
(void) sev;
|
||||
(void) msg;
|
||||
}
|
||||
|
||||
void NotifyBase::notifyChat()
|
||||
{
|
||||
}
|
||||
|
||||
void NotifyBase::notifyChatStatus(const std::string& peer_id,const std::string& status_string)
|
||||
{
|
||||
}
|
||||
|
||||
void NotifyBase::notifyHashingInfo(std::string fileinfo)
|
||||
{
|
||||
(void)fileinfo;
|
||||
|
||||
}
|
||||
|
||||
void NotifyBase::notifyTurtleSearchResult(uint32_t search_id,const std::list<TurtleFileInfo>& files)
|
||||
{
|
||||
(void)files;
|
||||
}
|
36
libretroshare/src/_rsiface/notifybase.h
Normal file
36
libretroshare/src/_rsiface/notifybase.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
#ifndef NOTIFYBASE_H
|
||||
#define NOTIFYBASE_H
|
||||
|
||||
|
||||
const int NOTIFY_LIST_NEIGHBOURS = 1;
|
||||
const int NOTIFY_LIST_FRIENDS = 2;
|
||||
const int NOTIFY_LIST_DIRLIST = 3;
|
||||
const int NOTIFY_LIST_SEARCHLIST = 4;
|
||||
const int NOTIFY_LIST_MESSAGELIST = 5;
|
||||
const int NOTIFY_LIST_CHANNELLIST = 6;
|
||||
const int NOTIFY_LIST_TRANSFERLIST = 7;
|
||||
const int NOTIFY_LIST_CONFIG = 8;
|
||||
|
||||
const int NOTIFY_TYPE_SAME = 0x01;
|
||||
const int NOTIFY_TYPE_MOD = 0x02; /* general purpose, check all */
|
||||
const int NOTIFY_TYPE_ADD = 0x04; /* flagged additions */
|
||||
const int NOTIFY_TYPE_DEL = 0x08; /* flagged deletions */
|
||||
|
||||
class NotifyBase
|
||||
{
|
||||
public:
|
||||
NotifyBase();
|
||||
virtual ~NotifyBase();
|
||||
virtual void notifyListPreChange(int list, int type);
|
||||
virtual void notifyListChange(int list, int type);
|
||||
virtual void notifyErrorMsg(int list, int sev, std::string msg);
|
||||
virtual void notifyChat();
|
||||
virtual void notifyChatStatus(const std::string& peer_id,const std::string& status_string);
|
||||
virtual void notifyHashingInfo(std::string fileinfo);
|
||||
virtual void notifyTurtleSearchResult(uint32_t search_id,const std::list<TurtleFileInfo>& files);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // NOTIFYBASE_H
|
21
libretroshare/src/_rsiface/rscontrol.cc
Normal file
21
libretroshare/src/_rsiface/rscontrol.cc
Normal file
|
@ -0,0 +1,21 @@
|
|||
#include "rscontrol.h"
|
||||
|
||||
RsControl::RsControl(RsIface &i, NotifyBase &callback) :
|
||||
cb(callback),
|
||||
rsIface(i)
|
||||
{
|
||||
}
|
||||
|
||||
RsControl::~RsControl()
|
||||
{
|
||||
}
|
||||
|
||||
NotifyBase& RsControl::getNotify()
|
||||
{
|
||||
return cb;
|
||||
}
|
||||
|
||||
RsIface& RsControl::getIface()
|
||||
{
|
||||
return rsIface;
|
||||
}
|
54
libretroshare/src/_rsiface/rscontrol.h
Normal file
54
libretroshare/src/_rsiface/rscontrol.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
#ifndef RSCONTROL_H
|
||||
#define RSCONTROL_H
|
||||
|
||||
// Class RsControl - True Virtual
|
||||
|
||||
class RsControl /* The Main Interface Class - for controlling the server */
|
||||
{
|
||||
public:
|
||||
|
||||
RsControl(RsIface &i, NotifyBase &callback);
|
||||
|
||||
|
||||
virtual ~RsControl();
|
||||
|
||||
/* Real Startup Fn */
|
||||
virtual int StartupRetroShare() = 0;
|
||||
|
||||
/****************************************/
|
||||
|
||||
/* Flagging Persons / Channels / Files in or out of a set (CheckLists) */
|
||||
virtual int SetInChat(std::string id, bool in) = 0; /* friend : chat msgs */
|
||||
virtual int SetInMsg(std::string id, bool in) = 0; /* friend : msg receipients */
|
||||
virtual int SetInBroadcast(std::string id, bool in) = 0; /* channel : channel broadcast */
|
||||
virtual int SetInSubscribe(std::string id, bool in) = 0; /* channel : subscribed channels */
|
||||
virtual int SetInRecommend(std::string id, bool in) = 0; /* file : recommended file */
|
||||
virtual int ClearInChat() = 0;
|
||||
virtual int ClearInMsg() = 0;
|
||||
virtual int ClearInBroadcast() = 0;
|
||||
virtual int ClearInSubscribe() = 0;
|
||||
virtual int ClearInRecommend() = 0;
|
||||
|
||||
virtual bool IsInChat(std::string id) = 0; /* friend : chat msgs */
|
||||
virtual bool IsInMsg(std::string id) = 0; /* friend : msg recpts*/
|
||||
|
||||
/****************************************/
|
||||
/* Config */
|
||||
|
||||
virtual int ConfigSetDataRates( int totalDownload, int totalUpload ) = 0;
|
||||
virtual int ConfigGetDataRates( float &inKb, float &outKb) = 0;
|
||||
virtual int ConfigSetBootPrompt( bool on ) = 0;
|
||||
virtual void ConfigFinalSave( ) = 0;
|
||||
virtual void rsGlobalShutDown( ) = 0;
|
||||
|
||||
/****************************************/
|
||||
|
||||
NotifyBase &getNotify();
|
||||
RsIface &getIface();
|
||||
|
||||
private:
|
||||
NotifyBase &cb;
|
||||
RsIface &rsIface;
|
||||
};
|
||||
|
||||
#endif // RSCONTROL_H
|
94
libretroshare/src/_rsiface/rsiface.cc
Normal file
94
libretroshare/src/_rsiface/rsiface.cc
Normal file
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* "$Id: rsiface.cc,v 1.6 2007-04-15 18:45:23 rmf24 Exp $"
|
||||
*
|
||||
* RetroShare C++ Interface.
|
||||
*
|
||||
* Copyright 2004-2007 by Robert Fernie.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License Version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
* USA.
|
||||
*
|
||||
* Please report all bugs and problems to "retroshare@lunamutt.com".
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "rsiface.h"
|
||||
#include "util/rsdir.h"
|
||||
|
||||
RsIface::RsIface(NotifyBase &callback) :
|
||||
cb(callback)
|
||||
{
|
||||
}
|
||||
|
||||
RsIface::~RsIface()
|
||||
{
|
||||
}
|
||||
|
||||
const std::list<FileInfo>& RsIface::getRecommendList()
|
||||
{
|
||||
return mRecommendList;
|
||||
}
|
||||
|
||||
const RsConfig& RsIface::getConfig()
|
||||
{
|
||||
return mConfig;
|
||||
}
|
||||
|
||||
|
||||
/* set to true */
|
||||
bool RsIface::setChanged(DataFlags set)
|
||||
{
|
||||
if ((int) set < (int) NumOfFlags)
|
||||
{
|
||||
/* go for it */
|
||||
mChanged[(int) set ] = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/* leaves it */
|
||||
bool RsIface::getChanged(DataFlags set)
|
||||
{
|
||||
if ((int) set < (int) NumOfFlags)
|
||||
{
|
||||
/* go for it */
|
||||
return mChanged[(int) set ];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* resets it */
|
||||
bool RsIface::hasChanged(DataFlags set)
|
||||
{
|
||||
if ((int) set < (int) NumOfFlags)
|
||||
{
|
||||
/* go for it */
|
||||
if (mChanged[(int) set ])
|
||||
{
|
||||
mChanged[(int) set ] = false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
RsIface *createRsIface(NotifyBase &cb)
|
||||
{
|
||||
return new RsIfaceReal(cb);
|
||||
}
|
||||
|
115
libretroshare/src/_rsiface/rsiface.h
Normal file
115
libretroshare/src/_rsiface/rsiface.h
Normal file
|
@ -0,0 +1,115 @@
|
|||
#ifndef RETROSHARE_GUI_INTERFACE_H
|
||||
#define RETROSHARE_GUI_INTERFACE_H
|
||||
|
||||
/*
|
||||
* "$Id: rsiface.h,v 1.9 2007-04-21 19:08:51 rmf24 Exp $"
|
||||
*
|
||||
* RetroShare C++ Interface.
|
||||
*
|
||||
* Copyright 2004-2006 by Robert Fernie.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License Version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
* USA.
|
||||
*
|
||||
* Please report all bugs and problems to "retroshare@lunamutt.com".
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "rstypes.h"
|
||||
#include "rscontrol.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
class NotifyBase;
|
||||
class RsIface;
|
||||
class RsControl;
|
||||
class RsInit;
|
||||
struct TurtleFileInfo ;
|
||||
|
||||
/* declare single RsIface for everyone to use! */
|
||||
|
||||
// if it's declared here why does have the extern.TODO: To see it later
|
||||
|
||||
extern RsIface *rsiface;
|
||||
extern RsControl *rsicontrol;
|
||||
|
||||
|
||||
RsIface *createRsIface (NotifyBase ¬ify);
|
||||
|
||||
|
||||
|
||||
class RsIface /* The Main Interface Class - create a single one! */
|
||||
{
|
||||
public:
|
||||
RsIface(NotifyBase &callback);
|
||||
virtual ~RsIface();
|
||||
|
||||
/****************************************/
|
||||
|
||||
/* Stubs for Very Important Fns -> Locking Functions */
|
||||
virtual void lockData() = 0;
|
||||
virtual void unlockData() = 0;
|
||||
|
||||
const std::list<FileInfo> &getRecommendList();
|
||||
const RsConfig &getConfig();
|
||||
/****************************************/
|
||||
|
||||
|
||||
/* Flags to indicate used or not */
|
||||
enum DataFlags
|
||||
{
|
||||
Neighbour = 0,
|
||||
Friend = 1,
|
||||
DirLocal = 2, /* Not Used - QModel instead */
|
||||
DirRemote = 3, /* Not Used - QModel instead */
|
||||
Transfer = 4,
|
||||
Message = 5,
|
||||
Channel = 6,
|
||||
Chat = 7,
|
||||
Recommend = 8,
|
||||
Config = 9,
|
||||
NumOfFlags = 10
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Operations for flags
|
||||
*/
|
||||
|
||||
bool setChanged(DataFlags set); /* set to true */
|
||||
bool getChanged(DataFlags set); /* leaves it */
|
||||
bool hasChanged(DataFlags set); /* resets it */
|
||||
|
||||
private:
|
||||
|
||||
void fillLists(); /* create some dummy data to display */
|
||||
|
||||
/* Internals */
|
||||
std::list<FileInfo> mRecommendList;
|
||||
|
||||
bool mChanged[NumOfFlags];
|
||||
RsConfig mConfig;
|
||||
|
||||
NotifyBase &cb;
|
||||
|
||||
/* Classes which can update the Lists! */
|
||||
friend class RsControl;
|
||||
friend class RsServer;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
13
libretroshare/src/_rsiface/rsiface.pri
Normal file
13
libretroshare/src/_rsiface/rsiface.pri
Normal file
|
@ -0,0 +1,13 @@
|
|||
INCLUDEPATH += $$PWD \
|
||||
../$$PWP
|
||||
DEPENDPATH += $$PWD
|
||||
SOURCES = $$PWP/rsinit.cc \
|
||||
$$PWP/rsiface.cc \
|
||||
rscontrol.cc \
|
||||
notifybase.cc \
|
||||
rsifacereal.cc
|
||||
HEADERS = $$PWP/rsinit.h \
|
||||
$$PWP/rsiface.h \
|
||||
rscontrol.h \
|
||||
notifybase.h \
|
||||
rsifacereal.h
|
32
libretroshare/src/_rsiface/rsifacereal.cc
Normal file
32
libretroshare/src/_rsiface/rsifacereal.cc
Normal file
|
@ -0,0 +1,32 @@
|
|||
#include "rsifacereal.h"
|
||||
|
||||
RsIfaceReal::RsIfaceReal(NotifyBase &callback) :
|
||||
RsIface(callback)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
RsIfaceReal(NotifyBase &callback) :
|
||||
RsIface(callback)
|
||||
{ return; }
|
||||
|
||||
virtual void lockData()
|
||||
{
|
||||
// std::cerr << "RsIfaceReal::lockData()" << std::endl;
|
||||
return rsIfaceMutex.lock();
|
||||
}
|
||||
|
||||
virtual void unlockData()
|
||||
{
|
||||
// std::cerr << "RsIfaceReal::unlockData()" << std::endl;
|
||||
return rsIfaceMutex.unlock();
|
||||
}
|
||||
|
||||
private:
|
||||
RsMutex rsIfaceMutex;
|
||||
};
|
||||
|
||||
RsIface *createRsIface(NotifyBase &cb)
|
||||
{
|
||||
return new RsIfaceReal(cb);
|
||||
}
|
22
libretroshare/src/_rsiface/rsifacereal.h
Normal file
22
libretroshare/src/_rsiface/rsifacereal.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef RSIFACEREAL_H
|
||||
#define RSIFACEREAL_H
|
||||
|
||||
/*************************** THE REAL RSIFACE (with MUTEXES) *******/
|
||||
|
||||
#include "util/rsthreads.h"
|
||||
#include "rsiface.h"
|
||||
#include "notifybase.h"
|
||||
|
||||
class RsIfaceReal: public RsIface
|
||||
{
|
||||
public:
|
||||
RsIfaceReal(NotifyBase &callback);
|
||||
|
||||
virtual void lockData();
|
||||
virtual void unlockData();
|
||||
|
||||
private:
|
||||
RsMutex rsIfaceMutex;
|
||||
};
|
||||
|
||||
#endif // RSIFACEREAL_H
|
1959
libretroshare/src/_rsiface/rsinit.cc
Normal file
1959
libretroshare/src/_rsiface/rsinit.cc
Normal file
File diff suppressed because it is too large
Load diff
82
libretroshare/src/_rsiface/rsinit.h
Normal file
82
libretroshare/src/_rsiface/rsinit.h
Normal file
|
@ -0,0 +1,82 @@
|
|||
/* Initialisation Class (not publicly disclosed to RsIFace) */
|
||||
|
||||
/****
|
||||
* #define RS_USE_PGPSSL 1
|
||||
***/
|
||||
|
||||
#ifndef RSINIT_H
|
||||
#define RSINIT_H
|
||||
|
||||
class RsInit
|
||||
{
|
||||
public:
|
||||
/* Commandline/Directory options */
|
||||
|
||||
static const char *RsConfigDirectory() ;
|
||||
|
||||
|
||||
static bool setStartMinimised() ;
|
||||
static int InitRetroShare(int argcIgnored, char **argvIgnored) ;
|
||||
static int LoadCertificates(bool autoLoginNT) ;
|
||||
static bool ValidateCertificate(std::string &userName) ;
|
||||
static bool ValidateTrustedUser(std::string fname, std::string &userName) ;
|
||||
static bool LoadPassword(std::string passwd) ;
|
||||
static bool RsGenerateCertificate(std::string name, std::string org, std::string loc, std::string country, std::string passwd, std::string &errString);
|
||||
static void load_check_basedir() ;
|
||||
static int create_configinit() ;
|
||||
static bool RsStoreAutoLogin() ;
|
||||
static bool RsTryAutoLogin() ;
|
||||
static bool RsClearAutoLogin(std::string basedir) ;
|
||||
static void InitRsConfig() ;
|
||||
|
||||
static std::string getHomePath() ;
|
||||
|
||||
/* PGPSSL init functions */
|
||||
|
||||
#ifdef RS_USE_PGPSSL
|
||||
static bool LoadGPGPassword(std::string id, std::string passwd);
|
||||
static int GetLogins(std::list<std::string> &pgpIds);
|
||||
static int GetLoginDetails(std::string id, std::string &name, std::string &email);
|
||||
|
||||
static std::string gpgPasswd;
|
||||
#endif
|
||||
|
||||
/* Key Parameters that must be set before
|
||||
* RetroShare will start up:
|
||||
*/
|
||||
static std::string load_cert;
|
||||
static std::string load_key;
|
||||
static std::string passwd;
|
||||
|
||||
static bool havePasswd; /* for Commandline password */
|
||||
static bool autoLogin; /* autoLogin allowed */
|
||||
static bool startMinimised; /* Icon or Full Window */
|
||||
|
||||
/* Win/Unix Differences */
|
||||
static char dirSeperator;
|
||||
|
||||
/* Directories */
|
||||
static std::string basedir;
|
||||
static std::string homePath;
|
||||
|
||||
/* Listening Port */
|
||||
static bool forceExtPort;
|
||||
static bool forceLocalAddr;
|
||||
static unsigned short port;
|
||||
static char inet[256];
|
||||
|
||||
/* Logging */
|
||||
static bool haveLogFile;
|
||||
static bool outStderr;
|
||||
static bool haveDebugLevel;
|
||||
static int debugLevel;
|
||||
static char logfname[1024];
|
||||
|
||||
static bool firsttime_run;
|
||||
static bool load_trustedpeer;
|
||||
static std::string load_trustedpeer_file;
|
||||
|
||||
static bool udpListenerOnly;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,23 +1,26 @@
|
|||
include(_rsiface/rsiface.pri)
|
||||
TEMPLATE = lib
|
||||
CONFIG += static
|
||||
TARGET = retroshare
|
||||
CONFIG += release
|
||||
|
||||
# ################################ Linux ##########################################
|
||||
|
||||
profiling {
|
||||
QMAKE_CXXFLAGS -= -fomit-frame-pointer
|
||||
QMAKE_CXXFLAGS *= -pg -g -fno-omit-frame-pointer
|
||||
QMAKE_CXXFLAGS *= -pg \
|
||||
-g \
|
||||
-fno-omit-frame-pointer
|
||||
}
|
||||
|
||||
debug {
|
||||
DEFINES *= DEBUG
|
||||
|
||||
# DEFINES *= OPENDHT_DEBUG DHT_DEBUG CONN_DEBUG DEBUG_UDP_SORTER P3DISC_DEBUG DEBUG_UDP_LAYER FT_DEBUG EXTADDRSEARCH_DEBUG
|
||||
# DEFINES *= CHAT_DEBUG
|
||||
DEFINES *= P3TURTLE_DEBUG CONTROL_DEBUG FT_DEBUG
|
||||
DEFINES *= P3TURTLE_DEBUG \
|
||||
CONTROL_DEBUG \
|
||||
FT_DEBUG
|
||||
QMAKE_CXXFLAGS *= -g
|
||||
}
|
||||
|
||||
linux-g++ {
|
||||
OBJECTS_DIR = temp/linux-g++/obj
|
||||
DESTDIR = lib.linux-g++
|
||||
|
@ -30,43 +33,52 @@ linux-g++-64 {
|
|||
QMAKE_CXXFLAGS *= -Wall
|
||||
QMAKE_CC = g++
|
||||
}
|
||||
#################### Cross compilation for windows under Linux ####################
|
||||
|
||||
# ################### Cross compilation for windows under Linux ####################
|
||||
win32-x-g++ {
|
||||
OBJECTS_DIR = temp/win32xgcc/obj
|
||||
DESTDIR = lib.win32xgcc
|
||||
DEFINES *= WINDOWS_SYS WIN32 WIN_CROSS_UBUNTU
|
||||
DEFINES *= WINDOWS_SYS \
|
||||
WIN32 \
|
||||
WIN_CROSS_UBUNTU
|
||||
QMAKE_CXXFLAGS *= -Wmissing-include-dirs
|
||||
QMAKE_CC = i586-mingw32msvc-g++
|
||||
QMAKE_LIB = i586-mingw32msvc-ar
|
||||
DEFINES *= STATICLIB WIN32
|
||||
|
||||
INCLUDEPATH *= /usr/i586-mingw32msvc/include ${HOME}/.wine/drive_c/pthreads/include/
|
||||
DEFINES *= STATICLIB \
|
||||
WIN32
|
||||
INCLUDEPATH *= /usr/i586-mingw32msvc/include \
|
||||
${HOME}/.wine/drive_c/pthreads/include/
|
||||
}
|
||||
################################# Windows ##########################################
|
||||
|
||||
# ################################ Windows ##########################################
|
||||
win32 {
|
||||
QMAKE_CC = g++
|
||||
OBJECTS_DIR = temp/obj
|
||||
MOC_DIR = temp/moc
|
||||
DEFINES = WINDOWS_SYS WIN32 STATICLIB MINGW
|
||||
DEFINES = WINDOWS_SYS \
|
||||
WIN32 \
|
||||
STATICLIB \
|
||||
MINGW
|
||||
DESTDIR = lib
|
||||
|
||||
SSL_DIR = ../../../../openssl-0.9.7g-xpgp-0.1c/include
|
||||
UPNPC_DIR = ../../../../miniupnpc-1.0
|
||||
PTHREADS_DIR = ../../../../pthreads-w32-2-8-0-release
|
||||
ZLIB_DIR = ../../../../zlib-1.2.3
|
||||
|
||||
INCLUDEPATH += . $${SSL_DIR} $${UPNPC_DIR} $${PTHREADS_DIR} $${ZLIB_DIR}
|
||||
INCLUDEPATH += . \
|
||||
$${SSL_DIR} \
|
||||
$${UPNPC_DIR} \
|
||||
$${PTHREADS_DIR} \
|
||||
$${ZLIB_DIR}
|
||||
}
|
||||
|
||||
# ################################## COMMON stuff ##################################
|
||||
|
||||
DEFINES *= PQI_USE_XPGP MINIUPNPC_VERSION=10
|
||||
|
||||
DEFINES *= PQI_USE_XPGP \
|
||||
MINIUPNPC_VERSION=10
|
||||
SSL_DIR = ../../../../openssl-0.9.7g-xpgp-0.1c
|
||||
UPNPC_DIR = ../../../../miniupnpc-1.0
|
||||
|
||||
INCLUDEPATH += . $${SSL_DIR}/include $${UPNPC_DIR}
|
||||
INCLUDEPATH += . \
|
||||
$${SSL_DIR}/include \
|
||||
$${UPNPC_DIR}
|
||||
|
||||
# DEPENDPATH += . \
|
||||
# util \
|
||||
|
@ -79,7 +91,6 @@ INCLUDEPATH += . $${SSL_DIR}/include $${UPNPC_DIR}
|
|||
# upnp \
|
||||
# ft \
|
||||
# rsserver
|
||||
|
||||
# INCLUDEPATH += . \
|
||||
# util \
|
||||
# tcponudp \
|
||||
|
@ -91,7 +102,6 @@ INCLUDEPATH += . $${SSL_DIR}/include $${UPNPC_DIR}
|
|||
# upnp \
|
||||
# ft \
|
||||
# rsserver
|
||||
|
||||
# Input
|
||||
HEADERS += dbase/cachestrapper.h \
|
||||
dbase/fimonitor.h \
|
||||
|
@ -227,9 +237,7 @@ HEADERS += dbase/cachestrapper.h \
|
|||
util/rsthreads.h \
|
||||
util/rswin.h \
|
||||
util/rsversion.h
|
||||
|
||||
SOURCES = \
|
||||
dht/dht_check_peers.cc \
|
||||
SOURCES = dht/dht_check_peers.cc \
|
||||
dht/dht_bootstrap.cc \
|
||||
pqi/xpgp_id.cc \
|
||||
rsserver/p3face-msgs.cc \
|
||||
|
@ -338,3 +346,4 @@ SOURCES = \
|
|||
util/rsprint.cc \
|
||||
util/rsthreads.cc \
|
||||
util/rsversion.cc
|
||||
|
||||
|
|
|
@ -56,11 +56,11 @@ void CleanupRsConfig(RsInit *);
|
|||
int InitRetroShare(int argc, char **argv, RsInit *config);
|
||||
|
||||
// This Functions are used for Login.
|
||||
bool ValidateCertificate(RsInit *config, std::string &userName);
|
||||
bool ValidateTrustedUser(RsInit *config, std::string fname, std::string &userName);
|
||||
bool LoadPassword(RsInit *config, std::string passwd);
|
||||
bool RsGenerateCertificate(RsInit *config, std::string name, std::string org,
|
||||
std::string loc, std::string country, std::string passwd, std::string &errString);
|
||||
//bool ValidateCertificate(RsInit *config, std::string &userName);
|
||||
//bool ValidateTrustedUser(RsInit *config, std::string fname, std::string &userName);
|
||||
//bool LoadPassword(RsInit *config, std::string passwd);
|
||||
//bool RsGenerateCertificate(RsInit *config, std::string name, std::string org,
|
||||
// std::string loc, std::string country, std::string passwd, std::string &errString);
|
||||
|
||||
/* Auto Login Fns */
|
||||
bool RsTryAutoLogin(RsInit *config);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue