talloc: Fix talloc-compat pc files/headers.
[Samba/gebeck_regimport.git] / source3 / rpc_server / spoolss / srv_spoolss_util.h
blob8d6fb7848ee4588cc765d740afbe326f8125e050
1 /*
2 * Unix SMB/CIFS implementation.
4 * SPOOLSS RPC Pipe server / winreg client routines
6 * Copyright (c) 2010 Andreas Schneider <asn@samba.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, see <http://www.gnu.org/licenses/>.
22 #ifndef _SRV_SPOOLSS_UITL_H
23 #define _SRV_SPOOLSS_UITL_H
25 struct auth_session_info;
26 struct dcerpc_binding_handle;
28 WERROR winreg_printer_binding_handle(TALLOC_CTX *mem_ctx,
29 const struct auth_session_info *session_info,
30 struct messaging_context *msg_ctx,
31 struct dcerpc_binding_handle **winreg_binding_handle);
33 WERROR winreg_delete_printer_key_internal(TALLOC_CTX *mem_ctx,
34 const struct auth_session_info *session_info,
35 struct messaging_context *msg_ctx,
36 const char *printer,
37 const char *key);
38 WERROR winreg_printer_update_changeid_internal(TALLOC_CTX *mem_ctx,
39 const struct auth_session_info *session_info,
40 struct messaging_context *msg_ctx,
41 const char *printer);
42 WERROR winreg_printer_get_changeid_internal(TALLOC_CTX *mem_ctx,
43 const struct auth_session_info *session_info,
44 struct messaging_context *msg_ctx,
45 const char *printer,
46 uint32_t *pchangeid);
47 WERROR winreg_get_printer_internal(TALLOC_CTX *mem_ctx,
48 const struct auth_session_info *session_info,
49 struct messaging_context *msg_ctx,
50 const char *printer,
51 struct spoolss_PrinterInfo2 **pinfo2);
52 WERROR winreg_create_printer_internal(TALLOC_CTX *mem_ctx,
53 const struct auth_session_info *session_info,
54 struct messaging_context *msg_ctx,
55 const char *sharename);
56 WERROR winreg_update_printer_internal(TALLOC_CTX *mem_ctx,
57 const struct auth_session_info *session_info,
58 struct messaging_context *msg_ctx,
59 const char *sharename,
60 uint32_t info2_mask,
61 struct spoolss_SetPrinterInfo2 *info2,
62 struct spoolss_DeviceMode *devmode,
63 struct security_descriptor *secdesc);
64 WERROR winreg_set_printer_dataex_internal(TALLOC_CTX *mem_ctx,
65 const struct auth_session_info *session_info,
66 struct messaging_context *msg_ctx,
67 const char *printer,
68 const char *key,
69 const char *value,
70 enum winreg_Type type,
71 uint8_t *data,
72 uint32_t data_size);
73 WERROR winreg_enum_printer_dataex_internal(TALLOC_CTX *mem_ctx,
74 const struct auth_session_info *session_info,
75 struct messaging_context *msg_ctx,
76 const char *printer,
77 const char *key,
78 uint32_t *pnum_values,
79 struct spoolss_PrinterEnumValues **penum_values);
80 WERROR winreg_get_printer_dataex_internal(TALLOC_CTX *mem_ctx,
81 const struct auth_session_info *session_info,
82 struct messaging_context *msg_ctx,
83 const char *printer,
84 const char *key,
85 const char *value,
86 enum winreg_Type *type,
87 uint8_t **data,
88 uint32_t *data_size);
89 WERROR winreg_delete_printer_dataex_internal(TALLOC_CTX *mem_ctx,
90 const struct auth_session_info *session_info,
91 struct messaging_context *msg_ctx,
92 const char *printer,
93 const char *key,
94 const char *value);
95 WERROR winreg_get_driver_internal(TALLOC_CTX *mem_ctx,
96 const struct auth_session_info *session_info,
97 struct messaging_context *msg_ctx,
98 const char *architecture,
99 const char *driver_name,
100 uint32_t driver_version,
101 struct spoolss_DriverInfo8 **_info8);
102 WERROR winreg_get_driver_list_internal(TALLOC_CTX *mem_ctx,
103 const struct auth_session_info *session_info,
104 struct messaging_context *msg_ctx,
105 const char *architecture,
106 uint32_t version,
107 uint32_t *num_drivers,
108 const char ***drivers_p);
109 WERROR winreg_del_driver_internal(TALLOC_CTX *mem_ctx,
110 const struct auth_session_info *session_info,
111 struct messaging_context *msg_ctx,
112 struct spoolss_DriverInfo8 *info8,
113 uint32_t version);
114 WERROR winreg_add_driver_internal(TALLOC_CTX *mem_ctx,
115 const struct auth_session_info *session_info,
116 struct messaging_context *msg_ctx,
117 struct spoolss_AddDriverInfoCtr *r,
118 const char **driver_name,
119 uint32_t *driver_version);
120 WERROR winreg_get_printer_secdesc_internal(TALLOC_CTX *mem_ctx,
121 const struct auth_session_info *session_info,
122 struct messaging_context *msg_ctx,
123 const char *sharename,
124 struct spoolss_security_descriptor **psecdesc);
125 WERROR winreg_set_printer_secdesc_internal(TALLOC_CTX *mem_ctx,
126 const struct auth_session_info *session_info,
127 struct messaging_context *msg_ctx,
128 const char *sharename,
129 const struct spoolss_security_descriptor *secdesc);
130 WERROR winreg_printer_enumforms1_internal(TALLOC_CTX *mem_ctx,
131 const struct auth_session_info *session_info,
132 struct messaging_context *msg_ctx,
133 uint32_t *pnum_info,
134 union spoolss_FormInfo **pinfo);
135 WERROR winreg_printer_getform1_internal(TALLOC_CTX *mem_ctx,
136 const struct auth_session_info *session_info,
137 struct messaging_context *msg_ctx,
138 const char *form_name,
139 struct spoolss_FormInfo1 *r);
140 WERROR winreg_printer_addform1_internal(TALLOC_CTX *mem_ctx,
141 const struct auth_session_info *session_info,
142 struct messaging_context *msg_ctx,
143 struct spoolss_AddFormInfo1 *form);
144 WERROR winreg_printer_setform1_internal(TALLOC_CTX *mem_ctx,
145 const struct auth_session_info *session_info,
146 struct messaging_context *msg_ctx,
147 const char *form_name,
148 struct spoolss_AddFormInfo1 *form);
149 WERROR winreg_printer_deleteform1_internal(TALLOC_CTX *mem_ctx,
150 const struct auth_session_info *session_info,
151 struct messaging_context *msg_ctx,
152 const char *form_name);
153 WERROR winreg_enum_printer_key_internal(TALLOC_CTX *mem_ctx,
154 const struct auth_session_info *session_info,
155 struct messaging_context *msg_ctx,
156 const char *printer,
157 const char *key,
158 uint32_t *pnum_subkeys,
159 const char ***psubkeys);
160 #endif /* _SRV_SPOOLSS_UITL_H */