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
8be6df34
Commit
8be6df34
authored
Feb 12, 2008
by
Huw Davies
Committed by
Alexandre Julliard
Feb 13, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Implement IMimeMessage_CountBodies.
parent
e15ff2ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
2 deletions
+33
-2
mimeole.c
dlls/inetcomm/mimeole.c
+24
-2
mimeole.c
dlls/inetcomm/tests/mimeole.c
+9
-0
No files found.
dlls/inetcomm/mimeole.c
View file @
8be6df34
...
...
@@ -1889,14 +1889,36 @@ static HRESULT WINAPI MimeMessage_MoveBody(
return
E_NOTIMPL
;
}
static
void
count_children
(
body_t
*
body
,
boolean
recurse
,
ULONG
*
count
)
{
body_t
*
child
;
LIST_FOR_EACH_ENTRY
(
child
,
&
body
->
children
,
body_t
,
entry
)
{
(
*
count
)
++
;
if
(
recurse
)
count_children
(
child
,
recurse
,
count
);
}
}
static
HRESULT
WINAPI
MimeMessage_CountBodies
(
IMimeMessage
*
iface
,
HBODY
hParent
,
boolean
fRecurse
,
ULONG
*
pcBodies
)
{
FIXME
(
"(%p)->(%p, %s, %p)
\n
"
,
iface
,
hParent
,
fRecurse
?
"TRUE"
:
"FALSE"
,
pcBodies
);
return
E_NOTIMPL
;
HRESULT
hr
;
MimeMessage
*
This
=
(
MimeMessage
*
)
iface
;
body_t
*
body
;
TRACE
(
"(%p)->(%p, %s, %p)
\n
"
,
iface
,
hParent
,
fRecurse
?
"TRUE"
:
"FALSE"
,
pcBodies
);
hr
=
find_body
(
&
This
->
body_tree
,
hParent
,
&
body
);
if
(
hr
!=
S_OK
)
return
hr
;
*
pcBodies
=
1
;
count_children
(
body
,
fRecurse
,
pcBodies
);
return
S_OK
;
}
static
HRESULT
WINAPI
MimeMessage_FindFirst
(
...
...
dlls/inetcomm/tests/mimeole.c
View file @
8be6df34
...
...
@@ -212,6 +212,7 @@ static void test_CreateMessage(void)
HBODY
hbody
;
IMimeBody
*
body
;
BODYOFFSETS
offsets
;
ULONG
count
;
hr
=
MimeOleCreateMessage
(
NULL
,
&
msg
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
...
...
@@ -224,6 +225,14 @@ static void test_CreateMessage(void)
hr
=
IMimeMessage_Load
(
msg
,
stream
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeMessage_CountBodies
(
msg
,
HBODY_ROOT
,
TRUE
,
&
count
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
count
==
3
,
"got %d
\n
"
,
count
);
hr
=
IMimeMessage_CountBodies
(
msg
,
HBODY_ROOT
,
FALSE
,
&
count
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
count
==
3
,
"got %d
\n
"
,
count
);
hr
=
IMimeMessage_BindToObject
(
msg
,
HBODY_ROOT
,
&
IID_IMimeBody
,
(
void
**
)
&
body
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeBody_GetOffsets
(
body
,
&
offsets
);
...
...
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