| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 */ | |
| 1 #ifndef PLUGIN_USER_SETTINGS_H | 17 #ifndef PLUGIN_USER_SETTINGS_H |
|
sergei
2015/01/09 15:42:54
What does it improve?
Eric
2015/01/09 16:25:24
Consistency. All the other headers use #ifndef gua
| |
| 2 #define PLUGIN_USER_SETTINGS_H | 18 #define PLUGIN_USER_SETTINGS_H |
| 3 | 19 |
| 4 #include <OAIdl.h> | 20 #include <OAIdl.h> |
| 5 | 21 |
| 6 /* | 22 /* |
| 7 Class is used to call methods Get,Set,Update of Settings object from JavaScript. | 23 Class is used to call methods Get,Set,Update of Settings object from JavaScript. |
| 8 When url is local page "user_mysettings.html", after document is loaded, C++ cre ates Settings object in page's JavaScript. | 24 When url is local page "user_mysettings.html", after document is loaded, C++ cre ates Settings object in page's JavaScript. |
| 9 Then var value = window.Settings.Get(par), window.Settings.Set(par, value), wind ow.Settings.Update() can be called from JavaScript | 25 Then var value = window.Settings.Get(par), window.Settings.Set(par, value), wind ow.Settings.Update() can be called from JavaScript |
| 10 */ | 26 */ |
| 11 class CPluginUserSettings: public IDispatch | 27 class CPluginUserSettings: public IDispatch |
| 12 { | 28 { |
| 13 public: | 29 public: |
| 14 CPluginUserSettings() // = default; | |
|
sergei
2015/01/09 15:42:54
If the implementation of the ctr is default and ca
Eric
2015/01/09 16:25:24
OK.
This class shouldn't be copyable or movable,
| |
| 15 { | |
| 16 } | |
| 17 | |
| 18 // IUnknown | 30 // IUnknown |
| 19 STDMETHOD(QueryInterface)(REFIID riid, void **ppvObj); | 31 STDMETHOD(QueryInterface)(REFIID riid, void **ppvObj); |
| 20 ULONG __stdcall AddRef(); | 32 ULONG __stdcall AddRef(); |
| 21 ULONG __stdcall Release(); | 33 ULONG __stdcall Release(); |
| 22 | 34 |
| 23 // IDispatch | 35 // IDispatch |
| 24 STDMETHOD(GetTypeInfoCount)(UINT* pctinfo); | 36 STDMETHOD(GetTypeInfoCount)(UINT* pctinfo); |
| 25 STDMETHOD(GetTypeInfo)(UINT itinfo, LCID lcid, ITypeInfo** pptinfo); | 37 STDMETHOD(GetTypeInfo)(UINT itinfo, LCID lcid, ITypeInfo** pptinfo); |
| 26 STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID l cid, DISPID* rgdispid); | 38 STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID l cid, DISPID* rgdispid); |
| 27 STDMETHOD(Invoke)(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DI SPPARAMS* pDispparams, VARIANT* pVarResult, | 39 STDMETHOD(Invoke)(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DI SPPARAMS* pDispparams, VARIANT* pVarResult, |
| 28 EXCEPINFO* pExcepinfo, UINT* pArgErr); | 40 EXCEPINFO* pExcepinfo, UINT* pArgErr); |
| 29 }; | 41 }; |
| 30 | 42 |
| 31 #endif | 43 #endif |
| LEFT | RIGHT |