|
1 /* |
|
2 * Copyright (c) 2010 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: Cps command buffer |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CAICPSCOMMANDBUFFER_H |
|
20 #define C_CAICPSCOMMANDBUFFER_H |
|
21 |
|
22 // System includes |
|
23 #include <e32base.h> |
|
24 |
|
25 // User includes |
|
26 #include <aicpscommandbuffer.h> |
|
27 |
|
28 // Forward declarations |
|
29 class CLiwGenericParamList; |
|
30 class CLiwServiceHandler; |
|
31 class CLiwCriteriaItem; |
|
32 class CAiCpsExecuteParam; |
|
33 class MLiwInterface; |
|
34 |
|
35 /** |
|
36 * AI Cps command buffer |
|
37 * |
|
38 * @ingroup group_aifw |
|
39 * @lib aifw |
|
40 * @since S60 v5.2 |
|
41 */ |
|
42 NONSHARABLE_CLASS( CAiCpsCommandBuffer ) : public CBase, |
|
43 public MAiCpsCommandBuffer |
|
44 { |
|
45 public: |
|
46 // constructors and destructor |
|
47 |
|
48 /** |
|
49 * Two-phased constructors. |
|
50 */ |
|
51 static CAiCpsCommandBuffer* NewL(); |
|
52 static CAiCpsCommandBuffer* NewLC(); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 ~CAiCpsCommandBuffer(); |
|
58 |
|
59 private: |
|
60 // constructors |
|
61 |
|
62 /** |
|
63 * C++ default constructor |
|
64 */ |
|
65 CAiCpsCommandBuffer(); |
|
66 |
|
67 /** |
|
68 * 2nd phase constructor |
|
69 */ |
|
70 void ConstructL(); |
|
71 |
|
72 public: |
|
73 // new function |
|
74 |
|
75 /** |
|
76 * Flushes command buffer |
|
77 * |
|
78 * @since S60 v5.2 |
|
79 */ |
|
80 void Flush(); |
|
81 |
|
82 private: |
|
83 // from MAiCpsCommandBuffer |
|
84 |
|
85 /** |
|
86 * @see MAiCpsCommandBuffer |
|
87 */ |
|
88 void AddCommand( const TDesC& aPluginId, const TDesC& aType, |
|
89 CLiwDefaultMap* aFilter, const TDesC8& aAction); |
|
90 |
|
91 private: |
|
92 // new functions |
|
93 /** |
|
94 * Gets the CPS interface |
|
95 * |
|
96 * @since S60 5.2 |
|
97 */ |
|
98 void GetCPSInterfaceL(); |
|
99 |
|
100 /** |
|
101 * Adds a CPS command execute commnad for a spcific Plugin |
|
102 * Note: aType and Filter will overwrite the previous value |
|
103 * |
|
104 * @since S60 5.2 |
|
105 * @param aPluginId plugin id. |
|
106 * @param aType type of the cps registry. |
|
107 * @param aFilter filter values. |
|
108 * @param aAction action trigger. |
|
109 */ |
|
110 void DoAddCommandL(const TDesC& aPluginId,const TDesC& aType, |
|
111 CLiwDefaultMap* aFilter, const TDesC8& aAction ); |
|
112 |
|
113 /** |
|
114 * Flush all the CPS execute commands.. |
|
115 * |
|
116 * @since S60 5.2 |
|
117 */ |
|
118 void DoFlushL(); |
|
119 |
|
120 private: |
|
121 // data |
|
122 /** |
|
123 * SAPI service handler. |
|
124 * Owned. |
|
125 */ |
|
126 CLiwServiceHandler* iServiceHandler; |
|
127 |
|
128 /** |
|
129 * CPS SAPI service. |
|
130 * Owned. |
|
131 */ |
|
132 CLiwCriteriaItem* iCpsService; |
|
133 |
|
134 /** |
|
135 * Provides hsps services. |
|
136 * Owned. |
|
137 */ |
|
138 MLiwInterface* iCpsInterface; |
|
139 |
|
140 /** |
|
141 * Plugins execute parameter array |
|
142 * Owned. |
|
143 */ |
|
144 RPointerArray<CAiCpsExecuteParam> iPlugins; |
|
145 }; |
|
146 |
|
147 #endif // C_CAICPSCOMMANDBUFFER_H |
|
148 |
|
149 // End of file |
|
150 |