1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-28 09:49:30 +03:00

spoolss: add custom ndr_print_spoolss_Field.

Guenther
This commit is contained in:
Günther Deschner
2009-03-18 16:06:40 +01:00
parent 0e21ea39d5
commit 65151077b3
2 changed files with 23 additions and 0 deletions

View File

@ -1185,3 +1185,25 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo101(struct ndr_pull *ndr,
}
return NDR_ERR_SUCCESS;
}
void ndr_print_spoolss_Field(struct ndr_print *ndr, const char *name, const union spoolss_Field *r)
{
int level;
level = ndr_print_get_switch_value(ndr, r);
ndr_print_union(ndr, name, level, "spoolss_Field");
switch (level) {
case PRINTER_NOTIFY_TYPE:
ndr_print_spoolss_PrintNotifyField(ndr, "field", r->field);
break;
case JOB_NOTIFY_TYPE:
ndr_print_spoolss_JobNotifyField(ndr, "field", r->field);
break;
default:
ndr_print_uint16(ndr, "field", r->field);
break;
}
}

View File

@ -49,6 +49,7 @@ uint32_t _ndr_size_spoolss_DeviceMode(struct spoolss_DeviceMode *devmode, struct
size_t ndr_size_spoolss_StringArray(const struct spoolss_StringArray *r, struct smb_iconv_convenience *ic, int flags);
_PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo101(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DriverInfo101 *r);
_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo101(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DriverInfo101 *r);
void ndr_print_spoolss_Field(struct ndr_print *ndr, const char *name, const union spoolss_Field *r);
#undef _PRINTF_ATTRIBUTE
#define _PRINTF_ATTRIBUTE(a1, a2)