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
dcb659f0
Commit
dcb659f0
authored
May 03, 2016
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
May 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Improve IMimeMessage SetOption.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2fff4d03
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
7 deletions
+26
-7
mimeole.c
dlls/inetcomm/mimeole.c
+12
-4
mimeole.c
dlls/inetcomm/tests/mimeole.c
+10
-3
mimeole.idl
include/mimeole.idl
+4
-0
No files found.
dlls/inetcomm/mimeole.c
View file @
dcb659f0
...
...
@@ -2305,27 +2305,35 @@ static HRESULT WINAPI MimeMessage_SetOption(
const
TYPEDID
oid
,
LPCPROPVARIANT
pValue
)
{
HRESULT
hr
=
E_NOTIMPL
;
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p)->(%08x, %p)
\n
"
,
iface
,
oid
,
pValue
);
/* Message ID is checked before type.
* OID 0x4D -> 0x56 and 0x58 aren't defined but will filtered out later.
*/
if
(
TYPEDID_ID
(
oid
)
<
TYPEDID_ID
(
OID_ALLOW_8BIT_HEADER
)
||
TYPEDID_ID
(
oid
)
>
TYPEDID_ID
(
OID_SECURITY_2KEY_CERT_BAG_64
))
{
WARN
(
"oid (%08x) out of range
\n
"
,
oid
);
return
MIME_E_INVALID_OPTION_ID
;
}
if
(
pValue
->
vt
!=
TYPEDID_TYPE
(
oid
))
{
WARN
(
"Called with vartype %04x and oid %08x
\n
"
,
pValue
->
vt
,
oid
);
return
E_INVALIDARG
;
return
S_OK
;
}
switch
(
oid
)
{
case
OID_HIDE_TNEF_ATTACHMENTS
:
FIXME
(
"OID_HIDE_TNEF_ATTACHMENTS (value %d): ignoring
\n
"
,
pValue
->
u
.
boolVal
);
hr
=
S_OK
;
break
;
case
OID_SHOW_MACBINARY
:
FIXME
(
"OID_SHOW_MACBINARY (value %d): ignoring
\n
"
,
pValue
->
u
.
boolVal
);
hr
=
S_OK
;
break
;
default:
FIXME
(
"Unhandled oid %08x
\n
"
,
oid
);
hr
=
MIME_E_INVALID_OPTION_ID
;
}
return
hr
;
...
...
dlls/inetcomm/tests/mimeole.c
View file @
dcb659f0
...
...
@@ -412,7 +412,7 @@ static void test_MessageOptions(void)
prop
.
u
.
pszVal
=
CoTaskMemAlloc
(
strlen
(
string
)
+
1
);
strcpy
(
prop
.
u
.
pszVal
,
string
);
hr
=
IMimeMessage_SetOption
(
msg
,
OID_HIDE_TNEF_ATTACHMENTS
,
&
prop
);
todo_wine
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
PropVariantClear
(
&
prop
);
hr
=
IMimeMessage_GetOption
(
msg
,
OID_HIDE_TNEF_ATTACHMENTS
,
&
prop
);
...
...
@@ -426,7 +426,7 @@ static void test_MessageOptions(void)
prop
.
u
.
pszVal
=
CoTaskMemAlloc
(
strlen
(
zero
)
+
1
);
strcpy
(
prop
.
u
.
pszVal
,
zero
);
hr
=
IMimeMessage_SetOption
(
msg
,
OID_HIDE_TNEF_ATTACHMENTS
,
&
prop
);
todo_wine
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
PropVariantClear
(
&
prop
);
hr
=
IMimeMessage_GetOption
(
msg
,
OID_HIDE_TNEF_ATTACHMENTS
,
&
prop
);
...
...
@@ -439,7 +439,14 @@ static void test_MessageOptions(void)
prop
.
vt
=
VT_BOOL
;
prop
.
u
.
boolVal
=
TRUE
;
hr
=
IMimeMessage_SetOption
(
msg
,
0xff00000a
,
&
prop
);
todo_wine
ok
(
hr
==
MIME_E_INVALID_OPTION_ID
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
MIME_E_INVALID_OPTION_ID
,
"ret %08x
\n
"
,
hr
);
PropVariantClear
(
&
prop
);
/* Out of range before type. */
prop
.
vt
=
VT_I4
;
prop
.
u
.
lVal
=
1
;
hr
=
IMimeMessage_SetOption
(
msg
,
0xff00000a
,
&
prop
);
ok
(
hr
==
MIME_E_INVALID_OPTION_ID
,
"ret %08x
\n
"
,
hr
);
PropVariantClear
(
&
prop
);
IMimeMessage_Release
(
msg
);
...
...
include/mimeole.idl
View file @
dcb659f0
...
...
@@ -153,6 +153,7 @@ cpp_quote(" PID_ATT_ACCOUNTNAME = 78,")
cpp_quote
(
" PID_LAST = 79,"
)
cpp_quote
(
"} MIMEPROPID;"
)
cpp_quote
(
"#define TYPEDID_ID(_typedid) (((ULONG)(_typedid))>>16)"
)
cpp_quote
(
"#define TYPEDID_MASK ((ULONG)0xffff)"
)
cpp_quote
(
"#define TYPEDID_TYPE(t) ((VARTYPE)((t) & TYPEDID_MASK))"
)
...
...
@@ -177,6 +178,9 @@ cpp_quote("#define OID_CAN_INLINE_TEXT_BODIES (0x00380000 | VT_BOOL)")
cpp_quote
(
"#define OID_SHOW_MACBINARY (0x00390000 | VT_BOOL)"
)
cpp_quote
(
"#define OID_SAVEBODY_KEEPBOUNDARY (0x00400000 | VT_BOOL)"
)
cpp_quote
(
"#define OID_SECURITY_2KEY_CERT_BAG (0x00590000 | VT_VECTOR | VT_UI4)"
)
cpp_quote
(
"#define OID_SECURITY_2KEY_CERT_BAG_64 (0x00590000 | VT_VECTOR | VT_UI8)"
)
[
uuid
(
e4b28371
-
83b0
-
11
d0
-
8259
-
00
c04fd85ab4
),
version
(
1.0
)
...
...
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