|
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 USBUINOTIFOTGERROR_H |
|
20 #define USBUINOTIFOTGERROR_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(CUsbUiNotifOtgError) : public CUSBUINotifierBase |
|
36 { |
|
37 public: |
|
38 // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Two-phased constructor. |
|
42 */ |
|
43 static CUsbUiNotifOtgError* NewL(); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CUsbUiNotifOtgError(); |
|
49 |
|
50 protected: |
|
51 |
|
52 /** |
|
53 * Second phase contructor |
|
54 */ |
|
55 void ConstructL(); |
|
56 |
|
57 private: |
|
58 // Functions from base class |
|
59 |
|
60 /** |
|
61 * From CUSBUINotifierBase Called when a notifier is first loaded. |
|
62 * @param None. |
|
63 * @return A structure containing priority and channel info. |
|
64 */ |
|
65 TNotifierInfo RegisterL(); |
|
66 |
|
67 /** |
|
68 * From CUSBUINotifierBase The notifier has been deactivated |
|
69 * so resources can be freed and outstanding messages completed. |
|
70 */ |
|
71 void Cancel(); |
|
72 |
|
73 /** |
|
74 * From CUSBUINotifierBase Gets called when a request completes. |
|
75 */ |
|
76 void RunL(); |
|
77 |
|
78 /** |
|
79 * From CUSBUINotifierBase Used in asynchronous notifier launch to |
|
80 * store received parameters into members variables and |
|
81 * make needed initializations. |
|
82 * @param aBuffer A buffer containing received parameters |
|
83 * @param aReplySlot A reply slot. |
|
84 * @param aMessage Should be completed when the notifier is deactivated. |
|
85 */ |
|
86 void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, |
|
87 const RMessagePtr2& aMessage); |
|
88 |
|
89 private: |
|
90 |
|
91 /** |
|
92 * C++ default constructor. |
|
93 */ |
|
94 CUsbUiNotifOtgError(); |
|
95 |
|
96 private: |
|
97 // New functions |
|
98 |
|
99 /** |
|
100 * Show query dialog |
|
101 * @return KErrNone - accepted, KErrCancel - Cancel or End call key |
|
102 */ |
|
103 TInt QueryUserResponseL(); |
|
104 |
|
105 private: |
|
106 // Data |
|
107 /** |
|
108 * Query |
|
109 * Not own, destroys self when lauched. |
|
110 */ |
|
111 CAknQueryDialog* iQuery; |
|
112 RArray<TInt> iStringIds; |
|
113 TInt iErrorId; |
|
114 }; |
|
115 #endif // USBUINOTIFOTGERROR_H |