author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 23 Jun 2010 19:20:39 +0300 | |
changeset 56 | f45583a69686 |
parent 38 | 218231f2b3b3 |
child 63 | ef2686f7597e |
permissions | -rw-r--r-- |
35 | 1 |
/* |
2 |
* Copyright (c) 2007, 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 |
* |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
14 |
* Description: Declares MSMM error notifier. |
35 | 15 |
* |
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef USBUINOTIFMSMMERROR_H |
|
20 |
#define USBUINOTIFMSMMERROR_H |
|
21 |
||
22 |
// INCLUDES |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
23 |
#include <hb/hbwidgets/hbdevicemessageboxsymbian.h> |
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
24 |
#include <hb/hbwidgets/hbdevicenotificationdialogsymbian.h> |
35 | 25 |
#include "usbnotifier.h" // Base class |
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
26 |
|
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
27 |
|
35 | 28 |
// CLASS DECLARATION |
29 |
||
30 |
/** |
|
31 |
* This class is used to show general USB query. |
|
32 |
* Asynchronous call is required. |
|
33 |
* |
|
34 |
* @lib |
|
35 |
*/ |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
36 |
NONSHARABLE_CLASS(CUsbUiNotifMSMMError) : public CUSBUINotifierBase, |
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
37 |
public MHbDeviceMessageBoxObserver, |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
38 |
public MHbDeviceNotificationDialogObserver |
35 | 39 |
{ |
40 |
public: |
|
41 |
||
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
42 |
/** |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
43 |
* Indexes for the strings used in KUsbUiNotifMSMMError which are mapped to 5 errors. |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
44 |
*/ |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
45 |
enum TUsbUiNotifMSMMError |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
46 |
{ |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
47 |
EUsbMSMMGeneralError, |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
48 |
EUsbMSMMUnknownFileSystem, |
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
49 |
EUsbMSMMOutOfMemory, |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
50 |
EUsbMSMMSafeToRemove, |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
51 |
EUsbMSMMUnableToEject |
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
52 |
}; |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
53 |
|
35 | 54 |
// Constructors and destructor |
55 |
||
56 |
/** |
|
57 |
* Two-phased constructor. |
|
58 |
*/ |
|
59 |
static CUsbUiNotifMSMMError* NewL(); |
|
60 |
||
61 |
/** |
|
62 |
* Destructor. |
|
63 |
*/ |
|
64 |
virtual ~CUsbUiNotifMSMMError(); |
|
65 |
||
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
66 |
/** |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
67 |
* Call back function to observe device message box closing. |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
68 |
* @param aMessageBox Pointer to the closing message box instance. |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
69 |
* @param aButton Button that was pressed. |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
70 |
*/ |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
71 |
void MessageBoxClosed(const CHbDeviceMessageBoxSymbian* aMessageBox, |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
72 |
CHbDeviceMessageBoxSymbian::TButtonId aButton); |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
73 |
|
35 | 74 |
protected: |
75 |
||
76 |
/** |
|
77 |
* Second phase contructor |
|
78 |
*/ |
|
79 |
void ConstructL(); |
|
80 |
||
81 |
private: |
|
82 |
// Functions from base class |
|
83 |
||
84 |
/** |
|
85 |
* From CUSBUINotifierBase Called when a notifier is first loaded. |
|
86 |
* @param None. |
|
87 |
* @return A structure containing priority and channel info. |
|
88 |
*/ |
|
89 |
TNotifierInfo RegisterL(); |
|
90 |
||
91 |
/** |
|
92 |
* From CUSBUINotifierBase The notifier has been deactivated |
|
93 |
* so resources can be freed and outstanding messages completed. |
|
94 |
*/ |
|
95 |
void Cancel(); |
|
96 |
||
97 |
/** |
|
98 |
* From CUSBUINotifierBase Used in asynchronous notifier launch to |
|
99 |
* store received parameters into members variables and |
|
100 |
* make needed initializations. |
|
101 |
* @param aBuffer A buffer containing received parameters |
|
102 |
* @param aReplySlot A reply slot. |
|
103 |
* @param aMessage Should be completed when the notifier is deactivated. |
|
104 |
*/ |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
105 |
void StartDialogL(const TDesC8& aBuffer, TInt aReplySlot, |
35 | 106 |
const RMessagePtr2& aMessage); |
107 |
||
108 |
private: |
|
109 |
||
110 |
/** |
|
111 |
* C++ default constructor. |
|
112 |
*/ |
|
113 |
CUsbUiNotifMSMMError(); |
|
114 |
||
115 |
private: |
|
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
116 |
// functions from MHbDeviceNotificationDialogObserver |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
117 |
/** |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
118 |
* Callback function which is called when the dialog is tapped |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
119 |
*/ |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
120 |
void NotificationDialogActivated(const CHbDeviceNotificationDialogSymbian* aDialog); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
121 |
/** |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
122 |
* Callback function which is called when the dialog is closed |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
123 |
*/ |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
124 |
void NotificationDialogClosed(const CHbDeviceNotificationDialogSymbian* aDialog, |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
125 |
TInt aCompletionCode); |
35 | 126 |
|
127 |
private: |
|
128 |
// Data |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
129 |
CHbDeviceMessageBoxSymbian* iQuery; |
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
130 |
CHbDeviceNotificationDialogSymbian* iDiscreet; |
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
131 |
CDesCArrayFlat* iStringIds; |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
132 |
}; |
35 | 133 |
#endif // USBUINOTIFMSMMERROR_H |