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 cntr_entries_0;
94
TALLOC_CTX *_mem_save_entries_0;
95
if (ndr_flags & NDR_SCALARS) {
96
NDR_CHECK(ndr_pull_align(ndr, 8));
97
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_mask));
98
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_mask_subdir));
99
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_entries));
100
NDR_PULL_ALLOC_N(ndr, r->entries, r->num_entries);
101
_mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
102
NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
103
for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
104
NDR_CHECK(ndr_pull_notify_entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0]));
106
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
108
if (ndr_flags & NDR_BUFFERS) {
109
_mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
110
NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
111
for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
112
NDR_CHECK(ndr_pull_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0]));
114
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
116
return NDR_ERR_SUCCESS;
119
_PUBLIC_ void ndr_print_notify_depth(struct ndr_print *ndr, const char *name, const struct notify_depth *r)
121
uint32_t cntr_entries_0;
122
ndr_print_struct(ndr, name, "notify_depth");
124
ndr_print_uint32(ndr, "max_mask", r->max_mask);
125
ndr_print_uint32(ndr, "max_mask_subdir", r->max_mask_subdir);
126
ndr_print_uint32(ndr, "num_entries", r->num_entries);
127
ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->num_entries);
129
for (cntr_entries_0=0;cntr_entries_0<r->num_entries;cntr_entries_0++) {
131
if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
132
ndr_print_notify_entry(ndr, "entries", &r->entries[cntr_entries_0]);
140
_PUBLIC_ enum ndr_err_code ndr_push_notify_array(struct ndr_push *ndr, int ndr_flags, const struct notify_array *r)
142
uint32_t cntr_depth_0;
143
if (ndr_flags & NDR_SCALARS) {
144
NDR_CHECK(ndr_push_align(ndr, 8));
145
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_depths));
146
for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) {
147
NDR_CHECK(ndr_push_notify_depth(ndr, NDR_SCALARS, &r->depth[cntr_depth_0]));
150
if (ndr_flags & NDR_BUFFERS) {
151
for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) {
152
NDR_CHECK(ndr_push_notify_depth(ndr, NDR_BUFFERS, &r->depth[cntr_depth_0]));
155
return NDR_ERR_SUCCESS;
158
_PUBLIC_ enum ndr_err_code ndr_pull_notify_array(struct ndr_pull *ndr, int ndr_flags, struct notify_array *r)
160
uint32_t cntr_depth_0;
161
TALLOC_CTX *_mem_save_depth_0;
162
if (ndr_flags & NDR_SCALARS) {
163
NDR_CHECK(ndr_pull_align(ndr, 8));
164
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_depths));
165
NDR_PULL_ALLOC_N(ndr, r->depth, r->num_depths);
166
_mem_save_depth_0 = NDR_PULL_GET_MEM_CTX(ndr);
167
NDR_PULL_SET_MEM_CTX(ndr, r->depth, 0);
168
for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) {
169
NDR_CHECK(ndr_pull_notify_depth(ndr, NDR_SCALARS, &r->depth[cntr_depth_0]));
171
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_depth_0, 0);
173
if (ndr_flags & NDR_BUFFERS) {
174
_mem_save_depth_0 = NDR_PULL_GET_MEM_CTX(ndr);
175
NDR_PULL_SET_MEM_CTX(ndr, r->depth, 0);
176
for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) {
177
NDR_CHECK(ndr_pull_notify_depth(ndr, NDR_BUFFERS, &r->depth[cntr_depth_0]));
179
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_depth_0, 0);
181
return NDR_ERR_SUCCESS;
184
_PUBLIC_ void ndr_print_notify_array(struct ndr_print *ndr, const char *name, const struct notify_array *r)
186
uint32_t cntr_depth_0;
187
ndr_print_struct(ndr, name, "notify_array");
189
ndr_print_uint32(ndr, "num_depths", r->num_depths);
190
ndr->print(ndr, "%s: ARRAY(%d)", "depth", (int)r->num_depths);
192
for (cntr_depth_0=0;cntr_depth_0<r->num_depths;cntr_depth_0++) {
194
if (asprintf(&idx_0, "[%d]", cntr_depth_0) != -1) {
195
ndr_print_notify_depth(ndr, "depth", &r->depth[cntr_depth_0]);
203
_PUBLIC_ enum ndr_err_code ndr_push_notify_event(struct ndr_push *ndr, int ndr_flags, const struct notify_event *r)
205
if (ndr_flags & NDR_SCALARS) {
206
NDR_CHECK(ndr_push_align(ndr, 8));
207
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->action));
209
uint32_t _flags_save_string = ndr->flags;
210
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
211
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->path));
212
ndr->flags = _flags_save_string;
214
NDR_CHECK(ndr_push_pointer(ndr, NDR_SCALARS, r->private_data));
216
if (ndr_flags & NDR_BUFFERS) {
218
return NDR_ERR_SUCCESS;
221
_PUBLIC_ enum ndr_err_code ndr_pull_notify_event(struct ndr_pull *ndr, int ndr_flags, struct notify_event *r)
223
if (ndr_flags & NDR_SCALARS) {
224
NDR_CHECK(ndr_pull_align(ndr, 8));
225
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->action));
227
uint32_t _flags_save_string = ndr->flags;
228
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
229
NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->path));
230
ndr->flags = _flags_save_string;
232
NDR_CHECK(ndr_pull_pointer(ndr, NDR_SCALARS, &r->private_data));
234
if (ndr_flags & NDR_BUFFERS) {
236
return NDR_ERR_SUCCESS;
239
_PUBLIC_ void ndr_print_notify_event(struct ndr_print *ndr, const char *name, const struct notify_event *r)
241
ndr_print_struct(ndr, name, "notify_event");
243
ndr_print_uint32(ndr, "action", r->action);
244
ndr_print_string(ndr, "path", r->path);
245
ndr_print_pointer(ndr, "private_data", r->private_data);