s3:waf: Fix code spelling
[Samba.git] / source3 / libsmb / clirap.h
blobc54df3ffe3759f477ac273d0893b4a6b05798b22
1 /*
2 Samba Unix/Linux SMB client library
3 More client RAP (SMB Remote Procedure Calls) functions
4 Copyright (C) 2001 Steve French (sfrench@us.ibm.com)
5 Copyright (C) 2001 Jim McDonough (jmcd@us.ibm.com)
6 Copyright (C) 2007 Jeremy Allison. jra@samba.org
7 Copyright (C) Andrew Tridgell 1994-1998
8 Copyright (C) Gerald (Jerry) Carter 2004
9 Copyright (C) James Peach 2007
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #ifndef _LIBSMB_CLIRAP_H
26 #define _LIBSMB_CLIRAP_H
28 struct cli_state;
30 /* The following definitions come from libsmb/clirap.c */
32 bool cli_api(struct cli_state *cli,
33 char *param, int prcnt, int mprcnt,
34 char *data, int drcnt, int mdrcnt,
35 char **rparam, unsigned int *rprcnt,
36 char **rdata, unsigned int *rdrcnt);
37 int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32_t, const char *, void *), void *state);
38 bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32_t stype,
39 void (*fn)(const char *, uint32_t, const char *, void *),
40 void *state);
41 bool cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password,
42 const char *old_password);
43 struct tevent_req *cli_qpathinfo1_send(TALLOC_CTX *mem_ctx,
44 struct tevent_context *ev,
45 struct cli_state *cli,
46 const char *fname);
47 NTSTATUS cli_qpathinfo1_recv(struct tevent_req *req,
48 time_t *change_time,
49 time_t *access_time,
50 time_t *write_time,
51 off_t *size,
52 uint32_t *pattr);
53 NTSTATUS cli_qpathinfo1(struct cli_state *cli,
54 const char *fname,
55 time_t *change_time,
56 time_t *access_time,
57 time_t *write_time,
58 off_t *size,
59 uint32_t *pattr);
60 NTSTATUS cli_setpathinfo_ext(struct cli_state *cli, const char *fname,
61 struct timespec create_time,
62 struct timespec access_time,
63 struct timespec write_time,
64 struct timespec change_time,
65 uint32_t attr);
66 struct tevent_req *cli_setfileinfo_ext_send(
67 TALLOC_CTX *mem_ctx,
68 struct tevent_context *ev,
69 struct cli_state *cli,
70 uint16_t fnum,
71 struct timespec create_time,
72 struct timespec access_time,
73 struct timespec write_time,
74 struct timespec change_time,
75 uint32_t attr);
76 NTSTATUS cli_setfileinfo_ext_recv(struct tevent_req *req);
77 NTSTATUS cli_setfileinfo_ext(
78 struct cli_state *cli,
79 uint16_t fnum,
80 struct timespec create_time,
81 struct timespec access_time,
82 struct timespec write_time,
83 struct timespec change_time,
84 uint32_t attr);
85 struct tevent_req *cli_qpathinfo2_send(TALLOC_CTX *mem_ctx,
86 struct tevent_context *ev,
87 struct cli_state *cli,
88 const char *fname);
89 NTSTATUS cli_qpathinfo2_recv(struct tevent_req *req,
90 struct timespec *create_time,
91 struct timespec *access_time,
92 struct timespec *write_time,
93 struct timespec *change_time,
94 off_t *size, uint32_t *pattr,
95 SMB_INO_T *ino);
96 NTSTATUS cli_qpathinfo2(struct cli_state *cli, const char *fname,
97 struct timespec *create_time,
98 struct timespec *access_time,
99 struct timespec *write_time,
100 struct timespec *change_time,
101 off_t *size, uint32_t *pattr,
102 SMB_INO_T *ino);
103 NTSTATUS cli_qpathinfo3(struct cli_state *cli, const char *fname,
104 struct timespec *create_time,
105 struct timespec *access_time,
106 struct timespec *write_time,
107 struct timespec *change_time,
108 off_t *size, uint32_t *pattr,
109 SMB_INO_T *ino);
110 struct tevent_req *cli_qpathinfo_streams_send(TALLOC_CTX *mem_ctx,
111 struct tevent_context *ev,
112 struct cli_state *cli,
113 const char *fname);
114 NTSTATUS cli_qpathinfo_streams_recv(struct tevent_req *req,
115 TALLOC_CTX *mem_ctx,
116 unsigned int *pnum_streams,
117 struct stream_struct **pstreams);
118 NTSTATUS cli_qpathinfo_streams(struct cli_state *cli, const char *fname,
119 TALLOC_CTX *mem_ctx,
120 unsigned int *pnum_streams,
121 struct stream_struct **pstreams);
122 bool parse_streams_blob(TALLOC_CTX *mem_ctx, const uint8_t *rdata,
123 size_t data_len,
124 unsigned int *pnum_streams,
125 struct stream_struct **pstreams);
126 struct tevent_req *cli_qfileinfo_basic_send(
127 TALLOC_CTX *mem_ctx,
128 struct tevent_context *ev,
129 struct cli_state *cli,
130 uint16_t fnum);
131 NTSTATUS cli_qfileinfo_basic_recv(
132 struct tevent_req *req,
133 uint32_t *attr,
134 off_t *size,
135 struct timespec *create_time,
136 struct timespec *access_time,
137 struct timespec *write_time,
138 struct timespec *change_time,
139 SMB_INO_T *ino);
140 NTSTATUS cli_qfileinfo_basic(
141 struct cli_state *cli,
142 uint16_t fnum,
143 uint32_t *attr,
144 off_t *size,
145 struct timespec *create_time,
146 struct timespec *access_time,
147 struct timespec *write_time,
148 struct timespec *change_time,
149 SMB_INO_T *ino);
150 struct tevent_req *cli_qpathinfo_basic_send(TALLOC_CTX *mem_ctx,
151 struct tevent_context *ev,
152 struct cli_state *cli,
153 const char *fname);
154 NTSTATUS cli_qpathinfo_basic_recv(struct tevent_req *req,
155 SMB_STRUCT_STAT *sbuf, uint32_t *attributes);
156 NTSTATUS cli_qpathinfo_basic(struct cli_state *cli, const char *name,
157 SMB_STRUCT_STAT *sbuf, uint32_t *attributes);
158 NTSTATUS cli_qpathinfo_standard(struct cli_state *cli, const char *fname,
159 uint64_t *allocated, uint64_t *size,
160 uint32_t *nlinks,
161 bool *is_del_pending, bool *is_dir);
162 NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name);
163 struct tevent_req *cli_qpathinfo_send(TALLOC_CTX *mem_ctx,
164 struct tevent_context *ev,
165 struct cli_state *cli, const char *fname,
166 uint16_t level, uint32_t min_rdata,
167 uint32_t max_rdata);
168 NTSTATUS cli_qpathinfo_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
169 uint8_t **rdata, uint32_t *num_rdata);
170 NTSTATUS cli_qpathinfo(TALLOC_CTX *mem_ctx, struct cli_state *cli,
171 const char *fname, uint16_t level, uint32_t min_rdata,
172 uint32_t max_rdata,
173 uint8_t **rdata, uint32_t *num_rdata);
175 struct tevent_req *cli_qfileinfo_send(TALLOC_CTX *mem_ctx,
176 struct tevent_context *ev,
177 struct cli_state *cli, uint16_t fnum,
178 uint16_t level, uint32_t min_rdata,
179 uint32_t max_rdata);
180 NTSTATUS cli_qfileinfo_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
181 uint16_t *recv_flags2,
182 uint8_t **rdata, uint32_t *num_rdata);
183 NTSTATUS cli_qfileinfo(TALLOC_CTX *mem_ctx, struct cli_state *cli,
184 uint16_t fnum, uint16_t level, uint32_t min_rdata,
185 uint32_t max_rdata, uint16_t *recv_flags2,
186 uint8_t **rdata, uint32_t *num_rdata);
188 struct tevent_req *cli_flush_send(TALLOC_CTX *mem_ctx,
189 struct tevent_context *ev,
190 struct cli_state *cli,
191 uint16_t fnum);
192 NTSTATUS cli_flush_recv(struct tevent_req *req);
193 NTSTATUS cli_flush(TALLOC_CTX *mem_ctx, struct cli_state *cli, uint16_t fnum);
195 struct tevent_req *cli_shadow_copy_data_send(TALLOC_CTX *mem_ctx,
196 struct tevent_context *ev,
197 struct cli_state *cli,
198 uint16_t fnum,
199 bool get_names);
200 NTSTATUS cli_shadow_copy_data_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
201 char ***pnames, int *pnum_names);
202 NTSTATUS cli_shadow_copy_data(TALLOC_CTX *mem_ctx, struct cli_state *cli,
203 uint16_t fnum, bool get_names,
204 char ***pnames, int *pnum_names);
206 struct tevent_req *cli_fsctl_send(
207 TALLOC_CTX *mem_ctx,
208 struct tevent_context *ev,
209 struct cli_state *cli,
210 uint16_t fnum,
211 uint32_t ctl_code,
212 const DATA_BLOB *in,
213 uint32_t max_out);
214 NTSTATUS cli_fsctl_recv(
215 struct tevent_req *req, TALLOC_CTX *mem_ctx, DATA_BLOB *out);
218 #endif /* _LIBSMB_CLIRAP_H */