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
df9b41af
Commit
df9b41af
authored
Jan 09, 2023
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 IOnlineIdServiceTicketRequestFactory stub interface.
parent
a3ef7d74
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
210 additions
and
1 deletion
+210
-1
Makefile.in
dlls/windows.security.authentication.onlineid/Makefile.in
+2
-1
main.c
dlls/windows.security.authentication.onlineid/main.c
+2
-0
private.h
dlls/windows.security.authentication.onlineid/private.h
+1
-0
onlineid.c
...windows.security.authentication.onlineid/tests/onlineid.c
+34
-0
ticket.c
dlls/windows.security.authentication.onlineid/ticket.c
+154
-0
windows.security.authentication.onlineid.idl
include/windows.security.authentication.onlineid.idl
+17
-0
No files found.
dlls/windows.security.authentication.onlineid/Makefile.in
View file @
df9b41af
...
...
@@ -4,4 +4,5 @@ IMPORTS = combase
SOURCES
=
\
authenticator.c
\
classes.idl
\
main.c
main.c
\
ticket.c
dlls/windows.security.authentication.onlineid/main.c
View file @
df9b41af
...
...
@@ -40,6 +40,8 @@ HRESULT WINAPI DllGetActivationFactory( HSTRING classid, IActivationFactory **fa
if
(
!
wcscmp
(
buffer
,
RuntimeClass_Windows_Security_Authentication_OnlineId_OnlineIdSystemAuthenticator
))
IActivationFactory_QueryInterface
(
authenticator_factory
,
&
IID_IActivationFactory
,
(
void
**
)
factory
);
if
(
!
wcscmp
(
buffer
,
RuntimeClass_Windows_Security_Authentication_OnlineId_OnlineIdServiceTicketRequest
))
IActivationFactory_QueryInterface
(
ticket_factory
,
&
IID_IActivationFactory
,
(
void
**
)
factory
);
if
(
*
factory
)
return
S_OK
;
return
CLASS_E_CLASSNOTAVAILABLE
;
...
...
dlls/windows.security.authentication.onlineid/private.h
View file @
df9b41af
...
...
@@ -38,6 +38,7 @@
#include "windows.security.authentication.onlineid.h"
extern
IActivationFactory
*
authenticator_factory
;
extern
IActivationFactory
*
ticket_factory
;
#define DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from, iface_mem, expr ) \
static inline impl_type *impl_from( iface_type *iface ) \
...
...
dlls/windows.security.authentication.onlineid/tests/onlineid.c
View file @
df9b41af
...
...
@@ -79,6 +79,39 @@ static void test_AuthenticatorStatics(void)
ok
(
ref
==
1
,
"got ref %ld.
\n
"
,
ref
);
}
static
void
test_TicketStatics
(
void
)
{
static
const
WCHAR
*
ticket_statics_name
=
L"Windows.Security.Authentication.OnlineId.OnlineIdServiceTicketRequest"
;
IOnlineIdServiceTicketRequest
*
ticket_statics
=
(
void
*
)
0xdeadbeef
;
IActivationFactory
*
factory
=
(
void
*
)
0xdeadbeef
;
HSTRING
str
;
HRESULT
hr
;
LONG
ref
;
hr
=
WindowsCreateString
(
ticket_statics_name
,
wcslen
(
ticket_statics_name
),
&
str
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
RoGetActivationFactory
(
str
,
&
IID_IActivationFactory
,
(
void
**
)
&
factory
);
WindowsDeleteString
(
str
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
REGDB_E_CLASSNOTREG
),
"got hr %#lx.
\n
"
,
hr
);
if
(
hr
==
REGDB_E_CLASSNOTREG
)
{
win_skip
(
"%s runtimeclass not registered, skipping tests.
\n
"
,
wine_dbgstr_w
(
ticket_statics_name
)
);
return
;
}
check_interface
(
factory
,
&
IID_IUnknown
);
check_interface
(
factory
,
&
IID_IInspectable
);
hr
=
IActivationFactory_QueryInterface
(
factory
,
&
IID_IOnlineIdServiceTicketRequestFactory
,
(
void
**
)
&
ticket_statics
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
ref
=
IOnlineIdServiceTicketRequest_Release
(
ticket_statics
);
ok
(
ref
==
2
,
"got ref %ld.
\n
"
,
ref
);
ref
=
IActivationFactory_Release
(
factory
);
ok
(
ref
==
1
,
"got ref %ld.
\n
"
,
ref
);
}
START_TEST
(
onlineid
)
{
HRESULT
hr
;
...
...
@@ -87,6 +120,7 @@ START_TEST(onlineid)
ok
(
hr
==
S_OK
,
"RoInitialize failed, hr %#lx
\n
"
,
hr
);
test_AuthenticatorStatics
();
test_TicketStatics
();
RoUninitialize
();
}
dlls/windows.security.authentication.onlineid/ticket.c
0 → 100644
View file @
df9b41af
/* WinRT Windows.Security.Authentication.Onlineid Implementation
*
* Copyright (C) 2024 Mohamad Al-Jaf
*
* 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
*/
#include "private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
onlineid
);
struct
ticket_request_factory_statics
{
IActivationFactory
IActivationFactory_iface
;
IOnlineIdServiceTicketRequestFactory
IOnlineIdServiceTicketRequestFactory_iface
;
LONG
ref
;
};
static
inline
struct
ticket_request_factory_statics
*
impl_from_IActivationFactory
(
IActivationFactory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
ticket_request_factory_statics
,
IActivationFactory_iface
);
}
static
HRESULT
WINAPI
factory_QueryInterface
(
IActivationFactory
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
ticket_request_factory_statics
*
impl
=
impl_from_IActivationFactory
(
iface
);
TRACE
(
"iface %p, iid %s, out %p.
\n
"
,
iface
,
debugstr_guid
(
iid
),
out
);
if
(
IsEqualGUID
(
iid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
iid
,
&
IID_IInspectable
)
||
IsEqualGUID
(
iid
,
&
IID_IActivationFactory
))
{
*
out
=
&
impl
->
IActivationFactory_iface
;
IInspectable_AddRef
(
*
out
);
return
S_OK
;
}
if
(
IsEqualGUID
(
iid
,
&
IID_IOnlineIdServiceTicketRequestFactory
))
{
*
out
=
&
impl
->
IOnlineIdServiceTicketRequestFactory_iface
;
IInspectable_AddRef
(
*
out
);
return
S_OK
;
}
FIXME
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
iid
)
);
*
out
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
factory_AddRef
(
IActivationFactory
*
iface
)
{
struct
ticket_request_factory_statics
*
impl
=
impl_from_IActivationFactory
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
impl
->
ref
);
TRACE
(
"iface %p, ref %lu.
\n
"
,
iface
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
factory_Release
(
IActivationFactory
*
iface
)
{
struct
ticket_request_factory_statics
*
impl
=
impl_from_IActivationFactory
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
impl
->
ref
);
TRACE
(
"iface %p, ref %lu.
\n
"
,
iface
,
ref
);
return
ref
;
}
static
HRESULT
WINAPI
factory_GetIids
(
IActivationFactory
*
iface
,
ULONG
*
iid_count
,
IID
**
iids
)
{
FIXME
(
"iface %p, iid_count %p, iids %p stub!
\n
"
,
iface
,
iid_count
,
iids
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
factory_GetRuntimeClassName
(
IActivationFactory
*
iface
,
HSTRING
*
class_name
)
{
FIXME
(
"iface %p, class_name %p stub!
\n
"
,
iface
,
class_name
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
factory_GetTrustLevel
(
IActivationFactory
*
iface
,
TrustLevel
*
trust_level
)
{
FIXME
(
"iface %p, trust_level %p stub!
\n
"
,
iface
,
trust_level
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
factory_ActivateInstance
(
IActivationFactory
*
iface
,
IInspectable
**
instance
)
{
FIXME
(
"iface %p, instance %p stub!
\n
"
,
iface
,
instance
);
return
E_NOTIMPL
;
}
static
const
struct
IActivationFactoryVtbl
factory_vtbl
=
{
factory_QueryInterface
,
factory_AddRef
,
factory_Release
,
/* IInspectable methods */
factory_GetIids
,
factory_GetRuntimeClassName
,
factory_GetTrustLevel
,
/* IActivationFactory methods */
factory_ActivateInstance
,
};
DEFINE_IINSPECTABLE
(
ticket_request_factory_statics
,
IOnlineIdServiceTicketRequestFactory
,
struct
ticket_request_factory_statics
,
IActivationFactory_iface
)
static
HRESULT
WINAPI
ticket_request_factory_statics_CreateOnlineIdServiceTicketRequest
(
IOnlineIdServiceTicketRequestFactory
*
iface
,
HSTRING
service
,
HSTRING
policy
,
IOnlineIdServiceTicketRequest
**
request
)
{
FIXME
(
"iface %p, service %s, policy %s, request %p stub!
\n
"
,
iface
,
debugstr_hstring
(
service
),
debugstr_hstring
(
policy
),
request
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ticket_request_factory_statics_CreateOnlineIdServiceTicketRequestAdvanced
(
IOnlineIdServiceTicketRequestFactory
*
iface
,
HSTRING
service
,
IOnlineIdServiceTicketRequest
**
request
)
{
FIXME
(
"iface %p, service %s, request %p stub!
\n
"
,
iface
,
debugstr_hstring
(
service
),
request
);
return
E_NOTIMPL
;
}
static
const
struct
IOnlineIdServiceTicketRequestFactoryVtbl
ticket_request_factory_statics_vtbl
=
{
ticket_request_factory_statics_QueryInterface
,
ticket_request_factory_statics_AddRef
,
ticket_request_factory_statics_Release
,
/* IInspectable methods */
ticket_request_factory_statics_GetIids
,
ticket_request_factory_statics_GetRuntimeClassName
,
ticket_request_factory_statics_GetTrustLevel
,
/* IOnlineIdServiceTicketRequestFactory methods */
ticket_request_factory_statics_CreateOnlineIdServiceTicketRequest
,
ticket_request_factory_statics_CreateOnlineIdServiceTicketRequestAdvanced
,
};
static
struct
ticket_request_factory_statics
ticket_request_factory_statics
=
{
{
&
factory_vtbl
},
{
&
ticket_request_factory_statics_vtbl
},
1
,
};
IActivationFactory
*
ticket_factory
=
&
ticket_request_factory_statics
.
IActivationFactory_iface
;
include/windows.security.authentication.onlineid.idl
View file @
df9b41af
...
...
@@ -72,6 +72,23 @@ namespace Windows.Security.Authentication.OnlineId {
}
[
contract
(
Windows
.
Foundation.UniversalApiContract
,
1.0
),
exclusiveto
(
Windows
.
Security.Authentication.OnlineId.OnlineIdServiceTicketRequest)
,
uuid
(
bebb0a08
-
9
e73
-
4077
-
9614
-
08614
c0bc245
)
]
interface
IOnlineIdServiceTicketRequestFactory
:
IInspectable
{
HRESULT
CreateOnlineIdServiceTicketRequest
(
[
in
]
HSTRING
service
,
[
in
]
HSTRING
policy
,
[
out
,
retval
]
Windows
.
Security.Authentication.OnlineId.OnlineIdServiceTicketRequest
**
request
)
;
HRESULT
CreateOnlineIdServiceTicketRequestAdvanced
(
[
in
]
HSTRING
service
,
[
out
,
retval
]
Windows
.
Security.Authentication.OnlineId.OnlineIdServiceTicketRequest
**
request
)
;
}
[
contract
(
Windows
.
Foundation.UniversalApiContract
,
4.0
),
exclusiveto
(
Windows
.
Security.Authentication.OnlineId.OnlineIdSystemAuthenticatorForUser)
,
uuid
(
5798b
efb
-
1
de4
-
4186
-
a2e6
-
b563f86aaf44
)
...
...
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