Implemented IMemAllocator.
[wine] / include / wine / winnet16.h
1 /* 
2  * Definitions for windows network service
3  *
4  * Copyright 1997 Andreas Mohr
5  * Copyright 1999 Ulrich Weigand
6  */
7
8 #ifndef __WINE_WINNET16_H
9 #define __WINE_WINNET16_H
10
11 #include "windef.h"
12 #include "wine/windef16.h"
13
14 /*
15  * Remote printing
16  */
17
18 typedef struct 
19 {
20     WORD    pqName;
21     WORD    pqComment;
22     WORD    pqStatus;
23     WORD    pqJobcount;
24     WORD    pqPrinters;
25
26 } QUEUESTRUCT16, *LPQUEUESTRUCT16;
27
28 #define WNPRQ_ACTIVE    0x0
29 #define WNPRQ_PAUSE     0x1
30 #define WNPRQ_ERROR     0x2
31 #define WNPRQ_PENDING   0x3
32 #define WNPRQ_PROBLEM   0x4
33
34 typedef struct 
35 {
36     WORD    pjId;
37     WORD    pjUsername;
38     WORD    pjParms;
39     WORD    pjPosition;
40     WORD    pjStatus;
41     DWORD   pjSubmitted;
42     DWORD   pjSize;
43     WORD    pjCopies;
44     WORD    pjComment;
45
46 } JOBSTRUCT16, *LPJOBSTRUCT16;
47
48 #define WNPRJ_QSTATUS           0x0007
49 #define WNPRJ_DEVSTATUS         0x0FF8
50
51 #define WNPRJ_QS_QUEUED         0x0000
52 #define WNPRJ_QS_PAUSED         0x0001
53 #define WNPRJ_QS_SPOOLING       0x0002
54 #define WNPRJ_QS_PRINTING       0x0003
55
56 #define WNPRJ_DS_COMPLETE       0x0008
57 #define WNPRJ_DS_INTERV         0x0010
58 #define WNPRJ_DS_ERROR          0x0020
59 #define WNPRJ_DS_DESTOFFLINE    0x0040
60 #define WNPRJ_DS_DESTPAUSED     0x0080
61 #define WNPRJ_DS_NOTIFY         0x0100
62 #define WNPRJ_DS_DESTNOPAPER    0x0200
63 #define WNPRJ_DS_DESTFORMCHG    0x0400
64 #define WNPRJ_DS_DESTCRTCHG     0x0800
65 #define WNPRJ_DS_DESTPENCHG     0x1000
66
67 #define SP_QUEUECHANGED         0x0500
68
69 #define WNJ_NULL_JOBID  0
70
71 WORD WINAPI WNetOpenJob16(LPSTR,LPSTR,WORD,LPINT16);
72 WORD WINAPI WNetCloseJob16(WORD,LPINT16,LPSTR);
73 WORD WINAPI WNetWriteJob16(HANDLE16,LPSTR,LPINT16);
74 WORD WINAPI WNetAbortJob16(LPSTR,WORD);
75 WORD WINAPI WNetHoldJob16(LPSTR,WORD);
76 WORD WINAPI WNetReleaseJob16(LPSTR,WORD);
77 WORD WINAPI WNetCancelJob16(LPSTR,WORD);
78 WORD WINAPI WNetSetJobCopies16(LPSTR,WORD,WORD);
79
80 WORD WINAPI WNetWatchQueue16(HWND16,LPSTR,LPSTR,WORD);
81 WORD WINAPI WNetUnwatchQueue16(LPSTR);
82 WORD WINAPI WNetLockQueueData16(LPSTR,LPSTR,LPQUEUESTRUCT16 *);
83 WORD WINAPI WNetUnlockQueueData16(LPSTR);
84
85
86 /*
87  * Connections
88  */
89
90 WORD WINAPI WNetAddConnection16(LPSTR,LPSTR,LPSTR);
91 WORD WINAPI WNetCancelConnection16(LPSTR,BOOL16);
92 WORD WINAPI WNetGetConnection16(LPSTR,LPSTR,UINT16 *);
93 WORD WINAPI WNetRestoreConnection16(HWND16,LPSTR);
94
95 /*
96  * Capabilities
97  */
98
99 WORD WINAPI WNetGetCaps16(WORD);
100
101 #define WNNC16_SPEC_VERSION                       0x01
102 #define WNNC16_NET_TYPE                           0x02
103 #define WNNC16_DRIVER_VERSION                     0x03
104 #define WNNC16_USER                               0x04
105 #define WNNC16_CONNECTION                         0x06
106 #define WNNC16_PRINTING                           0x07
107 #define WNNC16_DIALOG                             0x08
108 #define WNNC16_ADMIN                              0x09
109 #define WNNC16_ERROR                              0x0a
110 #define WNNC16_PRINTMGREXT                        0x0b
111
112 #define WNNC16_NET_NONE                           0x0
113 #define WNNC16_NET_MSNet                          0x1
114 #define WNNC16_NET_LanMan                         0x2
115 #define WNNC16_NET_NetWare                        0x3
116 #define WNNC16_NET_Vines                          0x4
117 #define WNNC16_NET_10NET                          0x5
118 #define WNNC16_NET_Locus                          0x6
119 #define WNNC16_NET_SUN_PC_NFS                     0x7
120 #define WNNC16_NET_LANstep                        0x8
121 #define WNNC16_NET_9TILES                         0x9
122 #define WNNC16_NET_LANtastic                      0xa
123 #define WNNC16_NET_AS400                          0xb
124 #define WNNC16_NET_FTP_NFS                        0xc
125 #define WNNC16_NET_PATHWORKS                      0xd
126 #define WNNC16_NET_LifeNet                        0xe
127 #define WNNC16_NET_POWERLan                       0xf
128 #define WNNC16_NET_MultiNet                       0x8000
129
130 #define WNNC16_SUBNET_NONE                        0x00
131 #define WNNC16_SUBNET_MSNet                       0x01
132 #define WNNC16_SUBNET_LanMan                      0x02
133 #define WNNC16_SUBNET_WinWorkgroups               0x04
134 #define WNNC16_SUBNET_NetWare                     0x08
135 #define WNNC16_SUBNET_Vines                       0x10
136 #define WNNC16_SUBNET_Other                       0x80
137
138 #define WNNC16_CON_AddConnection                  0x0001
139 #define WNNC16_CON_CancelConnection               0x0002
140 #define WNNC16_CON_GetConnections                 0x0004
141 #define WNNC16_CON_AutoConnect                    0x0008
142 #define WNNC16_CON_BrowseDialog                   0x0010
143 #define WNNC16_CON_RestoreConnection              0x0020
144
145 #define WNNC16_PRT_OpenJob                        0x0002
146 #define WNNC16_PRT_CloseJob                       0x0004
147 #define WNNC16_PRT_HoldJob                        0x0010
148 #define WNNC16_PRT_ReleaseJob                     0x0020
149 #define WNNC16_PRT_CancelJob                      0x0040
150 #define WNNC16_PRT_SetJobCopies                   0x0080
151 #define WNNC16_PRT_WatchQueue                     0x0100
152 #define WNNC16_PRT_UnwatchQueue                   0x0200
153 #define WNNC16_PRT_LockQueueData                  0x0400
154 #define WNNC16_PRT_UnlockQueueData                0x0800
155 #define WNNC16_PRT_ChangeMsg                      0x1000
156 #define WNNC16_PRT_AbortJob                       0x2000
157 #define WNNC16_PRT_NoArbitraryLock                0x4000
158 #define WNNC16_PRT_WriteJob                       0x8000
159
160 #define WNNC16_DLG_DeviceMode                     0x0001
161 #define WNNC16_DLG_BrowseDialog                   0x0002
162 #define WNNC16_DLG_ConnectDialog                  0x0004
163 #define WNNC16_DLG_DisconnectDialog               0x0008
164 #define WNNC16_DLG_ViewQueueDialog                0x0010
165 #define WNNC16_DLG_PropertyDialog                 0x0020
166 #define WNNC16_DLG_ConnectionDialog               0x0040
167 #define WNNC16_DLG_PrinterConnectDialog           0x0080
168 #define WNNC16_DLG_SharesDialog                   0x0100
169 #define WNNC16_DLG_ShareAsDialog                  0x0200
170
171 #define WNNC16_ADM_GetDirectoryType               0x0001
172 #define WNNC16_ADM_DirectoryNotify                0x0002
173 #define WNNC16_ADM_LongNames                      0x0004
174 #define WNNC16_ADM_SetDefaultDrive                0x0008
175
176 #define WNNC16_ERR_GetError                       0x0001
177 #define WNNC16_ERR_GetErrorText                   0x0002
178
179
180 /*
181  * Get User
182  */
183
184 WORD WINAPI WNetGetUser16(LPCSTR,LPSTR,LPINT16);
185
186
187 /*
188  * Browsing
189  */
190
191 #define WNBD_CONN_UNKNOWN       0x0
192 #define WNBD_CONN_DISKTREE      0x1
193 #define WNBD_CONN_PRINTQ        0x3
194 #define WNBD_MAX_LENGTH         0x80
195
196 #define WNTYPE_DRIVE            1
197 #define WNTYPE_FILE             2
198 #define WNTYPE_PRINTER          3
199 #define WNTYPE_COMM             4
200
201 #define WNPS_FILE               0
202 #define WNPS_DIR                1
203 #define WNPS_MULT               2
204
205 WORD WINAPI WNetDeviceMode16(HWND16);
206 WORD WINAPI WNetBrowseDialog16(HWND16,WORD,LPSTR);
207 WORD WINAPI WNetConnectDialog16(HWND16,WORD);
208 WORD WINAPI WNetDisconnectDialog16(HWND16,WORD);
209 WORD WINAPI WNetConnectionDialog16(HWND16,WORD);
210 WORD WINAPI WNetViewQueueDialog16(HWND16,LPSTR);
211 WORD WINAPI WNetPropertyDialog16(HWND16,WORD,WORD,LPSTR,WORD);
212 WORD WINAPI WNetGetPropertyText16(WORD,WORD,LPSTR,LPSTR,WORD,WORD);
213
214
215 /*
216  * Admin
217  */
218
219 #define WNDT_NORMAL   0
220 #define WNDT_NETWORK  1
221
222 #define WNDN_MKDIR    1
223 #define WNDN_RMDIR    2
224 #define WNDN_MVDIR    3
225
226 WORD WINAPI WNetGetDirectoryType16(LPSTR,LPINT16);
227 WORD WINAPI WNetDirectoryNotify16(HWND16,LPSTR,WORD);
228
229
230 /*
231  * Status codes
232  */
233
234 WORD WINAPI WNetGetError16(LPINT16);
235 WORD WINAPI WNetGetErrorText16(WORD,LPSTR,LPINT16);
236 WORD WINAPI WNetErrorText16(WORD,LPSTR,WORD);
237
238 #define WN16_SUCCESS                      0x0000
239 #define WN16_NOT_SUPPORTED                0x0001
240 #define WN16_NET_ERROR                    0x0002
241 #define WN16_MORE_DATA                    0x0003
242 #define WN16_BAD_POINTER                  0x0004
243 #define WN16_BAD_VALUE                    0x0005
244 #define WN16_BAD_PASSWORD                 0x0006
245 #define WN16_ACCESS_DENIED                0x0007
246 #define WN16_FUNCTION_BUSY                0x0008
247 #define WN16_WINDOWS_ERROR                0x0009
248 #define WN16_BAD_USER                     0x000A
249 #define WN16_OUT_OF_MEMORY                0x000B
250 #define WN16_CANCEL                       0x000C
251 #define WN16_CONTINUE                     0x000D
252 #define WN16_NOT_CONNECTED                0x0030
253 #define WN16_OPEN_FILES                   0x0031
254 #define WN16_BAD_NETNAME                  0x0032
255 #define WN16_BAD_LOCALNAME                0x0033
256 #define WN16_ALREADY_CONNECTED            0x0034
257 #define WN16_DEVICE_ERROR                 0x0035
258 #define WN16_CONNECTION_CLOSED            0x0036
259 #define WN16_BAD_JOBID                    0x0040
260 #define WN16_JOB_NOT_FOUND                0x0041
261 #define WN16_JOB_NOT_HELD                 0x0042
262 #define WN16_BAD_QUEUE                    0x0043
263 #define WN16_BAD_FILE_HANDLE              0x0044
264 #define WN16_CANT_SET_COPIES              0x0045
265 #define WN16_ALREADY_LOCKED               0x0046
266 #define WN16_NO_ERROR                     0x0050
267
268
269
270 #endif /* __WINE_WINNET16_H */