globus_connect_gridftp_server 17.0~rc3
Loading...
Searching...
No Matches
globus_i_gridftp_server_control_facts.h
1#ifndef GLOBUS_I_GRIDFTP_SERVER_CONTROL_FACTS_H
2#define GLOBUS_I_GRIDFTP_SERVER_CONTROL_FACTS_H
3
4#include "globus_gridftp_server_control.h"
5
6/*
7 * Extra MLSx facts, for the GridFTP server.
8 *
9 * This header is not installed: the server ships in the same package as
10 * this library, so these functions can change along with it. They are
11 * still exported from the library, because libglobus_gridftp_server calls
12 * them.
13 */
14
15/*
16 * Register MLSx facts beyond the built-in ones, so that FEAT lists them and
17 * OPTS MLST can select them. fact_names is "name;name;" in the order the
18 * facts should be printed, e.g. "X.foo;X.bar;". Names match
19 * case-insensitively and must not contain '=', ';', spaces or control
20 * characters, repeat each other or a built-in fact. At most 16 names.
21 *
22 * Call it once per server, before the client selects facts; later calls
23 * fail, because OPTS MLST selections refer to the names by position.
24 */
25globus_result_t
26globus_i_gsc_add_mlst_facts(
27 globus_gridftp_server_control_t server,
28 const char * fact_names);
29
30/*
31 * globus_gridftp_server_control_finished_resource() with extra facts.
32 * facts is NULL, or stat_count strings (entries may be NULL): facts[i]
33 * holds entry i's extra facts as "name=value;name=value;" with URL-encoded
34 * values. MLST and MLSC send a fact only if the client selected it with
35 * OPTS MLST. The strings are copied.
36 */
37globus_result_t
38globus_i_gsc_finished_resource_facts(
39 globus_gridftp_server_control_op_t op,
40 globus_gridftp_server_control_stat_t * stat_info_array,
41 int stat_count,
42 int uid,
43 int gid_count,
44 int * gid_array,
45 char ** facts,
46 globus_gridftp_server_control_response_t response_code,
47 const char * msg);
48
49/*
50 * Or'ed into the resource mask for MLST and MLSC when the client selected
51 * at least one extra fact, so the user can skip looking them up otherwise.
52 * Existing users test the mask with &, so the extra bit does not change
53 * their behaviour.
54 */
55#define GLOBUS_I_GSC_RESOURCE_EXT_FACTS 4
56
57/*
58 * The registered extra facts the client's current OPTS MLST selection
59 * includes, as "name;name;" (e.g. "X.foo;X.bar;"), or NULL if none. The
60 * caller frees the result.
61 */
62char *
63globus_i_gsc_get_ext_facts(
64 globus_gridftp_server_control_t server);
65
66#endif