]> icculus.org git repositories - taylor/freespace2.git/blob - include/vdplobby.h
Initial revision
[taylor/freespace2.git] / include / vdplobby.h
1 /*==========================================================================;
2  *
3  *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
4  *
5  *  File:       dplobby.h
6  *  Content:    DirectPlayLobby include file
7  ***************************************************************************/
8 #ifndef __DPLOBBY_INCLUDED__
9 #define __DPLOBBY_INCLUDED__
10
11 #include "vdplay.h"
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif /* __cplusplus */
16
17 /*
18  * GUIDS used by DirectPlay objects
19  */
20
21 /* {AF465C71-9588-11cf-A020-00AA006157AC} */
22 DEFINE_GUID(IID_IDirectPlayLobby, 0xaf465c71, 0x9588, 0x11cf, 0xa0, 0x20, 0x0, 0xaa, 0x0, 0x61, 0x57, 0xac);
23 /* {26C66A70-B367-11cf-A024-00AA006157AC} */
24 DEFINE_GUID(IID_IDirectPlayLobbyA, 0x26c66a70, 0xb367, 0x11cf, 0xa0, 0x24, 0x0, 0xaa, 0x0, 0x61, 0x57, 0xac);
25 /* {0194C220-A303-11d0-9C4F-00A0C905425E} */
26 DEFINE_GUID(IID_IDirectPlayLobby2, 0x194c220, 0xa303, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
27 /* {1BB4AF80-A303-11d0-9C4F-00A0C905425E} */
28 DEFINE_GUID(IID_IDirectPlayLobby2A, 0x1bb4af80, 0xa303, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
29 /* {2FE8F810-B2A5-11d0-A787-0000F803ABFC} */
30 DEFINE_GUID(CLSID_DirectPlayLobby, 0x2fe8f810, 0xb2a5, 0x11d0, 0xa7, 0x87, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
31
32
33 /****************************************************************************
34  *
35  * IDirectPlayLobby Structures
36  *
37  * Various structures used to invoke DirectPlayLobby.
38  *
39  ****************************************************************************/
40
41 typedef struct IDirectPlayLobby     FAR *LPDIRECTPLAYLOBBY;
42 typedef struct IDirectPlayLobby     FAR *LPDIRECTPLAYLOBBYA;
43 typedef struct IDirectPlayLobby     IDirectPlayLobbyA;
44
45 typedef struct IDirectPlayLobby2    FAR *LPDIRECTPLAYLOBBY2;
46 typedef struct IDirectPlayLobby2    FAR *LPDIRECTPLAYLOBBY2A;
47 typedef struct IDirectPlayLobby2    IDirectPlayLobby2A;
48
49
50 /*
51  * DPLAPPINFO
52  * Used to hold information about a registered DirectPlay
53  * application
54  */
55 typedef struct DPLAPPINFO
56 {
57     DWORD       dwSize;             // Size of this structure
58     GUID        guidApplication;    // GUID of the Application
59     union
60     {
61         LPSTR   lpszAppNameA;       // Pointer to the Application Name
62         LPWSTR  lpszAppName;
63     };
64
65 } DPLAPPINFO, FAR *LPDPLAPPINFO;
66
67 /*
68  * LPCDPLAPPINFO
69  * A constant pointer to DPLAPPINFO
70  */
71 typedef const DPLAPPINFO FAR *LPCDPLAPPINFO;
72
73 /*
74  * DPCOMPOUNDADDRESSELEMENT
75  *
76  * An array of these is passed to CreateCompoundAddresses()
77  */
78 typedef struct DPCOMPOUNDADDRESSELEMENT
79 {
80     GUID                guidDataType;
81     DWORD               dwDataSize;
82         LPVOID                          lpData;
83 } DPCOMPOUNDADDRESSELEMENT, FAR *LPDPCOMPOUNDADDRESSELEMENT;
84
85 /*
86  * LPCDPCOMPOUNDADDRESSELEMENT
87  * A constant pointer to DPCOMPOUNDADDRESSELEMENT
88  */
89 typedef const DPCOMPOUNDADDRESSELEMENT FAR *LPCDPCOMPOUNDADDRESSELEMENT;
90
91
92 /****************************************************************************
93  *
94  * Enumeration Method Callback Prototypes
95  *
96  ****************************************************************************/
97
98 /*
99  * Callback for EnumAddress()
100  */
101 typedef BOOL (FAR PASCAL *LPDPENUMADDRESSCALLBACK)(
102     REFGUID         guidDataType,
103     DWORD           dwDataSize,
104     LPCVOID         lpData,
105     LPVOID          lpContext);
106
107 /*
108  * Callback for EnumAddressTypes()
109  */
110 typedef BOOL (FAR PASCAL *LPDPLENUMADDRESSTYPESCALLBACK)(
111     REFGUID         guidDataType,
112     LPVOID          lpContext,
113     DWORD           dwFlags);
114
115 /*
116  * Callback for EnumLocalApplications()
117  */
118 typedef BOOL (FAR PASCAL * LPDPLENUMLOCALAPPLICATIONSCALLBACK)(
119     LPCDPLAPPINFO   lpAppInfo,
120     LPVOID          lpContext,
121     DWORD           dwFlags);
122
123
124 /****************************************************************************
125  *
126  * DirectPlayLobby API Prototypes
127  *
128  ****************************************************************************/
129 #ifdef UNICODE
130 #define DirectPlayLobbyCreate   DirectPlayLobbyCreateW
131 #else
132 #define DirectPlayLobbyCreate   DirectPlayLobbyCreateA
133 #endif /* UNICODE */
134
135 extern HRESULT WINAPI DirectPlayLobbyCreateW(LPGUID, LPDIRECTPLAYLOBBY *, IUnknown *, LPVOID, DWORD );
136 extern HRESULT WINAPI DirectPlayLobbyCreateA(LPGUID, LPDIRECTPLAYLOBBYA *, IUnknown *, LPVOID, DWORD );
137
138
139 /****************************************************************************
140  *
141  * IDirectPlayLobby (and IDirectPlayLobbyA) Interface
142  *
143  ****************************************************************************/
144 #undef INTERFACE
145 #define INTERFACE IDirectPlayLobby
146 DECLARE_INTERFACE_( IDirectPlayLobby, IUnknown )
147 {
148     /*  IUnknown Methods        */
149     STDMETHOD(QueryInterface)       (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
150     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
151     STDMETHOD_(ULONG,Release)       (THIS) PURE;
152
153     /*  IDirectPlayLobby Methods        */
154     STDMETHOD(Connect)              (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE;
155     STDMETHOD(CreateAddress)        (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE;
156     STDMETHOD(EnumAddress)          (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE;
157     STDMETHOD(EnumAddressTypes)     (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE;
158     STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE;
159     STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE;
160     STDMETHOD(ReceiveLobbyMessage)  (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE;
161     STDMETHOD(RunApplication)       (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE;
162     STDMETHOD(SendLobbyMessage)     (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE;
163     STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE;
164     STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE;
165
166 };
167
168 /****************************************************************************
169  *
170  * IDirectPlayLobby2 (and IDirectPlayLobby2A) Interface
171  *
172  ****************************************************************************/
173 #undef INTERFACE
174 #define INTERFACE IDirectPlayLobby2
175 DECLARE_INTERFACE_( IDirectPlayLobby2, IDirectPlayLobby )
176 {
177     /*  IUnknown Methods        */
178     STDMETHOD(QueryInterface)       (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
179     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
180     STDMETHOD_(ULONG,Release)       (THIS) PURE;
181
182     /*  IDirectPlayLobby Methods        */
183     STDMETHOD(Connect)              (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE;
184     STDMETHOD(CreateAddress)        (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE;
185     STDMETHOD(EnumAddress)          (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE;
186     STDMETHOD(EnumAddressTypes)     (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE;
187     STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE;
188     STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE;
189     STDMETHOD(ReceiveLobbyMessage)  (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE;
190     STDMETHOD(RunApplication)       (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE;
191     STDMETHOD(SendLobbyMessage)     (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE;
192     STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE;
193     STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE;
194
195     /*  IDirectPlayLobby2 Methods       */
196     STDMETHOD(CreateCompoundAddress)(THIS_ LPCDPCOMPOUNDADDRESSELEMENT,DWORD,LPVOID,LPDWORD) PURE;
197 };
198
199 /****************************************************************************
200  *
201  * IDirectPlayLobby interface macros
202  *
203  ****************************************************************************/
204
205 #if !defined(__cplusplus) || defined(CINTERFACE)
206
207 #define IDirectPlayLobby_QueryInterface(p,a,b)              (p)->lpVtbl->QueryInterface(p,a,b)
208 #define IDirectPlayLobby_AddRef(p)                          (p)->lpVtbl->AddRef(p)
209 #define IDirectPlayLobby_Release(p)                         (p)->lpVtbl->Release(p)
210 #define IDirectPlayLobby_Connect(p,a,b,c)                   (p)->lpVtbl->Connect(p,a,b,c)
211 #define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f)       (p)->lpVtbl->CreateAddress(p,a,b,c,d,e,f)
212 #define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d)   (p)->lpVtbl->CreateCompoundAddress(p,a,b,c,d)
213 #define IDirectPlayLobby_EnumAddress(p,a,b,c,d)             (p)->lpVtbl->EnumAddress(p,a,b,c,d)
214 #define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d)        (p)->lpVtbl->EnumAddressTypes(p,a,b,c,d)
215 #define IDirectPlayLobby_EnumLocalApplications(p,a,b,c)     (p)->lpVtbl->EnumLocalApplications(p,a,b,c)
216 #define IDirectPlayLobby_GetConnectionSettings(p,a,b,c)     (p)->lpVtbl->GetConnectionSettings(p,a,b,c)
217 #define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e)   (p)->lpVtbl->ReceiveLobbyMessage(p,a,b,c,d,e)
218 #define IDirectPlayLobby_RunApplication(p,a,b,c,d)          (p)->lpVtbl->RunApplication(p,a,b,c,d)
219 #define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d)        (p)->lpVtbl->SendLobbyMessage(p,a,b,c,d)
220 #define IDirectPlayLobby_SetConnectionSettings(p,a,b,c)         (p)->lpVtbl->SetConnectionSettings(p,a,b,c)
221 #define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c)      (p)->lpVtbl->SetLobbyMessageEvent(p,a,b,c)
222
223 #else /* C++ */
224
225 #define IDirectPlayLobby_QueryInterface(p,a,b)              (p)->QueryInterface(a,b)
226 #define IDirectPlayLobby_AddRef(p)                          (p)->AddRef()
227 #define IDirectPlayLobby_Release(p)                         (p)->Release()
228 #define IDirectPlayLobby_Connect(p,a,b,c)                   (p)->Connect(a,b,c)
229 #define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f)       (p)->CreateAddress(a,b,c,d,e,f)
230 #define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d)   (p)->lpVtbl->CreateCompoundAddress(a,b,c,d)
231 #define IDirectPlayLobby_EnumAddress(p,a,b,c,d)             (p)->EnumAddress(a,b,c,d)
232 #define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d)        (p)->EnumAddressTypes(a,b,c,d)
233 #define IDirectPlayLobby_EnumLocalApplications(p,a,b,c)     (p)->EnumLocalApplications(a,b,c)
234 #define IDirectPlayLobby_GetConnectionSettings(p,a,b,c)     (p)->GetConnectionSettings(a,b,c)
235 #define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e)   (p)->ReceiveLobbyMessage(a,b,c,d,e)
236 #define IDirectPlayLobby_RunApplication(p,a,b,c,d)          (p)->RunApplication(a,b,c,d)
237 #define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d)        (p)->SendLobbyMessage(a,b,c,d)
238 #define IDirectPlayLobby_SetConnectionSettings(p,a,b,c)         (p)->SetConnectionSettings(a,b,c)
239 #define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c)      (p)->SetLobbyMessageEvent(a,b,c)
240
241 #endif
242
243 /****************************************************************************
244  *
245  * DirectPlayLobby Flags
246  *
247  ****************************************************************************/
248
249 /*
250  *      This is a message flag used by ReceiveLobbyMessage.  It can be
251  *      returned in the dwMessageFlags parameter to indicate a message from
252  *      the system.
253  */
254 #define DPLMSG_SYSTEM                                   0x00000001
255
256 /*
257  *      This is a message flag used by ReceiveLobbyMessage and SendLobbyMessage.
258  *  It is used to indicate that the message is a standard lobby message.
259  *  DPLMSG_SETPROPERTY, DPLMSG_SETPROPERTYRESPONSE, DPLMSG_GETPROPERTY,
260  *      DPLMSG_GETPROPERTYRESPONSE
261  */
262 #define DPLMSG_STANDARD                                 0x00000002
263
264
265 /****************************************************************************
266  *
267  * DirectPlayLobby messages and message data structures
268  *
269  * All system messages have a dwMessageFlags value of DPLMSG_SYSTEM returned
270  * from a call to ReceiveLobbyMessage.
271  *
272  * All standard messages have a dwMessageFlags value of DPLMSG_STANDARD returned
273  * from a call to ReceiveLobbyMessage.
274  *
275  ****************************************************************************/
276
277 /*
278  * DPLMSG_GENERIC
279  * Generic message structure used to identify the message type.
280  */
281 typedef struct _DPLMSG_GENERIC
282 {
283     DWORD       dwType;         // Message type
284 } DPLMSG_GENERIC, FAR *LPDPLMSG_GENERIC;
285
286 /*
287  *  DPLMSG_SETPROPERTY
288  *  Standard message sent by an application to a lobby to set a
289  *  property
290  */
291 typedef struct _DPLMSG_SETPROPERTY
292 {
293         DWORD   dwType;                         // Message type
294         DWORD   dwRequestID;            // Request ID (DPL_NOCONFIRMATION if no confirmation desired)
295         GUID    guidPlayer;                     // Player GUID
296         GUID    guidPropertyTag;        // Property GUID
297         DWORD   dwDataSize;                     // Size of data
298         DWORD   dwPropertyData[1];      // Buffer containing data
299 } DPLMSG_SETPROPERTY, FAR *LPDPLMSG_SETPROPERTY;
300
301 #define DPL_NOCONFIRMATION                      0
302
303 /*
304  *  DPLMSG_SETPROPERTYRESPONSE
305  *  Standard message returned by a lobby to confirm a 
306  *  DPLMSG_SETPROPERTY message.
307  */
308 typedef struct _DPLMSG_SETPROPERTYRESPONSE
309 {
310         DWORD   dwType;                         // Message type
311         DWORD   dwRequestID;            // Request ID
312         GUID    guidPlayer;                     // Player GUID
313         GUID    guidPropertyTag;        // Property GUID
314         HRESULT hr;                                     // Return Code
315 } DPLMSG_SETPROPERTYRESPONSE, FAR *LPDPLMSG_SETPROPERTYRESPONSE;
316
317 /*
318  *  DPLMSG_GETPROPERTY
319  *  Standard message sent by an application to a lobby to request
320  *      the current value of a property
321  */
322 typedef struct _DPLMSG_GETPROPERTY
323 {
324         DWORD   dwType;                         // Message type
325         DWORD   dwRequestID;            // Request ID
326         GUID    guidPlayer;                     // Player GUID
327         GUID    guidPropertyTag;        // Property GUID
328 } DPLMSG_GETPROPERTY, FAR *LPDPLMSG_GETPROPERTY;
329
330 /*
331  *  DPLMSG_GETPROPERTYRESPONSE
332  *  Standard message returned by a lobby in response to a
333  *      DPLMSG_GETPROPERTY message.
334  */
335 typedef struct _DPLMSG_GETPROPERTYRESPONSE
336 {
337         DWORD   dwType;                         // Message type
338         DWORD   dwRequestID;            // Request ID
339         GUID    guidPlayer;                     // Player GUID
340         GUID    guidPropertyTag;        // Property GUID
341         HRESULT hr;                                     // Return Code
342         DWORD   dwDataSize;                     // Size of data
343         DWORD   dwPropertyData[1];      // Buffer containing data
344 } DPLMSG_GETPROPERTYRESPONSE, FAR *LPDPLMSG_GETPROPERTYRESPONSE;
345
346
347 /******************************************
348  *
349  *      DirectPlay Lobby message dwType values
350  *
351  *****************************************/
352
353 /*
354  *  The application has read the connection settings.
355  *  It is now O.K. for the lobby client to release
356  *  its IDirectPlayLobby interface.
357  */
358 #define DPLSYS_CONNECTIONSETTINGSREAD   0x00000001
359
360 /*
361  *  The application's call to DirectPlayConnect failed
362  */
363 #define DPLSYS_DPLAYCONNECTFAILED       0x00000002
364
365 /*
366  *  The application has created a DirectPlay session.
367  */
368 #define DPLSYS_DPLAYCONNECTSUCCEEDED    0x00000003
369
370 /*
371  *  The application has terminated.
372  */
373 #define DPLSYS_APPTERMINATED            0x00000004
374
375 /*
376  *  The message is a DPLMSG_SETPROPERTY message.
377  */
378 #define DPLSYS_SETPROPERTY                              0x00000005
379
380 /*
381  *  The message is a DPLMSG_SETPROPERTYRESPONSE message.
382  */
383 #define DPLSYS_SETPROPERTYRESPONSE              0x00000006
384
385 /*
386  *  The message is a DPLMSG_GETPROPERTY message.
387  */
388 #define DPLSYS_GETPROPERTY                              0x00000007
389
390 /*
391  *  The message is a DPLMSG_GETPROPERTYRESPONSE message.
392  */
393 #define DPLSYS_GETPROPERTYRESPONSE              0x00000008
394
395
396 /****************************************************************************
397  *
398  * DirectPlay defined property GUIDs and associated data structures
399  *
400  ****************************************************************************/
401
402 /*
403  * DPLPROPERTY_MessagesSupported
404  *
405  * Request whether the lobby supports standard.  Lobby with respond with either
406  * TRUE or FALSE or may not respond at all.
407  * 
408  * Property data is a single BOOL with TRUE or FALSE
409  */
410 // {762CCDA1-D916-11d0-BA39-00C04FD7ED67}
411 DEFINE_GUID(DPLPROPERTY_MessagesSupported, 
412 0x762ccda1, 0xd916, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
413
414 /*
415  * DPLPROPERTY_LobbyGuid
416  *
417  * Request the GUID that identifies the lobby software that the application
418  * is communicating with.
419  *
420  * Property data is a single GUID.
421  */
422 // {F56920A0-D218-11d0-BA39-00C04FD7ED67}
423 DEFINE_GUID(DPLPROPERTY_LobbyGuid, 
424 0xf56920a0, 0xd218, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
425
426 /*
427  * DPLPROPERTY_PlayerGuid
428  *
429  * Request the GUID that identifies the player on this machine for sending
430  * property data back to the lobby.
431  *
432  * Property data is the DPLDATA_PLAYERDATA structure
433  */
434 // {B4319322-D20D-11d0-BA39-00C04FD7ED67}
435 DEFINE_GUID(DPLPROPERTY_PlayerGuid, 
436 0xb4319322, 0xd20d, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
437
438 /*
439  * DPLDATA_PLAYERGUID
440  *
441  * Data structure to hold the GUID of the player and player creation flags
442  * from the lobby.
443  */
444 typedef struct _DPLDATA_PLAYERGUID
445 {
446         GUID    guidPlayer;
447         DWORD   dwPlayerFlags;
448 } DPLDATA_PLAYERGUID, FAR *LPDPLDATA_PLAYERGUID;
449
450 /*
451  * DPLPROPERTY_PlayerScore
452  *
453  * Used to send an array of long integers to the lobby indicating the 
454  * score of a player.
455  *
456  * Property data is the DPLDATA_PLAYERSCORE structure.
457  */
458 // {48784000-D219-11d0-BA39-00C04FD7ED67}
459 DEFINE_GUID(DPLPROPERTY_PlayerScore, 
460 0x48784000, 0xd219, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
461
462 /*
463  * DPLDATA_PLAYERSCORE
464  *
465  * Data structure to hold an array of long integers representing a player score.
466  * Application must allocate enough memory to hold all the scores.
467  */
468 typedef struct _DPLDATA_PLAYERSCORE
469 {
470         DWORD   dwScoreCount;
471         LONG    Score[1];
472 } DPLDATA_PLAYERSCORE, FAR *LPDPLDATA_PLAYERSCORE;
473
474 /****************************************************************************
475  *
476  * DirectPlay Address ID's
477  *
478  ****************************************************************************/
479
480 /* DirectPlay Address
481  *
482  * A DirectPlay address consists of multiple chunks of data, each tagged
483  * with a GUID signifying the type of data in the chunk. The chunk also
484  * has a length so that unknown chunk types can be skipped.
485  *
486  * The EnumAddress() function is used to parse these address data chunks.
487  */
488
489 /*
490  * DPADDRESS
491  *
492  * Header for block of address data elements
493  */
494 typedef struct _DPADDRESS
495 {
496     GUID                guidDataType;
497     DWORD               dwDataSize;
498 } DPADDRESS;
499
500 typedef DPADDRESS FAR *LPDPADDRESS;
501
502 /*
503  * DPAID_TotalSize
504  *
505  * Chunk is a DWORD containing size of entire DPADDRESS structure
506  */
507
508 // {1318F560-912C-11d0-9DAA-00A0C90A43CB}
509 DEFINE_GUID(DPAID_TotalSize, 
510 0x1318f560, 0x912c, 0x11d0, 0x9d, 0xaa, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
511
512 /*
513  * DPAID_ServiceProvider
514  *
515  * Chunk is a GUID describing the service provider that created the chunk.
516  * All addresses must contain this chunk.
517  */
518
519 // {07D916C0-E0AF-11cf-9C4E-00A0C905425E}
520 DEFINE_GUID(DPAID_ServiceProvider, 
521 0x7d916c0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
522
523 /*
524  * DPAID_LobbyProvider
525  *
526  * Chunk is a GUID describing the lobby provider that created the chunk.
527  * All addresses must contain this chunk.
528  */
529
530 // {59B95640-9667-11d0-A77D-0000F803ABFC}
531 DEFINE_GUID(DPAID_LobbyProvider, 
532 0x59b95640, 0x9667, 0x11d0, 0xa7, 0x7d, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
533
534 /*
535  * DPAID_Phone and DPAID_PhoneW
536  *
537  * Chunk is a string containing a phone number (i.e. "1-800-555-1212")
538  * in ANSI or UNICODE format
539  */
540
541 // {78EC89A0-E0AF-11cf-9C4E-00A0C905425E}
542 DEFINE_GUID(DPAID_Phone, 
543 0x78ec89a0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
544
545 // {BA5A7A70-9DBF-11d0-9CC1-00A0C905425E}
546 DEFINE_GUID(DPAID_PhoneW, 
547 0xba5a7a70, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
548
549 /*
550  * DPAID_Modem and DPAID_ModemW
551  *
552  * Chunk is a string containing a modem name registered with TAPI
553  * in ANSI or UNICODE format
554  */
555
556 // {F6DCC200-A2FE-11d0-9C4F-00A0C905425E}
557 DEFINE_GUID(DPAID_Modem, 
558 0xf6dcc200, 0xa2fe, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
559
560 // {01FD92E0-A2FF-11d0-9C4F-00A0C905425E}
561 DEFINE_GUID(DPAID_ModemW, 
562 0x1fd92e0, 0xa2ff, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
563
564 /*
565  * DPAID_Inet and DPAID_InetW
566  *
567  * Chunk is a string containing a TCP/IP host name or an IP address
568  * (i.e. "dplay.microsoft.com" or "137.55.100.173") in ANSI or UNICODE format
569  */
570
571 // {C4A54DA0-E0AF-11cf-9C4E-00A0C905425E}
572 DEFINE_GUID(DPAID_INet, 
573 0xc4a54da0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
574
575 // {E63232A0-9DBF-11d0-9CC1-00A0C905425E}
576 DEFINE_GUID(DPAID_INetW, 
577 0xe63232a0, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
578
579 /*
580  * DPCOMPORTADDRESS
581  *
582  * Used to specify com port settings. The constants that define baud rate,
583  * stop bits and parity are defined in WINBASE.H. The constants for flow
584  * control are given below.
585  */
586
587 #define DPCPA_NOFLOW        0           // no flow control
588 #define DPCPA_XONXOFFFLOW   1           // software flow control
589 #define DPCPA_RTSFLOW       2           // hardware flow control with RTS
590 #define DPCPA_DTRFLOW       3           // hardware flow control with DTR
591 #define DPCPA_RTSDTRFLOW    4           // hardware flow control with RTS and DTR
592
593 typedef struct _DPCOMPORTADDRESS
594 {
595     DWORD   dwComPort;                  // COM port to use (1-4)
596     DWORD   dwBaudRate;                 // baud rate (100-256k)
597     DWORD   dwStopBits;                 // no. stop bits (1-2)
598     DWORD   dwParity;                   // parity (none, odd, even, mark)
599     DWORD   dwFlowControl;              // flow control (none, xon/xoff, rts, dtr)
600 } DPCOMPORTADDRESS;
601
602 typedef DPCOMPORTADDRESS FAR *LPDPCOMPORTADDRESS;
603
604 /*
605  * DPAID_ComPort
606  *
607  * Chunk contains a DPCOMPORTADDRESS structure defining the serial port.
608  */
609
610 // {F2F0CE00-E0AF-11cf-9C4E-00A0C905425E}
611 DEFINE_GUID(DPAID_ComPort, 
612 0xf2f0ce00, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
613
614 /****************************************************************************
615  *
616  *      dplobby 1.0 obsolete definitions
617  *      Included for compatibility only.
618  *
619  ****************************************************************************/
620 #define DPLAD_SYSTEM          DPLMSG_SYSTEM
621
622
623 #ifdef __cplusplus
624 };
625 #endif /* __cplusplus */
626
627 #endif /* __DPLOBBY_INCLUDED__ */
628