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
ef59756a
Commit
ef59756a
authored
Nov 26, 2007
by
Huw Davies
Committed by
Alexandre Julliard
Nov 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Implement IMimeBody:SetData.
parent
dd66f04c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
4 deletions
+55
-4
mimeole.c
dlls/inetcomm/mimeole.c
+42
-2
regsvr.c
dlls/inetcomm/regsvr.c
+3
-1
Makefile.in
dlls/inetcomm/tests/Makefile.in
+1
-1
mimeole.c
dlls/inetcomm/tests/mimeole.c
+9
-0
No files found.
dlls/inetcomm/mimeole.c
View file @
ef59756a
...
...
@@ -104,6 +104,8 @@ typedef struct MimeBody
char
*
content_pri_type
;
char
*
content_sub_type
;
ENCODINGTYPE
encoding
;
void
*
data
;
IID
data_iid
;
}
MimeBody
;
static
inline
MimeBody
*
impl_from_IMimeBody
(
IMimeBody
*
iface
)
...
...
@@ -431,6 +433,16 @@ static void empty_new_prop_list(struct list *list)
}
}
static
void
release_data
(
REFIID
riid
,
void
*
data
)
{
if
(
!
data
)
return
;
if
(
IsEqualIID
(
riid
,
&
IID_IStream
))
IStream_Release
((
IStream
*
)
data
);
else
FIXME
(
"Unhandled data format %s
\n
"
,
debugstr_guid
(
riid
));
}
static
HRESULT
WINAPI
MimeBody_QueryInterface
(
IMimeBody
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
...
...
@@ -480,6 +492,9 @@ static ULONG WINAPI MimeBody_Release(IMimeBody* iface)
HeapFree
(
GetProcessHeap
(),
0
,
This
->
content_pri_type
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
content_sub_type
);
release_data
(
&
This
->
data_iid
,
This
->
data
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -818,8 +833,31 @@ static HRESULT WINAPI MimeBody_SetData(
REFIID
riid
,
LPVOID
pvObject
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
MimeBody
*
This
=
impl_from_IMimeBody
(
iface
);
TRACE
(
"(%p)->(%d, %s, %s, %s %p)
\n
"
,
This
,
ietEncoding
,
debugstr_a
(
pszPriType
),
debugstr_a
(
pszSubType
),
debugstr_guid
(
riid
),
pvObject
);
if
(
IsEqualIID
(
riid
,
&
IID_IStream
))
IStream_AddRef
((
IStream
*
)
pvObject
);
else
{
FIXME
(
"Unhandled object type %s
\n
"
,
debugstr_guid
(
riid
));
return
E_INVALIDARG
;
}
if
(
This
->
data
)
FIXME
(
"release old data
\n
"
);
This
->
data_iid
=
*
riid
;
This
->
data
=
pvObject
;
IMimeBody_SetCurrentEncoding
(
iface
,
ietEncoding
);
/* FIXME: Update the content type.
If pszPriType == NULL use 'application'
If pszSubType == NULL use 'octet-stream' */
return
S_OK
;
}
static
HRESULT
WINAPI
MimeBody_EmptyData
(
...
...
@@ -934,6 +972,8 @@ HRESULT MimeBody_create(IUnknown *outer, void **obj)
This
->
content_pri_type
=
NULL
;
This
->
content_sub_type
=
NULL
;
This
->
encoding
=
IET_7BIT
;
This
->
data
=
NULL
;
This
->
data_iid
=
IID_NULL
;
*
obj
=
(
IMimeBody
*
)
&
This
->
lpVtbl
;
return
S_OK
;
...
...
dlls/inetcomm/regsvr.c
View file @
ef59756a
...
...
@@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define INITGUID
#include <stdarg.h>
#include <string.h>
...
...
@@ -28,7 +27,10 @@
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "objbase.h"
#include "ocidl.h"
#include "initguid.h"
#include "inetcomm_private.h"
#include "mimeole.h"
...
...
dlls/inetcomm/tests/Makefile.in
View file @
ef59756a
...
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
TESTDLL
=
inetcomm.dll
IMPORTS
=
inetcomm ole32 kernel32
EXTRALIBS
=
EXTRALIBS
=
-luuid
CTESTS
=
\
mimeole.c
...
...
dlls/inetcomm/tests/mimeole.c
View file @
ef59756a
...
...
@@ -125,6 +125,15 @@ static void test_CreateBody(void)
hr
=
IMimeBody_IsContentType
(
body
,
NULL
,
"mixed"
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeBody_SetData
(
body
,
IET_8BIT
,
"text"
,
"plain"
,
&
IID_IStream
,
in
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeBody_IsContentType
(
body
,
"text"
,
"plain"
);
todo_wine
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeBody_GetCurrentEncoding
(
body
,
&
enc
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
enc
==
IET_8BIT
,
"encoding %d
\n
"
,
enc
);
IMimeBody_Release
(
body
);
}
...
...
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