1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
/*
2002, 2003, 2004, 2005, 2006 Bastien Nocera
Copyright (C) 2003 Colin Walters <walters@verbum.org>
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Bastien Nocera <hadess@hadess.net>
*/
#ifndef TOTEM_PL_PARSER_PRIVATE_H
#define TOTEM_PL_PARSER_PRIVATE_H
#include <glib.h>
#ifndef TOTEM_PL_PARSER_MINI
#include "totem-pl-parser.h"
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <glib-object.h>
#else
#include "totem-pl-parser-mini.h"
#endif /* !TOTEM_PL_PARSER_MINI */
#define MIME_READ_CHUNK_SIZE 1024
#define DEBUG(x) { if (parser->priv->debug) x; }
struct TotemPlParserPrivate
{
GList *ignore_schemes;
GList *ignore_mimetypes;
#ifndef TOTEM_PL_PARSER_MINI
GParamSpecPool *pspec_pool;
#endif
guint recurse_level;
guint fallback : 1;
guint recurse : 1;
guint debug : 1;
guint force : 1;
guint disable_unsafe : 1;
};
char *totem_pl_parser_read_ini_line_string (char **lines, const char *key,
gboolean dos_mode);
int totem_pl_parser_read_ini_line_int (char **lines, const char *key);
char *totem_pl_parser_read_ini_line_string_with_sep (char **lines, const char *key,
gboolean dos_mode, const char *sep);
char *totem_pl_resolve_url (const char *base, const char *url);
char *totem_pl_parser_base_url (const char *url);
#ifndef TOTEM_PL_PARSER_MINI
void totem_pl_parser_playlist_start (TotemPlParser *parser,
const char *playlist_title);
void totem_pl_parser_playlist_end (TotemPlParser *parser,
const char *playlist_title);
int totem_pl_parser_num_entries (TotemPlParser *parser,
GtkTreeModel *model,
TotemPlParserIterFunc func,
gpointer user_data);
gboolean totem_pl_parser_scheme_is_ignored (TotemPlParser *parser,
const char *url);
gboolean totem_pl_parser_line_is_empty (const char *line);
gboolean totem_pl_parser_write_string (GnomeVFSHandle *handle,
const char *buf,
GError **error);
char * totem_pl_parser_relative (const char *url,
const char *output);
xmlDocPtr totem_pl_parser_parse_xml_file (const char *url);
TotemPlParserResult totem_pl_parser_parse_internal (TotemPlParser *parser,
const char *url,
const char *base);
void totem_pl_parser_add_one_url (TotemPlParser *parser,
const char *url,
const char *title);
void totem_pl_parser_add_url (TotemPlParser *parser,
const char *first_property_name,
...);
gboolean totem_pl_parser_ignore (TotemPlParser *parser, const char *url);
#endif /* !TOTEM_PL_PARSER_MINI */
G_END_DECLS
#endif /* TOTEM_PL_PARSER_PRIVATE_H */
|