equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
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: Observes notifications from usb |
|
15 * |
8 * |
16 */ |
9 * Initial Contributors: |
17 |
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Observes notifications from usb |
|
15 * |
|
16 */ |
18 |
17 |
19 #ifndef C_USBMESSAGENOTIFICATIONOBSERVER_H |
18 #ifndef C_USBMESSAGENOTIFICATIONOBSERVER_H |
20 #define C_USBMESSAGENOTIFICATIONOBSERVER_H |
19 #define C_USBMESSAGENOTIFICATIONOBSERVER_H |
21 |
20 |
22 #include <e32base.h> |
21 #include <e32base.h> |
56 |
55 |
57 /** |
56 /** |
58 * Called when session requested |
57 * Called when session requested |
59 */ |
58 */ |
60 virtual void SessionRequestedL() = 0; |
59 virtual void SessionRequestedL() = 0; |
61 |
60 |
62 /** |
61 /** |
63 * Called when error happened |
62 * Called when error happened |
64 * @param aError error code |
63 * @param aError error code |
65 */ |
64 */ |
66 virtual void MessageNotificationErrorL(TInt aError) = 0; |
65 virtual void MessageNotificationErrorL(TInt aError) = 0; |
67 }; |
66 }; |
68 |
67 |
69 /** |
68 /** |
70 * Class observes USB Notifications |
69 * Class observes USB Notifications |
71 * |
70 * |
88 |
87 |
89 /** |
88 /** |
90 * Subscribes for notifications |
89 * Subscribes for notifications |
91 * @param aObserver observer |
90 * @param aObserver observer |
92 */ |
91 */ |
93 void SubscribeL(MUsbMessageNotificationObserver* aObserver); |
92 void SubscribeL(MUsbMessageNotificationObserver& aObserver); |
94 |
93 |
95 /** |
94 /** |
96 * Unsubscribe from notifications |
95 * Unsubscribe from notifications |
97 * @param aObserver Observer |
96 * @param aObserver Observer |
98 */ |
97 */ |
99 void UnsubscribeL(MUsbMessageNotificationObserver* aObserver); |
98 void UnsubscribeL(MUsbMessageNotificationObserver& aObserver); |
100 |
99 |
101 private: |
100 private: |
102 |
101 |
103 // From CActive |
102 // From CActive |
104 /** |
103 /** |
137 private: |
136 private: |
138 // data |
137 // data |
139 |
138 |
140 /** |
139 /** |
141 * The observer reports to own observers |
140 * The observer reports to own observers |
142 * Owns |
141 * Not owns |
143 */ |
142 */ |
144 RPointerArray<MUsbMessageNotificationObserver> iObservers; |
143 RPointerArray<MUsbMessageNotificationObserver> iObservers; |
145 |
144 |
146 /** |
145 /** |
147 * Notifications come from USB |
146 * Notifications come from USB |