diff options
author | George Hazan <george.hazan@gmail.com> | 2013-01-10 20:12:40 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-01-10 20:12:40 +0000 |
commit | e1a9895ffcc730f80fd776b864842215e2e4a561 (patch) | |
tree | bbe6fde6fee75f18a847e618e86440e50d1bdb2b /protocols/JabberG/src/jabber_util.cpp | |
parent | c8f9e295b0fd7baeb28dcc308f22967a482f51c4 (diff) |
Jabber XEP-203 support for groupchat messages
git-svn-id: http://svn.miranda-ng.org/main/trunk@3038 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_util.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_util.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index 924270fc27..795c237033 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -1552,8 +1552,33 @@ BOOL CJabberProto::EnterString(TCHAR *result, size_t resultLen, TCHAR *caption, return bRetVal;
}
+// XEP-0203 delay support
+void JabberReadXep203delay(HXML node, time_t &msgTime)
+{
+ HXML n = xmlGetChildByTag(node, "delay", "xmlns", _T("urn:xmpp:delay"));
+ if (n == NULL)
+ return;
+
+ const TCHAR *ptszTimeStamp = xmlGetAttrValue(n, _T("stamp"));
+ if (ptszTimeStamp == NULL)
+ return;
+
+ // skip '-' chars
+ TCHAR* szStamp = NEWTSTR_ALLOCA(ptszTimeStamp);
+ int si = 0, sj = 0;
+ while (1) {
+ if (szStamp[si] == _T('-'))
+ si++;
+ else
+ if ( !(szStamp[sj++] = szStamp[si++]))
+ break;
+ };
+ msgTime = JabberIsoToUnixTime(szStamp);
+}
+
////////////////////////////////////////////////////////////////////////
// Premultiply bitmap channels for 32-bit bitmaps
+
void JabberBitmapPremultiplyChannels(HBITMAP hBitmap)
{
BITMAP bmp;
|