diff options
author | Günther Deschner <gd@samba.org> | 2009-01-08 13:08:18 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-01-08 13:24:22 +0100 |
commit | 490a14068e8c1e88fcf701dfcc89ecdae9cada2a (patch) | |
tree | 5e48d8e585598bcf8ecef96b3b6fb86af20f310b /librpc/gen_ndr | |
parent | ca98357710cb975b73b56452c914e5583dcbcd79 (diff) | |
download | samba-490a14068e8c1e88fcf701dfcc89ecdae9cada2a.tar.gz samba-490a14068e8c1e88fcf701dfcc89ecdae9cada2a.tar.bz2 samba-490a14068e8c1e88fcf701dfcc89ecdae9cada2a.zip |
s3: re-run make samba3-idl.
Guenther
Diffstat (limited to 'librpc/gen_ndr')
-rw-r--r-- | librpc/gen_ndr/ndr_svcctl.c | 72 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_svcctl.h | 2 | ||||
-rw-r--r-- | librpc/gen_ndr/svcctl.h | 37 |
3 files changed, 104 insertions, 7 deletions
diff --git a/librpc/gen_ndr/ndr_svcctl.c b/librpc/gen_ndr/ndr_svcctl.c index 54c49adef4..4cc85d49b9 100644 --- a/librpc/gen_ndr/ndr_svcctl.c +++ b/librpc/gen_ndr/ndr_svcctl.c @@ -71,13 +71,73 @@ _PUBLIC_ void ndr_print_SERVICE_LOCK_STATUS(struct ndr_print *ndr, const char *n ndr->depth--; } +static enum ndr_err_code ndr_push_svcctl_ServiceStatus(struct ndr_push *ndr, int ndr_flags, enum svcctl_ServiceStatus r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_svcctl_ServiceStatus(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ServiceStatus *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_svcctl_ServiceStatus(struct ndr_print *ndr, const char *name, enum svcctl_ServiceStatus r) +{ + const char *val = NULL; + + switch (r) { + case SVCCTL_STATE_UNKNOWN: val = "SVCCTL_STATE_UNKNOWN"; break; + case SVCCTL_STOPPED: val = "SVCCTL_STOPPED"; break; + case SVCCTL_START_PENDING: val = "SVCCTL_START_PENDING"; break; + case SVCCTL_STOP_PENDING: val = "SVCCTL_STOP_PENDING"; break; + case SVCCTL_RUNNING: val = "SVCCTL_RUNNING"; break; + case SVCCTL_CONTINUE_PENDING: val = "SVCCTL_CONTINUE_PENDING"; break; + case SVCCTL_PAUSE_PENDING: val = "SVCCTL_PAUSE_PENDING"; break; + case SVCCTL_PAUSED: val = "SVCCTL_PAUSED"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_svcctl_ControlsAccepted(struct ndr_push *ndr, int ndr_flags, uint32_t r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_svcctl_ControlsAccepted(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_svcctl_ControlsAccepted(struct ndr_print *ndr, const char *name, uint32_t r) +{ + ndr_print_uint32(ndr, name, r); + ndr->depth++; + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_NONE", SVCCTL_ACCEPT_NONE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_STOP", SVCCTL_ACCEPT_STOP, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_PAUSE_CONTINUE", SVCCTL_ACCEPT_PAUSE_CONTINUE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_SHUTDOWN", SVCCTL_ACCEPT_SHUTDOWN, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_PARAMCHANGE", SVCCTL_ACCEPT_PARAMCHANGE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_NETBINDCHANGE", SVCCTL_ACCEPT_NETBINDCHANGE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_HARDWAREPROFILECHANGE", SVCCTL_ACCEPT_HARDWAREPROFILECHANGE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_POWEREVENT", SVCCTL_ACCEPT_POWEREVENT, r); + ndr->depth--; +} + static enum ndr_err_code ndr_push_SERVICE_STATUS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_STATUS *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->type)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->state)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->controls_accepted)); + NDR_CHECK(ndr_push_svcctl_ServiceStatus(ndr, NDR_SCALARS, r->state)); + NDR_CHECK(ndr_push_svcctl_ControlsAccepted(ndr, NDR_SCALARS, r->controls_accepted)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->win32_exit_code)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_exit_code)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->check_point)); @@ -93,8 +153,8 @@ static enum ndr_err_code ndr_pull_SERVICE_STATUS(struct ndr_pull *ndr, int ndr_f if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->type)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->state)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->controls_accepted)); + NDR_CHECK(ndr_pull_svcctl_ServiceStatus(ndr, NDR_SCALARS, &r->state)); + NDR_CHECK(ndr_pull_svcctl_ControlsAccepted(ndr, NDR_SCALARS, &r->controls_accepted)); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->win32_exit_code)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_exit_code)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->check_point)); @@ -110,8 +170,8 @@ _PUBLIC_ void ndr_print_SERVICE_STATUS(struct ndr_print *ndr, const char *name, ndr_print_struct(ndr, name, "SERVICE_STATUS"); ndr->depth++; ndr_print_uint32(ndr, "type", r->type); - ndr_print_uint32(ndr, "state", r->state); - ndr_print_uint32(ndr, "controls_accepted", r->controls_accepted); + ndr_print_svcctl_ServiceStatus(ndr, "state", r->state); + ndr_print_svcctl_ControlsAccepted(ndr, "controls_accepted", r->controls_accepted); ndr_print_WERROR(ndr, "win32_exit_code", r->win32_exit_code); ndr_print_uint32(ndr, "service_exit_code", r->service_exit_code); ndr_print_uint32(ndr, "check_point", r->check_point); diff --git a/librpc/gen_ndr/ndr_svcctl.h b/librpc/gen_ndr/ndr_svcctl.h index 4b47161973..2d6f3ed7e8 100644 --- a/librpc/gen_ndr/ndr_svcctl.h +++ b/librpc/gen_ndr/ndr_svcctl.h @@ -101,6 +101,8 @@ extern const struct ndr_interface_table ndr_table_svcctl; #define NDR_SVCCTL_CALL_COUNT (44) void ndr_print_SERVICE_LOCK_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_LOCK_STATUS *r); +void ndr_print_svcctl_ServiceStatus(struct ndr_print *ndr, const char *name, enum svcctl_ServiceStatus r); +void ndr_print_svcctl_ControlsAccepted(struct ndr_print *ndr, const char *name, uint32_t r); void ndr_print_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_STATUS *r); enum ndr_err_code ndr_push_SERVICE_STATUS_PROCESS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_STATUS_PROCESS *r); enum ndr_err_code ndr_pull_SERVICE_STATUS_PROCESS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_STATUS_PROCESS *r); diff --git a/librpc/gen_ndr/svcctl.h b/librpc/gen_ndr/svcctl.h index c36f578101..c3914e5671 100644 --- a/librpc/gen_ndr/svcctl.h +++ b/librpc/gen_ndr/svcctl.h @@ -33,9 +33,44 @@ struct SERVICE_LOCK_STATUS { uint32_t lock_duration; }; +enum svcctl_ServiceStatus +#ifndef USE_UINT_ENUMS + { + SVCCTL_STATE_UNKNOWN=0x00000000, + SVCCTL_STOPPED=0x00000001, + SVCCTL_START_PENDING=0x00000002, + SVCCTL_STOP_PENDING=0x00000003, + SVCCTL_RUNNING=0x00000004, + SVCCTL_CONTINUE_PENDING=0x00000005, + SVCCTL_PAUSE_PENDING=0x00000006, + SVCCTL_PAUSED=0x00000007 +} +#else + { __donnot_use_enum_svcctl_ServiceStatus=0x7FFFFFFF} +#define SVCCTL_STATE_UNKNOWN ( 0x00000000 ) +#define SVCCTL_STOPPED ( 0x00000001 ) +#define SVCCTL_START_PENDING ( 0x00000002 ) +#define SVCCTL_STOP_PENDING ( 0x00000003 ) +#define SVCCTL_RUNNING ( 0x00000004 ) +#define SVCCTL_CONTINUE_PENDING ( 0x00000005 ) +#define SVCCTL_PAUSE_PENDING ( 0x00000006 ) +#define SVCCTL_PAUSED ( 0x00000007 ) +#endif +; + +/* bitmap svcctl_ControlsAccepted */ +#define SVCCTL_ACCEPT_NONE ( 0x00000000 ) +#define SVCCTL_ACCEPT_STOP ( 0x00000001 ) +#define SVCCTL_ACCEPT_PAUSE_CONTINUE ( 0x00000002 ) +#define SVCCTL_ACCEPT_SHUTDOWN ( 0x00000004 ) +#define SVCCTL_ACCEPT_PARAMCHANGE ( 0x00000008 ) +#define SVCCTL_ACCEPT_NETBINDCHANGE ( 0x00000010 ) +#define SVCCTL_ACCEPT_HARDWAREPROFILECHANGE ( 0x00000020 ) +#define SVCCTL_ACCEPT_POWEREVENT ( 0x00000040 ) + struct SERVICE_STATUS { uint32_t type; - uint32_t state; + enum svcctl_ServiceStatus state; uint32_t controls_accepted; WERROR win32_exit_code; uint32_t service_exit_code; |