source: branches/samba-3.0/source/rpc_client/cli_dfs.c@ 403

Last change on this file since 403 was 1, checked in by Paul Smedley, 19 years ago

Initial code import

File size: 13.5 KB
Line 
1/*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
5
6#include "includes.h"
7
8NTSTATUS rpccli_dfs_GetManagerVersion(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32 *exist_flag)
9{
10 prs_struct qbuf, rbuf;
11 NETDFS_Q_DFS_GETMANAGERVERSION q;
12 NETDFS_R_DFS_GETMANAGERVERSION r;
13
14 ZERO_STRUCT(q);
15 ZERO_STRUCT(r);
16
17 /* Marshall data and send request */
18
19 if (!init_netdfs_q_dfs_GetManagerVersion(&q))
20 return NT_STATUS_INVALID_PARAMETER;
21
22 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_GETMANAGERVERSION,
23 q, r,
24 qbuf, rbuf,
25 netdfs_io_q_dfs_GetManagerVersion,
26 netdfs_io_r_dfs_GetManagerVersion,
27 NT_STATUS_UNSUCCESSFUL);
28
29 /* Return variables */
30 *exist_flag = r.exist_flag;
31
32 /* Return result */
33 return NT_STATUS_OK;
34}
35
36NTSTATUS rpccli_dfs_Add(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *path, const char *server, const char *share, const char *comment, uint32 flags)
37{
38 prs_struct qbuf, rbuf;
39 NETDFS_Q_DFS_ADD q;
40 NETDFS_R_DFS_ADD r;
41
42 ZERO_STRUCT(q);
43 ZERO_STRUCT(r);
44
45 /* Marshall data and send request */
46
47 if (!init_netdfs_q_dfs_Add(&q, path, server, share, comment, flags))
48 return NT_STATUS_INVALID_PARAMETER;
49
50 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_ADD,
51 q, r,
52 qbuf, rbuf,
53 netdfs_io_q_dfs_Add,
54 netdfs_io_r_dfs_Add,
55 NT_STATUS_UNSUCCESSFUL);
56
57 /* Return variables */
58
59 /* Return result */
60 return werror_to_ntstatus(r.status);
61}
62
63NTSTATUS rpccli_dfs_Remove(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *path, const char *server, const char *share)
64{
65 prs_struct qbuf, rbuf;
66 NETDFS_Q_DFS_REMOVE q;
67 NETDFS_R_DFS_REMOVE r;
68
69 ZERO_STRUCT(q);
70 ZERO_STRUCT(r);
71
72 /* Marshall data and send request */
73
74 if (!init_netdfs_q_dfs_Remove(&q, path, server, share))
75 return NT_STATUS_INVALID_PARAMETER;
76
77 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_REMOVE,
78 q, r,
79 qbuf, rbuf,
80 netdfs_io_q_dfs_Remove,
81 netdfs_io_r_dfs_Remove,
82 NT_STATUS_UNSUCCESSFUL);
83
84 /* Return variables */
85
86 /* Return result */
87 return werror_to_ntstatus(r.status);
88}
89
90NTSTATUS rpccli_dfs_SetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
91{
92 prs_struct qbuf, rbuf;
93 NETDFS_Q_DFS_SETINFO q;
94 NETDFS_R_DFS_SETINFO r;
95
96 ZERO_STRUCT(q);
97 ZERO_STRUCT(r);
98
99 /* Marshall data and send request */
100
101 if (!init_netdfs_q_dfs_SetInfo(&q))
102 return NT_STATUS_INVALID_PARAMETER;
103
104 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_SETINFO,
105 q, r,
106 qbuf, rbuf,
107 netdfs_io_q_dfs_SetInfo,
108 netdfs_io_r_dfs_SetInfo,
109 NT_STATUS_UNSUCCESSFUL);
110
111 /* Return variables */
112
113 /* Return result */
114 return werror_to_ntstatus(r.status);
115}
116
117NTSTATUS rpccli_dfs_GetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *path, const char *server, const char *share, uint32 level, NETDFS_DFS_INFO_CTR *info)
118{
119 prs_struct qbuf, rbuf;
120 NETDFS_Q_DFS_GETINFO q;
121 NETDFS_R_DFS_GETINFO r;
122
123 ZERO_STRUCT(q);
124 ZERO_STRUCT(r);
125
126 /* Marshall data and send request */
127
128 if (!init_netdfs_q_dfs_GetInfo(&q, path, server, share, level))
129 return NT_STATUS_INVALID_PARAMETER;
130
131 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_GETINFO,
132 q, r,
133 qbuf, rbuf,
134 netdfs_io_q_dfs_GetInfo,
135 netdfs_io_r_dfs_GetInfo,
136 NT_STATUS_UNSUCCESSFUL);
137
138 /* Return variables */
139 *info = r.info;
140
141 /* Return result */
142 return werror_to_ntstatus(r.status);
143}
144
145NTSTATUS rpccli_dfs_Enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32 level, uint32 bufsize, NETDFS_DFS_ENUMSTRUCT *info, uint32 *total)
146{
147 prs_struct qbuf, rbuf;
148 NETDFS_Q_DFS_ENUM q;
149 NETDFS_R_DFS_ENUM r;
150
151 ZERO_STRUCT(q);
152 ZERO_STRUCT(r);
153
154 /* Marshall data and send request */
155
156 if (!init_netdfs_q_dfs_Enum(&q, level, bufsize, info, total))
157 return NT_STATUS_INVALID_PARAMETER;
158
159 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_ENUM,
160 q, r,
161 qbuf, rbuf,
162 netdfs_io_q_dfs_Enum,
163 netdfs_io_r_dfs_Enum,
164 NT_STATUS_UNSUCCESSFUL);
165
166 /* Return variables */
167 *info = r.info;
168 *total = r.total;
169
170 /* Return result */
171 return werror_to_ntstatus(r.status);
172}
173
174NTSTATUS rpccli_dfs_Rename(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
175{
176 prs_struct qbuf, rbuf;
177 NETDFS_Q_DFS_RENAME q;
178 NETDFS_R_DFS_RENAME r;
179
180 ZERO_STRUCT(q);
181 ZERO_STRUCT(r);
182