Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a3ef7d74
Commit
a3ef7d74
authored
Dec 18, 2022
by
Mohamad Al-Jaf
Committed by
Alexandre Julliard
Feb 13, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.security.authentication.onlineid: Add IOnlineIdSystemAuthenticatorStatics stub interface.
parent
98091028
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
181 additions
and
0 deletions
+181
-0
authenticator.c
.../windows.security.authentication.onlineid/authenticator.c
+39
-0
private.h
dlls/windows.security.authentication.onlineid/private.h
+40
-0
onlineid.c
...windows.security.authentication.onlineid/tests/onlineid.c
+6
-0
windows.security.authentication.onlineid.idl
include/windows.security.authentication.onlineid.idl
+96
-0
No files found.
dlls/windows.security.authentication.onlineid/authenticator.c
View file @
a3ef7d74
...
...
@@ -25,6 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(onlineid);
struct
authenticator_statics
{
IActivationFactory
IActivationFactory_iface
;
IOnlineIdSystemAuthenticatorStatics
IOnlineIdSystemAuthenticatorStatics_iface
;
LONG
ref
;
};
...
...
@@ -49,6 +50,13 @@ static HRESULT WINAPI factory_QueryInterface( IActivationFactory *iface, REFIID
return
S_OK
;
}
if
(
IsEqualGUID
(
iid
,
&
IID_IOnlineIdSystemAuthenticatorStatics
))
{
*
out
=
&
impl
->
IOnlineIdSystemAuthenticatorStatics_iface
;
IInspectable_AddRef
(
*
out
);
return
S_OK
;
}
FIXME
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
iid
)
);
*
out
=
NULL
;
return
E_NOINTERFACE
;
...
...
@@ -107,9 +115,40 @@ static const struct IActivationFactoryVtbl factory_vtbl =
factory_ActivateInstance
,
};
DEFINE_IINSPECTABLE
(
authenticator_statics
,
IOnlineIdSystemAuthenticatorStatics
,
struct
authenticator_statics
,
IActivationFactory_iface
)
static
HRESULT
WINAPI
authenticator_statics_get_Default
(
IOnlineIdSystemAuthenticatorStatics
*
iface
,
IOnlineIdSystemAuthenticatorForUser
**
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
authenticator_statics_GetForUser
(
IOnlineIdSystemAuthenticatorStatics
*
iface
,
__x_ABI_CWindows_CSystem_CIUser
*
user
,
IOnlineIdSystemAuthenticatorForUser
**
value
)
{
FIXME
(
"iface %p, user %p, value %p stub!
\n
"
,
iface
,
user
,
value
);
return
E_NOTIMPL
;
}
static
const
struct
IOnlineIdSystemAuthenticatorStaticsVtbl
authenticator_statics_vtbl
=
{
authenticator_statics_QueryInterface
,
authenticator_statics_AddRef
,
authenticator_statics_Release
,
/* IInspectable methods */
authenticator_statics_GetIids
,
authenticator_statics_GetRuntimeClassName
,
authenticator_statics_GetTrustLevel
,
/* IOnlineIdSystemAuthenticatorStatics methods */
authenticator_statics_get_Default
,
authenticator_statics_GetForUser
,
};
static
struct
authenticator_statics
authenticator_statics
=
{
{
&
factory_vtbl
},
{
&
authenticator_statics_vtbl
},
1
,
};
...
...
dlls/windows.security.authentication.onlineid/private.h
View file @
a3ef7d74
...
...
@@ -32,9 +32,49 @@
#define WIDL_using_Windows_Foundation
#define WIDL_using_Windows_Foundation_Collections
#include "windows.foundation.h"
#define WIDL_using_Windows_System
#include "windows.system.h"
#define WIDL_using_Windows_Security_Authentication_OnlineId
#include "windows.security.authentication.onlineid.h"
extern
IActivationFactory
*
authenticator_factory
;
#define DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from, iface_mem, expr ) \
static inline impl_type *impl_from( iface_type *iface ) \
{ \
return CONTAINING_RECORD( iface, impl_type, iface_mem ); \
} \
static HRESULT WINAPI pfx##_QueryInterface( iface_type *iface, REFIID iid, void **out ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_QueryInterface( (IInspectable *)(expr), iid, out ); \
} \
static ULONG WINAPI pfx##_AddRef( iface_type *iface ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_AddRef( (IInspectable *)(expr) ); \
} \
static ULONG WINAPI pfx##_Release( iface_type *iface ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_Release( (IInspectable *)(expr) ); \
} \
static HRESULT WINAPI pfx##_GetIids( iface_type *iface, ULONG *iid_count, IID **iids ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_GetIids( (IInspectable *)(expr), iid_count, iids ); \
} \
static HRESULT WINAPI pfx##_GetRuntimeClassName( iface_type *iface, HSTRING *class_name ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_GetRuntimeClassName( (IInspectable *)(expr), class_name ); \
} \
static HRESULT WINAPI pfx##_GetTrustLevel( iface_type *iface, TrustLevel *trust_level ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_GetTrustLevel( (IInspectable *)(expr), trust_level ); \
}
#define DEFINE_IINSPECTABLE( pfx, iface_type, impl_type, base_iface ) \
DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from_##iface_type, iface_type##_iface, &impl->base_iface )
#endif
dlls/windows.security.authentication.onlineid/tests/onlineid.c
View file @
a3ef7d74
...
...
@@ -48,6 +48,7 @@ static void check_interface_( unsigned int line, void *obj, const IID *iid )
static
void
test_AuthenticatorStatics
(
void
)
{
static
const
WCHAR
*
authenticator_statics_name
=
L"Windows.Security.Authentication.OnlineId.OnlineIdSystemAuthenticator"
;
IOnlineIdSystemAuthenticatorStatics
*
authenticator_statics
=
(
void
*
)
0xdeadbeef
;
IActivationFactory
*
factory
=
(
void
*
)
0xdeadbeef
;
HSTRING
str
;
HRESULT
hr
;
...
...
@@ -69,6 +70,11 @@ static void test_AuthenticatorStatics(void)
check_interface
(
factory
,
&
IID_IInspectable
);
check_interface
(
factory
,
&
IID_IAgileObject
);
hr
=
IActivationFactory_QueryInterface
(
factory
,
&
IID_IOnlineIdSystemAuthenticatorStatics
,
(
void
**
)
&
authenticator_statics
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
ref
=
IOnlineIdSystemAuthenticatorStatics_Release
(
authenticator_statics
);
ok
(
ref
==
2
,
"got ref %ld.
\n
"
,
ref
);
ref
=
IActivationFactory_Release
(
factory
);
ok
(
ref
==
1
,
"got ref %ld.
\n
"
,
ref
);
}
...
...
include/windows.security.authentication.onlineid.idl
View file @
a3ef7d74
...
...
@@ -28,11 +28,64 @@ import "windows.foundation.idl";
import
"windows.system.idl"
;
namespace
Windows
.
Security.Authentication.OnlineId
{
typedef
enum
OnlineIdSystemTicketStatus
OnlineIdSystemTicketStatus
;
interface
IOnlineIdServiceTicketRequest
;
interface
IOnlineIdServiceTicketRequestFactory
;
interface
IOnlineIdSystemAuthenticatorForUser
;
interface
IOnlineIdSystemAuthenticatorStatics
;
interface
IOnlineIdSystemIdentity
;
interface
IOnlineIdSystemTicketResult
;
runtimeclass
OnlineIdServiceTicketRequest
;
runtimeclass
OnlineIdSystemAuthenticator
;
runtimeclass
OnlineIdSystemAuthenticatorForUser
;
runtimeclass
OnlineIdSystemIdentity
;
runtimeclass
OnlineIdSystemTicketResult
;
declare
{
interface
Windows
.
Foundation.Collections.IIterable<Windows.Security.Authentication.OnlineId.OnlineIdServiceTicketRequest
*
>
;
interface
Windows
.
Foundation.Collections.IIterator<Windows.Security.Authentication.OnlineId.OnlineIdServiceTicketRequest
*
>
;
interface
Windows
.
Foundation.AsyncOperationCompletedHandler<Windows.Security.Authentication.OnlineId.OnlineIdSystemTicketResult
*
>
;
interface
Windows
.
Foundation.IAsyncOperation<Windows.Security.Authentication.OnlineId.OnlineIdSystemTicketResult
*
>
;
}
[
contract
(
Windows
.
Foundation.UniversalApiContract
,
4.0
)
]
enum
OnlineIdSystemTicketStatus
{
Success
=
0
,
Error
=
1
,
ServiceConnectionError
=
2
,
}
;
[
contract
(
Windows
.
Foundation.UniversalApiContract
,
1.0
),
exclusiveto
(
Windows
.
Security.Authentication.OnlineId.OnlineIdServiceTicketRequest)
,
uuid
(
297445
d3
-
fb63
-
4135
-
8909
-
4
e354c061466
)
]
interface
IOnlineIdServiceTicketRequest
:
IInspectable
{
[
propget
]
HRESULT
Service
(
[
out
,
retval
]
HSTRING
*
value
)
;
[
propget
]
HRESULT
Policy
(
[
out
,
retval
]
HSTRING
*
value
)
;
}
[
contract
(
Windows
.
Foundation.UniversalApiContract
,
4.0
),
exclusiveto
(
Windows
.
Security.Authentication.OnlineId.OnlineIdSystemAuthenticatorForUser)
,
uuid
(
5798b
efb
-
1
de4
-
4186
-
a2e6
-
b563f86aaf44
)
]
interface
IOnlineIdSystemAuthenticatorForUser
:
IInspectable
{
[
overload
(
"GetTicketAsync"
)
]
HRESULT
GetTicketAsync
(
[
in
]
Windows
.
Security.Authentication.OnlineId.OnlineIdServiceTicketRequest
*
request
,
[
out
,
retval
]
Windows
.
Foundation.IAsyncOperation<Windows.Security.Authentication.OnlineId.OnlineIdSystemTicketResult
*
>
**
operation
)
;
[
propput
]
HRESULT
ApplicationId
(
[
in
]
GUID
value
)
;
[
propget
]
HRESULT
ApplicationId
(
[
out
,
retval
]
GUID
*
value
)
;
[
propget
]
HRESULT
User
(
[
out
,
retval
]
Windows
.
System.User
**
user
)
;
}
[
contract
(
Windows
.
Foundation.UniversalApiContract
,
4.0
),
...
...
@@ -47,6 +100,29 @@ namespace Windows.Security.Authentication.OnlineId {
[
contract
(
Windows
.
Foundation.UniversalApiContract
,
4.0
),
exclusiveto
(
Windows
.
Security.Authentication.OnlineId.OnlineIdSystemTicketResult)
,
uuid
(
db0a5ff8
-
b098
-
4
acd
-
9
d13
-
9
e640652b5b6
)
]
interface
IOnlineIdSystemTicketResult
:
IInspectable
{
[
propget
]
HRESULT
Identity
(
[
out
,
retval
]
Windows
.
Security.Authentication.OnlineId.OnlineIdSystemIdentity
**
value
)
;
[
propget
]
HRESULT
Status
(
[
out
,
retval
]
Windows
.
Security.Authentication.OnlineId.OnlineIdSystemTicketStatus
*
value
)
;
[
propget
]
HRESULT
ExtendedError
(
[
out
,
retval
]
HRESULT
*
value
)
;
}
[
activatable
(
Windows
.
Security.Authentication.OnlineId.IOnlineIdServiceTicketRequestFactory
,
Windows
.
Foundation.UniversalApiContract
,
1.0
),
contract
(
Windows
.
Foundation.UniversalApiContract
,
1.0
),
marshaling_behavior
(
agile
),
threading
(
both
)
]
runtimeclass
OnlineIdServiceTicketRequest
{
[
default
]
interface
Windows
.
Security.Authentication.OnlineId.IOnlineIdServiceTicketRequest;
}
[
contract
(
Windows
.
Foundation.UniversalApiContract
,
4.0
),
marshaling_behavior
(
agile
),
static
(
Windows
.
Security.Authentication.OnlineId.IOnlineIdSystemAuthenticatorStatics
,
Windows
.
Foundation.UniversalApiContract
,
4.0
),
threading
(
both
)
...
...
@@ -64,4 +140,24 @@ namespace Windows.Security.Authentication.OnlineId {
{
[
default
]
interface
Windows
.
Security.Authentication.OnlineId.IOnlineIdSystemAuthenticatorForUser;
}
[
contract
(
Windows
.
Foundation.UniversalApiContract
,
4.0
),
marshaling_behavior
(
agile
),
threading
(
both
)
]
runtimeclass
OnlineIdSystemIdentity
{
[
default
]
interface
Windows
.
Security.Authentication.OnlineId.IOnlineIdSystemIdentity;
}
[
contract
(
Windows
.
Foundation.UniversalApiContract
,
4.0
),
marshaling_behavior
(
agile
),
threading
(
both
)
]
runtimeclass
OnlineIdSystemTicketResult
{
[
default
]
interface
Windows
.
Security.Authentication.OnlineId.IOnlineIdSystemTicketResult;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment