1
0
Fork 0
forked from blue/squawk

first moves to safe pasword storing, preparing the structure

This commit is contained in:
Blue 2020-04-04 19:40:32 +03:00
parent ddfb3419cc
commit 3477226367
21 changed files with 288 additions and 153 deletions

View file

@ -53,7 +53,8 @@ Account::Account(const QString& p_login, const QString& p_server, const QString&
avatarType(),
ownVCardRequestInProgress(false),
network(p_net),
pendingStateMessages()
pendingStateMessages(),
passwordType(Shared::AccountPassword::plain)
{
config.setUser(p_login);
config.setDomain(p_server);
@ -266,6 +267,11 @@ QString Core::Account::getServer() const
return config.domain();
}
Shared::AccountPassword Core::Account::getPasswordType() const
{
return passwordType;
}
void Core::Account::onRosterReceived()
{
vm->requestClientVCard(); //TODO need to make sure server actually supports vCards
@ -296,6 +302,11 @@ void Core::Account::onRosterItemAdded(const QString& bareJid)
}
}
void Core::Account::setPasswordType(Shared::AccountPassword pt)
{
passwordType = pt;
}
void Core::Account::onRosterItemChanged(const QString& bareJid)
{
std::map<QString, Contact*>::const_iterator itr = contacts.find(bareJid);