78
|
1 |
/** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
* All rights reserved.
|
|
3 |
* This component and the accompanying materials are made available
|
|
4 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
5 |
* which accompanies this distribution, and is available
|
|
6 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
*
|
|
8 |
* Initial Contributors:
|
|
9 |
* Nokia Corporation - initial contribution.
|
|
10 |
*
|
|
11 |
* Contributors:
|
|
12 |
*
|
|
13 |
* Description:
|
|
14 |
*
|
|
15 |
*/
|
|
16 |
|
|
17 |
|
|
18 |
#ifndef XQSYSTEMTONESERVICE_H
|
|
19 |
#define XQSYSTEMTONESERVICE_H
|
|
20 |
|
|
21 |
#include <QObject>
|
|
22 |
#include <systemtoneservice.h>
|
|
23 |
|
|
24 |
|
|
25 |
class XQSystemToneService : public QObject
|
|
26 |
{
|
|
27 |
Q_OBJECT
|
|
28 |
|
|
29 |
public:
|
|
30 |
|
|
31 |
/**
|
|
32 |
* Supported tone types.
|
|
33 |
*/
|
|
34 |
enum ToneType {
|
|
35 |
// Capture Tones
|
|
36 |
BurstModeTone = CSystemToneService::EBurstMode,
|
|
37 |
CaptureTone = CSystemToneService::ECapture,
|
|
38 |
CallRecordingTone = CSystemToneService::ECallRecording,
|
|
39 |
RecordingStartTone = CSystemToneService::ERecordingStart,
|
|
40 |
RecordingStopTone = CSystemToneService::ERecordingStop,
|
|
41 |
SelfTimerTone = CSystemToneService::ESelfTimer,
|
|
42 |
|
|
43 |
// General Tones
|
|
44 |
ConfirmationBeepTone = CSystemToneService::EConfirmationBeep,
|
|
45 |
DefaultBeepTone = CSystemToneService::EDefaultBeep,
|
|
46 |
ErrorBeepTone = CSystemToneService::EErrorBeep,
|
|
47 |
InformationBeepTone = CSystemToneService::EInformationBeep,
|
|
48 |
WarningBeepTone = CSystemToneService::EWarningBeep,
|
|
49 |
IntegratedHandsFreeActivatedTone = CSystemToneService::EIntegratedHandsFreeActivated,
|
|
50 |
|
|
51 |
// Key Tones
|
|
52 |
TouchScreenTone = CSystemToneService::ETouchScreen,
|
|
53 |
|
|
54 |
// Location Tones
|
|
55 |
LocationRequestTone = CSystemToneService::ELocationRequest,
|
|
56 |
|
|
57 |
// Messaging Tones
|
|
58 |
ChatAlertTone = CSystemToneService::EChatAlert,
|
|
59 |
EmailAlertTone = CSystemToneService::EEmailAlert,
|
|
60 |
MmsAlertTone = CSystemToneService::EMmsAlert,
|
|
61 |
SmsAlertTone = CSystemToneService::ESmsAlert,
|
|
62 |
DeliveryReportTone = CSystemToneService::EDeliveryReport,
|
|
63 |
MessageSendFailureTone = CSystemToneService::EMessageSendFailure,
|
|
64 |
|
|
65 |
// Power Tones
|
|
66 |
BatteryLowTone = CSystemToneService::EBatteryLow,
|
|
67 |
BatteryRechargedTone = CSystemToneService::EBatteryRecharged,
|
|
68 |
PowerOnTone = CSystemToneService::EPowerOn,
|
|
69 |
PowerOffTone = CSystemToneService::EPowerOff,
|
|
70 |
WakeUpTone = CSystemToneService::EWakeUp,
|
|
71 |
WrongChargerTone = CSystemToneService::EWrongCharger,
|
|
72 |
|
|
73 |
// Telephony Tones
|
|
74 |
AutomaticRedialCompleteTone = CSystemToneService::EAutomaticRedialComplete,
|
|
75 |
|
|
76 |
// Voice Recognition Tones
|
|
77 |
VoiceStartTone = CSystemToneService::EVoiceStart,
|
|
78 |
VoiceErrorTone = CSystemToneService::EVoiceError,
|
|
79 |
VoiceAbortTone = CSystemToneService::EVoiceAbort
|
|
80 |
};
|
|
81 |
|
|
82 |
enum AlarmType {
|
|
83 |
// Calendar Tones
|
|
84 |
CalendarAlarmTone = CSystemToneService::ECalendarAlarm,
|
|
85 |
ClockAlarmTone = CSystemToneService::EClockAlarm,
|
|
86 |
ToDoAlarmTone = CSystemToneService::EToDoAlarm,
|
|
87 |
|
|
88 |
// Telephony Alarms
|
|
89 |
IncomingCallTone = CSystemToneService::EIncomingCall,
|
|
90 |
IncomingCallLine2Tone = CSystemToneService::EIncomingCallLine2,
|
|
91 |
IncomingDataCallTone = CSystemToneService::EIncomingDataCall,
|
|
92 |
};
|
|
93 |
|
|
94 |
|
|
95 |
public:
|
|
96 |
/**
|
|
97 |
* XQSystemToneService object constructor.
|
|
98 |
*/
|
|
99 |
XQSystemToneService(QObject *parent = 0);
|
|
100 |
|
|
101 |
/**
|
|
102 |
* Simple destructor.
|
|
103 |
*/
|
|
104 |
~XQSystemToneService();
|
|
105 |
|
|
106 |
/**
|
|
107 |
* Play selected tone.
|
|
108 |
*
|
|
109 |
* @param toneType selected tone type.
|
|
110 |
*/
|
|
111 |
void playTone(ToneType toneType);
|
|
112 |
|
|
113 |
|
|
114 |
void playAlarm(AlarmType alarmType, unsigned int& contextId);
|
|
115 |
|
|
116 |
|
|
117 |
void stopAlarm(unsigned int contextId);
|
|
118 |
|
|
119 |
|
|
120 |
void playAlarm(ToneType toneType, unsigned int& contextId);
|
|
121 |
|
|
122 |
|
|
123 |
|
|
124 |
void toneStarted();
|
|
125 |
|
|
126 |
void alarmStarted(unsigned int contextId);
|
|
127 |
|
|
128 |
void alarmFinished(unsigned int contextId);
|
|
129 |
|
|
130 |
|
|
131 |
};
|
|
132 |
|
|
133 |
#endif /*SYSTEMTONESERVICE_H*/
|