1 /* |
|
2 * Copyright (c) 2007 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: Converter class for converting AIW paramerer list to |
|
15 * bt send parameter list |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef BTSSSENDLISTHANDLER_H |
|
21 #define BTSSSENDLISTHANDLER_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <AiwVariantType.hrh> |
|
25 #include <AiwVariant.h> |
|
26 #include <AiwGenericParam.h> |
|
27 #include <qvariant.h> |
|
28 #include <qlist.h> |
|
29 #include "btsendingservicedebug.h" |
|
30 |
|
31 class CBTServiceParameterList; |
|
32 |
|
33 /** |
|
34 * BTSSend list handler |
|
35 * Converts AIW list to bt sending object list |
|
36 * |
|
37 * @since S60 v3.2 |
|
38 */ |
|
39 class CBTSSSendListHandler : public CActive |
|
40 { |
|
41 |
|
42 public: |
|
43 |
|
44 static CBTSSSendListHandler* NewL(); |
|
45 static CBTSSSendListHandler* NewLC(); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~CBTSSSendListHandler(); |
|
51 |
|
52 /** |
|
53 * ConvertList |
|
54 * |
|
55 * @since S60 v3.2 |
|
56 * @param aOutParamList AIW parameter list |
|
57 * @param aList bt sending parameter list |
|
58 * @return error code |
|
59 */ |
|
60 TInt ConvertList(const QList<QVariant> *arguments,CBTServiceParameterList* aList ); |
|
61 |
|
62 |
|
63 |
|
64 // from base class CActive |
|
65 |
|
66 /** |
|
67 * From CActive. |
|
68 * RunL |
|
69 * |
|
70 * @since S60 v3.2 |
|
71 */ |
|
72 void RunL(); |
|
73 |
|
74 /** |
|
75 * From CActive. |
|
76 * DoCancel |
|
77 * |
|
78 * @since S60 v3.2 |
|
79 */ |
|
80 inline void DoCancel(); |
|
81 |
|
82 |
|
83 private: |
|
84 CBTSSSendListHandler(); |
|
85 |
|
86 void ConstructL(); |
|
87 |
|
88 /** |
|
89 * Add object |
|
90 * |
|
91 * @since S60 v3.2 |
|
92 */ |
|
93 void AddObject(); |
|
94 |
|
95 /** |
|
96 * Add object |
|
97 * |
|
98 * @since S60 v3.2 |
|
99 */ |
|
100 void DoAddObjectL(); |
|
101 |
|
102 private: // data |
|
103 |
|
104 /** |
|
105 * BT sending parameter list |
|
106 * Not own. |
|
107 */ |
|
108 CBTServiceParameterList* iList; |
|
109 |
|
110 /** |
|
111 * AIW parameter list |
|
112 * Not own. |
|
113 */ |
|
114 // const CAiwGenericParamList* iOutParamList; |
|
115 |
|
116 const QList<QVariant> *mArguments; |
|
117 |
|
118 /** |
|
119 * List index |
|
120 */ |
|
121 TInt iListIndex; |
|
122 |
|
123 /** |
|
124 * Sync waiter object |
|
125 */ |
|
126 CActiveSchedulerWait iSyncWaiter; |
|
127 }; |
|
128 |
|
129 |
|
130 // --------------------------------------------------------------------------- |
|
131 // From class CActive. |
|
132 // DoCancel() |
|
133 // --------------------------------------------------------------------------- |
|
134 // |
|
135 inline void CBTSSSendListHandler::DoCancel() |
|
136 { |
|
137 FLOG(_L("[BTSS]\t CBTSSSendListHandler::DoCancel()")); |
|
138 if ( iSyncWaiter.IsStarted() ) |
|
139 { |
|
140 iSyncWaiter.AsyncStop(); |
|
141 } |
|
142 FLOG(_L("[BTSS]\t CBTSSSendListHandler::DoCancel() done")); |
|
143 } |
|
144 |
|
145 #endif // BTSSSENDLISTHANDLER_H |
|