rap: add rap_NetPrintJobSetInfo to IDL.
[amitay/samba.git] / librpc / idl / rap.idl
1 #include "idl_types.h"
2
3 /*
4         rap interface definition
5 */
6
7 [
8         pointer_default(unique),
9         helper("../librpc/ndr/ndr_rap.h")
10 ]
11 interface rap
12 {
13         typedef [public,noprint] enum {
14                 NERR_Success = 0
15         } rap_status;
16
17         const int RAP_WshareEnum                        = 0;
18         const int RAP_WshareGetInfo                     = 1;
19         const int RAP_WshareSetInfo                     = 2;
20         const int RAP_WshareAdd                         = 3;
21         const int RAP_WshareDel                         = 4;
22         const int RAP_NetShareCheck                     = 5;
23         const int RAP_WsessionEnum                      = 6;
24         const int RAP_WsessionGetInfo                   = 7;
25         const int RAP_WsessionDel                       = 8;
26         const int RAP_WconnectionEnum                   = 9;
27         const int RAP_WfileEnum                         = 10;
28         const int RAP_WfileGetInfo                      = 11;
29         const int RAP_WfileClose                        = 12;
30         const int RAP_WserverGetInfo                    = 13;
31         const int RAP_WserverSetInfo                    = 14;
32         const int RAP_WserverDiskEnum                   = 15;
33         const int RAP_WserverAdminCommand               = 16;
34         const int RAP_NetAuditOpen                      = 17;
35         const int RAP_WauditClear                       = 18;
36         const int RAP_NetErrorLogOpen                   = 19;
37         const int RAP_WerrorLogClear                    = 20;
38         const int RAP_NetCharDevEnum                    = 21;
39         const int RAP_NetCharDevGetInfo                 = 22;
40         const int RAP_WCharDevControl                   = 23;
41         const int RAP_NetCharDevQEnum                   = 24;
42         const int RAP_NetCharDevQGetInfo                = 25;
43         const int RAP_WCharDevQSetInfo                  = 26;
44         const int RAP_WCharDevQPurge                    = 27;
45         const int RAP_WCharDevQPurgeSelf                = 28;
46         const int RAP_WMessageNameEnum                  = 29;
47         const int RAP_WMessageNameGetInfo               = 30;
48         const int RAP_WMessageNameAdd                   = 31;
49         const int RAP_WMessageNameDel                   = 32;
50         const int RAP_WMessageNameFwd                   = 33;
51         const int RAP_WMessageNameUnFwd                 = 34;
52         const int RAP_WMessageBufferSend                = 35;
53         const int RAP_WMessageFileSend                  = 36;
54         const int RAP_WMessageLogFileSet                = 37;
55         const int RAP_WMessageLogFileGet                = 38;
56         const int RAP_WServiceEnum                      = 39;
57         const int RAP_WServiceInstall                   = 40;
58         const int RAP_WServiceControl                   = 41;
59         const int RAP_WAccessEnum                       = 42;
60         const int RAP_WAccessGetInfo                    = 43;
61         const int RAP_WAccessSetInfo                    = 44;
62         const int RAP_WAccessAdd                        = 45;
63         const int RAP_WAccessDel                        = 46;
64         const int RAP_WGroupEnum                        = 47;
65         const int RAP_WGroupAdd                         = 48;
66         const int RAP_WGroupDel                         = 49;
67         const int RAP_WGroupAddUser                     = 50;
68         const int RAP_WGroupDelUser                     = 51;
69         const int RAP_WGroupGetUsers                    = 52;
70         const int RAP_WUserEnum                         = 53;
71         const int RAP_WUserAdd                          = 54;
72         const int RAP_WUserDel                          = 55;
73         const int RAP_WUserGetInfo                      = 56;
74         const int RAP_WUserSetInfo                      = 57;
75         const int RAP_WUserPasswordSet                  = 58;
76         const int RAP_WUserGetGroups                    = 59;
77         const int RAP_WWkstaSetUID                      = 62;
78         const int RAP_WWkstaGetInfo                     = 63;
79         const int RAP_WWkstaSetInfo                     = 64;
80         const int RAP_WUseEnum                          = 65;
81         const int RAP_WUseAdd                           = 66;
82         const int RAP_WUseDel                           = 67;
83         const int RAP_WUseGetInfo                       = 68;
84         const int RAP_WPrintQEnum                       = 69;
85         const int RAP_WPrintQGetInfo                    = 70;
86         const int RAP_WPrintQSetInfo                    = 71;
87         const int RAP_WPrintQAdd                        = 72;
88         const int RAP_WPrintQDel                        = 73;
89         const int RAP_WPrintQPause                      = 74;
90         const int RAP_WPrintQContinue                   = 75;
91         const int RAP_WPrintJobEnum                     = 76;
92         const int RAP_WPrintJobGetInfo                  = 77;
93         const int RAP_WPrintJobSetInfo_OLD              = 78;
94         const int RAP_WPrintJobDel                      = 81;
95         const int RAP_WPrintJobPause                    = 82;
96         const int RAP_WPrintJobContinue                 = 83;
97         const int RAP_WPrintDestEnum                    = 84;
98         const int RAP_WPrintDestGetInfo                 = 85;
99         const int RAP_WPrintDestControl                 = 86;
100         const int RAP_WProfileSave                      = 87;
101         const int RAP_WProfileLoad                      = 88;
102         const int RAP_WStatisticsGet                    = 89;
103         const int RAP_WStatisticsClear                  = 90;
104         const int RAP_NetRemoteTOD                      = 91;
105         const int RAP_WNetBiosEnum                      = 92;
106         const int RAP_WNetBiosGetInfo                   = 93;
107         const int RAP_NetServerEnum                     = 94;
108         const int RAP_I_NetServerEnum                   = 95;
109         const int RAP_WServiceGetInfo                   = 96;
110         const int RAP_WPrintQPurge                      = 103;
111         const int RAP_NetServerEnum2                    = 104;
112         const int RAP_WAccessGetUserPerms               = 105;
113         const int RAP_WGroupGetInfo                     = 106;
114         const int RAP_WGroupSetInfo                     = 107;
115         const int RAP_WGroupSetUsers                    = 108;
116         const int RAP_WUserSetGroups                    = 109;
117         const int RAP_WUserModalsGet                    = 110;
118         const int RAP_WUserModalsSet                    = 111;
119         const int RAP_WFileEnum2                        = 112;
120         const int RAP_WUserAdd2                         = 113;
121         const int RAP_WUserSetInfo2                     = 114;
122         const int RAP_WUserPasswordSet2                 = 115;
123         const int RAP_I_NetServerEnum2                  = 116;
124         const int RAP_WConfigGet2                       = 117;
125         const int RAP_WConfigGetAll2                    = 118;
126         const int RAP_WGetDCName                        = 119;
127         const int RAP_NetHandleGetInfo                  = 120;
128         const int RAP_NetHandleSetInfo                  = 121;
129         const int RAP_WStatisticsGet2                   = 122;
130         const int RAP_WBuildGetInfo                     = 123;
131         const int RAP_WFileGetInfo2                     = 124;
132         const int RAP_WFileClose2                       = 125;
133         const int RAP_WNetServerReqChallenge            = 126;
134         const int RAP_WNetServerAuthenticate            = 127;
135         const int RAP_WNetServerPasswordSet             = 128;
136         const int RAP_WNetAccountDeltas                 = 129;
137         const int RAP_WNetAccountSync                   = 130;
138         const int RAP_WUserEnum2                        = 131;
139         const int RAP_WWkstaUserLogon                   = 132;
140         const int RAP_WWkstaUserLogoff                  = 133;
141         const int RAP_WLogonEnum                        = 134;
142         const int RAP_WErrorLogRead                     = 135;
143         const int RAP_NetPathType                       = 136;
144         const int RAP_NetPathCanonicalize               = 137;
145         const int RAP_NetPathCompare                    = 138;
146         const int RAP_NetNameValidate                   = 139;
147         const int RAP_NetNameCanonicalize               = 140;
148         const int RAP_NetNameCompare                    = 141;
149         const int RAP_WAuditRead                        = 142;
150         const int RAP_WPrintDestAdd                     = 143;
151         const int RAP_WPrintDestSetInfo                 = 144;
152         const int RAP_WPrintDestDel                     = 145;
153         const int RAP_WUserValidate2                    = 146;
154         const int RAP_WPrintJobSetInfo                  = 147;
155         const int RAP_TI_NetServerDiskEnum              = 148;
156         const int RAP_TI_NetServerDiskGetInfo           = 149;
157         const int RAP_TI_FTVerifyMirror                 = 150;
158         const int RAP_TI_FTAbortVerify                  = 151;
159         const int RAP_TI_FTGetInfo                      = 152;
160         const int RAP_TI_FTSetInfo                      = 153;
161         const int RAP_TI_FTLockDisk                     = 154;
162         const int RAP_TI_FTFixError                     = 155;
163         const int RAP_TI_FTAbortFix                     = 156;
164         const int RAP_TI_FTDiagnoseError                = 157;
165         const int RAP_TI_FTGetDriveStats                = 158;
166         const int RAP_TI_FTErrorGetInfo                 = 160;
167         const int RAP_NetAccessCheck                    = 163;
168         const int RAP_NetAlertRaise                     = 164;
169         const int RAP_NetAlertStart                     = 165;
170         const int RAP_NetAlertStop                      = 166;
171         const int RAP_NetAuditWrite                     = 167;
172         const int RAP_NetIRemoteAPI                     = 168;
173         const int RAP_NetServiceStatus                  = 169;
174         const int RAP_NetServerRegister                 = 170;
175         const int RAP_NetServerDeregister               = 171;
176         const int RAP_NetSessionEntryMake               = 172;
177         const int RAP_NetSessionEntryClear              = 173;
178         const int RAP_NetSessionEntryGetInfo            = 174;
179         const int RAP_NetSessionEntrySetInfo            = 175;
180         const int RAP_NetConnectionEntryMake            = 176;
181         const int RAP_NetConnectionEntryClear           = 177;
182         const int RAP_NetConnectionEntrySetInfo         = 178;
183         const int RAP_NetConnectionEntryGetInfo         = 179;
184         const int RAP_NetFileEntryMake                  = 180;
185         const int RAP_NetFileEntryClear                 = 181;
186         const int RAP_NetFileEntrySetInfo               = 182;
187         const int RAP_NetFileEntryGetInfo               = 183;
188         const int RAP_AltSrvMessageBufferSend           = 184;
189         const int RAP_AltSrvMessageFileSend             = 185;
190         const int RAP_wI_NetRplWkstaEnum                = 186;
191         const int RAP_wI_NetRplWkstaGetInfo             = 187;
192         const int RAP_wI_NetRplWkstaSetInfo             = 188;
193         const int RAP_wI_NetRplWkstaAdd                 = 189;
194         const int RAP_wI_NetRplWkstaDel                 = 190;
195         const int RAP_wI_NetRplProfileEnum              = 191;
196         const int RAP_wI_NetRplProfileGetInfo           = 192;
197         const int RAP_wI_NetRplProfileSetInfo           = 193;
198         const int RAP_wI_NetRplProfileAdd               = 194;
199         const int RAP_wI_NetRplProfileDel               = 195;
200         const int RAP_wI_NetRplProfileClone             = 196;
201         const int RAP_wI_NetRplBaseProfileEnum          = 197;
202         const int RAP_WIServerSetInfo                   = 201;
203         const int RAP_WPrintDriverEnum                  = 205;
204         const int RAP_WPrintQProcessorEnum              = 206;
205         const int RAP_WPrintPortEnum                    = 207;
206         const int RAP_WNetWriteUpdateLog                = 208;
207         const int RAP_WNetAccountUpdate                 = 209;
208         const int RAP_WNetAccountConfirmUpdate          = 210;
209         const int RAP_WConfigSet                        = 211;
210         const int RAP_WAccountsReplicate                = 212;
211         const int RAP_SamOEMChgPasswordUser2_P          = 214;
212         const int RAP_NetServerEnum3                    = 215;
213         const int RAP_WprintDriverGetInfo               = 250;
214         const int RAP_WprintDriverSetInfo               = 251;
215         const int RAP_WaliasAdd                         = 252;
216         const int RAP_WaliasDel                         = 253;
217         const int RAP_WaliasGetInfo                     = 254;
218         const int RAP_WaliasSetInfo                     = 255;
219         const int RAP_WaliasEnum                        = 256;
220         const int RAP_WuserGetLogonAsn                  = 257;
221         const int RAP_WuserSetLogonAsn                  = 258;
222         const int RAP_WuserGetAppSel                    = 259;
223         const int RAP_WuserSetAppSel                    = 260;
224         const int RAP_WappAdd                           = 261;
225         const int RAP_WappDel                           = 262;
226         const int RAP_WappGetInfo                       = 263;
227         const int RAP_WappSetInfo                       = 264;
228         const int RAP_WappEnum                          = 265;
229         const int RAP_WUserDCDBInit                     = 266;
230         const int RAP_WDASDAdd                          = 267;
231         const int RAP_WDASDDel                          = 268;
232         const int RAP_WDASDGetInfo                      = 269;
233         const int RAP_WDASDSetInfo                      = 270;
234         const int RAP_WDASDEnum                         = 271;
235         const int RAP_WDASDCheck                        = 272;
236         const int RAP_WDASDCtl                          = 273;
237         const int RAP_WuserRemoteLogonCheck             = 274;
238         const int RAP_WUserPasswordSet3                 = 275;
239         const int RAP_WCreateRIPLMachine                = 276;
240         const int RAP_WDeleteRIPLMachine                = 277;
241         const int RAP_WGetRIPLMachineInfo               = 278;
242         const int RAP_WSetRIPLMachineInfo               = 279;
243         const int RAP_WEnumRIPLMachine                  = 280;
244         const int RAP_I_ShareAdd                        = 281;
245         const int RAP_AliasEnum                         = 282;
246         const int RAP_WaccessApply                      = 283;
247         const int RAP_WPrt16Query                       = 284;
248         const int RAP_WPrt16Set                         = 285;
249         const int RAP_WUserDel100                       = 286;
250         const int RAP_WUserRemoteLogonCheck2            = 287;
251         const int RAP_WRemoteTODSet                     = 294;
252         const int RAP_WprintJobMoveAll                  = 295;
253         const int RAP_W16AppParmAdd                     = 296;
254         const int RAP_W16AppParmDel                     = 297;
255         const int RAP_W16AppParmGet                     = 298;
256         const int RAP_W16AppParmSet                     = 299;
257         const int RAP_W16RIPLMachineCreate              = 300;
258         const int RAP_W16RIPLMachineGetInfo             = 301;
259         const int RAP_W16RIPLMachineSetInfo             = 302;
260         const int RAP_W16RIPLMachineEnum                = 303;
261         const int RAP_W16RIPLMachineListParmEnum        = 304;
262         const int RAP_W16RIPLMachClassGetInfo           = 305;
263         const int RAP_W16RIPLMachClassEnum              = 306;
264         const int RAP_W16RIPLMachClassCreate            = 307;
265         const int RAP_W16RIPLMachClassSetInfo           = 308;
266         const int RAP_W16RIPLMachClassDelete            = 309;
267         const int RAP_W16RIPLMachClassLPEnum            = 310;
268         const int RAP_W16RIPLMachineDelete              = 311;
269         const int RAP_W16WSLevelGetInfo                 = 312;
270         const int RAP_WserverNameAdd                    = 313;
271         const int RAP_WserverNameDel                    = 314;
272         const int RAP_WserverNameEnum                   = 315;
273         const int RAP_I_WDASDEnum                       = 316;
274         const int RAP_WDASDEnumTerminate                = 317;
275         const int RAP_WDASDSetInfo2                     = 318;
276         const int MAX_API                               = 318;
277
278         /* sizes of fixed-length fields, including null terminator */
279         const int RAP_GROUPNAME_LEN     = 21;
280         const int RAP_USERNAME_LEN      = 21;
281         const int RAP_SHARENAME_LEN     = 13;
282         const int RAP_UPASSWD_LEN       = 16; /* user password */
283         const int RAP_SPASSWD_LEN       = 9; /* share password */
284         const int RAP_MACHNAME_LEN      = 16;
285         const int RAP_SRVCNAME_LEN      = 16;
286         const int RAP_SRVCCMNT_LEN      = 64;
287         const int RAP_DATATYPE_LEN      = 10;
288
289         typedef struct {
290                 uint8 group_name[21];
291                 char reserved1;
292                 astring *comment;
293         } rap_group_info_1;
294
295         typedef struct {
296                 uint8 user_name[21];
297                 char reserved1;
298                 uint8 passwrd[16];
299                 uint32 pwage;
300                 uint16 priv;
301                 astring *home_dir;
302                 astring *comment;
303                 uint16 userflags;
304                 astring *logon_script;
305         } rap_user_info_1;
306
307         typedef struct {
308                 uint8 service_name[16];
309                 uint16 status;
310                 uint32 installcode;
311                 uint16 process_num;
312                 astring *comment;
313         } rap_service_info_2;
314
315         typedef struct {
316                 uint8 share_name[13];
317         } rap_share_info_0;
318
319         typedef struct {
320                 uint8 share_name[13];
321                 char reserved1;
322                 uint16 share_type;
323                 astring *comment;
324         } rap_share_info_1;
325
326         typedef struct {
327                 uint8 share_name[13];
328                 char reserved1;
329                 uint16 share_type;
330                 astring *comment;
331                 uint16 perms;
332                 uint16 maximum_users;
333                 uint16 active_users;
334                 astring *path;
335                 uint8 password[9];
336                 char reserved2;
337         } rap_share_info_2;
338
339         typedef [nodiscriminant] union {
340                 [case(0)] rap_share_info_0 info0;
341                 [case(1)] rap_share_info_1 info1;
342                 [case(2)] rap_share_info_2 info2;
343         } rap_share_info;
344
345         [public] void rap_NetShareEnum(
346                 [in] uint16 level,
347                 [in] uint16 bufsize,
348                 [out] rap_status status,
349                 [out] uint16 convert,
350                 [out] uint16 count,
351                 [out] uint16 available,
352                 [out,switch_is(level)] rap_share_info *info
353         );
354
355         typedef struct {
356                 uint8 name[16];
357         } rap_server_info_0;
358
359         typedef struct {
360                 uint8 name[16];
361                 uint8 version_major;
362                 uint8 version_minor;
363                 uint32 servertype;
364                 astring *comment;
365         } rap_server_info_1;
366
367         typedef [nodiscriminant] union {
368                 [case(0)] rap_server_info_0 info0;
369                 [case(1)] rap_server_info_1 info1;
370         } rap_server_info;
371
372         [public] void rap_NetServerEnum2(
373                 [in] uint16 level,
374                 [in] uint16 bufsize,
375                 [in] uint32 servertype,
376                 [in] astring *domain,
377                 [out] rap_status status,
378                 [out] uint16 convert,
379                 [out] uint16 count,
380                 [out] uint16 available,
381                 [out,switch_is(level)] rap_server_info info[count]
382         );
383
384         [public] void rap_WserverGetInfo(
385                 [in] uint16 level,
386                 [in] uint16 bufsize,
387                 [out] rap_status status,
388                 [out] uint16 convert,
389                 [out] uint16 available,
390                 [out,switch_is(level)] rap_server_info info
391         );
392
393         typedef [public] enum {
394                 PRJ_QS_QUEUED   = 0x0000,
395                 PRJ_QS_PAUSED   = 0x0001,
396                 PRJ_QS_SPOOLING = 0x0002,
397                 PRJ_QS_PRINTING = 0x0003,
398                 PRJ_QS_ERROR    = 0x0010
399         } rap_PrintJStatusCode;
400
401         typedef struct {
402                 uint16 JobID;
403         } rap_PrintJobInfo0;
404
405         typedef struct {
406                 uint16 JobID;
407                 [charset(DOS)] uint8 UserName[21];
408                 uint8 Pad;
409                 [charset(DOS)] uint8 NotifyName[16];
410                 [charset(DOS)] uint8 DataType[10];
411                 [relative_short] astring *PrintParameterString;
412                 uint16 PrintParameterStringHigh;
413                 uint16 JobPosition;
414                 rap_PrintJStatusCode JobStatus;
415                 [relative_short] astring *JobStatusString;
416                 uint16 JobStatusStringHigh;
417                 time_t TimeSubmitted;
418                 uint32 JobSize;
419                 [relative_short] astring *JobCommentString;
420                 uint16 JobCommentStringHigh;
421         } rap_PrintJobInfo1;
422
423         typedef struct {
424                 uint16 JobID;
425                 uint16 Priority;
426                 [relative_short] astring *UserName;
427                 uint16 UserNameHigh;
428                 uint16 JobPosition;
429                 rap_PrintJStatusCode JobStatus;
430                 time_t TimeSubmitted;
431                 uint32 JobSize;
432                 [relative_short] astring *JobCommentString;
433                 uint16 JobCommentStringHigh;
434                 [relative_short] astring *DocumentName;
435                 uint16 DocumentNameHigh;
436         } rap_PrintJobInfo2;
437
438         typedef struct {
439                 uint16 JobID;
440                 uint16 Priority;
441                 [relative_short] astring *UserName;
442                 uint16 UserNameHigh;
443                 uint16 JobPosition;
444                 rap_PrintJStatusCode JobStatus;
445                 time_t TimeSubmitted;
446                 uint32 JobSize;
447                 [relative_short] astring *JobCommentString;
448                 uint16 JobCommentStringHigh;
449                 [relative_short] astring *DocumentName;
450                 uint16 DocumentNameHigh;
451                 [relative_short] astring *NotifyName;
452                 uint16 NotifyNameHigh;
453                 [relative_short] astring *DataType;
454                 uint16 DataTypeHigh;
455                 [relative_short] astring *PrintParameterString;
456                 uint16 PrintParameterStringHigh;
457                 [relative_short] astring *StatusString;
458                 uint16 StatusStringHigh;
459                 [relative_short] astring *QueueName;
460                 uint16 QueueNameHigh;
461                 [relative_short] astring *PrintProcessorName;
462                 uint16 PrintProcessorNameHigh;
463                 [relative_short] astring *PrintProcessorParams;
464                 uint16 PrintProcessorParamsHigh;
465                 [relative_short] astring *DriverName;
466                 uint16 DriverNameHigh;
467                 [relative_short] astring *DriverDataOffset;
468                 uint16 DriverDataOffsetHigh;
469                 [relative_short] astring *PrinterNameOffset;
470                 uint16 PrinterNameOffsetHigh;
471         } rap_PrintJobInfo3;
472
473         typedef [public,nodiscriminant] union {
474                 [case(0)] rap_PrintJobInfo0 info0;
475                 [case(1)] rap_PrintJobInfo1 info1;
476                 [case(2)] rap_PrintJobInfo2 info2;
477                 [case(3)] rap_PrintJobInfo3 info3;
478         } rap_printj_info;
479
480         typedef [public] enum {
481                 PRQ_ACTIVE      = 0x0000,
482                 PRQ_PAUSE       = 0x0001,
483                 PRQ_ERROR       = 0x0002,
484                 PRQ_PENDING     = 0x0003
485         } rap_PrintQStatusCode;
486
487         typedef struct {
488                 [charset(DOS)] uint8 PrintQName[13];
489         } rap_PrintQueue0;
490
491         typedef struct {
492                 [charset(DOS)] uint8 PrintQName[13];
493                 uint8 Pad1;
494                 uint16 Priority;
495                 uint16 StartTime;
496                 uint16 UntilTime;
497                 [relative_short] astring *SeparatorPageFilename;
498                 uint16 SeparatorPageFilenameHigh;
499                 [relative_short] astring *PrintProcessorDllName;
500                 uint16 PrintProcessorDllNameHigh;
501                 [relative_short] astring *PrintDestinationsName;
502                 uint16 PrintDestinationsNameHigh;
503                 [relative_short] astring *PrintParameterString;
504                 uint16 PrintParameterStringHigh;
505                 [relative_short] astring *CommentString;
506                 uint16 CommentStringHigh;
507                 rap_PrintQStatusCode PrintQStatus;
508                 uint16 PrintJobCount;
509         } rap_PrintQueue1;
510
511         typedef struct {
512                 rap_PrintQueue1 queue;
513                 rap_PrintJobInfo1 job[queue.PrintJobCount];
514         } rap_PrintQueue2;
515
516         typedef [public] struct {
517                 [relative_short] astring *PrintQueueName;
518                 uint16 PrintQueueNameHigh;
519                 uint16 Priority;
520                 uint16 StartTime;
521                 uint16 UntilTime;
522                 uint16 Pad;
523                 [relative_short] astring *SeparatorPageFilename;
524                 uint16 SeparatorPageFilenameHigh;
525                 [relative_short] astring *PrintProcessorDllName;
526                 uint16 PrintProcessorDllNameHigh;
527                 [relative_short] astring *PrintParameterString;
528                 uint16 PrintParameterStringHigh;
529                 [relative_short] astring *CommentString;
530                 uint16 CommentStringHigh;
531                 rap_PrintQStatusCode PrintQStatus;
532                 uint16 PrintJobCount;
533                 [relative_short] astring *Printers;
534                 uint16 PrintersHigh;
535                 [relative_short] astring *DriverName;
536                 uint16 DriverNameHigh;
537                 [relative_short] astring *PrintDriverData;
538                 uint16 PrintDriverDataHigh;
539         } rap_PrintQueue3;
540
541         typedef struct {
542                 rap_PrintQueue3 queue;
543                 rap_PrintJobInfo2 job[queue.PrintJobCount];
544         } rap_PrintQueue4;
545
546         typedef struct {
547                 [relative_short] astring *PrintQueueName;
548                 uint16 PrintQueueNameHigh;
549         } rap_PrintQueue5;
550
551         typedef [public,nodiscriminant] union {
552                 [case(0)] rap_PrintQueue0 info0;
553                 [case(1)] rap_PrintQueue1 info1;
554                 [case(2)] rap_PrintQueue2 info2;
555                 [case(3)] rap_PrintQueue3 info3;
556                 [case(4)] rap_PrintQueue4 info4;
557                 [case(5)] rap_PrintQueue5 info5;
558         } rap_printq_info;
559
560         [public] void rap_NetPrintQEnum(
561                 [in] uint16 level,
562                 [in] uint16 bufsize,
563                 [out] rap_status status,
564                 [out] uint16 convert,
565                 [out] uint16 count,
566                 [out] uint16 available,
567                 [out,switch_is(level)] rap_printq_info info[count]
568         );
569
570         [public] void rap_NetPrintQGetInfo(
571                 [in] astring PrintQueueName,
572                 [in] uint16 level,
573                 [in] uint16 bufsize,
574                 [out] rap_status status,
575                 [out] uint16 convert,
576                 [out] uint16 available,
577                 [out,switch_is(level)] rap_printq_info info
578         );
579
580         [public] void rap_NetPrintJobPause(
581                 [in] uint16 JobID,
582                 [out] rap_status status,
583                 [out] uint16 convert
584         );
585
586         [public] void rap_NetPrintJobContinue(
587                 [in] uint16 JobID,
588                 [out] rap_status status,
589                 [out] uint16 convert
590         );
591
592         [public] void rap_NetPrintJobDelete(
593                 [in] uint16 JobID,
594                 [out] rap_status status,
595                 [out] uint16 convert
596         );
597
598         /* not documented in MS-RAP */
599         [public] void rap_NetPrintQueuePause(
600                 [in] astring PrintQueueName,
601                 [out] rap_status status,
602                 [out] uint16 convert
603         );
604
605         /* not documented in MS-RAP */
606         [public] void rap_NetPrintQueueResume(
607                 [in] astring PrintQueueName,
608                 [out] rap_status status,
609                 [out] uint16 convert
610         );
611
612         /* not documented in MS-RAP */
613         [public] void rap_NetPrintQueuePurge(
614                 [in] astring PrintQueueName,
615                 [out] rap_status status,
616                 [out] uint16 convert
617         );
618
619         /* not documented in MS-RAP */
620         [public] void rap_NetPrintJobEnum(
621                 [in] astring PrintQueueName,
622                 [in] uint16 level,
623                 [in] uint16 bufsize,
624                 [out] rap_status status,
625                 [out] uint16 convert,
626                 [out] uint16 count,
627                 [out] uint16 available,
628                 [out,switch_is(level)] rap_printj_info info[count]
629         );
630
631         [public] void rap_NetPrintJobGetInfo(
632                 [in] uint16 JobID,
633                 [in] uint16 level,
634                 [in] uint16 bufsize,
635                 [out] rap_status status,
636                 [out] uint16 convert,
637                 [out] uint16 available,
638                 [out,switch_is(level)] rap_printj_info info
639         );
640
641         typedef enum {
642                 RAP_PARAM_JOBNUM                = 0x0001,
643                 RAP_PARAM_USERNAME              = 0x0002,
644                 RAP_PARAM_NOTIFYNAME            = 0x0003,
645                 RAP_PARAM_DATATYPE              = 0x0004,
646                 RAP_PARAM_PARAMETERS_STRING     = 0x0005,
647                 RAP_PARAM_JOBPOSITION           = 0x0006,
648                 RAP_PARAM_JOBSTATUS             = 0x0007,
649                 RAP_PARAM_JOBSTATUSSTR          = 0x0008,
650                 RAP_PARAM_TIMESUBMITTED         = 0x0009,
651                 RAP_PARAM_JOBSIZE               = 0x000a,
652                 RAP_PARAM_JOBCOMMENT            = 0x000b
653         } rap_JobInfoParamNum;
654
655         typedef [nodiscriminant] union {
656                 [case (RAP_PARAM_JOBNUM)] uint16 value;
657                 [case (RAP_PARAM_USERNAME)] astring string;
658                 [case (RAP_PARAM_NOTIFYNAME)] astring string;
659                 [case (RAP_PARAM_DATATYPE)] astring string;
660                 [case (RAP_PARAM_PARAMETERS_STRING)] astring string;
661                 [case (RAP_PARAM_JOBPOSITION)] uint16 value;
662                 [case (RAP_PARAM_JOBSTATUS)] uint16 value;
663                 [case (RAP_PARAM_JOBSTATUSSTR)] astring string;
664                 [case (RAP_PARAM_TIMESUBMITTED)] uint32 value4;
665                 [case (RAP_PARAM_JOBSIZE)] uint32 value4;
666                 [case (RAP_PARAM_JOBCOMMENT)] astring string;
667         } rap_JobInfoParam;
668
669         [public] void rap_NetPrintJobSetInfo(
670                 [in] uint16 JobID,
671                 [in] uint16 level,
672                 [in] uint16 bufsize,
673                 [in] rap_JobInfoParamNum ParamNum,
674                 [in,switch_is(ParamNum)] rap_JobInfoParam Param,
675                 [out] rap_status status,
676                 [out] uint16 convert
677         );
678
679         /* Parameter description strings for RAP calls   */
680         /* Names are defined name for RAP call with _REQ */
681         /* appended to end.                              */
682
683         const string RAP_WFileEnum2_REQ                 = "zzWrLehb8g8";
684         const string RAP_WFileGetInfo2_REQ              = "DWrLh";
685         const string RAP_WFileClose2_REQ                = "D";
686
687         const string RAP_NetGroupEnum_REQ               = "WrLeh";
688         const string RAP_NetGroupAdd_REQ                = "WsT";
689         const string RAP_NetGroupDel_REQ                = "z";
690         const string RAP_NetGroupAddUser_REQ            = "zz";
691         const string RAP_NetGroupDelUser_REQ            = "zz";
692         const string RAP_NetGroupGetUsers_REQ           = "zWrLeh";
693         const string RAP_NetGroupSetUsers_REQ           = "zWsTW";
694
695         const string RAP_NetUserAdd2_REQ                = "WsTWW";
696         const string RAP_NetUserEnum_REQ                = "WrLeh";
697         const string RAP_NetUserEnum2_REQ               = "WrLDieh";
698         const string RAP_NetUserGetGroups_REQ           = "zWrLeh";
699         const string RAP_NetUserSetGroups_REQ           = "zWsTW";
700         const string RAP_NetUserPasswordSet_REQ         = "zb16b16w";
701         const string RAP_NetUserPasswordSet2_REQ        = "zb16b16WW";
702         const string RAP_SAMOEMChgPasswordUser2_REQ     = "B516B16";
703         const string RAP_NetUserValidate2_REQ           = "Wb62WWrLhWW";
704
705         const string RAP_NetServerEnum2_REQ             = "WrLehDz";
706         const string RAP_WserverGetInfo_REQ             = "WrLh";
707         const string RAP_NetWkstatGetInfo               = "WrLh";
708
709         const string RAP_WShareAdd_REQ                  = "WsT";
710         const string RAP_WShareEnum_REQ                 = "WrLeh";
711         const string RAP_WShareDel_REQ                  = "zW";
712         const string RAP_WWkstaGetInfo_REQ              = "WrLh";
713
714         const string RAP_NetPrintQEnum_REQ              = "WrLeh";
715         const string RAP_NetPrintQGetInfo_REQ           = "zWrLh";
716
717         const string RAP_NetServerAdminCommand_REQ      = "zhrLeh";
718         const string RAP_NetServiceEnum_REQ             = "WrLeh";
719         const string RAP_NetServiceControl_REQ          = "zWWrL";
720         const string RAP_NetServiceInstall_REQ          = "zF88sg88T";
721         const string RAP_NetServiceGetInfo_REQ          = "zWrLh";
722         const string RAP_NetSessionEnum_REQ             = "WrLeh";
723         const string RAP_NetSessionGetInfo_REQ          = "zWrLh";
724         const string RAP_NetSessionDel_REQ              = "zW";
725
726         const string RAP_NetConnectionEnum_REQ          = "zWrLeh";
727
728         const string RAP_NetWkstaUserLogoff_REQ         = "zzWb38WrLh";
729
730         /* Description strings for returned data in RAP calls */
731         /* I use all caps here in part to avoid accidental    */
732         /* name collisions */
733
734         const string RAP_FILE_INFO_L2                   = "D";
735         const string RAP_FILE_INFO_L3                   = "DWWzz";
736         const string  RAP_GROUP_INFO_L0                 = "B21";
737         const string RAP_GROUP_INFO_L1                  = "B21Bz";
738         const string RAP_GROUP_USERS_INFO_0             = "B21";
739         const string RAP_GROUP_USERS_INFO_1             = "B21BN";
740
741         const string RAP_USER_INFO_L0                   = "B21";
742         const string RAP_USER_INFO_L1                   = "B21BB16DWzzWz";
743
744         const string RAP_SERVER_INFO_L0                 = "B16";
745         const string RAP_SERVER_INFO_L1                 = "B16BBDz";
746         const string RAP_SERVER_INFO_L2                 = "B16BBDzDDDWWzWWWWWWWB21BzWWWWWWWWWWWWWWWWWWWWWWz";
747         const string RAP_SERVER_INFO_L3                 = "B16BBDzDDDWWzWWWWWWWB21BzWWWWWWWWWWWWWWWWWWWWWWzDWz";
748         const string RAP_SERVICE_INFO_L0                = "B16";
749         const string RAP_SERVICE_INFO_L2                = "B16WDWB64";
750         const string RAP_SHARE_INFO_L0                  = "B13";
751         const string RAP_SHARE_INFO_L1                  = "B13BWz";
752         const string RAP_SHARE_INFO_L2                  = "B13BWzWWWzB9B";
753
754         const string RAP_PRINTQ_INFO_L2                 = "B13BWWWzzzzzWN";
755         const string RAP_SMB_PRINT_JOB_L1               = "WB21BB16B10zWWzDDz";
756
757         const string RAP_SESSION_INFO_L2                = "zzWWWDDDz";
758         const string RAP_CONNECTION_INFO_L1             = "WWWWDzz";
759
760         const string RAP_USER_LOGOFF_INFO_L1            = "WDW";
761
762         const string RAP_WKSTA_INFO_L1                  = "WDzzzzBBDWDWWWWWWWWWWWWWWWWWWWzzWzzW";
763         const string RAP_WKSTA_INFO_L10                 = "zzzBBzz";
764 };