1 // Copyright (c) 1996-2010 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of the License "Eclipse Public License v1.0" |
4 // under the terms of the License "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
71 captureKey.iKeyCodePattern.iFiller = aPriority;// Priority is stored in spare data member 'iFiller' |
67 captureKey.iKeyCodePattern.iFiller = aPriority;// Priority is stored in spare data member 'iFiller' |
72 CheckCaptureKey(captureKey); |
68 CheckCaptureKey(captureKey); |
73 User::LeaveIfError(iCKarray.Insert(captureKey,0)); |
69 User::LeaveIfError(iCKarray.Insert(captureKey,0)); |
74 } |
70 } |
75 |
71 |
76 /** |
|
77 @note This function can Leave and does not obey the |
|
78 coding standard |
|
79 */ |
|
80 EXPORT_C void CCaptureKeys::SetCaptureKey(TUint32 aHandle, const TCaptureKey& aCaptureKey) |
72 EXPORT_C void CCaptureKeys::SetCaptureKey(TUint32 aHandle, const TCaptureKey& aCaptureKey) |
81 // |
73 // |
82 // Finds the first capture-key from the list that matches the handle and sets |
74 // Finds the first capture-key from the list that matches the handle and sets |
83 // it to the new value. |
75 // it to the new value. |
84 // |
76 // |
85 { |
77 { |
86 |
78 |
87 SetCaptureKey(aHandle,aCaptureKey,0); |
79 SetCaptureKey(aHandle,aCaptureKey,0); |
88 } |
80 } |
89 |
81 |
90 /** |
|
91 @note This function can Leave and does not obey the |
|
92 coding standard |
|
93 */ |
|
94 EXPORT_C void CCaptureKeys::SetCaptureKey(TUint32 aHandle, const TCaptureKey& aCaptureKey, TUint8 aPriority) |
82 EXPORT_C void CCaptureKeys::SetCaptureKey(TUint32 aHandle, const TCaptureKey& aCaptureKey, TUint8 aPriority) |
95 // |
83 // |
96 // Finds the first capture-key from the list that matches the handle and sets |
84 // Finds the first capture-key from the list that matches the handle and sets |
97 // it to the new value. |
85 // it to the new value. |
98 // |
86 // |
104 TCaptureKey ck; |
92 TCaptureKey ck; |
105 ck.iHandle=aHandle; |
93 ck.iHandle=aHandle; |
106 TInt r=iCKarray.Find(ck); |
94 TInt r=iCKarray.Find(ck); |
107 if (r>=0) |
95 if (r>=0) |
108 iCKarray[r]=captureKey; |
96 iCKarray[r]=captureKey; |
|
97 } |
|
98 |
|
99 void CCaptureKeys::removeCaptureKey(TUint aIndex) |
|
100 // |
|
101 // Removes the capture-key at the given aIndex from the list |
|
102 // |
|
103 { |
|
104 |
|
105 iCKarray.Remove(aIndex); |
109 } |
106 } |
110 |
107 |
111 EXPORT_C void CCaptureKeys::CancelCaptureKey(TUint32 aHandle) |
108 EXPORT_C void CCaptureKeys::CancelCaptureKey(TUint32 aHandle) |
112 // |
109 // |
113 // Removes the first capture-key from the list that matches the handle; |
110 // Removes the first capture-key from the list that matches the handle; |