equal
deleted
inserted
replaced
1 /*! |
1 /*! |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
19 #define PHONEGLOBALNOTES_H |
19 #define PHONEGLOBALNOTES_H |
20 |
20 |
21 #include <QObject> |
21 #include <QObject> |
22 #include <QString> |
22 #include <QString> |
23 #include "tphonecmdparamnote.h" |
23 #include "tphonecmdparamnote.h" |
|
24 #include "tphonecmdparamglobalnote.h" |
24 #include "phoneaction.h" |
25 #include "phoneaction.h" |
25 #include <hbdevicenotificationdialogsymbian.h> |
26 #include <hbdevicenotificationdialogsymbian.h> |
26 #include <hbdevicemessageboxsymbian.h> |
27 #include <hbdevicemessageboxsymbian.h> |
27 #include <hbdeviceprogressdialogsymbian.h> |
28 #include <hbdeviceprogressdialogsymbian.h> |
28 |
29 |
32 class TPhoneCmdParamGlobalNote; |
33 class TPhoneCmdParamGlobalNote; |
33 class HbDeviceMessageBox; |
34 class HbDeviceMessageBox; |
34 class HbDeviceNotificationDialog; |
35 class HbDeviceNotificationDialog; |
35 class HbDeviceProgressDialog; |
36 class HbDeviceProgressDialog; |
36 class QTimer; |
37 class QTimer; |
|
38 class XQSystemToneService; |
37 |
39 |
38 class PhoneGlobalNotes : public QObject, |
40 class PhoneGlobalNotes : public QObject, |
39 public MHbDeviceNotificationDialogObserver, |
41 public MHbDeviceNotificationDialogObserver, |
40 public MHbDeviceMessageBoxObserver, |
42 public MHbDeviceMessageBoxObserver, |
41 public MHbDeviceProgressDialogObserver |
43 public MHbDeviceProgressDialogObserver |
99 |
101 |
100 This method returns text for global note. |
102 This method returns text for global note. |
101 */ |
103 */ |
102 QString globalNoteText(TPhoneCommandParam *commandParam); |
104 QString globalNoteText(TPhoneCommandParam *commandParam); |
103 |
105 |
|
106 /*! |
|
107 \fn QString playToneIfNeeded() |
|
108 |
|
109 This method plays note tone if needed. |
|
110 */ |
|
111 void playToneIfNeeded(TPhoneNotificationToneType aTone); |
104 |
112 |
105 private: // Leaving symbian stuff |
113 private: // Leaving symbian stuff |
106 void ShowGlobalWaitNoteL( |
114 void ShowGlobalWaitNoteL( |
107 const TDesC16& aText); |
115 const TDesC16& aText); |
108 |
116 |
109 void ShowDeviceMessageBoxL( |
117 void ShowDeviceMessageBoxL( |
110 CHbDeviceMessageBoxSymbian::TType aType, |
118 CHbDeviceMessageBoxSymbian::TType aType, |
111 const TDesC16& aText, |
119 const TDesC16& aText, |
112 TInt aTimeout); |
120 TInt aTimeout, |
|
121 TPhoneNotificationToneType aTone); |
113 |
122 |
114 void ShowDeviceNotificationDialogL( |
123 void ShowDeviceNotificationDialogL( |
115 const TDesC16& aTitle, TInt aTimeout); |
124 const TDesC16& aTitle, |
|
125 TInt aTimeout, |
|
126 TPhoneNotificationToneType aTone); |
116 |
127 |
117 |
128 |
118 private slots: |
129 private slots: |
119 |
130 |
120 /*! |
131 /*! |
135 void ProgressDialogCancelled( |
146 void ProgressDialogCancelled( |
136 const CHbDeviceProgressDialogSymbian* aProgressDialog); |
147 const CHbDeviceProgressDialogSymbian* aProgressDialog); |
137 void ProgressDialogClosed( |
148 void ProgressDialogClosed( |
138 const CHbDeviceProgressDialogSymbian* aProgressDialog); |
149 const CHbDeviceProgressDialogSymbian* aProgressDialog); |
139 |
150 |
|
151 struct MessageBoxData{ |
|
152 CHbDeviceMessageBoxSymbian *m_messageBox; |
|
153 int m_tone; |
|
154 }; |
|
155 |
|
156 struct NotificationDialogData{ |
|
157 CHbDeviceNotificationDialogSymbian *m_notificationDialog; |
|
158 int m_tone; |
|
159 }; |
140 private: |
160 private: |
141 |
161 |
142 QTimer *m_timer; |
162 QTimer *m_timer; |
|
163 XQSystemToneService *m_toneService; |
143 int m_queryCanceledCommand; |
164 int m_queryCanceledCommand; |
144 int m_timeoutCommand; |
165 int m_timeoutCommand; |
145 |
166 |
146 QList<CHbDeviceNotificationDialogSymbian* > iNotificationList; |
167 QList<NotificationDialogData*> iNotificationList; |
147 QList<CHbDeviceMessageBoxSymbian *> iMessageBoxList; |
168 QList<MessageBoxData*> iMessageBoxList; |
148 CHbDeviceProgressDialogSymbian *iProgressDialog; |
169 CHbDeviceProgressDialogSymbian *iProgressDialog; |
149 }; |
170 }; |
150 |
171 |
151 #endif // PHONEGLOBALNOTES_H |
172 #endif // PHONEGLOBALNOTES_H |