- more FIXME -> TRACE
[wine.git] / include / nspapi.h
blob912a15169d5f037ae52e1e3acefeed38cbe585ea
1 /* NSPAPI.H -- winsock 1.1
2 * not supported on win95
4 * Copyright (C) 2001 Stefan Leichter
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef _WINE_NSPAPI_
22 #define _WINE_NSPAPI_
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* defined(__cplusplus) */
28 * constants
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_BANDWITH_ALLOCATION 0x00000800
42 #define XP_FRAGMENTATION 0x00001000
43 #define XP_ENCRYPTS 0x00002000
46 * structures
48 typedef struct _PROTOCOL_INFOA
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;
60 typedef struct _PROTOCOL_INFOW
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;
72 DECL_WINELIB_TYPE_AW(PROTOCOL_INFO)
73 DECL_WINELIB_TYPE_AW(PPROTOCOL_INFO)
74 DECL_WINELIB_TYPE_AW(LPPROTOCOL_INFO)
76 typedef struct _SERVICE_ADDRESS
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;
86 typedef struct _SERVICE_ADDRESSES
88 DWORD dwAddressCount;
89 SERVICE_ADDRESS Addresses[1];
90 } SERVICE_ADDRESSES, *PSERVICE_ADDRESSES, *LPSERVICE_ADDRESSES;
92 typedef struct _SERVICE_INFOA
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;
106 typedef struct _SERVICE_INFOW
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;
120 DECL_WINELIB_TYPE_AW(SERVICE_INFO)
121 DECL_WINELIB_TYPE_AW(PSERVICE_INFO)
122 DECL_WINELIB_TYPE_AW(LPSERVICE_INFO)
124 typedef struct _SERVICE_TYPE_VALUE_ABSA
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;
133 typedef struct _SERVICE_TYPE_VALUE_ABSW
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;
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)
146 typedef struct _SERVICE_TYPE_INFO_ABSA
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;
153 typedef struct _SERVICE_TYPE_INFO_ABSW
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;
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)
164 typedef void (*LPSERVICE_CALLBACK_PROC)(LPARAM lParam, HANDLE hAsyncTaskHandle);
166 typedef struct _SERVICE_ASYNC_INFO
168 LPSERVICE_CALLBACK_PROC lpServiceCallbackProc;
169 LPARAM lParam;
170 HANDLE hAsyncTaskHandle;
171 } SERVICE_ASYNC_INFO, *PSERVICE_ASYNC_INFO, *LPSERVICE_ASYNC_INFO;
174 * function prototypes
176 INT WINAPI GetTypeByNameA(LPSTR lpServiceName, LPGUID lpServiceType);
177 INT WINAPI GetTypeByNameW(LPWSTR lpServiceName, LPGUID lpServiceType);
178 #define GetTypeByName WINELIB_NAME_AW(GetTypeByName)
179 INT WINAPI SetServiceA(DWORD dwNameSpace, DWORD dwOperation, DWORD dwFlags, LPSERVICE_INFOA lpServiceInfo,
180 LPSERVICE_ASYNC_INFO lpServiceAsyncInfo, LPDWORD lpdwStatusFlags);
181 INT WINAPI SetServiceW(DWORD dwNameSpace, DWORD dwOperation, DWORD dwFlags, LPSERVICE_INFOW lpServiceInfo,
182 LPSERVICE_ASYNC_INFO lpServiceAsyncInfo, LPDWORD lpdwStatusFlags);
183 #define SetService WINELIB_NAME_AW(SetService)
185 #ifdef __cplusplus
186 } /* extern "C" */
187 #endif /* defined(__cplusplus) */
189 #endif /* _WINE_NSPAPI_ */