dpnet: Implement IDirectPlay8Address AddComponent.
[wine.git] / dlls / dpnet / dpnet_private.h
blob61e2200b177b28110afbe5d81532fc0bc700913e
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 #ifndef __WINE_CONFIG_H
25 # error You must include config.h to use this header
26 #endif
28 #include <wine/list.h>
30 #include "dplay8.h"
31 #include "dplobby8.h"
33 *#include "dplay8sp.h"
36 /* DirectPlay8 Interfaces: */
37 typedef struct IDirectPlay8ClientImpl IDirectPlay8ClientImpl;
38 typedef struct IDirectPlay8AddressImpl IDirectPlay8AddressImpl;
39 typedef struct IDirectPlay8LobbiedApplicationImpl IDirectPlay8LobbiedApplicationImpl;
40 typedef struct IDirectPlay8ThreadPoolImpl IDirectPlay8ThreadPoolImpl;
42 /* ------------------ */
43 /* IDirectPlay8Client */
44 /* ------------------ */
46 /*****************************************************************************
47 * IDirectPlay8Client implementation structure
49 struct IDirectPlay8ClientImpl
51 IDirectPlay8Client IDirectPlay8Client_iface;
52 LONG ref;
54 /* IDirectPlay8Client fields */
55 PFNDPNMESSAGEHANDLER msghandler;
56 DWORD flags;
57 void *usercontext;
59 DPN_SP_CAPS spcaps;
62 /* ------------------- */
63 /* IDirectPlay8Address */
64 /* ------------------- */
65 struct component
67 struct list entry;
69 WCHAR *name;
70 DWORD type;
72 union
74 DWORD value; /* DPNA_DATATYPE_DWORD */
75 GUID guid; /* DPNA_DATATYPE_GUID */
76 WCHAR *string; /* DPNA_DATATYPE_STRING */
77 char *ansi; /* DPNA_DATATYPE_STRING_ANSI */
78 void *binary; /* DPNA_DATATYPE_BINARY */
79 } data;
82 /*****************************************************************************
83 * IDirectPlay8Address implementation structure
85 struct IDirectPlay8AddressImpl
87 IDirectPlay8Address IDirectPlay8Address_iface;
88 LONG ref;
89 /* IDirectPlay8Address fields */
90 GUID SP_guid;
91 BOOL init;
93 struct list components;
96 /*****************************************************************************
97 * IDirectPlay8LobbiedApplication implementation structure
99 struct IDirectPlay8LobbiedApplicationImpl
101 IDirectPlay8LobbiedApplication IDirectPlay8LobbiedApplication_iface;
102 LONG ref;
104 PFNDPNMESSAGEHANDLER msghandler;
105 DWORD flags;
106 void *usercontext;
107 DPNHANDLE *connection;
110 /*****************************************************************************
111 * IDirectPlay8ThreadPool implementation structure
113 struct IDirectPlay8ThreadPoolImpl
115 IDirectPlay8ThreadPool IDirectPlay8ThreadPool_iface;
116 LONG ref;
120 * factories
122 extern HRESULT DPNET_CreateDirectPlay8Client(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
123 extern HRESULT DPNET_CreateDirectPlay8Server(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
124 extern HRESULT DPNET_CreateDirectPlay8Peer(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
125 extern HRESULT DPNET_CreateDirectPlay8Address(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
126 extern HRESULT DPNET_CreateDirectPlay8LobbiedApp(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
127 extern HRESULT DPNET_CreateDirectPlay8ThreadPool(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
128 extern HRESULT DPNET_CreateDirectPlay8LobbyClient(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, void **ppobj) DECLSPEC_HIDDEN;
130 extern void init_dpn_sp_caps(DPN_SP_CAPS *dpnspcaps) DECLSPEC_HIDDEN;
132 /* used for generic dumping (copied from ddraw) */
133 typedef struct {
134 DWORD val;
135 const char* name;
136 } flag_info;
138 typedef struct {
139 const GUID *guid;
140 const char* name;
141 } guid_info;
143 #define FE(x) { x, #x }
144 #define GE(x) { &x, #x }
148 #endif