Added wireless_link_qual_perc. Cleaned unused variables from wireless code. Updated...
[monky] / src / prss.h
1 /*
2  * Copyright (c) 2007 Mikko Sysikaski <mikko.sysikaski@gmail.com>
3  *                    Toni Spets <toni.spets@gmail.com>
4  *
5  * Permission to use, copy, modify, and distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
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         xmlDocPtr _data;
34         char* version;
35         
36         char* title;
37         char* link;
38         char* description;
39         char* language;
40         char* generator;
41         char* managingeditor;
42         char* webmaster;
43         char* docs;
44         char* lastbuilddate;
45         char* pubdate;
46         char* copyright;
47         char* ttl;
48
49         PRSS_Item* items;
50         int item_count;
51 } PRSS;
52
53 /* Functions for parsing RSS-data */
54 PRSS* prss_parse_data(const char *xml_data);
55 PRSS* prss_parse_file(const char *xml_file);
56
57 // Works wrong currently when called from application!
58 //PRSS* prss_parse_doc(xmlDocPtr doc);
59
60 /* Frees the PRSS-stucture returned by prss_parse_*.
61  * The memory area pointed by data becomes invalid
62  * after call to this function. */
63 void prss_free(PRSS* data);
64
65 #endif  // PRSS_H