Initial submission of GUPnP-AV to Tizen IVI
[profile/ivi/GUPnP-AV.git] / libgupnp-av / gupnp-didl-lite-parser.h
1 /*
2  * Copyright (C) 2007 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
3  *
4  * Authors: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21
22 #ifndef __GUPNP_DIDL_LITE_PARSER_H__
23 #define __GUPNP_DIDL_LITE_PARSER_H__
24
25 #include <libgupnp/gupnp.h>
26 #include "gupnp-didl-lite-container.h"
27 #include "gupnp-didl-lite-item.h"
28
29 G_BEGIN_DECLS
30
31 GType
32 gupnp_didl_lite_parser_get_type (void) G_GNUC_CONST;
33
34 #define GUPNP_TYPE_DIDL_LITE_PARSER \
35                 (gupnp_didl_lite_parser_get_type ())
36 #define GUPNP_DIDL_LITE_PARSER(obj) \
37                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
38                  GUPNP_TYPE_DIDL_LITE_PARSER, \
39                  GUPnPDIDLLiteParser))
40 #define GUPNP_DIDL_LITE_PARSER_CLASS(obj) \
41                 (G_TYPE_CHECK_CLASS_CAST ((obj), \
42                  GUPNP_TYPE_DIDL_LITE_PARSER, \
43                  GUPnPDIDLLiteParserClass))
44 #define GUPNP_IS_DIDL_LITE_PARSER(obj) \
45                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
46                  GUPNP_TYPE_DIDL_LITE_PARSER))
47 #define GUPNP_IS_DIDL_LITE_PARSER_CLASS(obj) \
48                 (G_TYPE_CHECK_CLASS_TYPE ((obj), \
49                  GUPNP_TYPE_DIDL_LITE_PARSER))
50 #define GUPNP_DIDL_LITE_PARSER_GET_CLASS(obj) \
51                 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
52                  GUPNP_TYPE_DIDL_LITE_PARSER, \
53                  GUPnPDIDLLiteParserClass))
54
55 typedef struct {
56         GObject parent;
57
58         gpointer gupnp_reserved;
59 } GUPnPDIDLLiteParser;
60
61 typedef struct {
62         GObjectClass parent_class;
63
64         /* signals */
65         void (* object_available)    (GUPnPDIDLLiteParser    *parser,
66                                       GUPnPDIDLLiteObject    *object);
67         void (* item_available)      (GUPnPDIDLLiteParser    *parser,
68                                       GUPnPDIDLLiteItem      *item);
69         void (* container_available) (GUPnPDIDLLiteParser    *parser,
70                                       GUPnPDIDLLiteContainer *container);
71
72         /* future padding */
73         void (* _gupnp_reserved1) (void);
74         void (* _gupnp_reserved2) (void);
75         void (* _gupnp_reserved3) (void);
76         void (* _gupnp_reserved4) (void);
77         void (* _gupnp_reserved5) (void);
78 } GUPnPDIDLLiteParserClass;
79
80 GUPnPDIDLLiteParser *
81 gupnp_didl_lite_parser_new              (void);
82
83 gboolean
84 gupnp_didl_lite_parser_parse_didl       (GUPnPDIDLLiteParser *parser,
85                                          const char          *didl,
86                                          GError             **error);
87
88 G_END_DECLS
89
90 #endif /* __GUPNP_DIDL_LITE_PARSER_H__ */