2 * Copyright 2012 Austin English
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
23 #include "wine/debug.h"
24 #include "wine/heap.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(wmvcore
);
28 HRESULT WINAPI
DllRegisterServer(void)
35 HRESULT WINAPI
WMCheckURLExtension(const WCHAR
*url
)
37 FIXME("(%s): stub\n", wine_dbgstr_w(url
));
42 return NS_E_INVALID_NAME
;
45 HRESULT WINAPI
WMCheckURLScheme(const WCHAR
*scheme
)
47 FIXME("(%s): stub\n", wine_dbgstr_w(scheme
));
49 return NS_E_INVALID_NAME
;
52 HRESULT WINAPI
WMCreateEditor(IWMMetadataEditor
**editor
)
54 FIXME("(%p): stub\n", editor
);
61 HRESULT WINAPI
WMCreateBackupRestorer(IUnknown
*callback
, IWMLicenseBackup
**licBackup
)
63 FIXME("(%p %p): stub\n", callback
, licBackup
);
73 HRESULT WINAPI
WMIsContentProtected(const WCHAR
*filename
, BOOL
*protected)
75 FIXME("(%s %p): semi-stub\n", wine_dbgstr_w(filename
), protected);
77 if (!filename
|| !protected)
86 IWMProfileManager2 IWMProfileManager2_iface
;
90 static inline WMProfileManager
*impl_from_IWMProfileManager2(IWMProfileManager2
*iface
)
92 return CONTAINING_RECORD(iface
, WMProfileManager
, IWMProfileManager2_iface
);
95 static HRESULT WINAPI
WMProfileManager_QueryInterface(IWMProfileManager2
*iface
, REFIID riid
, void **ppv
)
97 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
99 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
100 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
101 *ppv
= &This
->IWMProfileManager2_iface
;
102 }else if(IsEqualGUID(&IID_IWMProfileManager
, riid
)) {
103 TRACE("(%p)->(IID_IWMProfileManager %p)\n", This
, ppv
);
104 *ppv
= &This
->IWMProfileManager2_iface
;
105 }else if(IsEqualGUID(&IID_IWMProfileManager2
, riid
)) {
106 TRACE("(%p)->(IID_IWMProfileManager2 %p)\n", This
, ppv
);
107 *ppv
= &This
->IWMProfileManager2_iface
;
109 FIXME("Unsupported iface %s\n", debugstr_guid(riid
));
111 return E_NOINTERFACE
;
114 IUnknown_AddRef((IUnknown
*)*ppv
);
118 static ULONG WINAPI
WMProfileManager_AddRef(IWMProfileManager2
*iface
)
120 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
121 LONG ref
= InterlockedIncrement(&This
->ref
);
123 TRACE("(%p) ref=%d\n", This
, ref
);
128 static ULONG WINAPI
WMProfileManager_Release(IWMProfileManager2
*iface
)
130 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
131 LONG ref
= InterlockedDecrement(&This
->ref
);
133 TRACE("(%p) ref=%d\n", This
, ref
);
141 static HRESULT WINAPI
WMProfileManager_CreateEmptyProfile(IWMProfileManager2
*iface
, WMT_VERSION version
, IWMProfile
**ret
)
143 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
144 FIXME("(%p)->(%x %p)\n", This
, version
, ret
);
148 static HRESULT WINAPI
WMProfileManager_LoadProfileByID(IWMProfileManager2
*iface
, REFGUID guid
, IWMProfile
**ret
)
150 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
151 FIXME("(%p)->(%s %p)\n", This
, debugstr_guid(guid
), ret
);
155 static HRESULT WINAPI
WMProfileManager_LoadProfileByData(IWMProfileManager2
*iface
, const WCHAR
*profile
, IWMProfile
**ret
)
157 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
158 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(profile
), ret
);
162 static HRESULT WINAPI
WMProfileManager_SaveProfile(IWMProfileManager2
*iface
, IWMProfile
*profile
, WCHAR
*profile_str
, DWORD
*len
)
164 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
165 FIXME("(%p)->(%p %p %p)\n", This
, profile
, profile_str
, len
);
169 static HRESULT WINAPI
WMProfileManager_GetSystemProfileCount(IWMProfileManager2
*iface
, DWORD
*ret
)
171 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
172 FIXME("(%p)->(%p)\n", This
, ret
);
176 static HRESULT WINAPI
WMProfileManager_LoadSystemProfile(IWMProfileManager2
*iface
, DWORD index
, IWMProfile
**ret
)
178 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
179 FIXME("(%p)->(%d %p)\n", This
, index
, ret
);
183 static HRESULT WINAPI
WMProfileManager2_GetSystemProfileVersion(IWMProfileManager2
*iface
, WMT_VERSION
*version
)
185 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
186 FIXME("(%p)->(%p)\n", This
, version
);
190 static HRESULT WINAPI
WMProfileManager2_SetSystemProfileVersion(IWMProfileManager2
*iface
, WMT_VERSION version
)
192 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
193 FIXME("(%p)->(%x)\n", This
, version
);
197 static const IWMProfileManager2Vtbl WMProfileManager2Vtbl
= {
198 WMProfileManager_QueryInterface
,
199 WMProfileManager_AddRef
,
200 WMProfileManager_Release
,
201 WMProfileManager_CreateEmptyProfile
,
202 WMProfileManager_LoadProfileByID
,
203 WMProfileManager_LoadProfileByData
,
204 WMProfileManager_SaveProfile
,
205 WMProfileManager_GetSystemProfileCount
,
206 WMProfileManager_LoadSystemProfile
,
207 WMProfileManager2_GetSystemProfileVersion
,
208 WMProfileManager2_SetSystemProfileVersion
211 HRESULT WINAPI
WMCreateProfileManager(IWMProfileManager
**ret
)
213 WMProfileManager
*profile_mgr
;
215 TRACE("(%p)\n", ret
);
217 profile_mgr
= heap_alloc(sizeof(*profile_mgr
));
219 return E_OUTOFMEMORY
;
221 profile_mgr
->IWMProfileManager2_iface
.lpVtbl
= &WMProfileManager2Vtbl
;
222 profile_mgr
->ref
= 1;
224 *ret
= (IWMProfileManager
*)&profile_mgr
->IWMProfileManager2_iface
;