|
1 /* |
|
2 * Copyright (c) 2008 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef SUITEOBJECT_H |
|
19 #define SUITEOBJECT_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include "mcssuiteobjectattr.h" |
|
23 |
|
24 /** |
|
25 * Menu Engine Object attribute. |
|
26 */ |
|
27 NONSHARABLE_CLASS( CSuiteObject ): public CBase |
|
28 { |
|
29 |
|
30 public: // construction |
|
31 |
|
32 /** |
|
33 * Destructor. |
|
34 */ |
|
35 virtual ~CSuiteObject(); |
|
36 |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 * @param aFileName File Name. |
|
40 * @return The created object. |
|
41 */ |
|
42 static CSuiteObject* NewL( const TDesC& aFileName ); |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 * @param aFileName File Name. |
|
47 * @return The created object. |
|
48 */ |
|
49 static CSuiteObject* NewLC( const TDesC& aFileName ); |
|
50 |
|
51 protected: // construction |
|
52 |
|
53 /** |
|
54 * Constructor |
|
55 */ |
|
56 CSuiteObject(); |
|
57 |
|
58 /** |
|
59 * 2nd phase constructor. |
|
60 * @param aFileName File Name. |
|
61 */ |
|
62 void ConstructL( const TDesC& aFileName ); |
|
63 |
|
64 public: // new methods |
|
65 |
|
66 /** |
|
67 * Get file name. |
|
68 * @return file name. |
|
69 */ |
|
70 TPtrC FileName() const { return iFileName; } |
|
71 |
|
72 /** |
|
73 * Get suite name. |
|
74 * @return suite name. |
|
75 */ |
|
76 TPtrC SuiteName() const { return iName; } |
|
77 |
|
78 /** |
|
79 * Set suite name. |
|
80 * @param aName Name. |
|
81 */ |
|
82 void SetSuiteNameL( const TDesC& aName ); |
|
83 |
|
84 /** |
|
85 * Set attribute. |
|
86 * @param aAttrName atrribute name. |
|
87 * @param aAttrValue atrribute value. |
|
88 * @param aLocalized localisation of attribute. |
|
89 */ |
|
90 void SetInitialAttributeL( const TDesC& aAttrName, |
|
91 const TDesC& aAttrValue, |
|
92 TBool aLocalized ); |
|
93 |
|
94 void GetAttribute( const TDesC& aAttrName, |
|
95 TBool& aAttrExists, TDes& aAttrVal ); |
|
96 |
|
97 /** |
|
98 * Reset, destroy and close iAttributes array. |
|
99 */ |
|
100 void CloseSuiteArray(); |
|
101 |
|
102 |
|
103 private: // data |
|
104 |
|
105 RBuf iFileName; ///<File name. Own. |
|
106 RBuf iName; ///< Name. Own. |
|
107 RSuiteAttrArray iAttributes; ///< Attributes. Own. |
|
108 |
|
109 }; |
|
110 |
|
111 |
|
112 #endif // SUITEOBJECT_H |