r26619: Add Python bindings for libnet. No tests yet and no way to set the parameters...
[jelmer/samba4-debian.git] / source / libnet / net.i
1 /* 
2    Unix SMB/CIFS implementation.
3    Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007
4    
5    This program is free software; you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 3 of the License, or
8    (at your option) any later version.
9    
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13    GNU General Public License for more details.
14    
15    You should have received a copy of the GNU General Public License
16    along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 %module(package="samba.net") net
20
21 %{
22 #include "includes.h"
23 #include "libnet/libnet.h"
24 #include "lib/events/events.h"
25 typedef struct libnet_context libnet;
26 %}
27
28 %import "../libcli/util/errors.i"
29 %import "../lib/events/events.i"
30 %import "../lib/talloc/talloc.i"
31
32 struct libnet_context *libnet_context_init(struct event_context *ev,
33                                            struct loadparm_context *lp_ctx);
34
35 typedef struct libnet_context {
36     %extend { 
37         NTSTATUS samsync_ldb(TALLOC_CTX *mem_ctx, struct libnet_samsync_ldb *r);
38         NTSTATUS DomainList(TALLOC_CTX *mem_ctx, struct libnet_DomainList *io);
39         NTSTATUS DomainClose(TALLOC_CTX *mem_ctx, struct libnet_DomainClose *io);
40         NTSTATUS DomainOpen(TALLOC_CTX *mem_ctx, struct libnet_DomainOpen *io);
41         NTSTATUS LookupName(TALLOC_CTX *mem_ctx, struct libnet_LookupName *io);
42         NTSTATUS LookupDCs(TALLOC_CTX *mem_ctx, struct libnet_LookupDCs *io);
43         NTSTATUS LookupHost(TALLOC_CTX *mem_ctx, struct libnet_Lookup *io);
44         NTSTATUS Lookup(TALLOC_CTX *mem_ctx, struct libnet_Lookup *io);
45         NTSTATUS ListShares(TALLOC_CTX *mem_ctx, struct libnet_ListShares *r);
46         NTSTATUS AddShare(TALLOC_CTX *mem_ctx, struct libnet_AddShare *r);
47         NTSTATUS DelShare(TALLOC_CTX *mem_ctx, struct libnet_DelShare *r);
48         NTSTATUS GroupList(TALLOC_CTX *mem_ctx, struct libnet_GroupList *io);
49         NTSTATUS GroupInfo(TALLOC_CTX *mem_ctx, struct libnet_GroupInfo *io);
50         NTSTATUS UserList(TALLOC_CTX *mem_ctx, struct libnet_UserList *r);
51         NTSTATUS UserInfo(TALLOC_CTX *mem_ctx, struct libnet_UserInfo *r);
52         NTSTATUS ModifyUser(TALLOC_CTX *mem_ctx, struct libnet_ModifyUser *r);
53         NTSTATUS DeleteUser(TALLOC_CTX *mem_ctx, struct libnet_DeleteUser *r);
54         NTSTATUS CreateUser(TALLOC_CTX *mem_ctx, struct libnet_CreateUser *r);
55         NTSTATUS SamDump_keytab(TALLOC_CTX *mem_ctx, struct libnet_SamDump_keytab *r);
56         NTSTATUS SamDump(TALLOC_CTX *mem_ctx, struct libnet_SamDump *r);
57         NTSTATUS SamSync_netlogon(TALLOC_CTX *mem_ctx, struct libnet_SamSync *r);
58         NTSTATUS UnbecomeDC(TALLOC_CTX *mem_ctx, struct libnet_UnbecomeDC *r);
59         NTSTATUS BecomeDC(TALLOC_CTX *mem_ctx, struct libnet_BecomeDC *r);
60         NTSTATUS JoinSite(struct ldb_context *remote_ldb, struct libnet_JoinDomain *libnet_r);
61         NTSTATUS JoinDomain(TALLOC_CTX *mem_ctx, struct libnet_JoinDomain *r);
62         NTSTATUS Join(TALLOC_CTX *mem_ctx, struct libnet_Join *r);
63         NTSTATUS RpcConnect(TALLOC_CTX *mem_ctx, struct libnet_RpcConnect *r);
64         NTSTATUS RemoteTOD(TALLOC_CTX *mem_ctx, union libnet_RemoteTOD *r);
65         NTSTATUS ChangePassword(TALLOC_CTX *mem_ctx, union libnet_ChangePassword *r);
66         NTSTATUS SetPassword(TALLOC_CTX *mem_ctx, union libnet_SetPassword *r);
67     }
68 } libnet;