svcctl: use offered/needed for buffer sizes as in spoolss.
[ira/wip.git] / librpc / gen_ndr / svcctl.h
index 80f906a3645c772d96ab6e7e8fed755ce3ad7189..f87d2cce0c99f8f987c5ec11edb0908a4c73eb08 100644 (file)
@@ -2,11 +2,14 @@
 
 #include <stdint.h>
 
+#include "libcli/util/ntstatus.h"
+
 #include "librpc/gen_ndr/misc.h"
 #include "librpc/gen_ndr/security.h"
 #ifndef _HEADER_svcctl
 #define _HEADER_svcctl
 
+#define SVCCTL_ACCEPT_NONE     ( 0x00000000 )
 #define SERVICE_TYPE_KERNEL_DRIVER     ( 0x01 )
 #define SERVICE_TYPE_FS_DRIVER ( 0x02 )
 #define SERVICE_TYPE_ADAPTER   ( 0x04 )
@@ -15,6 +18,7 @@
 #define SERVICE_TYPE_WIN32_OWN_PROCESS ( 0x10 )
 #define SERVICE_TYPE_WIN32_SHARE_PROCESS       ( 0x20 )
 #define SERVICE_TYPE_WIN32     ( SERVICE_TYPE_WIN32_OWN_PROCESS|SERVICE_TYPE_WIN32_SHARE_PROCESS )
+#define SERVICE_TYPE_INTERACTIVE_PROCESS       ( 0x100 )
 #define SV_TYPE_ALL    ( 0xFFFFFFFF )
 #define SC_MANAGER_READ_ACCESS ( (SEC_STD_READ_CONTROL|SC_RIGHT_MGR_CONNECT|SC_RIGHT_MGR_ENUMERATE_SERVICE|SC_RIGHT_MGR_QUERY_LOCK_STATUS) )
 #define SC_MANAGER_EXECUTE_ACCESS      ( SC_MANAGER_READ_ACCESS )
@@ -56,7 +60,6 @@ enum svcctl_ServiceStatus
 ;
 
 /* bitmap svcctl_ControlsAccepted */
-#define SVCCTL_ACCEPT_NONE ( 0x00000000 )
 #define SVCCTL_ACCEPT_STOP ( 0x00000001 )
 #define SVCCTL_ACCEPT_PAUSE_CONTINUE ( 0x00000002 )
 #define SVCCTL_ACCEPT_SHUTDOWN ( 0x00000004 )
@@ -476,12 +479,12 @@ struct svcctl_EnumDependentServicesW {
        struct {
                struct policy_handle *service;/* [ref] */
                uint32_t state;
-               uint32_t buf_size;/* [range(0,0x40000)] */
+               uint32_t offered;/* [range(0,0x40000)] */
        } in;
 
        struct {
-               uint8_t *service_status;/* [ref,size_is(buf_size)] */
-               uint32_t *bytes_needed;/* [ref,range(0,0x40000)] */
+               uint8_t *service_status;/* [ref,size_is(offered)] */
+               uint32_t *needed;/* [ref,range(0,0x40000)] */
                uint32_t *services_returned;/* [ref,range(0,0x40000)] */
                WERROR result;
        } out;
@@ -494,13 +497,13 @@ struct svcctl_EnumServicesStatusW {
                struct policy_handle *handle;/* [ref] */
                uint32_t type;
                enum svcctl_ServiceState state;
-               uint32_t buf_size;/* [range(0,0x40000)] */
+               uint32_t offered;/* [range(0,0x40000)] */
                uint32_t *resume_handle;/* [unique] */
        } in;
 
        struct {
-               uint8_t *service;/* [ref,size_is(buf_size)] */
-               uint32_t *bytes_needed;/* [ref,range(0,0x40000)] */
+               uint8_t *service;/* [ref,size_is(offered)] */
+               uint32_t *needed;/* [ref,range(0,0x40000)] */
                uint32_t *services_returned;/* [ref,range(0,0x40000)] */
                uint32_t *resume_handle;/* [unique] */
                WERROR result;
@@ -542,12 +545,12 @@ struct svcctl_OpenServiceW {
 struct svcctl_QueryServiceConfigW {
        struct {
                struct policy_handle *handle;/* [ref] */
-               uint32_t buf_size;/* [range(0,8192)] */
+               uint32_t offered;/* [range(0,8192)] */
        } in;
 
        struct {
                struct QUERY_SERVICE_CONFIG *query;/* [ref] */
-               uint32_t *bytes_needed;/* [ref,range(0,8192)] */
+               uint32_t *needed;/* [ref,range(0,8192)] */
                WERROR result;
        } out;
 
@@ -557,12 +560,12 @@ struct svcctl_QueryServiceConfigW {
 struct svcctl_QueryServiceLockStatusW {
        struct {
                struct policy_handle *handle;/* [ref] */
-               uint32_t buf_size;
+               uint32_t offered;
        } in;
 
        struct {
                struct SERVICE_LOCK_STATUS *lock_status;/* [ref] */
-               uint32_t *required_buf_size;/* [ref] */
+               uint32_t *needed;/* [ref] */
                WERROR result;
        } out;
 
@@ -680,12 +683,12 @@ struct svcctl_EnumDependentServicesA {
        struct {
                struct policy_handle *service;/* [ref] */
                uint32_t state;
-               uint32_t buf_size;
+               uint32_t offered;
        } in;
 
        struct {
                struct ENUM_SERVICE_STATUSA *service_status;/* [unique] */
-               uint32_t *bytes_needed;/* [ref] */
+               uint32_t *needed;/* [ref] */
                uint32_t *services_returned;/* [ref] */
                WERROR result;
        } out;
@@ -698,13 +701,13 @@ struct svcctl_EnumServicesStatusA {
                struct policy_handle *handle;/* [ref] */
                uint32_t type;
                enum svcctl_ServiceState state;
-               uint32_t buf_size;
+               uint32_t offered;
                uint32_t *resume_handle;/* [unique] */
        } in;
 
        struct {
-               uint8_t *service;/* [size_is(buf_size)] */
-               uint32_t *bytes_needed;/* [ref] */
+               uint8_t *service;/* [size_is(offered)] */
+               uint32_t *needed;/* [ref] */
                uint32_t *services_returned;/* [ref] */
                uint32_t *resume_handle;/* [unique] */
                WERROR result;
@@ -745,12 +748,12 @@ struct svcctl_OpenServiceA {
 struct svcctl_QueryServiceConfigA {
        struct {
                struct policy_handle *handle;/* [ref] */
-               uint32_t buf_size;
+               uint32_t offered;
        } in;
 
        struct {
                uint8_t *query;
-               uint32_t *bytes_needed;/* [ref] */
+               uint32_t *needed;/* [ref] */
                WERROR result;
        } out;
 
@@ -760,12 +763,12 @@ struct svcctl_QueryServiceConfigA {
 struct svcctl_QueryServiceLockStatusA {
        struct {
                struct policy_handle *handle;/* [ref] */
-               uint32_t buf_size;
+               uint32_t offered;
        } in;
 
        struct {
                struct SERVICE_LOCK_STATUS *lock_status;/* [ref] */
-               uint32_t *required_buf_size;/* [ref] */
+               uint32_t *needed;/* [ref] */
                WERROR result;
        } out;
 
@@ -866,12 +869,12 @@ struct svcctl_QueryServiceConfig2A {
        struct {
                struct policy_handle *handle;/* [ref] */
                enum svcctl_ConfigLevel info_level;
-               uint32_t buf_size;
+               uint32_t offered;
        } in;
 
        struct {
                uint8_t *buffer;
-               uint32_t *bytes_needed;/* [ref] */
+               uint32_t *needed;/* [ref] */
                WERROR result;
        } out;
 
@@ -882,12 +885,12 @@ struct svcctl_QueryServiceConfig2W {
        struct {
                struct policy_handle *handle;/* [ref] */
                enum svcctl_ConfigLevel info_level;
-               uint32_t buf_size;/* [range(0,8192)] */
+               uint32_t offered;/* [range(0,8192)] */
        } in;
 
        struct {
-               uint8_t *buffer;/* [ref,size_is(buf_size)] */
-               uint32_t *bytes_needed;/* [ref,range(0,8192)] */
+               uint8_t *buffer;/* [ref,size_is(offered)] */
+               uint32_t *needed;/* [ref,range(0,8192)] */
                WERROR result;
        } out;
 
@@ -898,12 +901,12 @@ struct svcctl_QueryServiceStatusEx {
        struct {
                struct policy_handle *handle;/* [ref] */
                enum svcctl_StatusLevel info_level;
-               uint32_t buf_size;/* [range(0,8192)] */
+               uint32_t offered;/* [range(0,8192)] */
        } in;
 
        struct {
-               uint8_t *buffer;/* [ref,size_is(buf_size)] */
-               uint32_t *bytes_needed;/* [ref,range(0,8192)] */
+               uint8_t *buffer;/* [ref,size_is(offered)] */
+               uint32_t *needed;/* [ref,range(0,8192)] */
                WERROR result;
        } out;
 
@@ -916,13 +919,13 @@ struct EnumServicesStatusExA {
                uint32_t info_level;
                uint32_t type;
                enum svcctl_ServiceState state;
-               uint32_t buf_size;
+               uint32_t offered;
                uint32_t *resume_handle;/* [unique] */
        } in;
 
        struct {
                uint8_t *services;
-               uint32_t *bytes_needed;/* [ref] */
+               uint32_t *needed;/* [ref] */
                uint32_t *service_returned;/* [ref] */
                const char **group_name;/* [ref,charset(UTF16)] */
                uint32_t *resume_handle;/* [unique] */
@@ -938,14 +941,14 @@ struct EnumServicesStatusExW {
                uint32_t info_level;
                uint32_t type;
                enum svcctl_ServiceState state;
-               uint32_t buf_size;/* [range(0,0x40000)] */
+               uint32_t offered;/* [range(0,0x40000)] */
                const char *group_name;/* [unique,charset(UTF16)] */
                uint32_t *resume_handle;/* [unique,range(0,0x40000)] */
        } in;
 
        struct {
-               uint8_t *services;/* [ref,size_is(buf_size)] */
-               uint32_t *bytes_needed;/* [ref,range(0,0x40000)] */
+               uint8_t *services;/* [ref,size_is(offered)] */
+               uint32_t *needed;/* [ref,range(0,0x40000)] */
                uint32_t *service_returned;/* [ref,range(0,0x40000)] */
                uint32_t *resume_handle;/* [unique,range(0,0x40000)] */
                WERROR result;