summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_contacts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Skype/src/skype_contacts.cpp')
-rw-r--r--protocols/Skype/src/skype_contacts.cpp90
1 files changed, 55 insertions, 35 deletions
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();
}