1 /* parser auto-generated by pidl */
4 #include "librpc/gen_ndr/ndr_notify.h"
6 _PUBLIC_ enum ndr_err_code ndr_push_notify_entry(struct ndr_push *ndr, int ndr_flags, const struct notify_entry *r)
8 if (ndr_flags & NDR_SCALARS) {
9 NDR_CHECK(ndr_push_align(ndr, 8));
10 NDR_CHECK(ndr_push_server_id(ndr, NDR_SCALARS, &r->server));
11 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->filter));
12 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->subdir_filter));
13 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dir_fd));
14 NDR_CHECK(ndr_push_file_id(ndr, NDR_SCALARS, &r->dir_id));
16 uint32_t _flags_save_string = ndr->flags;
17 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
18 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->path));
19 ndr->flags = _flags_save_string;
21 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->path_len));
22 NDR_CHECK(ndr_push_pointer(ndr, NDR_SCALARS, r->private_data));
24 if (ndr_flags & NDR_BUFFERS) {
25 NDR_CHECK(ndr_push_server_id(ndr, NDR_BUFFERS, &r->server));
26 NDR_CHECK(ndr_push_file_id(ndr, NDR_BUFFERS, &r->dir_id));
28 return NDR_ERR_SUCCESS;
31 _PUBLIC_ enum ndr_err_code ndr_pull_notify_entry(struct ndr_pull *ndr, int ndr_flags, struct notify_entry *r)
33 if (ndr_flags & NDR_SCALARS) {
34 NDR_CHECK(ndr_pull_align(ndr, 8));
35 NDR_CHECK(ndr_pull_server_id(ndr, NDR_SCALARS, &r->server));
36 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->filter));
37 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->subdir_filter));
38 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dir_fd));
39 NDR_CHECK(ndr_pull_file_id(ndr, NDR_SCALARS, &r->dir_id));
41 uint32_t _flags_save_string = ndr->flags;
42 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
43 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->path));
44 ndr->flags = _flags_save_string;
46 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->path_len));
47 NDR_CHECK(ndr_pull_pointer(ndr, NDR_SCALARS, &r->private_data));
49 if (ndr_flags & NDR_BUFFERS) {
50 NDR_CHECK(ndr_pull_server_id(ndr, NDR_BUFFERS, &r->server));
51 NDR_CHECK(ndr_pull_file_id(ndr, NDR_BUFFERS, &r->dir_id));
53 return NDR_ERR_SUCCESS;
56 _PUBLIC_ void ndr_print_notify_entry(struct ndr_print *ndr, const char *name, const struct notify_entry *r)
58 ndr_print_struct(ndr, name, "notify_entry");
60 ndr_print_server_id(ndr, "server", &r->server);
61 ndr_print_uint32(ndr, "filter", r->filter);
62 ndr_print_uint32(ndr, "subdir_filter", r->subdir_filter);
63 ndr_print_uint32(ndr, "dir_fd", r->dir_fd);
64 ndr_print_file_id(ndr, "dir_id", &r->dir_id);
65 ndr_print_string(ndr, "path", r->path);
66 ndr_print_uint32(ndr, "path_len", r->path_len);
67 ndr_print_pointer(ndr, "private_data", r->private_data);
71 static enum ndr_err_code ndr_push_notify_depth(struct ndr_push *ndr, int ndr_flags, const struct notify_depth *r)
73 uint32_t cntr_entries_0;
74 if (ndr_flags & NDR_SCALARS) {
75 NDR_CHECK(ndr_push_align(ndr, 8));
76 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_mask));
77 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_mask_subdir));
78 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_entries));
79 for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
80 NDR_CHECK(ndr_push_notify_entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0]));
83 if (ndr_flags & NDR_BUFFERS) {
84 for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
85 NDR_CHECK(ndr_push_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0]));
88 return NDR_ERR_SUCCESS;
91 static enum ndr_err_code ndr_pull_notify_depth(struct ndr_pull *ndr, int ndr_flags, struct notify_depth *r)
93 uint32_t size_entries_0 = 0;
94 uint32_t cntr_entries_0;
95 TALLOC_CTX *_mem_save_entries_0;
96 if (ndr_flags & NDR_SCALARS) {
97 NDR_CHECK(ndr_pull_align(ndr, 8));
98 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_mask));
99 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_mask_subdir));
100 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_entries));
101 size_entries_0 = r->num_entries;
102 NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_0);
103 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
104 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
105 for (cntr_entries_0 = 0; cntr_entries_0 < size_entries_0; cntr_entries_0++) {
106 NDR_CHECK(ndr_pull_notify_entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0]));
108 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
110 if (ndr_flags & NDR_BUFFERS) {
111 size_entries_0 = r->num_entries;
112 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
113 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
114 for (cntr_entries_0 = 0; cntr_entries_0 < size_entries_0; cntr_entries_0++) {
115 NDR_CHECK(ndr_pull_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0]));
117 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
119 return NDR_ERR_SUCCESS;
122 _PUBLIC_ void ndr_print_notify_depth(struct ndr_print *ndr, const char *name, const struct notify_depth *r)
124 uint32_t cntr_entries_0;
125 ndr_print_struct(ndr, name, "notify_depth");
127 ndr_print_uint32(ndr, "max_mask", r->max_mask);
128 ndr_print_uint32(ndr, "max_mask_subdir", r->max_mask_subdir);
129 ndr_print_uint32(ndr, "num_entries", r->num_entries);
130 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->num_entries);
132 for (cntr_entries_0=0;cntr_entries_0<r->num_entries;cntr_entries_0++) {
134 if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
135 ndr_print_notify_entry(ndr, "entries", &r->entries[cntr_entries_0]);
143 _PUBLIC_ enum ndr_err_code ndr_push_notify_array(struct ndr_push *ndr, int ndr_flags, const struct notify_array *r)
145 uint32_t cntr_depth_0;
146 if (ndr_flags & NDR_SCALARS) {
147 NDR_CHECK(ndr_push_align(ndr, 8));
148 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_depths));
149 for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) {
150 NDR_CHECK(ndr_push_notify_depth(ndr, NDR_SCALARS, &r->depth[cntr_depth_0]));
153 if (ndr_flags & NDR_BUFFERS) {
154 for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) {
155 NDR_CHECK(ndr_push_notify_depth(ndr, NDR_BUFFERS, &r->depth[cntr_depth_0]));
158 return NDR_ERR_SUCCESS;
161 _PUBLIC_ enum ndr_err_code ndr_pull_notify_array(struct ndr_pull *ndr, int ndr_flags, struct notify_array *r)
163 uint32_t size_depth_0 = 0;
164 uint32_t cntr_depth_0;
165 TALLOC_CTX *_mem_save_depth_0;
166 if (ndr_flags & NDR_SCALARS) {
167 NDR_CHECK(ndr_pull_align(ndr, 8));
168 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_depths));
169 size_depth_0 = r->num_depths;
170 NDR_PULL_ALLOC_N(ndr, r->depth, size_depth_0);
171 _mem_save_depth_0 = NDR_PULL_GET_MEM_CTX(ndr);
172 NDR_PULL_SET_MEM_CTX(ndr, r->depth, 0);
173 for (cntr_depth_0 = 0; cntr_depth_0 < size_depth_0; cntr_depth_0++) {
174 NDR_CHECK(ndr_pull_notify_depth(ndr, NDR_SCALARS, &r->depth[cntr_depth_0]));
176 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_depth_0, 0);
178 if (ndr_flags & NDR_BUFFERS) {
179 size_depth_0 = r->num_depths;
180 _mem_save_depth_0 = NDR_PULL_GET_MEM_CTX(ndr);
181 NDR_PULL_SET_MEM_CTX(ndr, r->depth, 0);
182 for (cntr_depth_0 = 0; cntr_depth_0 < size_depth_0; cntr_depth_0++) {
183 NDR_CHECK(ndr_pull_notify_depth(ndr, NDR_BUFFERS, &r->depth[cntr_depth_0]));
185 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_depth_0, 0);
187 return NDR_ERR_SUCCESS;
190 _PUBLIC_ void ndr_print_notify_array(struct ndr_print *ndr, const char *name, const struct notify_array *r)
192 uint32_t cntr_depth_0;
193 ndr_print_struct(ndr, name, "notify_array");
195 ndr_print_uint32(ndr, "num_depths", r->num_depths);
196 ndr->print(ndr, "%s: ARRAY(%d)", "depth", (int)r->num_depths);
198 for (cntr_depth_0=0;cntr_depth_0<r->num_depths;cntr_depth_0++) {
200 if (asprintf(&idx_0, "[%d]", cntr_depth_0) != -1) {
201 ndr_print_notify_depth(ndr, "depth", &r->depth[cntr_depth_0]);
209 _PUBLIC_ enum ndr_err_code ndr_push_notify_event(struct ndr_push *ndr, int ndr_flags, const struct notify_event *r)
211 if (ndr_flags & NDR_SCALARS) {
212 NDR_CHECK(ndr_push_align(ndr, 8));
213 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->action));
215 uint32_t _flags_save_string = ndr->flags;
216 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
217 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->path));
218 ndr->flags = _flags_save_string;
220 NDR_CHECK(ndr_push_pointer(ndr, NDR_SCALARS, r->private_data));
222 if (ndr_flags & NDR_BUFFERS) {
224 return NDR_ERR_SUCCESS;
227 _PUBLIC_ enum ndr_err_code ndr_pull_notify_event(struct ndr_pull *ndr, int ndr_flags, struct notify_event *r)
229 if (ndr_flags & NDR_SCALARS) {
230 NDR_CHECK(ndr_pull_align(ndr, 8));
231 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->action));
233 uint32_t _flags_save_string = ndr->flags;
234 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
235 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->path));
236 ndr->flags = _flags_save_string;
238 NDR_CHECK(ndr_pull_pointer(ndr, NDR_SCALARS, &r->private_data));
240 if (ndr_flags & NDR_BUFFERS) {
242 return NDR_ERR_SUCCESS;
245 _PUBLIC_ void ndr_print_notify_event(struct ndr_print *ndr, const char *name, const struct notify_event *r)
247 ndr_print_struct(ndr, name, "notify_event");
249 ndr_print_uint32(ndr, "action", r->action);
250 ndr_print_string(ndr, "path", r->path);
251 ndr_print_pointer(ndr, "private_data", r->private_data);