s3:libnetapi: Add NetComposeOfflineDomainJoin() boilerplate
[samba.git] / source3 / lib / netapi / libnetapi.h
index d2531a287f73ada0ebf24a983bf823743be402f3..784d467ff5578402b0d6f3a857e621711d95939a 100644 (file)
@@ -1,3 +1,22 @@
+/*
+ *  Unix SMB/CIFS implementation.
+ *  NetApi Support
+ *  Copyright (C) Guenther Deschner 2007-2008
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
 #ifndef __LIBNETAPI_LIBNETAPI__
 #define __LIBNETAPI_LIBNETAPI__
 NET_API_STATUS NetJoinDomain(const char * server /* [in] [unique] */,
@@ -44,6 +63,43 @@ WERROR NetRenameMachineInDomain_r(struct libnetapi_ctx *ctx,
                                  struct NetRenameMachineInDomain *r);
 WERROR NetRenameMachineInDomain_l(struct libnetapi_ctx *ctx,
                                  struct NetRenameMachineInDomain *r);
+NET_API_STATUS NetProvisionComputerAccount(const char * domain /* [in] [ref] */,
+                                          const char * machine_name /* [in] [ref] */,
+                                          const char * machine_account_ou /* [in] [unique] */,
+                                          const char * dcname /* [in] [unique] */,
+                                          uint32_t options /* [in] */,
+                                          uint8_t **provision_bin_data /* [in,out] [unique] */,
+                                          uint32_t *provision_bin_data_size /* [in,out] [unique] */,
+                                          const char * *provision_text_data /* [in,out] [unique] */);
+WERROR NetProvisionComputerAccount_r(struct libnetapi_ctx *ctx,
+                                    struct NetProvisionComputerAccount *r);
+WERROR NetProvisionComputerAccount_l(struct libnetapi_ctx *ctx,
+                                    struct NetProvisionComputerAccount *r);
+NET_API_STATUS NetRequestOfflineDomainJoin(uint8_t *provision_bin_data /* [in] [unique] */,
+                                          uint32_t provision_bin_data_size /* [in] */,
+                                          uint32_t options /* [in] */,
+                                          const char * windows_path /* [in] [unique] */);
+WERROR NetRequestOfflineDomainJoin_r(struct libnetapi_ctx *ctx,
+                                    struct NetRequestOfflineDomainJoin *r);
+WERROR NetRequestOfflineDomainJoin_l(struct libnetapi_ctx *ctx,
+                                    struct NetRequestOfflineDomainJoin *r);
+NET_API_STATUS NetComposeOfflineDomainJoin(const char *dns_domain_name /* [in] [ref] */,
+                                          const char *netbios_domain_name /* [in] [ref] */,
+                                          struct domsid *domain_sid /* [in] [ref] */,
+                                          struct GUID *domain_guid /* [in] [ref] */,
+                                          const char *forest_name /* [in] [ref] */,
+                                          const char *machine_account_name /* [in] [ref] */,
+                                          const char *machine_account_password /* [in] [ref] */,
+                                          const char *dc_name /* [in] [unique] */,
+                                          const char *dc_address /* [in] [unique] */,
+                                          int domain_is_ad /* [in] */,
+                                          uint8_t **provision_bin_data /* [in,out] [unique] */,
+                                          uint32_t *provision_bin_data_size /* [in,out] [unique] */,
+                                          const char * *provision_text_data /* [in,out] [unique] */);
+WERROR NetComposeOfflineDomainJoin_r(struct libnetapi_ctx *ctx,
+                                    struct NetComposeOfflineDomainJoin *r);
+WERROR NetComposeOfflineDomainJoin_l(struct libnetapi_ctx *ctx,
+                                    struct NetComposeOfflineDomainJoin *r);
 NET_API_STATUS NetServerGetInfo(const char * server_name /* [in] [unique] */,
                                uint32_t level /* [in] */,
                                uint8_t **buffer /* [out] [ref] */);
@@ -59,6 +115,13 @@ WERROR NetServerSetInfo_r(struct libnetapi_ctx *ctx,
                          struct NetServerSetInfo *r);
 WERROR NetServerSetInfo_l(struct libnetapi_ctx *ctx,
                          struct NetServerSetInfo *r);
+NET_API_STATUS NetWkstaGetInfo(const char * server_name /* [in] [unique] */,
+                              uint32_t level /* [in] */,
+                              uint8_t **buffer /* [out] [ref] */);
+WERROR NetWkstaGetInfo_r(struct libnetapi_ctx *ctx,
+                        struct NetWkstaGetInfo *r);
+WERROR NetWkstaGetInfo_l(struct libnetapi_ctx *ctx,
+                        struct NetWkstaGetInfo *r);
 NET_API_STATUS NetGetDCName(const char * server_name /* [in] [unique] */,
                            const char * domain_name /* [in] [unique] */,
                            uint8_t **buffer /* [out] [ref] */);
@@ -145,6 +208,27 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
                          struct NetUserGetGroups *r);
 WERROR NetUserGetGroups_l(struct libnetapi_ctx *ctx,
                          struct NetUserGetGroups *r);
+NET_API_STATUS NetUserSetGroups(const char * server_name /* [in] */,
+                               const char * user_name /* [in] */,
+                               uint32_t level /* [in] */,
+                               uint8_t *buffer /* [in] [ref] */,
+                               uint32_t num_entries /* [in] */);
+WERROR NetUserSetGroups_r(struct libnetapi_ctx *ctx,
+                         struct NetUserSetGroups *r);
+WERROR NetUserSetGroups_l(struct libnetapi_ctx *ctx,
+                         struct NetUserSetGroups *r);
+NET_API_STATUS NetUserGetLocalGroups(const char * server_name /* [in] */,
+                                    const char * user_name /* [in] */,
+                                    uint32_t level /* [in] */,
+                                    uint32_t flags /* [in] */,
+                                    uint8_t **buffer /* [out] [ref] */,
+                                    uint32_t prefmaxlen /* [in] */,
+                                    uint32_t *entries_read /* [out] [ref] */,
+                                    uint32_t *total_entries /* [out] [ref] */);
+WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx,
+                              struct NetUserGetLocalGroups *r);
+WERROR NetUserGetLocalGroups_l(struct libnetapi_ctx *ctx,
+                              struct NetUserGetLocalGroups *r);
 NET_API_STATUS NetUserModalsGet(const char * server_name /* [in] */,
                                uint32_t level /* [in] */,
                                uint8_t **buffer /* [out] [ref] */);
@@ -239,6 +323,15 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
                          struct NetGroupGetUsers *r);
 WERROR NetGroupGetUsers_l(struct libnetapi_ctx *ctx,
                          struct NetGroupGetUsers *r);
+NET_API_STATUS NetGroupSetUsers(const char * server_name /* [in] */,
+                               const char * group_name /* [in] */,
+                               uint32_t level /* [in] */,
+                               uint8_t *buffer /* [in] [ref] */,
+                               uint32_t num_entries /* [in] */);
+WERROR NetGroupSetUsers_r(struct libnetapi_ctx *ctx,
+                         struct NetGroupSetUsers *r);
+WERROR NetGroupSetUsers_l(struct libnetapi_ctx *ctx,
+                         struct NetGroupSetUsers *r);
 NET_API_STATUS NetLocalGroupAdd(const char * server_name /* [in] */,
                                uint32_t level /* [in] */,
                                uint8_t *buffer /* [in] [ref] */,
@@ -352,4 +445,79 @@ WERROR NetShareEnum_r(struct libnetapi_ctx *ctx,
                      struct NetShareEnum *r);
 WERROR NetShareEnum_l(struct libnetapi_ctx *ctx,
                      struct NetShareEnum *r);
+NET_API_STATUS NetShareGetInfo(const char * server_name /* [in] */,
+                              const char * net_name /* [in] */,
+                              uint32_t level /* [in] */,
+                              uint8_t **buffer /* [out] [ref] */);
+WERROR NetShareGetInfo_r(struct libnetapi_ctx *ctx,
+                        struct NetShareGetInfo *r);
+WERROR NetShareGetInfo_l(struct libnetapi_ctx *ctx,
+                        struct NetShareGetInfo *r);
+NET_API_STATUS NetShareSetInfo(const char * server_name /* [in] */,
+                              const char * net_name /* [in] */,
+                              uint32_t level /* [in] */,
+                              uint8_t *buffer /* [in] [ref] */,
+                              uint32_t *parm_err /* [out] [ref] */);
+WERROR NetShareSetInfo_r(struct libnetapi_ctx *ctx,
+                        struct NetShareSetInfo *r);
+WERROR NetShareSetInfo_l(struct libnetapi_ctx *ctx,
+                        struct NetShareSetInfo *r);
+NET_API_STATUS NetFileClose(const char * server_name /* [in] */,
+                           uint32_t fileid /* [in] */);
+WERROR NetFileClose_r(struct libnetapi_ctx *ctx,
+                     struct NetFileClose *r);
+WERROR NetFileClose_l(struct libnetapi_ctx *ctx,
+                     struct NetFileClose *r);
+NET_API_STATUS NetFileGetInfo(const char * server_name /* [in] */,
+                             uint32_t fileid /* [in] */,
+                             uint32_t level /* [in] */,
+                             uint8_t **buffer /* [out] [ref] */);
+WERROR NetFileGetInfo_r(struct libnetapi_ctx *ctx,
+                       struct NetFileGetInfo *r);
+WERROR NetFileGetInfo_l(struct libnetapi_ctx *ctx,
+                       struct NetFileGetInfo *r);
+NET_API_STATUS NetFileEnum(const char * server_name /* [in] */,
+                          const char * base_path /* [in] */,
+                          const char * user_name /* [in] */,
+                          uint32_t level /* [in] */,
+                          uint8_t **buffer /* [out] [ref] */,
+                          uint32_t prefmaxlen /* [in] */,
+                          uint32_t *entries_read /* [out] [ref] */,
+                          uint32_t *total_entries /* [out] [ref] */,
+                          uint32_t *resume_handle /* [in,out] [ref] */);
+WERROR NetFileEnum_r(struct libnetapi_ctx *ctx,
+                    struct NetFileEnum *r);
+WERROR NetFileEnum_l(struct libnetapi_ctx *ctx,
+                    struct NetFileEnum *r);
+NET_API_STATUS NetShutdownInit(const char * server_name /* [in] */,
+                              const char * message /* [in] */,
+                              uint32_t timeout /* [in] */,
+                              uint8_t force_apps /* [in] */,
+                              uint8_t do_reboot /* [in] */);
+WERROR NetShutdownInit_r(struct libnetapi_ctx *ctx,
+                        struct NetShutdownInit *r);
+WERROR NetShutdownInit_l(struct libnetapi_ctx *ctx,
+                        struct NetShutdownInit *r);
+NET_API_STATUS NetShutdownAbort(const char * server_name /* [in] */);
+WERROR NetShutdownAbort_r(struct libnetapi_ctx *ctx,
+                         struct NetShutdownAbort *r);
+WERROR NetShutdownAbort_l(struct libnetapi_ctx *ctx,
+                         struct NetShutdownAbort *r);
+NET_API_STATUS I_NetLogonControl(const char * server_name /* [in] */,
+                                uint32_t function_code /* [in] */,
+                                uint32_t query_level /* [in] */,
+                                uint8_t **buffer /* [out] [ref] */);
+WERROR I_NetLogonControl_r(struct libnetapi_ctx *ctx,
+                          struct I_NetLogonControl *r);
+WERROR I_NetLogonControl_l(struct libnetapi_ctx *ctx,
+                          struct I_NetLogonControl *r);
+NET_API_STATUS I_NetLogonControl2(const char * server_name /* [in] */,
+                                 uint32_t function_code /* [in] */,
+                                 uint32_t query_level /* [in] */,
+                                 uint8_t *data /* [in] [unique] */,
+                                 uint8_t **buffer /* [out] [ref] */);
+WERROR I_NetLogonControl2_r(struct libnetapi_ctx *ctx,
+                           struct I_NetLogonControl2 *r);
+WERROR I_NetLogonControl2_l(struct libnetapi_ctx *ctx,
+                           struct I_NetLogonControl2 *r);
 #endif /* __LIBNETAPI_LIBNETAPI__ */