xref: /haiku/docs/apps/mail/Programming Notes/ChainRunner Overview.txt (revision 1e36cfc2721ef13a187c6f7354dc9cbc485e89d3)
1*1e36cfc2SNiels Sascha ReedijkNathanW wrote on June 30 2003:
2*1e36cfc2SNiels Sascha Reedijk
3*1e36cfc2SNiels Sascha ReedijkHere's the overview:
4*1e36cfc2SNiels Sascha Reedijk
5*1e36cfc2SNiels Sascha ReedijkChainRunner:
6*1e36cfc2SNiels Sascha Reedijk	It's now a BLooper and it goes like this: Running the chain
7*1e36cfc2SNiels Sascha Reedijktriggers an 'INIT' message, which causes it to begin to load add-ons.
8*1e36cfc2SNiels Sascha ReedijkThe constructor of the producer add-on calls ChainRunner's
9*1e36cfc2SNiels Sascha ReedijkGetMessages() routine with a list of unique ids to fetch. It then runs
10*1e36cfc2SNiels Sascha Reedijkthrough the list, passing in those, then calls any registered process
11*1e36cfc2SNiels Sascha Reedijkcallbacks after the list is exhausted. Note that finishing the list *
12*1e36cfc2SNiels Sascha Reedijkdoes not* cause the connection to be terminated and the add-ons to be
13*1e36cfc2SNiels Sascha Reedijkdestructed. Single pass add-ons (e.g. POP and Outbox) register a
14*1e36cfc2SNiels Sascha Reedijkprocess callback that calls ChainRunner::Stop().
15*1e36cfc2SNiels Sascha Reedijk
16*1e36cfc2SNiels Sascha ReedijkMailProtocol/MailFilter:
17*1e36cfc2SNiels Sascha Reedijk	No longer sets the unique id, because it's passed in. Calls
18*1e36cfc2SNiels Sascha ReedijkGetMessages(), and uses ReportProgress() and ShowError() methods of
19*1e36cfc2SNiels Sascha ReedijkChainRunner instead of using the functions in status.h. Also sets SIZE
20*1e36cfc2SNiels Sascha Reedijkattribute in out_headers that contains the final downloaded size of the
21*1e36cfc2SNiels Sascha Reedijkmessage. Also now passed a ChainRunner instead of a StatusView.
22*1e36cfc2SNiels Sascha Reedijk
23*1e36cfc2SNiels Sascha ReedijkThat's about it, really.
24*1e36cfc2SNiels Sascha Reedijk-Nathan
25