summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-04-13 19:04:18 +0200
committerGünther Deschner <gd@samba.org>2008-04-13 19:04:18 +0200
commit5647deccb1372b4ea478b34814e304ae8962f282 (patch)
treef40f2f76753a3db35b1f811bc6c509bb5bcf2bee /source3
parent99e96fe5ca55b5aa4cf5f77d6cc45c25498d9b20 (diff)
downloadsamba-5647deccb1372b4ea478b34814e304ae8962f282.tar.gz
samba-5647deccb1372b4ea478b34814e304ae8962f282.tar.bz2
samba-5647deccb1372b4ea478b34814e304ae8962f282.zip
libnetapi: add NetQueryDisplayInformation skeleton.
Guenther (This used to be commit 6ec4a62b6d584f6745c3285474372f235614b598)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/netapi/libnetapi.c52
-rw-r--r--source3/lib/netapi/libnetapi.h11
-rw-r--r--source3/lib/netapi/user.c19
3 files changed, 82 insertions, 0 deletions
diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c
index fd1802f99f..e71adc6893 100644
--- a/source3/lib/netapi/libnetapi.c
+++ b/source3/lib/netapi/libnetapi.c
@@ -585,3 +585,55 @@ NET_API_STATUS NetUserEnum(const char * server_name /* [in] [unique] */,
return r.out.result;
}
+/****************************************************************
+ NetQueryDisplayInformation
+****************************************************************/
+
+NET_API_STATUS NetQueryDisplayInformation(const char * server_name /* [in] [unique] */,
+ uint32_t level /* [in] */,
+ uint32_t idx /* [in] */,
+ uint32_t entries_requested /* [in] */,
+ uint32_t prefmaxlen /* [in] */,
+ uint32_t *entries_read /* [out] [ref] */,
+ void **buffer /* [out] [noprint,ref] */)
+{
+ struct NetQueryDisplayInformation r;
+ struct libnetapi_ctx *ctx = NULL;
+ NET_API_STATUS status;
+ WERROR werr;
+
+ status = libnetapi_getctx(&ctx);
+ if (status != 0) {
+ return status;
+ }
+
+ /* In parameters */
+ r.in.server_name = server_name;
+ r.in.level = level;
+ r.in.idx = idx;
+ r.in.entries_requested = entries_requested;
+ r.in.prefmaxlen = prefmaxlen;
+
+ /* Out parameters */
+ r.out.entries_read = entries_read;
+ r.out.buffer = buffer;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(NetQueryDisplayInformation, &r);
+ }
+
+ if (LIBNETAPI_LOCAL_SERVER(server_name)) {
+ werr = NetQueryDisplayInformation_l(ctx, &r);
+ } else {
+ werr = NetQueryDisplayInformation_r(ctx, &r);
+ }
+
+ r.out.result = W_ERROR_V(werr);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(NetQueryDisplayInformation, &r);
+ }
+
+ return r.out.result;
+}
+
diff --git a/source3/lib/netapi/libnetapi.h b/source3/lib/netapi/libnetapi.h
index 5cd4165299..7aff355652 100644
--- a/source3/lib/netapi/libnetapi.h
+++ b/source3/lib/netapi/libnetapi.h
@@ -100,4 +100,15 @@ WERROR NetUserEnum_r(struct libnetapi_ctx *ctx,
struct NetUserEnum *r);
WERROR NetUserEnum_l(struct libnetapi_ctx *ctx,
struct NetUserEnum *r);
+NET_API_STATUS NetQueryDisplayInformation(const char * server_name /* [in] [unique] */,
+ uint32_t level /* [in] */,
+ uint32_t idx /* [in] */,
+ uint32_t entries_requested /* [in] */,
+ uint32_t prefmaxlen /* [in] */,
+ uint32_t *entries_read /* [out] [ref] */,
+ void **buffer /* [out] [noprint,ref] */);
+WERROR NetQueryDisplayInformation_r(struct libnetapi_ctx *ctx,
+ struct NetQueryDisplayInformation *r);
+WERROR NetQueryDisplayInformation_l(struct libnetapi_ctx *ctx,
+ struct NetQueryDisplayInformation *r);
#endif /* __LIBNETAPI_LIBNETAPI__ */
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index 31e5faa594..f0ce26bdf8 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -707,3 +707,22 @@ WERROR NetUserEnum_l(struct libnetapi_ctx *ctx,
return WERR_NOT_SUPPORTED;
}
+/****************************************************************
+****************************************************************/
+
+
+WERROR NetQueryDisplayInformation_r(struct libnetapi_ctx *ctx,
+ struct NetQueryDisplayInformation *r)
+{
+ return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+****************************************************************/
+
+
+WERROR NetQueryDisplayInformation_l(struct libnetapi_ctx *ctx,
+ struct NetQueryDisplayInformation *r)
+{
+ return WERR_NOT_SUPPORTED;
+}