/*
* This file is part of GNUnet.
- * (C) 2013 Christian Grothoff (and other contributing authors)
+ * Copyright (C) 2013 Christian Grothoff (and other contributing authors)
*
* GNUnet is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
*
* You should have received a copy of the GNU General Public License
* along with GNUnet; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*/
/**
/**
* PSYC state modifier.
*/
-struct GNUNET_ENV_Modifier {
+struct GNUNET_ENV_Modifier
+{
/**
* State operation.
*/
* @param value_size Size of @a value.
*/
void
-GNUNET_ENV_environment_add_mod (struct GNUNET_ENV_Environment *env,
- enum GNUNET_ENV_Operator oper, const char *name,
- const void *value, size_t value_size);
+GNUNET_ENV_environment_add (struct GNUNET_ENV_Environment *env,
+ enum GNUNET_ENV_Operator oper, const char *name,
+ const void *value, size_t value_size);
+
+
+/**
+ * Get the first modifier of the environment.
+ */
+struct GNUNET_ENV_Modifier *
+GNUNET_ENV_environment_head (const struct GNUNET_ENV_Environment *env);
+
+
+
+/**
+ * Get the last modifier of the environment.
+ */
+struct GNUNET_ENV_Modifier *
+GNUNET_ENV_environment_tail (const struct GNUNET_ENV_Environment *env);
+
+
+/**
+ * Remove a modifier from the environment.
+ */
+void
+GNUNET_ENV_environment_remove (struct GNUNET_ENV_Environment *env,
+ struct GNUNET_ENV_Modifier *mod);
+
+
+/**
+ * Remove a modifier at the beginning of the environment.
+ */
+int
+GNUNET_ENV_environment_shift (struct GNUNET_ENV_Environment *env,
+ enum GNUNET_ENV_Operator *oper, const char **name,
+ const void **value, size_t *value_size);
/**
* @return Number of modifiers.
*/
size_t
-GNUNET_ENV_environment_get_mod_count (const struct GNUNET_ENV_Environment *env);
+GNUNET_ENV_environment_get_count (const struct GNUNET_ENV_Environment *env);
/**
GNUNET_ENV_value_to_number (size_t size, const void *value, int64_t *number);
-/**
- * Get the variable's value as a list.
- *
- * @param size Size of value.
- * @param value Raw value of variable.
- * @param[out] list A newly created list holding the elements.
- *
- * @return #GNUNET_OK on success, #GNUNET_SYSERR if an error occurred (e.g. the value is invalid).
- */
-int
-GNUNET_ENV_value_to_list (size_t size, const void *value, struct GNUNET_CONTAINER_SList **list);
-
-
/**
* Get the variable's value as a dictionary.
*
GNUNET_ENV_value_from_number (int64_t number, size_t *value_size);
-/**
- * Create a PSYC variable value from a list.
- *
- * @param list The list to convert.
- * @param[out] value_size Size of returned value.
- *
- * @return A newly allocated value or NULL on error.
- */
-void *
-GNUNET_ENV_value_from_list (struct GNUNET_CONTAINER_SList *list, size_t *value_size);
-
-
/**
* Create a PSYC variable value from a dictionary.
*