IRPC: Add include guards for the header.
[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 #include "param/param.h"
26 typedef struct libnet_context libnet;
27 %}
28
29 %import "../libcli/util/errors.i"
30 %import "../lib/events/events.i"
31 %import "../lib/talloc/talloc.i"
32 %import "../param/param.i"
33
34 %talloctype(libnet_context);
35
36 typedef struct libnet_context {
37     struct cli_credentials *cred;
38     %extend { 
39         libnet(struct event_context *ev, struct loadparm_context *lp_ctx) {
40             return libnet_context_init(ev, lp_ctx);
41         }
42         NTSTATUS samsync_ldb(TALLOC_CTX *mem_ctx, struct libnet_samsync_ldb *r);
43         NTSTATUS DomainList(TALLOC_CTX *mem_ctx, struct libnet_DomainList *io);
44         NTSTATUS DomainClose(TALLOC_CTX *mem_ctx, struct libnet_DomainClose *io);
45         NTSTATUS DomainOpen(TALLOC_CTX *mem_ctx, struct libnet_DomainOpen *io);
46         NTSTATUS LookupName(TALLOC_CTX *mem_ctx, struct libnet_LookupName *io);
47         NTSTATUS LookupDCs(TALLOC_CTX *mem_ctx, struct libnet_LookupDCs *io);
48         NTSTATUS LookupHost(TALLOC_CTX *mem_ctx, struct libnet_Lookup *io);
49         NTSTATUS Lookup(TALLOC_CTX *mem_ctx, struct libnet_Lookup *io);
50         NTSTATUS ListShares(TALLOC_CTX *mem_ctx, struct libnet_ListShares *r);
51         NTSTATUS AddShare(TALLOC_CTX *mem_ctx, struct libnet_AddShare *r);
52         NTSTATUS DelShare(TALLOC_CTX *mem_ctx, struct libnet_DelShare *r);
53         NTSTATUS GroupList(TALLOC_CTX *mem_ctx, struct libnet_GroupList *io);
54         NTSTATUS GroupInfo(TALLOC_CTX *mem_ctx, struct libnet_GroupInfo *io);
55         NTSTATUS UserList(TALLOC_CTX *mem_ctx, struct libnet_UserList *r);
56         NTSTATUS UserInfo(TALLOC_CTX *mem_ctx, struct libnet_UserInfo *r);
57         NTSTATUS ModifyUser(TALLOC_CTX *mem_ctx, struct libnet_ModifyUser *r);
58         NTSTATUS DeleteUser(TALLOC_CTX *mem_ctx, struct libnet_DeleteUser *r);
59         NTSTATUS CreateUser(TALLOC_CTX *mem_ctx, struct libnet_CreateUser *r);
60         NTSTATUS SamDump_keytab(TALLOC_CTX *mem_ctx, struct libnet_SamDump_keytab *r);
61         NTSTATUS SamDump(TALLOC_CTX *mem_ctx, struct libnet_SamDump *r);
62         NTSTATUS SamSync_netlogon(TALLOC_CTX *mem_ctx, struct libnet_SamSync *r);
63         NTSTATUS UnbecomeDC(TALLOC_CTX *mem_ctx, struct libnet_UnbecomeDC *r);
64         NTSTATUS BecomeDC(TALLOC_CTX *mem_ctx, struct libnet_BecomeDC *r);
65         NTSTATUS JoinSite(struct ldb_context *remote_ldb, struct libnet_JoinDomain *libnet_r);
66         NTSTATUS JoinDomain(TALLOC_CTX *mem_ctx, struct libnet_JoinDomain *r);
67         NTSTATUS Join(TALLOC_CTX *mem_ctx, struct libnet_Join *r);
68         NTSTATUS RpcConnect(TALLOC_CTX *mem_ctx, struct libnet_RpcConnect *r);
69         NTSTATUS RemoteTOD(TALLOC_CTX *mem_ctx, union libnet_RemoteTOD *r);
70         NTSTATUS ChangePassword(TALLOC_CTX *mem_ctx, union libnet_ChangePassword *r);
71         NTSTATUS SetPassword(TALLOC_CTX *mem_ctx, union libnet_SetPassword *r);
72     }
73 } libnet;