OSDN Git Service

topology: Parse and build private data of physical links
[android-x86/external-alsa-lib.git] / include / conf.h
index 7c0cab0..5d293d5 100644 (file)
@@ -44,11 +44,11 @@ extern "C" {
 /** \brief \c dlsym version for the config hook callback. */
 #define SND_CONFIG_DLSYM_VERSION_HOOK          _dlsym_config_hook_001
 
-/** Configuration node type. */
+/** \brief Configuration node type. */
 typedef enum _snd_config_type {
        /** Integer number. */
         SND_CONFIG_TYPE_INTEGER,
-       /** 64 bit Integer number. */
+       /** 64-bit integer number. */
         SND_CONFIG_TYPE_INTEGER64,
        /** Real number. */
         SND_CONFIG_TYPE_REAL,
@@ -94,6 +94,10 @@ int snd_config_update_r(snd_config_t **top, snd_config_update_t **update, const
 int snd_config_update_free(snd_config_update_t *update);
 int snd_config_update_free_global(void);
 
+int snd_config_update_ref(snd_config_t **top);
+void snd_config_ref(snd_config_t *top);
+void snd_config_unref(snd_config_t *top);
+
 int snd_config_search(snd_config_t *config, const char *key,
                      snd_config_t **result);
 int snd_config_searchv(snd_config_t *config, 
@@ -126,6 +130,7 @@ int snd_config_imake_integer(snd_config_t **config, const char *key, const long
 int snd_config_imake_integer64(snd_config_t **config, const char *key, const long long value);
 int snd_config_imake_real(snd_config_t **config, const char *key, const double value);
 int snd_config_imake_string(snd_config_t **config, const char *key, const char *ascii);
+int snd_config_imake_safe_string(snd_config_t **config, const char *key, const char *ascii);
 int snd_config_imake_pointer(snd_config_t **config, const char *key, const void *ptr);
 
 snd_config_type_t snd_config_get_type(const snd_config_t *config);
@@ -154,11 +159,20 @@ snd_config_t *snd_config_iterator_entry(const snd_config_iterator_t iterator);
 
 /**
  * \brief Helper macro to iterate over the children of a compound node.
- * \param pos Iterator variable for the current node.
- * \param next Iterator variable for the next node.
- * \param node Handle to the compound configuration node to iterate over.
+ * \param[in,out] pos Iterator variable for the current node.
+ * \param[in,out] next Temporary iterator variable for the next node.
+ * \param[in] node Handle to the compound configuration node to iterate over.
+ *
+ * Use this macro like a \c for statement, e.g.:
+ * \code
+ * snd_config_iterator_t pos, next;
+ * snd_config_for_each(pos, next, node) {
+ *     snd_config_t *entry = snd_config_iterator_entry(pos);
+ *     ...
+ * }
+ * \endcode
  *
- * This macro is designed to permit the removal of the current node.
+ * This macro allows deleting or removing the current node.
  */
 #define snd_config_for_each(pos, next, node) \
        for (pos = snd_config_iterator_first(node), next = snd_config_iterator_next(pos); pos != snd_config_iterator_end(node); pos = next, next = snd_config_iterator_next(pos))