fotaapplication/fotaserver/src/FotaDlClient.cpp
changeset 73 ae69c2e8bc34
parent 51 2e64dc50f295
equal deleted inserted replaced
71:d2517372cc44 73:ae69c2e8bc34
    65     {
    65     {
    66     FLOG(_L("DownloadClient::CreateDownload >>"));
    66     FLOG(_L("DownloadClient::CreateDownload >>"));
    67 
    67 
    68     TInt ret = ENotOk;
    68     TInt ret = ENotOk;
    69 
    69 
    70     iDownload = iFotaDlMgrClient->Manager()->createDownload(url, type); //Step 6
    70     iDownload = iFotaDlMgrClient->Manager()->createDownload(url, type);
    71 
    71 
    72     if (iDownload)
    72     if (iDownload)
    73         {
    73         {
    74         connect(iDownload, SIGNAL(downloadEvent(DownloadEvent *)), this,
    74         connect(iDownload, SIGNAL(downloadEvent(DownloadEvent *)), this,
    75                 SLOT(DownloadEventRecieved(DownloadEvent *)));
    75                 SLOT(DownloadEventRecieved(DownloadEvent *)));
    91     {
    91     {
    92     FLOG(_L("DownloadClient::SetDownloadAttributes >>"));
    92     FLOG(_L("DownloadClient::SetDownloadAttributes >>"));
    93 
    93 
    94     int ret(EOk);
    94     int ret(EOk);
    95 
    95 
    96     iDownload->setAttribute(ProgressInterval, 100); //Step 7
    96     iDownload->setAttribute(ProgressInterval, 100);
    97     iDownload->setAttribute(Priority, High); //Step 8
    97     iDownload->setAttribute(Priority, High);
    98 
    98 
    99     //Setting the default path
    99     //Setting the default path
   100     iDownload->setAttribute(DestinationPath, DefaultPath);
   100     iDownload->setAttribute(DestinationPath, DefaultPath);
   101 
   101 
   102     iDownload->setAttribute(FileName, PackageName);
   102     iDownload->setAttribute(FileName, PackageName);
   112 TInt DownloadClient::Start()
   112 TInt DownloadClient::Start()
   113     {
   113     {
   114     FLOG(_L("DownloadClient::Start >>"));
   114     FLOG(_L("DownloadClient::Start >>"));
   115 
   115 
   116     iClientinterrupted = false;
   116     iClientinterrupted = false;
   117     iDownload->start(); //Step 9
   117     iDownload->start();
   118 
   118 
   119     FLOG(_L("DownloadClient::Start <<"));
   119     FLOG(_L("DownloadClient::Start <<"));
   120     return EOk;
   120     return EOk;
   121 
   121 
   122     }
   122     }