|
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: Definition of entry attribute |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __CAINNERICONDESCRIPTION_H__ |
|
19 #define __CAINNERICONDESCRIPTION_H__ |
|
20 |
|
21 #include <e32base.h> |
|
22 |
|
23 //FORWARD DECLARATIONS |
|
24 class RWriteStream; |
|
25 class RReadStream; |
|
26 |
|
27 /** |
|
28 * CA entry icon. |
|
29 * @lib .lib |
|
30 * @since S60 v5.0 |
|
31 */ |
|
32 NONSHARABLE_CLASS( CCaInnerIconDescription ): public CBase |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Destructor. |
|
39 */ |
|
40 virtual ~CCaInnerIconDescription(); |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 * @return The created object. |
|
45 */ |
|
46 IMPORT_C static CCaInnerIconDescription* NewL(); |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 * @return The created object. |
|
51 */ |
|
52 IMPORT_C static CCaInnerIconDescription* NewLC(); |
|
53 |
|
54 /** |
|
55 * Gets icon id. |
|
56 * @return iId. |
|
57 */ |
|
58 TInt Id() const |
|
59 { |
|
60 return iId; |
|
61 } |
|
62 |
|
63 /** |
|
64 * Gets file name. |
|
65 * @return iFileName. |
|
66 */ |
|
67 TPtrC FileName() const |
|
68 { |
|
69 return iFileName; |
|
70 } |
|
71 |
|
72 /** |
|
73 * Gets skin id. |
|
74 * @return iSkinId |
|
75 */ |
|
76 TPtrC SkinId() const |
|
77 { |
|
78 return iSkinId; |
|
79 } |
|
80 |
|
81 /** |
|
82 * Gets application id. |
|
83 * @return iApplicationId |
|
84 */ |
|
85 TPtrC ApplicationId() const |
|
86 { |
|
87 return iApplicationId; |
|
88 } |
|
89 |
|
90 /** |
|
91 * Set icon id. |
|
92 * @param aId Value |
|
93 */ |
|
94 IMPORT_C void SetId( const TInt aId ); |
|
95 |
|
96 /** |
|
97 * Set icon file name. |
|
98 * @param aFileName Value |
|
99 * Ownership taken. |
|
100 */ |
|
101 IMPORT_C void SetFileNameL( const TDesC& aFileName ); |
|
102 |
|
103 /** |
|
104 * Set icon skin id. |
|
105 * @param aSkinId Value |
|
106 * Ownership taken. |
|
107 */ |
|
108 IMPORT_C void SetSkinIdL( const TDesC& aSkinId ); |
|
109 |
|
110 /** |
|
111 * Set application id. |
|
112 * @param aApplicationId Value |
|
113 * Ownership taken. |
|
114 */ |
|
115 IMPORT_C void SetApplicationIdL( const TDesC& aApplicationId ); |
|
116 |
|
117 /** |
|
118 * Externalizes icon to the stream |
|
119 * @param aStream a write stream |
|
120 */ |
|
121 void ExternalizeL( RWriteStream& aStream ) const; |
|
122 |
|
123 /** |
|
124 * Internalizes stream to the icon |
|
125 * @param aStream a read stream |
|
126 */ |
|
127 void InternalizeL( RReadStream& aStream ); |
|
128 |
|
129 private: |
|
130 |
|
131 /** |
|
132 * Second phased constructor. |
|
133 */ |
|
134 void ConstructL(); |
|
135 |
|
136 /** |
|
137 * Constructor |
|
138 */ |
|
139 CCaInnerIconDescription(); |
|
140 |
|
141 private: |
|
142 // data |
|
143 |
|
144 /* |
|
145 * icon id |
|
146 */ |
|
147 TInt iId; |
|
148 |
|
149 /* |
|
150 * Icon filename |
|
151 */ |
|
152 RBuf iFileName; |
|
153 |
|
154 /* |
|
155 * Icon skin id |
|
156 */ |
|
157 RBuf iSkinId; |
|
158 |
|
159 /* |
|
160 * Icon application id |
|
161 */ |
|
162 RBuf iApplicationId; |
|
163 }; |
|
164 |
|
165 #endif // __CAINNERICONDESCRIPTION_H__ |