ntoskrnl.exe/tests: Add some IOCTL_HID_WRITE_REPORT tests.
[wine.git] / dlls / dpnet / dpnet_private.h
blob9458a5123aaff0d275f5559f978af63473f9ef6d
1 /*
2 * DirectPlay8 (dpnet) private include file
4 * Copyright 2004 Raphael Junqueira
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_DPNET_PRIVATE_H
22 #define __WINE_DPNET_PRIVATE_H
24 #include "wine/heap.h"
25 #include <wine/list.h>
26 #include "winsock2.h"
28 #include "dplay8.h"
29 #include "dplobby8.h"
31 *#include "dplay8sp.h"
34 /* DirectPlay8 Interfaces: */
35 typedef struct IDirectPlay8ClientImpl IDirectPlay8ClientImpl;
36 typedef struct IDirectPlay8AddressImpl IDirectPlay8AddressImpl;
37 typedef struct IDirectPlay8LobbiedApplicationImpl IDirectPlay8LobbiedApplicationImpl;
38 typedef struct IDirectPlay8ThreadPoolImpl IDirectPlay8ThreadPoolImpl;
40 /* ------------------ */
41 /* IDirectPlay8Client */
42 /* ------------------ */
44 /*****************************************************************************
45 * IDirectPlay8Client implementation structure
47 struct IDirectPlay8ClientImpl
49 IDirectPlay8Client IDirectPlay8Client_iface;
50 LONG ref;
52 /* IDirectPlay8Client fields */
53 PFNDPNMESSAGEHANDLER msghandler;
54 DWORD flags;
55 void *usercontext;
56 WCHAR *username;
57 void *data;
58 DWORD datasize;
60 DPN_SP_CAPS spcaps;
63 /* ------------------- */
64 /* IDirectPlay8Address */
65 /* ------------------- */
66 struct component
68 struct list entry;
70 WCHAR *name;
71 DWORD type;
72 DWORD size;
74 union
76 DWORD value; /* DPNA_DATATYPE_DWORD */
77 GUID guid; /* DPNA_DATATYPE_GUID */
78 WCHAR *string; /* DPNA_DATATYPE_STRING */
79 char *ansi; /* DPNA_DATATYPE_STRING_ANSI */
80 void *binary; /* DPNA_DATATYPE_BINARY */
81 } data;
84 /*****************************************************************************
85 * IDirectPlay8Address implementation structure
87 struct IDirectPlay8AddressImpl
89 IDirectPlay8Address IDirectPlay8Address_iface;
90 LONG ref;
91 /* IDirectPlay8Address fields */
92 GUID SP_guid;
93 BOOL init;
95 struct component **components;
96 DWORD comp_count;
97 DWORD comp_array_size;
100 /*****************************************************************************
101 * IDirectPlay8LobbiedApplication implementation structure
103 struct IDirectPlay8LobbiedApplicationImpl
105 IDirectPlay8LobbiedApplication IDirectPlay8LobbiedApplication_iface;
106 LONG ref;
108 PFNDPNMESSAGEHANDLER msghandler;
109 DWORD flags;
110 void *usercontext;
111 DPNHANDLE *connection;
114 /*****************************************************************************
115 * IDirectPlay8ThreadPool implementation structure
117 struct IDirectPlay8ThreadPoolImpl
119 IDirectPlay8ThreadPool IDirectPlay8ThreadPool_iface;
120 LONG ref;
124 * factories
126 extern HRESULT DPNET_CreateDirectPlay8Client(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
127 extern HRESULT DPNET_CreateDirectPlay8Server(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
128 extern HRESULT DPNET_CreateDirectPlay8Peer(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
129 extern HRESULT DPNET_CreateDirectPlay8Address(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
130 extern HRESULT DPNET_CreateDirectPlay8LobbiedApp(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
131 extern HRESULT DPNET_CreateDirectPlay8ThreadPool(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
132 extern HRESULT DPNET_CreateDirectPlay8LobbyClient(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, void **ppobj) DECLSPEC_HIDDEN;
134 extern void init_dpn_sp_caps(DPN_SP_CAPS *dpnspcaps) DECLSPEC_HIDDEN;
135 extern void init_winsock(void) DECLSPEC_HIDDEN;
136 extern HRESULT enum_services_providers(const GUID * const service, DPN_SERVICE_PROVIDER_INFO * const info_buffer,
137 DWORD * const buf_size, DWORD * const returned) DECLSPEC_HIDDEN;
139 /* used for generic dumping (copied from ddraw) */
140 typedef struct {
141 DWORD val;
142 const char* name;
143 } flag_info;
145 typedef struct {
146 const GUID *guid;
147 const char* name;
148 } guid_info;
150 #define FE(x) { x, #x }
151 #define GE(x) { &x, #x }
153 static inline WCHAR *heap_strdupW( const WCHAR *src )
155 WCHAR *dst;
156 if (!src) return NULL;
157 if ((dst = heap_alloc( (lstrlenW( src ) + 1) * sizeof(WCHAR) ))) lstrcpyW( dst, src );
158 return dst;
161 #endif