1 /* |
|
2 * Copyright (c) 2003 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: The CNssTagSelectNotification class allows the client to |
|
15 * register and deregister for a voice tag select event. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CNSSTAGSELECTNOTIFICATION_H |
|
21 #define CNSSTAGSELECTNOTIFICATION_H |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 #include <e32std.h> |
|
26 #include "nssvasmtagselectnotification.h" |
|
27 #include "nssvasmdbtagselectnotifierclient.h" |
|
28 #include "nssvasccontext.h" |
|
29 #include "nssvascvasdbbuilder.h" |
|
30 |
|
31 // FORWARD DECL |
|
32 class CNssTag; |
|
33 class CNssVASDBBuilder; |
|
34 class MNssTagSelectHandler; |
|
35 class CNssTagSelectData; |
|
36 |
|
37 |
|
38 // CLASS DEFINITIONS |
|
39 |
|
40 /** |
|
41 * |
|
42 * The CNssTagSelectNotification class performs the recognition function. |
|
43 * |
|
44 * @lib NssVASApi.lib |
|
45 * @since 2.8 |
|
46 */ |
|
47 |
|
48 class CNssTagSelectNotification : public CBase, |
|
49 public MNssTagSelectNotification, |
|
50 public MNssDBTagSelectNotifierClient |
|
51 { |
|
52 |
|
53 public: // Constructors and destructor |
|
54 |
|
55 /** |
|
56 * Two-phased constructor. |
|
57 */ |
|
58 static CNssTagSelectNotification* NewL(); |
|
59 |
|
60 /** |
|
61 * Two-phased constructor. |
|
62 */ |
|
63 static CNssTagSelectNotification* NewLC(); |
|
64 |
|
65 /** |
|
66 * Destructor. |
|
67 */ |
|
68 ~CNssTagSelectNotification(); |
|
69 |
|
70 public: // Functions from base classes |
|
71 |
|
72 /** |
|
73 * From MNssTagSelectNotification |
|
74 * Register for voice tag select notification |
|
75 * @since 2.0 |
|
76 * @param aContext The voice tag context which determines notification. |
|
77 * @param aTagSelectHandler The event handler for tag select notification. |
|
78 * @return TSelectError Return code to indicate request was valid. |
|
79 */ |
|
80 TNssSelectResult RegisterL(MNssContext* aContext, |
|
81 MNssTagSelectHandler* aTagSelectHandler); |
|
82 |
|
83 /** |
|
84 * From MNssTagSelectNotification |
|
85 * Deegister from voice tag select notification |
|
86 * @since 2.0 |
|
87 * @param aContext The voice tag context which determines notification. |
|
88 * @param aTagSelectHandler The event handler for tag select notification, |
|
89 * used to deregister the correct client. |
|
90 * @return TSelectError Return code to indicate request was valid. |
|
91 */ |
|
92 TNssSelectResult Deregister(MNssContext* aContext, |
|
93 MNssTagSelectHandler* aTagSelectHandler); |
|
94 |
|
95 /** |
|
96 * From MNssDBTagSelectNotifierClient |
|
97 * HandleSelection is called into the client by CNssDBTagSelectNotifier |
|
98 * @since 2.0 |
|
99 * @param aTag The voice tag which was selected. |
|
100 * @return - |
|
101 */ |
|
102 void HandleSelection(CNssTag* aTag); |
|
103 |
|
104 private: |
|
105 |
|
106 /** |
|
107 * Constructor. |
|
108 */ |
|
109 CNssTagSelectNotification(); |
|
110 |
|
111 /** |
|
112 * By default Symbian 2nd phase constructor is private. |
|
113 */ |
|
114 void ConstructL(); |
|
115 |
|
116 /** |
|
117 * CompareContexts compare a context with a Tag Select Data List context |
|
118 * @since 2.0 |
|
119 * @param aContext The context of the voice tag which is selected. |
|
120 * @param aIndex The index of the Tag Select Data List entry to compare |
|
121 * the aContext with |
|
122 * @return - ETrue if contexts match, EFalse if they do not compare |
|
123 */ |
|
124 TBool CompareContexts(CNssContext* aContext, TInt aIndex); |
|
125 |
|
126 private: |
|
127 |
|
128 // Pointer to VAS Database Builder object. |
|
129 CNssVASDBBuilder* iVasDBBuilder; |
|
130 |
|
131 // Pointer to Database Tag Select Notifier object. |
|
132 CNssDBTagSelectNotifier* iDBTagSelectNotifier; |
|
133 |
|
134 // Pointer to Tag Select Data List object. |
|
135 CArrayPtrFlat<CNssTagSelectData>* iTagSelectDataList; |
|
136 |
|
137 }; |
|
138 |
|
139 #endif // CNSSTAGSELECTNOTIFICATION_H |
|
140 |
|
141 // End of File |
|