[PATCH 0/1] MR5781: include: Add more types to windows.networking.connectivity.idl.
From: Elizabeth Figura <zfigura(a)codeweavers.com> Based on a patch by Alistair Leslie-Hughes. --- dlls/windows.networking.hostname/classes.idl | 11 + dlls/windows.networking.hostname/private.h | 2 +- .../tests/hostname.c | 2 +- include/windows.foundation.idl | 5 + include/windows.networking.connectivity.idl | 409 +++++++++++++++++- include/windows.networking.idl | 7 + 6 files changed, 428 insertions(+), 8 deletions(-) diff --git a/dlls/windows.networking.hostname/classes.idl b/dlls/windows.networking.hostname/classes.idl index bf04d3e88bc..98a026877e9 100644 --- a/dlls/windows.networking.hostname/classes.idl +++ b/dlls/windows.networking.hostname/classes.idl @@ -20,4 +20,15 @@ #pragma makedep register +#ifdef __WIDL__ +#pragma winrt ns_prefix +#endif + +import "inspectable.idl"; +import "asyncinfo.idl"; +import "eventtoken.idl"; +import "windowscontracts.idl"; +import "windows.foundation.idl"; + +#define DO_NO_IMPORTS #include "windows.networking.idl" diff --git a/dlls/windows.networking.hostname/private.h b/dlls/windows.networking.hostname/private.h index a07690911c5..5c43a41433b 100644 --- a/dlls/windows.networking.hostname/private.h +++ b/dlls/windows.networking.hostname/private.h @@ -34,7 +34,7 @@ #include "windows.foundation.h" #define WIDL_using_Windows_Networking #define WIDL_using_Windows_Networking_Connectivity -#include "windows.networking.h" +#include "windows.networking.connectivity.h" extern IActivationFactory *hostname_factory; diff --git a/dlls/windows.networking.hostname/tests/hostname.c b/dlls/windows.networking.hostname/tests/hostname.c index e7ecc22cbc9..31a3e1651ca 100644 --- a/dlls/windows.networking.hostname/tests/hostname.c +++ b/dlls/windows.networking.hostname/tests/hostname.c @@ -29,7 +29,7 @@ #define WIDL_using_Windows_Foundation_Collections #include "windows.foundation.h" #define WIDL_using_Windows_Networking -#include "windows.networking.h" +#include "windows.networking.connectivity.h" #include "wine/test.h" diff --git a/include/windows.foundation.idl b/include/windows.foundation.idl index d4475adc807..6978d45fd02 100644 --- a/include/windows.foundation.idl +++ b/include/windows.foundation.idl @@ -91,9 +91,11 @@ namespace Windows.Foundation { interface Windows.Foundation.Collections.IIterator<IInspectable *>; interface Windows.Foundation.Collections.IIterator<IWwwFormUrlDecoderEntry *>; interface Windows.Foundation.Collections.IIterator<Uri *>; + interface Windows.Foundation.Collections.IVectorView<BYTE>; interface Windows.Foundation.Collections.IVectorView<HSTRING>; interface Windows.Foundation.Collections.IVectorView<IInspectable *>; interface Windows.Foundation.Collections.IVectorView<IWwwFormUrlDecoderEntry *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Foundation.Uri *>; interface Windows.Foundation.Collections.IVector<HSTRING>; interface Windows.Foundation.Collections.IVector<IInspectable *>; interface Windows.Foundation.Collections.IMapView<HSTRING, Windows.Foundation.Collections.IVectorView<HSTRING> *>; @@ -107,6 +109,9 @@ namespace Windows.Foundation { interface Windows.Foundation.IReference<BYTE>; interface Windows.Foundation.IReference<INT32>; interface Windows.Foundation.IReference<DOUBLE>; + interface Windows.Foundation.IReference<UINT32>; + interface Windows.Foundation.IReference<UINT64>; + interface Windows.Foundation.IReference<Windows.Foundation.DateTime>; interface Windows.Foundation.TypedEventHandler<IInspectable *, IInspectable *>; interface Windows.Foundation.TypedEventHandler<Windows.Foundation.IMemoryBufferReference *, IInspectable *>; } diff --git a/include/windows.networking.connectivity.idl b/include/windows.networking.connectivity.idl index 8c6489ba13b..451e67df096 100644 --- a/include/windows.networking.connectivity.idl +++ b/include/windows.networking.connectivity.idl @@ -1,4 +1,5 @@ /* + * Copyright (C) 2021 Alistair Leslie-Hughes * Copyright (C) 2023 Mohamad Al-Jaf * * This library is free software; you can redistribute it and/or @@ -25,20 +26,220 @@ import "asyncinfo.idl"; import "eventtoken.idl"; import "windowscontracts.idl"; import "windows.foundation.idl"; -/* import "windows.networking.idl"; */ +import "windows.networking.idl"; import "windows.storage.streams.idl"; -namespace Windows.Networking.Connectivity { - interface IIPInformation; - interface INetworkAdapter; +namespace Windows.Foundation +{ + interface IClosable; + runtimeclass Uri; +} + +namespace Windows.Networking +{ + typedef enum DomainNameType DomainNameType; + typedef enum HostNameSortOptions HostNameSortOptions; + + runtimeclass EndpointPair; + runtimeclass HostName; +} + +namespace Windows.Networking.Connectivity +{ + runtimeclass ConnectionCost; + runtimeclass ConnectionProfile; + runtimeclass DataPlanStatus; + runtimeclass DataPlanUsage; + runtimeclass DataUsage; runtimeclass IPInformation; + runtimeclass LanIdentifier; + runtimeclass LanIdentifierData; runtimeclass NetworkAdapter; + runtimeclass NetworkInformation; + runtimeclass NetworkItem; + runtimeclass NetworkSecuritySettings; + runtimeclass ProxyConfiguration; + + typedef enum NetworkAuthenticationType NetworkAuthenticationType; + typedef enum NetworkConnectivityLevel NetworkConnectivityLevel; + typedef enum NetworkCostType NetworkCostType; + typedef enum NetworkEncryptionType NetworkEncryptionType; + typedef enum NetworkTypes NetworkTypes; + typedef enum RoamingStates RoamingStates; + + declare + { + interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Networking.Connectivity.ConnectionProfile *>; + interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Networking.Connectivity.ProxyConfiguration *>; + interface Windows.Foundation.IAsyncOperation<Windows.Networking.Connectivity.ConnectionProfile *>; + interface Windows.Foundation.IAsyncOperation<Windows.Networking.Connectivity.ProxyConfiguration *>; + interface Windows.Foundation.Collections.IIterable<Windows.Networking.EndpointPair *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Networking.Connectivity.ConnectionProfile *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Networking.Connectivity.LanIdentifier *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Networking.HostName *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Networking.EndpointPair *>; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + ] + enum NetworkAuthenticationType + { + None = 0, + Unknown = 1, + Open80211 = 2, + SharedKey80211 = 3, + Wpa = 4, + WpaPsk = 5, + WpaNone = 6, + Rsna = 7, + RsnaPsk = 8, + Ihv = 9, + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + ] + enum NetworkConnectivityLevel + { + None = 0, + LocalAccess = 1, + ConstrainedInternetAccess = 2, + InternetAccess = 3, + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + ] + enum NetworkCostType + { + Unknown = 0, + Unrestricted = 1, + Fixed = 2, + Variable = 3, + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + ] + enum NetworkEncryptionType + { + None = 0, + Unknown = 1, + Wep = 2, + Wep40 = 3, + Wep104 = 4, + Tkip = 5, + Ccmp = 6, + WpaUseGroup = 7, + RsnUseGroup = 8, + Ihv = 9, + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + flags, + ] + enum NetworkTypes + { + None = 0x0, + Internet = 0x1, + PrivateNetwork = 0x2, + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + flags, + ] + enum RoamingStates + { + None = 0x0, + NotRoaming = 0x1, + Roaming = 0x2, + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(71ba143f-598e-49d0-84eb-8febaedcc195), + ] + delegate HRESULT NetworkStatusChangedEventHandler([in] IInspectable *sender); + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Networking.Connectivity.ConnectionCost), + uuid(bad7d829-3416-4b10-a202-bac0b075bdae), + ] + interface IConnectionCost : IInspectable + { + [propget] HRESULT NetworkCostType([out, retval] Windows.Networking.Connectivity.NetworkCostType *value); + [propget] HRESULT Roaming([out, retval] boolean *value); + [propget] HRESULT OverDataLimit([out, retval] boolean *value); + [propget] HRESULT ApproachingDataLimit([out, retval] boolean *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Networking.Connectivity.ConnectionProfile), + uuid(71ba143c-598e-49d0-84eb-8febaedcc195), + ] + interface IConnectionProfile : IInspectable + { + [propget] HRESULT ProfileName([out, retval] HSTRING *value); + HRESULT GetNetworkConnectivityLevel([out, retval] Windows.Networking.Connectivity.NetworkConnectivityLevel *value); + HRESULT GetNetworkNames([out, retval] Windows.Foundation.Collections.IVectorView<HSTRING> **value); + HRESULT GetConnectionCost([out, retval] Windows.Networking.Connectivity.ConnectionCost **value); + HRESULT GetDataPlanStatus([out, retval] Windows.Networking.Connectivity.DataPlanStatus **value); + [propget] HRESULT NetworkAdapter([out, retval] Windows.Networking.Connectivity.NetworkAdapter **value); + HRESULT GetLocalUsage([in] Windows.Foundation.DateTime start, [in] Windows.Foundation.DateTime end, + [out, retval] Windows.Networking.Connectivity.DataUsage **value); + HRESULT GetLocalUsagePerRoamingStates([in] Windows.Foundation.DateTime start, + [in] Windows.Foundation.DateTime end, [in] Windows.Networking.Connectivity.RoamingStates states, + [out, retval] Windows.Networking.Connectivity.DataUsage **value); + [propget] HRESULT NetworkSecuritySettings([out, retval] Windows.Networking.Connectivity.NetworkSecuritySettings **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Networking.Connectivity.DataPlanStatus), + uuid(977a8b8c-3885-40f3-8851-42cd2bd568bb), + ] + interface IDataPlanStatus : IInspectable + { + [propget] HRESULT DataPlanUsage([out, retval] Windows.Networking.Connectivity.DataPlanUsage **value); + [propget] HRESULT DataLimitInMegabytes([out, retval] Windows.Foundation.IReference<UINT32> **value); + [propget] HRESULT InboundBitsPerSecond([out, retval] Windows.Foundation.IReference<UINT64> **value); + [propget] HRESULT OutboundBitsPerSecond([out, retval] Windows.Foundation.IReference<UINT64> **value); + [propget] HRESULT NextBillingCycle([out, retval] Windows.Foundation.IReference<Windows.Foundation.DateTime> **value); + [propget] HRESULT MaxTransferSizeInMegabytes([out, retval] Windows.Foundation.IReference<UINT32> **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Networking.Connectivity.DataPlanUsage), + uuid(b921492d-3b44-47ff-b361-be59e69ed1b0), + ] + interface IDataPlanUsage : IInspectable + { + [propget] HRESULT MegabytesUsed([out, retval] UINT32 *value); + [propget] HRESULT LastSyncTime([out, retval] Windows.Foundation.DateTime *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Networking.Connectivity.DataUsage), + uuid(c1431dd3-b146-4d39-b959-0c69b096c512), + ] + interface IDataUsage : IInspectable + { + [propget] HRESULT BytesSent([out, retval] UINT64 *value); + [propget] HRESULT BytesReceived([out, retval] UINT64 *value); + } [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.Networking.Connectivity.IPInformation), - uuid(d85145e0-138f-47d7-9b3a-36bb488cef33) + uuid(d85145e0-138f-47d7-9b3a-36bb488cef33), ] interface IIPInformation : IInspectable { @@ -48,13 +249,173 @@ namespace Windows.Networking.Connectivity { [ contract(Windows.Foundation.UniversalApiContract, 1.0), - marshaling_behavior(agile) + exclusiveto(Windows.Networking.Connectivity.LanIdentifier), + uuid(48aa53aa-1108-4546-a6cb-9a74da4b7ba0), + ] + interface ILanIdentifier : IInspectable + { + [propget] HRESULT InfrastructureId([out, retval] Windows.Networking.Connectivity.LanIdentifierData **value); + [propget] HRESULT PortId([out, retval] Windows.Networking.Connectivity.LanIdentifierData **value); + [propget] HRESULT NetworkAdapterId([out, retval] GUID *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Networking.Connectivity.LanIdentifierData), + uuid(a74e83c3-d639-45be-a36a-c4e4aeaf6d9b), + ] + interface ILanIdentifierData : IInspectable + { + [propget] HRESULT Type([out, retval] UINT32 *value); + [propget] HRESULT Value([out,retval] Windows.Foundation.Collections.IVectorView<BYTE> **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Networking.Connectivity.NetworkAdapter), + uuid(3b542e03-5388-496c-a8a3-affd39aec2e6), + ] + interface INetworkAdapter : IInspectable + { + [propget] HRESULT OutboundMaxBitsPerSecond([out, retval] UINT64 *value); + [propget] HRESULT InboundMaxBitsPerSecond([out, retval] UINT64 *value); + [propget] HRESULT IanaInterfaceType([out, retval] UINT32 *value); + [propget] HRESULT NetworkItem([out, retval] Windows.Networking.Connectivity.NetworkItem **value); + [propget] HRESULT NetworkAdapterId([out, retval] GUID *value); + HRESULT GetConnectedProfileAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Networking.Connectivity.ConnectionProfile *> **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Networking.Connectivity.NetworkInformation), + uuid(5074f851-950d-4165-9c15-365619481eea), + ] + interface INetworkInformationStatics : IInspectable + { + HRESULT GetConnectionProfiles([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Networking.Connectivity.ConnectionProfile *> **value); + HRESULT GetInternetConnectionProfile([out, retval] Windows.Networking.Connectivity.ConnectionProfile **value); + HRESULT GetLanIdentifiers([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Networking.Connectivity.LanIdentifier *> **value); + HRESULT GetHostNames([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Networking.HostName *> **value); + HRESULT GetProxyConfigurationAsync([in] Windows.Foundation.Uri *uri, + [out, retval] Windows.Foundation.IAsyncOperation<Windows.Networking.Connectivity.ProxyConfiguration *> **value); + HRESULT GetSortedEndpointPairs([in] Windows.Foundation.Collections.IIterable<Windows.Networking.EndpointPair *> *endpoint, + [in] Windows.Networking.HostNameSortOptions options, + [out, retval] Windows.Foundation.Collections.IVectorView<Windows.Networking.EndpointPair *> **value); + [eventadd] HRESULT NetworkStatusChanged([in] Windows.Networking.Connectivity.NetworkStatusChangedEventHandler *handler, + [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT NetworkStatusChanged([in] EventRegistrationToken cookie); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Networking.Connectivity.NetworkInformation), + uuid(01bc4d39-f5e0-4567-a28c-42080c831b2b), + ] + interface INetworkItem : IInspectable + { + [propget] HRESULT NetworkId([out, retval] GUID *value); + HRESULT GetNetworkTypes([out, retval] NetworkTypes *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Networking.Connectivity.NetworkSecuritySettings), + uuid(7ca07e8d-917b-4b5f-b84d-28f7a5ac5402), + ] + interface INetworkSecuritySettings : IInspectable + { + [propget] HRESULT NetworkAuthenticationType([out, retval] Windows.Networking.Connectivity.NetworkAuthenticationType *value); + [propget] HRESULT NetworkEncryptionType([out, retval] Windows.Networking.Connectivity.NetworkEncryptionType *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Networking.Connectivity.NetworkSecuritySettings), + uuid(ef3a60b4-9004-4dd6-b7d8-b3e502f4aad0), + ] + interface IProxyConfiguration : IInspectable + { + [propget] HRESULT ProxyUris([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Foundation.Uri *> **value); + [propget] HRESULT CanConnectDirectly([out, retval] boolean *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + ] + runtimeclass ConnectionCost + { + [default] interface Windows.Networking.Connectivity.IConnectionCost; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Networking.Connectivity.IConnectionCost2; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + ] + runtimeclass ConnectionProfile + { + [default] interface Windows.Networking.Connectivity.IConnectionProfile; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Networking.Connectivity.IConnectionProfile2; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Networking.Connectivity.IConnectionProfile3; + [contract(Windows.Foundation.UniversalApiContract, 5.0)] interface Windows.Networking.Connectivity.IConnectionProfile4; + [contract(Windows.Foundation.UniversalApiContract, 7.0)] interface Windows.Networking.Connectivity.IConnectionProfile5; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + ] + runtimeclass DataPlanStatus + { + [default] interface Windows.Networking.Connectivity.IDataPlanStatus; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + ] + runtimeclass DataPlanUsage + { + [default] interface Windows.Networking.Connectivity.IDataPlanUsage; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + ] + runtimeclass DataUsage + { + [default] interface Windows.Networking.Connectivity.IDataUsage; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), ] runtimeclass IPInformation { [default] interface Windows.Networking.Connectivity.IIPInformation; } + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + ] + runtimeclass LanIdentifier + { + [default] interface Windows.Networking.Connectivity.ILanIdentifier; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + ] + runtimeclass LanIdentifierData + { + [default] interface Windows.Networking.Connectivity.ILanIdentifierData; + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile), @@ -63,4 +424,40 @@ namespace Windows.Networking.Connectivity { { [default] interface Windows.Networking.Connectivity.INetworkAdapter; } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + static(Windows.Networking.Connectivity.INetworkInformationStatics, Windows.Foundation.UniversalApiContract, 1.0), + ] + runtimeclass NetworkInformation + { + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + ] + runtimeclass NetworkItem + { + [default] interface Windows.Networking.Connectivity.INetworkItem; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + ] + runtimeclass NetworkSecuritySettings + { + [default] interface Windows.Networking.Connectivity.INetworkSecuritySettings; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + ] + runtimeclass ProxyConfiguration + { + [default] interface Windows.Networking.Connectivity.IProxyConfiguration; + } } diff --git a/include/windows.networking.idl b/include/windows.networking.idl index e864a3bb1ad..28e0f983154 100644 --- a/include/windows.networking.idl +++ b/include/windows.networking.idl @@ -20,12 +20,19 @@ #pragma winrt ns_prefix #endif +#ifndef DO_NO_IMPORTS import "inspectable.idl"; import "asyncinfo.idl"; import "eventtoken.idl"; import "windowscontracts.idl"; import "windows.foundation.idl"; import "windows.networking.connectivity.idl"; +#endif + +namespace Windows.Networking.Connectivity +{ + runtimeclass IPInformation; +} namespace Windows.Networking { typedef enum DomainNameType DomainNameType; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5781
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=146030 Your paranoid android. === build (build log) === ../wine/include/windows.storage.streams.idl:179:33: error: syntax error, unexpected aKNOWNTYPE, expecting '{' ../wine/include/windows.storage.streams.idl:611:33: error: syntax error, unexpected aKNOWNTYPE, expecting '{' Task: The exe32 Wine build failed === debian11 (build log) === ../wine/include/windows.storage.streams.idl:611:33: error: syntax error, unexpected aKNOWNTYPE, expecting '{' ../wine/include/windows.storage.streams.idl:179:33: error: syntax error, unexpected aKNOWNTYPE, expecting '{' Task: The win32 Wine build failed === debian11b (build log) === ../wine/include/windows.storage.streams.idl:179:33: error: syntax error, unexpected aKNOWNTYPE, expecting '{' ../wine/include/windows.storage.streams.idl:611:33: error: syntax error, unexpected aKNOWNTYPE, expecting '{' Task: The wow64 Wine build failed
participants (3)
-
Elizabeth Figura -
Elizabeth Figura (@zfigura) -
Marvin