libnetapi: add NetQueryDisplayInformation skeleton.
authorGünther Deschner <gd@samba.org>
Sun, 13 Apr 2008 17:04:18 +0000 (19:04 +0200)
committerGünther Deschner <gd@samba.org>
Sun, 13 Apr 2008 17:04:18 +0000 (19:04 +0200)
Guenther
(This used to be commit 6ec4a62b6d584f6745c3285474372f235614b598)

source3/lib/netapi/libnetapi.c
source3/lib/netapi/libnetapi.h
source3/lib/netapi/user.c

index fd1802f99f958dac50aa5aef7daef72d5986602c..e71adc6893bca89afed99d02e1c9091b47be9de2 100644 (file)
@@ -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;
+}
+
index 5cd416529907a994031013297aeb50d395e07ddd..7aff3556529872e2d0a5c992cf6a48f3df806cf4 100644 (file)
@@ -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__ */
index 31e5faa5944f90a49c2f89e562c84b322b443d95..f0ce26bdf8a1692dd7515d648c4648e4061cd095 100644 (file)
@@ -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;
+}