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