Restructure inner workings of libnetapi a bit.
[samba.git] / source / lib / netapi / libnetapi.h
1 #ifndef __LIBNETAPI_LIBNETAPI__
2 #define __LIBNETAPI_LIBNETAPI__
3 NET_API_STATUS NetJoinDomain(const char * server /* [in] [unique] */,
4                              const char * domain /* [in] [ref] */,
5                              const char * account_ou /* [in] [unique] */,
6                              const char * account /* [in] [unique] */,
7                              const char * password /* [in] [unique] */,
8                              uint32_t join_flags /* [in] */);
9 WERROR NetJoinDomain_r(struct libnetapi_ctx *ctx,
10                        struct NetJoinDomain *r);
11 WERROR NetJoinDomain_l(struct libnetapi_ctx *ctx,
12                        struct NetJoinDomain *r);
13 NET_API_STATUS NetUnjoinDomain(const char * server_name /* [in] [unique] */,
14                                const char * account /* [in] [unique] */,
15                                const char * password /* [in] [unique] */,
16                                uint32_t unjoin_flags /* [in] */);
17 WERROR NetUnjoinDomain_r(struct libnetapi_ctx *ctx,
18                          struct NetUnjoinDomain *r);
19 WERROR NetUnjoinDomain_l(struct libnetapi_ctx *ctx,
20                          struct NetUnjoinDomain *r);
21 NET_API_STATUS NetGetJoinInformation(const char * server_name /* [in] [unique] */,
22                                      const char * *name_buffer /* [out] [ref] */,
23                                      uint16_t *name_type /* [out] [ref] */);
24 WERROR NetGetJoinInformation_r(struct libnetapi_ctx *ctx,
25                                struct NetGetJoinInformation *r);
26 WERROR NetGetJoinInformation_l(struct libnetapi_ctx *ctx,
27                                struct NetGetJoinInformation *r);
28 NET_API_STATUS NetGetJoinableOUs(const char * server_name /* [in] [unique] */,
29                                  const char * domain /* [in] [ref] */,
30                                  const char * account /* [in] [unique] */,
31                                  const char * password /* [in] [unique] */,
32                                  uint32_t *ou_count /* [out] [ref] */,
33                                  const char * **ous /* [out] [ref] */);
34 WERROR NetGetJoinableOUs_r(struct libnetapi_ctx *ctx,
35                            struct NetGetJoinableOUs *r);
36 WERROR NetGetJoinableOUs_l(struct libnetapi_ctx *ctx,
37                            struct NetGetJoinableOUs *r);
38 NET_API_STATUS NetServerGetInfo(const char * server_name /* [in] [unique] */,
39                                 uint32_t level /* [in] */,
40                                 uint8_t **buffer /* [out] [ref] */);
41 WERROR NetServerGetInfo_r(struct libnetapi_ctx *ctx,
42                           struct NetServerGetInfo *r);
43 WERROR NetServerGetInfo_l(struct libnetapi_ctx *ctx,
44                           struct NetServerGetInfo *r);
45 NET_API_STATUS NetServerSetInfo(const char * server_name /* [in] [unique] */,
46                                 uint32_t level /* [in] */,
47                                 uint8_t *buffer /* [in] [ref] */,
48                                 uint32_t *parm_error /* [out] [ref] */);
49 WERROR NetServerSetInfo_r(struct libnetapi_ctx *ctx,
50                           struct NetServerSetInfo *r);
51 WERROR NetServerSetInfo_l(struct libnetapi_ctx *ctx,
52                           struct NetServerSetInfo *r);
53 NET_API_STATUS NetGetDCName(const char * server_name /* [in] [unique] */,
54                             const char * domain_name /* [in] [unique] */,
55                             uint8_t **buffer /* [out] [ref] */);
56 WERROR NetGetDCName_r(struct libnetapi_ctx *ctx,
57                       struct NetGetDCName *r);
58 WERROR NetGetDCName_l(struct libnetapi_ctx *ctx,
59                       struct NetGetDCName *r);
60 NET_API_STATUS NetGetAnyDCName(const char * server_name /* [in] [unique] */,
61                                const char * domain_name /* [in] [unique] */,
62                                uint8_t **buffer /* [out] [ref] */);
63 WERROR NetGetAnyDCName_r(struct libnetapi_ctx *ctx,
64                          struct NetGetAnyDCName *r);
65 WERROR NetGetAnyDCName_l(struct libnetapi_ctx *ctx,
66                          struct NetGetAnyDCName *r);
67 #endif /* __LIBNETAPI_LIBNETAPI__ */