controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.h
branchRCL_3
changeset 13 90fe62538f66
equal deleted inserted replaced
12:3fec62e6e7fc 13:90fe62538f66
       
     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:
       
    15  *     The header file for tone fetcher engine.
       
    16  *     
       
    17  */
       
    18 
       
    19 #ifndef TONEFETCHERENGINE_H
       
    20 #define TONEFETCHERENGINE_H
       
    21 #include <QObject>
       
    22 #include <QStringList>
       
    23 
       
    24 class ToneFetcherEnginePrivate;
       
    25 
       
    26 // CLASS DECLARATION
       
    27 /**
       
    28  *  This class is used for interacting with platform based codes
       
    29  *  including fetching tones from MDE (Metadata Engine) and playing tones
       
    30  *  using platform-dependant interface.
       
    31  *
       
    32  */
       
    33 class  ToneFetcherEngine : public QObject
       
    34 {
       
    35     Q_OBJECT
       
    36     
       
    37 public:    
       
    38     explicit ToneFetcherEngine( QObject* parent = 0 );
       
    39     ~ToneFetcherEngine();
       
    40     /*
       
    41      * search the tone using MDE, not including rom files.
       
    42      */
       
    43     void getTones();
       
    44     
       
    45     /*
       
    46      * preview the tone
       
    47      * @param file the absolute path of the file.
       
    48      */
       
    49     void play(const QString &file);
       
    50     
       
    51     bool isPlaying();
       
    52     
       
    53     /*
       
    54      * stop playing
       
    55      */
       
    56     void stopPlaying();
       
    57     
       
    58 signals:
       
    59     void mdeSessionOpened();
       
    60     void mdeSessionError(int error);
       
    61     void queryComplete(const QStringList &uriList);
       
    62     void queryError(int error);
       
    63     void notifyPreviewEvent(int event);
       
    64     void notifyObjectChanged();
       
    65     
       
    66 private:
       
    67     ToneFetcherEnginePrivate *d;
       
    68 };
       
    69 #endif