mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
Added handling of RetroShare protocol under Windows.
Added new command line parameter "-r retroshare://..." for adding links to the registered running RetroShare. Recompile of the GUI needed. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4156 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a337941555
commit
20fa00c40e
12 changed files with 380 additions and 16 deletions
|
@ -127,8 +127,9 @@ class RsInit
|
|||
static std::string RsConfigDirectory();
|
||||
static std::string RsConfigKeysDirectory();
|
||||
|
||||
static std::string RsProfileConfigDirectory();
|
||||
static bool setStartMinimised() ;
|
||||
static std::string RsProfileConfigDirectory();
|
||||
static bool getStartMinimised() ;
|
||||
static std::string getRetroShareLink();
|
||||
|
||||
static int getSslPwdLen();
|
||||
static bool getAutoLogin();
|
||||
|
|
|
@ -127,6 +127,8 @@ class RsInitConfig
|
|||
static std::string load_trustedpeer_file;
|
||||
|
||||
static bool udpListenerOnly;
|
||||
|
||||
static std::string RetroShareLink;
|
||||
};
|
||||
|
||||
|
||||
|
@ -160,6 +162,7 @@ std::string RsInitConfig::passwd;
|
|||
|
||||
bool RsInitConfig::autoLogin; /* autoLogin allowed */
|
||||
bool RsInitConfig::startMinimised; /* Icon or Full Window */
|
||||
std::string RsInitConfig::RetroShareLink;
|
||||
|
||||
/* Win/Unix Differences */
|
||||
char RsInitConfig::dirSeperator;
|
||||
|
@ -396,7 +399,7 @@ int RsInit::InitRetroShare(int argcIgnored, char **argvIgnored, bool strictCheck
|
|||
/* getopt info: every availiable option is listed here. if it is followed by a ':' it
|
||||
needs an argument. If it is followed by a '::' the argument is optional.
|
||||
*/
|
||||
while((c = getopt(argc, argv,"hesamui:p:c:w:l:d:U:")) != -1)
|
||||
while((c = getopt(argc, argv,"hesamui:p:c:w:l:d:U:r:")) != -1)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
|
@ -466,6 +469,11 @@ int RsInit::InitRetroShare(int argcIgnored, char **argvIgnored, bool strictCheck
|
|||
std::cerr << "Opt for User Id ";
|
||||
std::cerr << std::endl;
|
||||
break;
|
||||
case 'r':
|
||||
RsInitConfig::RetroShareLink = optarg;
|
||||
std::cerr << "Opt for RetroShare link";
|
||||
std::cerr << std::endl;
|
||||
break;
|
||||
case 'h':
|
||||
std::cerr << "Help: " << std::endl;
|
||||
std::cerr << "The commandline options are for retroshare-nogui, a headless server in a shell, or systems without QT." << std::endl << std::endl;
|
||||
|
@ -481,14 +489,15 @@ int RsInit::InitRetroShare(int argcIgnored, char **argvIgnored, bool strictCheck
|
|||
std::cerr << "-u Only listen to UDP" << std::endl;
|
||||
std::cerr << "-e Use a forwarded external Port" << std::endl ;
|
||||
std::cerr << "-U [User Name/GPG id/SSL id] Sets Account to Use, Useful when Autologin is enabled." << std::endl;
|
||||
std::cerr << "-r link Use RetroShare link." << std::endl;
|
||||
exit(1);
|
||||
break;
|
||||
default:
|
||||
if (strictCheck) {
|
||||
if (strictCheck) {
|
||||
std::cerr << "Unknown Option!" << std::endl;
|
||||
std::cerr << "Use '-h' for help." << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1657,11 +1666,16 @@ std::string RsInit::RsProfileConfigDirectory()
|
|||
return dir;
|
||||
}
|
||||
|
||||
bool RsInit::setStartMinimised()
|
||||
bool RsInit::getStartMinimised()
|
||||
{
|
||||
return RsInitConfig::startMinimised;
|
||||
}
|
||||
|
||||
std::string RsInit::getRetroShareLink()
|
||||
{
|
||||
return RsInitConfig::RetroShareLink;
|
||||
}
|
||||
|
||||
int RsInit::getSslPwdLen(){
|
||||
return SSLPWD_LEN;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue