equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2010 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: |
|
15 * |
|
16 */ |
|
17 #include <telconfigcrkeys.h> // KCRUidTelephonyConfiguration |
|
18 #include <centralrepository.h> |
|
19 |
|
20 #include "matchphnumberutil.h" |
|
21 |
|
22 // Constants |
|
23 const int KDefaultGsmNumberMatchLength = 7; //matching unique ph numbers |
|
24 |
|
25 int MatchPhNumberUtil::matchDigits() |
|
26 { |
|
27 // Read the amount of digits to be used in contact matching |
|
28 // The key is owned by PhoneApp |
|
29 CRepository* repository = CRepository::NewLC(KCRUidTelConfiguration); |
|
30 int matchDigitCount = 0; |
|
31 if ( repository->Get(KTelMatchDigits, matchDigitCount) == KErrNone ) |
|
32 { |
|
33 // Min is 7 |
|
34 matchDigitCount = Max(matchDigitCount, KDefaultGsmNumberMatchLength); |
|
35 } |
|
36 CleanupStack::PopAndDestroy(); // repository |
|
37 |
|
38 return matchDigitCount; |
|
39 |
|
40 } |
|
41 |
|
42 |
|
43 |
|
44 // EOF |
|
45 |