~ubuntu-branches/ubuntu/maverick/newsbeuter/maverick

« back to all changes in this revision

Viewing changes to include/rss_parser.h

  • Committer: Bazaar Package Importer
  • Author(s): Nico Golde
  • Date: 2009-04-21 14:06:18 UTC
  • mfrom: (4.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090421140618-osnjk19bgkebyg9h
Tags: 2.0-1
* New upstream release.
  - Remove dependeny on mrss and nxml and add libxml2, newsbeuter
    now comes with its own parser.
  - Remove debian/patches and quilt dependency.
* Bump to policy 3.8.1, no changes needed.
* debian/copyright: adjust years.
* Remove dh_clean -k call as it is deprecated -> dh_prep.
* Change newsbeuter homepage, it now has an official one.
* Fix watch file url, new upstream code location.
* Add bookmark-scuttle.sh to installed contrib files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
#include <string>
5
5
 
6
 
#include <_mrss.h>
7
6
#include <rss.h>
 
7
#include <rsspp.h>
8
8
 
9
9
namespace newsbeuter {
10
10
 
19
19
                        bool check_and_update_lastmodified();
20
20
                private:
21
21
                        void replace_newline_characters(std::string& str);
22
 
                        mrss_options_t * create_mrss_options();
23
22
                        std::string render_xhtml_title(const std::string& title, const std::string& link);
24
23
                        time_t parse_date(const std::string& datestr);
25
24
                        unsigned int monthname_to_number(const std::string& mon);
26
 
                        void set_rtl(std::tr1::shared_ptr<rss_feed>& feed, const char * lang);
 
25
                        void set_rtl(std::tr1::shared_ptr<rss_feed> feed, const char * lang);
27
26
                        int correct_year(int year);
28
27
 
29
28
                        void retrieve_uri(const std::string& uri);
30
29
                        void download_http(const std::string& uri);
31
30
                        void get_execplugin(const std::string& plugin);
32
31
                        void download_filterplugin(const std::string& filter, const std::string& uri);
33
 
 
34
 
                        void check_and_log_error();
35
 
 
36
 
                        void fill_feed_fields(std::tr1::shared_ptr<rss_feed>& feed, const char * encoding);
37
 
                        void fill_feed_items(std::tr1::shared_ptr<rss_feed>& feed, const char * encoding);
38
 
 
39
 
                        void set_item_title(std::tr1::shared_ptr<rss_feed>& feed, std::tr1::shared_ptr<rss_item>& x, mrss_item_t * item, const char * encoding);
40
 
                        void set_item_author(std::tr1::shared_ptr<rss_item>& x, mrss_item_t * item, const char * encoding);
41
 
                        void set_item_content(std::tr1::shared_ptr<rss_item>& x, mrss_item_t * item, const char * encoding);
42
 
                        void set_item_enclosure(std::tr1::shared_ptr<rss_item>& x, mrss_item_t * item);
43
 
                        std::string get_guid(mrss_item_t * item);
44
 
 
45
 
                        void add_item_to_feed(std::tr1::shared_ptr<rss_feed>& feed, std::tr1::shared_ptr<rss_item>& item);
46
 
 
47
 
                        void handle_content_encoded(std::tr1::shared_ptr<rss_item>& x, mrss_item_t * item, const char * encoding);
48
 
                        void handle_atom_content(std::tr1::shared_ptr<rss_item>& x, mrss_item_t * item, const char * encoding);
49
 
                        void handle_itunes_summary(std::tr1::shared_ptr<rss_item>& x, mrss_item_t * item, const char * encoding);
 
32
                        void parse_file(const std::string& file);
 
33
 
 
34
                        void fill_feed_fields(std::tr1::shared_ptr<rss_feed> feed);
 
35
                        void fill_feed_items(std::tr1::shared_ptr<rss_feed> feed);
 
36
 
 
37
                        void set_item_title(std::tr1::shared_ptr<rss_feed> feed, std::tr1::shared_ptr<rss_item> x, rsspp::item& item);
 
38
                        void set_item_author(std::tr1::shared_ptr<rss_item> x, rsspp::item& item);
 
39
                        void set_item_content(std::tr1::shared_ptr<rss_item> x, rsspp::item& item);
 
40
                        void set_item_enclosure(std::tr1::shared_ptr<rss_item> x, rsspp::item& item);
 
41
                        std::string get_guid(rsspp::item& item);
 
42
 
 
43
                        void add_item_to_feed(std::tr1::shared_ptr<rss_feed> feed, std::tr1::shared_ptr<rss_item> item);
 
44
 
 
45
                        void handle_content_encoded(std::tr1::shared_ptr<rss_item> x, rsspp::item& item);
 
46
                        void handle_itunes_summary(std::tr1::shared_ptr<rss_item> x, rsspp::item& item);
 
47
                        bool is_html_type(const std::string& type);
50
48
 
51
49
                        std::string my_uri;
52
50
                        cache * ch;
53
51
                        configcontainer *cfgcont;
54
 
                        mrss_t * mrss;
55
 
                        mrss_error_t err;
56
52
                        bool skip_parsing;
 
53
                        bool is_valid;
57
54
                        rss_ignores * ign;
58
 
                        CURLcode ccode;
 
55
                        rsspp::feed f;
59
56
        };
60
57
 
61
58
}