1 /* |
|
2 * Copyright (c) 2009 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 |
|
18 #ifndef MPHCNTMATCH_H |
|
19 #define MPHCNTMATCH_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <cntdef.h> // TContactItemId |
|
23 #include <badesca.h> |
|
24 |
|
25 class MVPbkContactLink; |
|
26 class CPhCntContactId; |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * Abstact match result. |
|
32 * |
|
33 * @lib PhoneCntFinder |
|
34 * @since 1.0 |
|
35 */ |
|
36 class MPhCntMatch |
|
37 { |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Enumerates CLI types. |
|
42 * |
|
43 * ECliEmpty - not set/found. |
|
44 * ECliNumber - phone number from contact. |
|
45 * ECliName - name from contact. |
|
46 * ECliCompany - company name from contact. |
|
47 */ |
|
48 enum TCliType |
|
49 { |
|
50 ECliEmpty, |
|
51 ECliNumber, |
|
52 ECliName, |
|
53 ECliCompany |
|
54 }; |
|
55 |
|
56 enum TNumberType |
|
57 { |
|
58 ENone = 0, |
|
59 EMobileNumber, |
|
60 EStandardNumber, |
|
61 EFaxNumber, |
|
62 EPagerNumber, |
|
63 EVoipNumber, |
|
64 EVideoNumber, |
|
65 EAssistantNumber, |
|
66 ECarNumber, |
|
67 EHomeNumber, |
|
68 EWorkNumber |
|
69 }; |
|
70 |
|
71 /** |
|
72 * To destroy the item. Must be called when item is not needed |
|
73 * any more. |
|
74 */ |
|
75 virtual void Release() = 0; |
|
76 |
|
77 /** |
|
78 * Contact id. |
|
79 * @return Contact finder contact id. |
|
80 */ |
|
81 virtual CPhCntContactId* ContactId() const = 0; |
|
82 |
|
83 /** |
|
84 * Get the number type. |
|
85 * @return Phonebook number type. |
|
86 */ |
|
87 virtual TNumberType NumberType() const = 0; |
|
88 |
|
89 /** |
|
90 * Get CLI value. |
|
91 * @param aCliText CLI is copied here. User must delete after usage. |
|
92 * @return CLI type. |
|
93 */ |
|
94 virtual TCliType Cli( HBufC*& aCliText ) const = 0; |
|
95 |
|
96 /** |
|
97 * First name field from contact. |
|
98 * @return Field text. Empty if there isn't one specified. |
|
99 */ |
|
100 virtual TPtrC FirstName() const = 0; |
|
101 |
|
102 /** |
|
103 * Last name field from contact. |
|
104 * @return Field text. Empty if there isn't one specified. |
|
105 */ |
|
106 virtual TPtrC LastName() const = 0; |
|
107 |
|
108 /** |
|
109 * Company name field from contact. |
|
110 * @return Field text. Empty if there isn't one specified. |
|
111 */ |
|
112 virtual TPtrC CompanyName() const = 0; |
|
113 |
|
114 /** |
|
115 * Number field from contact (from matched field). |
|
116 * @return Field text. Empty if there isn't one specified. |
|
117 */ |
|
118 virtual TPtrC Number() const = 0; |
|
119 |
|
120 /** |
|
121 * Ringing tone field from contact. |
|
122 * @return Field text. Empty if there isn't one specified. |
|
123 */ |
|
124 virtual TPtrC PersonalRingingTone() const = 0; |
|
125 |
|
126 /** |
|
127 * Find if contact belong to any contact groups given. |
|
128 * @param aGroupArray Compared contact groups. |
|
129 * @return ETrue is belogns at least one group from parameter. |
|
130 */ |
|
131 virtual TBool BelongsToGroups( |
|
132 const CArrayFix<TContactItemId>& aGroupArray ) const = 0; |
|
133 |
|
134 /** |
|
135 * Returns text to speech text for this contact. Used in |
|
136 * text to speech ringing tone. |
|
137 * @since Series 60 3.0 |
|
138 * @return descriptor, ownership passed. |
|
139 */ |
|
140 virtual HBufC* TextToSpeechTextL() const = 0; |
|
141 |
|
142 /** |
|
143 * Call text field from contact. |
|
144 * @since Series 60 3.1 |
|
145 * @return Field text. Empty if there isn't one specified. |
|
146 */ |
|
147 virtual TPtrC CallText() const = 0; |
|
148 |
|
149 /** |
|
150 * Call image field from contact. |
|
151 * @since Series 60 3.1 |
|
152 * @return Field text. Empty if there isn't one specified. |
|
153 */ |
|
154 virtual TPtrC CallImage() const = 0; |
|
155 |
|
156 /** |
|
157 * Can used to check if contact has a thumbnail image. |
|
158 * @since Series 60 3.1 |
|
159 * @return ETrue if has thumbnail, otherwise EFalse. |
|
160 */ |
|
161 virtual TBool HasThumbnailImage() const = 0; |
|
162 |
|
163 /** |
|
164 * Returns all dtmf numbers which are found from |
|
165 * a single contact |
|
166 * @Since Series S60 3.2 |
|
167 * @return array of DTMF numbers. |
|
168 */ |
|
169 virtual CDesCArray& AllDtmfNumbers() const = 0; |
|
170 |
|
171 }; |
|
172 |
|
173 #endif // MPHCNTMATCH_H |
|
174 |
|
175 // End of File |
|