r6962: Severely simplified share functions. Removed call levels as we don't
[sfrench/samba-autobuild/.git] / source4 / libnet / libnet_share.h
1 /* 
2    Unix SMB/CIFS implementation.
3    
4    Copyright (C) GrĂ©gory LEOCADIE <gleocadie@idealx.com> 
5    
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2 of the License, or
9    (at your option) any later version.
10    
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15    
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21 #include "librpc/gen_ndr/ndr_srvsvc.h"
22
23 enum libnet_ListShares_level {
24         LIBNET_LIST_SHARES_GENERIC,
25         LIBNET_LIST_SHARES_SRVSVC
26 };
27
28 struct libnet_ListShares {
29         struct {
30                 const char *server_name;
31                 uint32_t *resume_handle;
32                 uint32_t level; 
33         } in;
34         struct {
35                 const char *error_string;
36                 union srvsvc_NetShareCtr ctr;
37                 uint32_t *resume_handle;
38         } out;
39 };
40
41 enum libnet_AddShare_level {
42         LIBNET_ADD_SHARE_GENERIC,
43         LIBNET_ADD_SHARE_SRVSVC
44 };
45
46 struct libnet_AddShare {
47         enum libnet_AddShare_level level;
48         struct {
49                 const char * server_name;
50                 uint32_t level;
51                 struct srvsvc_NetShareInfo2 share;      
52         } in;
53         struct {
54                 const char* error_string;
55         } out;
56 };
57
58 enum libnet_DelShare_level {
59         LIBNET_DEL_SHARE_GENERIC,
60         LIBNET_DEL_SHARE_SRVSVC
61 };
62
63 struct libnet_DelShare {
64         enum libnet_DelShare_level level;
65         struct {
66                 const char *server_name;
67                 const char *share_name;
68         } in;
69         struct {
70                 const char *error_string;
71         } out;
72 };