44
|
1 |
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// @file atclcc.h
|
|
15 |
// This contains CATClcc which query incoming or waitting call information.
|
|
16 |
//
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef ATCLCC_H_
|
|
20 |
#define ATCLCC_H_
|
|
21 |
|
|
22 |
//system include
|
|
23 |
|
|
24 |
//user include
|
|
25 |
#include "atcommandbase.h"
|
|
26 |
|
|
27 |
//class forward
|
|
28 |
class MCallInformationQueryCompleteNotify;
|
|
29 |
|
|
30 |
class CATClcc : public CAtCommandBase
|
|
31 |
{
|
|
32 |
public:
|
|
33 |
|
|
34 |
/**
|
|
35 |
* static NewL
|
|
36 |
*
|
|
37 |
* @param aGloblePhone
|
|
38 |
* @param aCtsyDispatcherCallback
|
|
39 |
*/
|
|
40 |
static CATClcc* NewL(CGlobalPhonemanager& aGloblePhone,
|
|
41 |
CCtsyDispatcherCallback& aCtsyDispatcherCallback);
|
|
42 |
|
|
43 |
/**
|
|
44 |
* static NewLC
|
|
45 |
*
|
|
46 |
* @param aGloblePhone
|
|
47 |
* @param aCtsyDispatcherCallback
|
|
48 |
*/
|
|
49 |
static CATClcc* NewLC(CGlobalPhonemanager& aGloblePhone,
|
|
50 |
CCtsyDispatcherCallback& aCtsyDispatcherCallback);
|
|
51 |
|
|
52 |
/**
|
|
53 |
* Destructor
|
|
54 |
*
|
|
55 |
*/
|
|
56 |
virtual ~CATClcc();
|
|
57 |
|
|
58 |
/**
|
|
59 |
* Virtual function. Inherited from CAtCommandBase
|
|
60 |
*
|
|
61 |
* Execute AT Command
|
|
62 |
*/
|
|
63 |
virtual void ExecuteCommand();
|
|
64 |
|
|
65 |
/**
|
|
66 |
* Will be called by AT Manager whenever a event was triggered
|
|
67 |
*
|
|
68 |
* @param aEventSource
|
|
69 |
* @param aStatus
|
|
70 |
*/
|
|
71 |
virtual void EventSignal(TAtEventSource aEventSource, TInt aStatus);
|
|
72 |
|
|
73 |
/**
|
|
74 |
* Virtual function. Inherited from CAtCommandBase
|
|
75 |
*
|
|
76 |
* @param aResponseBuf Line buf reading from baseband
|
|
77 |
*/
|
|
78 |
virtual void ParseResponseL(const TDesC8& aResponseBuf);
|
|
79 |
|
|
80 |
/**
|
|
81 |
* Start AT request
|
|
82 |
*
|
|
83 |
*/
|
|
84 |
virtual void StartRequest();
|
|
85 |
|
|
86 |
/**
|
|
87 |
* Init member variable
|
|
88 |
*
|
|
89 |
*/
|
|
90 |
void InitVariable();
|
|
91 |
|
|
92 |
/**
|
|
93 |
* Add query call information complete obsever
|
|
94 |
*
|
|
95 |
*/
|
|
96 |
void AddQueryCallInformationCompleteNotify(MCallInformationQueryCompleteNotify* aQueryCallInfoNotify);
|
|
97 |
|
|
98 |
public:
|
|
99 |
|
|
100 |
/**
|
|
101 |
* AT execute result
|
|
102 |
*
|
|
103 |
*/
|
|
104 |
enum TATProcessStates
|
|
105 |
{
|
|
106 |
EProcessNotInProgress,
|
|
107 |
EProcessInProgress,
|
|
108 |
EProcessError,
|
|
109 |
EProcessOK
|
|
110 |
};
|
|
111 |
|
|
112 |
/**
|
|
113 |
* Get AT Process status
|
|
114 |
*
|
|
115 |
*/
|
|
116 |
TATProcessStates GetProcessStates() const;
|
|
117 |
|
|
118 |
/**
|
|
119 |
* Set AT Process status
|
|
120 |
*
|
|
121 |
*/
|
|
122 |
void SetProcessStates(TATProcessStates aProcessState);
|
|
123 |
|
|
124 |
protected:
|
|
125 |
|
|
126 |
/**
|
|
127 |
* Constructor
|
|
128 |
*
|
|
129 |
* @param aGloblePhone
|
|
130 |
* @param aCtsyDispatcherCallback
|
|
131 |
*/
|
|
132 |
CATClcc(CGlobalPhonemanager& aGloblePhone,
|
|
133 |
CCtsyDispatcherCallback& aCtsyDispatcherCallback);
|
|
134 |
|
|
135 |
/**
|
|
136 |
* 2nd Constructor
|
|
137 |
*/
|
|
138 |
void ConstructL();
|
|
139 |
|
|
140 |
/**
|
|
141 |
* The last execute end of this command
|
|
142 |
*
|
|
143 |
*/
|
|
144 |
virtual void Complete();
|
|
145 |
|
|
146 |
private:
|
|
147 |
|
|
148 |
/**
|
|
149 |
* Handle IO errors
|
|
150 |
*
|
|
151 |
*/
|
|
152 |
void HandleIOError();
|
|
153 |
|
|
154 |
/**
|
|
155 |
* Handle response error
|
|
156 |
*
|
|
157 |
*/
|
|
158 |
void HandleResponseError();
|
|
159 |
|
|
160 |
/**
|
|
161 |
* Handle response OK
|
|
162 |
*
|
|
163 |
*/
|
|
164 |
void HandleCLCCComplete();
|
|
165 |
|
|
166 |
/**
|
|
167 |
* Parse AT clcc result
|
|
168 |
*
|
|
169 |
*/
|
|
170 |
void ParseCLCCResponseL(const TDesC8& aResponseBuf);
|
|
171 |
|
|
172 |
private:
|
|
173 |
|
|
174 |
/**
|
|
175 |
* At step
|
|
176 |
*
|
|
177 |
*/
|
|
178 |
enum TATStep
|
|
179 |
{
|
|
180 |
EATNotInProgress,
|
|
181 |
EATWaitForWriteComplete,
|
|
182 |
EATReadComplete
|
|
183 |
};
|
|
184 |
|
|
185 |
private:
|
|
186 |
|
|
187 |
/**
|
|
188 |
* I/O error when Read or Write
|
|
189 |
* include timeout
|
|
190 |
*/
|
|
191 |
TInt iIOStatus;
|
|
192 |
|
|
193 |
/**
|
|
194 |
* At command return errors
|
|
195 |
*
|
|
196 |
*/
|
|
197 |
TInt iATResult;
|
|
198 |
|
|
199 |
/**
|
|
200 |
* Find OK result
|
|
201 |
*
|
|
202 |
*/
|
|
203 |
TBool iOKFounded;
|
|
204 |
|
|
205 |
/**
|
|
206 |
* Identifier step
|
|
207 |
*
|
|
208 |
*/
|
|
209 |
TATStep iATStep;
|
|
210 |
|
|
211 |
/**
|
|
212 |
* Process at command states
|
|
213 |
*
|
|
214 |
*/
|
|
215 |
TATProcessStates iProcessStates;
|
|
216 |
|
|
217 |
/**
|
|
218 |
* Observer which notify querying call information result
|
|
219 |
*
|
|
220 |
*/
|
|
221 |
MCallInformationQueryCompleteNotify* iQueryCallInfoNotify;
|
|
222 |
};
|
|
223 |
|
|
224 |
#endif /*ATCLCC_H_*/ |