windows.security.credentials.ui.userconsentverifier: Implement IUserConsentVerifierSt...
[wine.git] / dlls / windows.security.credentials.ui.userconsentverifier / private.h
blob5edeb2997926b87d0d8445f713ee8b990f2867ed
1 /* WinRT Windows.Security.Credentials.UI Implementation
3 * Copyright (C) 2023 Mohamad Al-Jaf
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #ifndef __WINE_WINDOWS_SECURITY_CREDENTIALS_UI_PRIVATE_H
21 #define __WINE_WINDOWS_SECURITY_CREDENTIALS_UI_PRIVATE_H
23 #include <stdarg.h>
25 #define COBJMACROS
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winstring.h"
30 #include "activation.h"
32 #define WIDL_using_Windows_Foundation
33 #define WIDL_using_Windows_Foundation_Collections
34 #include "windows.foundation.h"
35 #define WIDL_using_Windows_Security_Credentials_UI
36 #include "windows.security.credentials.ui.h"
38 #include "provider.h"
40 typedef HRESULT (WINAPI *async_operation_callback)( IUnknown *invoker, IUnknown *param, PROPVARIANT *result );
41 extern HRESULT async_operation_user_consent_verifier_availability_create( IUnknown *invoker, IUnknown *param, async_operation_callback callback,
42 IAsyncOperation_UserConsentVerifierAvailability **out );
44 #define DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from, iface_mem, expr ) \
45 static inline impl_type *impl_from( iface_type *iface ) \
46 { \
47 return CONTAINING_RECORD( iface, impl_type, iface_mem ); \
48 } \
49 static HRESULT WINAPI pfx##_QueryInterface( iface_type *iface, REFIID iid, void **out ) \
50 { \
51 impl_type *impl = impl_from( iface ); \
52 return IInspectable_QueryInterface( (IInspectable *)(expr), iid, out ); \
53 } \
54 static ULONG WINAPI pfx##_AddRef( iface_type *iface ) \
55 { \
56 impl_type *impl = impl_from( iface ); \
57 return IInspectable_AddRef( (IInspectable *)(expr) ); \
58 } \
59 static ULONG WINAPI pfx##_Release( iface_type *iface ) \
60 { \
61 impl_type *impl = impl_from( iface ); \
62 return IInspectable_Release( (IInspectable *)(expr) ); \
63 } \
64 static HRESULT WINAPI pfx##_GetIids( iface_type *iface, ULONG *iid_count, IID **iids ) \
65 { \
66 impl_type *impl = impl_from( iface ); \
67 return IInspectable_GetIids( (IInspectable *)(expr), iid_count, iids ); \
68 } \
69 static HRESULT WINAPI pfx##_GetRuntimeClassName( iface_type *iface, HSTRING *class_name ) \
70 { \
71 impl_type *impl = impl_from( iface ); \
72 return IInspectable_GetRuntimeClassName( (IInspectable *)(expr), class_name ); \
73 } \
74 static HRESULT WINAPI pfx##_GetTrustLevel( iface_type *iface, TrustLevel *trust_level ) \
75 { \
76 impl_type *impl = impl_from( iface ); \
77 return IInspectable_GetTrustLevel( (IInspectable *)(expr), trust_level ); \
79 #define DEFINE_IINSPECTABLE( pfx, iface_type, impl_type, base_iface ) \
80 DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from_##iface_type, iface_type##_iface, &impl->base_iface )
81 #define DEFINE_IINSPECTABLE_OUTER( pfx, iface_type, impl_type, outer_iface ) \
82 DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from_##iface_type, iface_type##_iface, impl->outer_iface )
84 #endif