1/* parser auto-generated by pidl */ 2 3#include "includes.h" 4#include "librpc/gen_ndr/ndr_notify.h" 5 6_PUBLIC_ enum ndr_err_code ndr_push_notify_entry(struct ndr_push *ndr, int ndr_flags, const struct notify_entry *r) 7{ 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)); 15 { 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; 20 } 21 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->path_len)); 22 NDR_CHECK(ndr_push_pointer(ndr, NDR_SCALARS, r->private_data)); 23 NDR_CHECK(ndr_push_trailer_align(ndr, 8)); 24 } 25 if (ndr_flags & NDR_BUFFERS) { 26 NDR_CHECK(ndr_push_server_id(ndr, NDR_BUFFERS, &r->server)); 27 NDR_CHECK(ndr_push_file_id(ndr, NDR_BUFFERS, &r->dir_id)); 28 } 29 return NDR_ERR_SUCCESS; 30} 31 32_PUBLIC_ enum ndr_err_code ndr_pull_notify_entry(struct ndr_pull *ndr, int ndr_flags, struct notify_entry *r) 33{ 34 if (ndr_flags & NDR_SCALARS) { 35 NDR_CHECK(ndr_pull_align(ndr, 8)); 36 NDR_CHECK(ndr_pull_server_id(ndr, NDR_SCALARS, &r->server)); 37 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->filter)); 38 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->subdir_filter)); 39 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dir_fd)); 40 NDR_CHECK(ndr_pull_file_id(ndr, NDR_SCALARS, &r->dir_id)); 41 { 42 uint32_t _flags_save_string = ndr->flags; 43 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM); 44 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->path)); 45 ndr->flags = _flags_save_string; 46 } 47 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->path_len)); 48 NDR_CHECK(ndr_pull_pointer(ndr, NDR_SCALARS, &r->private_data)); 49 NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); 50 } 51 if (ndr_flags & NDR_BUFFERS) { 52 NDR_CHECK(ndr_pull_server_id(ndr, NDR_BUFFERS, &r->server)); 53 NDR_CHECK(ndr_pull_file_id(ndr, NDR_BUFFERS, &r->dir_id)); 54 } 55 return NDR_ERR_SUCCESS; 56} 57 58_PUBLIC_ void ndr_print_notify_entry(struct ndr_print *ndr, const char *name, const struct notify_entry *r) 59{ 60 ndr_print_struct(ndr, name, "notify_entry"); 61 ndr->depth++; 62 ndr_print_server_id(ndr, "server", &r->server); 63 ndr_print_uint32(ndr, "filter", r->filter); 64 ndr_print_uint32(ndr, "subdir_filter", r->subdir_filter); 65 ndr_print_uint32(ndr, "dir_fd", r->dir_fd); 66 ndr_print_file_id(ndr, "dir_id", &r->dir_id); 67 ndr_print_string(ndr, "path", r->path); 68 ndr_print_uint32(ndr, "path_len", r->path_len); 69 ndr_print_pointer(ndr, "private_data", r->private_data); 70 ndr->depth--; 71} 72 73_PUBLIC_ enum ndr_err_code ndr_push_notify_entry_array(struct ndr_push *ndr, int ndr_flags, const struct notify_entry_array *r) 74{ 75 uint32_t cntr_entries_0; 76 if (ndr_flags & NDR_SCALARS) { 77 NDR_CHECK(ndr_push_align(ndr, 8)); 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])); 81 } 82 NDR_CHECK(ndr_push_trailer_align(ndr, 8)); 83 } 84 if (ndr_flags & NDR_BUFFERS) { 85 for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) { 86 NDR_CHECK(ndr_push_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0])); 87 } 88 } 89 return NDR_ERR_SUCCESS; 90} 91 92_PUBLIC_ enum ndr_err_code ndr_pull_notify_entry_array(struct ndr_pull *ndr, int ndr_flags, struct notify_entry_array *r) 93{ 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->num_entries)); 99 NDR_PULL_ALLOC_N(ndr, r->entries, r->num_entries); 100 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr); 101 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); 102 for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) { 103 NDR_CHECK(ndr_pull_notify_entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0])); 104 } 105 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0); 106 NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); 107 } 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])); 113 } 114 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0); 115 } 116 return NDR_ERR_SUCCESS; 117} 118 119_PUBLIC_ void ndr_print_notify_entry_array(struct ndr_print *ndr, const char *name, const struct notify_entry_array *r) 120{ 121 uint32_t cntr_entries_0; 122 ndr_print_struct(ndr, name, "notify_entry_array"); 123 ndr->depth++; 124 ndr_print_uint32(ndr, "num_entries", r->num_entries); 125 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->num_entries); 126 ndr->depth++; 127 for (cntr_entries_0=0;cntr_entries_0<r->num_entries;cntr_entries_0++) { 128 char *idx_0=NULL; 129 if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) { 130 ndr_print_notify_entry(ndr, "entries", &r->entries[cntr_entries_0]); 131 free(idx_0); 132 } 133 } 134 ndr->depth--; 135 ndr->depth--; 136} 137 138static enum ndr_err_code ndr_push_notify_depth(struct ndr_push *ndr, int ndr_flags, const struct notify_depth *r) 139{ 140 uint32_t cntr_entries_0; 141 if (ndr_flags & NDR_SCALARS) { 142 NDR_CHECK(ndr_push_align(ndr, 8)); 143 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_mask)); 144 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_mask_subdir)); 145 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_entries)); 146 for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) { 147 NDR_CHECK(ndr_push_notify_entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0])); 148 } 149 NDR_CHECK(ndr_push_trailer_align(ndr, 8)); 150 } 151 if (ndr_flags & NDR_BUFFERS) { 152 for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) { 153 NDR_CHECK(ndr_push_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0])); 154 } 155 } 156 return NDR_ERR_SUCCESS; 157} 158 159static enum ndr_err_code ndr_pull_notify_depth(struct ndr_pull *ndr, int ndr_flags, struct notify_depth *r) 160{ 161 uint32_t cntr_entries_0; 162 TALLOC_CTX *_mem_save_entries_0; 163 if (ndr_flags & NDR_SCALARS) { 164 NDR_CHECK(ndr_pull_align(ndr, 8)); 165 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_mask)); 166 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_mask_subdir)); 167 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_entries)); 168 NDR_PULL_ALLOC_N(ndr, r->entries, r->num_entries); 169 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr); 170 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); 171 for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) { 172 NDR_CHECK(ndr_pull_notify_entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0])); 173 } 174 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0); 175 NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); 176 } 177 if (ndr_flags & NDR_BUFFERS) { 178 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr); 179 NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); 180 for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) { 181 NDR_CHECK(ndr_pull_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0])); 182 } 183 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0); 184 } 185 return NDR_ERR_SUCCESS; 186} 187 188_PUBLIC_ void ndr_print_notify_depth(struct ndr_print *ndr, const char *name, const struct notify_depth *r) 189{ 190 uint32_t cntr_entries_0; 191 ndr_print_struct(ndr, name, "notify_depth"); 192 ndr->depth++; 193 ndr_print_uint32(ndr, "max_mask", r->max_mask); 194 ndr_print_uint32(ndr, "max_mask_subdir", r->max_mask_subdir); 195 ndr_print_uint32(ndr, "num_entries", r->num_entries); 196 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->num_entries); 197 ndr->depth++; 198 for (cntr_entries_0=0;cntr_entries_0<r->num_entries;cntr_entries_0++) { 199 char *idx_0=NULL; 200 if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) { 201 ndr_print_notify_entry(ndr, "entries", &r->entries[cntr_entries_0]); 202 free(idx_0); 203 } 204 } 205 ndr->depth--; 206 ndr->depth--; 207} 208 209_PUBLIC_ enum ndr_err_code ndr_push_notify_array(struct ndr_push *ndr, int ndr_flags, const struct notify_array *r) 210{ 211 uint32_t cntr_depth_0; 212 if (ndr_flags & NDR_SCALARS) { 213 NDR_CHECK(ndr_push_align(ndr, 8)); 214 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_depths)); 215 for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) { 216 NDR_CHECK(ndr_push_notify_depth(ndr, NDR_SCALARS, &r->depth[cntr_depth_0])); 217 } 218 NDR_CHECK(ndr_push_trailer_align(ndr, 8)); 219 } 220 if (ndr_flags & NDR_BUFFERS) { 221 for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) { 222 NDR_CHECK(ndr_push_notify_depth(ndr, NDR_BUFFERS, &r->depth[cntr_depth_0])); 223 } 224 } 225 return NDR_ERR_SUCCESS; 226} 227 228_PUBLIC_ enum ndr_err_code ndr_pull_notify_array(struct ndr_pull *ndr, int ndr_flags, struct notify_array *r) 229{ 230 uint32_t cntr_depth_0; 231 TALLOC_CTX *_mem_save_depth_0; 232 if (ndr_flags & NDR_SCALARS) { 233 NDR_CHECK(ndr_pull_align(ndr, 8)); 234 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_depths)); 235 NDR_PULL_ALLOC_N(ndr, r->depth, r->num_depths); 236 _mem_save_depth_0 = NDR_PULL_GET_MEM_CTX(ndr); 237 NDR_PULL_SET_MEM_CTX(ndr, r->depth, 0); 238 for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) { 239 NDR_CHECK(ndr_pull_notify_depth(ndr, NDR_SCALARS, &r->depth[cntr_depth_0])); 240 } 241 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_depth_0, 0); 242 NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); 243 } 244 if (ndr_flags & NDR_BUFFERS) { 245 _mem_save_depth_0 = NDR_PULL_GET_MEM_CTX(ndr); 246 NDR_PULL_SET_MEM_CTX(ndr, r->depth, 0); 247 for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) { 248 NDR_CHECK(ndr_pull_notify_depth(ndr, NDR_BUFFERS, &r->depth[cntr_depth_0])); 249 } 250 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_depth_0, 0); 251 } 252 return NDR_ERR_SUCCESS; 253} 254 255_PUBLIC_ void ndr_print_notify_array(struct ndr_print *ndr, const char *name, const struct notify_array *r) 256{ 257 uint32_t cntr_depth_0; 258 ndr_print_struct(ndr, name, "notify_array"); 259 ndr->depth++; 260 ndr_print_uint32(ndr, "num_depths", r->num_depths); 261 ndr->print(ndr, "%s: ARRAY(%d)", "depth", (int)r->num_depths); 262 ndr->depth++; 263 for (cntr_depth_0=0;cntr_depth_0<r->num_depths;cntr_depth_0++) { 264 char *idx_0=NULL; 265 if (asprintf(&idx_0, "[%d]", cntr_depth_0) != -1) { 266 ndr_print_notify_depth(ndr, "depth", &r->depth[cntr_depth_0]); 267 free(idx_0); 268 } 269 } 270 ndr->depth--; 271 ndr->depth--; 272} 273 274_PUBLIC_ enum ndr_err_code ndr_push_notify_event(struct ndr_push *ndr, int ndr_flags, const struct notify_event *r) 275{ 276 if (ndr_flags & NDR_SCALARS) { 277 NDR_CHECK(ndr_push_align(ndr, 8)); 278 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->action)); 279 { 280 uint32_t _flags_save_string = ndr->flags; 281 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM); 282 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->path)); 283 ndr->flags = _flags_save_string; 284 } 285 NDR_CHECK(ndr_push_pointer(ndr, NDR_SCALARS, r->private_data)); 286 NDR_CHECK(ndr_push_trailer_align(ndr, 8)); 287 } 288 if (ndr_flags & NDR_BUFFERS) { 289 } 290 return NDR_ERR_SUCCESS; 291} 292 293_PUBLIC_ enum ndr_err_code ndr_pull_notify_event(struct ndr_pull *ndr, int ndr_flags, struct notify_event *r) 294{ 295 if (ndr_flags & NDR_SCALARS) { 296 NDR_CHECK(ndr_pull_align(ndr, 8)); 297 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->action)); 298 { 299 uint32_t _flags_save_string = ndr->flags; 300 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM); 301 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->path)); 302 ndr->flags = _flags_save_string; 303 } 304 NDR_CHECK(ndr_pull_pointer(ndr, NDR_SCALARS, &r->private_data)); 305 NDR_CHECK(ndr_pull_trailer_align(ndr, 8)); 306 } 307 if (ndr_flags & NDR_BUFFERS) { 308 } 309 return NDR_ERR_SUCCESS; 310} 311 312_PUBLIC_ void ndr_print_notify_event(struct ndr_print *ndr, const char *name, const struct notify_event *r) 313{ 314 ndr_print_struct(ndr, name, "notify_event"); 315 ndr->depth++; 316 ndr_print_uint32(ndr, "action", r->action); 317 ndr_print_string(ndr, "path", r->path); 318 ndr_print_pointer(ndr, "private_data", r->private_data); 319 ndr->depth--; 320} 321 322