|
1 /* |
|
2 * Copyright (c) 2009 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: Special AT command handler |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_CDUNATSPECIALCMDHANDLER_H |
|
19 #define C_CDUNATSPECIALCMDHANDLER_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <badesca.h> |
|
23 |
|
24 const TInt KInputBufLength = (512 + 1); // 512 chars for command + <CR> |
|
25 |
|
26 /** |
|
27 * Class for special AT command handler |
|
28 * |
|
29 * @lib dunatext.lib |
|
30 * @since S60 v5.0 |
|
31 */ |
|
32 NONSHARABLE_CLASS( CDunAtSpecialCmdHandler ) : public CBase |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 * @param None |
|
40 * @return Instance of self |
|
41 */ |
|
42 static CDunAtSpecialCmdHandler* NewL(); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 ~CDunAtSpecialCmdHandler(); |
|
48 |
|
49 public: |
|
50 |
|
51 TBool IsCompleteSubCommand(TChar aCharacter); |
|
52 TBool IsCompleteSubCommand(TDesC8& aDes, TInt aStartIndex, TInt& aEndIndex); |
|
53 |
|
54 private: |
|
55 |
|
56 CDunAtSpecialCmdHandler(); |
|
57 |
|
58 void ConstructL(); |
|
59 |
|
60 TBool IsDataReadyForComparison(TInt aLength); |
|
61 TInt MinimumLength(); |
|
62 |
|
63 |
|
64 private: // data |
|
65 /** |
|
66 * Buffer for temporary AT command input |
|
67 */ |
|
68 TBuf8<KInputBufLength> iBuffer; |
|
69 |
|
70 /** |
|
71 * Special commands for parsing |
|
72 */ |
|
73 CDesC8Array *iSpecialCmds; |
|
74 }; |
|
75 |
|
76 #endif // C_CDUNATSPECIALCMDHANDLER_H |