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
3fa10f79
Commit
3fa10f79
authored
Dec 20, 2007
by
Huw Davies
Committed by
Alexandre Julliard
Dec 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Implement IMimeBody_GetOffsets.
parent
7a465ce9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
mimeole.c
dlls/inetcomm/mimeole.c
+22
-2
mimeole.c
dlls/inetcomm/tests/mimeole.c
+9
-0
No files found.
dlls/inetcomm/mimeole.c
View file @
3fa10f79
...
...
@@ -107,6 +107,7 @@ typedef struct MimeBody
ENCODINGTYPE
encoding
;
void
*
data
;
IID
data_iid
;
BODYOFFSETS
body_offsets
;
}
MimeBody
;
static
inline
MimeBody
*
impl_from_IMimeBody
(
IMimeBody
*
iface
)
...
...
@@ -857,8 +858,13 @@ static HRESULT WINAPI MimeBody_GetOffsets(
IMimeBody
*
iface
,
LPBODYOFFSETS
pOffsets
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
MimeBody
*
This
=
impl_from_IMimeBody
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pOffsets
);
*
pOffsets
=
This
->
body_offsets
;
if
(
This
->
body_offsets
.
cbBodyEnd
==
0
)
return
MIME_E_NO_DATA
;
return
S_OK
;
}
static
HRESULT
WINAPI
MimeBody_GetCurrentEncoding
(
...
...
@@ -1037,11 +1043,21 @@ static IMimeBodyVtbl body_vtbl =
MimeBody_GetHandle
};
static
HRESULT
MimeBody_set_offsets
(
MimeBody
*
body
,
const
BODYOFFSETS
*
offsets
)
{
TRACE
(
"setting offsets to %d, %d, %d, %d
\n
"
,
offsets
->
cbBoundaryStart
,
offsets
->
cbHeaderStart
,
offsets
->
cbBodyStart
,
offsets
->
cbBodyEnd
);
body
->
body_offsets
=
*
offsets
;
return
S_OK
;
}
#define FIRST_CUSTOM_PROP_ID 0x100
HRESULT
MimeBody_create
(
IUnknown
*
outer
,
void
**
obj
)
{
MimeBody
*
This
;
BODYOFFSETS
body_offsets
;
*
obj
=
NULL
;
...
...
@@ -1062,6 +1078,10 @@ HRESULT MimeBody_create(IUnknown *outer, void **obj)
This
->
data
=
NULL
;
This
->
data_iid
=
IID_NULL
;
body_offsets
.
cbBoundaryStart
=
body_offsets
.
cbHeaderStart
=
0
;
body_offsets
.
cbBodyStart
=
body_offsets
.
cbBodyEnd
=
0
;
MimeBody_set_offsets
(
This
,
&
body_offsets
);
*
obj
=
(
IMimeBody
*
)
&
This
->
lpVtbl
;
return
S_OK
;
}
...
...
dlls/inetcomm/tests/mimeole.c
View file @
3fa10f79
...
...
@@ -94,6 +94,7 @@ static void test_CreateBody(void)
ULONG
count
,
found_param
,
i
;
MIMEPARAMINFO
*
param_info
;
IMimeAllocator
*
alloc
;
BODYOFFSETS
offsets
;
hr
=
CoCreateInstance
(
&
CLSID_IMimeBody
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMimeBody
,
(
void
**
)
&
body
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
...
...
@@ -138,6 +139,14 @@ static void test_CreateBody(void)
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
enc
==
IET_8BIT
,
"encoding %d
\n
"
,
enc
);
memset
(
&
offsets
,
0xcc
,
sizeof
(
offsets
));
hr
=
IMimeBody_GetOffsets
(
body
,
&
offsets
);
ok
(
hr
==
MIME_E_NO_DATA
,
"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
==
0
,
"got %d
\n
"
,
offsets
.
cbBodyStart
);
ok
(
offsets
.
cbBodyEnd
==
0
,
"got %d
\n
"
,
offsets
.
cbBodyEnd
);
hr
=
MimeOleGetAllocator
(
&
alloc
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
...
...
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