From b35ee0b14ec252c54e122a563404c4b808edcf3b Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Tue, 30 Oct 2012 18:59:52 +0000 Subject: added page in userinfo with additional data git-svn-id: http://svn.miranda-ng.org/main/trunk@2116 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_contacts.cpp | 90 +++++++++++++++++++++------------- 1 file changed, 55 insertions(+), 35 deletions(-) (limited to 'protocols/Skype/src/skype_contacts.cpp') diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp index a83ee412da..e79855b6f1 100644 --- a/protocols/Skype/src/skype_contacts.cpp +++ b/protocols/Skype/src/skype_contacts.cpp @@ -317,6 +317,24 @@ void CSkypeProto::UpdateContactTimezone(HANDLE hContact, CContact::Ref contact) this->DeleteSetting(hContact, "TimeZone"); } +void CSkypeProto::UpdateContactOnlineSinceTime(HANDLE hContact, CContact::Ref contact) +{ + uint data; + contact->GetPropLastonlineTimestamp(data); + if (data > 0) + { + } +} + +void CSkypeProto::UpdateContactLastEventDate(HANDLE hContact, CContact::Ref contact) +{ + uint data; + contact->GetPropLastusedTimestamp(data); + if (data > 0) + { + } +} + void CSkypeProto::UpdateFullName(HANDLE hContact, CContact::Ref contact) { SEString data; @@ -361,6 +379,8 @@ void CSkypeProto::UpdateContactProfile(HANDLE hContact, CContact::Ref contact) this->UpdateContactOfficePhone(hContact, contact); this->UpdateContactState(hContact, contact); this->UpdateContactTimezone(hContact, contact); + this->UpdateContactOnlineSinceTime(hContact, contact); + this->UpdateContactLastEventDate(hContact, contact); this->UpdateFullName(hContact, contact); this->SetSettingDword(hContact, "ProfileTS", newTS); @@ -478,10 +498,10 @@ void CSkypeProto::OnContactListChanged(const ContactRef& contact) contact->IsMemberOfHardwiredGroup(CContactGroup::ALL_BUDDIES, result); if (result) { - if ( !this->contactList.contains(contact)) - { - CContact::Ref newContact(contact); - this->contactList.append(newContact); + if ( !this->contactList.contains(contact)) + { + CContact::Ref newContact(contact); + this->contactList.append(newContact); newContact.fetch(); newContact->SetOnContactChangedCallback( (CContact::OnContactChanged)&CSkypeProto::OnContactChanged, @@ -808,43 +828,43 @@ void __cdecl CSkypeProto::SearchBySidAsync(void* arg) return; } - CContactSearch::Ref search; - g_skype->CreateIdentitySearch(::mir_u2a(sid), search); - search.fetch(); - search->SetProtoInfo(this, (HANDLE)SKYPE_SEARCH_BYSID); - search->SetOnContactFindedCallback( - (CContactSearch::OnContactFinded)&CSkypeProto::OnContactFinded); - search->SetOnSearchCompleatedCallback( - (CContactSearch::OnSearchCompleted)&CSkypeProto::OnSearchCompleted); - - bool valid; - if (!search->IsValid(valid) || !valid || !search->Submit()) - { - return; - } - search->BlockWhileSearch(); - search->Release(); + CContactSearch::Ref search; + g_skype->CreateIdentitySearch(::mir_u2a(sid), search); + search.fetch(); + search->SetProtoInfo(this, (HANDLE)SKYPE_SEARCH_BYSID); + search->SetOnContactFindedCallback( + (CContactSearch::OnContactFinded)&CSkypeProto::OnContactFinded); + search->SetOnSearchCompleatedCallback( + (CContactSearch::OnSearchCompleted)&CSkypeProto::OnSearchCompleted); + + bool valid; + if (!search->IsValid(valid) || !valid || !search->Submit()) + { + return; + } + search->BlockWhileSearch(); + search->Release(); } void __cdecl CSkypeProto::SearchByEmailAsync(void* arg) { const wchar_t *email = (wchar_t *)arg; - CContactSearch::Ref search; - g_skype->CreateContactSearch(search); - search.fetch(); - search->SetProtoInfo(this, (HANDLE)SKYPE_SEARCH_BYEMAIL); - search->SetOnContactFindedCallback( - (CContactSearch::OnContactFinded)&CSkypeProto::OnContactFinded); - search->SetOnSearchCompleatedCallback( - (CContactSearch::OnSearchCompleted)&CSkypeProto::OnSearchCompleted); - - bool valid; - if (!search->AddEmailTerm(::mir_u2a(email), valid) || !valid || !search->Submit()) - { - return; - } - search->BlockWhileSearch(); + CContactSearch::Ref search; + g_skype->CreateContactSearch(search); + search.fetch(); + search->SetProtoInfo(this, (HANDLE)SKYPE_SEARCH_BYEMAIL); + search->SetOnContactFindedCallback( + (CContactSearch::OnContactFinded)&CSkypeProto::OnContactFinded); + search->SetOnSearchCompleatedCallback( + (CContactSearch::OnSearchCompleted)&CSkypeProto::OnSearchCompleted); + + bool valid; + if (!search->AddEmailTerm(::mir_u2a(email), valid) || !valid || !search->Submit()) + { + return; + } + search->BlockWhileSearch(); search->Release(); } -- cgit v1.2.3