Add SetPrinterData, DeletePrinterData.
[jelmer/samba4-debian.git] / source / librpc / idl / epmapper.idl
1 #include "idl_types.h"
2
3 /*
4   endpoint mapper interface
5 */
6
7 [
8  uuid(e1af8308-5d1f-11c9-91a4-08002b14a0fa), 
9  version(3.0), 
10  pointer_default(unique)
11 ]
12 interface epmapper
13 {
14
15         /*
16           note that the following IDL won't work in MIDL, and in fact
17           that the full towers/floors representation of epm cannot be
18           represented in MIDL at all. I decided to represent it using
19           the extended IDL syntax in pidl to make it easier to work
20           with.
21         */
22
23         /* this guid indicates NDR encoding in a protocol tower */
24         const string NDR_GUID = "8a885d04-1ceb-11c9-9fe8-08002b104860";
25         const string NDR_GUID_VERSION = 2;
26
27         const uint32 EPMAPPER_PORT = 135;
28
29         typedef struct {
30                 GUID uuid;
31                 uint16 version;
32         } epm_prot_uuid;
33
34         typedef enum {
35                 EPM_PROTOCOL_TCP     = 0x07,
36                 EPM_PROTOCOL_IP      = 0x09,
37                 EPM_PROTOCOL_PIPE    = 0x10,
38                 EPM_PROTOCOL_NETBIOS = 0x11,
39                 EPM_PROTOCOL_RPC_C   = 0x0b,
40                 EPM_PROTOCOL_UUID    = 0x0d,
41                 EPM_PROTOCOL_SMB     = 0x0f,
42                 EPM_PROTOCOL_HTTP    = 0x1f
43         } epm_protocols;
44
45         typedef [nodiscriminant] union {
46                 [case(13)] epm_prot_uuid uuid;
47                 [default]  [flag(NDR_REMAINING)] DATA_BLOB lhs_data;
48         } epm_protocol_info;
49
50         typedef struct {
51                 uint8  protocol;
52                 [switch_is(protocol)] epm_protocol_info info;
53         } epm_lhs;
54
55         typedef struct {
56                 [flag(NDR_REMAINING)] DATA_BLOB rhs_data;
57         } epm_rhs;
58
59         typedef struct {
60                 [subcontext(2)] epm_lhs lhs;
61                 [subcontext(2)] epm_rhs rhs;
62         } epm_floor;
63
64         /* note that the NDR_NOALIGN flag is inherited by all nested
65            structures. All of the towers/floors stuff is
66            non-aligned. I wonder what sort of wicked substance these
67            guys were smoking?
68         */
69         typedef [flag(NDR_NOALIGN)] struct {
70                 uint16 num_floors;
71                 epm_floor floors[num_floors];
72         } epm_towers;
73
74         typedef struct {
75                 [value(ndr_size_epm_towers(&r->towers))] uint32  tower_length;
76                 [subcontext(4)] epm_towers towers;
77         } epm_twr_t;
78
79         typedef struct {
80                 GUID        object;
81                 epm_twr_t   *tower;
82                 ascstr2     annotation;
83         } epm_entry_t;
84
85         typedef struct {
86                 GUID                uuid;
87                 uint16              vers_major;
88                 uint16              vers_minor;
89         } rpc_if_id_t;
90     
91         /**********************/
92         /* Function 0x0       */
93         void epm_Insert(
94                 [in]    uint32          num_ents,
95                 [in,size_is(num_ents)]  epm_entry_t         entries[],
96                 [in]    uint32    replace,
97                 [out]   error_status_t  status
98                 );
99     
100         /**********************/
101         /* Function 0x1       */
102         void epm_Delete(
103                 [in]     uint32          num_ents,
104                 [in, size_is(num_ents)]  epm_entry_t entries[],
105                 [out]    error_status_t  status
106                 );
107     
108         /**********************/
109         /* Function 0x02      */
110         void epm_Lookup(
111                 [in]            uint32          inquiry_type,
112                 [in]            GUID            *object,
113                 [in]            rpc_if_id_t     *interface_id,
114                 [in]            uint32          vers_option,
115                 [in,out,ref]    policy_handle   *entry_handle,
116                 [in]            uint32          max_ents,
117                 [out]           uint32          num_ents,
118                 [out, length_is(num_ents), size_is(max_ents)]  epm_entry_t entries[],
119                 [out]           error_status_t  status
120                 );
121
122
123         /**********************/
124         /* Function 0x03      */
125
126         typedef struct {
127                 epm_twr_t *twr;
128         } epm_twr_p_t;
129
130         void epm_Map(
131                 [in]            GUID            *object,
132                 [in]            epm_twr_t       *map_tower,
133                 [in,out,ref]    policy_handle   *entry_handle,
134                 [in]            uint32          max_towers,
135                 [out]           uint32          num_towers,
136                 [out, length_is(num_towers), size_is(max_towers)]  epm_twr_p_t towers[],
137                 [out]           error_status_t  status
138                 );
139     
140
141         /**********************/
142         /* Function 0x04      */
143         void epm_LookupHandleFree(
144                 [in,out,ref]    policy_handle *entry_handle,
145                 [out]           error_status_t status
146                 );
147     
148         /**********************/
149         /* Function 0x05      */
150         void epm_InqObject(
151                 [out]           GUID        *epm_object,
152                 [out]           error_status_t   status
153                 );
154     
155
156         /**********************/
157         /* Function 0x05      */
158         void epm_MgmtDelete(
159                 [in]            uint32   object_speced,
160                 [in]            GUID     *object,
161                 [in]            epm_twr_t    *tower,
162                 [out]           error_status_t   status
163                 );
164 }