1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

ndr: Add ndr_ntprinting_string_flags() function.

It defaults to utf8string.

Reviewed-by: Günther Deschner <gd@samba.org>
This commit is contained in:
Andreas Schneider 2013-03-11 15:45:15 +01:00 committed by Günther Deschner
parent a42527e51b
commit cc09762cb8
2 changed files with 17 additions and 0 deletions

View File

@ -22,6 +22,21 @@
#include "includes.h"
#include "../librpc/gen_ndr/ndr_ntprinting.h"
_PUBLIC_ uint32_t ndr_ntprinting_string_flags(uint32_t string_flags)
{
uint32_t flags = LIBNDR_FLAG_STR_NULLTERM;
if (string_flags & LIBNDR_FLAG_STR_ASCII) {
flags |= LIBNDR_FLAG_STR_ASCII;
} else if (string_flags & LIBNDR_FLAG_STR_RAW8) {
flags |= LIBNDR_FLAG_STR_RAW8;
} else {
flags |= LIBNDR_FLAG_STR_UTF8;
}
return flags;
}
_PUBLIC_ enum ndr_err_code ndr_pull_ntprinting_printer(struct ndr_pull *ndr, int ndr_flags, struct ntprinting_printer *r)
{
uint32_t _ptr_devmode;

View File

@ -22,4 +22,6 @@
#include "includes.h"
#include "../librpc/gen_ndr/ndr_ntprinting.h"
_PUBLIC_ uint32_t ndr_ntprinting_string_flags(uint32_t string_flags);
_PUBLIC_ enum ndr_err_code ndr_pull_ntprinting_printer(struct ndr_pull *ndr, int ndr_flags, struct ntprinting_printer *r);