summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_utils.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-06-26 12:55:29 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-06-26 12:55:29 +0000
commit5b21c91fecb2be729152908841474a3d980b45f0 (patch)
treefea8a0d0a9266ed0df4c75979796f7f50e003551 /protocols/SkypeWeb/src/skype_utils.cpp
parent5e85d110ea53a944201c8f3bd57601e265d66e81 (diff)
SkypeWeb: unused code removed.
git-svn-id: http://svn.miranda-ng.org/main/trunk@14396 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_utils.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_utils.cpp98
1 files changed, 0 insertions, 98 deletions
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())