|
1 /* |
|
2 * Copyright (c) 2004-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 the License "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 * Note: This file may contain code to generate corrupt files for test purposes. |
|
16 * Such code is excluded from production builds by use of compiler defines; |
|
17 * it is recommended that such code should be removed if this code is ever published publicly. |
|
18 * As specified in SGL.GT0188.251 |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 /** |
|
24 @file |
|
25 @internalComponent |
|
26 @released |
|
27 */ |
|
28 |
|
29 #ifndef __SISSUPPORTEDLANGUAGES_H__ |
|
30 #define __SISSUPPORTEDLANGUAGES_H__ |
|
31 |
|
32 #include "sislanguage.h" |
|
33 #include "sisarray.h" |
|
34 |
|
35 |
|
36 class CSISSupportedLanguages : public CStructure <CSISFieldRoot::ESISSupportedLanguages> |
|
37 |
|
38 { |
|
39 public: |
|
40 CSISSupportedLanguages (); |
|
41 CSISSupportedLanguages (const CSISSupportedLanguages& aInitialiser); |
|
42 |
|
43 virtual void MakeNeat (); |
|
44 virtual std::string Name () const; |
|
45 |
|
46 void AddLanguage (const CSISLanguage::TDialect aLan); |
|
47 bool AreLanguagesSpecified () const; |
|
48 TUint32 LanguageCount () const; |
|
49 CSISLanguage::TLanguage Language (const TUint32 aIndex) const; |
|
50 void AddPackageEntry(std::wostream& aStream, bool aVerbose) const; |
|
51 |
|
52 private: |
|
53 CSISArray <CSISLanguage, CSISFieldRoot::ESISLanguage> iSupportedLanguage; |
|
54 |
|
55 }; |
|
56 |
|
57 |
|
58 |
|
59 inline CSISSupportedLanguages::CSISSupportedLanguages () |
|
60 { |
|
61 InsertMember (iSupportedLanguage); |
|
62 } |
|
63 |
|
64 |
|
65 inline CSISSupportedLanguages::CSISSupportedLanguages (const CSISSupportedLanguages& aInitialiser) : |
|
66 CStructure <CSISFieldRoot::ESISSupportedLanguages> (aInitialiser), |
|
67 iSupportedLanguage (aInitialiser.iSupportedLanguage) |
|
68 { |
|
69 InsertMember (iSupportedLanguage); |
|
70 } |
|
71 |
|
72 |
|
73 inline void CSISSupportedLanguages::AddLanguage (const CSISLanguage::TDialect aLan) |
|
74 { |
|
75 iSupportedLanguage.Push (CSISLanguage (aLan)); |
|
76 } |
|
77 |
|
78 |
|
79 inline bool CSISSupportedLanguages::AreLanguagesSpecified () const |
|
80 { |
|
81 return iSupportedLanguage.size () != 0; |
|
82 } |
|
83 |
|
84 |
|
85 inline TUint32 CSISSupportedLanguages::LanguageCount () const |
|
86 { |
|
87 return iSupportedLanguage.size (); |
|
88 } |
|
89 |
|
90 |
|
91 inline CSISLanguage::TLanguage CSISSupportedLanguages::Language (const TUint32 aIndex) const |
|
92 { |
|
93 return iSupportedLanguage [aIndex].Value (); |
|
94 } |
|
95 |
|
96 #endif // __SISSUPPORTEDLANGUAGES_H__ |
|
97 |