1 /* 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 #include <string> 23 24 typedef struct PRSS_Item_ { 25 char *title; 26 char *link; 27 char *description; 28 char *category; 29 char *pubDate; 30 char *guid; 31 } PRSS_Item; 32 33 class PRSS { 34 public: 35 char *version; 36 37 char *title; 38 char *link; 39 char *description; 40 char *language; 41 char *generator; 42 char *managingEditor; 43 char *webMaster; 44 char *docs; 45 char *lastBuildDate; 46 char *pubDate; 47 char *copyright; 48 char *ttl; 49 50 PRSS_Item *items; 51 int item_count; 52 53 explicit PRSS(const std::string &xml_data); 54 ~PRSS(); 55 }; 56 57 #endif /* PRSS_H */ 58