* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * @author     Jan Kuchař
 * @copyright  Copyright (c) 2009 Jan Kuchař (http://mujserver.net)
 * @license    New BSD License
 * @link       http://filedownloader.projekty.mujserver.net
 * @version    $Id$
 */
define("APP_DIR", dirname(__FILE__));
require_once "../load.php";
use FileDownloader\FDTools;
use FileDownloader\FileDownload;
/* Interface with getters and setters */
$file = new FileDownload();
$file->sourceFile = "source.txt";
$file->speedLimit = 5 * FDTools::BYTE;
//$file->transferFileName = "test.txt";
//$file->mimeType = "plain/text";
// Callbacks
//$file->onBeforeDownloaderStarts[]   = "onBeforeDownloaderStarts";
//$file->onBeforeOutputStarts[]       = "onBeforeOutputStarts";
//$file->onStatusChange[]             = "onStatusChange";
//$file->onComplete[]                 = "onComplete";
//$file->onConnectionLost[]           = "onConnectionLost";
//$file->onAbort[]                    = "onAbort";
//$file->onTransferContinue[]         = "onTransferContinue";
//$file->onNewTransferStart[]         = "onNewTransferStart";
// Start download
$file->download();