1 /* |
|
2 * Copyright (c) 2006-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: Definition of class which takes care of contacts data after |
|
15 * voice tag recognition. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef VCMANAGERCONTACTSELECTHANDLER_H |
|
21 #define VCMANAGERCONTACTSELECTHANDLER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <coemain.h> |
|
26 |
|
27 #include <cntdef.h> |
|
28 #include <PhCltTypes.h> |
|
29 |
|
30 #include <nssvascvasdbmgr.h> |
|
31 #include <nssvasapi.h> |
|
32 |
|
33 #include "srsfbldvariant.hrh" |
|
34 |
|
35 // FORWARD DECLARATIONS |
|
36 class CSendUi; |
|
37 class CEikonEnv; |
|
38 class MVasBasePbkHandler; |
|
39 class CVcManagerDialer; |
|
40 |
|
41 // CONSTANTS |
|
42 _LIT( KNssGCHNameDialContext, "NAMEDIAL" ); |
|
43 |
|
44 // CLASS DECLARATION |
|
45 |
|
46 /** |
|
47 * Responsible for dialing a selected contact |
|
48 * |
|
49 */ |
|
50 NONSHARABLE_CLASS ( CVcManagerContactSelectHandler ) : public CBase, |
|
51 public MNssTagSelectHandler |
|
52 { |
|
53 public: |
|
54 |
|
55 /** |
|
56 * Two-phased constructor. |
|
57 * |
|
58 * @param aContextManager VAS context manager |
|
59 * @param aTagSelectNotification VAS tag select notifier |
|
60 */ |
|
61 static CVcManagerContactSelectHandler* NewL( |
|
62 MNssContextMgr* aContextManager, |
|
63 MNssTagSelectNotification* aTagSelectNotification); |
|
64 |
|
65 /** |
|
66 * Destructor. |
|
67 */ |
|
68 ~CVcManagerContactSelectHandler(); |
|
69 |
|
70 /** |
|
71 * From MNssTagSelectHandler Called when a tag is selected following recognition |
|
72 */ |
|
73 void HandleTagSelect( MNssTag* aTag ); |
|
74 |
|
75 private: |
|
76 |
|
77 /** |
|
78 * Dials phone number |
|
79 * @param aName Descriptor containing the name of the contact |
|
80 * @param aPhoneNumber Descriptor containing the phone number |
|
81 * @param aNumberFieldType A UID which identifies a contact item field's type. |
|
82 * @param aCommandId Extension command id |
|
83 * @return void |
|
84 */ |
|
85 void DialL( const TDesC& aName, const TDesC& aPhoneNumber, |
|
86 TFieldType aNumberFieldType, TVasExtensionCommand aCommandId ); |
|
87 |
|
88 /** |
|
89 * Checks if character is acceptable. |
|
90 * |
|
91 * @param aChar character. |
|
92 * @return ETrue iff characters is ok. |
|
93 */ |
|
94 static TBool IsValidChar( TChar aChar ); |
|
95 |
|
96 /** |
|
97 * Removes all illegal characters from descriptor. |
|
98 * |
|
99 * @param aString string from which those characters are removed. |
|
100 */ |
|
101 static void RemoveInvalidChars( TDes& aString ); |
|
102 |
|
103 /** |
|
104 * By default EPOC constructor is private. |
|
105 * |
|
106 * @param aContextManager VAS context manager |
|
107 * @param aTagSelectNotification VAS tag select notifier |
|
108 */ |
|
109 void ConstructL( MNssContextMgr* aContextManager, |
|
110 MNssTagSelectNotification* aTagSelectNotification ); |
|
111 |
|
112 /** |
|
113 * C++ default constructor. |
|
114 */ |
|
115 CVcManagerContactSelectHandler(); |
|
116 |
|
117 /** |
|
118 * Performs action after contact recognition |
|
119 */ |
|
120 void DoHandleTagSelectL( MNssTag* aTag ); |
|
121 |
|
122 private://data |
|
123 |
|
124 // VAS database manager |
|
125 CNssVASDBMgr* iVasDbManager; |
|
126 |
|
127 // Phonebook engine |
|
128 MVasBasePbkHandler* iPbkHandler; |
|
129 |
|
130 // Contact id |
|
131 TInt iContactId; |
|
132 |
|
133 // Number which will be dialed |
|
134 TPhCltTelephoneNumber iTelNumber; |
|
135 |
|
136 // VAS context |
|
137 MNssContext* iContext; |
|
138 |
|
139 // VAS tag select notifier to get information about selected tag |
|
140 MNssTagSelectNotification* iTagSelectNotification; |
|
141 |
|
142 // Video call support on/off |
|
143 TBool iVideoTelephonySupported; |
|
144 |
|
145 // VOIP support on/off |
|
146 TBool iVoIPFeatureSupported; |
|
147 |
|
148 // Send UI to open message editor |
|
149 CSendUi* iSendUi; |
|
150 |
|
151 // Eikon environment |
|
152 CEikonEnv* iEikonEnvironment; |
|
153 |
|
154 // Global dialer |
|
155 CVcManagerDialer* iGlobalDialer; |
|
156 }; |
|
157 |
|
158 #endif // VCMANAGERCONTACTSELECTHANDLER_H |
|