Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
79762537
Commit
79762537
authored
Jun 23, 2016
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jun 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Implement IMimeBody GetPropInfo.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bb9b2f33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
127 additions
and
2 deletions
+127
-2
mimeole.c
dlls/inetcomm/mimeole.c
+36
-2
mimeole.c
dlls/inetcomm/tests/mimeole.c
+91
-0
No files found.
dlls/inetcomm/mimeole.c
View file @
79762537
...
...
@@ -711,8 +711,42 @@ static HRESULT WINAPI MimeBody_GetPropInfo(
LPMIMEPROPINFO
pInfo
)
{
MimeBody
*
This
=
impl_from_IMimeBody
(
iface
);
FIXME
(
"(%p)->(%s, %p) stub
\n
"
,
This
,
debugstr_a
(
pszName
),
pInfo
);
return
E_NOTIMPL
;
header_t
*
header
;
HRESULT
hr
;
DWORD
supported
=
PIM_PROPID
|
PIM_VTDEFAULT
;
TRACE
(
"(%p)->(%s, %p) semi-stub
\n
"
,
This
,
debugstr_a
(
pszName
),
pInfo
);
if
(
!
pszName
||
!
pInfo
)
return
E_INVALIDARG
;
TRACE
(
"mask 0x%04x
\n
"
,
pInfo
->
dwMask
);
if
(
pInfo
->
dwMask
&
~
supported
)
FIXME
(
"Unsupported mask flags 0x%04x
\n
"
,
pInfo
->
dwMask
&
~
supported
);
hr
=
find_prop
(
This
,
pszName
,
&
header
);
if
(
hr
==
S_OK
)
{
if
(
pInfo
->
dwMask
&
PIM_CHARSET
)
pInfo
->
hCharset
=
0
;
if
(
pInfo
->
dwMask
&
PIM_FLAGS
)
pInfo
->
dwFlags
=
0x00000000
;
if
(
pInfo
->
dwMask
&
PIM_ROWNUMBER
)
pInfo
->
dwRowNumber
=
0
;
if
(
pInfo
->
dwMask
&
PIM_ENCODINGTYPE
)
pInfo
->
ietEncoding
=
0
;
if
(
pInfo
->
dwMask
&
PIM_VALUES
)
pInfo
->
cValues
=
0
;
if
(
pInfo
->
dwMask
&
PIM_PROPID
)
pInfo
->
dwPropId
=
header
->
prop
->
id
;
if
(
pInfo
->
dwMask
&
PIM_VTDEFAULT
)
pInfo
->
vtDefault
=
header
->
prop
->
default_vt
;
if
(
pInfo
->
dwMask
&
PIM_VTCURRENT
)
pInfo
->
vtCurrent
=
0
;
}
return
hr
;
}
static
HRESULT
WINAPI
MimeBody_SetPropInfo
(
...
...
dlls/inetcomm/tests/mimeole.c
View file @
79762537
...
...
@@ -424,6 +424,96 @@ static void test_MessageSetProp(void)
IMimeMessage_Release
(
msg
);
}
static
void
test_MessageGetPropInfo
(
void
)
{
static
const
char
topic
[]
=
"wine topic"
;
static
const
char
subject
[]
=
"wine testing"
;
HRESULT
hr
;
IMimeMessage
*
msg
;
IMimeBody
*
body
;
PROPVARIANT
prop
;
MIMEPROPINFO
info
;
hr
=
MimeOleCreateMessage
(
NULL
,
&
msg
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
PropVariantInit
(
&
prop
);
hr
=
IMimeMessage_BindToObject
(
msg
,
HBODY_ROOT
,
&
IID_IMimeBody
,
(
void
**
)
&
body
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
prop
.
vt
=
VT_LPSTR
;
prop
.
u
.
pszVal
=
CoTaskMemAlloc
(
strlen
(
topic
)
+
1
);
strcpy
(
prop
.
u
.
pszVal
,
topic
);
hr
=
IMimeBody_SetProp
(
body
,
"Thread-Topic"
,
0
,
&
prop
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
PropVariantClear
(
&
prop
);
prop
.
vt
=
VT_LPSTR
;
prop
.
u
.
pszVal
=
CoTaskMemAlloc
(
strlen
(
subject
)
+
1
);
strcpy
(
prop
.
u
.
pszVal
,
subject
);
hr
=
IMimeBody_SetProp
(
body
,
PIDTOSTR
(
PID_HDR_SUBJECT
),
0
,
&
prop
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
PropVariantClear
(
&
prop
);
memset
(
&
info
,
0
,
sizeof
(
info
));
info
.
dwMask
=
PIM_ENCODINGTYPE
|
PIM_FLAGS
|
PIM_PROPID
;
hr
=
IMimeBody_GetPropInfo
(
body
,
NULL
,
&
info
);
ok
(
hr
==
E_INVALIDARG
,
"ret %08x
\n
"
,
hr
);
memset
(
&
info
,
0
,
sizeof
(
info
));
info
.
dwMask
=
PIM_ENCODINGTYPE
|
PIM_FLAGS
|
PIM_PROPID
;
hr
=
IMimeBody_GetPropInfo
(
body
,
"Subject"
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"ret %08x
\n
"
,
hr
);
memset
(
&
info
,
0xfe
,
sizeof
(
info
));
info
.
dwMask
=
PIM_ENCODINGTYPE
|
PIM_FLAGS
|
PIM_PROPID
;
hr
=
IMimeBody_GetPropInfo
(
body
,
"Subject"
,
&
info
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
ok
(
info
.
dwMask
&
(
PIM_ENCODINGTYPE
|
PIM_FLAGS
|
PIM_PROPID
),
"Invalid mask 0x%08x
\n
"
,
info
.
dwFlags
);
todo_wine
ok
(
info
.
dwFlags
&
0x10000000
,
"Invalid flags 0x%08x
\n
"
,
info
.
dwFlags
);
ok
(
info
.
ietEncoding
==
0
,
"Invalid encoding %d
\n
"
,
info
.
ietEncoding
);
ok
(
info
.
dwPropId
==
PID_HDR_SUBJECT
,
"Invalid propid %d
\n
"
,
info
.
dwPropId
);
ok
(
info
.
cValues
==
0xfefefefe
,
"Invalid cValues %d
\n
"
,
info
.
cValues
);
}
memset
(
&
info
,
0xfe
,
sizeof
(
info
));
info
.
dwMask
=
0
;
hr
=
IMimeBody_GetPropInfo
(
body
,
"Subject"
,
&
info
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
ok
(
info
.
dwMask
==
0
,
"Invalid mask 0x%08x
\n
"
,
info
.
dwFlags
);
ok
(
info
.
dwFlags
==
0xfefefefe
,
"Invalid flags 0x%08x
\n
"
,
info
.
dwFlags
);
ok
(
info
.
ietEncoding
==
-
16843010
,
"Invalid encoding %d
\n
"
,
info
.
ietEncoding
);
ok
(
info
.
dwPropId
==
-
16843010
,
"Invalid propid %d
\n
"
,
info
.
dwPropId
);
}
memset
(
&
info
,
0xfe
,
sizeof
(
info
));
info
.
dwMask
=
0
;
info
.
dwPropId
=
1024
;
info
.
ietEncoding
=
99
;
hr
=
IMimeBody_GetPropInfo
(
body
,
"Subject"
,
&
info
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
ok
(
info
.
dwMask
==
0
,
"Invalid mask 0x%08x
\n
"
,
info
.
dwFlags
);
ok
(
info
.
dwFlags
==
0xfefefefe
,
"Invalid flags 0x%08x
\n
"
,
info
.
dwFlags
);
ok
(
info
.
ietEncoding
==
99
,
"Invalid encoding %d
\n
"
,
info
.
ietEncoding
);
ok
(
info
.
dwPropId
==
1024
,
"Invalid propid %d
\n
"
,
info
.
dwPropId
);
}
memset
(
&
info
,
0
,
sizeof
(
info
));
info
.
dwMask
=
PIM_ENCODINGTYPE
|
PIM_FLAGS
|
PIM_PROPID
;
hr
=
IMimeBody_GetPropInfo
(
body
,
"Invalid Property"
,
&
info
);
ok
(
hr
==
MIME_E_NOT_FOUND
,
"ret %08x
\n
"
,
hr
);
IMimeBody_Release
(
body
);
IMimeMessage_Release
(
msg
);
}
static
void
test_MessageOptions
(
void
)
{
static
const
char
string
[]
=
"XXXXX"
;
...
...
@@ -534,6 +624,7 @@ START_TEST(mimeole)
test_Allocator
();
test_CreateMessage
();
test_MessageSetProp
();
test_MessageGetPropInfo
();
test_MessageOptions
();
test_BindToObject
();
test_MimeOleGetPropertySchema
();
...
...
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