--- a/controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.cpp Wed Jun 23 18:13:38 2010 +0300
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.cpp Tue Jul 06 14:17:10 2010 +0300
@@ -16,31 +16,29 @@
*
*/
#include "tonefetcherengine.h"
-#include "toneselectionengine_p.h"
-#include "tonepreviewprivate.h"
+#ifdef Q_OS_SYMBIAN
+#include "tonefetcherengine_symbian.h"
+#else
+#include "tonefetcherengine_stub.h"
+#endif
ToneFetcherEngine::ToneFetcherEngine(QObject* parent) : QObject(parent)
{
- d = new ToneSelectionEnginePrivate(this);
+ d = new ToneFetcherEnginePrivate();
Q_ASSERT(d);
- mAudioPlayer = new TonePreviewPrivate( this );
- Q_ASSERT(mAudioPlayer);
+
connect(d, SIGNAL(mdeSessionOpened()),
this, SIGNAL(mdeSessionOpened()));
connect(d, SIGNAL(mdeSessionError(int)),
this, SIGNAL(mdeSessionError(int)));
- connect(d, SIGNAL(queryComplete(QStringList, QStringList)),
- this, SIGNAL(queryComplete(QStringList, QStringList)));
+ connect(d, SIGNAL(queryComplete(QStringList)),
+ this, SIGNAL(queryComplete(QStringList)));
connect(d, SIGNAL(queryError(int)),
this, SIGNAL(queryError(int)));
connect(d, SIGNAL(notifyObjectChanged()),
- this, SIGNAL(notifyObjectChanged()));
- connect(d, SIGNAL(notifyRefreshStart()),
- this, SIGNAL(notifyRefreshStart()));
- connect(d, SIGNAL(notifyRefreshFinish()),
- this, SIGNAL(notifyRefreshFinish()));
- connect(mAudioPlayer, SIGNAL(notifyPreviewEvent(ToneServiceEngine::TPreviewEvent, int)),
- this, SIGNAL(notifyPreviewEvent(ToneServiceEngine::TPreviewEvent, int)));
+ this, SIGNAL(notifyObjectChanged()));
+ connect(d, SIGNAL(notifyPreviewEvent(int)),
+ this, SIGNAL(notifyPreviewEvent(int)));
}
ToneFetcherEngine::~ToneFetcherEngine()
@@ -48,25 +46,24 @@
delete d;
}
-void ToneFetcherEngine::getTone()
+void ToneFetcherEngine::getTones()
{
- d->QueryTones();
+ d->getTones();
}
-void ToneFetcherEngine::preview(const QString &file )
-{
- mAudioPlayer->SetAttr(file);
- mAudioPlayer->Play();
+void ToneFetcherEngine::play(const QString &file)
+{
+ d->play(file);
}
-bool ToneFetcherEngine::IsPlaying()
+bool ToneFetcherEngine::isPlaying()
{
- mAudioPlayer->IsPlaying();
+ return d->isPlaying();
}
-void ToneFetcherEngine::stop()
+void ToneFetcherEngine::stopPlaying()
{
- mAudioPlayer->Stop();
+ d->stopPlaying();
}
//End of File