Sync to Wine-20050930:
Stefan Leichter <Stefan.Leichter(a)camLine.com>
- Added version resource to urlmon.dll.
Alexandre Julliard <julliard(a)winehq.org>
- Fixed a compiler warning.
- We are no longer generating .dbg.c files.
Jacek Caban <jack(a)itma.pwr.wroc.pl>
- Added IHttpNegotiate2 interface.
- Update BINDSTRING and IInternetSession.
- Added MIME type checking to FileProtocol::Start.
- Rewrote FindMimeFromData to pass tests.
- Encode URL in file protocol.
- Added ReleaseBindInfo implementation.
- Added RegisterFormatEnumerator and RevokeFormatEnumerator
implementation.
- Added PARSE_SECURITY_DOMAIN action implementation.
- Added CreateAsyncBindCtxEx implementation.
- Added PARSE_SECURITY_URL action implementation.
- Added CoInternetGetSession implementation.
- Register zones.
- Added PARSE_PATH_FROM_URL action implementation.
- Added http and ftp protocol stub implementation.
- Register ZoneMap.
- Move protocol's CLSIDs to urlmon.idl.
- Added urlmon.inf as dependency of rsrc.res.
- Added GetZoneActionPolicy implementation.
- Added CoInternetParseUrl implementation.
- Added MapUrlToZone implementation.
- Added file protocol implementation.
- Added IInternetSecurityManager::[SG]etSecuritySite implementation.
- Forward IInternetSecurityManager calls to custom manager.
- Added CreateFormatEnumerator implementation.
Added: trunk/reactos/lib/urlmon/file.c
Added: trunk/reactos/lib/urlmon/format.c
Added: trunk/reactos/lib/urlmon/ftp.c
Added: trunk/reactos/lib/urlmon/http.c
Added: trunk/reactos/lib/urlmon/internet.c
Modified: trunk/reactos/lib/urlmon/regsvr.c
Modified: trunk/reactos/lib/urlmon/rsrc.rc
Modified: trunk/reactos/lib/urlmon/sec_mgr.c
Added: trunk/reactos/lib/urlmon/session.c
Modified: trunk/reactos/lib/urlmon/umon.c
Modified: trunk/reactos/lib/urlmon/urlmon.inf
Modified: trunk/reactos/lib/urlmon/urlmon.spec
Modified: trunk/reactos/lib/urlmon/urlmon.xml
Modified: trunk/reactos/lib/urlmon/urlmon_main.c
Modified: trunk/reactos/lib/urlmon/urlmon_main.h
Added: trunk/reactos/lib/urlmon/version.rc
Modified: trunk/reactos/w32api/include/urlmon.h
_____
Copied: trunk/reactos/lib/urlmon/file.c (from rev 18356,
vendor/wine/dlls/urlmon/current/file.c)
Property changes on: trunk/reactos/lib/urlmon/file.c
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
_____
Copied: trunk/reactos/lib/urlmon/format.c (from rev 18356,
vendor/wine/dlls/urlmon/current/format.c)
Property changes on: trunk/reactos/lib/urlmon/format.c
___________________________________________________________________
Name: svn:keywords + Author Date Id Revision Name: svn:eol-style +
native
_____
Copied: trunk/reactos/lib/urlmon/ftp.c (from rev 18356,
vendor/wine/dlls/urlmon/current/ftp.c)
Property changes on: trunk/reactos/lib/urlmon/ftp.c
___________________________________________________________________
Name: svn:keywords + Author Date Id Revision Name: svn:eol-style +
native
_____
Copied: trunk/reactos/lib/urlmon/http.c (from rev 18356,
vendor/wine/dlls/urlmon/current/http.c)
Property changes on: trunk/reactos/lib/urlmon/http.c
___________________________________________________________________
Name: svn:keywords + Author Date Id Revision Name: svn:eol-style +
native
_____
Copied: trunk/reactos/lib/urlmon/internet.c (from rev 18356,
vendor/wine/dlls/urlmon/current/internet.c)
Property changes on: trunk/reactos/lib/urlmon/internet.c
___________________________________________________________________
Name: svn:keywords + Author Date Id Revision Name: svn:eol-style +
native
_____
Modified: trunk/reactos/lib/urlmon/regsvr.c
--- trunk/reactos/lib/urlmon/regsvr.c 2005-10-08 19:30:16 UTC (rev
18356)
+++ trunk/reactos/lib/urlmon/regsvr.c 2005-10-08 19:43:11 UTC (rev
18357)
@@ -37,7 +37,6 @@
#include "wine/debug.h"
-#include "initguid.h"
#include "urlmon_main.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
@@ -546,7 +545,7 @@
"urlmon.dll",
"Apartment"
},
- { &CLSID_HttpsProtocol,
+ { &CLSID_HttpSProtocol,
"https: Asynchronous Pluggable Protocol Handler",
NULL,
"urlmon.dll",
@@ -594,7 +593,7 @@
INF_SET_CLSID(FtpProtocol);
INF_SET_CLSID(GopherProtocol);
INF_SET_CLSID(HttpProtocol);
- INF_SET_CLSID(HttpsProtocol);
+ INF_SET_CLSID(HttpSProtocol);
INF_SET_CLSID(MkProtocol);
for(i = 0; i < sizeof(pse)/sizeof(pse[0]); i++) {
_____
Modified: trunk/reactos/lib/urlmon/rsrc.rc
--- trunk/reactos/lib/urlmon/rsrc.rc 2005-10-08 19:30:16 UTC (rev
18356)
+++ trunk/reactos/lib/urlmon/rsrc.rc 2005-10-08 19:43:11 UTC (rev
18357)
@@ -17,3 +17,5 @@
*/
REGINST REGINST urlmon.inf
+
+#include "version.rc"
_____
Modified: trunk/reactos/lib/urlmon/sec_mgr.c
--- trunk/reactos/lib/urlmon/sec_mgr.c 2005-10-08 19:30:16 UTC (rev
18356)
+++ trunk/reactos/lib/urlmon/sec_mgr.c 2005-10-08 19:43:11 UTC (rev
18357)
@@ -27,6 +27,7 @@
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
+#include "winreg.h"
#include "wine/debug.h"
#include "ole2.h"
#include "wine/unicode.h"
@@ -39,17 +40,84 @@
* InternetSecurityManager implementation
*
*/
-typedef struct SecManagerImpl{
+typedef struct {
+ const IInternetSecurityManagerVtbl* lpInternetSecurityManagerVtbl;
- const IInternetSecurityManagerVtbl* lpvtbl1; /* VTable relative to
the IInternetSecurityManager interface.*/
+ LONG ref;
- LONG ref; /* reference counter for this object */
-
+ IInternetSecurityMgrSite *mgrsite;
+ IInternetSecurityManager *custom_manager;
} SecManagerImpl;
+#define SECMGR_THIS(iface) DEFINE_THIS(SecManagerImpl,
InternetSecurityManager, iface)
+
+static HRESULT map_url_to_zone(LPCWSTR url, DWORD *zone)
+{
+ WCHAR schema[64];
+ DWORD res, size=0;
+ HKEY hkey;
+ HRESULT hres;
+
+ static const WCHAR wszZoneMapProtocolKey[] =
+
{'S','o','f','t','w','a','r','e','\\',
+
'M','i','c','r','o','s','o','f','t','\\',
+
'W','i','n','d','o','w','s','\\',
+
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
+
'I','n','t','e','r','n','e','t','
','S','e','t','t','i','n','g','s','\\',
+
'Z','o','n','e','M','a','p','\\',
+
'P','r','o','t','o','c','o','l','D','e','f','a','u','l','t','s',0};
+ static const WCHAR wszFile[] = {'f','i','l','e',0};
+
+ hres = CoInternetParseUrl(url, PARSE_SCHEMA, 0, schema,
sizeof(schema)/sizeof(WCHAR), &size, 0);
+ if(FAILED(hres))
+ return hres;
+ if(!*schema)
+ return 0x80041001;
+
+ /* file protocol is a special case */
+ if(!strcmpW(schema, wszFile)) {
+ WCHAR path[MAX_PATH];
+
+ hres = CoInternetParseUrl(url, PARSE_PATH_FROM_URL, 0, path,
+ sizeof(path)/sizeof(WCHAR), &size, 0);
+
+ if(SUCCEEDED(hres) && strchrW(path, '\\')) {
+ *zone = 0;
+ return S_OK;
+ }
+ }
+
+ WARN("domains are not yet implemented\n");
+
+ res = RegOpenKeyW(HKEY_CURRENT_USER, wszZoneMapProtocolKey, &hkey);
+ if(res != ERROR_SUCCESS) {
+ ERR("Could not open key %s\n",
debugstr_w(wszZoneMapProtocolKey));
+ return E_UNEXPECTED;
+ }
+
+ size = sizeof(DWORD);
+ res = RegQueryValueExW(hkey, schema, NULL, NULL, (PBYTE)zone,
&size);
+ if(res == ERROR_SUCCESS)
+ return S_OK;
+
+ res = RegOpenKeyW(HKEY_LOCAL_MACHINE, wszZoneMapProtocolKey,
&hkey);
+ if(res != ERROR_SUCCESS) {
+ ERR("Could not open key %s\n",
debugstr_w(wszZoneMapProtocolKey));
+ return E_UNEXPECTED;
+ }
+
+ size = sizeof(DWORD);
+ res = RegQueryValueExW(hkey, schema, NULL, NULL, (PBYTE)zone,
&size);
+ if(res == ERROR_SUCCESS)
+ return S_OK;
+
+ *zone = 3;
+ return S_OK;
+}
+
static HRESULT WINAPI
SecManagerImpl_QueryInterface(IInternetSecurityManager* iface,REFIID
riid,void** ppvObject)
{
- SecManagerImpl *This = (SecManagerImpl *)iface;
+ SecManagerImpl *This = SECMGR_THIS(iface);
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppvObject);
@@ -66,8 +134,10 @@
*ppvObject = iface;
/* Check that we obtained an interface.*/
- if ((*ppvObject)==0)
+ if (!*ppvObject) {
+ WARN("not supported interface %s\n", debugstr_guid(riid));
return E_NOINTERFACE;
+ }
/* Query Interface always increases the reference count by one when
it is successful */
IInternetSecurityManager_AddRef(iface);
@@ -77,24 +147,30 @@
static ULONG WINAPI SecManagerImpl_AddRef(IInternetSecurityManager*
iface)
{
- SecManagerImpl *This = (SecManagerImpl *)iface;
+ SecManagerImpl *This = SECMGR_THIS(iface);
ULONG refCount = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(ref before=%lu)\n",This, refCount - 1);
+ TRACE("(%p) ref=%lu\n", This, refCount);
return refCount;
}
static ULONG WINAPI SecManagerImpl_Release(IInternetSecurityManager*
iface)
{
- SecManagerImpl *This = (SecManagerImpl *)iface;
+ SecManagerImpl *This = SECMGR_THIS(iface);
ULONG refCount = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(ref before=%lu)\n",This, refCount + 1);
+ TRACE("(%p) ref=%lu\n", This, refCount);
/* destroy the object if there's no more reference on it */
if (!refCount){
+ if(This->mgrsite)
+ IInternetSecurityMgrSite_Release(This->mgrsite);
+ if(This->custom_manager)
+ IInternetSecurityManager_Release(This->custom_manager);
+
HeapFree(GetProcessHeap(),0,This);
+
URLMON_UnlockModule();
}
@@ -104,32 +180,112 @@
static HRESULT WINAPI
SecManagerImpl_SetSecuritySite(IInternetSecurityManager *iface,
IInternetSecurityMgrSite *pSite)
{
- FIXME("(%p)->(%p)\n", iface, pSite);
- return E_NOTIMPL;
+ SecManagerImpl *This = SECMGR_THIS(iface);
+
+ TRACE("(%p)->(%p)\n", This, pSite);
+
+ if(This->mgrsite)
+ IInternetSecurityMgrSite_Release(This->mgrsite);
+
+ if(This->custom_manager) {
+ IInternetSecurityManager_Release(This->custom_manager);
+ This->custom_manager = NULL;
+ }
+
+ This->mgrsite = pSite;
+
+ if(pSite) {
+ IServiceProvider *servprov;
+ HRESULT hres;
+
+ IInternetSecurityMgrSite_AddRef(pSite);
+
+ hres = IInternetSecurityMgrSite_QueryInterface(pSite,
&IID_IServiceProvider,
+ (void**)&servprov);
+ if(SUCCEEDED(hres)) {
+ IServiceProvider_QueryService(servprov,
&SID_SInternetSecurityManager,
+ &IID_IInternetSecurityManager,
(void**)&This->custom_manager);
+ IServiceProvider_Release(servprov);
+ }
+ }
+
+ return S_OK;
}
static HRESULT WINAPI
SecManagerImpl_GetSecuritySite(IInternetSecurityManager *iface,
IInternetSecurityMgrSite **ppSite)
{
- FIXME("(%p)->( %p)\n", iface, ppSite);
- return E_NOTIMPL;
+ SecManagerImpl *This = SECMGR_THIS(iface);
+
+ TRACE("(%p)->(%p)\n", This, ppSite);
+
+ if(!ppSite)
+ return E_INVALIDARG;
+
+ if(This->mgrsite)
+ IInternetSecurityMgrSite_AddRef(This->mgrsite);
+
+ *ppSite = This->mgrsite;
+ return S_OK;
}
static HRESULT WINAPI
SecManagerImpl_MapUrlToZone(IInternetSecurityManager *iface,
LPCWSTR pwszUrl,
DWORD *pdwZone,
DWORD dwFlags)
{
- FIXME("(%p)->(%s %p %08lx)\n", iface, debugstr_w(pwszUrl), pdwZone,
dwFlags);
- return E_NOTIMPL;
+ SecManagerImpl *This = SECMGR_THIS(iface);
+ LPWSTR url;
+ DWORD size;
+ HRESULT hres;
+
+ TRACE("(%p)->(%s %p %08lx)\n", iface, debugstr_w(pwszUrl), pdwZone,
dwFlags);
+
+ if(This->custom_manager) {
+ hres =
IInternetSecurityManager_MapUrlToZone(This->custom_manager,
+ pwszUrl, pdwZone, dwFlags);
+ if(hres != INET_E_DEFAULT_ACTION)
+ return hres;
+ }
+
+ if(!pwszUrl)
+ return E_INVALIDARG;
+
+ if(dwFlags)
+ FIXME("not supported flags: %08lx\n", dwFlags);
+
+ size = (strlenW(pwszUrl)+16) * sizeof(WCHAR);
+ url = HeapAlloc(GetProcessHeap(), 0, size);
+
+ hres = CoInternetParseUrl(pwszUrl, PARSE_SECURITY_URL, 0, url,
size/sizeof(WCHAR), &size, 0);
+ if(FAILED(hres))
+ memcpy(url, pwszUrl, size);
+
+ hres = map_url_to_zone(url, pdwZone);
+
+ HeapFree(GetProcessHeap(), 0, url);
+
+ return hres;
}
static HRESULT WINAPI
SecManagerImpl_GetSecurityId(IInternetSecurityManager *iface,
LPCWSTR pwszUrl,
BYTE *pbSecurityId,
DWORD *pcbSecurityId,
- DWORD dwReserved)
+ DWORD_PTR
dwReserved)
{
- FIXME("(%p)->(%s %p %p %08lx)\n", iface, debugstr_w(pwszUrl),
pbSecurityId, pcbSecurityId,
+ SecManagerImpl *This = SECMGR_THIS(iface);
+ HRESULT hres;
+
+ TRACE("(%p)->(%s %p %p %08lx)\n", iface, debugstr_w(pwszUrl),
pbSecurityId, pcbSecurityId,
dwReserved);
+
+ if(This->custom_manager) {
+ hres =
IInternetSecurityManager_GetSecurityId(This->custom_manager,
+ pwszUrl, pbSecurityId, pcbSecurityId, dwReserved);
+ if(hres != INET_E_DEFAULT_ACTION)
+ return hres;
+ }
+
+ FIXME("Default action is not implemented\n");
return E_NOTIMPL;
}
@@ -140,8 +296,20 @@
BYTE *pContext,
DWORD cbContext,
DWORD dwFlags,
DWORD dwReserved)
{
- FIXME("(%p)->(%s %08lx %p %08lx %p %08lx %08lx %08lx)\n", iface,
debugstr_w(pwszUrl), dwAction,
+ SecManagerImpl *This = SECMGR_THIS(iface);
+ HRESULT hres;
+
+ TRACE("(%p)->(%s %08lx %p %08lx %p %08lx %08lx %08lx)\n", iface,
debugstr_w(pwszUrl), dwAction,
pPolicy, cbPolicy, pContext, cbContext, dwFlags, dwReserved);
+
+ if(This->custom_manager) {
+ hres =
IInternetSecurityManager_ProcessUrlAction(This->custom_manager, pwszUrl,
dwAction,
+ pPolicy, cbPolicy, pContext, cbContext, dwFlags,
dwReserved);
+ if(hres != INET_E_DEFAULT_ACTION)
+ return hres;
+ }
+
+ FIXME("Default action is not implemented\n");
return E_NOTIMPL;
}
@@ -152,22 +320,58 @@
BYTE *pContext,
DWORD cbContext,
DWORD
dwReserved)
{
- FIXME("(%p)->(%s %s %p %p %p %08lx %08lx )\n", iface,
debugstr_w(pwszUrl), debugstr_guid(guidKey),
+ SecManagerImpl *This = SECMGR_THIS(iface);
+ HRESULT hres;
+
+ TRACE("(%p)->(%s %s %p %p %p %08lx %08lx )\n", iface,
debugstr_w(pwszUrl), debugstr_guid(guidKey),
ppPolicy, pcbPolicy, pContext, cbContext, dwReserved);
+
+ if(This->custom_manager) {
+ hres =
IInternetSecurityManager_QueryCustomPolicy(This->custom_manager,
pwszUrl, guidKey,
+ ppPolicy, pcbPolicy, pContext, cbContext, dwReserved);
+ if(hres != INET_E_DEFAULT_ACTION)
+ return hres;
+ }
+
+ FIXME("Default action is not implemented\n");
return E_NOTIMPL;
}
static HRESULT WINAPI
SecManagerImpl_SetZoneMapping(IInternetSecurityManager *iface,
DWORD dwZone,
LPCWSTR pwszPattern, DWORD dwFlags)
{
- FIXME("(%p)->(%08lx %s %08lx)\n", iface, dwZone,
debugstr_w(pwszPattern),dwFlags);
+ SecManagerImpl *This = SECMGR_THIS(iface);
+ HRESULT hres;
+
+ TRACE("(%p)->(%08lx %s %08lx)\n", iface, dwZone,
debugstr_w(pwszPattern),dwFlags);
+
+ if(This->custom_manager) {
+ hres =
IInternetSecurityManager_SetZoneMapping(This->custom_manager, dwZone,
+ pwszPattern, dwFlags);
+ if(hres != INET_E_DEFAULT_ACTION)
+ return hres;
+ }
+
+ FIXME("Default action is not implemented\n");
return E_NOTIMPL;
}
static HRESULT WINAPI
SecManagerImpl_GetZoneMappings(IInternetSecurityManager *iface,
- DWORD dwZone,
IEnumString **ppenumString, DWORD dwFlags)
+ DWORD dwZone, IEnumString **ppenumString, DWORD dwFlags)
{
- FIXME("(%p)->(%08lx %p %08lx)\n", iface, dwZone,
ppenumString,dwFlags);
+ SecManagerImpl *This = SECMGR_THIS(iface);
+ HRESULT hres;
+
+ TRACE("(%p)->(%08lx %p %08lx)\n", iface, dwZone,
ppenumString,dwFlags);
+
+ if(This->custom_manager) {
+ hres =
IInternetSecurityManager_GetZoneMappings(This->custom_manager, dwZone,
+ ppenumString, dwFlags);
+ if(hres != INET_E_DEFAULT_ACTION)
+ return hres;
+ }
+
+ FIXME("Default action is not implemented\n");
return E_NOTIMPL;
}
@@ -194,9 +398,12 @@
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
/* Initialize the virtual function table. */
- This->lpvtbl1 = &VT_SecManagerImpl;
- This->ref = 1;
+ This->lpInternetSecurityManagerVtbl = &VT_SecManagerImpl;
+ This->ref = 1;
+ This->mgrsite = NULL;
+ This->custom_manager = NULL;
+
*ppobj = This;
URLMON_LockModule();
@@ -213,6 +420,46 @@
LONG ref;
} ZoneMgrImpl;
+static HRESULT open_zone_key(DWORD zone, HKEY *hkey, URLZONEREG
zone_reg)
+{
+ static const WCHAR wszZonesKey[] =
+
{'S','o','f','t','w','a','r','e','\\',
+
'M','i','c','r','o','s','o','f','t','\\',
+
'W','i','n','d','o','w','s','\\',
+
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
+
'I','n','t','e','r','n','e','t','
','S','e','t','t','i','n','g','s','\\',
+ 'Z','o','n','e','s','\\',0};
+ static const WCHAR wszFormat[] =
{'%','s','%','l','d',0};
+
+ WCHAR key_name[sizeof(wszZonesKey)/sizeof(WCHAR)+8];
+ HKEY parent_key;
+ DWORD res;
+
+ switch(zone_reg) {
+ case URLZONEREG_DEFAULT: /* FIXME: TEST */
+ case URLZONEREG_HKCU:
+ parent_key = HKEY_CURRENT_USER;
+ break;
+ case URLZONEREG_HKLM:
+ parent_key = HKEY_LOCAL_MACHINE;
+ break;
+ default:
+ WARN("Unknown URLZONEREG: %d\n", zone_reg);
+ return E_FAIL;
+ };
+
+ wsprintfW(key_name, wszFormat, wszZonesKey, zone);
+
+ res = RegOpenKeyW(parent_key, key_name, hkey);
+
+ if(res != ERROR_SUCCESS) {
+ WARN("RegOpenKey failed\n");
+ return E_INVALIDARG;
+ }
+
+ return S_OK;
+}
+
/********************************************************************
* IInternetZoneManager_QueryInterface
*/
@@ -324,15 +571,41 @@
* IInternetZoneManager_GetZoneActionPolicy
*/
static HRESULT WINAPI
ZoneMgrImpl_GetZoneActionPolicy(IInternetZoneManager* iface,
- DWORD dwZone,
- DWORD dwAction,
- BYTE* pPolicy,
- DWORD cbPolicy,
- URLZONEREG
urlZoneReg)
+ DWORD dwZone, DWORD dwAction, BYTE* pPolicy, DWORD cbPolicy,
URLZONEREG urlZoneReg)
{
- FIXME("(%p)->(%08lx %08lx %p %08lx %08x) stub\n", iface, dwZone,
dwAction, pPolicy,
- cbPolicy,
urlZoneReg);
- return E_NOTIMPL;
+ WCHAR action[16];
+ HKEY hkey;
+ LONG res;
+ DWORD size = cbPolicy;
+ HRESULT hres;
+
+ static const WCHAR wszFormat[] = {'%','l','X',0};
+
+ TRACE("(%p)->(%ld %08lx %p %ld %d)\n", iface, dwZone, dwAction,
pPolicy,
+ cbPolicy, urlZoneReg);
+
+ if(!pPolicy)
+ return E_INVALIDARG;
+
+ hres = open_zone_key(dwZone, &hkey, urlZoneReg);
+ if(FAILED(hres))
+ return hres;
+
+ wsprintfW(action, wszFormat, dwAction);
+
+ res = RegQueryValueExW(hkey, action, NULL, NULL, pPolicy, &size);
+ if(res == ERROR_MORE_DATA) {
+ hres = E_INVALIDARG;
+ }else if(res == ERROR_FILE_NOT_FOUND) {
+ hres = E_FAIL;
+ }else if(res != ERROR_SUCCESS) {
+ ERR("RegQueryValue failed: %ld\n", res);
+ hres = E_UNEXPECTED;
+ }
+
+ RegCloseKey(hkey);
+
+ return hres;
}
/********************************************************************
@@ -468,6 +741,10 @@
IInternetSecurityManager **ppSM, DWORD dwReserved )
{
TRACE("%p %p %ld\n", pSP, ppSM, dwReserved );
+
+ if(pSP)
+ FIXME("pSP not supported\n");
+
return SecManagerImpl_Construct(NULL, (void**) ppSM);
}
_____
Copied: trunk/reactos/lib/urlmon/session.c (from rev 18356,
vendor/wine/dlls/urlmon/current/session.c)
Property changes on: trunk/reactos/lib/urlmon/session.c
___________________________________________________________________
Name: svn:keywords + Author Date Id Revision Name: svn:eol-style +
native
_____
Modified: trunk/reactos/lib/urlmon/umon.c
--- trunk/reactos/lib/urlmon/umon.c 2005-10-08 19:30:16 UTC (rev
18356)
+++ trunk/reactos/lib/urlmon/umon.c 2005-10-08 19:43:11 UTC (rev
18357)
@@ -1179,17 +1179,39 @@
HRESULT WINAPI CreateAsyncBindCtx(DWORD reserved, IBindStatusCallback
*callback,
IEnumFORMATETC *format, IBindCtx **pbind)
{
+ TRACE("(%08lx %p %p %p)\n", reserved, callback, format, pbind);
+
+ if(!callback)
+ return E_INVALIDARG;
+
+ return CreateAsyncBindCtxEx(NULL, 0, callback, format, pbind, 0);
+}
+/**********************************************************************
*
+ * CreateAsyncBindCtxEx (URLMON.@)
+ *
+ * Create an asynchronous bind context.
+ */
+HRESULT WINAPI CreateAsyncBindCtxEx(IBindCtx *ibind, DWORD options,
+ IBindStatusCallback *callback, IEnumFORMATETC *format, IBindCtx**
pbind,
+ DWORD reserved)
+{
HRESULT hres;
BIND_OPTS bindopts;
IBindCtx *bctx;
- TRACE("(%08lx %p %p %p)\n", reserved, callback, format, pbind);
+ TRACE("(%p %08lx %p %p %p %ld)\n", ibind, options, callback,
format, pbind, reserved);
- if(!callback)
+ if(!pbind)
return E_INVALIDARG;
+
+ if(options)
+ FIXME("not supported options %08lx", options);
if(format)
- FIXME("format is not supported yet\n");
+ FIXME("format is not supported\n");
+ if(reserved)
+ WARN("reserved=%ld\n", reserved);
+
hres = CreateBindCtx(0, &bctx);
if(FAILED(hres))
return hres;
@@ -1200,31 +1222,13 @@
bindopts.dwTickCountDeadline = 0;
IBindCtx_SetBindOptions(bctx, &bindopts);
- hres = IBindCtx_RegisterObjectParam(bctx, (LPOLESTR)BSCBHolder,
(IUnknown*)callback);
- if(FAILED(hres)) {
- IBindCtx_Release(bctx);
- return hres;
- }
+ if(callback)
+ RegisterBindStatusCallback(bctx, callback, NULL, 0);
*pbind = bctx;
return S_OK;
}
-/**********************************************************************
*
- * CreateAsyncBindCtxEx (URLMON.@)
- *
- * Create an asynchronous bind context.
- *
- * FIXME
- * Not implemented.
- */
-HRESULT WINAPI CreateAsyncBindCtxEx(IBindCtx *ibind, DWORD options,
- IBindStatusCallback *callback, IEnumFORMATETC *format, IBindCtx**
pbind,
- DWORD reserved)
-{
- FIXME("stub, returns failure\n");
- return E_INVALIDARG;
-}
/***********************************************************************
@@ -1274,40 +1278,7 @@
return hres;
}
-
/***********************************************************************
- * CoInternetGetSession (URLMON.@)
- *
- * Create a new internet session and return an IInternetSession
interface
- * representing it.
- *
- * PARAMS
- * dwSessionMode [I] Mode for the internet session
- * ppIInternetSession [O] Destination for creates IInternetSession
object
- * dwReserved [I] Reserved, must be 0.
- *
- * RETURNS
- * Success: S_OK. ppIInternetSession contains the IInternetSession
interface.
- * Failure: E_INVALIDARG, if any argument is invalid, or
- * E_OUTOFMEMORY if memory allocation fails.
- */
-HRESULT WINAPI CoInternetGetSession(DWORD dwSessionMode,
IInternetSession **ppIInternetSession, DWORD dwReserved)
-{
- FIXME("(%ld, %p, %ld): stub\n", dwSessionMode, ppIInternetSession,
dwReserved);
-
- if(dwSessionMode) {
- ERR("dwSessionMode: %ld, must be zero\n", dwSessionMode);
- }
-
- if(dwReserved) {
- ERR("dwReserved: %ld, must be zero\n", dwReserved);
- }
-
- *ppIInternetSession=NULL;
- return E_OUTOFMEMORY;
-}
-
-/**********************************************************************
*
* CoInternetQueryInfo (URLMON.@)
*
* Retrieves information relevant to a specified URL
@@ -1327,70 +1298,7 @@
return S_OK;
}
-static BOOL URLMON_IsBinary(LPVOID pBuffer, DWORD cbSize)
-{
- unsigned int i, binarycount = 0;
- unsigned char *buff = pBuffer;
- for(i=0; i<cbSize; i++) {
- if(buff[i] < 32)
- binarycount++;
- }
- return binarycount > (cbSize-binarycount);
-}
-
/***********************************************************************
- * FindMimeFromData (URLMON.@)
- *
- * Determines the Multipurpose Internet Mail Extensions (MIME) type
from the data provided.
- *
- * NOTE
- * See
http://msdn.microsoft.com/workshop/networking/moniker/overview/appendix_
a.asp
- */
-HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID
pBuffer,
- DWORD cbSize, LPCWSTR pwzMimeProposed, DWORD dwMimeFlags,
- LPWSTR* ppwzMimeOut, DWORD dwReserved)
-{
- static const WCHAR szBinaryMime[] =
{'a','p','p','l','i','c','a','t','i','o','n','/','o','c','t','e','t','-'
,'s','t','r','e','a','m','\0'};
- static const WCHAR szTextMime[] =
{'t','e','x','t','/','p','l','a','i','n','\0'};
- static const WCHAR szContentType[] =
{'C','o','n','t','e','n','t','
','T','y','p','e','\0'};
- WCHAR szTmpMime[256];
- LPCWSTR mimeType = NULL;
- HKEY hKey = NULL;
-
- TRACE("(%p,%s,%p,%ld,%s,0x%lx,%p,0x%lx)\n", pBC,
debugstr_w(pwzUrl), pBuffer, cbSize,
- debugstr_w(pwzMimeProposed), dwMimeFlags, ppwzMimeOut,
dwReserved);
-
- if((!pwzUrl && (!pBuffer || cbSize <= 0)) || !ppwzMimeOut)
- return E_INVALIDARG;
-
- if(pwzMimeProposed)
- mimeType = pwzMimeProposed;
- else {
- /* Try and find the mime type in the registry */
- if(pwzUrl) {
- LPWSTR ext = strrchrW(pwzUrl, '.');
- if(ext) {
- DWORD dwSize;
- if(!RegOpenKeyExW(HKEY_CLASSES_ROOT, ext, 0, 0, &hKey))
{
- if(!RegQueryValueExW(hKey, szContentType, NULL,
NULL, (LPBYTE)szTmpMime, &dwSize)) {
- mimeType = szTmpMime;
- }
- RegCloseKey(hKey);
- }
- }
- }
- }
- if(!mimeType && pBuffer && cbSize > 0)
- mimeType = URLMON_IsBinary(pBuffer,
cbSize)?szBinaryMime:szTextMime;
-
- TRACE("Using %s\n", debugstr_w(mimeType));
- *ppwzMimeOut =
CoTaskMemAlloc((lstrlenW(mimeType)+1)*sizeof(WCHAR));
- if(!*ppwzMimeOut) return E_OUTOFMEMORY;
- lstrcpyW(*ppwzMimeOut, mimeType);
- return S_OK;
-}
-
-/**********************************************************************
*
* IsAsyncMoniker (URLMON.@)
*/
HRESULT WINAPI IsAsyncMoniker(IMoniker *pmk)
@@ -1445,7 +1353,7 @@
IBindStatusCallback_Release(prev);
}
- return IBindCtx_RegisterObjectParam(pbc, (LPOLESTR)BSCBHolder,
(IUnknown *)pbsc);
+ return IBindCtx_RegisterObjectParam(pbc, (LPOLESTR)BSCBHolder,
(IUnknown *)pbsc);
}
/***********************************************************************
@@ -1487,22 +1395,6 @@
}
/***********************************************************************
- * ReleaseBindInfo (URLMON.@)
- *
- * Release the resources used by the specified BINDINFO structure.
- *
- * PARAMS
- * pbindinfo [I] BINDINFO to release.
- *
- * RETURNS
- * Nothing.
- */
-void WINAPI ReleaseBindInfo(BINDINFO* pbindinfo)
-{
- FIXME("(%p)stub!\n", pbindinfo);
-}
-
-/**********************************************************************
*
* URLDownloadToFileA (URLMON.@)
*
* Downloads URL szURL to rile szFileName and call lpfnCB callback to
_____
Modified: trunk/reactos/lib/urlmon/urlmon.inf
--- trunk/reactos/lib/urlmon/urlmon.inf 2005-10-08 19:30:16 UTC (rev
18356)
+++ trunk/reactos/lib/urlmon/urlmon.inf 2005-10-08 19:43:11 UTC (rev
18357)
@@ -3,11 +3,11 @@
[RegisterDll]
-AddReg=Protocols.Reg
+AddReg=Protocols.Reg, ZoneMap.Reg, Zones.Reg
[UnregisterDll]
-DelReg=Protocols.Reg
+DelReg=Protocols.Reg, ZoneMap.Reg, Zones.Reg
[Protocols.Reg]
@@ -27,3 +27,455 @@
HKCR,"PROTOCOLS\Handler\https","CLSID",,"%CLSID_HttpsProtocol%"
HKCR,"PROTOCOLS\Handler\mk",,,"mk: Asynchronous Pluggable Protocol
Handler"
HKCR,"PROTOCOLS\Handler\mk","CLSID",,"%CLSID_MkProtocol%"
+
+
+[ZoneMap.Reg]
+HKCU,"Software\Microsoft\Windows\CurrentVersion\Internet Settings",,,
+HKCU,"%PATH_ZONEMAP%",,,
+HKLM,"%PATH_ZONEMAP%",,,
+HKCU,"%PATH_ZONEMAP%","ProxyByPass", 0x10001,0x1
+HKLM,"%PATH_ZONEMAP%","ProxyByPass", 0x10001,0x1
+HKCU,"%PATH_ZONEMAP%","IntranetName", 0x10001,0x1
+HKLM,"%PATH_ZONEMAP%","IntranetName", 0x10001,0x1
+HKCU,"%PATH_ZONEMAP%","UNCAsIntranet",0x10001,0x1
+HKLM,"%PATH_ZONEMAP%","UNCAsIntranet",0x10001,0x1
+HKCU,"%PATH_ZONEMAP_PROTOCOLS%",,,
+HKLM,"%PATH_ZONEMAP_PROTOCOLS%",,,
+HKCU,"%PATH_ZONEMAP_PROTOCOLS%","http", 0x10001,0x3
+HKLM,"%PATH_ZONEMAP_PROTOCOLS%","http", 0x10001,0x3
+HKCU,"%PATH_ZONEMAP_PROTOCOLS%","https",0x10001,0x3
+HKLM,"%PATH_ZONEMAP_PROTOCOLS%","https",0x10001,0x3
+HKCU,"%PATH_ZONEMAP_PROTOCOLS%","ftp", 0x10001,0x3
+HKLM,"%PATH_ZONEMAP_PROTOCOLS%","ftp", 0x10001,0x3
+HKCU,"%PATH_ZONEMAP_PROTOCOLS%","file", 0x10001,0x3
+HKLM,"%PATH_ZONEMAP_PROTOCOLS%","file", 0x10001,0x3
+HKCU,"%PATH_ZONEMAP_PROTOCOLS%","@ivt", 0x10001,0x1
+HKLM,"%PATH_ZONEMAP_PROTOCOLS%","@ivt",0x10001,0x1
+HKCU,"%PATH_ZONEMAP_DOMAINS%",,,
+HKLM,"%PATH_ZONEMAP_DOMAINS%",,,
+HKCU,"%PATH_ZONEMAP_RANGES%",,,
+HKLM,"%PATH_ZONEMAP_RANGES%",,,
+
+
+[Zones.Reg]
+HKCU,"%PATH_ZONES%",,,
+
+;; Local Zone
+HKCU,"%ZONES_LOCAL%",,,
+HKLM,"%ZONES_LOCAL%",,,
+HKCU,"%ZONES_LOCAL%","DisplayName",,%NAME_LOCAL%
+HKLM,"%ZONES_LOCAL%","DisplayName",,%NAME_LOCAL%
+HKCU,"%ZONES_LOCAL%","Description",,%DESC_LOCAL%
+HKLM,"%ZONES_LOCAL%","Description",,%DESC_LOCAL%
+HKCU,"%ZONES_LOCAL%","Icon",,%ZICON_LOCAL%
+HKLM,"%ZONES_LOCAL%","Icon",,%ZICON_LOCAL%
+HKCU,"%ZONES_LOCAL%","CurrentLevel",0x10001,0x00000
+HKLM,"%ZONES_LOCAL%","CurrentLevel",0x10001,0x00000
+HKCU,"%ZONES_LOCAL%","Flags",0x10001,0x21
+HKLM,"%ZONES_LOCAL%","Flags",0x10001,0x21
+HKCU,"%ZONES_LOCAL%","1001",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1001",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1004",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1004",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1200",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1200",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1201",0x10003,0x1
+HKLM,"%ZONES_LOCAL%","1201",0x10003,0x1
+HKCU,"%ZONES_LOCAL%","1400",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1400",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1402",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1402",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1405",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1405",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1406",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1406",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1407",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1407",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1601",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1601",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1604",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1604",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1605",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1605",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1606",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1606",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1607",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1607",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1608",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1608",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1609",0x10003,0x1
+HKLM,"%ZONES_LOCAL%","1609",0x10003,0x1
+HKCU,"%ZONES_LOCAL%","1800",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1800",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1802",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1802",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1803",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1803",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1804",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1804",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1805",0x10001,0x0
+HKLM,"%ZONES_LOCAL%","1805",0x10001,0x0
+HKCU,"%ZONES_LOCAL%","1A00",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1A00",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1A02",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1A02",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1A03",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1A03",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1A04",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1A04",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1A05",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1A05",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1A06",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1A06",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1A10",0x10003,0x0
+HKLM,"%ZONES_LOCAL%","1A10",0x10003,0x0
+HKCU,"%ZONES_LOCAL%","1C00",0x10003,0x20000
+HKLM,"%ZONES_LOCAL%","1C00",0x10003,0x20000
+HKCU,"%ZONES_LOCAL%","1E05",0x10003,0x30000
+HKLM,"%ZONES_LOCAL%","1E05",0x10003,0x30000
+
+;; Intranet Zone
+HKCU,"%ZONES_INTRANET%",,,
+HKLM,"%ZONES_INTRANET%",,,
+HKCU,"%ZONES_INTRANET%","DisplayName",,%NAME_INTRANET%
+HKLM,"%ZONES_INTRANET%","DisplayName",,%NAME_INTRANET%
+HKCU,"%ZONES_INTRANET%","Description",,%DESC_INTRANET%
+HKLM,"%ZONES_INTRANET%","Description",,%DESC_INTRANET%
+HKCU,"%ZONES_INTRANET%","Icon",,%ZICON_INTRANET%
+HKLM,"%ZONES_INTRANET%","Icon",,%ZICON_INTRANET%
+HKCU,"%ZONES_INTRANET%","CurrentLevel",0x10003,0x10500
+HKLM,"%ZONES_INTRANET%","CurrentLevel",0x10003,0x10500
+HKCU,"%ZONES_INTRANET%","MinLevel",0x10001,0x10000
+HKLM,"%ZONES_INTRANET%","MinLevel",0x10001,0x10000
+HKCU,"%ZONES_INTRANET%","RecommendedLevel",0x10001,0x10500
+HKLM,"%ZONES_INTRANET%","RecommendedLevel",0x10001,0x10500
+HKCU,"%ZONES_INTRANET%","Flags",0x10003,0xDB
+HKLM,"%ZONES_INTRANET%","Flags",0x10003,0xDB
+HKCU,"%ZONES_INTRANET%","1001",0x10003,0x1
+HKLM,"%ZONES_INTRANET%","1001",0x10003,0x1
+HKCU,"%ZONES_INTRANET%","1004",0x10003,0x3
+HKLM,"%ZONES_INTRANET%","1004",0x10003,0x3
+HKCU,"%ZONES_INTRANET%","1200",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1200",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1201",0x10003,0x3
+HKLM,"%ZONES_INTRANET%","1201",0x10003,0x3
+HKCU,"%ZONES_INTRANET%","1400",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1400",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1402",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1402",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1405",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1405",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1406",0x10003,0x1
+HKLM,"%ZONES_INTRANET%","1406",0x10003,0x1
+HKCU,"%ZONES_INTRANET%","1407",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1407",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1601",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1601",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1604",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1604",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1605",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1605",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1606",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1606",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1607",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1607",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1608",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1608",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1609",0x10003,0x1
+HKLM,"%ZONES_INTRANET%","1609",0x10003,0x1
+HKCU,"%ZONES_INTRANET%","1800",0x10003,0x1
+HKLM,"%ZONES_INTRANET%","1800",0x10003,0x1
+HKCU,"%ZONES_INTRANET%","1802",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1802",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1803",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1803",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1804",0x10003,0x1
+HKLM,"%ZONES_INTRANET%","1804",0x10003,0x1
+HKCU,"%ZONES_INTRANET%","1805",0x10001,0x0
+HKLM,"%ZONES_INTRANET%","1805",0x10001,0x0
+HKCU,"%ZONES_INTRANET%","1A00",0x10003,0x20000
+HKLM,"%ZONES_INTRANET%","1A00",0x10003,0x20000
+HKCU,"%ZONES_INTRANET%","1A02",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1A02",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1A03",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1A03",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1A04",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1A04",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1A05",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1A05",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1A06",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1A06",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1A10",0x10003,0x0
+HKLM,"%ZONES_INTRANET%","1A10",0x10003,0x0
+HKCU,"%ZONES_INTRANET%","1C00",0x10003,0x20000
+HKLM,"%ZONES_INTRANET%","1C00",0x10003,0x20000
+HKCU,"%ZONES_INTRANET%","1E05",0x10003,0x20000
+HKLM,"%ZONES_INTRANET%","1E05",0x10003,0x20000
+
+;; Trusted Zone
+HKCU,"%ZONES_TRUSTED%",,,
+HKLM,"%ZONES_TRUSTED%",,,
+HKCU,"%ZONES_TRUSTED%","DisplayName",,%NAME_TRUSTED%
+HKLM,"%ZONES_TRUSTED%","DisplayName",,%NAME_TRUSTED%
+HKCU,"%ZONES_TRUSTED%","Description",,%DESC_TRUSTED%
+HKLM,"%ZONES_TRUSTED%","Description",,%DESC_TRUSTED%
+HKCU,"%ZONES_TRUSTED%","Icon",,%ZICON_TRUSTED%
[truncated at 1000 lines; 540 more skipped]