|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef PDASYCMDHANDLER_H |
|
19 #define PDASYCMDHANDLER_H |
|
20 |
|
21 // SYSTEM INCLUDE FILES |
|
22 #include <AsyCommandHandlerBase.h> |
|
23 |
|
24 // USER INCLUDE FILES |
|
25 #include "pdasycmdhandlerinterface.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CPDAsyMainService; |
|
29 |
|
30 // DATA TYPES |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * CPDAsyCmdHandler is responsible for handling commands sent by Acc FW. |
|
36 * |
|
37 * @lib None. |
|
38 * @since S60 TB9.2 |
|
39 */ |
|
40 NONSHARABLE_CLASS( CPDAsyCmdHandler ): |
|
41 public CASYCommandHandlerBase, |
|
42 public MPDAsyCmdHandler |
|
43 { |
|
44 public: |
|
45 |
|
46 /** |
|
47 * Symbian two phased constructors. |
|
48 * |
|
49 * @since S60 TB9.2 |
|
50 * @param None. |
|
51 * @return CPDAsyCmdHandler* |
|
52 */ |
|
53 static CPDAsyCmdHandler* NewL(); |
|
54 static CPDAsyCmdHandler* NewLC(); |
|
55 |
|
56 /** |
|
57 * Symbian two phased constructor. |
|
58 * |
|
59 * NOTE: These are only used for testing purposes! |
|
60 * |
|
61 * @since S60 TB9.2 |
|
62 * @param aCmdHandler Enternal response handler. |
|
63 * @param aMainServiceBase Main service. |
|
64 * @return CPDAsyCmdHandler* |
|
65 */ |
|
66 static CPDAsyCmdHandler* CreateTestInstanceL( |
|
67 MPDAsyCmdHandler* aCmdHandler, |
|
68 CASYMainServiceBase* aMainServiceBase ); |
|
69 |
|
70 /** |
|
71 * C++ destructor. |
|
72 */ |
|
73 virtual ~CPDAsyCmdHandler(); |
|
74 |
|
75 protected: // From base classes |
|
76 |
|
77 // @see CASYCommandHandlerBase |
|
78 virtual void ProcessCommandL( const TProcessCmdId aCommand, |
|
79 const TASYCmdParams& aCmdParams ); |
|
80 |
|
81 // @see MPDAsyCmdHandler |
|
82 virtual void ProcessResponse( const TAccValueTypeTBool aCmdResponse, |
|
83 TInt aErrCode ); |
|
84 |
|
85 // @see MPDAsyCmdHandler |
|
86 virtual void ProcessResponse( const TAccValueTypeTInt aCmdResponse, |
|
87 TInt aErrCode ); |
|
88 |
|
89 // @see MPDAsyCmdHandler |
|
90 virtual void ProcessResponse( const TDesC8& aCmdResponse, |
|
91 TInt aErrCode ); |
|
92 |
|
93 // @see MPDAsyCmdHandler |
|
94 virtual void ProcessResponse( const CAccPolObjectCon& aObjectCon, |
|
95 TInt aErrCode ); |
|
96 |
|
97 // @see MPDAsyCmdHandler |
|
98 virtual void ObjectConDataFromProxy( |
|
99 CAccPolObjectCon& aObjectCon ) const; |
|
100 |
|
101 private: |
|
102 |
|
103 // Helper function to get pointer to Plugged Display ASY main service |
|
104 CPDAsyMainService* MainService(); |
|
105 |
|
106 private: |
|
107 |
|
108 CPDAsyCmdHandler(); |
|
109 void ConstructL( MPDAsyCmdHandler* aCmdHandler = NULL, |
|
110 CASYMainServiceBase* aMainServiceBase = NULL ); |
|
111 |
|
112 private: // Data |
|
113 |
|
114 /** ASY command handler interface, not owned */ |
|
115 MPDAsyCmdHandler* iCmdHandler; |
|
116 |
|
117 /** ASY main service, not owned */ |
|
118 CASYMainServiceBase* iMainService; |
|
119 }; |
|
120 |
|
121 #endif // PDASYCMDHANDLER_H |