From a6175cc98ca2b8ca61faa927e934f49375cee685 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 2 Oct 2012 18:39:38 +0000 Subject: - added simple contacts loading - added contact status updating git-svn-id: http://svn.miranda-ng.org/main/trunk@1766 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_proto.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'protocols/Skype/src/skype_proto.cpp') diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index 35920ac183..c21880caf4 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -138,7 +138,7 @@ int CSkypeProto::SetStatus(int new_status) { this->m_iStatus = new_status; //todo: set all status to offline - this->account->Logout(); + this->account->Logout(true); this->account->BlockWhileLoggingOut(); this->account->SetAvailability(CContact::OFFLINE); this->SetAllContactStatuses(ID_STATUS_OFFLINE); @@ -154,8 +154,8 @@ int CSkypeProto::SetStatus(int new_status) this->m_iStatus = ID_STATUS_CONNECTING; this->password = this->GetDecodeSettingString(SKYPE_SETTINGS_PASSWORD); - //this->ForkThread(&CSkypeProto::SignIn, this); - this->SignIn(this); + this->ForkThread(&CSkypeProto::SignIn, this); + //this->SignIn(this); } } @@ -203,16 +203,14 @@ bool CSkypeProto::IsOffline() void __cdecl CSkypeProto::SignIn(void*) { - //WaitForSingleObject(&this->signin_lock, INFINITE); + WaitForSingleObject(&this->signin_lock, INFINITE); - this->account->LoginWithPassword(::mir_u2a(this->password)); + this->account->LoginWithPassword(::mir_u2a(this->password), false, false); this->account->BlockWhileLoggingIn(); - //CContact::Ref()->SetOnChangeCallback((OnContactChangeFunc)&CSkypeProto::OnContactChanged, this); - this->SetStatus(this->m_iDesiredStatus); - //this->ForkThread(&CSkypeProto::LoadContactList, this); - this->LoadContactList(this); + this->ForkThread(&CSkypeProto::LoadContactList, this); + //this->LoadContactList(this); - //ReleaseMutex(this->signin_lock); + ReleaseMutex(this->signin_lock); } \ No newline at end of file -- cgit v1.2.3