From: Aida Jonikienė aidas957@gmail.com
--- include/Makefile.in | 1 + .../windows.system.diagnostics.telemetry.idl | 115 ++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 include/windows.system.diagnostics.telemetry.idl
diff --git a/include/Makefile.in b/include/Makefile.in index 97b4d0e90f6..826c323205a 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -863,6 +863,7 @@ SOURCES = \ windows.storage.idl \ windows.storage.search.idl \ windows.storage.streams.idl \ + windows.system.diagnostics.telemetry.idl \ windows.system.idl \ windows.system.power.idl \ windows.system.profile.idl \ diff --git a/include/windows.system.diagnostics.telemetry.idl b/include/windows.system.diagnostics.telemetry.idl new file mode 100644 index 00000000000..c1fa8da2442 --- /dev/null +++ b/include/windows.system.diagnostics.telemetry.idl @@ -0,0 +1,115 @@ +/* + * Copyright 2023 Aida Jonikienė + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifdef __WIDL__ +#pragma winrt ns_prefix +#endif + +import "inspectable.idl"; +import "asyncinfo.idl"; +import "eventtoken.idl"; +import "windowscontracts.idl"; +import "windows.foundation.idl"; + +namespace Windows.System.Diagnostics.Telemetry { + typedef enum PlatformTelemetryRegistrationStatus PlatformTelemetryRegistrationStatus; + + interface IPlatformTelemetryClientStatics; + interface IPlatformTelemetryRegistrationResult; + interface IPlatformTelemetryRegistrationSettings; + + runtimeclass PlatformTelemetryClient; + runtimeclass PlatformTelemetryRegistrationResult; + runtimeclass PlatformTelemetryRegistrationSettings; + + [ + contract(Windows.Foundation.UniversalApiContract, 4.0) + ] + enum PlatformTelemetryRegistrationStatus + { + Success = 0, + SettingsOutOfRange = 1, + UnknownFailure = 2 + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + exclusiveto(Windows.System.Diagnostics.Telemetry.PlatformTelemetryClient), + uuid(9bf3f25d-d5c3-4eea-8dbe-9c8dbb0d9d8f) + ] + interface IPlatformTelemetryClientStatics : IInspectable + { + [overload("Register")] HRESULT Register([in] HSTRING id, [out, retval] Windows.System.Diagnostics.Telemetry.PlatformTelemetryRegistrationResult **result); + [overload("Register")] HRESULT RegisterWithSettings([in] HSTRING id, [in] Windows.System.Diagnostics.Telemetry.PlatformTelemetryRegistrationSettings *settings, + [out, retval] Windows.System.Diagnostics.Telemetry.PlatformTelemetryRegistrationResult **result); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + exclusiveto(Windows.System.Diagnostics.Telemetry.PlatformTelemetryRegistrationResult), + uuid(4d8518ab-2292-49bd-a15a-3d71d2145112) + ] + interface IPlatformTelemetryRegistrationResult : IInspectable + { + [propget] HRESULT Status([out, retval] Windows.System.Diagnostics.Telemetry.PlatformTelemetryRegistrationStatus *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + exclusiveto(Windows.System.Diagnostics.Telemetry.PlatformTelemetryRegistrationSettings), + uuid(819a8582-ca19-415e-bb79-9c224bfa3a73) + ] + interface IPlatformTelemetryRegistrationSettings : IInspectable + { + [propget] HRESULT StorageSize([out, retval] UINT32 *value); + [propput] HRESULT StorageSize([in] UINT32 value); + [propget] HRESULT UploadQuotaSize([out, retval] UINT32 *value); + [propput] HRESULT UploadQuotaSize([in] UINT32 value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + marshaling_behavior(agile), + static(Windows.System.Diagnostics.Telemetry.IPlatformTelemetryClientStatics, Windows.Foundation.UniversalApiContract, 4.0), + threading(both) + ] + runtimeclass PlatformTelemetryClient + { + } + + [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass PlatformTelemetryRegistrationResult + { + [default] interface Windows.System.Diagnostics.Telemetry.IPlatformTelemetryRegistrationResult; + } + + [ + activatable(Windows.Foundation.UniversalApiContract, 4.0), + contract(Windows.Foundation.UniversalApiContract, 4.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass PlatformTelemetryRegistrationSettings + { + [default] interface Windows.System.Diagnostics.Telemetry.IPlatformTelemetryRegistrationSettings; + } +}