| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 STDMETHODIMP ReportResult( | 78 STDMETHODIMP ReportResult( |
| 79 /* [in] */ HRESULT hrResult, | 79 /* [in] */ HRESULT hrResult, |
| 80 /* [in] */ DWORD dwError, | 80 /* [in] */ DWORD dwError, |
| 81 /* [in] */ LPCWSTR szResult); | 81 /* [in] */ LPCWSTR szResult); |
| 82 | 82 |
| 83 STDMETHODIMP Switch( | 83 STDMETHODIMP Switch( |
| 84 /* [in] */ PROTOCOLDATA *pProtocolData); | 84 /* [in] */ PROTOCOLDATA *pProtocolData); |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 class WBPassthru; | 87 class WbPassthroughProtocol; |
| 88 typedef PassthroughAPP::CustomSinkStartPolicy<WBPassthru, WBPassthruSink> WBStar
tPolicy; | |
| 89 | 88 |
| 90 class WBPassthru : public PassthroughAPP::CInternetProtocol<WBStartPolicy> | 89 class WbPassthroughSinkStartPolicy |
| 90 : public PassthroughAPP::CustomSinkStartPolicy<WbPassthroughProtocol, WBPassth
ruSink> |
| 91 { | 91 { |
| 92 typedef PassthroughAPP::CInternetProtocol<WBStartPolicy> BaseClass; | 92 typedef PassthroughAPP::CustomSinkStartPolicy<WbPassthroughProtocol, WBPassthr
uSink> BaseClass; |
| 93 public: | 93 public: |
| 94 WBPassthru(); | 94 HRESULT OnStart(LPCWSTR szUrl, |
| 95 // IInternetProtocolRoot | 95 IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, |
| 96 DWORD grfPI, HANDLE_PTR dwReserved, |
| 97 IInternetProtocol* pTargetProtocol); |
| 98 }; |
| 99 |
| 100 /** |
| 101 * Implementation of "Protocol" interfaces |
| 102 */ |
| 103 class WbPassthroughProtocol |
| 104 : public PassthroughAPP::CInternetProtocol<WbPassthroughSinkStartPolicy> |
| 105 { |
| 106 typedef PassthroughAPP::CInternetProtocol<WbPassthroughSinkStartPolicy> BaseCl
ass; |
| 107 public: |
| 108 WbPassthroughProtocol() |
| 109 : m_shouldSupplyCustomContent(false) |
| 110 { |
| 111 } |
| 112 |
| 113 // derived from IInternetProtocolRoot |
| 96 STDMETHODIMP Start(LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, | 114 STDMETHODIMP Start(LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, |
| 97 IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved) override
; | 115 IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved) override
; |
| 98 | 116 |
| 99 // IInternetProtocol | 117 // derived from IInternetProtocol |
| 100 STDMETHODIMP Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [out] */ ULO
NG *pcbRead) override; | 118 STDMETHODIMP Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [out] */ ULO
NG *pcbRead) override; |
| 101 | 119 |
| 102 bool m_shouldSupplyCustomContent; | 120 bool m_shouldSupplyCustomContent; |
| 103 }; | 121 }; |
| 122 |
| 123 typedef PassthroughAPP::CMetaFactory<PassthroughAPP::CComClassFactoryProtocol, W
bPassthroughProtocol> MetaFactory; |
| 124 |
| 125 |
| OLD | NEW |