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 *);
52 /* information about the progress */
53 void (*monitor_fn)(struct monitor_msg *);
58 a composite open/read(s)/close request that loads a whole file
59 into memory. Used as a demo of the composite system.
61 struct smb_composite_loadfile {
71 struct smb_composite_fetchfile {
73 const char *dest_host;
75 const char *called_name;
77 const char *service_type;
78 struct cli_credentials *credentials;
79 const char *workgroup;
89 a composite open/write(s)/close request that saves a whole file from
90 memory. Used as a demo of the composite system.
92 struct smb_composite_savefile {
102 a composite request for a full connection to a remote server. Includes
104 - socket establishment
110 struct smb_composite_connect {
112 const char *dest_host;
114 const char *called_name;
116 const char *service_type;
117 struct cli_credentials *credentials;
118 const char *workgroup;
121 struct smbcli_tree *tree;
127 generic session setup interface that takes care of which
128 session setup varient to use
130 struct smb_composite_sesssetup {
133 uint32_t capabilities;
134 struct cli_credentials *credentials;
135 const char *workgroup;
143 query file system info
145 struct smb_composite_fsinfo {
147 const char *dest_host;
149 const char *called_name;
151 const char *service_type;
152 struct cli_credentials *credentials;
153 const char *workgroup;
154 enum smb_fsinfo_level level;
158 union smb_fsinfo *fsinfo;
163 composite call for appending new acl to the file's security descriptor and get
167 struct smb_composite_appendacl {
171 const struct security_descriptor *sd;
175 struct security_descriptor *sd;