ginebra2/Downloads.h
changeset 5 0f2326c2a325
parent 0 1450b09d0cfd
child 6 1c3b8676e58c
equal deleted inserted replaced
1:b0dd75e285d2 5:0f2326c2a325
     1 /*
     1 /*
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
     4 *
     9 * Initial Contributors:
     5 * This program is free software: you can redistribute it and/or modify
    10 * Nokia Corporation - initial contribution.
     6 * it under the terms of the GNU Lesser General Public License as published by
       
     7 * the Free Software Foundation, version 2.1 of the License.
    11 *
     8 *
    12 * Contributors:
     9 * This program is distributed in the hope that it will be useful,
       
    10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    12 * GNU Lesser General Public License for more details.
    13 *
    13 *
    14 * Description: 
    14 * You should have received a copy of the GNU Lesser General Public License
       
    15 * along with this program.  If not,
       
    16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
       
    17 *
       
    18 * Description:
    15 *
    19 *
    16 */
    20 */
    17 
       
    18 
    21 
    19 #ifndef __DOWNLOADS_H__
    22 #ifndef __DOWNLOADS_H__
    20 #define __DOWNLOADS_H__
    23 #define __DOWNLOADS_H__
    21 
    24 
    22 #include <QObject>
    25 #include <QObject>
    23 
    26 
       
    27 class QUrl;
    24 class QWebPage;
    28 class QWebPage;
    25 
    29 
    26 class DownloadController;
    30 class DownloadController;
    27 class Download;
    31 class Download;
    28 
    32 
    36     Downloads();
    40     Downloads();
    37     virtual ~Downloads();
    41     virtual ~Downloads();
    38 
    42 
    39     void handlePage(QWebPage * page);
    43     void handlePage(QWebPage * page);
    40 
    44 
       
    45 public slots:
       
    46     void downloadImage(const QString & imageUrl);
       
    47 
    41 private slots:
    48 private slots:
       
    49 #ifdef USE_DOWNLOAD_MANAGER
    42     void reportDownloadCreated(Download * download);
    50     void reportDownloadCreated(Download * download);
    43     void reportDownloadStarted(Download * download);
    51     void reportDownloadStarted(Download * download);
    44     void reportDownloadSuccess(Download * download);
    52     void reportDownloadSuccess(Download * download);
    45     void reportDownloadFailure(Download * download, const QString & error);
    53     void reportDownloadFailure(Download * download, const QString & error);
       
    54 #endif
       
    55     void reportUnsupportedDownload(const QUrl & url);
    46 
    56 
    47 signals:
    57 signals:
    48     void downloadCreated(const QString & messageHTML);
    58     void downloadCreated(const QString & messageHTML);
    49     void downloadStarted(const QString & messageHTML);
    59     void downloadStarted(const QString & messageHTML);
    50     void downloadSuccess(const QString & messageHTML);
    60     void downloadSuccess(const QString & messageHTML);
    51     void downloadFailure(const QString & messageHTML);
    61     void downloadFailure(const QString & messageHTML);
    52     void downloadsCleared();
    62     void downloadsCleared();
       
    63     void unsupportedDownload(const QString & messageHTML);
    53 
    64 
    54 private:
    65 private:
    55     DownloadController * m_downloadController;
    66     DownloadController * m_downloadController;
    56 };
    67 };
    57 
    68