1 /* |
1 /* |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
43 |
43 |
44 /** |
44 /** |
45 * Destructor. |
45 * Destructor. |
46 */ |
46 */ |
47 ~CDunAtSpecialCmdHandler(); |
47 ~CDunAtSpecialCmdHandler(); |
48 |
48 |
49 public: |
49 public: |
50 |
50 |
51 TBool IsCompleteSubCommand(TChar aCharacter); |
51 /** |
52 TBool IsCompleteSubCommand(TDesC8& aDes, TInt aStartIndex, TInt& aEndIndex); |
52 * Checks if the command has to be treated special way. |
|
53 * For example in case of MAC, it sends command AT&FE0Q0V1&C1&D2+IFC=3,1. |
|
54 * meaning there is no delimiters in the command. |
|
55 * In case of MAC we try to search AT&F (sub command) string from the |
|
56 * beginning of the command. |
|
57 * Search is done string basis. |
|
58 * |
|
59 * @since TB9.2 |
|
60 * @param aCharacter Character to add |
|
61 * @return ETrue if data is ready for comparison, EFalse otherwise |
|
62 */ |
|
63 TBool IsCompleteSubCommand( TChar aCharacter ); |
|
64 |
|
65 /** |
|
66 * Resets the buffer used for comparisons |
|
67 * |
|
68 * @since TB9.2 |
|
69 * @return None |
|
70 */ |
|
71 void ResetComparisonBuffer(); |
53 |
72 |
54 private: |
73 private: |
55 |
74 |
56 CDunAtSpecialCmdHandler(); |
75 CDunAtSpecialCmdHandler(); |
57 |
76 |
58 void ConstructL(); |
77 void ConstructL(); |
59 |
78 |
60 TBool IsDataReadyForComparison(TInt aLength); |
79 /** |
|
80 * Defines when comparison is excecuted, checks if the data lengths are |
|
81 * equal. |
|
82 * |
|
83 * @since TB9.2 |
|
84 * @return ETrue if data is ready for comparison, EFalse otherwise |
|
85 */ |
|
86 TBool IsDataReadyForComparison( TInt aLength ); |
|
87 |
|
88 /** |
|
89 * Defines minimum length of the special commands. |
|
90 * |
|
91 * @since TB9.2 |
|
92 * @return Minimum length of the special commands |
|
93 */ |
61 TInt MinimumLength(); |
94 TInt MinimumLength(); |
62 |
95 |
|
96 private: // data |
63 |
97 |
64 private: // data |
|
65 /** |
98 /** |
66 * Buffer for temporary AT command input |
99 * Buffer for temporary AT command input |
67 */ |
100 */ |
68 TBuf8<KInputBufLength> iBuffer; |
101 TBuf8<KInputBufLength> iBuffer; |
69 |
102 |
70 /** |
103 /** |
71 * Special commands for parsing |
104 * Special commands for parsing |
72 */ |
105 */ |
73 CDesC8Array *iSpecialCmds; |
106 CDesC8Array *iSpecialCmds; |
|
107 |
74 }; |
108 }; |
75 |
109 |
76 #endif // C_CDUNATSPECIALCMDHANDLER_H |
110 #endif // C_CDUNATSPECIALCMDHANDLER_H |