summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs/ejsrpc.h
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/ejs/ejsrpc.h')
-rw-r--r--source4/scripting/ejs/ejsrpc.h32
1 files changed, 20 insertions, 12 deletions
diff --git a/source4/scripting/ejs/ejsrpc.h b/source4/scripting/ejs/ejsrpc.h
index 4ce1858474..8ddd6a394e 100644
--- a/source4/scripting/ejs/ejsrpc.h
+++ b/source4/scripting/ejs/ejsrpc.h
@@ -24,35 +24,43 @@ struct ejs_rpc {
};
+typedef NTSTATUS (*ejs_pull_t)(struct ejs_rpc *, struct MprVar *, const char *, void *);
+typedef NTSTATUS (*ejs_push_t)(struct ejs_rpc *, struct MprVar *, const char *, const void *);
typedef NTSTATUS (*ejs_pull_function_t)(struct ejs_rpc *, struct MprVar *, void *);
typedef NTSTATUS (*ejs_push_function_t)(struct ejs_rpc *, struct MprVar *, const void *);
+int ejs_rpc_call(int eid, int argc, struct MprVar **argv, const char *callname,
+ ejs_pull_function_t ejs_pull, ejs_push_function_t ejs_push);
NTSTATUS ejs_pull_rpc(struct MprVar *v, void *ptr, ejs_pull_function_t ejs_pull);
NTSTATUS ejs_push_rpc(struct MprVar *v, const void *ptr, ejs_push_function_t ejs_push);
+NTSTATUS ejs_pull_struct_start(struct ejs_rpc *ejs, struct MprVar **v, const char *name);
+NTSTATUS ejs_push_struct_start(struct ejs_rpc *ejs, struct MprVar **v, const char *name);
NTSTATUS ejs_pull_uint8(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, uint8_t *r);
NTSTATUS ejs_push_uint8(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, uint8_t r);
-
NTSTATUS ejs_pull_uint16(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, uint16_t *r);
NTSTATUS ejs_push_uint16(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, uint16_t r);
-
NTSTATUS ejs_pull_uint32(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, uint32_t *r);
NTSTATUS ejs_push_uint32(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, uint32_t r);
+NTSTATUS ejs_pull_hyper(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, uint64_t *r);
+NTSTATUS ejs_push_hyper(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, uint64_t r);
+NTSTATUS ejs_pull_enum(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, unsigned *r);
+NTSTATUS ejs_push_enum(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, unsigned r);
+NTSTATUS ejs_pull_array(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, uint32_t length,
+ size_t elsize, void **r, ejs_pull_t ejs_pull);
+NTSTATUS ejs_push_array(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, uint32_t length,
+ size_t elsize, void *r, ejs_push_t ejs_push);
-/* echo calls - PLEASE LEAVE THESE HERE TILL PIDL KNOWS HOW TO
- GENERATE THEM */
-
-#include "librpc/gen_ndr/ndr_echo.h"
-
-NTSTATUS ejs_pull_echo_AddOne(struct ejs_rpc *ejs,
- struct MprVar *v, struct echo_AddOne *r);
-NTSTATUS ejs_push_echo_AddOne(struct ejs_rpc *ejs,
- struct MprVar *v,
- const struct echo_AddOne *r);