gdi32: Move the handling of font family fallbacks out of freetype.c.
[wine/zf.git] / dlls / wmvcore / wmvcore_main.c
blob4dafcf8055a3201cf6efed0fc3f90351c075f174
1 /*
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
19 #include "wmvcore.h"
21 #include "initguid.h"
22 #include "wmsdk.h"
23 #include "wine/debug.h"
24 #include "wine/heap.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(wmvcore);
28 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
30 TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
32 switch (fdwReason)
34 case DLL_WINE_PREATTACH:
35 return FALSE; /* prefer native version */
36 case DLL_PROCESS_ATTACH:
37 DisableThreadLibraryCalls(hinstDLL);
38 break;
41 return TRUE;
44 HRESULT WINAPI DllRegisterServer(void)
46 FIXME("(): stub\n");
48 return S_OK;
51 HRESULT WINAPI WMCheckURLExtension(const WCHAR *url)
53 FIXME("(%s): stub\n", wine_dbgstr_w(url));
55 if (!url)
56 return E_INVALIDARG;
58 return NS_E_INVALID_NAME;
61 HRESULT WINAPI WMCheckURLScheme(const WCHAR *scheme)
63 FIXME("(%s): stub\n", wine_dbgstr_w(scheme));
65 return NS_E_INVALID_NAME;
68 HRESULT WINAPI WMCreateEditor(IWMMetadataEditor **editor)
70 FIXME("(%p): stub\n", editor);
72 *editor = NULL;
74 return E_NOTIMPL;
77 HRESULT WINAPI WMCreateBackupRestorer(IUnknown *callback, IWMLicenseBackup **licBackup)
79 FIXME("(%p %p): stub\n", callback, licBackup);
81 if (!callback)
82 return E_INVALIDARG;
84 *licBackup = NULL;
86 return E_NOTIMPL;
89 HRESULT WINAPI WMIsContentProtected(const WCHAR *filename, BOOL *protected)
91 FIXME("(%s %p): semi-stub\n", wine_dbgstr_w(filename), protected);
93 if (!filename || !protected)
94 return E_INVALIDARG;
96 *protected = FALSE;
98 return S_FALSE;
101 typedef struct {
102 IWMProfileManager2 IWMProfileManager2_iface;
103 LONG ref;
104 } WMProfileManager;
106 static inline WMProfileManager *impl_from_IWMProfileManager2(IWMProfileManager2 *iface)
108 return CONTAINING_RECORD(iface, WMProfileManager, IWMProfileManager2_iface);
111 static HRESULT WINAPI WMProfileManager_QueryInterface(IWMProfileManager2 *iface, REFIID riid, void **ppv)
113 WMProfileManager *This = impl_from_IWMProfileManager2(iface);
115 if(IsEqualGUID(&IID_IUnknown, riid)) {
116 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
117 *ppv = &This->IWMProfileManager2_iface;
118 }else if(IsEqualGUID(&IID_IWMProfileManager, riid)) {
119 TRACE("(%p)->(IID_IWMProfileManager %p)\n", This, ppv);
120 *ppv = &This->IWMProfileManager2_iface;
121 }else if(IsEqualGUID(&IID_IWMProfileManager2, riid)) {
122 TRACE("(%p)->(IID_IWMProfileManager2 %p)\n", This, ppv);
123 *ppv = &This->IWMProfileManager2_iface;
124 }else {
125 FIXME("Unsupported iface %s\n", debugstr_guid(riid));
126 *ppv = NULL;
127 return E_NOINTERFACE;
130 IUnknown_AddRef((IUnknown*)*ppv);
131 return S_OK;
134 static ULONG WINAPI WMProfileManager_AddRef(IWMProfileManager2 *iface)
136 WMProfileManager *This = impl_from_IWMProfileManager2(iface);
137 LONG ref = InterlockedIncrement(&This->ref);
139 TRACE("(%p) ref=%d\n", This, ref);
141 return ref;
144 static ULONG WINAPI WMProfileManager_Release(IWMProfileManager2 *iface)
146 WMProfileManager *This = impl_from_IWMProfileManager2(iface);
147 LONG ref = InterlockedDecrement(&This->ref);
149 TRACE("(%p) ref=%d\n", This, ref);
151 if(!ref)
152 heap_free(This);
154 return ref;
157 static HRESULT WINAPI WMProfileManager_CreateEmptyProfile(IWMProfileManager2 *iface, WMT_VERSION version, IWMProfile **ret)
159 WMProfileManager *This = impl_from_IWMProfileManager2(iface);
160 FIXME("(%p)->(%x %p)\n", This, version, ret);
161 return E_NOTIMPL;
164 static HRESULT WINAPI WMProfileManager_LoadProfileByID(IWMProfileManager2 *iface, REFGUID guid, IWMProfile **ret)
166 WMProfileManager *This = impl_from_IWMProfileManager2(iface);
167 FIXME("(%p)->(%s %p)\n", This, debugstr_guid(guid), ret);
168 return E_NOTIMPL;
171 static HRESULT WINAPI WMProfileManager_LoadProfileByData(IWMProfileManager2 *iface, const WCHAR *profile, IWMProfile **ret)
173 WMProfileManager *This = impl_from_IWMProfileManager2(iface);
174 FIXME("(%p)->(%s %p)\n", This, debugstr_w(profile), ret);
175 return E_NOTIMPL;
178 static HRESULT WINAPI WMProfileManager_SaveProfile(IWMProfileManager2 *iface, IWMProfile *profile, WCHAR *profile_str, DWORD *len)
180 WMProfileManager *This = impl_from_IWMProfileManager2(iface);
181 FIXME("(%p)->(%p %p %p)\n", This, profile, profile_str, len);
182 return E_NOTIMPL;
185 static HRESULT WINAPI WMProfileManager_GetSystemProfileCount(IWMProfileManager2 *iface, DWORD *ret)
187 WMProfileManager *This = impl_from_IWMProfileManager2(iface);
188 FIXME("(%p)->(%p)\n", This, ret);
189 return E_NOTIMPL;
192 static HRESULT WINAPI WMProfileManager_LoadSystemProfile(IWMProfileManager2 *iface, DWORD index, IWMProfile **ret)
194 WMProfileManager *This = impl_from_IWMProfileManager2(iface);
195 FIXME("(%p)->(%d %p)\n", This, index, ret);
196 return E_NOTIMPL;
199 static HRESULT WINAPI WMProfileManager2_GetSystemProfileVersion(IWMProfileManager2 *iface, WMT_VERSION *version)
201 WMProfileManager *This = impl_from_IWMProfileManager2(iface);
202 FIXME("(%p)->(%p)\n", This, version);
203 return E_NOTIMPL;
206 static HRESULT WINAPI WMProfileManager2_SetSystemProfileVersion(IWMProfileManager2 *iface, WMT_VERSION version)
208 WMProfileManager *This = impl_from_IWMProfileManager2(iface);
209 FIXME("(%p)->(%x)\n", This, version);
210 return E_NOTIMPL;
213 static const IWMProfileManager2Vtbl WMProfileManager2Vtbl = {
214 WMProfileManager_QueryInterface,
215 WMProfileManager_AddRef,
216 WMProfileManager_Release,
217 WMProfileManager_CreateEmptyProfile,
218 WMProfileManager_LoadProfileByID,
219 WMProfileManager_LoadProfileByData,
220 WMProfileManager_SaveProfile,
221 WMProfileManager_GetSystemProfileCount,
222 WMProfileManager_LoadSystemProfile,
223 WMProfileManager2_GetSystemProfileVersion,
224 WMProfileManager2_SetSystemProfileVersion
227 HRESULT WINAPI WMCreateProfileManager(IWMProfileManager **ret)
229 WMProfileManager *profile_mgr;
231 TRACE("(%p)\n", ret);
233 profile_mgr = heap_alloc(sizeof(*profile_mgr));
234 if(!profile_mgr)
235 return E_OUTOFMEMORY;
237 profile_mgr->IWMProfileManager2_iface.lpVtbl = &WMProfileManager2Vtbl;
238 profile_mgr->ref = 1;
240 *ret = (IWMProfileManager *)&profile_mgr->IWMProfileManager2_iface;
241 return S_OK;