|
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 * |
|
14 * Description: Declares USB UI Queries notifier. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef USBUINOTIFMSMMERROR_H |
|
20 #define USBUINOTIFMSMMERROR_H |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include "usbnotifier.h" // Base class |
|
25 #include <aknquerydialog.h> // AVKON component |
|
26 #define KUsbUiNotifOtgGeneralQueryGranularity 3 |
|
27 // CLASS DECLARATION |
|
28 |
|
29 /** |
|
30 * This class is used to show general USB query. |
|
31 * Asynchronous call is required. |
|
32 * |
|
33 * @lib |
|
34 */ |
|
35 NONSHARABLE_CLASS(CUsbUiNotifMSMMError) : public CUSBUINotifierBase |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Possible parameter values for KUsbUiNotifMSMMError |
|
41 */ |
|
42 enum TUsbUiNotifMSMMError |
|
43 { |
|
44 EUsbMSMMGeneralError, |
|
45 EUsbMSMMUnknownFileSystem, |
|
46 EUsbMSMMOutOfMemory |
|
47 }; |
|
48 // Constructors and destructor |
|
49 |
|
50 /** |
|
51 * Two-phased constructor. |
|
52 */ |
|
53 static CUsbUiNotifMSMMError* NewL(); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 virtual ~CUsbUiNotifMSMMError(); |
|
59 |
|
60 protected: |
|
61 |
|
62 /** |
|
63 * Second phase contructor |
|
64 */ |
|
65 void ConstructL(); |
|
66 |
|
67 private: |
|
68 // Functions from base class |
|
69 |
|
70 /** |
|
71 * From CUSBUINotifierBase Called when a notifier is first loaded. |
|
72 * @param None. |
|
73 * @return A structure containing priority and channel info. |
|
74 */ |
|
75 TNotifierInfo RegisterL(); |
|
76 |
|
77 /** |
|
78 * From CUSBUINotifierBase The notifier has been deactivated |
|
79 * so resources can be freed and outstanding messages completed. |
|
80 */ |
|
81 void Cancel(); |
|
82 |
|
83 /** |
|
84 * From CUSBUINotifierBase Gets called when a request completes. |
|
85 */ |
|
86 void RunL(); |
|
87 |
|
88 /** |
|
89 * From CUSBUINotifierBase Used in asynchronous notifier launch to |
|
90 * store received parameters into members variables and |
|
91 * make needed initializations. |
|
92 * @param aBuffer A buffer containing received parameters |
|
93 * @param aReplySlot A reply slot. |
|
94 * @param aMessage Should be completed when the notifier is deactivated. |
|
95 */ |
|
96 void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, |
|
97 const RMessagePtr2& aMessage); |
|
98 |
|
99 private: |
|
100 |
|
101 /** |
|
102 * C++ default constructor. |
|
103 */ |
|
104 CUsbUiNotifMSMMError(); |
|
105 |
|
106 private: |
|
107 // New functions |
|
108 |
|
109 /** |
|
110 * Show query dialog |
|
111 * @return KErrNone - accepted, KErrCancel - Cancel or End call key |
|
112 */ |
|
113 TInt QueryUserResponseL(); |
|
114 |
|
115 private: |
|
116 // Data |
|
117 /** |
|
118 * Query |
|
119 * Not own, destroys self when lauched. |
|
120 */ |
|
121 CAknQueryDialog* iQuery; |
|
122 RArray<TInt> iStringIds; |
|
123 TInt iErrorId; |
|
124 }; |
|
125 #endif // USBUINOTIFMSMMERROR_H |