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
95763d91
Commit
95763d91
authored
Sep 23, 2014
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Sep 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpvoice: Add IDirectPlayVoiceServer support.
parent
300f53a4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
200 additions
and
1 deletion
+200
-1
Makefile.in
dlls/dpvoice/Makefile.in
+2
-1
dvoice_private.h
dlls/dpvoice/dvoice_private.h
+1
-0
main.c
dlls/dpvoice/main.c
+1
-0
server.c
dlls/dpvoice/server.c
+196
-0
No files found.
dlls/dpvoice/Makefile.in
View file @
95763d91
...
...
@@ -3,7 +3,8 @@ IMPORTS = dxguid uuid
C_SRCS
=
\
client.c
\
main.c
main.c
\
server.c
RC_SRCS
=
version.rc
...
...
dlls/dpvoice/dvoice_private.h
View file @
95763d91
...
...
@@ -21,5 +21,6 @@
#define __DVOICE_PRIVATE_H__
extern
HRESULT
DPVOICE_CreateDirectPlayVoiceClient
(
IClassFactory
*
iface
,
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppobj
)
DECLSPEC_HIDDEN
;
extern
HRESULT
DPVOICE_CreateDirectPlayVoiceServer
(
IClassFactory
*
iface
,
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppobj
)
DECLSPEC_HIDDEN
;
#endif
dlls/dpvoice/main.c
View file @
95763d91
...
...
@@ -95,6 +95,7 @@ static const IClassFactoryVtbl DICF_Vtbl = {
static
IClassFactoryImpl
DPVOICE_CFS
[]
=
{
{
{
&
DICF_Vtbl
},
1
,
&
CLSID_DirectPlayVoiceClient
,
DPVOICE_CreateDirectPlayVoiceClient
},
{
{
&
DICF_Vtbl
},
1
,
&
CLSID_DirectPlayVoiceServer
,
DPVOICE_CreateDirectPlayVoiceServer
},
{
{
NULL
},
0
,
NULL
,
NULL
}
};
...
...
dlls/dpvoice/server.c
0 → 100644
View file @
95763d91
/*
* DirectPlay Voice Server Interface
*
* Copyright (C) 2014 Alistair Leslie-Hughes
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "objbase.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "dvoice.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dpvoice
);
typedef
struct
IDirectPlayVoiceServerImpl
{
IDirectPlayVoiceServer
IDirectPlayVoiceServer_iface
;
LONG
ref
;
}
IDirectPlayVoiceServerImpl
;
static
inline
IDirectPlayVoiceServerImpl
*
impl_from_IDirectPlayVoiceServer
(
IDirectPlayVoiceServer
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirectPlayVoiceServerImpl
,
IDirectPlayVoiceServer_iface
);
}
static
HRESULT
WINAPI
dpvserver_QueryInterface
(
IDirectPlayVoiceServer
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IDirectPlayVoiceServer
))
{
IUnknown_AddRef
(
iface
);
*
ppv
=
iface
;
return
S_OK
;
}
WARN
(
"(%p)->(%s,%p),not found
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
dpvserver_AddRef
(
IDirectPlayVoiceServer
*
iface
)
{
IDirectPlayVoiceServerImpl
*
This
=
impl_from_IDirectPlayVoiceServer
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%u
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
dpvserver_Release
(
IDirectPlayVoiceServer
*
iface
)
{
IDirectPlayVoiceServerImpl
*
This
=
impl_from_IDirectPlayVoiceServer
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%u
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
}
static
HRESULT
WINAPI
dpvserver_Initialize
(
IDirectPlayVoiceServer
*
iface
,
IUnknown
*
lpVoid
,
PDVMESSAGEHANDLER
pMessageHandler
,
void
*
pUserContext
,
DWORD
*
lpdwMessageMask
,
DWORD
dwMessageMaskElements
)
{
IDirectPlayVoiceServerImpl
*
This
=
impl_from_IDirectPlayVoiceServer
(
iface
);
FIXME
(
"%p %p %p %p %p %d
\n
"
,
This
,
lpVoid
,
pMessageHandler
,
pUserContext
,
lpdwMessageMask
,
dwMessageMaskElements
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dpvserver_StartSession
(
IDirectPlayVoiceServer
*
iface
,
PDVSESSIONDESC
pSessionDesc
,
DWORD
dwFlags
)
{
IDirectPlayVoiceServerImpl
*
This
=
impl_from_IDirectPlayVoiceServer
(
iface
);
FIXME
(
"%p %p %d
\n
"
,
This
,
pSessionDesc
,
dwFlags
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dpvserver_StopSession
(
IDirectPlayVoiceServer
*
iface
,
DWORD
dwFlags
)
{
IDirectPlayVoiceServerImpl
*
This
=
impl_from_IDirectPlayVoiceServer
(
iface
);
FIXME
(
"%p %d
\n
"
,
This
,
dwFlags
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dpvserver_GetSessionDesc
(
IDirectPlayVoiceServer
*
iface
,
PDVSESSIONDESC
pvSessionDesc
)
{
IDirectPlayVoiceServerImpl
*
This
=
impl_from_IDirectPlayVoiceServer
(
iface
);
FIXME
(
"%p %p
\n
"
,
This
,
pvSessionDesc
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dpvserver_SetSessionDesc
(
IDirectPlayVoiceServer
*
iface
,
PDVSESSIONDESC
pSessionDesc
)
{
IDirectPlayVoiceServerImpl
*
This
=
impl_from_IDirectPlayVoiceServer
(
iface
);
FIXME
(
"%p %p
\n
"
,
This
,
pSessionDesc
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dpvserver_GetCaps
(
IDirectPlayVoiceServer
*
iface
,
PDVCAPS
pDVCaps
)
{
IDirectPlayVoiceServerImpl
*
This
=
impl_from_IDirectPlayVoiceServer
(
iface
);
FIXME
(
"%p %p
\n
"
,
This
,
pDVCaps
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dpvserver_GetCompressionTypes
(
IDirectPlayVoiceServer
*
iface
,
void
*
pData
,
DWORD
*
pdwDataSize
,
DWORD
*
pdwNumElements
,
DWORD
dwFlags
)
{
IDirectPlayVoiceServerImpl
*
This
=
impl_from_IDirectPlayVoiceServer
(
iface
);
FIXME
(
"%p %p %p %p %d
\n
"
,
This
,
pData
,
pdwDataSize
,
pdwNumElements
,
dwFlags
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dpvserver_SetTransmitTargets
(
IDirectPlayVoiceServer
*
iface
,
DVID
dvSource
,
PDVID
pdvIDTargets
,
DWORD
dwNumTargets
,
DWORD
dwFlags
)
{
IDirectPlayVoiceServerImpl
*
This
=
impl_from_IDirectPlayVoiceServer
(
iface
);
FIXME
(
"%p %d %p %d %d
\n
"
,
This
,
dvSource
,
pdvIDTargets
,
dwNumTargets
,
dwFlags
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dpvserver_GetTransmitTargets
(
IDirectPlayVoiceServer
*
iface
,
DVID
dvSource
,
PDVID
pdvIDTargets
,
DWORD
*
pdwNumTargets
,
DWORD
dwFlags
)
{
IDirectPlayVoiceServerImpl
*
This
=
impl_from_IDirectPlayVoiceServer
(
iface
);
FIXME
(
"%p %d %p %p %d
\n
"
,
This
,
dvSource
,
pdvIDTargets
,
pdwNumTargets
,
dwFlags
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dpvserver_SetNotifyMask
(
IDirectPlayVoiceServer
*
iface
,
DWORD
*
pdwMessageMask
,
DWORD
dwMessageMaskElements
)
{
IDirectPlayVoiceServerImpl
*
This
=
impl_from_IDirectPlayVoiceServer
(
iface
);
FIXME
(
"%p %p %d
\n
"
,
This
,
pdwMessageMask
,
dwMessageMaskElements
);
return
E_NOTIMPL
;
}
static
const
IDirectPlayVoiceServerVtbl
DirectPlayVoiceServer_Vtbl
=
{
dpvserver_QueryInterface
,
dpvserver_AddRef
,
dpvserver_Release
,
dpvserver_Initialize
,
dpvserver_StartSession
,
dpvserver_StopSession
,
dpvserver_GetSessionDesc
,
dpvserver_SetSessionDesc
,
dpvserver_GetCaps
,
dpvserver_GetCompressionTypes
,
dpvserver_SetTransmitTargets
,
dpvserver_GetTransmitTargets
,
dpvserver_SetNotifyMask
};
HRESULT
DPVOICE_CreateDirectPlayVoiceServer
(
IClassFactory
*
iface
,
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppobj
)
{
IDirectPlayVoiceServerImpl
*
server
;
HRESULT
ret
;
TRACE
(
"(%p, %s, %p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
riid
),
ppobj
);
*
ppobj
=
NULL
;
server
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirectPlayVoiceServerImpl
));
if
(
!
server
)
return
E_OUTOFMEMORY
;
server
->
IDirectPlayVoiceServer_iface
.
lpVtbl
=
&
DirectPlayVoiceServer_Vtbl
;
server
->
ref
=
1
;
ret
=
IDirectPlayVoiceServer_QueryInterface
(
&
server
->
IDirectPlayVoiceServer_iface
,
riid
,
ppobj
);
IDirectPlayVoiceServer_Release
(
&
server
->
IDirectPlayVoiceServer_iface
);
return
ret
;
}
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