| 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 | {
|
|---|
| 14 | uint32_t _flags_save_string = ndr->flags;
|
|---|
| 15 | ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
|
|---|
| 16 | NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->path));
|
|---|
| 17 | ndr->flags = _flags_save_string;
|
|---|
| 18 | }
|
|---|
| 19 | NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->path_len));
|
|---|
| 20 | NDR_CHECK(ndr_push_pointer(ndr, NDR_SCALARS, r->private_data));
|
|---|
| 21 | }
|
|---|
| 22 | if (ndr_flags & NDR_BUFFERS) {
|
|---|
| 23 | NDR_CHECK(ndr_push_server_id(ndr, NDR_BUFFERS, &r->server));
|
|---|
| 24 | }
|
|---|
| 25 | return NDR_ERR_SUCCESS;
|
|---|
| 26 | }
|
|---|
| 27 |
|
|---|
| 28 | _PUBLIC_ enum ndr_err_code ndr_pull_notify_entry(struct ndr_pull *ndr, int ndr_flags, struct notify_entry *r)
|
|---|
| 29 | {
|
|---|
| 30 | if (ndr_flags & NDR_SCALARS) {
|
|---|
| 31 | NDR_CHECK(ndr_pull_align(ndr, 8));
|
|---|
| 32 | NDR_CHECK(ndr_pull_server_id(ndr, NDR_SCALARS, &r->server));
|
|---|
| 33 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->filter));
|
|---|
| 34 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->subdir_filter));
|
|---|
| 35 | {
|
|---|
| 36 | uint32_t _flags_save_string = ndr->flags;
|
|---|
| 37 | ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
|
|---|
| 38 | NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->path));
|
|---|
| 39 | ndr->flags = _flags_save_string;
|
|---|
| 40 | }
|
|---|
| 41 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->path_len));
|
|---|
| 42 | NDR_CHECK(ndr_pull_pointer(ndr, NDR_SCALARS, &r->private_data));
|
|---|
| 43 | }
|
|---|
| 44 | if (ndr_flags & NDR_BUFFERS) {
|
|---|
| 45 | NDR_CHECK(ndr_pull_server_id(ndr, NDR_BUFFERS, &r->server));
|
|---|
| 46 | }
|
|---|
| 47 | return NDR_ERR_SUCCESS;
|
|---|
| 48 | }
|
|---|
| 49 |
|
|---|
| 50 | _PUBLIC_ void ndr_print_notify_entry(struct ndr_print *ndr, const char *name, const struct notify_entry *r)
|
|---|
| 51 | {
|
|---|
| 52 | ndr_print_struct(ndr, name, "notify_entry");
|
|---|
| 53 | ndr->depth++;
|
|---|
| 54 | ndr_print_server_id(ndr, "server", &r->server);
|
|---|
| 55 | ndr_print_uint32(ndr, "filter", r->filter);
|
|---|
| 56 | ndr_print_uint32(ndr, "subdir_filter", r->subdir_filter);
|
|---|
| 57 | ndr_print_string(ndr, "path", r->path);
|
|---|
| 58 | ndr_print_uint32(ndr, "path_len", r->path_len);
|
|---|
| 59 | ndr_print_pointer(ndr, "private_data", r->private_data);
|
|---|
| 60 | ndr->depth--;
|
|---|
| 61 | }
|
|---|
| 62 |
|
|---|
| 63 | static enum ndr_err_code ndr_push_notify_depth(struct ndr_push *ndr, int ndr_flags, const struct notify_depth *r)
|
|---|
| 64 | {
|
|---|
| 65 | uint32_t cntr_entries_0;
|
|---|
| 66 | if (ndr_flags & NDR_SCALARS) {
|
|---|
| 67 | NDR_CHECK(ndr_push_align(ndr, 8));
|
|---|
| 68 | NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_mask));
|
|---|
| 69 | NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_mask_subdir));
|
|---|
| 70 | NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_entries));
|
|---|
| 71 | for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
|
|---|
| 72 | NDR_CHECK(ndr_push_notify_entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0]));
|
|---|
| 73 | }
|
|---|
| 74 | }
|
|---|
| 75 | if (ndr_flags & NDR_BUFFERS) {
|
|---|
| 76 | for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
|
|---|
| 77 | NDR_CHECK(ndr_push_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0]));
|
|---|
| 78 | }
|
|---|
| 79 | }
|
|---|
| 80 | return NDR_ERR_SUCCESS;
|
|---|
| 81 | }
|
|---|
| 82 |
|
|---|
| 83 | static enum ndr_err_code ndr_pull_notify_depth(struct ndr_pull *ndr, int ndr_flags, struct notify_depth *r)
|
|---|
| 84 | {
|
|---|
| 85 | uint32_t cntr_entries_0;
|
|---|
| 86 | TALLOC_CTX *_mem_save_entries_0;
|
|---|
| 87 | if (ndr_flags & NDR_SCALARS) {
|
|---|
| 88 | NDR_CHECK(ndr_pull_align(ndr, 8));
|
|---|
| 89 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_mask));
|
|---|
| 90 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_mask_subdir));
|
|---|
| 91 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_entries));
|
|---|
| 92 | NDR_PULL_ALLOC_N(ndr, r->entries, r->num_entries);
|
|---|
| 93 | _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
|---|
| 94 | NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
|
|---|
| 95 | for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) {
|
|---|
| 96 | NDR_CHECK(ndr_pull_notify_entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0]));
|
|---|
| 97 | }
|
|---|
| 98 | NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
|
|---|
| 99 | }
|
|---|
| 100 | if (ndr_flags & NDR_BUFFERS) {
|
|---|
| 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_BUFFERS, &r->entries[cntr_entries_0]));
|
|---|
| 105 | }
|
|---|
| 106 | NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
|
|---|
| 107 | }
|
|---|
| 108 | return NDR_ERR_SUCCESS;
|
|---|
| 109 | }
|
|---|
| 110 |
|
|---|
| 111 | _PUBLIC_ void ndr_print_notify_depth(struct ndr_print *ndr, const char *name, const struct notify_depth *r)
|
|---|
| 112 | {
|
|---|
| 113 | uint32_t cntr_entries_0;
|
|---|
| 114 | ndr_print_struct(ndr, name, "notify_depth");
|
|---|
| 115 | ndr->depth++;
|
|---|
| 116 | ndr_print_uint32(ndr, "max_mask", r->max_mask);
|
|---|
| 117 | ndr_print_uint32(ndr, "max_mask_subdir", r->max_mask_subdir);
|
|---|
| 118 | ndr_print_uint32(ndr, "num_entries", r->num_entries);
|
|---|
| 119 | ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->num_entries);
|
|---|
| 120 | ndr->depth++;
|
|---|
| 121 | for (cntr_entries_0=0;cntr_entries_0<r->num_entries;cntr_entries_0++) {
|
|---|
| 122 | char *idx_0=NULL;
|
|---|
| 123 | if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
|
|---|
| 124 | ndr_print_notify_entry(ndr, "entries", &r->entries[cntr_entries_0]);
|
|---|
| 125 | free(idx_0);
|
|---|
| 126 | }
|
|---|
| 127 | }
|
|---|
| 128 | ndr->depth--;
|
|---|
| 129 | ndr->depth--;
|
|---|
| 130 | }
|
|---|
| 131 |
|
|---|
| 132 | _PUBLIC_ enum ndr_err_code ndr_push_notify_array(struct ndr_push *ndr, int ndr_flags, const struct notify_array *r)
|
|---|
| 133 | {
|
|---|
| 134 | uint32_t cntr_depth_0;
|
|---|
| 135 | if (ndr_flags & NDR_SCALARS) {
|
|---|
| 136 | NDR_CHECK(ndr_push_align(ndr, 8));
|
|---|
| 137 | NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_depths));
|
|---|
| 138 | for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) {
|
|---|
| 139 | NDR_CHECK(ndr_push_notify_depth(ndr, NDR_SCALARS, &r->depth[cntr_depth_0]));
|
|---|
| 140 | }
|
|---|
| 141 | }
|
|---|
| 142 | if (ndr_flags & NDR_BUFFERS) {
|
|---|
| 143 | for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) {
|
|---|
| 144 | NDR_CHECK(ndr_push_notify_depth(ndr, NDR_BUFFERS, &r->depth[cntr_depth_0]));
|
|---|
| 145 | }
|
|---|
| 146 | }
|
|---|
| 147 | return NDR_ERR_SUCCESS;
|
|---|
| 148 | }
|
|---|
| 149 |
|
|---|
| 150 | _PUBLIC_ enum ndr_err_code ndr_pull_notify_array(struct ndr_pull *ndr, int ndr_flags, struct notify_array *r)
|
|---|
| 151 | {
|
|---|
| 152 | uint32_t cntr_depth_0;
|
|---|
| 153 | TALLOC_CTX *_mem_save_depth_0;
|
|---|
| 154 | if (ndr_flags & NDR_SCALARS) {
|
|---|
| 155 | NDR_CHECK(ndr_pull_align(ndr, 8));
|
|---|
| 156 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_depths));
|
|---|
| 157 | NDR_PULL_ALLOC_N(ndr, r->depth, r->num_depths);
|
|---|
| 158 | _mem_save_depth_0 = NDR_PULL_GET_MEM_CTX(ndr);
|
|---|
| 159 | NDR_PULL_SET_MEM_CTX(ndr, r->depth, 0);
|
|---|
| 160 | for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) {
|
|---|
| 161 | NDR_CHECK(ndr_pull_notify_depth(ndr, NDR_SCALARS, &r->depth[cntr_depth_0]));
|
|---|
| 162 | }
|
|---|
| 163 | NDR_PULL_SET_MEM_CTX(ndr, _mem_save_depth_0, 0);
|
|---|
| 164 | }
|
|---|
| 165 | if (ndr_flags & NDR_BUFFERS) {
|
|---|
| 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_BUFFERS, &r->depth[cntr_depth_0]));
|
|---|
| 170 | }
|
|---|
| 171 | NDR_PULL_SET_MEM_CTX(ndr, _mem_save_depth_0, 0);
|
|---|
| 172 | }
|
|---|
| 173 | return NDR_ERR_SUCCESS;
|
|---|
| 174 | }
|
|---|
| 175 |
|
|---|
| 176 | _PUBLIC_ void ndr_print_notify_array(struct ndr_print *ndr, const char *name, const struct notify_array *r)
|
|---|
| 177 | {
|
|---|
| 178 | uint32_t cntr_depth_0;
|
|---|
| 179 | ndr_print_struct(ndr, name, "notify_array");
|
|---|
| 180 | ndr->depth++;
|
|---|
| 181 | ndr_print_uint32(ndr, "num_depths", r->num_depths);
|
|---|
| 182 | ndr->print(ndr, "%s: ARRAY(%d)", "depth", (int)r->num_depths);
|
|---|
| 183 | ndr->depth++;
|
|---|
| 184 | for (cntr_depth_0=0;cntr_depth_0<r->num_depths;cntr_depth_0++) {
|
|---|
| 185 | char *idx_0=NULL;
|
|---|
| 186 | if (asprintf(&idx_0, "[%d]", cntr_depth_0) != -1) {
|
|---|
| 187 | ndr_print_notify_depth(ndr, "depth", &r->depth[cntr_depth_0]);
|
|---|
| 188 | free(idx_0);
|
|---|
| 189 | }
|
|---|
| 190 | }
|
|---|
| 191 | ndr->depth--;
|
|---|
| 192 | ndr->depth--;
|
|---|
| 193 | }
|
|---|
| 194 |
|
|---|
| 195 | _PUBLIC_ enum ndr_err_code ndr_push_notify_event(struct ndr_push *ndr, int ndr_flags, const struct notify_event *r)
|
|---|
| 196 | {
|
|---|
| 197 | if (ndr_flags & NDR_SCALARS) {
|
|---|
| 198 | NDR_CHECK(ndr_push_align(ndr, 8));
|
|---|
| 199 | NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->action));
|
|---|
| 200 | {
|
|---|
| 201 | uint32_t _flags_save_string = ndr->flags;
|
|---|
| 202 | ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
|
|---|
| 203 | NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->path));
|
|---|
| 204 | ndr->flags = _flags_save_string;
|
|---|
| 205 | }
|
|---|
| 206 | NDR_CHECK(ndr_push_pointer(ndr, NDR_SCALARS, r->private_data));
|
|---|
| 207 | }
|
|---|
| 208 | if (ndr_flags & NDR_BUFFERS) {
|
|---|
| 209 | }
|
|---|
| 210 | return NDR_ERR_SUCCESS;
|
|---|
| 211 | }
|
|---|
| 212 |
|
|---|
| 213 | _PUBLIC_ enum ndr_err_code ndr_pull_notify_event(struct ndr_pull *ndr, int ndr_flags, struct notify_event *r)
|
|---|
| 214 | {
|
|---|
| 215 | if (ndr_flags & NDR_SCALARS) {
|
|---|
| 216 | NDR_CHECK(ndr_pull_align(ndr, 8));
|
|---|
| 217 | NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->action));
|
|---|
| 218 | {
|
|---|
| 219 | uint32_t _flags_save_string = ndr->flags;
|
|---|
| 220 | ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
|
|---|
| 221 | NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->path));
|
|---|
| 222 | ndr->flags = _flags_save_string;
|
|---|
| 223 | }
|
|---|
| 224 | NDR_CHECK(ndr_pull_pointer(ndr, NDR_SCALARS, &r->private_data));
|
|---|
| 225 | }
|
|---|
| 226 | if (ndr_flags & NDR_BUFFERS) {
|
|---|
| 227 | }
|
|---|
| 228 | return NDR_ERR_SUCCESS;
|
|---|
| 229 | }
|
|---|
| 230 |
|
|---|
| 231 | _PUBLIC_ void ndr_print_notify_event(struct ndr_print *ndr, const char *name, const struct notify_event *r)
|
|---|
| 232 | {
|
|---|
| 233 | ndr_print_struct(ndr, name, "notify_event");
|
|---|
| 234 | ndr->depth++;
|
|---|
| 235 | ndr_print_uint32(ndr, "action", r->action);
|
|---|
| 236 | ndr_print_string(ndr, "path", r->path);
|
|---|
| 237 | ndr_print_pointer(ndr, "private_data", r->private_data);
|
|---|
| 238 | ndr->depth--;
|
|---|
| 239 | }
|
|---|
| 240 |
|
|---|