ReactOS  0.4.14-dev-50-g13bb5e2
urlhist.c
Go to the documentation of this file.
1 /*
2  * Copyright 2006 Jacek Caban for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library 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 GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18 
19 #include "ieframe.h"
20 #include "urlhist.h"
21 
22 #include "wine/debug.h"
23 
25 
27 {
28  *ppv = NULL;
29 
31  TRACE("(IID_IUnknown %p)\n", ppv);
32  *ppv = iface;
33  }else if(IsEqualGUID(&IID_IUrlHistoryStg, riid)) {
34  TRACE("(IID_IUrlHistoryStg %p)\n", ppv);
35  *ppv = iface;
36  }else if(IsEqualGUID(&IID_IUrlHistoryStg2, riid)) {
37  TRACE("(IID_IUrlHistoryStg2 %p)\n", ppv);
38  *ppv = iface;
39  }
40 
41  if(*ppv) {
42  IUnknown_AddRef((IUnknown*)*ppv);
43  return S_OK;
44  }
45 
46  WARN("(%s %p)\n", debugstr_guid(riid), ppv);
47  return E_NOINTERFACE;
48 }
49 
51 {
52  lock_module();
53  return 2;
54 }
55 
57 {
58  unlock_module();
59  return 1;
60 }
61 
62 static HRESULT WINAPI UrlHistoryStg_AddUrl(IUrlHistoryStg2 *iface, LPCOLESTR lpcsUrl,
63  LPCOLESTR pocsTitle, DWORD dwFlags)
64 {
65  FIXME("(%s %s %08x)\n", debugstr_w(lpcsUrl), debugstr_w(pocsTitle), dwFlags);
66  return E_NOTIMPL;
67 }
68 
69 static HRESULT WINAPI UrlHistoryStg_DeleteUrl(IUrlHistoryStg2 *iface, LPCOLESTR lpcsUrl,
70  DWORD dwFlags)
71 {
72  FIXME("(%s %08x)\n", debugstr_w(lpcsUrl), dwFlags);
73  return E_NOTIMPL;
74 }
75 
76 static HRESULT WINAPI UrlHistoryStg_QueryUrl(IUrlHistoryStg2 *iface, LPCOLESTR lpcsUrl,
77  DWORD dwFlags, LPSTATURL lpSTATURL)
78 {
79  FIXME("(%s %08x %p)\n", debugstr_w(lpcsUrl), dwFlags, lpSTATURL);
80  return E_NOTIMPL;
81 }
82 
83 static HRESULT WINAPI UrlHistoryStg_BindToObject(IUrlHistoryStg2 *iface, LPCOLESTR lpcsUrl,
84  REFIID riid, void **ppv)
85 {
86  FIXME("(%s %s %p)\n", debugstr_w(lpcsUrl), debugstr_guid(riid), ppv);
87  return E_NOTIMPL;
88 }
89 
91 {
92  FIXME("(%p)\n", ppEnum);
93  return E_NOTIMPL;
94 }
95 
97  LPCOLESTR pocsTitle, DWORD dwFlags, BOOL fWriteHistory, IOleCommandTarget *poctNotify,
98  IUnknown *punkISFolder)
99 {
100  FIXME("(%s %s %08x %x %p %p)\n", debugstr_w(pocsUrl), debugstr_w(pocsTitle),
101  dwFlags, fWriteHistory, poctNotify, punkISFolder);
102  return E_NOTIMPL;
103 }
104 
106 {
107  FIXME("()\n");
108  return E_NOTIMPL;
109 }
110 
111 static const IUrlHistoryStg2Vtbl UrlHistoryStg2Vtbl = {
122 };
123 
125 
127 {
128  if(pOuter)
129  return CLASS_E_NOAGGREGATION;
130 
131  return IUrlHistoryStg2_QueryInterface(&UrlHistoryStg2, riid, ppv);
132 }
static HRESULT WINAPI UrlHistoryStg_ClearHistory(IUrlHistoryStg2 *iface)
Definition: urlhist.c:105
static HRESULT WINAPI UrlHistoryStg_AddUrlAndNotify(IUrlHistoryStg2 *iface, LPCOLESTR pocsUrl, LPCOLESTR pocsTitle, DWORD dwFlags, BOOL fWriteHistory, IOleCommandTarget *poctNotify, IUnknown *punkISFolder)
Definition: urlhist.c:96
static ULONG WINAPI UrlHistoryStg_Release(IUrlHistoryStg2 *iface)
Definition: urlhist.c:56
#define REFIID
Definition: guiddef.h:118
#define E_NOINTERFACE
Definition: winerror.h:2364
static IUrlHistoryStg2 UrlHistoryStg2
Definition: urlhist.c:124
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
HRESULT WINAPI CUrlHistory_Create(IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppv)
Definition: urlhist.c:126
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT WINAPI UrlHistoryStg_QueryUrl(IUrlHistoryStg2 *iface, LPCOLESTR lpcsUrl, DWORD dwFlags, LPSTATURL lpSTATURL)
Definition: urlhist.c:76
WINE_DEFAULT_DEBUG_CHANNEL(ieframe)
unsigned int BOOL
Definition: ntddk_ex.h:94
static ULONG WINAPI UrlHistoryStg_AddRef(IUrlHistoryStg2 *iface)
Definition: urlhist.c:50
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
static HRESULT WINAPI UrlHistoryStg_BindToObject(IUrlHistoryStg2 *iface, LPCOLESTR lpcsUrl, REFIID riid, void **ppv)
Definition: urlhist.c:83
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI UrlHistoryStg_AddUrl(IUrlHistoryStg2 *iface, LPCOLESTR lpcsUrl, LPCOLESTR pocsTitle, DWORD dwFlags)
Definition: urlhist.c:62
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IUnknown
static HRESULT WINAPI UrlHistoryStg_DeleteUrl(IUrlHistoryStg2 *iface, LPCOLESTR lpcsUrl, DWORD dwFlags)
Definition: urlhist.c:69
#define WINAPI
Definition: msvc.h:8
static void unlock_module(void)
Definition: ieframe.h:339
static HRESULT WINAPI UrlHistoryStg_EnumUrls(IUrlHistoryStg2 *iface, IEnumSTATURL **ppEnum)
Definition: urlhist.c:90
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static const IUrlHistoryStg2Vtbl UrlHistoryStg2Vtbl
Definition: urlhist.c:111
static void lock_module(void)
Definition: ieframe.h:335
unsigned int ULONG
Definition: retypes.h:1
static HRESULT WINAPI UrlHistoryStg_QueryInterface(IUrlHistoryStg2 *iface, REFIID riid, void **ppv)
Definition: urlhist.c:26