summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_proto.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2012-12-28 20:34:31 +0000
committerAlexander Lantsev <aunsane@gmail.com>2012-12-28 20:34:31 +0000
commit578c3d4a75046cc06dfa247b437f04fc542c36a9 (patch)
treed6cc8b80c086fdf1b13f5469b66bbaf341abc9e5 /protocols/Skype/src/skype_proto.cpp
parent121f8a3e433af878f1168d28035ad4fd17b7aa0b (diff)
- added password changing
git-svn-id: http://svn.miranda-ng.org/main/trunk@2875 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_proto.cpp')
-rw-r--r--protocols/Skype/src/skype_proto.cpp58
1 files changed, 2 insertions, 56 deletions
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp
index 48a32e32db..907a36047a 100644
--- a/protocols/Skype/src/skype_proto.cpp
+++ b/protocols/Skype/src/skype_proto.cpp
@@ -267,7 +267,7 @@ int CSkypeProto::SetStatus(int new_status)
switch (new_status)
{
case ID_STATUS_OFFLINE:
- if (this->IsOnline())
+ if (this->IsOnline() || this->m_iStatus == ID_STATUS_CONNECTING)
{
this->account->SetAvailability(CContact::OFFLINE);
this->account->Logout(true);
@@ -281,7 +281,7 @@ int CSkypeProto::SetStatus(int new_status)
if (old_status == ID_STATUS_OFFLINE && !this->IsOnline())
{
this->m_iStatus = ID_STATUS_CONNECTING;
- if ( !this->SignIn()) return 0;
+ if ( !this->SignIn(this->m_iDesiredStatus)) return 0;
}
else
{
@@ -351,58 +351,4 @@ int __cdecl CSkypeProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPA
}
return 1;
-}
-
-void __cdecl CSkypeProto::SignInAsync(void*)
-{
- this->LoadOwnInfo(this);
- this->LoadContactList(this);
-}
-
-bool CSkypeProto::SignIn(bool isReadPassword)
-{
- if ( !this->login || !::strlen(this->login))
- {
- this->m_iStatus = ID_STATUS_OFFLINE;
- this->SendBroadcast(ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_BADUSERID);
- this->ShowNotification(
- TranslateT("You have not entered a Skype name.\n\
- Configure this in Options->Network->Skype and try again."));
- }
- else if (this->skype->GetAccount(this->login, this->account))
- {
- if (isReadPassword)
- this->password = this->GetDecodeSettingString(NULL, SKYPE_SETTINGS_PASSWORD);
- if ( !this->password || !::strlen(this->password))
- this->RequestPassword();
- else
- {
- this->account.fetch();
- this->account->SetOnAccountChangedCallback(
- (CAccount::OnAccountChanged)&CSkypeProto::OnAccountChanged,
- this);
- //
- int port;
- this->skype->GetInt(SETUPKEY_PORT, port);
- this->skype->SetInt(SETUPKEY_PORT, this->GetSettingWord("Port", port));
- this->skype->SetInt(SETUPKEY_DISABLE_PORT80, (int)!this->GetSettingByte("UseAlternativePorts", 1));
- //
- this->InitProxy();
- //
- this->account->LoginWithPassword(this->password, false, false);
- return true;
- }
- }
-
- return false;
-}
-
-void CSkypeProto::RequestPassword()
-{
- ::DialogBoxParam(
- g_hInstance,
- MAKEINTRESOURCE(IDD_PASSWORDREQUEST),
- NULL,
- CSkypeProto::SkypePasswordProc,
- LPARAM(this));
} \ No newline at end of file