utilities/downloadmanager/inc/downloadcoremanager.h
changeset 16 3c88a81ff781
equal deleted inserted replaced
14:6aeb7a756187 16:3c88a81ff781
       
     1 /**
       
     2    This file is part of CWRT package **
       
     3 
       
     4    Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). **
       
     5 
       
     6    This program is free software: you can redistribute it and/or modify
       
     7    it under the terms of the GNU (Lesser) General Public License as 
       
     8    published by the Free Software Foundation, version 2.1 of the License. 
       
     9    This program is distributed in the hope that it will be useful, but
       
    10    WITHOUT ANY WARRANTY; without even the implied warranty of 
       
    11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
       
    12    (Lesser) General Public License for more details. You should have 
       
    13    received a copy of the GNU (Lesser) General Public License along 
       
    14    with this program. If not, see <http://www.gnu.org/licenses/>.
       
    15 */
       
    16 
       
    17 #ifndef DOWNLOAD_CORE_MANAGER_H_
       
    18 #define DOWNLOAD_CORE_MANAGER_H_
       
    19 
       
    20 #include <QObject>
       
    21 #include "dmpimpl.h"
       
    22 
       
    23 // forward declarations
       
    24 class DownloadCore;
       
    25 class DownloadCoreManagerPrivate;  
       
    26 class QNetworkReply;
       
    27 
       
    28 // class declaration
       
    29 class  DownloadCoreManager : public QObject
       
    30 {
       
    31     Q_OBJECT
       
    32     DM_DECLARE_PRIVATE(DownloadCoreManager); // private implementation
       
    33 
       
    34 public:
       
    35     DownloadCoreManager(const QString& clientName);
       
    36     virtual ~DownloadCoreManager();
       
    37 
       
    38 private: // copy constructor and assaignment operator
       
    39       DownloadCoreManager(const DownloadCoreManager &);
       
    40       DownloadCoreManager &operator=(const DownloadCoreManager &);
       
    41 
       
    42 public:
       
    43     // DownloadCore creation using url
       
    44     DownloadCore* createDownloadCore(const QString &url);
       
    45     // Download creation using network reply
       
    46     DownloadCore* createDownloadCore(QNetworkReply *reply);
       
    47     // retuns the client name
       
    48     QString& clientName(); 
       
    49 };
       
    50 
       
    51 #endif /*DOWNLOAD_CORE_MANAGER_H_*/