Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add com type "Windows.Win32.System.WinRT.IWebAuthenticationCoreManagerInterop" #702

Merged
merged 1 commit into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions lib/src/com/iwebauthenticationcoremanagerinterop.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
// iwebauthenticationcoremanagerinterop.dart

// THIS FILE IS GENERATED AUTOMATICALLY AND SHOULD NOT BE EDITED DIRECTLY.

// ignore_for_file: unused_import
// ignore_for_file: constant_identifier_names, non_constant_identifier_names
// ignore_for_file: no_leading_underscores_for_local_identifiers

import 'dart:ffi';

import 'package:ffi/ffi.dart';

import '../callbacks.dart';
import '../combase.dart';
import '../constants.dart';
import '../exceptions.dart';
import '../guid.dart';
import '../macros.dart';
import '../structs.g.dart';
import '../utils.dart';
import '../variant.dart';
import '../win32/ole32.g.dart';
import 'iinspectable.dart';
import 'iunknown.dart';

/// @nodoc
const IID_IWebAuthenticationCoreManagerInterop =
'{f4b8e804-811e-4436-b69c-44cb67b72084}';

/// Provides Win32 apps with access to certain functions of
/// WebAuthenticationCoreManager that are otherwise available only to UWP
/// apps.
///
/// {@category Interface}
/// {@category com}
class IWebAuthenticationCoreManagerInterop extends IInspectable {
// vtable begins at 6, is 2 entries long.
IWebAuthenticationCoreManagerInterop(super.ptr);

factory IWebAuthenticationCoreManagerInterop.from(IUnknown interface) =>
IWebAuthenticationCoreManagerInterop(
interface.toInterface(IID_IWebAuthenticationCoreManagerInterop));

int requestTokenForWindowAsync(int appWindow, Pointer<COMObject> request,
Pointer<GUID> riid, Pointer<Pointer> asyncInfo) =>
ptr.ref.vtable
.elementAt(6)
.cast<
Pointer<
NativeFunction<
Int32 Function(
Pointer,
IntPtr appWindow,
Pointer<COMObject> request,
Pointer<GUID> riid,
Pointer<Pointer> asyncInfo)>>>()
.value
.asFunction<
int Function(
Pointer,
int appWindow,
Pointer<COMObject> request,
Pointer<GUID> riid,
Pointer<Pointer> asyncInfo)>()(
ptr.ref.lpVtbl, appWindow, request, riid, asyncInfo);

int requestTokenWithWebAccountForWindowAsync(
int appWindow,
Pointer<COMObject> request,
Pointer<COMObject> webAccount,
Pointer<GUID> riid,
Pointer<Pointer> asyncInfo) =>
ptr.ref.vtable
.elementAt(7)
.cast<
Pointer<
NativeFunction<
Int32 Function(
Pointer,
IntPtr appWindow,
Pointer<COMObject> request,
Pointer<COMObject> webAccount,
Pointer<GUID> riid,
Pointer<Pointer> asyncInfo)>>>()
.value
.asFunction<
int Function(
Pointer,
int appWindow,
Pointer<COMObject> request,
Pointer<COMObject> webAccount,
Pointer<GUID> riid,
Pointer<Pointer> asyncInfo)>()(
ptr.ref.lpVtbl, appWindow, request, webAccount, riid, asyncInfo);
}
1 change: 1 addition & 0 deletions lib/win32.dart
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,4 @@ export 'src/com/iwbemlocator.dart';
export 'src/com/iwbemobjectaccess.dart';
export 'src/com/iwbemrefresher.dart';
export 'src/com/iwbemservices.dart';
export 'src/com/iwebauthenticationcoremanagerinterop.dart';
40 changes: 40 additions & 0 deletions test/com/iwebauthenticationcoremanagerinterop_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright (c) 2020, Dart | Windows. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// Tests that Win32 API prototypes can be successfully loaded (i.e. that
// lookupFunction works for all the APIs generated)

// THIS FILE IS GENERATED AUTOMATICALLY AND SHOULD NOT BE EDITED DIRECTLY.

// ignore_for_file: unused_local_variable

@TestOn('windows')

import 'dart:ffi';

import 'package:ffi/ffi.dart';
import 'package:test/test.dart';

import 'package:win32/win32.dart';

void main() {
final ptr = calloc<COMObject>();

final webauthenticationcoremanagerinterop =
IWebAuthenticationCoreManagerInterop(ptr);
test(
'Can instantiate IWebAuthenticationCoreManagerInterop.requestTokenForWindowAsync',
() {
expect(webauthenticationcoremanagerinterop.requestTokenForWindowAsync,
isA<Function>());
});
test(
'Can instantiate IWebAuthenticationCoreManagerInterop.requestTokenWithWebAccountForWindowAsync',
() {
expect(
webauthenticationcoremanagerinterop
.requestTokenWithWebAccountForWindowAsync,
isA<Function>());
});
}
1 change: 1 addition & 0 deletions tool/win32gen/data/com_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"Windows.Win32.System.Ole.IEnumVARIANT": "Provides a method for enumerating a collection of variants, including heterogeneous collections of objects and intrinsic types. Callers of this interface do not need to know the specific type (or types) of the elements in the collection.",
"Windows.Win32.System.Ole.IProvideClassInfo": "Provides access to the type information for an object's coclass entry in its type library.",
"Windows.Win32.System.WinRT.IInspectable": "Provides functionality required for all Windows Runtime classes.",
"Windows.Win32.System.WinRT.IWebAuthenticationCoreManagerInterop": "Provides Win32 apps with access to certain functions of WebAuthenticationCoreManager that are otherwise available only to UWP apps.",
"Windows.Win32.System.WinRT.Metadata.IMetaDataAssemblyImport": "Provides methods to access and examine the contents of an assembly manifest.",
"Windows.Win32.System.WinRT.Metadata.IMetaDataDispenser": "Provides methods to create a new metadata scope, or open an existing one.",
"Windows.Win32.System.WinRT.Metadata.IMetaDataDispenserEx": "Extends the IMetaDataDispenser Interface interface to provide the capability to control how the metadata APIs operate on the current metadata scope.",
Expand Down