quartz: Free two assert calls from having side effects.
[wine/testsucceed.git] / dlls / ieframe / urlhist.c
blob157138c5183c202352e0d90a7fdad6ecf79251cc
1 /*
2 * Copyright 2006 Jacek Caban for CodeWeavers
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.
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.
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
19 #include "ieframe.h"
20 #include "urlhist.h"
22 #include "wine/debug.h"
24 WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
26 static HRESULT WINAPI UrlHistoryStg_QueryInterface(IUrlHistoryStg2 *iface, REFIID riid, void **ppv)
28 *ppv = NULL;
30 if(IsEqualGUID(&IID_IUnknown, riid)) {
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;
41 if(*ppv) {
42 IUnknown_AddRef((IUnknown*)*ppv);
43 return S_OK;
46 WARN("(%s %p)\n", debugstr_guid(riid), ppv);
47 return E_NOINTERFACE;
50 static ULONG WINAPI UrlHistoryStg_AddRef(IUrlHistoryStg2 *iface)
52 lock_module();
53 return 2;
56 static ULONG WINAPI UrlHistoryStg_Release(IUrlHistoryStg2 *iface)
58 unlock_module();
59 return 1;
62 static HRESULT WINAPI UrlHistoryStg_AddUrl(IUrlHistoryStg2 *iface, LPCOLESTR lpcsUrl,
63 LPCOLESTR pocsTitle, DWORD dwFlags)
65 FIXME("(%s %s %08x)\n", debugstr_w(lpcsUrl), debugstr_w(pocsTitle), dwFlags);
66 return E_NOTIMPL;
69 static HRESULT WINAPI UrlHistoryStg_DeleteUrl(IUrlHistoryStg2 *iface, LPCOLESTR lpcsUrl,
70 DWORD dwFlags)
72 FIXME("(%s %08x)\n", debugstr_w(lpcsUrl), dwFlags);
73 return E_NOTIMPL;
76 static HRESULT WINAPI UrlHistoryStg_QueryUrl(IUrlHistoryStg2 *iface, LPCOLESTR lpcsUrl,
77 DWORD dwFlags, LPSTATURL lpSTATURL)
79 FIXME("(%s %08x %p)\n", debugstr_w(lpcsUrl), dwFlags, lpSTATURL);
80 return E_NOTIMPL;
83 static HRESULT WINAPI UrlHistoryStg_BindToObject(IUrlHistoryStg2 *iface, LPCOLESTR lpcsUrl,
84 REFIID riid, void **ppv)
86 FIXME("(%s %s %p)\n", debugstr_w(lpcsUrl), debugstr_guid(riid), ppv);
87 return E_NOTIMPL;
90 static HRESULT WINAPI UrlHistoryStg_EnumUrls(IUrlHistoryStg2 *iface, IEnumSTATURL **ppEnum)
92 FIXME("(%p)\n", ppEnum);
93 return E_NOTIMPL;
96 static HRESULT WINAPI UrlHistoryStg_AddUrlAndNotify(IUrlHistoryStg2 *iface, LPCOLESTR pocsUrl,
97 LPCOLESTR pocsTitle, DWORD dwFlags, BOOL fWriteHistory, IOleCommandTarget *poctNotify,
98 IUnknown *punkISFolder)
100 FIXME("(%s %s %08x %x %p %p)\n", debugstr_w(pocsUrl), debugstr_w(pocsTitle),
101 dwFlags, fWriteHistory, poctNotify, punkISFolder);
102 return E_NOTIMPL;
105 static HRESULT WINAPI UrlHistoryStg_ClearHistory(IUrlHistoryStg2 *iface)
107 FIXME("()\n");
108 return E_NOTIMPL;
111 static const IUrlHistoryStg2Vtbl UrlHistoryStg2Vtbl = {
112 UrlHistoryStg_QueryInterface,
113 UrlHistoryStg_AddRef,
114 UrlHistoryStg_Release,
115 UrlHistoryStg_AddUrl,
116 UrlHistoryStg_DeleteUrl,
117 UrlHistoryStg_QueryUrl,
118 UrlHistoryStg_BindToObject,
119 UrlHistoryStg_EnumUrls,
120 UrlHistoryStg_AddUrlAndNotify,
121 UrlHistoryStg_ClearHistory
124 static IUrlHistoryStg2 UrlHistoryStg2 = { &UrlHistoryStg2Vtbl };
126 HRESULT WINAPI CUrlHistory_Create(IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppv)
128 if(pOuter)
129 return CLASS_E_NOAGGREGATION;
131 return IUrlHistoryStg_QueryInterface(&UrlHistoryStg2, riid, ppv);