Parameter API

Functions

gchar * gfal2_get_opt_string (gfal2_context_t handle, const gchar *group_name, const gchar *key, GError **error)
 get a string parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values
gchar * gfal2_get_opt_string_with_default (gfal2_context_t handle, const gchar *group_name, const gchar *key, const gchar *default_value)
 similar to gfal2_get_opt_string but return a default value if an error occurs
gint gfal2_set_opt_string (gfal2_context_t handle, const gchar *group_name, const gchar *key, const gchar *value, GError **error)
 set a string parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values
gint gfal2_get_opt_integer (gfal2_context_t handle, const gchar *group_name, const gchar *key, GError **error)
 get an integer parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values
gint gfal2_get_opt_integer_with_default (gfal2_context_t handle, const gchar *group_name, const gchar *key, gint default_value)
 similar to gfal2_get_opt_integer but return a default value if an error occurs
gint gfal2_set_opt_integer (gfal2_context_t handle, const gchar *group_name, const gchar *key, gint value, GError **error)
 set an integer parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values
gint gfal2_set_opt_boolean (gfal2_context_t handle, const gchar *group_name, const gchar *key, gboolean value, GError **error)
 set a boolean parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values
gboolean gfal2_get_opt_boolean (gfal2_context_t handle, const gchar *group_name, const gchar *key, GError **error)
 get a boolean parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values
gboolean gfal2_get_opt_boolean_with_default (gfal2_context_t handle, const gchar *group_name, const gchar *key, gboolean default_value)
 similar to gfal2_get_opt_boolean but return a default value if an error occures
gint gfal2_set_opt_string_list (gfal2_context_t handle, const gchar *group_name, const gchar *key, const gchar *const list[], gsize length, GError **error)
 set a list of string parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values
gchar ** gfal2_get_opt_string_list (gfal2_context_t handle, const gchar *group_name, const gchar *key, gsize *length, GError **error)
 get a list of string parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values
gchar ** gfal2_get_opt_string_list_with_default (gfal2_context_t handle, const gchar *group_name, const gchar *key, gsize *length, char **default_value)
 get a list of string parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values
gint gfal2_load_opts_from_file (gfal2_context_t handle, const char *path, GError **error)
 load configuration parameters from the file specified by path
gint gfal2_set_user_agent (gfal2_context_t handle, const char *user_agent, const char *version, GError **error)
gint gfal2_get_user_agent (gfal2_context_t handle, const char **user_agent, const char **version)
gint gfal2_add_client_info (gfal2_context_t handle, const char *key, const char *value, GError **error)
gint gfal2_remove_client_info (gfal2_context_t handle, const char *key, GError **error)
gint gfal2_clear_client_info (gfal2_context_t handle, GError **error)
gint gfal2_get_client_info_count (gfal2_context_t handle, GError **error)
gint gfal2_get_client_info_pair (gfal2_context_t handle, int index, const char **key, const char **value, GError **error)
gint gfal2_get_client_info_value (gfal2_context_t handle, const char *key, const char **value, GError **error)
char * gfal2_get_client_info_string (gfal2_context_t handle)

Detailed Description

Allows to overwrite or/and define any parameter of gfal 2.0. A complete list of parameter is accessible in the gfal 2.0 configuration files directory ( by default : /etc/gfal2.d/ )

Example ( enable IPv6 support for the gridFTP plugin ) : gfal2_set_opt_boolean("GRIDFTP PLUGIN", "IPV6", true, NULL);


Function Documentation

gint gfal2_add_client_info ( gfal2_context_t  handle,
const char *  key,
const char *  value,
GError **  error 
)

Add a new key/value pair with additional information to be passed to the storage for protocols that support it. For instance, this will be passed via CLIENTINFO for GridFTP, or the ClientInfo header for SRM and HTTP Return < 0 on error

gint gfal2_clear_client_info ( gfal2_context_t  handle,
GError **  error 
)

Clear the client information Return < 0 on error

gint gfal2_get_client_info_count ( gfal2_context_t  handle,
GError **  error 
)

Return how many custom pairs have been set Return < 0 on error

gint gfal2_get_client_info_pair ( gfal2_context_t  handle,
int  index,
const char **  key,
const char **  value,
GError **  error 
)

Put into key and value the pair at position index, or NULL if it does not exist Return < 0 on error

char* gfal2_get_client_info_string ( gfal2_context_t  handle  ) 

For convenience, return all the key/value information in the form key1=value1;key2=value2 The return value is NULL if there is no information. Otherwise, use g_free on it when done.

gint gfal2_get_client_info_value ( gfal2_context_t  handle,
const char *  key,
const char **  value,
GError **  error 
)

Put into value the value associated with the given key Return < 0 on error

gboolean gfal2_get_opt_boolean ( gfal2_context_t  handle,
const gchar *  group_name,
const gchar *  key,
GError **  error 
)

get a boolean parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values

Parameters:
handle : context of gfal 2.0
group_name : group name of the parameter
key : key of the parameter
error : GError error report system
Returns:
parameter value
gboolean gfal2_get_opt_boolean_with_default ( gfal2_context_t  handle,
const gchar *  group_name,
const gchar *  key,
gboolean  default_value 
)

similar to gfal2_get_opt_boolean but return a default value if an error occures

Parameters:
handle : context of gfal 2.0
group_name : group name of the parameter
key : key of the parameter
default_value : default value returned if not present
Returns:
parameter value
gint gfal2_get_opt_integer ( gfal2_context_t  handle,
const gchar *  group_name,
const gchar *  key,
GError **  error 
)

get an integer parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values

Parameters:
handle : context of gfal 2.0
group_name : group name of the parameter
key : key of the parameter
error : GError error report system
Returns:
parameter value
gint gfal2_get_opt_integer_with_default ( gfal2_context_t  handle,
const gchar *  group_name,
const gchar *  key,
gint  default_value 
)

similar to gfal2_get_opt_integer but return a default value if an error occurs

Parameters:
handle : context of gfal 2.0
group_name : group name of the parameter
key : key of the parameter
default_value : default value returned if not present
Returns:
parameter value
gchar* gfal2_get_opt_string ( gfal2_context_t  handle,
const gchar *  group_name,
const gchar *  key,
GError **  error 
)

get a string parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values

Parameters:
handle : context of gfal 2.0
group_name : group name of the parameter
key : key of the parameter
error : GError error report system
Returns:
parameter value. Must be freed using g_free
gchar** gfal2_get_opt_string_list ( gfal2_context_t  handle,
const gchar *  group_name,
const gchar *  key,
gsize *  length,
GError **  error 
)

get a list of string parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values

Parameters:
handle : context of gfal 2.0
group_name : group name of the parameter
key : key of the parameter
length : the length of the string is stored here
error : GError error report system
Returns:
parameter value
gchar** gfal2_get_opt_string_list_with_default ( gfal2_context_t  handle,
const gchar *  group_name,
const gchar *  key,
gsize *  length,
char **  default_value 
)

get a list of string parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values

Parameters:
handle : context of gfal 2.0
group_name : group name of the parameter
key : key of the parameter
length : the length of the string is stored here
default_value : Default array of not found
Returns:
parameter value
gchar* gfal2_get_opt_string_with_default ( gfal2_context_t  handle,
const gchar *  group_name,
const gchar *  key,
const gchar *  default_value 
)

similar to gfal2_get_opt_string but return a default value if an error occurs

Parameters:
handle : context of gfal 2.0
group_name : group name of the parameter
key : key of the parameter
default_value : Default value
Returns:
parameter value. Must be freed using g_free
gint gfal2_get_user_agent ( gfal2_context_t  handle,
const char **  user_agent,
const char **  version 
)

Returns the user agent and version specified before with gfal2_set_user_agent Leave user_agent and version to NULL if not found

gint gfal2_remove_client_info ( gfal2_context_t  handle,
const char *  key,
GError **  error 
)

Removes a key/value pair set previously with gfal2_add_client_info Return < 0 on error

gint gfal2_set_opt_boolean ( gfal2_context_t  handle,
const gchar *  group_name,
const gchar *  key,
gboolean  value,
GError **  error 
)

set a boolean parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values

Parameters:
handle : context of gfal 2.0
group_name : group name of the parameter
key : key of the parameter
value : value to set
error : GError error report system
Returns:
parameter value
gint gfal2_set_opt_integer ( gfal2_context_t  handle,
const gchar *  group_name,
const gchar *  key,
gint  value,
GError **  error 
)

set an integer parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values

Parameters:
handle : context of gfal 2.0
group_name : group name of the parameter
key : key of the parameter
value : value to set
error : GError error report system
Returns:
parameter value
gint gfal2_set_opt_string ( gfal2_context_t  handle,
const gchar *  group_name,
const gchar *  key,
const gchar *  value,
GError **  error 
)

set a string parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values

Parameters:
handle : context of gfal 2.0
group_name : group name of the parameter
key : key of the parameter
value : value to set
error : GError error report system
Returns:
parameter value
gint gfal2_set_opt_string_list ( gfal2_context_t  handle,
const gchar *  group_name,
const gchar *  key,
const gchar *const   list[],
gsize  length,
GError **  error 
)

set a list of string parameter in the current GFAL 2.0 configuration see gfal2.d configuration files or gfal 2.0 documentation to know group/key/values

Parameters:
handle : context of gfal 2.0
group_name : group name of the parameter
key : key of the parameter
list : list of strings
length : length of the list
error : GError error report system
Returns:
parameter value
gint gfal2_set_user_agent ( gfal2_context_t  handle,
const char *  user_agent,
const char *  version,
GError **  error 
)

Set the user agent for those protocols that support this


Generated on 6 Nov 2015 for GFAL2 by  doxygen 1.6.1