s3:libsmb: add smb2cli_tcon*() and smb2cli_tdis*()
[sfrench/samba-autobuild/.git] / source3 / libsmb / smb2cli.h
1 /*
2    Unix SMB/CIFS implementation.
3    smb2 client routines
4    Copyright (C) Volker Lendecke 2011
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 3 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, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef __SMB2CLI_H__
21 #define __SMB2CLI_H__
22
23 struct tevent_req *smb2cli_negprot_send(TALLOC_CTX *mem_ctx,
24                                          struct tevent_context *ev,
25                                          struct cli_state *cli);
26 NTSTATUS smb2cli_negprot_recv(struct tevent_req *req);
27 NTSTATUS smb2cli_negprot(struct cli_state *cli);
28
29 struct tevent_req *smb2cli_sesssetup_send(TALLOC_CTX *mem_ctx,
30                                           struct tevent_context *ev,
31                                           struct cli_state *cli,
32                                           const char *user,
33                                           const char *domain,
34                                           const char *pass);
35 NTSTATUS smb2cli_sesssetup_recv(struct tevent_req *req);
36 NTSTATUS smb2cli_sesssetup(struct cli_state *cli, const char *user,
37                            const char *domain, const char *pass);
38
39 struct tevent_req *smb2cli_logoff_send(TALLOC_CTX *mem_ctx,
40                                        struct tevent_context *ev,
41                                        struct cli_state *cli);
42 NTSTATUS smb2cli_logoff_recv(struct tevent_req *req);
43 NTSTATUS smb2cli_logoff(struct cli_state *cli);
44
45 struct tevent_req *smb2cli_tcon_send(TALLOC_CTX *mem_ctx,
46                                      struct tevent_context *ev,
47                                      struct cli_state *cli,
48                                      const char *share);
49 NTSTATUS smb2cli_tcon_recv(struct tevent_req *req);
50 NTSTATUS smb2cli_tcon(struct cli_state *cli, const char *share);
51
52 struct tevent_req *smb2cli_tdis_send(TALLOC_CTX *mem_ctx,
53                                      struct tevent_context *ev,
54                                      struct cli_state *cli);
55 NTSTATUS smb2cli_tdis_recv(struct tevent_req *req);
56 NTSTATUS smb2cli_tdis(struct cli_state *cli);
57
58 #endif /* __SMB2CLI_H__ */