winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
February 2008
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
999 discussions
Start a n
N
ew thread
Alexandre Julliard : winex11: Re-introduce a separate X11 window for the client area of top-level windows .
by Alexandre Julliard
21 Feb '08
21 Feb '08
Module: wine Branch: master Commit: 8ee07d49aeb096f5f91eced1cb969633d0decc32 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8ee07d49aeb096f5f91eced1c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 21 12:29:36 2008 +0100 winex11: Re-introduce a separate X11 window for the client area of top-level windows. --- dlls/winex11.drv/dce.c | 13 ++++-- dlls/winex11.drv/mouse.c | 16 +++++-- dlls/winex11.drv/window.c | 112 ++++++++++++++++++++++++++++++++++++++++---- dlls/winex11.drv/winpos.c | 67 ++++++++++++++------------- dlls/winex11.drv/x11drv.h | 6 ++- server/window.c | 2 +- 6 files changed, 163 insertions(+), 53 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=8ee07d49aeb096f5f91ec…
1
0
0
0
James Hawkins : msi: Fix the INSTALLPROPERTY_LASTUSEDSOURCE case of MsiSourceListSetInfo.
by Alexandre Julliard
21 Feb '08
21 Feb '08
Module: wine Branch: master Commit: e43eee875955a2a362ce6f0fbba117f621b0800f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e43eee875955a2a362ce6f0fb…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Thu Feb 21 00:04:04 2008 -0600 msi: Fix the INSTALLPROPERTY_LASTUSEDSOURCE case of MsiSourceListSetInfo. --- dlls/msi/source.c | 78 +++++++++++++++++++++++++++++----------------- dlls/msi/tests/source.c | 23 ++++++++++--- 2 files changed, 66 insertions(+), 35 deletions(-) diff --git a/dlls/msi/source.c b/dlls/msi/source.c index e44b3a1..44ab0c1 100644 --- a/dlls/msi/source.c +++ b/dlls/msi/source.c @@ -524,6 +524,52 @@ UINT WINAPI MsiSourceListSetInfoA(LPCSTR szProduct, LPCSTR szUserSid, return ret; } +static UINT set_last_used_source(HKEY source, LPCWSTR product, LPCWSTR usersid, + MSIINSTALLCONTEXT context, DWORD options, + LPCWSTR value) +{ + LPWSTR buffer; + WCHAR typechar; + DWORD size; + UINT r; + int index = 0; + + static const WCHAR format[] = {'%','c',';','%','i',';','%','s',0}; + + if (options & MSISOURCETYPE_NETWORK) + typechar = 'n'; + else if (options & MSISOURCETYPE_URL) + typechar = 'u'; + else + return ERROR_INVALID_PARAMETER; + + /* make sure the source is registered */ + r = MsiSourceListAddSourceExW(product, usersid, context, + options, value, 0); + if (r != ERROR_SUCCESS) + return r; + + while ((r = MsiSourceListEnumSourcesW(product, usersid, context, options, + index, NULL, NULL)) == ERROR_SUCCESS) + index++; + + if (r != ERROR_NO_MORE_ITEMS) + return r; + + size = (lstrlenW(format) + lstrlenW(value) + 7) * sizeof(WCHAR); + buffer = msi_alloc(size); + if (!buffer) + return ERROR_OUTOFMEMORY; + + sprintfW(buffer, format, typechar, index, value); + + r = RegSetValueExW(source, INSTALLPROPERTY_LASTUSEDSOURCEW, 0, + REG_SZ, (LPBYTE)buffer, size); + msi_free(buffer); + + return r; +} + /****************************************************************** * MsiSourceListSetInfoW (MSI.@) */ @@ -586,35 +632,6 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid, RegCloseKey(media); } } - else if (strcmpW(szProperty, INSTALLPROPERTY_LASTUSEDSOURCEW)==0) - { - LPWSTR buffer = NULL; - DWORD size; - WCHAR typechar = 'n'; - static const WCHAR LastUsedSource_Fmt[] = {'%','c',';','%','i',';','%','s',0}; - - /* make sure the source is registered */ - MsiSourceListAddSourceExW(szProduct, szUserSid, dwContext, - dwOptions, szValue, 0); - - if (dwOptions & MSISOURCETYPE_NETWORK) - typechar = 'n'; - else if (dwOptions & MSISOURCETYPE_URL) - typechar = 'u'; - else if (dwOptions & MSISOURCETYPE_MEDIA) - typechar = 'm'; - else - ERR("Unknown source type! %x\n", dwOptions); - - size = (lstrlenW(szValue)+5)*sizeof(WCHAR); - buffer = msi_alloc(size); - sprintfW(buffer, LastUsedSource_Fmt, typechar, 1, szValue); - rc = RegSetValueExW(sourcekey, INSTALLPROPERTY_LASTUSEDSOURCEW, 0, - REG_EXPAND_SZ, (LPBYTE)buffer, size); - if (rc != ERROR_SUCCESS) - rc = ERROR_UNKNOWN_PROPERTY; - msi_free( buffer ); - } else if (strcmpW(INSTALLPROPERTY_PACKAGENAMEW, szProperty)==0) { DWORD size = lstrlenW(szValue)*sizeof(WCHAR); @@ -623,6 +640,9 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid, if (rc != ERROR_SUCCESS) rc = ERROR_UNKNOWN_PROPERTY; } + else if (strcmpW(szProperty, INSTALLPROPERTY_LASTUSEDSOURCEW)==0) + rc = set_last_used_source(sourcekey, szProduct, szUserSid, dwContext, + dwOptions, szValue); else rc = ERROR_UNKNOWN_PROPERTY; diff --git a/dlls/msi/tests/source.c b/dlls/msi/tests/source.c index 8a275d2..b489795 100644 --- a/dlls/msi/tests/source.c +++ b/dlls/msi/tests/source.c @@ -1546,11 +1546,8 @@ static void test_MsiSourceListSetInfo(void) r = MsiSourceListSetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCE, "source"); - todo_wine - { - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - } + ok(r == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", r); /* INSTALLPROPERTY_LASTUSEDSOURCE, MSISOURCETYPE_NETWORK */ r = MsiSourceListSetInfoA(prodcode, NULL, @@ -1563,6 +1560,7 @@ static void test_MsiSourceListSetInfo(void) res = RegOpenKeyA(source, "Net", &net); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); CHECK_REG_STR(net, "1", "source\\") + CHECK_REG_STR(source, "LastUsedSource", "n;1;source"); /* source has forward slash */ r = MsiSourceListSetInfoA(prodcode, NULL, @@ -1570,7 +1568,9 @@ static void test_MsiSourceListSetInfo(void) MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, INSTALLPROPERTY_LASTUSEDSOURCE, "source/"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - CHECK_REG_STR(net, "1", "source\\") + CHECK_REG_STR(net, "1", "source\\"); + CHECK_REG_STR(net, "2", "source/\\"); + CHECK_REG_STR(source, "LastUsedSource", "n;2;source/"); /* INSTALLPROPERTY_LASTUSEDSOURCE, MSISOURCETYPE_URL */ r = MsiSourceListSetInfoA(prodcode, NULL, @@ -1583,6 +1583,7 @@ static void test_MsiSourceListSetInfo(void) res = RegOpenKeyA(source, "URL", &url); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); CHECK_REG_STR(url, "1", "source/"); + CHECK_REG_STR(source, "LastUsedSource", "u;1;source"); /* source has backslash */ r = MsiSourceListSetInfoA(prodcode, NULL, @@ -1591,6 +1592,16 @@ static void test_MsiSourceListSetInfo(void) INSTALLPROPERTY_LASTUSEDSOURCE, "source\\"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); CHECK_REG_STR(url, "1", "source/"); + CHECK_REG_STR(url, "2", "source\\/"); + CHECK_REG_STR(source, "LastUsedSource", "u;2;source\\"); + + /* INSTALLPROPERTY_LASTUSEDSOURCE, MSISOURCETYPE_MEDIA */ + r = MsiSourceListSetInfoA(prodcode, NULL, + MSIINSTALLCONTEXT_USERUNMANAGED, + MSICODE_PRODUCT | MSISOURCETYPE_MEDIA, + INSTALLPROPERTY_LASTUSEDSOURCE, "source"); + ok(r == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", r); /* INSTALLPROPERTY_PACKAGENAME */ r = MsiSourceListSetInfoA(prodcode, NULL,
1
0
0
0
James Hawkins : msi: Allow enumerating the sources without querying the source name.
by Alexandre Julliard
21 Feb '08
21 Feb '08
Module: wine Branch: master Commit: 6c7339eea16406f6e855bf38a879cb0b4bce7639 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6c7339eea16406f6e855bf38a…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Thu Feb 21 00:03:25 2008 -0600 msi: Allow enumerating the sources without querying the source name. --- dlls/msi/source.c | 9 +++++---- dlls/msi/tests/source.c | 12 ++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/dlls/msi/source.c b/dlls/msi/source.c index 53a2821..e44b3a1 100644 --- a/dlls/msi/source.c +++ b/dlls/msi/source.c @@ -189,12 +189,13 @@ UINT WINAPI MsiSourceListEnumSourcesA(LPCSTR szProductCodeOrPatch, LPCSTR szUser goto done; len = WideCharToMultiByte(CP_ACP, 0, source, -1, NULL, 0, NULL, NULL); - if (*pcchSource >= len) + if (pcchSource && *pcchSource >= len) WideCharToMultiByte(CP_ACP, 0, source, -1, szSource, len, NULL, NULL); else if (szSource) r = ERROR_MORE_DATA; - *pcchSource = len - 1; + if (pcchSource) + *pcchSource = len - 1; done: msi_free(product); @@ -203,7 +204,7 @@ done: if (r == ERROR_SUCCESS) { - if (szSource) index++; + if (szSource || !pcchSource) index++; } else if (dwIndex > index) index = 0; @@ -281,7 +282,7 @@ done: if (r == ERROR_SUCCESS) { - if (szSource) index++; + if (szSource || !pcchSource) index++; } else if (dwIndex > index) index = 0; diff --git a/dlls/msi/tests/source.c b/dlls/msi/tests/source.c index e76a277..8a275d2 100644 --- a/dlls/msi/tests/source.c +++ b/dlls/msi/tests/source.c @@ -883,6 +883,18 @@ static void test_MsiSourceListEnumSources(void) ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); ok(size == 5, "Expected 5, got %d\n", size); + /* both szSource and pcchSource are NULL, index 0 */ + r = MsiSourceListEnumSourcesA(prodcode, usersid, + MSIINSTALLCONTEXT_USERUNMANAGED, + MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, NULL, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + /* both szSource and pcchSource are NULL, index 1 */ + r = MsiSourceListEnumSourcesA(prodcode, usersid, + MSIINSTALLCONTEXT_USERUNMANAGED, + MSICODE_PRODUCT | MSISOURCETYPE_URL, 1, NULL, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + /* size is exactly 5 */ size = 5; lstrcpyA(value, "aaa");
1
0
0
0
James Hawkins : msi: Publish a few SourceList properties.
by Alexandre Julliard
21 Feb '08
21 Feb '08
Module: wine Branch: master Commit: 3de0014750eb9d96baef59aacfcbfef83e1e1ef2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3de0014750eb9d96baef59aac…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Thu Feb 21 00:02:46 2008 -0600 msi: Publish a few SourceList properties. --- dlls/msi/action.c | 41 ++++++++++++++++++++++++++++++++++++++++- dlls/msi/tests/install.c | 37 +++++++++++-------------------------- 2 files changed, 51 insertions(+), 27 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 2efcbbb..432496b 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3389,12 +3389,16 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) HKEY hkey=0; HKEY hukey=0; HKEY hudkey=0, props=0; + HKEY source; static const WCHAR szProductLanguage[] = {'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0}; static const WCHAR szARPProductIcon[] = {'A','R','P','P','R','O','D','U','C','T','I','C','O','N',0}; static const WCHAR szProductVersion[] = {'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0}; + static const WCHAR szSourceList[] = + {'S','o','u','r','c','e','L','i','s','t',0}; + static const WCHAR szEmpty[] = {0}; DWORD langid; LPWSTR buffer; DWORD size; @@ -3423,6 +3427,12 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) if (rc != ERROR_SUCCESS) goto end; + rc = RegCreateKeyW(hukey, szSourceList, &source); + if (rc != ERROR_SUCCESS) + goto end; + + RegCloseKey(source); + rc = MSIREG_OpenUserDataProductKey(package->ProductCode,&hudkey,TRUE); if (rc != ERROR_SUCCESS) goto end; @@ -3454,7 +3464,36 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) msi_reg_set_val_dword( hkey, INSTALLPROPERTY_VERSIONW, verdword ); } msi_free(buffer); - + + buffer = strrchrW( package->PackagePath, '\\') + 1; + rc = MsiSourceListSetInfoW( package->ProductCode, NULL, + MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, + INSTALLPROPERTY_PACKAGENAMEW, buffer ); + if (rc != ERROR_SUCCESS) + goto end; + + rc = MsiSourceListSetInfoW( package->ProductCode, NULL, + MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, + INSTALLPROPERTY_MEDIAPACKAGEPATHW, szEmpty ); + if (rc != ERROR_SUCCESS) + goto end; + + rc = MsiSourceListSetInfoW( package->ProductCode, NULL, + MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, + INSTALLPROPERTY_DISKPROMPTW, szEmpty ); + if (rc != ERROR_SUCCESS) + goto end; + + buffer = msi_dup_property( package, cszSourceDir ); + + rc = MsiSourceListSetInfoW( package->ProductCode, NULL, + MSIINSTALLCONTEXT_USERUNMANAGED, + MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, + INSTALLPROPERTY_LASTUSEDSOURCEW, buffer ); + msi_free(buffer); + if (rc != ERROR_SUCCESS) + goto end; + /* FIXME: Need to write more keys to the user registry */ hDb= alloc_msihandle( &package->db->hdr ); diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index bb87cd1..1fbb6ee 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2990,12 +2990,9 @@ static void test_publishsourcelist(void) lstrcpyA(value, "aaa"); r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, value, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "msitest.msi"), "Expected 'msitest.msi', got %s\n", value); - ok(size == 11, "Expected 11, got %d\n", size); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(value, "msitest.msi"), "Expected 'msitest.msi', got %s\n", value); + ok(size == 11, "Expected 11, got %d\n", size); size = MAX_PATH; lstrcpyA(value, "aaa"); @@ -3012,12 +3009,9 @@ static void test_publishsourcelist(void) lstrcpyA(value, "aaa"); r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, INSTALLPROPERTY_DISKPROMPT, value, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value); - ok(size == 0, "Expected 0, got %d\n", size); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value); + ok(size == 0, "Expected 0, got %d\n", size); lstrcpyA(path, CURR_DIR); lstrcatA(path, "\\"); @@ -3048,10 +3042,7 @@ static void test_publishsourcelist(void) lstrcpyA(value, "aaa"); r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - todo_wine - { - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - } + ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); @@ -3059,21 +3050,15 @@ static void test_publishsourcelist(void) lstrcpyA(value, "aaa"); r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, path), "Expected \"%s\", got \"%s\"\n", path, value); - ok(size == lstrlenA(path), "Expected %d, got %d\n", lstrlenA(path), size); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(value, path), "Expected \"%s\", got \"%s\"\n", path, value); + ok(size == lstrlenA(path), "Expected %d, got %d\n", lstrlenA(path), size); size = MAX_PATH; lstrcpyA(value, "aaa"); r = MsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 1, value, &size); - todo_wine - { - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - } + ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size);
1
0
0
0
James Hawkins : msi: Implement MsiSourceListEnumSources.
by Alexandre Julliard
21 Feb '08
21 Feb '08
Module: wine Branch: master Commit: 2d5ba8d20d3b2d1b7010c3cf2c9d7f80153cdc52 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2d5ba8d20d3b2d1b7010c3cf2…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Thu Feb 21 00:02:08 2008 -0600 msi: Implement MsiSourceListEnumSources. --- dlls/msi/source.c | 102 ++++++++++++++-- dlls/msi/tests/install.c | 20 +--- dlls/msi/tests/source.c | 305 +++++++++++++++++++--------------------------- 3 files changed, 219 insertions(+), 208 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=2d5ba8d20d3b2d1b7010c…
1
0
0
0
Alexander Dorofeyev : ddraw/tests: Add a test of D3DTBLEND_MODULATE with P8 texture.
by Alexandre Julliard
21 Feb '08
21 Feb '08
Module: wine Branch: master Commit: 29d87c6cbf3c20d0ed903be9c54a1909f161be14 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=29d87c6cbf3c20d0ed903be9c…
Author: Alexander Dorofeyev <alexd4(a)inbox.lv> Date: Wed Feb 20 23:03:56 2008 +0200 ddraw/tests: Add a test of D3DTBLEND_MODULATE with P8 texture. --- dlls/ddraw/tests/visual.c | 155 ++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 152 insertions(+), 3 deletions(-) diff --git a/dlls/ddraw/tests/visual.c b/dlls/ddraw/tests/visual.c index 7186f48..3d8fecb 100644 --- a/dlls/ddraw/tests/visual.c +++ b/dlls/ddraw/tests/visual.c @@ -1028,6 +1028,15 @@ out: ptr = ((D3DTRIANGLE*)(ptr))+1;\ } while (0) +HRESULT CALLBACK TextureFormatEnumCallback(LPDDSURFACEDESC lpDDSD, LPVOID lpContext) +{ + if (lpDDSD->ddpfPixelFormat.dwFlags & DDPF_PALETTEINDEXED8) { + *(BOOL*)lpContext = TRUE; + } + + return DDENUMRET_OK; +} + static void D3D1_TextureMapBlendTest(void) { HRESULT hr; @@ -1043,6 +1052,9 @@ static void D3D1_TextureMapBlendTest(void) DDCOLORKEY clrKey; IDirectDrawSurface *TexSurface = NULL; IDirect3DTexture *Texture = NULL; + IDirectDrawPalette *Palette = NULL; + PALETTEENTRY table1[256]; + BOOL p8_textures_supported = FALSE; struct { float x, y, z; @@ -1554,9 +1566,6 @@ static void D3D1_TextureMapBlendTest(void) ok(red == 0xff && green == 0 && blue == 0, "Got color %08x, expected 00ff0000 or near\n", color); color = D3D1_getPixelColor(DirectDraw1, Surface1, 5, 245); - red = (color & 0x00ff0000) >> 16; - green = (color & 0x0000ff00) >> 8; - blue = (color & 0x000000ff); ok(color == 0, "Got color %08x, expected 00000000\n", color); color = D3D1_getPixelColor(DirectDraw1, Surface1, 400, 245); @@ -1565,8 +1574,148 @@ static void D3D1_TextureMapBlendTest(void) blue = (color & 0x000000ff); ok(red >= 0x7e && red <= 0x82 && green == 0 && blue == 0, "Got color %08x, expected 00800000 or near\n", color); + /* 5) Test alpha again, now with color keyed P8 texture */ + if(Texture) IDirect3DTexture_Release(Texture); + Texture = NULL; + if(TexSurface) IDirectDrawSurface_Release(TexSurface); + TexSurface = NULL; + + hr = IDirect3DDevice_EnumTextureFormats(Direct3DDevice1, TextureFormatEnumCallback, + &p8_textures_supported); + ok(hr == DD_OK, "IDirect3DDevice_EnumTextureFormats returned %08x\n", hr); + + if (!p8_textures_supported) { + skip("device has no P8 texture support, skipping test\n"); + } else { + memset (&ddsd, 0, sizeof (ddsd)); + ddsd.dwSize = sizeof (ddsd); + ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT; + ddsd.dwHeight = 128; + ddsd.dwWidth = 128; + ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE; + ddsd.ddpfPixelFormat.dwSize = sizeof(ddsd.ddpfPixelFormat); + ddsd.ddpfPixelFormat.dwFlags = DDPF_RGB | DDPF_PALETTEINDEXED8; + U1(ddsd.ddpfPixelFormat).dwRGBBitCount = 8; + + hr = IDirectDraw_CreateSurface(DirectDraw1, &ddsd, &TexSurface, NULL); + ok(hr==D3D_OK, "CreateSurface returned: %x\n", hr); + if (FAILED(hr)) { + skip("IDirectDraw_CreateSurface failed; skipping further tests\n"); + goto out; + } + + memset(table1, 0, sizeof(table1)); + table1[0].peBlue = 0xff; + table1[1].peRed = 0xff; + + hr = IDirectDraw_CreatePalette(DirectDraw1, DDPCAPS_ALLOW256 | DDPCAPS_8BIT, table1, &Palette, NULL); + ok(hr == DD_OK, "CreatePalette returned %08x\n", hr); + if (FAILED(hr)) { + skip("IDirectDraw_CreatePalette failed; skipping further tests\n"); + goto out; + } + + hr = IDirectDrawSurface_SetPalette(TexSurface, Palette); + ok(hr==D3D_OK, "IDirectDrawSurface_SetPalette returned: %x\n", hr); + + hr = IDirectDrawSurface_QueryInterface(TexSurface, &IID_IDirect3DTexture, + (void *)&Texture); + ok(hr==D3D_OK, "IDirectDrawSurface_QueryInterface returned: %x\n", hr); + if (FAILED(hr)) { + skip("Can't get IDirect3DTexture interface; skipping further tests\n"); + goto out; + } + + memset(&ddbltfx, 0, sizeof(ddbltfx)); + ddbltfx.dwSize = sizeof(ddbltfx); + U5(ddbltfx).dwFillColor = 0; + hr = IDirectDrawSurface_Blt(Surface1, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &ddbltfx); + ok(hr == D3D_OK, "IDirectDrawSurface_Blt failed with %08x\n", hr); + U5(ddbltfx).dwFillColor = 0; + hr = IDirectDrawSurface_Blt(TexSurface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &ddbltfx); + ok(hr == D3D_OK, "IDirectDrawSurface_Blt failed with %08x\n", hr); + U5(ddbltfx).dwFillColor = 1; + hr = IDirectDrawSurface_Blt(TexSurface, &rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &ddbltfx); + ok(hr == D3D_OK, "IDirectDrawSurface_Blt failed with %08x\n", hr); + + clrKey.dwColorSpaceLowValue = 1; + clrKey.dwColorSpaceHighValue = 1; + hr = IDirectDrawSurface_SetColorKey(TexSurface, DDCKEY_SRCBLT, &clrKey); + ok(hr==D3D_OK, "IDirectDrawSurfac_SetColorKey returned: %x\n", hr); + + memset(&exdesc, 0, sizeof(D3DEXECUTEBUFFERDESC)); + exdesc.dwSize = sizeof(D3DEXECUTEBUFFERDESC); + hr = IDirect3DExecuteBuffer_Lock(ExecuteBuffer, &exdesc); + ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Lock failed with %08x\n", hr); + if (FAILED(hr)) { + skip("IDirect3DExecuteBuffer_Lock failed; skipping further tests\n"); + goto out; + } + + memcpy(exdesc.lpData, test1_quads, sizeof(test1_quads)); + + exe_buffer_ptr = 256 + (char*)exdesc.lpData; + + EXEBUF_PUT_PROCESSVERTICES(8, exe_buffer_ptr); + + EXEBUF_START_RENDER_STATES(2, exe_buffer_ptr); + EXEBUF_PUT_RENDER_STATE(D3DRENDERSTATE_ALPHABLENDENABLE, TRUE, exe_buffer_ptr); + hr = IDirect3DTexture_GetHandle(Texture, Direct3DDevice1, &htex); + ok(hr == D3D_OK, "IDirect3DTexture_GetHandle failed with %08x\n", hr); + EXEBUF_PUT_RENDER_STATE(D3DRENDERSTATE_TEXTUREHANDLE, htex, exe_buffer_ptr); + + EXEBUF_PUT_QUAD(0, exe_buffer_ptr); + EXEBUF_PUT_QUAD(4, exe_buffer_ptr); + + EXEBUF_END(exe_buffer_ptr); + + exe_length = ((char*)exe_buffer_ptr - (char*)exdesc.lpData) - 256; + + hr = IDirect3DExecuteBuffer_Unlock(ExecuteBuffer); + if (FAILED(hr)) { + trace("IDirect3DExecuteBuffer_Unlock failed with %08x\n", hr); + } + + memset(&exdata, 0, sizeof(D3DEXECUTEDATA)); + exdata.dwSize = sizeof(D3DEXECUTEDATA); + exdata.dwVertexCount = 8; + exdata.dwInstructionOffset = 256; + exdata.dwInstructionLength = exe_length; + hr = IDirect3DExecuteBuffer_SetExecuteData(ExecuteBuffer, &exdata); + ok(hr == D3D_OK, "IDirect3DExecuteBuffer_SetExecuteData failed with %08x\n", hr); + + hr = IDirect3DDevice_BeginScene(Direct3DDevice1); + ok(hr == D3D_OK, "IDirect3DDevice3_BeginScene failed with %08x\n", hr); + + if (SUCCEEDED(hr)) { + hr = IDirect3DDevice_Execute(Direct3DDevice1, ExecuteBuffer, Viewport, D3DEXECUTE_UNCLIPPED); + ok(hr == D3D_OK, "IDirect3DDevice_Execute failed, hr = %08x\n", hr); + hr = IDirect3DDevice_EndScene(Direct3DDevice1); + ok(hr == D3D_OK, "IDirect3DDevice3_EndScene failed, hr = %08x\n", hr); + } + + color = D3D1_getPixelColor(DirectDraw1, Surface1, 5, 5); + ok(color == 0, "Got color %08x, expected 00000000\n", color); + + color = D3D1_getPixelColor(DirectDraw1, Surface1, 400, 5); + red = (color & 0x00ff0000) >> 16; + green = (color & 0x0000ff00) >> 8; + blue = (color & 0x000000ff); + ok(red == 0 && green == 0 && blue == 0xff, "Got color %08x, expected 000000ff or near\n", color); + + color = D3D1_getPixelColor(DirectDraw1, Surface1, 5, 245); + ok(color == 0, "Got color %08x, expected 00000000\n", color); + + color = D3D1_getPixelColor(DirectDraw1, Surface1, 400, 245); + red = (color & 0x00ff0000) >> 16; + green = (color & 0x0000ff00) >> 8; + blue = (color & 0x000000ff); + ok(red == 0 && green == 0 && blue >= 0x7e && blue <= 0x82, "Got color %08x, expected 00000080 or near\n", color); + } + out: + if (Palette) IDirectDrawPalette_Release(Palette); if (TexSurface) IDirectDrawSurface_Release(TexSurface); if (Texture) IDirect3DTexture_Release(Texture); }
1
0
0
0
Alexander Dorofeyev : ddraw: Release interfaces when exiting with error.
by Alexandre Julliard
21 Feb '08
21 Feb '08
Module: wine Branch: master Commit: 9af59fb7f097e922c51687a3526bcae1a1e84b0b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9af59fb7f097e922c51687a35…
Author: Alexander Dorofeyev <alexd4(a)inbox.lv> Date: Wed Feb 20 23:03:51 2008 +0200 ddraw: Release interfaces when exiting with error. --- dlls/ddraw/texture.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/ddraw/texture.c b/dlls/ddraw/texture.c index 224f8d6..8835e4e 100644 --- a/dlls/ddraw/texture.c +++ b/dlls/ddraw/texture.c @@ -360,6 +360,7 @@ IDirect3DTextureImpl_Load(IDirect3DTexture2 *iface, if(ret_value != D3D_OK) { ERR("IWineD3DPalette::GetParent failed! This is unexpected\n"); + if (pal) IDirectDrawPalette_Release(pal); LeaveCriticalSection(&ddraw_cs); return D3DERR_TEXTURE_LOAD_FAILED; } @@ -371,6 +372,7 @@ IDirect3DTextureImpl_Load(IDirect3DTexture2 *iface, if (pal == NULL) { + IDirectDrawPalette_Release(pal_src); LeaveCriticalSection(&ddraw_cs); return DDERR_NOPALETTEATTACHED; }
1
0
0
0
Jacek Caban : urlmon: Fixed crash on old IE.
by Alexandre Julliard
21 Feb '08
21 Feb '08
Module: wine Branch: master Commit: 9de210a037af9325c3eeeefbb00cc6d7cde4d498 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9de210a037af9325c3eeeefbb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Feb 20 21:30:00 2008 +0100 urlmon: Fixed crash on old IE. --- dlls/urlmon/tests/url.c | 35 ++++++++++++++++++----------------- 1 files changed, 18 insertions(+), 17 deletions(-) diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c index e11855f..5c8505c 100644 --- a/dlls/urlmon/tests/url.c +++ b/dlls/urlmon/tests/url.c @@ -1819,26 +1819,27 @@ static void test_bscholder(IBindStatusCallback *holder) IHttpNegotiate_Release(http_negotiate_serv); hres = IBindStatusCallback_QueryInterface(holder, &IID_IHttpNegotiate2, (void**)&http_negotiate2); - ok(hres == S_OK, "Could not get IHttpNegotiate2 interface: %08x\n", hres); - - hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, (void*)0xdeadbeef, (void*)0xdeadbeef, 0); - ok(hres == E_FAIL, "GetRootSecurityId failed: %08x\n", hres); - - IHttpNegotiate_Release(http_negotiate2); + if(SUCCEEDED(hres)) { + hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, (void*)0xdeadbeef, (void*)0xdeadbeef, 0); + ok(hres == E_FAIL, "GetRootSecurityId failed: %08x\n", hres); - SET_EXPECT(QueryInterface_IHttpNegotiate2); - hres = IServiceProvider_QueryService(serv_prov, &IID_IHttpNegotiate2, &IID_IHttpNegotiate2, - (void**)&http_negotiate2_serv); - ok(hres == S_OK, "Could not get IHttpNegotiate2 service: %08x\n", hres); - CHECK_CALLED(QueryInterface_IHttpNegotiate2); - ok(http_negotiate2 == http_negotiate2_serv, "http_negotiate != http_negotiate_serv\n"); + SET_EXPECT(QueryInterface_IHttpNegotiate2); + hres = IServiceProvider_QueryService(serv_prov, &IID_IHttpNegotiate2, &IID_IHttpNegotiate2, + (void**)&http_negotiate2_serv); + ok(hres == S_OK, "Could not get IHttpNegotiate2 service: %08x\n", hres); + CHECK_CALLED(QueryInterface_IHttpNegotiate2); + ok(http_negotiate2 == http_negotiate2_serv, "http_negotiate != http_negotiate_serv\n"); - SET_EXPECT(GetRootSecurityId); - hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, (void*)0xdeadbeef, (void*)0xdeadbeef, 0); - ok(hres == E_NOTIMPL, "GetRootSecurityId failed: %08x\n", hres); - CHECK_CALLED(GetRootSecurityId); + SET_EXPECT(GetRootSecurityId); + hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, (void*)0xdeadbeef, (void*)0xdeadbeef, 0); + ok(hres == E_NOTIMPL, "GetRootSecurityId failed: %08x\n", hres); + CHECK_CALLED(GetRootSecurityId); - IHttpNegotiate_Release(http_negotiate2_serv); + IHttpNegotiate_Release(http_negotiate2_serv); + IHttpNegotiate_Release(http_negotiate2); + }else { + skip("Could not get IHttpNegotiate2\n"); + } SET_EXPECT(OnProgress_FINDINGRESOURCE); hres = IBindStatusCallback_OnProgress(holder, 0, 0, BINDSTATUS_FINDINGRESOURCE, NULL);
1
0
0
0
Jacek Caban : mshtml: Report true scheme for about:blank URL.
by Alexandre Julliard
21 Feb '08
21 Feb '08
Module: wine Branch: master Commit: 2f046e96235d5c8ae985f595a171932b2409a8ab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f046e96235d5c8ae985f595a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Feb 20 21:31:07 2008 +0100 mshtml: Report true scheme for about:blank URL. --- dlls/mshtml/nsio.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 89fe6ec..3517a27 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -48,6 +48,8 @@ static const IID NS_IOSERVICE_CID = static nsIIOService *nsio = NULL; +static const WCHAR about_blankW[] = {'a','b','o','u','t',':','b','l','a','n','k',0}; + typedef struct { const nsIWineURIVtbl *lpWineURIVtbl; @@ -593,7 +595,7 @@ static BOOL do_load_from_moniker_hack(nsChannel *This) const char *scheme; nsACString_GetData(&scheme_str, &scheme); - ret = !strcmp(scheme, "wine"); + ret = !strcmp(scheme, "wine") || !strcmp(scheme, "about"); } nsACString_Finish(&scheme_str); @@ -1264,7 +1266,7 @@ static nsresult NSAPI nsURI_GetScheme(nsIWineURI *iface, nsACString *aScheme) TRACE("(%p)->(%p)\n", This, aScheme); - if(This->use_wine_url) { + if(This->use_wine_url && strcmpW(This->wine_url, about_blankW)) { /* * For Gecko we set scheme to unknown so it won't be handled * as any special case.
1
0
0
0
Jacek Caban : mshtml: Added nsINetUtil interface to nsIOService.
by Alexandre Julliard
21 Feb '08
21 Feb '08
Module: wine Branch: master Commit: 7ea9c7d3e182928ef996c14e0878b8dfc90b9f54 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7ea9c7d3e182928ef996c14e0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Feb 20 21:30:51 2008 +0100 mshtml: Added nsINetUtil interface to nsIOService. --- dlls/mshtml/nsiface.idl | 12 +++++++ dlls/mshtml/nsio.c | 82 ++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 79 insertions(+), 15 deletions(-) diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index ad2ab23..2f60cda 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -1703,6 +1703,18 @@ interface nsIIOService : nsISupports [ object, + uuid(f0c5dddb-4713-4603-af2d-bf671838996b), + local, + /* NOT_FROZEN */ +] +interface nsINetUtil : nsISupports +{ + nsresult ParseContentType(const nsACString *aTypeHeader, nsACString *aCharset, + PRBool *aHadCharset, nsACString *aContentType); +} + +[ + object, uuid(9c5d3c58-1dd1-11b2-a1c9-f3699284657a), local /* FROZEN */ diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 2e62a44..89fe6ec 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -1926,21 +1926,7 @@ static nsIProtocolHandler *create_protocol_handler(nsIProtocolHandler *nshandler return NSPROTHANDLER(ret); } -static nsresult NSAPI nsIOService_QueryInterface(nsIIOService *iface, nsIIDRef riid, - nsQIResult result) -{ - *result = NULL; - - if(IsEqualGUID(&IID_nsISupports, riid) - || IsEqualGUID(&IID_nsIIOService, riid)) { - *result = iface; - nsIIOService_AddRef(iface); - return S_OK; - } - - WARN("(%s %p)\n", debugstr_guid(riid), result); - return NS_NOINTERFACE; -} +static nsresult NSAPI nsIOService_QueryInterface(nsIIOService*,nsIIDRef,nsQIResult); static nsrefcnt NSAPI nsIOService_AddRef(nsIIOService *iface) { @@ -2198,6 +2184,72 @@ static const nsIIOServiceVtbl nsIOServiceVtbl = { static nsIIOService nsIOService = { &nsIOServiceVtbl }; +static nsresult NSAPI nsNetUtil_QueryInterface(nsINetUtil *iface, nsIIDRef riid, + nsQIResult result) +{ + return nsIIOService_QueryInterface(&nsIOService, riid, result); +} + +static nsrefcnt NSAPI nsNetUtil_AddRef(nsINetUtil *iface) +{ + return 2; +} + +static nsrefcnt NSAPI nsNetUtil_Release(nsINetUtil *iface) +{ + return 1; +} + +static nsresult NSAPI nsNetUtil_ParseContentType(nsINetUtil *iface, const nsACString *aTypeHeader, + nsACString *aCharset, PRBool *aHadCharset, nsACString *aContentType) +{ + nsINetUtil *net_util; + nsresult nsres; + + TRACE("(%p %p %p %p)\n", aTypeHeader, aCharset, aHadCharset, aContentType); + + nsres = nsIIOService_QueryInterface(nsio, &IID_nsINetUtil, (void**)&net_util); + if(NS_FAILED(nsres)) { + WARN("Could not get nsINetUtil interface: %08x\n", nsres); + return nsres; + } + + nsres = nsINetUtil_ParseContentType(net_util, aTypeHeader, aCharset, aHadCharset, aContentType); + + nsINetUtil_Release(net_util); + return nsres; +} + +static const nsINetUtilVtbl nsNetUtilVtbl = { + nsNetUtil_QueryInterface, + nsNetUtil_AddRef, + nsNetUtil_Release, + nsNetUtil_ParseContentType +}; + +static nsINetUtil nsNetUtil = { &nsNetUtilVtbl }; + +static nsresult NSAPI nsIOService_QueryInterface(nsIIOService *iface, nsIIDRef riid, + nsQIResult result) +{ + *result = NULL; + + if(IsEqualGUID(&IID_nsISupports, riid)) + *result = &nsIOService; + else if(IsEqualGUID(&IID_nsIIOService, riid)) + *result = &nsIOService; + else if(IsEqualGUID(&IID_nsINetUtil, riid)) + *result = &nsNetUtil; + + if(*result) { + nsISupports_AddRef((nsISupports*)*result); + return NS_OK; + } + + FIXME("(%s %p)\n", debugstr_guid(riid), result); + return NS_NOINTERFACE; +} + static nsresult NSAPI nsIOServiceFactory_QueryInterface(nsIFactory *iface, nsIIDRef riid, nsQIResult result) {
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
100
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Results per page:
10
25
50
100
200