43 *
ppv = &
This->IInternetProtocol_iface;
45 TRACE(
"(%p)->(IID_IInternetProtocolRoot %p)\n",
This,
ppv);
46 *
ppv = &
This->IInternetProtocol_iface;
49 *
ppv = &
This->IInternetProtocol_iface;
51 TRACE(
"(%p)->(IID_IInternetProtocolSink %p)\n",
This,
ppv);
52 *
ppv = &
This->IInternetProtocolSink_iface;
56 IInternetProtocol_AddRef(iface);
101 FIXME(
"(%p)->(%p)\n",
This, pProtocolData);
138 FIXME(
"(%p)->(%p %u %p)\n",
This, pv,
cb, pcbRead);
146 FIXME(
"(%p)->(%d %d %p)\n",
This, dlibMove.
u.LowPart, dwOrigin, plibNewPosition);
189 return IInternetProtocol_QueryInterface(&
This->IInternetProtocol_iface,
riid,
ppv);
195 return IInternetProtocol_AddRef(&
This->IInternetProtocol_iface);
201 return IInternetProtocol_Release(&
This->IInternetProtocol_iface);
205 PROTOCOLDATA *pProtocolData)
208 FIXME(
"(%p)->(%p)\n",
This, pProtocolData);
224 FIXME(
"(%p)->(%d %u %u)\n",
This, grfBSCF, ulProgress, ulProgressMax);
250 TRACE(
"(%p %p)\n", pUnkOuter, ppobj);
260 *ppobj = &
ret->IInternetProtocol_iface;
275 && (
b[1] ==
'h' ||
b[1] ==
'H')
276 && (
b[2] ==
't' ||
b[2] ==
'T')
277 && (
b[3] ==
'm' ||
b[3] ==
'M')
278 && (
b[4] ==
'l' ||
b[4] ==
'L'))
280 && (
b[1] ==
'h' ||
b[1] ==
'H')
281 && (
b[2] ==
'e' ||
b[2] ==
'E')
282 && (
b[3] ==
'a' ||
b[3] ==
'A')
283 && (
b[4] ==
'd' ||
b[4] ==
'D'))
285 && (
b[1] ==
'b' ||
b[1] ==
'B')
286 && (
b[2] ==
'o' ||
b[2] ==
'O')
287 && (
b[3] ==
'd' ||
b[3] ==
'D')
288 && (
b[4] ==
'y' ||
b[4] ==
'Y')))
return TRUE;
298 if(
b[0] ==
'<' &&
b[1] ==
'?'
299 && (
b[2] ==
'x' ||
b[2] ==
'X')
300 && (
b[3] ==
'm' ||
b[3] ==
'M')
301 && (
b[4] ==
'l' ||
b[4] ==
'L')
302 &&
b[5] ==
' ')
return TRUE;
310 &&
b[0] ==
'.' &&
b[1] ==
's' &&
b[2] ==
'n' &&
b[3] ==
'd';
316 &&
b[0] ==
'R' &&
b[1] ==
'I' &&
b[2] ==
'F' &&
b[3] ==
'F'
317 &&
b[8] ==
'W' &&
b[9] ==
'A' &&
b[10] ==
'V' &&
b[11] ==
'E';
323 && (
b[0] ==
'G' ||
b[0] ==
'g')
324 && (
b[1] ==
'I' ||
b[1] ==
'i')
325 && (
b[2] ==
'F' ||
b[2] ==
'f')
327 && (
b[4] ==
'7' ||
b[4] ==
'9')
328 && (
b[5] ==
'A' ||
b[5] ==
'a');
333 return size > 2 &&
b[0] == 0xff &&
b[1] == 0xd8;
338 static const BYTE magic1[] = {0x4d,0x4d,0x00,0x2a};
339 static const BYTE magic2[] = {0x49,0x49,0x2a,0xff};
346 static const BYTE xpng_header[] = {0x89,
'P',
'N',
'G',0x0d,0x0a,0x1a,0x0a};
347 return size >
sizeof(xpng_header) && !
memcmp(
b, xpng_header,
sizeof(xpng_header));
353 &&
b[0] == 0x42 &&
b[1] == 0x4d
354 && *(
const DWORD *)(
b+6) == 0;
360 &&
b[0] ==
'R' &&
b[1] ==
'I' &&
b[2] ==
'F' &&
b[3] ==
'F'
361 &&
b[8] ==
'A' &&
b[9] ==
'V' &&
b[10] ==
'I' &&
b[11] == 0x20;
367 && !
b[0] && !
b[1] &&
b[2] == 0x01
368 && (
b[3] == 0xb3 ||
b[3] == 0xba);
373 return size > 2 &&
b[0] ==
'%' &&
b[1] ==
'!';
378 return size > 4 &&
b[0] == 0x25 &&
b[1] == 0x50 &&
b[2] == 0x44 &&
b[3] == 0x46;
383 return size > 2 &&
b[0] == 0x50 &&
b[1] == 0x4b;
388 return size > 2 &&
b[0] == 0x1f &&
b[1] == 0x8b;
393 return size > 4 &&
b[0] == 0xca &&
b[1] == 0xfe &&
b[2] == 0xba &&
b[3] == 0xbe;
398 return size > 2 &&
b[0] ==
'M' &&
b[1] ==
'Z';
403 if(
b < 0x20 &&
b !=
'\n' &&
b !=
'\r' &&
b !=
'\t')
431 static const WCHAR content_typeW[] = {
'C',
'o',
'n',
't',
'e',
'n',
't',
' ',
'T',
'y',
'p',
'e',
'\0'};
456 for(end_ptr =
url; *end_ptr; end_ptr++) {
457 if(*end_ptr ==
'?' || *end_ptr ==
'#')
470 unsigned len = end_ptr-
ptr;
486static const WCHAR text_richtextW[] = {
't',
'e',
'x',
't',
'/',
'r',
'i',
'c',
'h',
't',
'e',
'x',
't',0};
488static const WCHAR audio_basicW[] = {
'a',
'u',
'd',
'i',
'o',
'/',
'b',
'a',
's',
'i',
'c',0};
491static const WCHAR image_pjpegW[] = {
'i',
'm',
'a',
'g',
'e',
'/',
'p',
'j',
'p',
'e',
'g',0};
492static const WCHAR image_tiffW[] = {
'i',
'm',
'a',
'g',
'e',
'/',
't',
'i',
'f',
'f',0};
493static const WCHAR image_xpngW[] = {
'i',
'm',
'a',
'g',
'e',
'/',
'x',
'-',
'p',
'n',
'g',0};
496static const WCHAR video_mpegW[] = {
'v',
'i',
'd',
'e',
'o',
'/',
'm',
'p',
'e',
'g',0};
498 {
'a',
'p',
'p',
'l',
'i',
'c',
'a',
't',
'i',
'o',
'n',
'/',
'p',
'o',
's',
't',
's',
'c',
'r',
'i',
'p',
't',0};
499static const WCHAR app_pdfW[] = {
'a',
'p',
'p',
'l',
'i',
'c',
'a',
't',
'i',
'o',
'n',
'/',
'p',
'd',
'f',0};
500static const WCHAR app_xzipW[] = {
'a',
'p',
'p',
'l',
'i',
'c',
'a',
't',
'i',
'o',
'n',
'/',
501 'x',
'-',
'z',
'i',
'p',
'-',
'c',
'o',
'm',
'p',
'r',
'e',
's',
's',
'e',
'd',0};
502static const WCHAR app_xgzipW[] = {
'a',
'p',
'p',
'l',
'i',
'c',
'a',
't',
'i',
'o',
'n',
'/',
503 'x',
'-',
'g',
'z',
'i',
'p',
'-',
'c',
'o',
'm',
'p',
'r',
'e',
's',
's',
'e',
'd',0};
504static const WCHAR app_javaW[] = {
'a',
'p',
'p',
'l',
'i',
'c',
'a',
't',
'i',
'o',
'n',
'/',
'j',
'a',
'v',
'a',0};
505static const WCHAR app_xmsdownloadW[] = {
'a',
'p',
'p',
'l',
'i',
'c',
'a',
't',
'i',
'o',
'n',
'/',
506 'x',
'-',
'm',
's',
'd',
'o',
'w',
'n',
'l',
'o',
'a',
'd',0};
507static const WCHAR text_plainW[] = {
't',
'e',
'x',
't',
'/',
'p',
'l',
'a',
'i',
'n',
'\0'};
508static const WCHAR app_octetstreamW[] = {
'a',
'p',
'p',
'l',
'i',
'c',
'a',
't',
'i',
'o',
'n',
'/',
509 'o',
'c',
't',
'e',
't',
'-',
's',
't',
'r',
'e',
'a',
'm',
'\0'};
565 int len,
i, any_pos_mime = -1;
657 *ret_mime = url_mime;
684 TRACE(
"(%p,%s,%p,%d,%s,0x%x,%p,0x%x)\n", pBC,
debugstr_w(pwzUrl),
pBuffer, cbSize,
688 WARN(
"dwMimeFlags=%08x\n", dwMimeFlags);
694 if(!ppwzMimeOut || (!pwzUrl && !
pBuffer))
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define RegCloseKey(hKey)
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
static __inline const char * debugstr_an(const char *s, int n)
static const WCHAR *const ext[]
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
static HRESULT WINAPI MimeFilterProtocol_Read(IInternetProtocol *iface, void *pv, ULONG cb, ULONG *pcbRead)
static BOOL video_mpeg_filter(const BYTE *b, DWORD size)
static BOOL audio_basic_filter(const BYTE *b, DWORD size)
static HRESULT WINAPI MimeFilterProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv)
static MimeFilter * impl_from_IInternetProtocolSink(IInternetProtocolSink *iface)
HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer, DWORD cbSize, LPCWSTR pwzMimeProposed, DWORD dwMimeFlags, LPWSTR *ppwzMimeOut, DWORD dwReserved)
static HRESULT WINAPI MimeFilterProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved)
static const WCHAR image_bmpW[]
static const struct @565 mime_filters_any_pos[]
static HRESULT WINAPI MimeFilterProtocol_Abort(IInternetProtocol *iface, HRESULT hrReason, DWORD dwOptions)
static BOOL is_known_mime_type(const WCHAR *mime)
static BOOL video_avi_filter(const BYTE *b, DWORD size)
static BOOL image_pjpeg_filter(const BYTE *b, DWORD size)
static HRESULT WINAPI MimeFilterSink_ReportData(IInternetProtocolSink *iface, DWORD grfBSCF, ULONG ulProgress, ULONG ulProgressMax)
static const WCHAR app_xgzipW[]
static HRESULT WINAPI MimeFilterSink_QueryInterface(IInternetProtocolSink *iface, REFIID riid, void **ppv)
static HRESULT find_mime_from_buffer(const BYTE *buf, DWORD size, const WCHAR *proposed_mime, const WCHAR *url, WCHAR **ret_mime)
static BOOL application_pdf_filter(const BYTE *b, DWORD size)
static BOOL text_html_filter(const BYTE *b, DWORD size)
static HRESULT WINAPI MimeFilterProtocol_UnlockRequest(IInternetProtocol *iface)
static BOOL image_tiff_filter(const BYTE *b, DWORD size)
static BOOL text_richtext_filter(const BYTE *b, DWORD size)
static HRESULT find_mime_from_url(const WCHAR *url, WCHAR **ret)
static HRESULT WINAPI MimeFilterProtocol_LockRequest(IInternetProtocol *iface, DWORD dwOptions)
static const WCHAR text_htmlW[]
static BOOL is_text_plain_char(BYTE b)
static BOOL application_xgzip_filter(const BYTE *b, DWORD size)
BOOL(* filter)(const BYTE *, DWORD)
static const IInternetProtocolVtbl MimeFilterProtocolVtbl
static const WCHAR text_xmlW[]
HRESULT find_mime_from_ext(const WCHAR *ext, WCHAR **ret)
static BOOL application_octet_stream_filter(const BYTE *b, DWORD size)
static HRESULT WINAPI MimeFilterProtocol_Suspend(IInternetProtocol *iface)
static BOOL application_xmsdownload(const BYTE *b, DWORD size)
static const WCHAR text_plainW[]
static const WCHAR image_xpngW[]
static const struct @565 mime_filters[]
static HRESULT WINAPI MimeFilterProtocol_Continue(IInternetProtocol *iface, PROTOCOLDATA *pProtocolData)
static BOOL text_plain_filter(const BYTE *b, DWORD size)
static const WCHAR app_pdfW[]
static BOOL application_xzip_filter(const BYTE *b, DWORD size)
static HRESULT WINAPI MimeFilterProtocol_Seek(IInternetProtocol *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
static HRESULT WINAPI MimeFilterSink_Switch(IInternetProtocolSink *iface, PROTOCOLDATA *pProtocolData)
static HRESULT WINAPI MimeFilterProtocol_Terminate(IInternetProtocol *iface, DWORD dwOptions)
static const IInternetProtocolSinkVtbl InternetProtocolSinkVtbl
static MimeFilter * impl_from_IInternetProtocol(IInternetProtocol *iface)
static const WCHAR audio_wavW[]
static const WCHAR app_postscriptW[]
static const WCHAR app_xzipW[]
static BOOL text_xml_filter(const BYTE *b, DWORD size)
static BOOL application_java_filter(const BYTE *b, DWORD size)
static BOOL image_bmp_filter(const BYTE *b, DWORD size)
static const WCHAR text_richtextW[]
static const WCHAR image_pjpegW[]
static HRESULT WINAPI MimeFilterProtocol_Resume(IInternetProtocol *iface)
static const WCHAR image_tiffW[]
static BOOL audio_wav_filter(const BYTE *b, DWORD size)
static const WCHAR audio_basicW[]
static BOOL image_gif_filter(const BYTE *b, DWORD size)
static ULONG WINAPI MimeFilterSink_Release(IInternetProtocolSink *iface)
static const WCHAR video_mpegW[]
static BOOL image_xpng_filter(const BYTE *b, DWORD size)
static const WCHAR app_octetstreamW[]
static HRESULT WINAPI MimeFilterSink_ReportResult(IInternetProtocolSink *iface, HRESULT hrResult, DWORD dwError, LPCWSTR szResult)
static ULONG WINAPI MimeFilterSink_AddRef(IInternetProtocolSink *iface)
static HRESULT WINAPI MimeFilterSink_ReportProgress(IInternetProtocolSink *iface, ULONG ulStatusCode, LPCWSTR szStatusText)
static const WCHAR image_gifW[]
HRESULT MimeFilter_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
static BOOL application_postscript_filter(const BYTE *b, DWORD size)
static const WCHAR app_javaW[]
static ULONG WINAPI MimeFilterProtocol_AddRef(IInternetProtocol *iface)
static ULONG WINAPI MimeFilterProtocol_Release(IInternetProtocol *iface)
static const WCHAR video_aviW[]
static const WCHAR app_xmsdownloadW[]
#define memcpy(s1, s2, n)
static HMODULE MODULEINFO DWORD cb
const char * proposed_mime
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
interface IBindCtx * LPBC
#define IsEqualGUID(rguid1, rguid2)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
IInternetProtocol IInternetProtocol_iface
IInternetProtocolSink IInternetProtocolSink_iface
#define CONTAINING_RECORD(address, type, field)
struct _LARGE_INTEGER::@2304 u
static void URLMON_LockModule(void)
static void URLMON_UnlockModule(void)
#define HRESULT_FROM_WIN32(x)
#define HKEY_CLASSES_ROOT