Logo Search packages:      
Sourcecode: pan version File versions  Download package

pan::Data Class Reference
[Backend Interfaces]

#include <data.h>

Inheritance diagram for pan::Data:

pan::ServerInfo pan::GroupServer pan::ArticleRead pan::Profiles pan::DataImpl

List of all members.

Detailed Description

The main interface class for Pan's data backend.

It's intended to decouple the higher tasks/gui code from the backend so that we can swap in a database backend or otherwise tinker with the implementation structures without having ripple effects into the rest of Pan.

FIXME: doesn't address manual deletion of servers, groups FIXME: doesn't address folders FIXME: renaming a server is so onerous I'm inclined to not implement it.

Definition at line 153 of file data.h.

Public Types

typedef std::set< const Article * > unique_articles_t

Public Member Functions

virtual void add_groups (const Quark &servername, const NewGroup *new_groups, size_t new_group_count)=0
void add_listener (Listener *l)
virtual Quark add_new_server ()=0
virtual void add_profile (const std::string &profile_name, const Profile &profile)=0
virtual void add_score (const StringView &section_wildmat, int score_value, bool score_assign_flag, int lifespan_days, bool all_items_must_be_true, const Scorefile::AddItem *items, size_t item_count, bool do_rescore)=0
virtual void comment_out_scorefile_line (const StringView &filename, size_t begin_line, size_t end_line, bool do_rescore)=0
virtual void delete_articles (const unique_articles_t &)=0
virtual void delete_profile (const std::string &profile_name)=0
virtual void delete_server (const Quark &server)=0
virtual void get_article_references (const Quark &group, const Article *, std::string &setme) const =0
virtual void get_article_scores (const Quark &group, const Article &, Scorefile::items_t &setme) const =0
virtual const ArticleCacheget_cache () const =0
virtual ArticleCacheget_cache ()=0
virtual void get_group_counts (const Quark &group, unsigned long &setme_unread, unsigned long &setme_total) const =0
virtual const std::string & get_group_description (const Quark &group) const =0
virtual char get_group_permission (const Quark &group) const =0
virtual void get_other_groups (std::vector< Quark > &) const =0
virtual bool get_profile (const std::string &profile_name, Profile &setme) const =0
virtual std::set< std::string > get_profile_names () const =0
virtual bool get_server_addr (const Quark &server, std::string &setme_address, int &setme_port) const =0
virtual std::string get_server_address (const Quark &servername) const =0
virtual int get_server_article_expiration_age (const Quark &server) const =0
virtual bool get_server_auth (const Quark &server, std::string &setme_username, std::string &setme_password) const =0
virtual int get_server_limits (const Quark &server) const =0
virtual int get_server_rank (const Quark &server) const =0
virtual quarks_t get_servers () const =0
virtual void get_subscribed_groups (std::vector< Quark > &) const =0
virtual unsigned long get_xover_high (const Quark &group, const Quark &server) const =0
virtual void group_clear_articles (const Quark &group)=0
virtual ArticleTreegroup_get_articles (const Quark &group, const ShowType show_type=SHOW_ARTICLES, const FilterInfo *criteria=0) const =0
virtual void group_get_servers (const Quark &group, quarks_t &) const =0
virtual bool has_from_header (const StringView &from) const =0
virtual bool has_profiles () const =0
virtual bool is_read (const Article *a) const =0
virtual void mark_group_read (const Quark &group)=0
virtual void mark_read (const Article **articles, unsigned long article_count, bool read=true)=0
virtual void mark_read (const Article &, bool read=true)=0
void remove_listener (Listener *l)
virtual void rescore ()=0
virtual void save_state ()=0
virtual void server_get_groups (const Quark &server, quarks_t &) const =0
virtual void set_group_subscribed (const Quark &group, bool sub)=0
virtual void set_server_addr (const Quark &server, const StringView &address, const int port)=0
virtual void set_server_article_expiration_age (const Quark &server, int days)=0
virtual void set_server_auth (const Quark &server, const StringView &username, const StringView &password)=0
virtual void set_server_limits (const Quark &server, int max_connections)=0
virtual void set_server_rank (const Quark &server, int rank)=0
virtual void set_xover_high (const Quark &group, const Quark &server, const unsigned long high)=0
virtual void set_xover_low (const Quark &group, const Quark &server, const unsigned long low)=0
virtual const Articlexover_add (const Quark &server, const Quark &group, const StringView &subject, const StringView &author, const time_t time, const StringView &message_id, const StringView &references, const unsigned long byte_count, const unsigned long line_count, const StringView &xref)=0
virtual void xover_ref (const Quark &group)=0
virtual void xover_unref (const Quark &group)=0

Protected Member Functions

void fire_group_counts (const Quark &, unsigned long unread, unsigned long total)
void fire_group_read (const Quark &)
void fire_group_subscribe (const Quark &, bool)
void fire_grouplist_rebuilt ()

Private Types

typedef std::set< Listener * > listeners_t

Private Attributes

listeners_t _listeners


class  ArticleTree
struct  Listener
struct  NewGroup

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index