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
a14bb14d
Commit
a14bb14d
authored
Feb 11, 2008
by
Huw Davies
Committed by
Alexandre Julliard
Feb 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Implement IMimeMessage_BindToObject.
parent
88df8e83
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
2 deletions
+54
-2
mimeole.c
dlls/inetcomm/mimeole.c
+42
-2
mimeole.c
dlls/inetcomm/tests/mimeole.c
+12
-0
No files found.
dlls/inetcomm/mimeole.c
View file @
a14bb14d
...
@@ -1339,14 +1339,54 @@ static HRESULT WINAPI MimeMessage_HandsOffStorage(
...
@@ -1339,14 +1339,54 @@ static HRESULT WINAPI MimeMessage_HandsOffStorage(
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
static
HRESULT
find_body
(
struct
list
*
list
,
HBODY
hbody
,
body_t
**
body
)
{
body_t
*
cur
;
HRESULT
hr
;
if
(
hbody
==
HBODY_ROOT
)
{
*
body
=
LIST_ENTRY
(
list_head
(
list
),
body_t
,
entry
);
return
S_OK
;
}
LIST_FOR_EACH_ENTRY
(
cur
,
list
,
body_t
,
entry
)
{
if
(
cur
->
hbody
==
hbody
)
{
*
body
=
cur
;
return
S_OK
;
}
hr
=
find_body
(
&
cur
->
children
,
hbody
,
body
);
if
(
hr
==
S_OK
)
return
S_OK
;
}
return
S_FALSE
;
}
static
HRESULT
WINAPI
MimeMessage_BindToObject
(
static
HRESULT
WINAPI
MimeMessage_BindToObject
(
IMimeMessage
*
iface
,
IMimeMessage
*
iface
,
const
HBODY
hBody
,
const
HBODY
hBody
,
REFIID
riid
,
REFIID
riid
,
void
**
ppvObject
)
void
**
ppvObject
)
{
{
FIXME
(
"(%p)->(%p, %s, %p)
\n
"
,
iface
,
hBody
,
debugstr_guid
(
riid
),
ppvObject
);
MimeMessage
*
This
=
(
MimeMessage
*
)
iface
;
return
E_NOTIMPL
;
HRESULT
hr
;
body_t
*
body
;
TRACE
(
"(%p)->(%p, %s, %p)
\n
"
,
iface
,
hBody
,
debugstr_guid
(
riid
),
ppvObject
);
hr
=
find_body
(
&
This
->
body_tree
,
hBody
,
&
body
);
if
(
hr
!=
S_OK
)
return
hr
;
if
(
IsEqualIID
(
riid
,
&
IID_IMimeBody
))
{
IMimeBody_AddRef
(
body
->
mime_body
);
*
ppvObject
=
body
->
mime_body
;
return
S_OK
;
}
return
E_NOINTERFACE
;
}
}
static
HRESULT
WINAPI
MimeMessage_SaveBody
(
static
HRESULT
WINAPI
MimeMessage_SaveBody
(
...
...
dlls/inetcomm/tests/mimeole.c
View file @
a14bb14d
...
@@ -209,6 +209,8 @@ static void test_CreateMessage(void)
...
@@ -209,6 +209,8 @@ static void test_CreateMessage(void)
IStream
*
stream
;
IStream
*
stream
;
LARGE_INTEGER
pos
;
LARGE_INTEGER
pos
;
LONG
ref
;
LONG
ref
;
IMimeBody
*
body
;
BODYOFFSETS
offsets
;
hr
=
MimeOleCreateMessage
(
NULL
,
&
msg
);
hr
=
MimeOleCreateMessage
(
NULL
,
&
msg
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
...
@@ -221,6 +223,16 @@ static void test_CreateMessage(void)
...
@@ -221,6 +223,16 @@ static void test_CreateMessage(void)
hr
=
IMimeMessage_Load
(
msg
,
stream
);
hr
=
IMimeMessage_Load
(
msg
,
stream
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeMessage_BindToObject
(
msg
,
HBODY_ROOT
,
&
IID_IMimeBody
,
(
void
**
)
&
body
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeBody_GetOffsets
(
body
,
&
offsets
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
offsets
.
cbBoundaryStart
==
0
,
"got %d
\n
"
,
offsets
.
cbBoundaryStart
);
ok
(
offsets
.
cbHeaderStart
==
0
,
"got %d
\n
"
,
offsets
.
cbHeaderStart
);
ok
(
offsets
.
cbBodyStart
==
359
,
"got %d
\n
"
,
offsets
.
cbBodyStart
);
ok
(
offsets
.
cbBodyEnd
==
666
,
"got %d
\n
"
,
offsets
.
cbBodyEnd
);
IMimeBody_Release
(
body
);
IMimeMessage_Release
(
msg
);
IMimeMessage_Release
(
msg
);
ref
=
IStream_AddRef
(
stream
);
ref
=
IStream_AddRef
(
stream
);
...
...
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