controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.h
changeset 22 a5692c68d772
parent 21 2883a5458389
--- a/controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.h	Thu Jun 10 16:07:41 2010 +0800
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.h	Fri Jun 25 17:12:20 2010 +0800
@@ -19,15 +19,14 @@
 #ifndef TONEFETCHERENGINE_H
 #define TONEFETCHERENGINE_H
 #include <QObject>
-#include "toneselectionengine_p.h"
 #include <QStringList>
-class TonePreviewPrivate;
-class ToneSelectionEnginePrivate;
+
+class ToneFetcherEnginePrivate;
 
 // CLASS DECLARATION
 /**
  *  This class is used for interacting with platform based codes
- *  including fetching tones from MDE (Metadata Engine) and previewing tones
+ *  including fetching tones from MDE (Metadata Engine) and playing tones
  *  using platform-dependant interface.
  *
  */
@@ -35,69 +34,36 @@
 {
     Q_OBJECT
     
-public:
-    enum TMediaFileListAttribute {
-        // max media file size
-        EAttrFileSize = 0,
-        // ringing volume (TProfileRingingVolume from Profile.hrh)
-        EAttrVolume,
-        // ringing type,  (TProfileRingingType from Profile.hrh)
-        EAttrRingingType,
-        // vibra on/off   (Boolean) 
-        EAttrVibra,
-        // 3D effect      (TProfile3DToneEffect from ProfileInternal.hrh)
-        EAttr3DEffect,
-        // 3D echo        (TProfile3DToneEcho from ProfileInternal.hrh)
-        EAttr3DEcho,
-        // excluded mime type text
-        EAttrExcludeMimeType,
-        // for file protection checking
-        EAttrAutomatedType,
-        // media file dialog title
-        EAttrTitle,
-        // excluded folder (see enum TFolderType)
-        EAttrExcludeFolder
-    };
-    
-    enum State {
-    SessionConnected = 0,
-    SessionError    
-    };
-    
-    enum TPreviewEvent {         
-        EAudioPreviewComplete, 
-        EPreviewError
-    };
+public:    
     explicit ToneFetcherEngine( QObject* parent = 0 );
     ~ToneFetcherEngine();
     /*
      * search the tone using MDE, not including rom files.
      */
-    void getTone();
+    void getTones();
     
     /*
      * preview the tone
      * @param file the absolute path of the file.
      */
-    void preview(const QString &file);
+    void play(const QString &file);
     
-    bool IsPlaying();
+    bool isPlaying();
     
     /*
-     * stop previewing
+     * stop playing
      */
-    void stop();
+    void stopPlaying();
+    
 signals:
     void mdeSessionOpened();
     void mdeSessionError(int error);
-    void queryComplete(const QStringList &nameList, const QStringList &uriList);
+    void queryComplete(const QStringList &uriList);
     void queryError(int error);
-    void notifyPreviewEvent(ToneFetcherEngine::TPreviewEvent event, int errorId);
+    void notifyPreviewEvent(int event);
     void notifyObjectChanged();
-    void notifyRefreshStart();
-    void notifyRefreshFinish();
+    
 private:
-    ToneSelectionEnginePrivate *d;
-    TonePreviewPrivate *mAudioPlayer;
+    ToneFetcherEnginePrivate *d;
 };
 #endif