-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathrss_utils.h
65 lines (56 loc) · 1.12 KB
/
rss_utils.h
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
/**
* Types of supported RSS Feeds
*/
typedef enum {
RSS2,
ATOM1
} Version;
/**
* Data associated with an RSS Service
*/
typedef struct {
char *name;
char *url;
Version type;
} RssService;
/**
* RSS feed for the School of Computing's weekly
* Bits and Bytes newsletter
*/
static const RssService cseBitsAndBytes = {
"SoC Bits and Bytes",
"https://newsroom.unl.edu/announce/cse/?format=rss",
RSS2
};
/**
* RSS feed for the University of Nebraska-Omaha
*/
static const RssService unlNews = {
"University of Nebraska-Lincoln",
"https://events.unl.edu/upcoming/?format=rss",
ATOM1
};
/**
* An RSS feed of Reddit's front page.
*/
static const RssService reddit = {
"Reddit",
"https://www.reddit.com/.rss",
ATOM1
};
/**
* An RSS feed of Pintrest's front page.
*/
static const RssService pintrest = {
"Pintrest",
"https://newsroom.pinterest.com/en/feed/news.xml",
RSS2
};
/**
* A utility function to parse an XML feed from an RSS feed
*/
void parseRssXml(xmlNode *rootNode);
/**
* A utility function to parse an XML feed from an Atom feed
*/
void parseAtomXml(xmlNode *rootNode);