emailuis/nmailui/inc/nmattachmentpicker.h
changeset 20 ecc8def7944a
child 23 2dc6caa42ec3
equal deleted inserted replaced
18:578830873419 20:ecc8def7944a
       
     1 /*
       
     2 * Copyright (c) 2009 - 2010 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: Utility class for launching different file pickers
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef NMATTACHMENTPICKER_H_
       
    19 #define NMATTACHMENTPICKER_H_
       
    20 
       
    21 #include <QObject>
       
    22 #include <xqappmgr.h>
       
    23 
       
    24 #define IMAGE_FETCHER_INTERFACE "Image"
       
    25 #define AUDIO_FETCHER_INTERFACE "com.nokia.services.media.Music"
       
    26 
       
    27 #define IMAGE_FETCHER_OPERATION "fetch(QVariantMap,QVariant)"
       
    28 #define AUDIO_FETCHER_OPERATION "fetch(QString)"
       
    29 
       
    30 /**
       
    31  * This class manages launching of different attachment pickers 
       
    32  * 
       
    33  */
       
    34 class  NmAttachmentPicker : public QObject
       
    35 {
       
    36     Q_OBJECT
       
    37 
       
    38 public:
       
    39     NmAttachmentPicker(QObject* parent = 0);
       
    40     ~NmAttachmentPicker();
       
    41         
       
    42 public slots:
       
    43     void fetchImage();
       
    44     void fetchAudio();    
       
    45     void fetchVideo();
       
    46     void fetchOther();       
       
    47 
       
    48 signals:
       
    49     void attachmentsFetchOk(const QVariant& fileNames);
       
    50     void attachmentsFetchError(int errorCode, const QString& errorMessage);
       
    51     
       
    52 private:   
       
    53     void fetch(const QString& interface, const QString& operation); 
       
    54     
       
    55 private:
       
    56     XQApplicationManager mAppmgr;
       
    57     XQAiwRequest *mRequest;
       
    58 };
       
    59 
       
    60 #endif // NMATTACHMENTPICKER_H_