|
1 /* |
|
2 * Copyright (c) 2006 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: Phone number |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef TPHCNTNUMBER_H |
|
20 #define TPHCNTNUMBER_H |
|
21 |
|
22 #include <e32std.h> |
|
23 |
|
24 #include "MPhCntMatch.h" |
|
25 |
|
26 /** |
|
27 * Represents phone number. |
|
28 * |
|
29 * @lib PhoneCntFinder |
|
30 * @since S60 v3,1 |
|
31 */ |
|
32 class TPhCntNumber |
|
33 { |
|
34 |
|
35 public: |
|
36 /** |
|
37 * Constructor. |
|
38 * |
|
39 * @since S60 v3.1 |
|
40 * @param aNumber Phone number. Given number has to stay accessible |
|
41 * as long as this class is used. Does not copy the number. |
|
42 * @param aNumberType Number's type. |
|
43 * @param aSpeedDialPosition Speed dial position (a value between 1 and 9). |
|
44 */ |
|
45 TPhCntNumber( const TDesC& aNumber, MPhCntMatch::TNumberType aNumberType, TInt aSpeedDialPosition ); |
|
46 |
|
47 /** |
|
48 * Constructs empty number. |
|
49 * |
|
50 * @since S60 v3.2. |
|
51 */ |
|
52 TPhCntNumber(); |
|
53 |
|
54 /** |
|
55 * Gives the number |
|
56 * |
|
57 * @since S60 v3.1 |
|
58 * @return Number |
|
59 */ |
|
60 const TDesC& Number() const; |
|
61 |
|
62 /** |
|
63 * Gives the number type |
|
64 * |
|
65 * @since S60 v3.1 |
|
66 * @return Number type |
|
67 */ |
|
68 MPhCntMatch::TNumberType Type() const; |
|
69 |
|
70 /** |
|
71 * Gives the speed dial position |
|
72 * |
|
73 * @since S60 v3.2 |
|
74 * @return Position |
|
75 */ |
|
76 TInt Position() const; |
|
77 |
|
78 /** |
|
79 * Sets the number and its type. Note that ownership of the data is |
|
80 * not taken ie the data has to live as long as this instance. |
|
81 * |
|
82 * @since S60 v3.2. |
|
83 * @param aNumber Phone number. Given number has to stay accessible |
|
84 * as long as this class is used. Does not copy the number. |
|
85 * @param aNumberType Number's type. |
|
86 * @param aSpeedDialPosition Speed dial position or 0. |
|
87 */ |
|
88 void Set( const TDesC& aNumber, MPhCntMatch::TNumberType aNumberType, TInt aSpeedDialPosition ); |
|
89 |
|
90 private: // data |
|
91 |
|
92 /** |
|
93 * Phone number. |
|
94 */ |
|
95 TPtrC iNumber; |
|
96 |
|
97 /** |
|
98 * Number's type. |
|
99 */ |
|
100 MPhCntMatch::TNumberType iNumberType; |
|
101 |
|
102 /** |
|
103 * Speed dial position. |
|
104 */ |
|
105 TInt iSpeedDialPosition; |
|
106 |
|
107 }; |
|
108 |
|
109 #endif // TPHCNTNUMBER_H |