|
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 source file for tone fetcher engine. |
|
16 * |
|
17 */ |
|
18 #include "tonefetcherengine.h" |
|
19 #ifdef Q_OS_SYMBIAN |
|
20 #include "tonefetcherengine_symbian.h" |
|
21 #else |
|
22 #include "tonefetcherengine_stub.h" |
|
23 #endif |
|
24 |
|
25 ToneFetcherEngine::ToneFetcherEngine(QObject* parent) : QObject(parent) |
|
26 { |
|
27 d = new ToneFetcherEnginePrivate(); |
|
28 Q_ASSERT(d); |
|
29 |
|
30 connect(d, SIGNAL(mdeSessionOpened()), |
|
31 this, SIGNAL(mdeSessionOpened())); |
|
32 connect(d, SIGNAL(mdeSessionError(int)), |
|
33 this, SIGNAL(mdeSessionError(int))); |
|
34 connect(d, SIGNAL(queryComplete(QStringList)), |
|
35 this, SIGNAL(queryComplete(QStringList))); |
|
36 connect(d, SIGNAL(queryError(int)), |
|
37 this, SIGNAL(queryError(int))); |
|
38 connect(d, SIGNAL(notifyObjectChanged()), |
|
39 this, SIGNAL(notifyObjectChanged())); |
|
40 connect(d, SIGNAL(notifyPreviewEvent(int)), |
|
41 this, SIGNAL(notifyPreviewEvent(int))); |
|
42 } |
|
43 |
|
44 ToneFetcherEngine::~ToneFetcherEngine() |
|
45 { |
|
46 delete d; |
|
47 } |
|
48 |
|
49 void ToneFetcherEngine::getTones() |
|
50 { |
|
51 d->getTones(); |
|
52 } |
|
53 |
|
54 void ToneFetcherEngine::play(const QString &file) |
|
55 { |
|
56 d->play(file); |
|
57 } |
|
58 |
|
59 bool ToneFetcherEngine::isPlaying() |
|
60 { |
|
61 return d->isPlaying(); |
|
62 } |
|
63 |
|
64 void ToneFetcherEngine::stopPlaying() |
|
65 { |
|
66 d->stopPlaying(); |
|
67 } |
|
68 |
|
69 //End of File |