Sync with trunk (r48008)
[reactos.git] / dll / win32 / urlmon / uri.c
1 /*
2 * Copyright 2010 Jacek Caban for CodeWeavers
3 * Copyright 2010 Thomas Mullaly
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20 #include "urlmon_main.h"
21 #include "wine/debug.h"
22
23 WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
24
25 typedef struct {
26 const IUriVtbl *lpIUriVtbl;
27 LONG ref;
28 } Uri;
29
30 typedef struct {
31 const IUriBuilderVtbl *lpIUriBuilderVtbl;
32 LONG ref;
33 } UriBuilder;
34
35 #define URI(x) ((IUri*) &(x)->lpIUriVtbl)
36 #define URIBUILDER(x) ((IUriBuilder*) &(x)->lpIUriBuilderVtbl)
37
38 #define URI_THIS(iface) DEFINE_THIS(Uri, IUri, iface)
39
40 static HRESULT WINAPI Uri_QueryInterface(IUri *iface, REFIID riid, void **ppv)
41 {
42 Uri *This = URI_THIS(iface);
43
44 if(IsEqualGUID(&IID_IUnknown, riid)) {
45 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
46 *ppv = URI(This);
47 }else if(IsEqualGUID(&IID_IUri, riid)) {
48 TRACE("(%p)->(IID_IUri %p)\n", This, ppv);
49 *ppv = URI(This);
50 }else {
51 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
52 *ppv = NULL;
53 return E_NOINTERFACE;
54 }
55
56 IUnknown_AddRef((IUnknown*)*ppv);
57 return S_OK;
58 }
59
60 static ULONG WINAPI Uri_AddRef(IUri *iface)
61 {
62 Uri *This = URI_THIS(iface);
63 LONG ref = InterlockedIncrement(&This->ref);
64
65 TRACE("(%p) ref=%d\n", This, ref);
66
67 return ref;
68 }
69
70 static ULONG WINAPI Uri_Release(IUri *iface)
71 {
72 Uri *This = URI_THIS(iface);
73 LONG ref = InterlockedDecrement(&This->ref);
74
75 TRACE("(%p) ref=%d\n", This, ref);
76
77 if(!ref)
78 heap_free(This);
79
80 return ref;
81 }
82
83 static HRESULT WINAPI Uri_GetPropertyBSTR(IUri *iface, Uri_PROPERTY uriProp, BSTR *pbstrProperty, DWORD dwFlags)
84 {
85 Uri *This = URI_THIS(iface);
86 FIXME("(%p)->(%d %p %x)\n", This, uriProp, pbstrProperty, dwFlags);
87
88 if(!pbstrProperty)
89 return E_POINTER;
90
91 if(uriProp > Uri_PROPERTY_STRING_LAST) {
92 /* Windows allocates an empty BSTR for invalid Uri_PROPERTY's. */
93 *pbstrProperty = SysAllocStringLen(NULL, 0);
94
95 /* It only returns S_FALSE for the ZONE property... */
96 if(uriProp == Uri_PROPERTY_ZONE)
97 return S_FALSE;
98 else
99 return S_OK;
100 }
101
102 return E_NOTIMPL;
103 }
104
105 static HRESULT WINAPI Uri_GetPropertyLength(IUri *iface, Uri_PROPERTY uriProp, DWORD *pcchProperty, DWORD dwFlags)
106 {
107 Uri *This = URI_THIS(iface);
108 FIXME("(%p)->(%d %p %x)\n", This, uriProp, pcchProperty, dwFlags);
109
110 if(!pcchProperty)
111 return E_INVALIDARG;
112
113 /* Can only return a length for a property if it's a string. */
114 if(uriProp > Uri_PROPERTY_STRING_LAST)
115 return E_INVALIDARG;
116
117 return E_NOTIMPL;
118 }
119
120 static HRESULT WINAPI Uri_GetPropertyDWORD(IUri *iface, Uri_PROPERTY uriProp, DWORD *pcchProperty, DWORD dwFlags)
121 {
122 Uri *This = URI_THIS(iface);
123 FIXME("(%p)->(%d %p %x)\n", This, uriProp, pcchProperty, dwFlags);
124
125 if(!pcchProperty)
126 return E_INVALIDARG;
127
128 /* Microsoft's implementation for the ZONE property of a URI seems to be lacking...
129 * From what I can tell, instead of checking which URLZONE the URI belongs to it
130 * simply assigns URLZONE_INVALID and returns E_NOTIMPL. This also applies to the GetZone
131 * function.
132 */
133 if(uriProp == Uri_PROPERTY_ZONE) {
134 *pcchProperty = URLZONE_INVALID;
135 return E_NOTIMPL;
136 }
137
138 if(uriProp < Uri_PROPERTY_DWORD_START) {
139 *pcchProperty = 0;
140 return E_INVALIDARG;
141 }
142
143 return E_NOTIMPL;
144 }
145
146 static HRESULT WINAPI Uri_HasProperty(IUri *iface, Uri_PROPERTY uriProp, BOOL *pfHasProperty)
147 {
148 Uri *This = URI_THIS(iface);
149 FIXME("(%p)->(%d %p)\n", This, uriProp, pfHasProperty);
150
151 if(!pfHasProperty)
152 return E_INVALIDARG;
153
154 return E_NOTIMPL;
155 }
156
157 static HRESULT WINAPI Uri_GetAbsoluteUri(IUri *iface, BSTR *pstrAbsoluteUri)
158 {
159 Uri *This = URI_THIS(iface);
160 FIXME("(%p)->(%p)\n", This, pstrAbsoluteUri);
161
162 if(!pstrAbsoluteUri)
163 return E_POINTER;
164
165 return E_NOTIMPL;
166 }
167
168 static HRESULT WINAPI Uri_GetAuthority(IUri *iface, BSTR *pstrAuthority)
169 {
170 Uri *This = URI_THIS(iface);
171 FIXME("(%p)->(%p)\n", This, pstrAuthority);
172
173 if(!pstrAuthority)
174 return E_POINTER;
175
176 return E_NOTIMPL;
177 }
178
179 static HRESULT WINAPI Uri_GetDisplayUri(IUri *iface, BSTR *pstrDisplayUri)
180 {
181 Uri *This = URI_THIS(iface);
182 FIXME("(%p)->(%p)\n", This, pstrDisplayUri);
183
184 if(!pstrDisplayUri)
185 return E_POINTER;
186
187 return E_NOTIMPL;
188 }
189
190 static HRESULT WINAPI Uri_GetDomain(IUri *iface, BSTR *pstrDomain)
191 {
192 Uri *This = URI_THIS(iface);
193 FIXME("(%p)->(%p)\n", This, pstrDomain);
194
195 if(!pstrDomain)
196 return E_POINTER;
197
198 return E_NOTIMPL;
199 }
200
201 static HRESULT WINAPI Uri_GetExtension(IUri *iface, BSTR *pstrExtension)
202 {
203 Uri *This = URI_THIS(iface);
204 FIXME("(%p)->(%p)\n", This, pstrExtension);
205
206 if(!pstrExtension)
207 return E_POINTER;
208
209 return E_NOTIMPL;
210 }
211
212 static HRESULT WINAPI Uri_GetFragment(IUri *iface, BSTR *pstrFragment)
213 {
214 Uri *This = URI_THIS(iface);
215 FIXME("(%p)->(%p)\n", This, pstrFragment);
216
217 if(!pstrFragment)
218 return E_POINTER;
219
220 return E_NOTIMPL;
221 }
222
223 static HRESULT WINAPI Uri_GetHost(IUri *iface, BSTR *pstrHost)
224 {
225 Uri *This = URI_THIS(iface);
226 FIXME("(%p)->(%p)\n", This, pstrHost);
227
228 if(!pstrHost)
229 return E_POINTER;
230
231 return E_NOTIMPL;
232 }
233
234 static HRESULT WINAPI Uri_GetPassword(IUri *iface, BSTR *pstrPassword)
235 {
236 Uri *This = URI_THIS(iface);
237 FIXME("(%p)->(%p)\n", This, pstrPassword);
238
239 if(!pstrPassword)
240 return E_POINTER;
241
242 return E_NOTIMPL;
243 }
244
245 static HRESULT WINAPI Uri_GetPath(IUri *iface, BSTR *pstrPath)
246 {
247 Uri *This = URI_THIS(iface);
248 FIXME("(%p)->(%p)\n", This, pstrPath);
249
250 if(!pstrPath)
251 return E_POINTER;
252
253 return E_NOTIMPL;
254 }
255
256 static HRESULT WINAPI Uri_GetPathAndQuery(IUri *iface, BSTR *pstrPathAndQuery)
257 {
258 Uri *This = URI_THIS(iface);
259 FIXME("(%p)->(%p)\n", This, pstrPathAndQuery);
260
261 if(!pstrPathAndQuery)
262 return E_POINTER;
263
264 return E_NOTIMPL;
265 }
266
267 static HRESULT WINAPI Uri_GetQuery(IUri *iface, BSTR *pstrQuery)
268 {
269 Uri *This = URI_THIS(iface);
270 FIXME("(%p)->(%p)\n", This, pstrQuery);
271
272 if(!pstrQuery)
273 return E_POINTER;
274
275 return E_NOTIMPL;
276 }
277
278 static HRESULT WINAPI Uri_GetRawUri(IUri *iface, BSTR *pstrRawUri)
279 {
280 Uri *This = URI_THIS(iface);
281 FIXME("(%p)->(%p)\n", This, pstrRawUri);
282
283 if(!pstrRawUri)
284 return E_POINTER;
285
286 return E_NOTIMPL;
287 }
288
289 static HRESULT WINAPI Uri_GetSchemeName(IUri *iface, BSTR *pstrSchemeName)
290 {
291 Uri *This = URI_THIS(iface);
292 FIXME("(%p)->(%p)\n", This, pstrSchemeName);
293
294 if(!pstrSchemeName)
295 return E_POINTER;
296
297 return E_NOTIMPL;
298 }
299
300 static HRESULT WINAPI Uri_GetUserInfo(IUri *iface, BSTR *pstrUserInfo)
301 {
302 Uri *This = URI_THIS(iface);
303 FIXME("(%p)->(%p)\n", This, pstrUserInfo);
304
305 if(!pstrUserInfo)
306 return E_POINTER;
307
308 return E_NOTIMPL;
309 }
310
311 static HRESULT WINAPI Uri_GetUserName(IUri *iface, BSTR *pstrUserName)
312 {
313 Uri *This = URI_THIS(iface);
314 FIXME("(%p)->(%p)\n", This, pstrUserName);
315
316 if(!pstrUserName)
317 return E_POINTER;
318
319 return E_NOTIMPL;
320 }
321
322 static HRESULT WINAPI Uri_GetHostType(IUri *iface, DWORD *pdwHostType)
323 {
324 Uri *This = URI_THIS(iface);
325 FIXME("(%p)->(%p)\n", This, pdwHostType);
326
327 if(!pdwHostType)
328 return E_INVALIDARG;
329
330 return E_NOTIMPL;
331 }
332
333 static HRESULT WINAPI Uri_GetPort(IUri *iface, DWORD *pdwPort)
334 {
335 Uri *This = URI_THIS(iface);
336 FIXME("(%p)->(%p)\n", This, pdwPort);
337
338 if(!pdwPort)
339 return E_INVALIDARG;
340
341 return E_NOTIMPL;
342 }
343
344 static HRESULT WINAPI Uri_GetScheme(IUri *iface, DWORD *pdwScheme)
345 {
346 Uri *This = URI_THIS(iface);
347 FIXME("(%p)->(%p)\n", This, pdwScheme);
348
349 if(!pdwScheme)
350 return E_INVALIDARG;
351
352 return E_NOTIMPL;
353 }
354
355 static HRESULT WINAPI Uri_GetZone(IUri *iface, DWORD *pdwZone)
356 {
357 Uri *This = URI_THIS(iface);
358 FIXME("(%p)->(%p)\n", This, pdwZone);
359
360 if(!pdwZone)
361 return E_INVALIDARG;
362
363 /* Microsoft doesn't seem to have this implemented yet... See
364 * the comment in Uri_GetPropertyDWORD for more about this.
365 */
366 *pdwZone = URLZONE_INVALID;
367 return E_NOTIMPL;
368 }
369
370 static HRESULT WINAPI Uri_GetProperties(IUri *iface, DWORD *pdwProperties)
371 {
372 Uri *This = URI_THIS(iface);
373 FIXME("(%p)->(%p)\n", This, pdwProperties);
374
375 if(!pdwProperties)
376 return E_INVALIDARG;
377
378 return E_NOTIMPL;
379 }
380
381 static HRESULT WINAPI Uri_IsEqual(IUri *iface, IUri *pUri, BOOL *pfEqual)
382 {
383 Uri *This = URI_THIS(iface);
384 TRACE("(%p)->(%p %p)\n", This, pUri, pfEqual);
385
386 if(!pfEqual)
387 return E_POINTER;
388
389 if(!pUri) {
390 *pfEqual = FALSE;
391
392 /* For some reason Windows returns S_OK here... */
393 return S_OK;
394 }
395
396 FIXME("(%p)->(%p %p)\n", This, pUri, pfEqual);
397 return E_NOTIMPL;
398 }
399
400 #undef URI_THIS
401
402 static const IUriVtbl UriVtbl = {
403 Uri_QueryInterface,
404 Uri_AddRef,
405 Uri_Release,
406 Uri_GetPropertyBSTR,
407 Uri_GetPropertyLength,
408 Uri_GetPropertyDWORD,
409 Uri_HasProperty,
410 Uri_GetAbsoluteUri,
411 Uri_GetAuthority,
412 Uri_GetDisplayUri,
413 Uri_GetDomain,
414 Uri_GetExtension,
415 Uri_GetFragment,
416 Uri_GetHost,
417 Uri_GetPassword,
418 Uri_GetPath,
419 Uri_GetPathAndQuery,
420 Uri_GetQuery,
421 Uri_GetRawUri,
422 Uri_GetSchemeName,
423 Uri_GetUserInfo,
424 Uri_GetUserName,
425 Uri_GetHostType,
426 Uri_GetPort,
427 Uri_GetScheme,
428 Uri_GetZone,
429 Uri_GetProperties,
430 Uri_IsEqual
431 };
432
433 /***********************************************************************
434 * CreateUri (urlmon.@)
435 */
436 HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI)
437 {
438 Uri *ret;
439
440 TRACE("(%s %x %x %p)\n", debugstr_w(pwzURI), dwFlags, (DWORD)dwReserved, ppURI);
441
442 if(!ppURI)
443 return E_INVALIDARG;
444
445 if(!pwzURI) {
446 *ppURI = NULL;
447 return E_INVALIDARG;
448 }
449
450 ret = heap_alloc(sizeof(Uri));
451 if(!ret)
452 return E_OUTOFMEMORY;
453
454 ret->lpIUriVtbl = &UriVtbl;
455 ret->ref = 1;
456
457 *ppURI = URI(ret);
458 return S_OK;
459 }
460
461 #define URIBUILDER_THIS(iface) DEFINE_THIS(UriBuilder, IUriBuilder, iface)
462
463 static HRESULT WINAPI UriBuilder_QueryInterface(IUriBuilder *iface, REFIID riid, void **ppv)
464 {
465 UriBuilder *This = URIBUILDER_THIS(iface);
466
467 if(IsEqualGUID(&IID_IUnknown, riid)) {
468 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
469 *ppv = URIBUILDER(This);
470 }else if(IsEqualGUID(&IID_IUriBuilder, riid)) {
471 TRACE("(%p)->(IID_IUri %p)\n", This, ppv);
472 *ppv = URIBUILDER(This);
473 }else {
474 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
475 *ppv = NULL;
476 return E_NOINTERFACE;
477 }
478
479 IUnknown_AddRef((IUnknown*)*ppv);
480 return S_OK;
481 }
482
483 static ULONG WINAPI UriBuilder_AddRef(IUriBuilder *iface)
484 {
485 UriBuilder *This = URIBUILDER_THIS(iface);
486 LONG ref = InterlockedIncrement(&This->ref);
487
488 TRACE("(%p) ref=%d\n", This, ref);
489
490 return ref;
491 }
492
493 static ULONG WINAPI UriBuilder_Release(IUriBuilder *iface)
494 {
495 UriBuilder *This = URIBUILDER_THIS(iface);
496 LONG ref = InterlockedDecrement(&This->ref);
497
498 TRACE("(%p) ref=%d\n", This, ref);
499
500 if(!ref)
501 heap_free(This);
502
503 return ref;
504 }
505
506 static HRESULT WINAPI UriBuilder_CreateUriSimple(IUriBuilder *iface,
507 DWORD dwAllowEncodingPropertyMask,
508 DWORD_PTR dwReserved,
509 IUri **ppIUri)
510 {
511 UriBuilder *This = URIBUILDER_THIS(iface);
512 FIXME("(%p)->(%d %d %p)\n", This, dwAllowEncodingPropertyMask, (DWORD)dwReserved, ppIUri);
513 return E_NOTIMPL;
514 }
515
516 static HRESULT WINAPI UriBuilder_CreateUri(IUriBuilder *iface,
517 DWORD dwCreateFlags,
518 DWORD dwAllowEncodingPropertyMask,
519 DWORD_PTR dwReserved,
520 IUri **ppIUri)
521 {
522 UriBuilder *This = URIBUILDER_THIS(iface);
523 FIXME("(%p)->(0x%08x %d %d %p)\n", This, dwCreateFlags, dwAllowEncodingPropertyMask, (DWORD)dwReserved, ppIUri);
524 return E_NOTIMPL;
525 }
526
527 static HRESULT WINAPI UriBuilder_CreateUriWithFlags(IUriBuilder *iface,
528 DWORD dwCreateFlags,
529 DWORD dwUriBuilderFlags,
530 DWORD dwAllowEncodingPropertyMask,
531 DWORD_PTR dwReserved,
532 IUri **ppIUri)
533 {
534 UriBuilder *This = URIBUILDER_THIS(iface);
535 FIXME("(%p)->(0x%08x 0x%08x %d %d %p)\n", This, dwCreateFlags, dwUriBuilderFlags,
536 dwAllowEncodingPropertyMask, (DWORD)dwReserved, ppIUri);
537 return E_NOTIMPL;
538 }
539
540 static HRESULT WINAPI UriBuilder_GetIUri(IUriBuilder *iface, IUri **ppIUri)
541 {
542 UriBuilder *This = URIBUILDER_THIS(iface);
543 FIXME("(%p)->(%p)\n", This, ppIUri);
544 return E_NOTIMPL;
545 }
546
547 static HRESULT WINAPI UriBuilder_SetIUri(IUriBuilder *iface, IUri *pIUri)
548 {
549 UriBuilder *This = URIBUILDER_THIS(iface);
550 FIXME("(%p)->(%p)\n", This, pIUri);
551 return E_NOTIMPL;
552 }
553
554 static HRESULT WINAPI UriBuilder_GetFragment(IUriBuilder *iface, DWORD *pcchFragment, LPCWSTR *ppwzFragment)
555 {
556 UriBuilder *This = URIBUILDER_THIS(iface);
557 FIXME("(%p)->(%p %p)\n", This, pcchFragment, ppwzFragment);
558 return E_NOTIMPL;
559 }
560
561 static HRESULT WINAPI UriBuilder_GetHost(IUriBuilder *iface, DWORD *pcchHost, LPCWSTR *ppwzHost)
562 {
563 UriBuilder *This = URIBUILDER_THIS(iface);
564 FIXME("(%p)->(%p %p)\n", This, pcchHost, ppwzHost);
565 return E_NOTIMPL;
566 }
567
568 static HRESULT WINAPI UriBuilder_GetPassword(IUriBuilder *iface, DWORD *pcchPassword, LPCWSTR *ppwzPassword)
569 {
570 UriBuilder *This = URIBUILDER_THIS(iface);
571 FIXME("(%p)->(%p %p)\n", This, pcchPassword, ppwzPassword);
572 return E_NOTIMPL;
573 }
574
575 static HRESULT WINAPI UriBuilder_GetPath(IUriBuilder *iface, DWORD *pcchPath, LPCWSTR *ppwzPath)
576 {
577 UriBuilder *This = URIBUILDER_THIS(iface);
578 FIXME("(%p)->(%p %p)\n", This, pcchPath, ppwzPath);
579 return E_NOTIMPL;
580 }
581
582 static HRESULT WINAPI UriBuilder_GetPort(IUriBuilder *iface, BOOL *pfHasPort, DWORD *pdwPort)
583 {
584 UriBuilder *This = URIBUILDER_THIS(iface);
585 FIXME("(%p)->(%p %p)\n", This, pfHasPort, pdwPort);
586 return E_NOTIMPL;
587 }
588
589 static HRESULT WINAPI UriBuilder_GetQuery(IUriBuilder *iface, DWORD *pcchQuery, LPCWSTR *ppwzQuery)
590 {
591 UriBuilder *This = URIBUILDER_THIS(iface);
592 FIXME("(%p)->(%p %p)\n", This, pcchQuery, ppwzQuery);
593 return E_NOTIMPL;
594 }
595
596 static HRESULT WINAPI UriBuilder_GetSchemeName(IUriBuilder *iface, DWORD *pcchSchemeName, LPCWSTR *ppwzSchemeName)
597 {
598 UriBuilder *This = URIBUILDER_THIS(iface);
599 FIXME("(%p)->(%p %p)\n", This, pcchSchemeName, ppwzSchemeName);
600 return E_NOTIMPL;
601 }
602
603 static HRESULT WINAPI UriBuilder_GetUserName(IUriBuilder *iface, DWORD *pcchUserName, LPCWSTR *ppwzUserName)
604 {
605 UriBuilder *This = URIBUILDER_THIS(iface);
606 FIXME("(%p)->(%p %p)\n", This, pcchUserName, ppwzUserName);
607 return E_NOTIMPL;
608 }
609
610 static HRESULT WINAPI UriBuilder_SetFragment(IUriBuilder *iface, LPCWSTR pwzNewValue)
611 {
612 UriBuilder *This = URIBUILDER_THIS(iface);
613 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
614 return E_NOTIMPL;
615 }
616
617 static HRESULT WINAPI UriBuilder_SetHost(IUriBuilder *iface, LPCWSTR pwzNewValue)
618 {
619 UriBuilder *This = URIBUILDER_THIS(iface);
620 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
621 return E_NOTIMPL;
622 }
623
624 static HRESULT WINAPI UriBuilder_SetPassword(IUriBuilder *iface, LPCWSTR pwzNewValue)
625 {
626 UriBuilder *This = URIBUILDER_THIS(iface);
627 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
628 return E_NOTIMPL;
629 }
630
631 static HRESULT WINAPI UriBuilder_SetPath(IUriBuilder *iface, LPCWSTR pwzNewValue)
632 {
633 UriBuilder *This = URIBUILDER_THIS(iface);
634 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
635 return E_NOTIMPL;
636 }
637
638 static HRESULT WINAPI UriBuilder_SetPort(IUriBuilder *iface, BOOL fHasPort, DWORD dwNewValue)
639 {
640 UriBuilder *This = URIBUILDER_THIS(iface);
641 FIXME("(%p)->(%d %d)\n", This, fHasPort, dwNewValue);
642 return E_NOTIMPL;
643 }
644
645 static HRESULT WINAPI UriBuilder_SetQuery(IUriBuilder *iface, LPCWSTR pwzNewValue)
646 {
647 UriBuilder *This = URIBUILDER_THIS(iface);
648 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
649 return E_NOTIMPL;
650 }
651
652 static HRESULT WINAPI UriBuilder_SetSchemeName(IUriBuilder *iface, LPCWSTR pwzNewValue)
653 {
654 UriBuilder *This = URIBUILDER_THIS(iface);
655 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
656 return E_NOTIMPL;
657 }
658
659 static HRESULT WINAPI UriBuilder_SetUserName(IUriBuilder *iface, LPCWSTR pwzNewValue)
660 {
661 UriBuilder *This = URIBUILDER_THIS(iface);
662 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
663 return E_NOTIMPL;
664 }
665
666 static HRESULT WINAPI UriBuilder_RemoveProperties(IUriBuilder *iface, DWORD dwPropertyMask)
667 {
668 UriBuilder *This = URIBUILDER_THIS(iface);
669 FIXME("(%p)->(0x%08x)\n", This, dwPropertyMask);
670 return E_NOTIMPL;
671 }
672
673 static HRESULT WINAPI UriBuilder_HasBeenModified(IUriBuilder *iface, BOOL *pfModified)
674 {
675 UriBuilder *This = URIBUILDER_THIS(iface);
676 FIXME("(%p)->(%p)\n", This, pfModified);
677 return E_NOTIMPL;
678 }
679
680 #undef URIBUILDER_THIS
681
682 static const IUriBuilderVtbl UriBuilderVtbl = {
683 UriBuilder_QueryInterface,
684 UriBuilder_AddRef,
685 UriBuilder_Release,
686 UriBuilder_CreateUriSimple,
687 UriBuilder_CreateUri,
688 UriBuilder_CreateUriWithFlags,
689 UriBuilder_GetIUri,
690 UriBuilder_SetIUri,
691 UriBuilder_GetFragment,
692 UriBuilder_GetHost,
693 UriBuilder_GetPassword,
694 UriBuilder_GetPath,
695 UriBuilder_GetPort,
696 UriBuilder_GetQuery,
697 UriBuilder_GetSchemeName,
698 UriBuilder_GetUserName,
699 UriBuilder_SetFragment,
700 UriBuilder_SetHost,
701 UriBuilder_SetPassword,
702 UriBuilder_SetPath,
703 UriBuilder_SetPort,
704 UriBuilder_SetQuery,
705 UriBuilder_SetSchemeName,
706 UriBuilder_SetUserName,
707 UriBuilder_RemoveProperties,
708 UriBuilder_HasBeenModified,
709 };
710
711 /***********************************************************************
712 * CreateIUriBuilder (urlmon.@)
713 */
714 HRESULT WINAPI CreateIUriBuilder(IUri *pIUri, DWORD dwFlags, DWORD_PTR dwReserved, IUriBuilder **ppIUriBuilder)
715 {
716 UriBuilder *ret;
717
718 TRACE("(%p %x %x %p)\n", pIUri, dwFlags, (DWORD)dwReserved, ppIUriBuilder);
719
720 ret = heap_alloc(sizeof(UriBuilder));
721 if(!ret)
722 return E_OUTOFMEMORY;
723
724 ret->lpIUriBuilderVtbl = &UriBuilderVtbl;
725 ret->ref = 1;
726
727 *ppIUriBuilder = URIBUILDER(ret);
728 return S_OK;
729 }