|
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: Defination of class CMCSInterface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __MCSMCINTERFACE_H |
|
20 #define __MCSMCINTERFACE_H |
|
21 |
|
22 #include <liwcommon.h> |
|
23 #include <liwserviceifbase.h> |
|
24 #include <liwbufferextension.h> |
|
25 |
|
26 class CMCSService; |
|
27 class TMenuItem; |
|
28 /** |
|
29 * This class provides the MCS SAPI interface to LIW Framework |
|
30 */ |
|
31 class CMCSMCInterface : public CBase, public MLiwInterface |
|
32 { |
|
33 |
|
34 public: |
|
35 |
|
36 /** |
|
37 * Two-phased constructor. |
|
38 * @return CMCSMCInterface* |
|
39 */ |
|
40 static CMCSMCInterface* NewL(const TDesC& aContent); |
|
41 |
|
42 /** |
|
43 * Destructor. |
|
44 */ |
|
45 virtual ~CMCSMCInterface(); |
|
46 |
|
47 private: |
|
48 |
|
49 /** |
|
50 * Constructor |
|
51 */ |
|
52 CMCSMCInterface(); |
|
53 |
|
54 /** |
|
55 * Symbian Constructor |
|
56 */ |
|
57 void ConstructL(const TDesC& aContent); |
|
58 |
|
59 // MLiwInterface member functions |
|
60 public: |
|
61 |
|
62 /** |
|
63 * Executes the SAPI as per params |
|
64 * @param aCmdName Command name defining which operation is to be performed |
|
65 * @param aInParamList Input param list |
|
66 * @param aOutParamList Output list |
|
67 * @param aCmdOptions Command option |
|
68 * @param aCallback Callback object pointer |
|
69 */ |
|
70 virtual void ExecuteCmdL( const TDesC8& aCmdName, |
|
71 const CLiwGenericParamList& aInParamList, |
|
72 CLiwGenericParamList& aOutParamList, |
|
73 TUint aCmdOptions = 0, |
|
74 MLiwNotifyCallback* aCallback = 0 ); |
|
75 |
|
76 /** |
|
77 * Closes the interface |
|
78 */ |
|
79 virtual void Close(); |
|
80 |
|
81 /** |
|
82 * Static Functions |
|
83 * |
|
84 * Same functionality required outside the CMCSMCInterface class in case of async |
|
85 * operation. Those set of functions can be given as static. |
|
86 */ |
|
87 public: |
|
88 |
|
89 /** |
|
90 * Converts symbian errcode to equivalent SAPI error code |
|
91 * @param aErrorCode Symbian error code |
|
92 * |
|
93 * @return mapped SAPI error code |
|
94 */ |
|
95 static TInt32 ErrCodeConversion(TInt aErrorCode); |
|
96 |
|
97 private: |
|
98 |
|
99 /** |
|
100 * Issues GetRunningApplications |
|
101 * @param aInParamList Input param list |
|
102 * @param aCallback Callback object pointer |
|
103 * @return void |
|
104 */ |
|
105 void GetRunningAppsL (const CLiwGenericParamList& aInParamList, |
|
106 MLiwNotifyCallback* aCallback ); |
|
107 |
|
108 /** |
|
109 * Issues ExecuteAction |
|
110 * @param aInParamList Input param list |
|
111 * @param aCallback Callback object pointer |
|
112 * @return void |
|
113 */ |
|
114 void ExecuteActionL( const CLiwGenericParamList& aInParamList, |
|
115 MLiwNotifyCallback* aCallback ); |
|
116 |
|
117 /** |
|
118 * Issues Organize |
|
119 * @param aInParamList Input param list |
|
120 * @param aOutParamList Output param list |
|
121 * @param aCallback Callback object pointer |
|
122 * @return void |
|
123 */ |
|
124 void OrganizeL( const CLiwGenericParamList& aInParamList, |
|
125 CLiwGenericParamList& aOutParamList, |
|
126 MLiwNotifyCallback* aCallback ); |
|
127 |
|
128 /** |
|
129 * Issues GetGenericParam |
|
130 * @param aInputMap input map |
|
131 * @param aParamName name of parameter |
|
132 * @param aOutputList output parameter |
|
133 * @return TBool return true if exist at least one element in list |
|
134 */ |
|
135 TBool GetParamFromMapL( const CLiwMap* aInputMap, |
|
136 const TDesC8& aParamName, RArray<TInt>& aOutputList); |
|
137 |
|
138 /** |
|
139 * Issues GetGenericParam |
|
140 * @param aInputMap Input map |
|
141 * @param aParamName name of parameter |
|
142 * @param aOutputValue output parameter |
|
143 * @return TBool return true if exist expcected param |
|
144 */ |
|
145 TBool GetParamFromMapL( const CLiwMap* aInputMap, |
|
146 const TDesC8& aParamName, TInt& aOutputValue); |
|
147 |
|
148 private: |
|
149 |
|
150 /** |
|
151 * CMCSService class pointer |
|
152 */ |
|
153 CMCSService* iMCSService; |
|
154 |
|
155 }; |
|
156 |
|
157 |
|
158 #endif // __MCSMCINTERFACE_H |
|
159 |
|
160 // End of file |