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
8ccf1066
Commit
8ccf1066
authored
Nov 05, 2007
by
Huw Davies
Committed by
Alexandre Julliard
Nov 07, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Add a stub implementation of the MimeSecurity object.
parent
511af0d1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
197 additions
and
1 deletion
+197
-1
inetcomm.spec
dlls/inetcomm/inetcomm.spec
+1
-1
mimeole.c
dlls/inetcomm/mimeole.c
+184
-0
mimeole.c
dlls/inetcomm/tests/mimeole.c
+12
-0
No files found.
dlls/inetcomm/inetcomm.spec
View file @
8ccf1066
...
...
@@ -54,7 +54,7 @@
@ stdcall MimeOleCreateMessage(ptr ptr)
@ stub MimeOleCreateMessageParts
@ stub MimeOleCreatePropertySet
@ st
ub MimeOleCreateSecurity
@ st
dcall MimeOleCreateSecurity(ptr)
@ stdcall MimeOleCreateVirtualStream(ptr)
@ stub MimeOleDecodeHeader
@ stub MimeOleEncodeHeader
...
...
dlls/inetcomm/mimeole.c
View file @
8ccf1066
...
...
@@ -696,3 +696,187 @@ HRESULT WINAPI MimeOleCreateVirtualStream(IStream **ppStream)
hr
=
CreateStreamOnHGlobal
(
NULL
,
TRUE
,
ppStream
);
return
hr
;
}
typedef
struct
MimeSecurity
{
const
IMimeSecurityVtbl
*
lpVtbl
;
LONG
refs
;
}
MimeSecurity
;
static
HRESULT
WINAPI
MimeSecurity_QueryInterface
(
IMimeSecurity
*
iface
,
REFIID
riid
,
void
**
obj
)
{
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
obj
);
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IMimeSecurity
))
{
*
obj
=
iface
;
IUnknown_AddRef
(
iface
);
return
S_OK
;
}
FIXME
(
"no interface for %s
\n
"
,
debugstr_guid
(
riid
));
*
obj
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
MimeSecurity_AddRef
(
IMimeSecurity
*
iface
)
{
MimeSecurity
*
This
=
(
MimeSecurity
*
)
iface
;
TRACE
(
"(%p)->()
\n
"
,
iface
);
return
InterlockedIncrement
(
&
This
->
refs
);
}
static
ULONG
WINAPI
MimeSecurity_Release
(
IMimeSecurity
*
iface
)
{
MimeSecurity
*
This
=
(
MimeSecurity
*
)
iface
;
ULONG
refs
;
TRACE
(
"(%p)->()
\n
"
,
iface
);
refs
=
InterlockedDecrement
(
&
This
->
refs
);
if
(
!
refs
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
refs
;
}
static
HRESULT
WINAPI
MimeSecurity_InitNew
(
IMimeSecurity
*
iface
)
{
FIXME
(
"(%p)->(): stub
\n
"
,
iface
);
return
S_OK
;
}
static
HRESULT
WINAPI
MimeSecurity_CheckInit
(
IMimeSecurity
*
iface
)
{
FIXME
(
"(%p)->(): stub
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MimeSecurity_EncodeMessage
(
IMimeSecurity
*
iface
,
IMimeMessageTree
*
pTree
,
DWORD
dwFlags
)
{
FIXME
(
"(%p)->(%p, %08x): stub
\n
"
,
iface
,
pTree
,
dwFlags
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MimeSecurity_EncodeBody
(
IMimeSecurity
*
iface
,
IMimeMessageTree
*
pTree
,
HBODY
hEncodeRoot
,
DWORD
dwFlags
)
{
FIXME
(
"(%p)->(%p, %p, %08x): stub
\n
"
,
iface
,
pTree
,
hEncodeRoot
,
dwFlags
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MimeSecurity_DecodeMessage
(
IMimeSecurity
*
iface
,
IMimeMessageTree
*
pTree
,
DWORD
dwFlags
)
{
FIXME
(
"(%p)->(%p, %08x): stub
\n
"
,
iface
,
pTree
,
dwFlags
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MimeSecurity_DecodeBody
(
IMimeSecurity
*
iface
,
IMimeMessageTree
*
pTree
,
HBODY
hDecodeRoot
,
DWORD
dwFlags
)
{
FIXME
(
"(%p)->(%p, %p, %08x): stub
\n
"
,
iface
,
pTree
,
hDecodeRoot
,
dwFlags
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MimeSecurity_EnumCertificates
(
IMimeSecurity
*
iface
,
HCAPICERTSTORE
hc
,
DWORD
dwUsage
,
PCX509CERT
pPrev
,
PCX509CERT
*
ppCert
)
{
FIXME
(
"(%p)->(%p, %08x, %p, %p): stub
\n
"
,
iface
,
hc
,
dwUsage
,
pPrev
,
ppCert
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MimeSecurity_GetCertificateName
(
IMimeSecurity
*
iface
,
const
PCX509CERT
pX509Cert
,
const
CERTNAMETYPE
cn
,
LPSTR
*
ppszName
)
{
FIXME
(
"(%p)->(%p, %08x, %p): stub
\n
"
,
iface
,
pX509Cert
,
cn
,
ppszName
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MimeSecurity_GetMessageType
(
IMimeSecurity
*
iface
,
const
HWND
hwndParent
,
IMimeBody
*
pBody
,
DWORD
*
pdwSecType
)
{
FIXME
(
"(%p)->(%p, %p, %p): stub
\n
"
,
iface
,
hwndParent
,
pBody
,
pdwSecType
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MimeSecurity_GetCertData
(
IMimeSecurity
*
iface
,
const
PCX509CERT
pX509Cert
,
const
CERTDATAID
dataid
,
LPPROPVARIANT
pValue
)
{
FIXME
(
"(%p)->(%p, %x, %p): stub
\n
"
,
iface
,
pX509Cert
,
dataid
,
pValue
);
return
E_NOTIMPL
;
}
static
const
IMimeSecurityVtbl
MimeSecurityVtbl
=
{
MimeSecurity_QueryInterface
,
MimeSecurity_AddRef
,
MimeSecurity_Release
,
MimeSecurity_InitNew
,
MimeSecurity_CheckInit
,
MimeSecurity_EncodeMessage
,
MimeSecurity_EncodeBody
,
MimeSecurity_DecodeMessage
,
MimeSecurity_DecodeBody
,
MimeSecurity_EnumCertificates
,
MimeSecurity_GetCertificateName
,
MimeSecurity_GetMessageType
,
MimeSecurity_GetCertData
};
/***********************************************************************
* MimeOleCreateSecurity (INETCOMM.@)
*/
HRESULT
WINAPI
MimeOleCreateSecurity
(
IMimeSecurity
**
ppSecurity
)
{
MimeSecurity
*
This
;
TRACE
(
"(%p)
\n
"
,
ppSecurity
);
*
ppSecurity
=
NULL
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
lpVtbl
=
&
MimeSecurityVtbl
;
This
->
refs
=
1
;
*
ppSecurity
=
(
IMimeSecurity
*
)
&
This
->
lpVtbl
;
return
S_OK
;
}
dlls/inetcomm/tests/mimeole.c
View file @
8ccf1066
...
...
@@ -41,9 +41,21 @@ static void test_CreateVirtualStream(void)
IStream_Release
(
pstm
);
}
static
void
test_CreateSecurity
(
void
)
{
HRESULT
hr
;
IMimeSecurity
*
sec
;
hr
=
MimeOleCreateSecurity
(
&
sec
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
IMimeSecurity_Release
(
sec
);
}
START_TEST
(
mimeole
)
{
OleInitialize
(
NULL
);
test_CreateVirtualStream
();
test_CreateSecurity
();
OleUninitialize
();
}
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