summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-09-24 16:48:00 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-09-24 16:48:00 +0000
commit32298ff5da1d21c0411dbf8ac6e1801b80529592 (patch)
tree37c5e9cba4b0d16f2e7278a90bedc4927632804f /protocols/SkypeWeb
parent5cfd54b9152944f686c2ca2402e85280b3130f32 (diff)
SkypeWeb: moji support
git-svn-id: http://svn.miranda-ng.org/main/trunk@15435 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r--protocols/SkypeWeb/src/skype_db.h1
-rw-r--r--protocols/SkypeWeb/src/skype_events.cpp9
-rw-r--r--protocols/SkypeWeb/src/skype_messages.cpp4
-rw-r--r--protocols/SkypeWeb/src/skype_proto.cpp3
-rw-r--r--protocols/SkypeWeb/src/skype_utils.h30
5 files changed, 22 insertions, 25 deletions
diff --git a/protocols/SkypeWeb/src/skype_db.h b/protocols/SkypeWeb/src/skype_db.h
index 471b4e8f87..dba05ef912 100644
--- a/protocols/SkypeWeb/src/skype_db.h
+++ b/protocols/SkypeWeb/src/skype_db.h
@@ -26,6 +26,7 @@ enum SKYPE_DB_EVENT_TYPE
SKYPE_DB_EVENT_TYPE_FILETRANSFER_INFO,
SKYPE_DB_EVENT_TYPE_URIOBJ,
SKYPE_DB_EVENT_TYPE_EDITED_MESSAGE,
+ SKYPE_DB_EVENT_TYPE_MOJI,
SKYPE_DB_EVENT_TYPE_UNKNOWN
};
diff --git a/protocols/SkypeWeb/src/skype_events.cpp b/protocols/SkypeWeb/src/skype_events.cpp
index a631d734ad..4363fe3dec 100644
--- a/protocols/SkypeWeb/src/skype_events.cpp
+++ b/protocols/SkypeWeb/src/skype_events.cpp
@@ -162,6 +162,15 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam)
szText = Translate("Incoming call");
break;
}
+ case SKYPE_DB_EVENT_TYPE_MOJI:
+ {
+ HXML xml = xmlParseString(ptrT(mir_utf8decodeT((char*)pEvent->dbei->pBlob)), 0, _T("URIObject"));
+ if (xml != NULL)
+ {
+ szText.Format("Moji: %s (%s)", _T2A(xmlGetAttrValue(xmlGetChildByPath(xml, _T("OriginalName"), 1), _T("v"))), _T2A(xmlGetAttrValue(xmlGetChildByPath(xml, _T("a"), 1), _T("href"))));
+ }
+ break;
+ }
case SKYPE_DB_EVENT_TYPE_UNKNOWN:
{
szText.Format(Translate("Unknown event, please send this text for developer: \"%s\""), mir_utf8decodeA((char*)pEvent->dbei->pBlob));
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp
index e8140392af..3015dcad15 100644
--- a/protocols/SkypeWeb/src/skype_messages.cpp
+++ b/protocols/SkypeWeb/src/skype_messages.cpp
@@ -237,6 +237,10 @@ void CSkypeProto::OnPrivateMessageEvent(const JSONNode &node)
{
ProcessContactRecv(hContact, timestamp, strContent.c_str(), szMessageId);
}
+ else if (strMessageType == "RichText/Media_FlikMsg")
+ {
+ AddDbEvent(SKYPE_DB_EVENT_TYPE_MOJI, hContact, timestamp, DBEF_UTF, strContent.c_str(), szMessageId);
+ }
//else if (messageType == "Event/SkypeVideoMessage") {}
//else if (messageType.c_str() == "RichText/Location") {}
else
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp
index 54d443256e..70d2d835a6 100644
--- a/protocols/SkypeWeb/src/skype_proto.cpp
+++ b/protocols/SkypeWeb/src/skype_proto.cpp
@@ -22,7 +22,8 @@ CSkypeProto::CSkypeProto(const char* protoName, const TCHAR* userName) :
m_PopupClasses(1),
m_InviteDialogs(1),
m_GCCreateDialogs(1),
- m_OutMessages(3, PtrKeySortT)
+ m_OutMessages(3, PtrKeySortT),
+ m_bThreadsTerminated(1)
{
InitNetwork();
diff --git a/protocols/SkypeWeb/src/skype_utils.h b/protocols/SkypeWeb/src/skype_utils.h
index 1a608bce47..e9c1275334 100644
--- a/protocols/SkypeWeb/src/skype_utils.h
+++ b/protocols/SkypeWeb/src/skype_utils.h
@@ -80,30 +80,12 @@ class EventHandle
{
HANDLE _hEvent;
public:
- inline EventHandle()
- {
- _hEvent = CreateEvent(NULL, 0, 0, NULL);
- }
- inline ~EventHandle()
- {
- CloseHandle(_hEvent);
- }
- inline void Set()
- {
- SetEvent(_hEvent);
- }
- inline void Wait()
- {
- WaitForSingleObject(_hEvent, INFINITE);
- }
- inline void Wait(DWORD dwMilliseconds)
- {
- WaitForSingleObject(_hEvent, dwMilliseconds);
- }
- inline operator HANDLE()
- {
- return _hEvent;
- }
+ inline EventHandle() { _hEvent = CreateEvent(NULL, 0, 0, NULL); }
+ inline ~EventHandle() { CloseHandle(_hEvent); }
+ inline void Set() { SetEvent(_hEvent); }
+ inline void Wait() { WaitForSingleObject(_hEvent, INFINITE); }
+ inline void Wait(DWORD dwMilliseconds) { WaitForSingleObject(_hEvent, dwMilliseconds); }
+ inline operator HANDLE() { return _hEvent; }
};