messagingapp/msgui/msguiutils/inc/msgaudiofetcherutil.h
changeset 23 238255e8b033
equal deleted inserted replaced
5:4697dfb2d7ad 23:238255e8b033
       
     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: Audio fetcher helper class
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef MSG_AUDIOFETCHER_UTIL_H
       
    19 #define MSG_AUDIOFETCHER_UTIL_H
       
    20 
       
    21 #include <QObject>
       
    22 #include <QVariant>
       
    23 
       
    24 class XQApplicationManager;
       
    25 class XQAiwRequest;
       
    26 
       
    27 class MsgAudioFetcherUtil : public QObject
       
    28     {
       
    29     Q_OBJECT
       
    30 
       
    31 public:
       
    32     /**
       
    33      * Constructor
       
    34      */
       
    35     MsgAudioFetcherUtil(QObject* parent=0);
       
    36 
       
    37     /**
       
    38      * Destructor
       
    39      */
       
    40     ~MsgAudioFetcherUtil();
       
    41 
       
    42     /**
       
    43      * Fetch audio files
       
    44      */
       
    45     void fetchAudio();
       
    46 
       
    47     signals:
       
    48 
       
    49     /**
       
    50      * emit when result is available
       
    51      */
       
    52     void resultReady(const QVariant& result);
       
    53 
       
    54     /**
       
    55      * emit when an error is generated.
       
    56      * @param error The error as a string to be displayed on the screen.
       
    57      */
       
    58     void serviceError(const QString& error);
       
    59 
       
    60 private slots:
       
    61     /**
       
    62      * connects to XQApplication manager failure signal
       
    63      */
       
    64     void onRequestError(int errorCode, const QString& errorMessage);
       
    65 
       
    66 private:
       
    67     /**
       
    68      * ApplicationManager
       
    69      * Owned
       
    70      */
       
    71     XQApplicationManager* mAppMgr;
       
    72 
       
    73     /**
       
    74      * AiwRequest
       
    75      * Not Owned
       
    76      */
       
    77     XQAiwRequest* mRequest;
       
    78     };
       
    79 
       
    80 #endif //MSG_AUDIOFETCHER_UTIL_H