Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/plugin/passthroughapp/SinkPolicy.h

Issue 29332980: Issue #1484 - Use the currently distributed version of PassthroughAPP unaltered
Patch Set: use OnStartEx() instead of OnStart() Created Dec. 23, 2015, 3:18 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #ifndef PASSTHROUGHAPP_SINKPOLICY_H 1 #ifndef PASSTHROUGHAPP_SINKPOLICY_H
19 #define PASSTHROUGHAPP_SINKPOLICY_H 2 #define PASSTHROUGHAPP_SINKPOLICY_H
20 3
21 #if _MSC_VER > 1000 4 #if _MSC_VER > 1000
22 #pragma once 5 #pragma once
23 #endif // _MSC_VER > 1000 6 #endif // _MSC_VER > 1000
24 7
25 namespace PassthroughAPP 8 namespace PassthroughAPP
26 { 9 {
27 10
28 // A sink policy class should implement OnStart with the prototype shown 11 // A sink policy class should implement OnStart with the prototype shown
29 // below, presumably by eventually forwarding to pTargetProtocol->Start, 12 // below, presumably by eventually forwarding to pTargetProtocol->Start,
30 // possibly with different parameters 13 // possibly with different parameters
31 14
32 class NoSinkStartPolicy 15 class NoSinkStartPolicy
33 { 16 {
34 public: 17 public:
35 HRESULT OnStart(LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, 18 HRESULT OnStart(LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink,
36 IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserv ed, 19 IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserv ed,
37 IInternetProtocol* pTargetProtocol) const; 20 IInternetProtocol* pTargetProtocol) const;
38 21
22 HRESULT OnStartEx(IUri *pUri, IInternetProtocolSink *pOIProtSink,
23 IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserv ed,
24 IInternetProtocolEx* pTargetProtocol) const;
39 }; 25 };
40 26
41 template <class Base> 27 template <class Base>
42 class CComObjectSharedRef : public Base 28 class CComObjectSharedRef : public Base
43 { 29 {
44 public: 30 public:
45 typedef Base ContainedObject; 31 typedef Base ContainedObject;
46 32
47 CComObjectSharedRef(IUnknown* punkRefCount, IUnknown* = 0); 33 CComObjectSharedRef(IUnknown* punkRefCount, IUnknown* = 0);
48 #ifdef _ATL_DEBUG_INTERFACES 34 #ifdef _ATL_DEBUG_INTERFACES
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 class CustomSinkStartPolicy 153 class CustomSinkStartPolicy
168 { 154 {
169 public: 155 public:
170 DECLARE_AGGREGATABLE_PROTSINK(Protocol, Sink) 156 DECLARE_AGGREGATABLE_PROTSINK(Protocol, Sink)
171 157
172 HRESULT OnStart(LPCWSTR szUrl, 158 HRESULT OnStart(LPCWSTR szUrl,
173 IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindIn fo, 159 IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindIn fo,
174 DWORD grfPI, HANDLE_PTR dwReserved, 160 DWORD grfPI, HANDLE_PTR dwReserved,
175 IInternetProtocol* pTargetProtocol) const; 161 IInternetProtocol* pTargetProtocol) const;
176 162
163 HRESULT OnStartEx(IUri* pUri,
164 IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindIn fo,
165 DWORD grfPI, HANDLE_PTR dwReserved,
166 IInternetProtocolEx* pTargetProtocol) const;
177 167
178 static Sink* GetSink(const Protocol* pProtocol); 168 static Sink* GetSink(const Protocol* pProtocol);
179 Sink* GetSink() const; 169 Sink* GetSink() const;
180 static Protocol* GetProtocol(const Sink* pSink); 170 static Protocol* GetProtocol(const Sink* pSink);
181 }; 171 };
182 172
183 } // end namespace PassthroughAPP 173 } // end namespace PassthroughAPP
184 174
185 #include "SinkPolicy.inl" 175 #include "SinkPolicy.inl"
186 176
187 #endif // PASSTHROUGHAPP_SINKPOLICY_H 177 #endif // PASSTHROUGHAPP_SINKPOLICY_H
OLDNEW

Powered by Google App Engine
This is Rietveld