/*!
@page Transfers OWBAL Tranfers

<div class="header">
<center>\< @ref PrevReference | @ref OrigynWebBrowser | @ref NextReference \></center>
<hr>
</div>

Presentation of BAL module.

@section Overview Overview

This page details how transfers are handled. 

@section Topics Topics

Detailed description of specific module.

- @subpage TransferJobManager How the Transfer Job Manager works.
- @subpage TransferJobClient How to receive data

*/

//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////

/*!
@page TransferJobManager

<center>\< @ref PrevReference | @ref OrigynWebBrowser | @ref NextReference \></center>
<hr>

@section Principles Principles

The first object to know is the transfer job manager. It's the manager that allows to tranfer.
To start a transfer, you have to create a TransferJob, and add it to the manager. That's all!

If you want to start many transfers, you create as many jobs as you want and add it when you want. Manager
deals with all the transfers concurrently.

The following code realizes a transfer :
@verbatim
BITransferJobManager* aTransferJobManager = getBCTransferJobManager();
  
BITransferJob* aTransferJob = createBCTransferJob(&aTestTransferJobClient,
       WebCore::String( "GET" ), "http://mysite/the_url_i_want.html" );

aTransferJobManager->add( aTJ );
@endverbatim

See BAL::BITransferJobManager to have more details about the transfer job manager.

See also BAL::BITransferJob to know more about a transfer job.

To receive data and manage them, you have to implement your own @ref TransferJobClient.
*/

/*!
@page TransferJobClient

<center>\< @ref PrevReference | @ref OrigynWebBrowser | @ref NextReference \></center>
<hr>

@section Introduction Introduction

A transfer job client is the client to receive data. It is a class that inherits from
BAL::BITransferJobClient.

For example, to receive data from a transfer, you write your code in the method receivedData. You will be
called many times, with a bit of data each time. At the end of the transfer, receivedAllData is called.

Here is an example of a client:
@verbatim
class MyTransferJobClient : public BITransferJobClient
{
public:
  virtual ~TestTransferJobClient() { }
  virtual void receivedRedirect(BITransferJob*, const KURL&) {};
  virtual void receivedResponse(BITransferJob*, PlatformResponse) {};
  virtual void receivedData(BITransferJob*, const char*, int aSize)
  {
    // write your code here to deal with received data
  }
        
  virtual void receivedAllData(BITransferJob*)
  {
    // this method is called when all data have been received
  }
        
  virtual void receivedAllData(BITransferJob*, PlatformData)  {}
};
  
@endverbatim

*/
