|
1 /* |
|
2 * Copyright (c) 2002-2005 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: trigger string implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDES |
|
20 #include "peninputhwrtriggerstr.h" |
|
21 |
|
22 // --------------------------------------------------------- |
|
23 // destructor |
|
24 // --------------------------------------------------------- |
|
25 // |
|
26 CAknFepHwrTriggerStr::~CAknFepHwrTriggerStr() |
|
27 { |
|
28 } |
|
29 |
|
30 // --------------------------------------------------------- |
|
31 // Append the char code to trigger string |
|
32 // --------------------------------------------------------- |
|
33 // |
|
34 void CAknFepHwrTriggerStr::Append( const TDesC& aChar ) |
|
35 { |
|
36 const TInt len = aChar.Length()+ iString.Length(); |
|
37 if ( len <= iString.MaxLength()) |
|
38 { |
|
39 iString.Append( aChar ); |
|
40 } |
|
41 } |
|
42 |
|
43 // --------------------------------------------------------- |
|
44 // Set the char code to trigger string |
|
45 // --------------------------------------------------------- |
|
46 // |
|
47 void CAknFepHwrTriggerStr::Set( const TDesC& aChar ) |
|
48 { |
|
49 if ( aChar.Length() <= iString.MaxLength() ) |
|
50 { |
|
51 iString.Zero(); |
|
52 iString.Append( aChar ); |
|
53 } |
|
54 } |
|
55 |
|
56 // --------------------------------------------------------- |
|
57 // Using the last char code as trigger string |
|
58 // --------------------------------------------------------- |
|
59 // |
|
60 void CAknFepHwrTriggerStr::SetLast() |
|
61 { |
|
62 iString.Delete( 0, iString.Length() - 1 ); |
|
63 } |
|
64 |
|
65 // --------------------------------------------------------- |
|
66 // Get trigger string |
|
67 // --------------------------------------------------------- |
|
68 // |
|
69 TDesC& CAknFepHwrTriggerStr::GetString() |
|
70 { |
|
71 return iString; |
|
72 } |
|
73 |
|
74 // End Of File |