|
1 /* |
|
2 * Copyright (c) 2004-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: CNssTag implements MNssTag. In addition, it provides members for use |
|
15 * by VAS internal components. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef NSSVASCTAG_H |
|
21 #define NSSVASCTAG_H |
|
22 |
|
23 // includes |
|
24 #include "nssvasmtag.h" |
|
25 #include "nssvasccontext.h" |
|
26 #include "nssvascrrd.h" |
|
27 #include "nssvascspeechitem.h" |
|
28 #include "nssvascoreconstant.h" |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * CNssTag is the implementation class for MNssTag interface. |
|
34 * It encapsulates tag data. A tag cannot be directly created by a client. |
|
35 * A client has to own an instance of Tag Manager which has methods for creating |
|
36 * tag objects. The CNssTag class also provides additional members for internal |
|
37 * use by VAS. |
|
38 * @lib NssVASApi.lib |
|
39 * @since 2.8 |
|
40 */ |
|
41 |
|
42 class CNssTag: public CBase, public MNssTag |
|
43 { |
|
44 |
|
45 public: // functions for internal VAS use |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. Creates an empty tag object |
|
49 * for internal use. |
|
50 */ |
|
51 static CNssTag* NewLC(); |
|
52 |
|
53 /** |
|
54 * Two-phased constructor. Creates an empty tag object |
|
55 * for internal use. |
|
56 */ |
|
57 static CNssTag* NewL(); |
|
58 |
|
59 public: |
|
60 |
|
61 /** |
|
62 * C++ constructor. |
|
63 * @param aContext - pointer to a previously created context |
|
64 * @param aRRD - pointer to a previously created rrd |
|
65 * @param aSpeechItem - pointer to a previously created speech item |
|
66 * @return |
|
67 */ |
|
68 CNssTag(CNssContext* aContext, CNssRRD* aRRD, CNssSpeechItem* aSpeechItem); |
|
69 |
|
70 /** |
|
71 * Destructor. |
|
72 * @param |
|
73 * @return |
|
74 */ |
|
75 ~CNssTag(); |
|
76 |
|
77 /** |
|
78 * Get the context for this tag. |
|
79 * @since 2.0 |
|
80 * @param |
|
81 * @return pointer to the context for this tag |
|
82 */ |
|
83 MNssContext* Context(); |
|
84 |
|
85 /** |
|
86 * Get the RRD for this tag. |
|
87 * @since 2.0 |
|
88 * @param |
|
89 * @return pointer to the RRD for this tag |
|
90 */ |
|
91 MNssRRD* RRD(); |
|
92 |
|
93 /** |
|
94 * Get the Speech Item for this tag. |
|
95 * @since 2.0 |
|
96 * @param |
|
97 * @return pointer to the RRD for this tag |
|
98 */ |
|
99 MNssSpeechItem* SpeechItem(); |
|
100 |
|
101 /** |
|
102 * Get the Tag Id for this tag. |
|
103 * @since 2.0 |
|
104 * @param |
|
105 * @return id for this tag |
|
106 */ |
|
107 TInt TagId(); |
|
108 |
|
109 /** |
|
110 * Set the Tag Id for this tag. |
|
111 * @since 2.0 |
|
112 * @param aId - id for this tag |
|
113 * @return |
|
114 */ |
|
115 void SetTagId(TInt aId); |
|
116 |
|
117 /** |
|
118 * Creates a copy of the tag object and returns a pointer |
|
119 * to the newly created tag. CopyL creates a new rrd object and |
|
120 * a new speech item for the new tag. CopyL uses the same context |
|
121 * object from the source tag into the new tag. A client calling calling |
|
122 * this method takes the responsibility of deleting the new tag object. |
|
123 * For internal use by by VAS components. |
|
124 * @since 2.0 |
|
125 * @param |
|
126 * @return pointer to the tag object newly created |
|
127 */ |
|
128 CNssTag *CopyL(); |
|
129 |
|
130 private: |
|
131 /** |
|
132 * Constructor used in two-phased construction |
|
133 */ |
|
134 CNssTag(); |
|
135 |
|
136 /** |
|
137 * Two-phase construction |
|
138 */ |
|
139 void ConstructL(); |
|
140 |
|
141 private: |
|
142 |
|
143 // context object |
|
144 CNssContext* iContext; |
|
145 |
|
146 // RRD object |
|
147 CNssRRD* iRRD; |
|
148 |
|
149 // speech item object |
|
150 CNssSpeechItem* iSpeechItem; |
|
151 |
|
152 // tag id, for internal use |
|
153 TInt iTagId; |
|
154 |
|
155 }; |
|
156 |
|
157 #endif // NSSVASCTAG_H |
|
158 |
|
159 // End of File |