summaryrefslogtreecommitdiffstats
path: root/playtreeparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'playtreeparser.h')
-rw-r--r--playtreeparser.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/playtreeparser.h b/playtreeparser.h
index b43f1c23fa..f038ea332c 100644
--- a/playtreeparser.h
+++ b/playtreeparser.h
@@ -1,4 +1,13 @@
+/// \defgroup PlaytreeParser Playtree parser
+/// \ingroup Playtree
+///
+/// The playtree parser allow to read various playlist formats. It read from
+/// stream allowing to handle playlist from local files and the network.
+///@{
+
+/// \file
+
#ifndef __PLAYTREEPARSER_H
#define __PLAYTREEPARSER_H
@@ -11,17 +20,33 @@ typedef struct play_tree_parser {
int deep,keep;
} play_tree_parser_t;
-
+/// Create a new parser.
+/** \param stream The stream to read from.
+ * \param deep Parser depth. Some format allow including other files,
+ * this is used to track the inclusion depth.
+ * \return The new parser.
+ */
play_tree_parser_t*
play_tree_parser_new(struct stream_st* stream,int deep);
+/// Destroy a parser.
void
play_tree_parser_free(play_tree_parser_t* p);
+/// Build a playtree from the playlist opened with the parser.
+/** \param p The parser.
+ * \param forced If non-zero the playlist file was explicitly
+ * given by the user, allow falling back on
+ * one filename per line playlist.
+ * \return A new playtree or NULL on error.
+ */
play_tree_t*
play_tree_parser_get_play_tree(play_tree_parser_t* p, int forced);
+/// Wrapper for play_tree_add_basepath (add base path from file).
void
play_tree_add_bpf(play_tree_t* pt, char* filename);
#endif
+
+///@}