Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gabriel Ivăncescu
wine
Commits
a68435f0
Commit
a68435f0
authored
2 years ago
by
Mohamad Al-Jaf
Committed by
Alexandre Julliard
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
cryptowinrt: Add private.h file.
parent
62bd7578
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/cryptowinrt/main.c
+5
-58
5 additions, 58 deletions
dlls/cryptowinrt/main.c
dlls/cryptowinrt/private.h
+78
-0
78 additions, 0 deletions
dlls/cryptowinrt/private.h
with
83 additions
and
58 deletions
dlls/cryptowinrt/main.c
+
5
−
58
View file @
a68435f0
...
...
@@ -16,32 +16,22 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include
<stdarg.h>
#include
"initguid.h"
#include
"private.h"
#include
<assert.h>
#define COBJMACROS
#include
"windef.h"
#include
"winbase.h"
#include
"winstring.h"
#include
"wine/debug.h"
#include
"objbase.h"
#include
"initguid.h"
#include
"activation.h"
#include
"bcrypt.h"
#define WIDL_using_Windows_Foundation
#define WIDL_using_Windows_Foundation_Collections
#include
"windows.foundation.h"
#define WIDL_using_Windows_Storage_Streams
#include
"windows.storage.streams.h"
#define WIDL_using_Windows_Security_Cryptography
#include
"windows.security.cryptography.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
crypto
);
static
const
char
*
debugstr_hstring
(
HSTRING
hstr
)
const
char
*
debugstr_hstring
(
HSTRING
hstr
)
{
const
WCHAR
*
str
;
UINT32
len
;
...
...
@@ -62,11 +52,6 @@ static inline struct cryptobuffer_factory *impl_from_IActivationFactory(IActivat
return
CONTAINING_RECORD
(
iface
,
struct
cryptobuffer_factory
,
IActivationFactory_iface
);
}
static
inline
struct
cryptobuffer_factory
*
impl_from_ICryptographicBufferStatics
(
ICryptographicBufferStatics
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
cryptobuffer_factory
,
ICryptographicBufferStatics_iface
);
}
static
HRESULT
STDMETHODCALLTYPE
cryptobuffer_factory_QueryInterface
(
IActivationFactory
*
iface
,
REFIID
iid
,
void
**
out
)
{
...
...
@@ -157,45 +142,7 @@ static const struct IActivationFactoryVtbl cryptobuffer_factory_vtbl =
cryptobuffer_factory_ActivateInstance
,
};
static
HRESULT
STDMETHODCALLTYPE
cryptobuffer_statics_QueryInterface
(
ICryptographicBufferStatics
*
iface
,
REFIID
iid
,
void
**
object
)
{
struct
cryptobuffer_factory
*
factory
=
impl_from_ICryptographicBufferStatics
(
iface
);
return
IActivationFactory_QueryInterface
(
&
factory
->
IActivationFactory_iface
,
iid
,
object
);
}
static
ULONG
STDMETHODCALLTYPE
cryptobuffer_statics_AddRef
(
ICryptographicBufferStatics
*
iface
)
{
struct
cryptobuffer_factory
*
factory
=
impl_from_ICryptographicBufferStatics
(
iface
);
return
IActivationFactory_AddRef
(
&
factory
->
IActivationFactory_iface
);
}
static
ULONG
STDMETHODCALLTYPE
cryptobuffer_statics_Release
(
ICryptographicBufferStatics
*
iface
)
{
struct
cryptobuffer_factory
*
factory
=
impl_from_ICryptographicBufferStatics
(
iface
);
return
IActivationFactory_Release
(
&
factory
->
IActivationFactory_iface
);
}
static
HRESULT
STDMETHODCALLTYPE
cryptobuffer_statics_GetIids
(
ICryptographicBufferStatics
*
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
STDMETHODCALLTYPE
cryptobuffer_statics_GetRuntimeClassName
(
ICryptographicBufferStatics
*
iface
,
HSTRING
*
class_name
)
{
FIXME
(
"iface %p, class_name %p stub!
\n
"
,
iface
,
class_name
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
cryptobuffer_statics_GetTrustLevel
(
ICryptographicBufferStatics
*
iface
,
TrustLevel
*
trust_level
)
{
FIXME
(
"iface %p, trust_level %p stub!
\n
"
,
iface
,
trust_level
);
return
E_NOTIMPL
;
}
DEFINE_IINSPECTABLE
(
cryptobuffer_statics
,
ICryptographicBufferStatics
,
struct
cryptobuffer_factory
,
IActivationFactory_iface
);
static
HRESULT
STDMETHODCALLTYPE
cryptobuffer_statics_Compare
(
ICryptographicBufferStatics
*
iface
,
IBuffer
*
object1
,
IBuffer
*
object2
,
boolean
*
is_equal
)
...
...
This diff is collapsed.
Click to expand it.
dlls/cryptowinrt/private.h
0 → 100644
+
78
−
0
View file @
a68435f0
/* CryptoWinRT Implementation
*
* Copyright (C) 2022 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
*/
#ifndef __WINE_CRYPTOWINRT_PRIVATE_H
#define __WINE_CRYPTOWINRT_PRIVATE_H
#include
<stdarg.h>
#define COBJMACROS
#include
"windef.h"
#include
"winbase.h"
#include
"winstring.h"
#include
"activation.h"
#define WIDL_using_Windows_Foundation
#define WIDL_using_Windows_Foundation_Collections
#include
"windows.foundation.h"
#define WIDL_using_Windows_Storage_Streams
#include
"windows.storage.streams.h"
extern
const
char
*
debugstr_hstring
(
HSTRING
hstr
);
#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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment