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
26 #include "wmvcore_private.h"
29 #include "wine/debug.h"
30 #include "wine/heap.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(wmvcore
);
34 HRESULT WINAPI
WMCreateSyncReader(IUnknown
*reserved
, DWORD rights
, IWMSyncReader
**reader
)
36 TRACE("reserved %p, rights %#lx, reader %p.\n", reserved
, rights
, reader
);
38 return winegstreamer_create_wm_sync_reader(NULL
, (void **)reader
);
41 HRESULT WINAPI
WMCreateSyncReaderPriv(IWMSyncReader
**reader
)
43 TRACE("reader %p.\n", reader
);
45 return winegstreamer_create_wm_sync_reader(NULL
, (void **)reader
);
48 HRESULT WINAPI
WMCheckURLExtension(const WCHAR
*url
)
50 FIXME("(%s): stub\n", wine_dbgstr_w(url
));
55 return NS_E_INVALID_NAME
;
58 HRESULT WINAPI
WMCheckURLScheme(const WCHAR
*scheme
)
60 FIXME("(%s): stub\n", wine_dbgstr_w(scheme
));
62 return NS_E_INVALID_NAME
;
65 HRESULT WINAPI
WMCreateEditor(IWMMetadataEditor
**editor
)
67 FIXME("(%p): stub\n", editor
);
74 HRESULT WINAPI
WMCreateBackupRestorer(IUnknown
*callback
, IWMLicenseBackup
**licBackup
)
76 FIXME("(%p %p): stub\n", callback
, licBackup
);
86 HRESULT WINAPI
WMIsContentProtected(const WCHAR
*filename
, BOOL
*protected)
88 FIXME("(%s %p): semi-stub\n", wine_dbgstr_w(filename
), protected);
90 if (!filename
|| !protected)
99 IWMProfileManager2 IWMProfileManager2_iface
;
103 static inline WMProfileManager
*impl_from_IWMProfileManager2(IWMProfileManager2
*iface
)
105 return CONTAINING_RECORD(iface
, WMProfileManager
, IWMProfileManager2_iface
);
108 static HRESULT WINAPI
WMProfileManager_QueryInterface(IWMProfileManager2
*iface
, REFIID riid
, void **ppv
)
110 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
112 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
113 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
114 *ppv
= &This
->IWMProfileManager2_iface
;
115 }else if(IsEqualGUID(&IID_IWMProfileManager
, riid
)) {
116 TRACE("(%p)->(IID_IWMProfileManager %p)\n", This
, ppv
);
117 *ppv
= &This
->IWMProfileManager2_iface
;
118 }else if(IsEqualGUID(&IID_IWMProfileManager2
, riid
)) {
119 TRACE("(%p)->(IID_IWMProfileManager2 %p)\n", This
, ppv
);
120 *ppv
= &This
->IWMProfileManager2_iface
;
122 FIXME("Unsupported iface %s\n", debugstr_guid(riid
));
124 return E_NOINTERFACE
;
127 IUnknown_AddRef((IUnknown
*)*ppv
);
131 static ULONG WINAPI
WMProfileManager_AddRef(IWMProfileManager2
*iface
)
133 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
134 LONG ref
= InterlockedIncrement(&This
->ref
);
136 TRACE("(%p) ref=%ld\n", This
, ref
);
141 static ULONG WINAPI
WMProfileManager_Release(IWMProfileManager2
*iface
)
143 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
144 LONG ref
= InterlockedDecrement(&This
->ref
);
146 TRACE("(%p) ref=%ld\n", This
, ref
);
154 static HRESULT WINAPI
WMProfileManager_CreateEmptyProfile(IWMProfileManager2
*iface
, WMT_VERSION version
, IWMProfile
**ret
)
156 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
157 FIXME("(%p)->(%x %p)\n", This
, version
, ret
);
161 static HRESULT WINAPI
WMProfileManager_LoadProfileByID(IWMProfileManager2
*iface
, REFGUID guid
, IWMProfile
**ret
)
163 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
164 FIXME("(%p)->(%s %p)\n", This
, debugstr_guid(guid
), ret
);
168 static HRESULT WINAPI
WMProfileManager_LoadProfileByData(IWMProfileManager2
*iface
, const WCHAR
*profile
, IWMProfile
**ret
)
170 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
171 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(profile
), ret
);
175 static HRESULT WINAPI
WMProfileManager_SaveProfile(IWMProfileManager2
*iface
, IWMProfile
*profile
, WCHAR
*profile_str
, DWORD
*len
)
177 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
178 FIXME("(%p)->(%p %p %p)\n", This
, profile
, profile_str
, len
);
182 static HRESULT WINAPI
WMProfileManager_GetSystemProfileCount(IWMProfileManager2
*iface
, DWORD
*ret
)
184 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
185 FIXME("(%p)->(%p)\n", This
, ret
);
189 static HRESULT WINAPI
WMProfileManager_LoadSystemProfile(IWMProfileManager2
*iface
, DWORD index
, IWMProfile
**ret
)
191 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
192 FIXME("(%p)->(%ld %p)\n", This
, index
, ret
);
196 static HRESULT WINAPI
WMProfileManager2_GetSystemProfileVersion(IWMProfileManager2
*iface
, WMT_VERSION
*version
)
198 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
199 FIXME("(%p)->(%p)\n", This
, version
);
203 static HRESULT WINAPI
WMProfileManager2_SetSystemProfileVersion(IWMProfileManager2
*iface
, WMT_VERSION version
)
205 WMProfileManager
*This
= impl_from_IWMProfileManager2(iface
);
206 FIXME("(%p)->(%x)\n", This
, version
);
210 static const IWMProfileManager2Vtbl WMProfileManager2Vtbl
= {
211 WMProfileManager_QueryInterface
,
212 WMProfileManager_AddRef
,
213 WMProfileManager_Release
,
214 WMProfileManager_CreateEmptyProfile
,
215 WMProfileManager_LoadProfileByID
,
216 WMProfileManager_LoadProfileByData
,
217 WMProfileManager_SaveProfile
,
218 WMProfileManager_GetSystemProfileCount
,
219 WMProfileManager_LoadSystemProfile
,
220 WMProfileManager2_GetSystemProfileVersion
,
221 WMProfileManager2_SetSystemProfileVersion
224 HRESULT WINAPI
WMCreateProfileManager(IWMProfileManager
**ret
)
226 WMProfileManager
*profile_mgr
;
228 TRACE("(%p)\n", ret
);
230 profile_mgr
= heap_alloc(sizeof(*profile_mgr
));
232 return E_OUTOFMEMORY
;
234 profile_mgr
->IWMProfileManager2_iface
.lpVtbl
= &WMProfileManager2Vtbl
;
235 profile_mgr
->ref
= 1;
237 *ret
= (IWMProfileManager
*)&profile_mgr
->IWMProfileManager2_iface
;