main/glxfetcher.h
changeset 26 c499df2dbb33
parent 24 99ad1390cd33
child 27 0d818da5a659
child 29 2c833fc9e98f
child 40 112f0ac2d1f0
equal deleted inserted replaced
24:99ad1390cd33 26:c499df2dbb33
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     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 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef GLXFETCHER_H
       
    19 #define GLXFETCHER_H
       
    20 
       
    21 #include <hbmainwindow.h>
       
    22 #include <xqserviceprovider.h>
       
    23 #include <QStringList>
       
    24 
       
    25 
       
    26 //FORWARD CLASS DECLARATION
       
    27 class GlxView;
       
    28 class HbPushButton;
       
    29 class QGraphicsGridLayout; 
       
    30 class GlxGetImageService;
       
    31 class GlxMediaModel;
       
    32 class QModelIndex;
       
    33 /**
       
    34  *  GlxFetcher
       
    35  * 
       
    36  */
       
    37 class GlxFetcher: public HbMainWindow
       
    38     {
       
    39     Q_OBJECT
       
    40 public:
       
    41     /**
       
    42      * Constructor
       
    43      */
       
    44     GlxFetcher();
       
    45 
       
    46     /**
       
    47      * Destructor.
       
    48      */
       
    49     ~GlxFetcher();
       
    50 	void launchFetcher();
       
    51 public slots:  
       
    52     void itemSelected(const QModelIndex &  index);    
       
    53     
       
    54 private:
       
    55     GlxMediaModel *mModel;
       
    56     GlxView* mView;
       
    57     GlxGetImageService* mService;
       
    58     };
       
    59 
       
    60 /**
       
    61  *  GlxGetImageService
       
    62  * 
       
    63  */	
       
    64 class GlxGetImageService : public XQServiceProvider
       
    65 {
       
    66     Q_OBJECT
       
    67 public:
       
    68     GlxGetImageService( GlxFetcher *parent = 0 );
       
    69     ~GlxGetImageService();
       
    70     bool isActive();
       
    71     void complete( QStringList filesList);
       
    72     
       
    73 public slots://for QTHighway to notify provider about request
       
    74     void fetch( QVariantMap filter, QVariant flag);
       
    75     
       
    76 public slots://for provider to notify client
       
    77     void fetchFailed( int errorCode );
       
    78     
       
    79 private:
       
    80     void doComplete( QStringList filesList);
       
    81     
       
    82 private:
       
    83     int mImageRequestIndex;
       
    84     GlxFetcher* mServiceApp;
       
    85 };
       
    86     
       
    87 #endif //GLXFETCHER_H