d3dx9: Avoid LPD3DXSPMESH.
[wine] / include / nspapi.h
1 /* NSPAPI.H -- winsock 1.1
2  * not supported on win95
3  *
4  * Copyright (C) 2001 Stefan Leichter
5  *
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.
10  *
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.
15  *
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
19  */
20
21 #ifndef _WINE_NSPAPI_
22 #define _WINE_NSPAPI_
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* defined(__cplusplus) */
27 /*
28  * constants
29  */
30 #define XP_CONNECTIONLESS               0x00000001
31 #define XP_GUARANTEED_DELIVERY          0x00000002
32 #define XP_GUARANTEED_ORDER             0x00000004
33 #define XP_MESSAGE_ORIENTED             0x00000008
34 #define XP_PSEUDO_STREAM                0x00000010
35 #define XP_GRACEFUL_CLOSE               0x00000020
36 #define XP_EXPEDITED_DATA               0x00000040
37 #define XP_CONNECT_DATA                 0x00000080
38 #define XP_DISCONNECT_DATA              0x00000100
39 #define XP_SUPPORTS_BROADCAST           0x00000200
40 #define XP_SUPPORTS_MULTICAST           0x00000400
41 #define XP_BANDWIDTH_ALLOCATION         0x00000800
42 #define XP_FRAGMENTATION                0x00001000
43 #define XP_ENCRYPTS                     0x00002000
44
45 /*
46  * structures
47  */
48 typedef  struct _PROTOCOL_INFOA
49 {
50          DWORD   dwServiceFlags;
51          INT     iAddressFamily;
52          INT     iMaxSockAddr;
53          INT     iMinSockAddr;
54          INT     iSocketType;
55          INT     iProtocol;
56          DWORD   dwMessageSize;
57          LPSTR   lpProtocol;
58 } PROTOCOL_INFOA, *PPROTOCOL_INFOA, *LPPROTOCOL_INFOA;
59
60 typedef  struct _PROTOCOL_INFOW
61 {
62          DWORD   dwServiceFlags;
63          INT     iAddressFamily;
64          INT     iMaxSockAddr;
65          INT     iMinSockAddr;
66          INT     iSocketType;
67          INT     iProtocol;
68          DWORD   dwMessageSize;
69          LPWSTR  lpProtocol;
70 } PROTOCOL_INFOW, *PPROTOCOL_INFOW, *LPPROTOCOL_INFOW;
71
72 DECL_WINELIB_TYPE_AW(PROTOCOL_INFO)
73 DECL_WINELIB_TYPE_AW(PPROTOCOL_INFO)
74 DECL_WINELIB_TYPE_AW(LPPROTOCOL_INFO)
75
76 typedef struct _SERVICE_ADDRESS
77 {
78         DWORD   dwAddressType;
79         DWORD   dwAddressFlags;
80         DWORD   dwAddressLength;
81         DWORD   dwPrincipalLength;
82         BYTE*   lpAddress;
83         BYTE*   lpPrincipal;
84 } SERVICE_ADDRESS, *PSERVICE_ADDRESS, *LPSERVICE_ADDRESS;
85
86 typedef struct _SERVICE_ADDRESSES
87 {
88         DWORD           dwAddressCount;
89         SERVICE_ADDRESS Addresses[1];
90 } SERVICE_ADDRESSES, *PSERVICE_ADDRESSES, *LPSERVICE_ADDRESSES;
91
92 typedef struct _SERVICE_INFOA
93 {
94         LPGUID              lpServiceType;
95         LPSTR               lpServiceName;
96         LPSTR               lpComment;
97         LPSTR               lpLocale;
98         DWORD               dwDisplayHint;
99         DWORD               dwVersion;
100         DWORD               dwTime;
101         LPSTR               lpMachineName;
102         LPSERVICE_ADDRESSES lpServiceAddress;
103         BLOB                ServiceSpecificInfo;
104 } SERVICE_INFOA, *PSERVICE_INFOA, *LPSERVICE_INFOA;
105
106 typedef struct _SERVICE_INFOW
107 {
108         LPGUID              lpServiceType;
109         LPWSTR              lpServiceName;
110         LPWSTR              lpComment;
111         LPWSTR              lpLocale;
112         DWORD               dwDisplayHint;
113         DWORD               dwVersion;
114         DWORD               dwTime;
115         LPSTR               lpMachineName;
116         LPSERVICE_ADDRESSES lpServiceAddress;
117         BLOB                ServiceSpecificInfo; /* May point to SERVICE_TYPE_INFO_ABS */
118 } SERVICE_INFOW, *PSERVICE_INFOW, *LPSERVICE_INFOW;
119
120 DECL_WINELIB_TYPE_AW(SERVICE_INFO)
121 DECL_WINELIB_TYPE_AW(PSERVICE_INFO)
122 DECL_WINELIB_TYPE_AW(LPSERVICE_INFO)
123
124 typedef struct _SERVICE_TYPE_VALUE_ABSA
125 {
126         DWORD   dwNameSpace; /* Name space or set of name spaces */
127         DWORD   dwValueType; /* Type of the value data */
128         DWORD   dwValueSize; /* Size of the value data */
129         LPSTR   lpValueName; /* Name of the value */
130         PVOID   lpValue;     /* Pointer to the value data */
131 } SERVICE_TYPE_VALUE_ABSA, *PSERVICE_TYPE_VALUE_ABSA, *LPSERVICE_TYPE_VALUE_ABSA;
132
133 typedef struct _SERVICE_TYPE_VALUE_ABSW
134 {
135         DWORD   dwNameSpace; /* Name space or set of name spaces */
136         DWORD   dwValueType; /* Type of the value data */
137         DWORD   dwValueSize; /* Size of the value data */
138         LPWSTR  lpValueName; /* Name of the value */
139         PVOID   lpValue;     /* Pointer to the value data */
140 } SERVICE_TYPE_VALUE_ABSW, *PSERVICE_TYPE_VALUE_ABSW, *LPSERVICE_TYPE_VALUE_ABSW;
141
142 DECL_WINELIB_TYPE_AW(SERVICE_TYPE_VALUE_ABS)
143 DECL_WINELIB_TYPE_AW(PSERVICE_TYPE_VALUE_ABS)
144 DECL_WINELIB_TYPE_AW(LPSERVICE_TYPE_VALUE_ABS)
145
146 typedef struct _SERVICE_TYPE_INFO_ABSA
147 {
148         LPSTR                   lpTypeName;     /* Name of the network service type */
149         DWORD                   dwValueCount;   /* Number of SERVICE_TYPE_VALUE_ABS structures */
150         SERVICE_TYPE_VALUE_ABSA Values[1];      /* Array of SERVICE_TYPE_VALUE_ABS structures */
151 } SERVICE_TYPE_INFO_ABSA, *PSERVICE_TYPE_INFO_ABSA, *LPSERVICE_TYPE_INFO_ABSA;
152
153 typedef struct _SERVICE_TYPE_INFO_ABSW
154 {
155         LPWSTR                  lpTypeName;     /* Name of the network service type */
156         DWORD                   dwValueCount;   /* Number of SERVICE_TYPE_VALUE_ABS structures */
157         SERVICE_TYPE_VALUE_ABSW Values[1];      /* Array of SERVICE_TYPE_VALUE_ABS structures */
158 } SERVICE_TYPE_INFO_ABSW, *PSERVICE_TYPE_INFO_ABSW, *LPSERVICE_TYPE_INFO_ABSW;
159
160 DECL_WINELIB_TYPE_AW(SERVICE_TYPE_INFO_ABS)
161 DECL_WINELIB_TYPE_AW(PSERVICE_TYPE_INFO_ABS)
162 DECL_WINELIB_TYPE_AW(LPSERVICE_TYPE_INFO_ABS)
163
164 typedef void (*LPSERVICE_CALLBACK_PROC)(LPARAM lParam, HANDLE hAsyncTaskHandle);
165
166 typedef struct _SERVICE_ASYNC_INFO
167 {
168     LPSERVICE_CALLBACK_PROC lpServiceCallbackProc;
169     LPARAM                  lParam;
170     HANDLE                  hAsyncTaskHandle;
171 } SERVICE_ASYNC_INFO, *PSERVICE_ASYNC_INFO, *LPSERVICE_ASYNC_INFO;
172
173 /*
174  * function prototypes
175  */
176 INT WINAPI GetAddressByNameA(DWORD dwNameSpace, LPGUID lpServiceType, LPSTR lpServiceName,
177     LPINT lpiProtocols, DWORD dwResolution, LPSERVICE_ASYNC_INFO lpServiceAsyncInfo,
178     LPVOID lpCsaddrBuffer, LPDWORD lpdwBufferLength, LPSTR lpAliasBuffer,
179     LPDWORD lpdwAliasBufferLength);
180 INT WINAPI GetAddressByNameW(DWORD dwNameSpace, LPGUID lpServiceType, LPWSTR lpServiceName,
181     LPINT lpiProtocols, DWORD dwResolution, LPSERVICE_ASYNC_INFO lpServiceAsyncInfo,
182     LPVOID lpCsaddrBuffer, LPDWORD lpdwBufferLength, LPWSTR lpAliasBuffer,
183     LPDWORD lpdwAliasBufferLength);
184 #define GetAddressByName WINELIB_NAME_AW(GetAddressByName)
185 INT WINAPI GetTypeByNameA(LPSTR lpServiceName, LPGUID lpServiceType);
186 INT WINAPI GetTypeByNameW(LPWSTR lpServiceName, LPGUID lpServiceType);
187 #define GetTypeByName WINELIB_NAME_AW(GetTypeByName)
188 INT WINAPI SetServiceA(DWORD dwNameSpace, DWORD dwOperation, DWORD dwFlags, LPSERVICE_INFOA lpServiceInfo,
189                        LPSERVICE_ASYNC_INFO lpServiceAsyncInfo, LPDWORD lpdwStatusFlags);
190 INT WINAPI SetServiceW(DWORD dwNameSpace, DWORD dwOperation, DWORD dwFlags, LPSERVICE_INFOW lpServiceInfo,
191                        LPSERVICE_ASYNC_INFO lpServiceAsyncInfo, LPDWORD lpdwStatusFlags);
192 #define SetService WINELIB_NAME_AW(SetService)
193 INT WINAPI GetServiceA(DWORD dwNameSpace, LPGUID lpGuid, LPSTR lpServiceName,
194                        DWORD dwProperties, LPVOID lpBuffer, LPDWORD lpdwBufferSize,
195                        LPSERVICE_ASYNC_INFO lpServiceAsyncInfo);
196 INT WINAPI GetServiceW(DWORD dwNameSpace, LPGUID lpGuid, LPSTR lpServiceName,
197                        DWORD dwProperties, LPVOID lpBuffer, LPDWORD lpdwBufferSize,
198                        LPSERVICE_ASYNC_INFO lpServiceAsyncInfo);
199 #define GetService WINELIB_NAME_AW(GetService)
200
201 #ifdef __cplusplus
202 }      /* extern "C" */
203 #endif /* defined(__cplusplus) */
204
205 #endif /* _WINE_NSPAPI_ */