summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/SkypeWeb/src/skype_messages.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_poll_processing.cpp40
-rw-r--r--protocols/SkypeWeb/src/skype_proto.h7
-rw-r--r--protocols/SkypeWeb/src/skype_search.cpp3
-rw-r--r--protocols/SkypeWeb/src/skype_utils.cpp98
-rw-r--r--protocols/SkypeWeb/src/stdafx.h3
6 files changed, 3 insertions, 150 deletions
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp
index a17e1cdd67..019379379c 100644
--- a/protocols/SkypeWeb/src/skype_messages.cpp
+++ b/protocols/SkypeWeb/src/skype_messages.cpp
@@ -104,8 +104,6 @@ void CSkypeProto::OnMessageSent(const NETLIBHTTPREQUEST *response, void *arg)
debugLogA(__FUNCTION__": failed to send message for %s (%s)", username, error.c_str());
ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, hMessage, (LPARAM)error.c_str());
}
-
-
}
// preparing message/action to writing into db
diff --git a/protocols/SkypeWeb/src/skype_poll_processing.cpp b/protocols/SkypeWeb/src/skype_poll_processing.cpp
index fe6c892147..2f5d9e259e 100644
--- a/protocols/SkypeWeb/src/skype_poll_processing.cpp
+++ b/protocols/SkypeWeb/src/skype_poll_processing.cpp
@@ -151,41 +151,5 @@ void CSkypeProto::ProcessNewMessageRes(const JSONNode &node)
OnChatEvent(node);
}
-void CSkypeProto::ProcessConversationUpdateRes(const JSONNode&)
-{
- /*const JSONNode &lastMessage = node, "lastMessage");
- const JSONNode &properties = node, "properties");
-
- std::string convLink(mir_t2a(json_as_string(lastMessage, "conversationLink"))));
- std::string fromLink(mir_t2a(json_as_string(lastMessage, "from"))));
-
- if (strstr(convLink, "/8:") && IsMe(ContactUrlToName(fromLink)))
- {
- ptrA skypename(ContactUrlToName(convLink));
- MCONTACT hContact = FindContact(skypename);
-
- if (hContact != NULL)
- {
- CMStringA consumptionhorizon(mir_t2a(json_as_string(properties, "consumptionhorizon"))));
-
- int iStart = 0;
- CMStringA szToken1 = consumptionhorizon.Tokenize(";", iStart).Trim();
-
- if (iStart != -1)
- {
- CMStringA szToken2 = consumptionhorizon.Tokenize(";", iStart).Trim();
-
- szToken2.Truncate(szToken2.GetLength() - 3);
-
- time_t evttime = atoi(szToken2.GetBuffer());
- db_set_dw(hContact, m_szModuleName, "LastMsgReadTime", evttime);
-
- //SetSrmmReadStatus(hContact);
- }
- }
- }*/
-}
-
-void CSkypeProto::ProcessThreadUpdateRes(const JSONNode&)
-{
-} \ No newline at end of file
+void CSkypeProto::ProcessConversationUpdateRes(const JSONNode&){}
+void CSkypeProto::ProcessThreadUpdateRes(const JSONNode&){} \ No newline at end of file
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h
index cbc434bc43..fd5bb7be75 100644
--- a/protocols/SkypeWeb/src/skype_proto.h
+++ b/protocols/SkypeWeb/src/skype_proto.h
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
typedef void(CSkypeProto::*SkypeResponseCallback)(const NETLIBHTTPREQUEST *response);
typedef void(CSkypeProto::*SkypeResponseWithArgCallback)(const NETLIBHTTPREQUEST *response, void *arg);
-typedef HRESULT(MarkupCallback)(IHTMLDocument3 *pHtmlDoc, BSTR &message);
-
struct TRInfo
{
std::string
@@ -330,8 +328,6 @@ private:
CMStringA SelfUrlToName(const char *url);
CMStringA GetServerFromUrl(const char *url);
- LPCTSTR ClearText(CMString &value, const TCHAR *message);
-
void CALLBACK SkypeUnsetTimer(void*);
void CALLBACK SkypeSetTimer(void*);
@@ -362,7 +358,4 @@ private:
}
};
-HRESULT TestDocumentText(IHTMLDocument3 *pHtmlDoc, BSTR &message);
-HRESULT TestMarkupServices(BSTR bstrHtml, MarkupCallback *pCallback, BSTR &message);
-
#endif //_SKYPE_PROTO_H_ \ No newline at end of file
diff --git a/protocols/SkypeWeb/src/skype_search.cpp b/protocols/SkypeWeb/src/skype_search.cpp
index 0612f08631..d8f1d2a3a2 100644
--- a/protocols/SkypeWeb/src/skype_search.cpp
+++ b/protocols/SkypeWeb/src/skype_search.cpp
@@ -29,8 +29,7 @@ void CSkypeProto::SearchBasicThread(void* id)
if (!IsOnline())
return;
- ptrT idT((TCHAR *)id);
- ptrA string(mir_urlEncode(T2Utf(idT)));
+ ptrA string(mir_urlEncode(T2Utf((TCHAR *)id)));
SendRequest(new GetSearchRequest(m_szTokenSecret, string), &CSkypeProto::OnSearch);
}
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp
index 62370071af..1647d57682 100644
--- a/protocols/SkypeWeb/src/skype_utils.cpp
+++ b/protocols/SkypeWeb/src/skype_utils.cpp
@@ -667,104 +667,6 @@ INT_PTR CSkypeProto::GlobalParseSkypeUriService(WPARAM wParam, LPARAM lParam)
return 1;
}
-LPCTSTR CSkypeProto::ClearText(CMString &result, const TCHAR *message)
-{
- BSTR bstrHtml = SysAllocString(message), bstrRes = SysAllocString(_T(""));
- HRESULT hr = TestMarkupServices(bstrHtml, &TestDocumentText, bstrRes);
- if (SUCCEEDED(hr))
- result = bstrRes;
- else
- result = message;
- SysFreeString(bstrHtml);
- SysFreeString(bstrRes);
-
- return result;
-}
-
-HRESULT TestDocumentText(IHTMLDocument3 *pHtmlDoc, BSTR &message)
-{
- IHTMLDocument2 *pDoc = NULL;
- IHTMLElement *pElem = NULL;
- BSTR bstrId = SysAllocString(L"test");
-
- HRESULT hr = pHtmlDoc->QueryInterface(IID_PPV_ARGS(&pDoc));
- if (SUCCEEDED(hr) && pDoc) {
- hr = pDoc->get_body(&pElem);
- if (SUCCEEDED(hr) && pElem) {
- BSTR bstrText = NULL;
- pElem->get_innerText(&bstrText);
- message = SysAllocString(bstrText);
- SysFreeString(bstrText);
- pElem->Release();
- }
-
- pDoc->Release();
- }
-
- SysFreeString(bstrId);
- return hr;
-}
-
-
-
-HRESULT TestMarkupServices(BSTR bstrHtml, MarkupCallback *pCallback, BSTR &message)
-{
- IHTMLDocument3 *pHtmlDocRoot = NULL;
-
- // Create the root document -- a "workspace" for parsing.
- HRESULT hr = CoCreateInstance(CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pHtmlDocRoot));
- if (SUCCEEDED(hr) && pHtmlDocRoot) {
- IPersistStreamInit *pPersistStreamInit = NULL;
-
- HRESULT hr = pHtmlDocRoot->QueryInterface(IID_PPV_ARGS(&pPersistStreamInit));
- if (SUCCEEDED(hr)) {
- // Initialize the root document to a default state -- ready for parsing.
- pPersistStreamInit->InitNew();
-
- IMarkupServices *pMarkupServices = NULL;
- hr = pHtmlDocRoot->QueryInterface(IID_PPV_ARGS(&pMarkupServices));
- if (SUCCEEDED(hr)) {
- IMarkupPointer *pMarkupBegin = NULL;
- IMarkupPointer *pMarkupEnd = NULL;
-
- // These markup pointers indicate the insertion point.
- hr = pMarkupServices->CreateMarkupPointer(&pMarkupBegin);
- if (SUCCEEDED(hr))
- hr = pMarkupServices->CreateMarkupPointer(&pMarkupEnd);
-
- if (SUCCEEDED(hr) && pMarkupBegin && pMarkupEnd) {
- IMarkupContainer *pMarkupContainer = NULL;
-
- // Parse the string -- the markup container contains the parsed HTML.
- // Markup pointers are updated to point to begining and end of new container.
- hr = pMarkupServices->ParseString(bstrHtml, 0, &pMarkupContainer, pMarkupBegin, pMarkupEnd);
- if (SUCCEEDED(hr) && pMarkupContainer) {
- IHTMLDocument3 *pHtmlDoc = NULL;
-
- // Retrieve the document interface to the markup container.
- hr = pMarkupContainer->QueryInterface(IID_PPV_ARGS(&pHtmlDoc));
- if (SUCCEEDED(hr) && pHtmlDoc) {
- // Invoke the user-defined action for this new fragment.
- hr = pCallback(pHtmlDoc, message);
-
- // Clean up.
- pHtmlDoc->Release();
- }
- pMarkupContainer->Release();
- }
- pMarkupEnd->Release();
- }
- if (pMarkupBegin)
- pMarkupBegin->Release();
- pMarkupServices->Release();
- }
- pPersistStreamInit->Release();
- }
- pHtmlDocRoot->Release();
- }
- return hr;
-}
-
void CSkypeProto::ProcessTimer()
{
if (IsOnline())
diff --git a/protocols/SkypeWeb/src/stdafx.h b/protocols/SkypeWeb/src/stdafx.h
index bdc07e528a..f8dbacb6b4 100644
--- a/protocols/SkypeWeb/src/stdafx.h
+++ b/protocols/SkypeWeb/src/stdafx.h
@@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <windows.h>
#include <time.h>
-#include <commctrl.h>
-#include <mshtml.h>
#include <string>
#include <vector>
#include <regex>
@@ -50,7 +48,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <m_clistint.h>
#include <m_string.h>
#include <m_json.h>
-#include <m_timezones.h>
#include <m_gui.h>
#include <m_imgsrvc.h>
#include <m_xml.h>