Permalink
Browse files

merge with lostcoder/testing done. no errors so far...

  • Loading branch information...
1 parent 5f0daae commit 0855ee28122c2b615834a1b24b0f7a5bfa3ff7f8 Heinrich Müller committed Jun 23, 2011
Showing with 18 additions and 20 deletions.
  1. +0 −2 pan/gui/gui.cc
  2. +1 −1 pan/gui/post-ui.cc
  3. +2 −2 pan/tasks/encoder.cc
  4. +2 −2 pan/tasks/encoder.h
  5. +7 −7 pan/tasks/nzb.cc
  6. +1 −1 pan/tasks/nzb.h
  7. +1 −1 pan/tasks/task-upload.cc
  8. +4 −4 pan/tasks/task-upload.h
View
@@ -614,8 +614,6 @@ namespace
SaveArticlesFromNZB (Data& d, Queue& q, GtkWidget *r, Prefs& p,
ArticleCache& c, EncodeCache& ec, const Article& a, const std::string& path):
_data(d), _queue(q), _root(r), _prefs(p), _cache(c), _encode_cache(ec), _article(a), _path(path) {}
- _data(d), _queue(q), _root(r), _prefs(p), _cache(c), _article(a),
- _path(path) {}
static void foreach_part_cb (GMimeObject */*parent*/, GMimeObject *o, gpointer self)
{
View
@@ -2818,7 +2818,7 @@ PostUI :: prompt_user_for_queueable_files (GtkWindow * parent, const Prefs& pref
for (; cur; cur = cur->next)
{
- Article a;
+ ArticleNZB a;
a.subject = subject;
a.author = author;
stat ((const char*)cur->data,&sb);
@@ -87,7 +87,7 @@ Encoder :: ~Encoder()
void
Encoder :: enqueue (TaskUpload * task,
EncodeCache * cache,
- Article * article,
+ ArticleNZB * article,
std::string & filename,
std::string & basename,
std::string & groups,
@@ -154,7 +154,7 @@ Encoder :: do_work()
PartBatch batch;
batch.init(StringView(basename), needed->size(), 0);
int cnt(1);
- Article* tmp = article;
+ ArticleNZB* tmp = article;
/* build real subject line */
g_snprintf(buf, sizeof(buf), "\"%s\" - %s (/%03d)", basename.c_str(), subject.c_str(), (int)needed->size());
View
@@ -63,7 +63,7 @@ namespace pan
void enqueue (TaskUpload * task,
EncodeCache * cache,
- Article * article,
+ ArticleNZB * article,
std::string & filename,
std::string & basename,
std::string & groups,
@@ -96,7 +96,7 @@ namespace pan
EncodeCache * cache;
TaskUpload::needed_t * needed;
std::string global_mid;
- Article * article;
+ ArticleNZB * article;
MTRand mtrand;
void generate_unique_id (StringView& mid, int cnt, std::string& s);
View
@@ -300,7 +300,7 @@ NZB :: nzb_to_xml (std::ostream & out,
if (task->get_save_path().empty()) // this task is for reading, not saving...
continue;
- const Article& a (task->get_article());
+ const ArticleNZB& a (task->get_article());
out << indent(depth++)
<< "<file" << " poster=\"";
escaped (out, a.get_author().to_view());
@@ -354,7 +354,7 @@ NZB :: nzb_to_xml (std::ostream & out,
// not an upload task, move on
if (!task) continue;
- const Article& a (task->get_article());
+ const ArticleNZB& a (task->get_article());
//info: author, subject, load path, parts to encode / post
out << indent(depth)
@@ -408,14 +408,14 @@ NZB :: nzb_to_xml (std::ostream & out,
/* Saves upload_list to XML file for distribution */
std::ostream&
NZB :: upload_list_to_xml_file (std::ostream& out,
- const std::vector<Article*> & tasks)
+ const std::vector<ArticleNZB*> & tasks)
{
int depth (0);
- foreach_const (std::vector<Article*>, tasks, it)
+ foreach_const (std::vector<ArticleNZB*>, tasks, it)
{
- Article * task (dynamic_cast<Article*>(*it));
- const Article& a (*task);
+ ArticleNZB * task (dynamic_cast<ArticleNZB*>(*it));
+ const ArticleNZB& a (*task);
out << indent(depth++)
<< "<file" << " poster=\"";
@@ -476,7 +476,7 @@ NZB :: nzb_to_xml_file (std::ostream & out,
if (!task) // not a download task, for example an upload task...
continue;
- const Article& a (task->get_article());
+ const ArticleNZB& a (task->get_article());
out << indent(depth++)
<< "<file" << " poster=\"";
escaped (out, a.get_author().to_view());
View
@@ -57,7 +57,7 @@ namespace pan
const std::vector<Task*> & tasks);
static std::ostream& upload_list_to_xml_file (std::ostream& out,
- const std::vector<Article*> & tasks);
+ const std::vector<ArticleNZB*> & tasks);
static std::ostream& nzb_to_xml_file (std::ostream & out,
const std::vector<Task*> & tasks);
@@ -89,7 +89,7 @@ TaskUpload :: get_domain(const StringView& mid)
TaskUpload :: TaskUpload (const std::string & filename,
const Quark & server,
EncodeCache & cache,
- Article article,
+ ArticleNZB article,
UploadInfo format,
needed_t & imported,
Progress::Listener * listener,
@@ -57,7 +57,7 @@ namespace pan
int lpf;
};
- const Article& get_article () { return _article; }
+ const ArticleNZB& get_article () { return _article; }
typedef std::vector<Quark> mid_sequence_t;
@@ -85,7 +85,7 @@ namespace pan
TaskUpload ( const std::string & filename,
const Quark & server,
EncodeCache & cache,
- Article article,
+ ArticleNZB article,
UploadInfo format,
needed_t & imported,
Progress::Listener * listener= 0,
@@ -139,10 +139,10 @@ namespace pan
unsigned long _bytes;
EncodeCache& _cache;
std::deque<Log::Entry> _logfile; // for intermediate updates
- Article _article;
+ ArticleNZB _article;
std::string _domain;
unsigned long _all_bytes;
- std::vector<Article*> _upload_list;
+ std::vector<ArticleNZB*> _upload_list;
std::string _save_file;
Article::mid_sequence_t _mids;
int _queue_pos;

0 comments on commit 0855ee2

Please sign in to comment.