From 98ea54f7f9eac65c369538e0f293ac7ec3e8db51 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 9 May 2015 18:20:41 +0000 Subject: SkypeWeb: TRouter refactoring. git-svn-id: http://svn.miranda-ng.org/main/trunk@13499 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_utils.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'protocols/SkypeWeb/src/skype_utils.cpp') diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp index 0024ba63c8..4ef74fb50e 100644 --- a/protocols/SkypeWeb/src/skype_utils.cpp +++ b/protocols/SkypeWeb/src/skype_utils.cpp @@ -22,6 +22,24 @@ bool CSkypeProto::IsOnline() return m_iStatus > ID_STATUS_OFFLINE && m_hPollingThread; } +void CSkypeProto::SetSrmmReadStatus(MCONTACT hContact) +{ + time_t time = getDword(hContact, "LastMsgReadTime", 0); + if (!time) + return; + + TCHAR ttime[64]; + _locale_t locale = _create_locale(LC_ALL, ""); + _tcsftime_l(ttime, SIZEOF(ttime), _T("%X - %x"), localtime(&time), locale); + _free_locale(locale); + + StatusTextData st = { 0 }; + st.cbSize = sizeof(st); + st.hIcon = LoadSkinnedIcon(SKINICON_OTHER_HISTORY); + mir_sntprintf(st.tszText, SIZEOF(st.tszText), TranslateT("Message read: %s"), ttime); + CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hContact, (LPARAM)&st); +} + time_t CSkypeProto::IsoToUnixTime(const TCHAR *stamp) { TCHAR date[9]; -- cgit v1.2.3