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