| 1 | #pragma once |
| 2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
| 3 | |
| 4 | |
| 5 | #include "wininet.h" |
| 6 | |
| 7 | |
| 8 | #ifdef __cplusplus |
| 9 | extern "C" { |
| 10 | #endif |
| 11 | |
| 12 | typedef enum URI_PROTOCOL |
| 13 | { |
| 14 | URI_PROTOCOL_UNKNOWN, |
| 15 | URI_PROTOCOL_FILE, |
| 16 | URI_PROTOCOL_FTP, |
| 17 | URI_PROTOCOL_HTTP, |
| 18 | URI_PROTOCOL_HTTPS, |
| 19 | URI_PROTOCOL_LOCAL, |
| 20 | URI_PROTOCOL_UNC |
| 21 | } URI_PROTOCOL; |
| 22 | |
| 23 | typedef struct _URI_INFO |
| 24 | { |
| 25 | INTERNET_SCHEME scheme; |
| 26 | LPWSTR sczHostName; |
| 27 | INTERNET_PORT port; |
| 28 | LPWSTR sczUser; |
| 29 | LPWSTR sczPassword; |
| 30 | LPWSTR sczPath; |
| 31 | LPWSTR sczQueryString; |
| 32 | } URI_INFO; |
| 33 | |
| 34 | |
| 35 | HRESULT DAPI UriCanonicalize( |
| 36 | __inout_z LPWSTR* psczUri |
| 37 | ); |
| 38 | |
| 39 | HRESULT DAPI UriCrack( |
| 40 | __in_z LPCWSTR wzUri, |
| 41 | __out_opt INTERNET_SCHEME* pScheme, |
| 42 | __deref_opt_out_z LPWSTR* psczHostName, |
| 43 | __out_opt INTERNET_PORT* pPort, |
| 44 | __deref_opt_out_z LPWSTR* psczUser, |
| 45 | __deref_opt_out_z LPWSTR* psczPassword, |
| 46 | __deref_opt_out_z LPWSTR* psczPath, |
| 47 | __deref_opt_out_z LPWSTR* psczQueryString |
| 48 | ); |
| 49 | |
| 50 | HRESULT DAPI UriCrackEx( |
| 51 | __in_z LPCWSTR wzUri, |
| 52 | __in URI_INFO* pUriInfo |
| 53 | ); |
| 54 | |
| 55 | void DAPI UriInfoUninitialize( |
| 56 | __in URI_INFO* pUriInfo |
| 57 | ); |
| 58 | |
| 59 | HRESULT DAPI UriCreate( |
| 60 | __inout_z LPWSTR* psczUri, |
| 61 | __in INTERNET_SCHEME scheme, |
| 62 | __in_z_opt LPWSTR wzHostName, |
| 63 | __in INTERNET_PORT port, |
| 64 | __in_z_opt LPWSTR wzUser, |
| 65 | __in_z_opt LPWSTR wzPassword, |
| 66 | __in_z_opt LPWSTR wzPath, |
| 67 | __in_z_opt LPWSTR wzQueryString |
| 68 | ); |
| 69 | |
| 70 | HRESULT DAPI UriCanonicalize( |
| 71 | __inout_z LPWSTR* psczUri |
| 72 | ); |
| 73 | |
| 74 | HRESULT DAPI UriFile( |
| 75 | __deref_out_z LPWSTR* psczFile, |
| 76 | __in_z LPCWSTR wzUri |
| 77 | ); |
| 78 | |
| 79 | HRESULT DAPI UriProtocol( |
| 80 | __in_z LPCWSTR wzUri, |
| 81 | __out URI_PROTOCOL* pProtocol |
| 82 | ); |
| 83 | |
| 84 | HRESULT DAPI UriRoot( |
| 85 | __in_z LPCWSTR wzUri, |
| 86 | __out LPWSTR* ppwzRoot, |
| 87 | __out_opt URI_PROTOCOL* pProtocol |
| 88 | ); |
| 89 | |
| 90 | HRESULT DAPI UriResolve( |
| 91 | __in_z LPCWSTR wzUri, |
| 92 | __in_opt LPCWSTR wzBaseUri, |
| 93 | __out LPWSTR* ppwzResolvedUri, |
| 94 | __out_opt URI_PROTOCOL* pResolvedProtocol |
| 95 | ); |
| 96 | |
| 97 | #ifdef __cplusplus |
| 98 | } |
| 99 | #endif |
| 100 |