equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008-2008 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: Implements VBus observer |
|
15 * |
8 * |
16 */ |
9 * Initial Contributors: |
17 |
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implements VBus observer |
|
15 * |
|
16 */ |
18 |
17 |
19 #ifndef C_USBVBUSOBSERVER_H |
18 #ifndef C_USBVBUSOBSERVER_H |
20 #define C_USBVBUSOBSERVER_H |
19 #define C_USBVBUSOBSERVER_H |
21 |
20 |
22 #include <e32base.h> |
21 #include <e32base.h> |
39 */ |
38 */ |
40 virtual void VBusUpL() = 0; |
39 virtual void VBusUpL() = 0; |
41 /** |
40 /** |
42 * error handler |
41 * error handler |
43 * @param aError error code |
42 * @param aError error code |
44 */ |
43 */ |
45 virtual void VBusObserverErrorL(TInt aError)=0; |
44 virtual void VBusObserverErrorL(TInt aError)=0; |
46 |
45 |
47 }; |
46 }; |
48 |
47 |
49 /** |
48 /** |
78 |
77 |
79 /** |
78 /** |
80 * Adds observer to a list |
79 * Adds observer to a list |
81 * @param aObserver observer |
80 * @param aObserver observer |
82 */ |
81 */ |
83 void SubscribeL(MUsbVBusObserver* aObserver); |
82 void SubscribeL(MUsbVBusObserver& aObserver); |
84 |
83 |
85 /** |
84 /** |
86 * removes observer from list |
85 * removes observer from list |
87 * @param aObserver observer |
86 * @param aObserver observer |
88 */ |
87 */ |
89 void UnsubscribeL(MUsbVBusObserver* aObserver); |
88 void UnsubscribeL(MUsbVBusObserver& aObserver); |
90 |
89 |
91 private: |
90 private: |
92 |
91 |
93 // From CActive |
92 // From CActive |
94 /** |
93 /** |
126 private: |
125 private: |
127 // data |
126 // data |
128 |
127 |
129 /** |
128 /** |
130 * The observer reports state changes to own observers |
129 * The observer reports state changes to own observers |
131 * Own |
130 * Not owns |
132 */ |
131 */ |
133 RPointerArray<MUsbVBusObserver> iObservers; |
132 RPointerArray<MUsbVBusObserver> iObservers; |
134 |
133 |
135 /** |
134 /** |
136 * The observer observes property change |
135 * The observer observes property change |