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: CNssContextBuilder is the builder for context objects. It is owned |
|
15 * by the context manager. A client builds contexts by requesting the |
|
16 * context manager which in turn forwards the request to context builder. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef NSSVASCCONTEXTBUILDER_H |
|
22 #define NSSVASCCONTEXTBUILDER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include "nssvasccontext.h" |
|
26 #include "nssvasccontextsrsportal.h" |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * CNssContextBuilder is a builder class for creating context objects. |
|
32 * It has overloaded variants for the CreateContext(). A client will not create |
|
33 * a context object directly but will request it through the context manager, |
|
34 * which in turn calls the CreateContext() in context builder. |
|
35 * @lib NssVASApi.lib |
|
36 * @since 2.8 |
|
37 */ |
|
38 |
|
39 class CNssContextBuilder: public CBase |
|
40 { |
|
41 public: |
|
42 |
|
43 /** |
|
44 * destructor |
|
45 * @param |
|
46 * @return |
|
47 */ |
|
48 ~CNssContextBuilder(); |
|
49 |
|
50 /** |
|
51 * 2 phase construction |
|
52 * @param |
|
53 * @return pointer to context builder |
|
54 */ |
|
55 static CNssContextBuilder* NewL(); |
|
56 |
|
57 /** |
|
58 * 2 phase construction |
|
59 * @param |
|
60 * @return pointer to context builder |
|
61 */ |
|
62 static CNssContextBuilder* NewLC(); |
|
63 |
|
64 public: |
|
65 |
|
66 /** |
|
67 * create a context given the name, context id, global flag, grammar id, |
|
68 * lexicon id, and modelbank id. Used by VAS internal components |
|
69 * @since 2.0 |
|
70 * @param aName Name for the context |
|
71 * @param aContextId Context Id for the context |
|
72 * @param aGlobal Context is global or not |
|
73 * @param aGrammarId Grammar id for the context |
|
74 * @param aLexiconId Lexicon id for the context |
|
75 * @param aModelBankId Model bank id for the context |
|
76 * @return |
|
77 */ |
|
78 CNssContext* CreateContextL(const TDesC& aName, TInt aContextId, TBool aGlobal, |
|
79 TUint32 aGrammarId, TUint32 aLexiconId, TUint32 aModelBankId, |
|
80 TUint32 iTrainType, const TDesC8& aClientData ); |
|
81 |
|
82 /** |
|
83 * create a context given the lexicon id and modelbank id, other members of the |
|
84 * context are initialized to 0. Used by VAS internal components |
|
85 * @since 2.0 |
|
86 * @param aLexiconId lexicon id |
|
87 * @param aModelBankId model bank id |
|
88 * @return |
|
89 */ |
|
90 CNssContext* CreateContextL(TUint32 aLexiconId, TUint32 aModelBankId); |
|
91 |
|
92 /** |
|
93 * create an empty context |
|
94 * @since 2.0 |
|
95 * @param |
|
96 * @return context id |
|
97 */ |
|
98 CNssContext* CreateContextL(); |
|
99 |
|
100 /** |
|
101 * get context SRS portal |
|
102 * @since 2.8 |
|
103 * @param |
|
104 * @return CNssContextSrsPortal |
|
105 */ |
|
106 CNssContextSrsPortal* GetContextPortal(); |
|
107 |
|
108 private: |
|
109 |
|
110 /** |
|
111 * constructor |
|
112 * @param |
|
113 * @return |
|
114 */ |
|
115 CNssContextBuilder(); |
|
116 |
|
117 /** |
|
118 * 2 phase construction |
|
119 * @param |
|
120 * @return context id |
|
121 */ |
|
122 void ConstructL(); |
|
123 |
|
124 private: |
|
125 |
|
126 // a srs utility portal |
|
127 CNssContextSrsPortal* iContextSrsPortal; |
|
128 }; |
|
129 |
|
130 |
|
131 #endif // NSSVASCCONTEXTBUILDER_H |
|
132 |
|
133 // End of File |
|