pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pan-users] Doxygen version of the "current" pan2 sources


From: Charles Kerr
Subject: Re: [Pan-users] Doxygen version of the "current" pan2 sources
Date: Wed, 01 Nov 2006 12:34:44 -0600
User-agent: Thunderbird 1.5.0.7 (X11/20061027)

Guilhem Bonnefille wrote:

But, source comments are not enougth to understand easily an
application. I think a sort of developper manual would be great. The
need is some information to "enter" easily in the code. For example,
something describing (in a hight level) what occurs when a new
download starts?

look for "new TaskArticle" in pan/gui/*cc ... they are created
by the save dialog, and also in gui.cc in response to action.cc's
"read-selected-article" and "download-selected-article" actions.
Also in tasks/nzb.cc when reading an nzb file.

The tasks are added to the queue, which then owns the task and
is responsible for disposing of it when it's completed, or when
the user presses the task window's delete button.

> How a server is elected for a task?

The queue selects a server in Queue::find_best_server(),
which looks for idle connections or, barring that,
servers that haven't reached their connection limit yet.

TaskArticle is responsible for giving Queue a list of
servers that it can use, and that's what find_best_server()
picks from.  So TaskArticle is there the primary/secondary
server code plays out.

> Where goes a waiting task?
> And a working one? An erroneous one?...

They're all stored in Queue::_tasks.

One solution for such documentation could be a (the) wiki.
> Organized as a devel FAQ.

That's a good idea.  If you want to work on this,
I'd be happy to answer questions.

cheers,
Charles




reply via email to

[Prev in Thread] Current Thread [Next in Thread]