Commit a8900c9b authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmloader: Move struct definitions to the files they are used in.

parent 8b981266
......@@ -28,6 +28,21 @@ WINE_DECLARE_DEBUG_CHANNEL(dmdump);
#define DMUS_MAX_NAME_SIZE DMUS_MAX_NAME*sizeof(WCHAR)
#define DMUS_MAX_FILENAME_SIZE DMUS_MAX_FILENAME*sizeof(WCHAR)
typedef struct riff_chunk {
FOURCC fccID;
DWORD dwSize;
} WINE_CHUNK;
/* contained object entry */
typedef struct container_entry {
struct list entry;
DMUS_OBJECTDESC Desc;
BOOL bIsRIFF;
DWORD dwFlags; /* DMUS_CONTAINED_OBJF_KEEP: keep object in loader's cache, even when container is released */
WCHAR *wszAlias;
IDirectMusicObject *pObject; /* needed when releasing from loader's cache on container release */
} WINE_CONTAINER_ENTRY, *LPWINE_CONTAINER_ENTRY;
/*****************************************************************************
* IDirectMusicContainerImpl implementation
*/
......
......@@ -56,8 +56,6 @@ static inline void unlock_module(void) { InterlockedDecrement( &module_ref ); }
typedef struct IDirectMusicLoaderCF IDirectMusicLoaderCF;
typedef struct IDirectMusicContainerCF IDirectMusicContainerCF;
typedef struct IDirectMusicLoaderImpl IDirectMusicLoaderImpl;
typedef struct IDirectMusicLoaderFileStream IDirectMusicLoaderFileStream;
typedef struct IDirectMusicLoaderResourceStream IDirectMusicLoaderResourceStream;
typedef struct IDirectMusicLoaderGenericStream IDirectMusicLoaderGenericStream;
......@@ -71,14 +69,6 @@ extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderFileStream (LPVOID *ppobj) D
extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderResourceStream (LPVOID *ppobj) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderGenericStream (LPVOID *ppobj) DECLSPEC_HIDDEN;
/* cache/alias entry */
typedef struct _WINE_LOADER_ENTRY {
struct list entry; /* for listing elements */
DMUS_OBJECTDESC Desc;
LPDIRECTMUSICOBJECT pObject; /* pointer to object */
BOOL bInvalidDefaultDLS; /* my workaround for enabling caching of "faulty" default dls collection */
} WINE_LOADER_ENTRY, *LPWINE_LOADER_ENTRY;
/* cache options, search paths for specific types of objects */
typedef struct _WINE_LOADER_OPTION {
struct list entry; /* for listing elements */
......@@ -87,29 +77,6 @@ typedef struct _WINE_LOADER_OPTION {
} WINE_LOADER_OPTION, *LPWINE_LOADER_OPTION;
/*****************************************************************************
* IDirectMusicLoaderImpl implementation structure
*/
struct IDirectMusicLoaderImpl {
IDirectMusicLoader8 IDirectMusicLoader8_iface;
LONG ref;
unsigned int cache_class;
/* simple cache (linked list) */
struct list *pObjects;
/* settings for certain object classes */
struct list *pClassSettings;
};
/* contained object entry */
typedef struct _WINE_CONTAINER_ENTRY {
struct list entry; /* for listing elements */
DMUS_OBJECTDESC Desc;
BOOL bIsRIFF;
DWORD dwFlags; /* DMUS_CONTAINED_OBJF_KEEP: keep object in loader's cache, even when container is released */
WCHAR* wszAlias;
LPDIRECTMUSICOBJECT pObject; /* needed when releasing from loader's cache on container release */
} WINE_CONTAINER_ENTRY, *LPWINE_CONTAINER_ENTRY;
/*****************************************************************************
* IDirectMusicLoaderFileStream implementation structure
*/
struct IDirectMusicLoaderFileStream {
......@@ -167,15 +134,6 @@ struct IDirectMusicLoaderGenericStream {
/* Custom: */
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_Attach (LPSTREAM iface, LPSTREAM pStream, LPDIRECTMUSICLOADER8 pLoader) DECLSPEC_HIDDEN;
/*****************************************************************************
* Misc.
*/
/* for simpler reading */
typedef struct _WINE_CHUNK {
FOURCC fccID; /* FOURCC ID of the chunk */
DWORD dwSize; /* size of the chunk */
} WINE_CHUNK, *LPWINE_CHUNK;
#include "debug.h"
#endif /* __WINE_DMLOADER_PRIVATE_H */
......@@ -37,6 +37,25 @@ static const GUID *classes[] = {
&CLSID_DirectSoundWave
};
/* cache/alias entry */
typedef struct cache_entry {
struct list entry;
DMUS_OBJECTDESC Desc;
IDirectMusicObject *pObject;
BOOL bInvalidDefaultDLS; /* workaround for enabling caching of "faulty" default dls collection */
} WINE_LOADER_ENTRY, *LPWINE_LOADER_ENTRY;
typedef struct IDirectMusicLoaderImpl {
IDirectMusicLoader8 IDirectMusicLoader8_iface;
LONG ref;
unsigned int cache_class;
/* simple cache */
struct list *pObjects;
/* settings for certain object classes */
struct list *pClassSettings;
} IDirectMusicLoaderImpl;
static inline IDirectMusicLoaderImpl* impl_from_IDirectMusicLoader8(IDirectMusicLoader8 *iface)
{
return CONTAINING_RECORD(iface, IDirectMusicLoaderImpl, IDirectMusicLoader8_iface);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment