diff -r f5dfdd5e4a1b -r 19394c261aa5 controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.h --- a/controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.h Wed Jun 23 18:13:38 2010 +0300 +++ b/controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.h Tue Jul 06 14:17:10 2010 +0300 @@ -19,15 +19,14 @@ #ifndef TONEFETCHERENGINE_H #define TONEFETCHERENGINE_H #include -#include "toneselectionengine_p.h" #include -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