2 Unix SMB/CIFS implementation.
4 SMB composite request interfaces
6 Copyright (C) Andrew Tridgell 2005
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 this defines the structures associated with "composite"
25 requests. Composite requests are libcli requests that are internally
26 implemented as multiple libcli/raw/ calls, but can be treated as a
27 single call via these composite calls. The composite calls are
28 particularly designed to be used in async applications
32 struct composite_context {
33 /* the external state - will be queried by the caller */
34 enum smbcli_request_state state;
36 /* a private pointer for use by the composite function
40 /* status code when finished */
43 /* the event context we are using */
44 struct event_context *event_ctx;
46 /* information on what to do on completion */
48 void (*fn)(struct composite_context *);
55 a composite open/read(s)/close request that loads a whole file
56 into memory. Used as a demo of the composite system.
58 struct smb_composite_loadfile {
68 struct smb_composite_fetchfile {
70 const char *dest_host;
72 const char *called_name;
73 const char *calling_name;
75 const char *service_type;
88 a composite open/write(s)/close request that saves a whole file from
89 memory. Used as a demo of the composite system.
91 struct smb_composite_savefile {
101 a composite request for a full connection to a remote server. Includes
103 - socket establishment
109 struct smb_composite_connect {
111 const char *dest_host;
113 const char *called_name;
114 const char *calling_name;
116 const char *service_type;
119 const char *password;
122 struct smbcli_tree *tree;
128 generic session setup interface that takes care of which
129 session setup varient to use
131 struct smb_composite_sesssetup {
134 uint32_t capabilities;
135 const char *password;