|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @publishedAll |
|
19 @released |
|
20 */ |
|
21 |
|
22 #ifndef REMCONBATTERYTARGET_H |
|
23 #define REMCONBATTERYTARGET_H |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <remcon/remconinterfacebase.h> |
|
27 #include <remcon/remconinterfaceif.h> |
|
28 |
|
29 class MRemConBatteryTargetObserver; |
|
30 class MRemConCoreApiTargetObserver; |
|
31 class CRemConInterfaceSelector; |
|
32 |
|
33 /** |
|
34 Client-instantiable type supporting sending Battery Status responses. |
|
35 */ |
|
36 NONSHARABLE_CLASS(CRemConBatteryApiTarget) : public CRemConInterfaceBase, |
|
37 public MRemConInterfaceIf |
|
38 { |
|
39 public: |
|
40 /** |
|
41 Factory function. |
|
42 @see CRemConInterfaceSelector |
|
43 @see MRemConBatteryTargetObserver |
|
44 @param aInterfaceSelector The interface selector. The client must have |
|
45 created one of these first. |
|
46 @param aObserver The observer of this interface. |
|
47 @return A new CRemConBatteryApiTarget, owned by the interface selector. |
|
48 */ |
|
49 IMPORT_C static CRemConBatteryApiTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector, |
|
50 MRemConBatteryTargetObserver& aObserver); |
|
51 |
|
52 /** Destructor */ |
|
53 IMPORT_C ~CRemConBatteryApiTarget(); |
|
54 |
|
55 private: |
|
56 /** |
|
57 Constructor. |
|
58 @param aInterfaceSelector The interface selector. |
|
59 @param aObserver The observer of this interface. |
|
60 */ |
|
61 CRemConBatteryApiTarget(CRemConInterfaceSelector& aInterfaceSelector, |
|
62 MRemConBatteryTargetObserver& aObserver); |
|
63 |
|
64 void ConstructL(); |
|
65 |
|
66 private: // from CRemConInterfaceBase |
|
67 TAny* GetInterfaceIf(TUid aUid); |
|
68 |
|
69 private: // from MRemConInterfaceIf |
|
70 void MrcibNewMessage(TUint aOperationId, const TDesC8& aData); |
|
71 |
|
72 private: // unowned |
|
73 MRemConBatteryTargetObserver& iObserver; |
|
74 |
|
75 private: // owned |
|
76 CBufFlat* iOutData; |
|
77 |
|
78 |
|
79 }; |
|
80 |
|
81 #endif // REMCONBATTERYTARGET_H |