Add Title when ask for password.

This commit is contained in:
Phenom 2016-08-09 01:22:14 +02:00
parent 6edd7bb8e3
commit 275c47eff9
27 changed files with 95 additions and 81 deletions

View file

@ -55,7 +55,7 @@ bool RsControlModule::processShouldExit()
return mProcessShouldExit;
}
bool RsControlModule::askForPassword(const std::string &key_details, bool /* prev_is_bad */, std::string &password, bool& cancelled)
bool RsControlModule::askForPassword(const std::string &title, const std::string &key_details, bool /* prev_is_bad */, std::string &password, bool& cancelled)
{
cancelled = false ;
{
@ -67,6 +67,7 @@ bool RsControlModule::askForPassword(const std::string &key_details, bool /* pre
}
mWantPassword = true;
mTitle = title;
mKeyName = key_details;
mPassword = "";
mStateTokenServer->replaceToken(mStateToken);

View file

@ -32,7 +32,7 @@ public:
bool processShouldExit();
// from NotifyClient
virtual bool askForPassword(const std::string& key_details, bool prev_is_bad , std::string& password,bool& canceled);
virtual bool askForPassword(const std::string &title, const std::string& key_details, bool prev_is_bad , std::string& password,bool& canceled);
protected:
// from RsThread
@ -76,6 +76,7 @@ private:
// to notify that a password callback is waiting
// to answer the request, clear the flag and set the password
bool mWantPassword;
std::string mTitle;
std::string mKeyName;
std::string mPassword;
// for ssl cert generation: