Logo Search packages:      
Sourcecode: pan version File versions

void TaskPost::on_nntp_done ( NNTP nntp,
Health  health,
const StringView response 
) [private, virtual]

Called at the end of an NNTP command. If the command was one that produced a list, on_nntp_line() may have been called before this.

When this is called, the listener can safely clean up anything associated with processing the command.

Parameters:
health if OK, the command was successful. if RETRY, the command couldn't be processed now but might be successful later -- perhaps there was a bad connection. if FAIL, there's no point in retrying -- perhaps the article has expired.

Reimplemented from pan::NNTP::Listener.

Definition at line 65 of file task-post.cc.

References pan::OK, pan::RETRY, pan::Task::State::set_completed(), pan::Task::State::set_health(), and pan::Task::State::set_need_nntp().

{
  _state.set_health (health);
  if (health == RETRY) 
    _state.set_need_nntp (_server);
  else {
    _state.set_completed ();
    set_error (response);
    set_finished (health);
  }

  check_in (nntp, health==OK);
}


Generated by  Doxygen 1.6.0   Back to index