mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 13:48:59 -04:00
Turned RsInit into a static class, and changed retroshare invite so that it does not contain signatures anymore.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1022 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b9abc24e5c
commit
78c07ca367
18 changed files with 589 additions and 464 deletions
|
@ -142,48 +142,48 @@ class RsControl /* The Main Interface Class - for controlling the server */
|
|||
{
|
||||
public:
|
||||
|
||||
RsControl(RsIface &i, NotifyBase &callback)
|
||||
:cb(callback), rsIface(i) { return; }
|
||||
RsControl(RsIface &i, NotifyBase &callback)
|
||||
:cb(callback), rsIface(i) { return; }
|
||||
|
||||
virtual ~RsControl() { return; }
|
||||
virtual ~RsControl() { return; }
|
||||
|
||||
/* Real Startup Fn */
|
||||
virtual int StartupRetroShare(RsInit *config) = 0;
|
||||
/* 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;
|
||||
/* 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*/
|
||||
virtual bool IsInChat(std::string id) = 0; /* friend : chat msgs */
|
||||
virtual bool IsInMsg(std::string id) = 0; /* friend : msg recpts*/
|
||||
|
||||
/****************************************/
|
||||
/* Config */
|
||||
/****************************************/
|
||||
/* Config */
|
||||
|
||||
virtual int ConfigSetDataRates( int total, int indiv ) = 0;
|
||||
virtual int ConfigGetDataRates( float &inKb, float &outKb) = 0;
|
||||
virtual int ConfigSetBootPrompt( bool on ) = 0;
|
||||
virtual void ConfigFinalSave( ) = 0;
|
||||
virtual void rsGlobalShutDown( ) = 0;
|
||||
virtual int ConfigSetDataRates( int total, int indiv ) = 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() { return cb; }
|
||||
RsIface &getIface() { return rsIface; }
|
||||
NotifyBase &getNotify() { return cb; }
|
||||
RsIface &getIface() { return rsIface; }
|
||||
|
||||
private:
|
||||
NotifyBase &cb;
|
||||
RsIface &rsIface;
|
||||
NotifyBase &cb;
|
||||
RsIface &rsIface;
|
||||
};
|
||||
|
||||
|
||||
|
|
63
libretroshare/src/rsiface/rsinit.h
Normal file
63
libretroshare/src/rsiface/rsinit.h
Normal file
|
@ -0,0 +1,63 @@
|
|||
/* Initialisation Class (not publicly disclosed to RsIFace) */
|
||||
|
||||
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() ;
|
||||
|
||||
/* 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;
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue