Allow method to pass execgraph arguments containing spaces.
[monky] / src / prss.h
1 /* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
2  *
3  * Copyright (c) 2007 Mikko Sysikaski <mikko.sysikaski@gmail.com>
4  *                                        Toni Spets <toni.spets@gmail.com>
5  *
6  * Permission to use, copy, modify, and distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
17
18 #ifndef PRSS_H
19 #define PRSS_H
20
21 #include <libxml/parser.h>
22
23 typedef struct PRSS_Item_ {
24         char *title;
25         char *link;
26         char *description;
27         char *category;
28         char *pubDate;
29         char *guid;
30 } PRSS_Item;
31
32 typedef struct PRSS_ {
33         char *version;
34
35         char *title;
36         char *link;
37         char *description;
38         char *language;
39         char *generator;
40         char *managingEditor;
41         char *webMaster;
42         char *docs;
43         char *lastBuildDate;
44         char *pubDate;
45         char *copyright;
46         char *ttl;
47
48         PRSS_Item *items;
49         int item_count;
50 } PRSS;
51
52 /* Functions for parsing RSS-data */
53 void prss_parse_data(void *result, const char *xml_data);
54
55 /* // Works wrong currently when called from application!
56 PRSS *prss_parse_doc(xmlDocPtr doc); */
57
58 /* Frees the PRSS-stucture returned by prss_parse_*.
59  * The memory area pointed by data becomes invalid
60  * after call to this function. */
61 void prss_free(PRSS *data);
62
63 #endif /* PRSS_H */