Added new return codes to RsInit::InitRetroShare to know, what failed.

Show error box when gpg initialization failed.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3744 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-11-03 22:54:34 +00:00
parent 89f448d282
commit 0e41211f3c
6 changed files with 208 additions and 112 deletions

View file

@ -26,7 +26,11 @@
*
*/
// Initialize ok, result >= 0
#define RS_INIT_OK 0 // Initialize ok
#define RS_INIT_HAVE_ACCOUNT 1 // Initialize ok, have account
// Initialize failed, result < 0
#define RS_INIT_AUTH_FAILED -1 // AuthGPG::InitAuth failed
/****
@ -55,10 +59,9 @@ class RsInit
* @param argc passed from executable
* @param argv commandline arguments passed to executable
* @param strictCheck set to true if you want rs to continue executing if invalid argument passed and vice versa
* @return one is initialisation has been successful
* @return RS_INIT_...
*/
static int InitRetroShare(int argc, char **argv,
bool strictCheck=true);
static int InitRetroShare(int argc, char **argv, bool strictCheck=true);
/*!
* This return directory seperator for different platforms, not an issue anymore as C library can distinguish
@ -107,7 +110,7 @@ class RsInit
/*!
* Final Certificate load. This can be called if:
* a) InitRetroshare() returns true -> autoLoad/password Set.
* a) InitRetroshare() returns RS_INIT_HAVE_ACCOUNT -> autoLoad/password Set.
* b) SelectGPGAccount() && LoadPassword()
*
* This wrapper is used to lock the profile first before