|
1 /* |
|
2 * Copyright (c) 2008 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: Base classes for Usb notifier wrapper |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CUSBNOTIFIER_H |
|
20 #define C_CUSBNOTIFIER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class CUsbNotifManager; |
|
25 |
|
26 /** |
|
27 * Base class for usb notifiers. |
|
28 * Define primitive methods needed for all kinds of notifiers such as Avkon |
|
29 * informative note, feedback-needed note, usb indicator etc. |
|
30 * Some notifier needs feedback input from end-user such as waiting note, some |
|
31 * of them don't such as informative note and usb indicator. |
|
32 */ |
|
33 NONSHARABLE_CLASS( CUsbNotifier) : public CBase |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * Destructor. |
|
38 */ |
|
39 virtual ~CUsbNotifier(); |
|
40 |
|
41 /** |
|
42 * Start to show notifier |
|
43 */ |
|
44 virtual void ShowL() = 0; |
|
45 |
|
46 /** |
|
47 * Stop showing notifier |
|
48 */ |
|
49 virtual void Close() = 0; |
|
50 |
|
51 /** |
|
52 * Getter for returning if the notifier needs input from end-user |
|
53 * @return ETrue-user feedback needed, EFalse-user feedback not needed. |
|
54 */ |
|
55 TBool IsFeedbackNeeded() const; |
|
56 |
|
57 protected: |
|
58 |
|
59 /** |
|
60 * Default constructor |
|
61 * @param aNotifManager manager |
|
62 * @param acat Category |
|
63 * @param aNotidId id |
|
64 */ |
|
65 CUsbNotifier(CUsbNotifManager* aNotifManager, TUid aCat, TUint aNotifId); |
|
66 |
|
67 /** |
|
68 * Set by child-class if the concrete notifier needs feedback from end-user |
|
69 */ |
|
70 void SetFeedbackNeeded(); |
|
71 |
|
72 protected: |
|
73 //data |
|
74 |
|
75 /** |
|
76 * The manager of all usb notifieres. |
|
77 * All notifiers are created, destroied and manupulated by the manager. |
|
78 * Not own |
|
79 */ |
|
80 CUsbNotifManager* iNotifManager; |
|
81 |
|
82 /** |
|
83 * Category of the notifier. Needed for cancelling |
|
84 */ |
|
85 TUid iCat; |
|
86 |
|
87 /** |
|
88 * The identifier of the notifier |
|
89 */ |
|
90 TUint iNotifId; |
|
91 |
|
92 /** |
|
93 * If the notifier needs feedback from end-user. |
|
94 */ |
|
95 TBool iIsFeedbackNeeded; |
|
96 |
|
97 }; |
|
98 |
|
99 #endif // C_CUSBNOTIFIER_H |