equal
deleted
inserted
replaced
21 #include <atextpluginbase.h> |
21 #include <atextpluginbase.h> |
22 #include <etelmm.h> |
22 #include <etelmm.h> |
23 |
23 |
24 #include "atcommandparser.h" |
24 #include "atcommandparser.h" |
25 |
25 |
|
26 class MATCmdBase; |
|
27 class CATCmdAsyncBase; |
|
28 class CATCmdSyncBase; |
|
29 |
26 /** Character types: carriage return, line feed or backspace */ |
30 /** Character types: carriage return, line feed or backspace */ |
27 enum TCharacterTypes |
31 enum TCharacterTypes |
28 { |
32 { |
29 ECharTypeCR, // Carriage return |
33 ECharTypeCR, // Carriage return |
30 ECharTypeLF, // Line feed |
34 ECharTypeLF, // Line feed |
36 { |
40 { |
37 EModeTypeQuiet, // Quiet mode |
41 EModeTypeQuiet, // Quiet mode |
38 EModeTypeVerbose // Verbose mode |
42 EModeTypeVerbose // Verbose mode |
39 }; |
43 }; |
40 |
44 |
41 |
|
42 class MATMiscCmdPlugin; |
|
43 |
|
44 |
|
45 /** |
|
46 * Class for common AT command handler interface |
|
47 */ |
|
48 NONSHARABLE_CLASS( CATCmdAsyncBase ) : public CActive |
|
49 { |
|
50 public: |
|
51 virtual ~CATCmdAsyncBase() {}; |
|
52 CATCmdAsyncBase(MATMiscCmdPlugin* aCallback, TAtCommandParser& aATCmdParser, RMobilePhone& aPhone); |
|
53 |
|
54 /** |
|
55 * @see CATExtPluginBase::HandleCommand |
|
56 */ |
|
57 virtual void HandleCommand( const TDesC8& aCmd, |
|
58 RBuf8& aReply, |
|
59 TBool aReplyNeeded ) = 0; |
|
60 |
|
61 /** |
|
62 * @see CATExtPluginBase::HandleCommandCancel |
|
63 */ |
|
64 virtual void HandleCommandCancel() = 0; |
|
65 |
|
66 protected: |
|
67 MATMiscCmdPlugin* iCallback; |
|
68 TAtCommandParser& iATCmdParser; |
|
69 RMobilePhone& iPhone; |
|
70 }; |
|
71 |
45 |
72 /** |
46 /** |
73 * Class for accessing plugin information and common functionality |
47 * Class for accessing plugin information and common functionality |
74 */ |
48 */ |
75 NONSHARABLE_CLASS( MATMiscCmdPlugin ) |
49 NONSHARABLE_CLASS( MATMiscCmdPlugin ) |
171 private: |
145 private: |
172 CATMiscCmdPlugin(); |
146 CATMiscCmdPlugin(); |
173 void ConstructL(); |
147 void ConstructL(); |
174 |
148 |
175 TInt CreatePartOfReply( RBuf8& aBuffer ); |
149 TInt CreatePartOfReply( RBuf8& aBuffer ); |
|
150 void HandleCMEECommand(); |
176 |
151 |
177 /* |
152 /* |
178 * Utility function that connect to Etel server and establish a subsession to RMobilePhone |
153 * Utility function that connect to Etel server and establish a subsession to RMobilePhone |
179 * Caller must close session and subsession after use. |
154 * Caller must close session and subsession after use. |
180 * @param aTelServer returns session to ETel |
155 * @param aTelServer returns session to ETel |
189 RMobilePhone iPhone; |
164 RMobilePhone iPhone; |
190 /** |
165 /** |
191 * Current AT command handler in. |
166 * Current AT command handler in. |
192 * Used when IsCommandSupported() detects a matching handler class. |
167 * Used when IsCommandSupported() detects a matching handler class. |
193 */ |
168 */ |
194 CATCmdAsyncBase* iCurrentHandler; |
169 MATCmdBase* iCurrentHandler; |
195 |
170 |
196 CATCmdAsyncBase* iCLCKHandler; |
171 CATCmdAsyncBase* iCLCKHandler; |
197 CATCmdAsyncBase* iCPWDHandler; |
172 CATCmdAsyncBase* iCPWDHandler; |
198 CATCmdAsyncBase* iCPINHandler; |
173 CATCmdAsyncBase* iCPINHandler; |
199 CATCmdAsyncBase* iCUSDHandler; |
174 CATCmdSyncBase* iCUSDHandler; |
200 CATCmdAsyncBase* iCNUMHandler; |
175 CATCmdAsyncBase* iCNUMHandler; |
201 CATCmdAsyncBase* iCFUNHandler; |
176 CATCmdAsyncBase* iCFUNHandler; |
202 CATCmdAsyncBase* iCBCHandler; |
177 CATCmdAsyncBase* iCBCHandler; |
203 |
178 |
204 /** |
179 /** |
215 |
190 |
216 /** |
191 /** |
217 * Global reply buffer for the AT command replies |
192 * Global reply buffer for the AT command replies |
218 */ |
193 */ |
219 RBuf8 iReplyBuffer; |
194 RBuf8 iReplyBuffer; |
|
195 |
|
196 /** |
|
197 * +CME error level |
|
198 */ |
|
199 TInt iErrorLevel; |
220 }; |
200 }; |
221 |
201 |
222 #endif // ATMISCCMDPLUGIN_H |
202 #endif // ATMISCCMDPLUGIN_H |
223 |
203 |