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

Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | Friends

pan::TaskArticle Class Reference
[Tasks]

#include <task-article.h>

Inheritance diagram for pan::TaskArticle:
Inheritance graph
[legend]
Collaboration diagram for pan::TaskArticle:
Collaboration graph
[legend]

List of all members.

Classes

struct  Needed

Public Types

enum  SaveMode { NONE = 0, DECODE = (1<<0), RAW = (1<<1) }
enum  Work { COMPLETED, NEED_NNTP, NEED_DECODER, WORKING }

Public Member Functions

void add_listener (Listener *)
void add_steps (int steps)
virtual std::string describe () const
const Articleget_article () const
unsigned long get_bytes_remaining () const
int get_progress_of_100 () const
const Quarkget_save_path () const
const Stateget_state () const
std::string get_status () const
time_t get_time_posted () const
const Quarkget_type () const
void give_decoder (DecoderSource *, Decoder *)
void give_nntp (NNTP::Source *, NNTP *nntp)
void increment_step (int increment=1)
void init_steps (int steps)
void pulse ()
void remove_listener (Listener *)
void set_error (const StringView &error)
void set_finished (int status)
void set_status (const StringView &status)
void set_status_va (const char *fmt,...)
void set_step (int step)
void stop ()
 stop a running task
 TaskArticle (const ServerRank &server_rank, const GroupServer &group_server, const Article &article, ArticleCache &cache, ArticleRead &read, Progress::Listener *l=0, SaveMode save_mode=NONE, const Quark &save_path=Quark())
virtual void use_decoder (Decoder *)

Protected Member Functions

void check_in (NNTP *, Health)
void check_in (Decoder *)
int get_nntp_count () const

Protected Attributes

bool _active
const Article _article
ArticleCache_cache
std::string _description
int _done
std::vector< std::string > _errors
ArticleRead_read
const Quark _save_path
const ServerRank_server_rank
quarks_t _servers
State _state
std::string _status_text
int _step
int _steps
const time_t _time_posted

Private Types

typedef std::vector< Neededneeded_t

Private Member Functions

virtual void on_nntp_done (NNTP *, Health, const StringView &)
virtual void on_nntp_done (NNTP *nntp UNUSED, Health health UNUSED, const StringView &response UNUSED)
virtual void on_nntp_group (NNTP *nntp UNUSED, const Quark &group UNUSED, unsigned long estimated_qty UNUSED, unsigned long low UNUSED, unsigned long high UNUSED)
virtual void on_nntp_line (NNTP *, const StringView &)
virtual void on_nntp_line (NNTP *nntp UNUSED, const StringView &line UNUSED)
void on_worker_done (bool cancelled)
void update_work (NNTP *checkin_pending=0)
virtual void use_nntp (NNTP *nntp)

Private Attributes

Decoder_decoder
bool _decoder_has_run
needed_t _needed
const SaveMode _save_mode

Friends

class Decoder

Detailed Description

Task for downloading, and optionally decoding, articles

Definition at line 43 of file task-article.h.


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

Generated by  Doxygen 1.6.0   Back to index