/* parser auto-generated by pidl */ #include "includes.h" NTSTATUS ndr_push_wks_QueryInfo(struct ndr_push *ndr, struct wks_QueryInfo *r) { NDR_CHECK(ndr_push_ptr(ndr, r->in.server_name)); if (r->in.server_name) { NDR_CHECK(ndr_push_unistr(ndr, r->in.server_name)); } NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); return NT_STATUS_OK; } NTSTATUS ndr_pull_wks_Info100(struct ndr_pull *ndr, int ndr_flags, struct wks_Info100 *r) { uint32 _ptr_uni_compname; uint32 _ptr_uni_lan_grp; NDR_CHECK(ndr_pull_struct_start(ndr)); if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, &r->platform_id)); NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_uni_compname)); if (_ptr_uni_compname) { NDR_ALLOC(ndr, r->uni_compname); } else { r->uni_compname = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_uni_lan_grp)); if (_ptr_uni_lan_grp) { NDR_ALLOC(ndr, r->uni_lan_grp); } else { r->uni_lan_grp = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, &r->ver_major)); NDR_CHECK(ndr_pull_uint32(ndr, &r->ver_minor)); ndr_pull_struct_end(ndr); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; if (r->uni_compname) { NDR_CHECK(ndr_pull_unistr(ndr, &r->uni_compname)); } if (r->uni_lan_grp) { NDR_CHECK(ndr_pull_unistr(ndr, &r->uni_lan_grp)); } done: return NT_STATUS_OK; } NTSTATUS ndr_pull_wks_Info(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union wks_Info *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_struct_start(ndr)); NDR_CHECK(ndr_pull_uint16(ndr, level)); switch (*level) { case 100: { uint32 _ptr_info100; NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info100)); if (_ptr_info100) { NDR_ALLOC(ndr, r->info100); } else { r->info100 = NULL; } break; } default: return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", *level); } ndr_pull_struct_end(ndr); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; switch (*level) { case 100: if (r->info100) { NDR_CHECK(ndr_pull_wks_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100)); } break; default: return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", *level); } done: return NT_STATUS_OK; } NTSTATUS ndr_pull_wks_QueryInfo(struct ndr_pull *ndr, struct wks_QueryInfo *r) { { uint16 _level = r->in.level; NDR_CHECK(ndr_pull_wks_Info(ndr, NDR_SCALARS|NDR_BUFFERS, &_level, &r->out.info)); if (((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) && (_level != r->in.level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); } NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } void ndr_print_wks_Info100(struct ndr_print *ndr, const char *name, struct wks_Info100 *r) { ndr_print_struct(ndr, name, "wks_Info100"); ndr->depth++; ndr_print_uint32(ndr, "platform_id", r->platform_id); ndr_print_ptr(ndr, "uni_compname", r->uni_compname); ndr->depth++; if (r->uni_compname) { ndr_print_unistr(ndr, "uni_compname", r->uni_compname); } ndr->depth--; ndr_print_ptr(ndr, "uni_lan_grp", r->uni_lan_grp); ndr->depth++; if (r->uni_lan_grp) { ndr_print_unistr(ndr, "uni_lan_grp", r->uni_lan_grp); } ndr->depth--; ndr_print_uint32(ndr, "ver_major", r->ver_major); ndr_print_uint32(ndr, "ver_minor", r->ver_minor); ndr->depth--; } void ndr_print_wks_Info(struct ndr_print *ndr, const char *name, uint16 level, union wks_Info *r) { ndr_print_union(ndr, name, level, "wks_Info"); switch (level) { case 100: ndr_print_ptr(ndr, "info100", r->info100); ndr->depth++; if (r->info100) { ndr_print_wks_Info100(ndr, "info100", r->info100); } ndr->depth--; break; default: ndr_print_bad_level(ndr, name, level); } } void ndr_print_wks_QueryInfo(struct ndr_print *ndr, const char *name, int flags, struct wks_QueryInfo *r) { ndr_print_struct(ndr, name, "wks_QueryInfo"); ndr->depth++; if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "wks_QueryInfo"); ndr->depth++; ndr_print_ptr(ndr, "server_name", r->in.server_name); ndr->depth++; if (r->in.server_name) { ndr_print_unistr(ndr, "server_name", r->in.server_name); } ndr->depth--; ndr_print_uint32(ndr, "level", r->in.level); ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "wks_QueryInfo"); ndr->depth++; ndr_print_wks_Info(ndr, "info", r->in.level, &r->out.info); ndr->depth--; } ndr->depth--; }