1 /* |
|
2 * Copyright (c) 2006-2007 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: Capsulating Fill file list items |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #ifndef __CMFILLLISTITEM_H |
|
24 #define __CMFILLLISTITEM_H |
|
25 |
|
26 // INCLUDES |
|
27 #include <e32base.h> |
|
28 #include "cmbaselistitem.h" |
|
29 #include "cmcommontypes.h" |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class RWriteStream; |
|
33 class RReadStream; |
|
34 |
|
35 /** |
|
36 * CCmFillListItem class |
|
37 * Capsulating Fill file list items |
|
38 * @lib cmcommon.lib |
|
39 * @since S60 v3.0 |
|
40 */ |
|
41 class CCmFillListItem : public CCmBaseListItem |
|
42 { |
|
43 |
|
44 public: |
|
45 |
|
46 /* Constructors and destructor. */ |
|
47 |
|
48 /** |
|
49 * Creates new CCmFillListItem class. |
|
50 * @return pointer to CCmFillListItem class |
|
51 */ |
|
52 IMPORT_C static CCmFillListItem* NewL(); |
|
53 |
|
54 /** |
|
55 * Creates new CCmFillListItem class and |
|
56 * leaves the instance in the cleanup stack. |
|
57 * @return pointer to CCmFillListItem class |
|
58 */ |
|
59 IMPORT_C static CCmFillListItem* NewLC(); |
|
60 |
|
61 /** |
|
62 * Creates new CCmFillListItem class and |
|
63 * leaves the instance in the cleanup stack. |
|
64 * @param aPriority, item's priority |
|
65 * @param aListId, item's list id |
|
66 * @param aStatus, items's status |
|
67 * @param aSelected, is item on selected list |
|
68 * @return pointer to CCmFillListItem class |
|
69 */ |
|
70 IMPORT_C static CCmFillListItem* NewLC( const TUint aPriority, |
|
71 const TUint aListId, const TUint aStatus, |
|
72 const TCmFillRuleStatus aSelected ); |
|
73 |
|
74 /** |
|
75 * Destructor. |
|
76 */ |
|
77 IMPORT_C virtual ~CCmFillListItem(); |
|
78 |
|
79 public: |
|
80 |
|
81 // Sets |
|
82 IMPORT_C void SetUpnpClassL( const TDesC& aUpnpClass ); |
|
83 |
|
84 IMPORT_C void SetUriL( const TDesC8& aUri); |
|
85 |
|
86 IMPORT_C void SetItemIdL( const TDesC8& aItemId ); |
|
87 |
|
88 IMPORT_C void SetListId( const TUint aId ); |
|
89 |
|
90 IMPORT_C void SetDevId( const TUint8 aDevId ); |
|
91 |
|
92 IMPORT_C void SetPriority( const TUint8 aPriority ); |
|
93 |
|
94 IMPORT_C void SetSelected( TCmFillRuleStatus aSelected ); |
|
95 |
|
96 IMPORT_C void SetDriveId( const TUint aDriveId ); |
|
97 |
|
98 IMPORT_C void SetDriveNumber( const TInt aDriveNumber ); |
|
99 |
|
100 // Gets |
|
101 IMPORT_C TDesC& UpnpClass() const; |
|
102 |
|
103 IMPORT_C TDesC8& Uri() const; |
|
104 |
|
105 IMPORT_C TDesC8& ItemId() const; |
|
106 |
|
107 IMPORT_C TUint ListId() const; |
|
108 |
|
109 IMPORT_C TUint8 DevId() const; |
|
110 |
|
111 IMPORT_C TUint8 Priority() const; |
|
112 |
|
113 IMPORT_C TCmFillRuleStatus Selected() const; |
|
114 |
|
115 IMPORT_C TUint DriveId() const; |
|
116 |
|
117 IMPORT_C TInt DriveNumber() const; |
|
118 |
|
119 /** |
|
120 * Externalizes container information to stream. |
|
121 * Leaves in case of errors. |
|
122 * @since Series 60 3.1 |
|
123 * @param reference to RWriteStream |
|
124 * @return none |
|
125 */ |
|
126 IMPORT_C void ExternalizeL( RWriteStream& aStream ) const; |
|
127 |
|
128 /** |
|
129 * Internalizes container information from stream. |
|
130 * Leaves in case of errors. |
|
131 * @since Series 60 3.1 |
|
132 * @param reference to RReadStream |
|
133 * @return none |
|
134 */ |
|
135 IMPORT_C void InternalizeL( RReadStream& aStream ); |
|
136 |
|
137 public: |
|
138 |
|
139 /** |
|
140 * Constructor. |
|
141 */ |
|
142 CCmFillListItem(); |
|
143 |
|
144 /** |
|
145 * Second-phase constructor. |
|
146 */ |
|
147 void ConstructL(); |
|
148 |
|
149 /** |
|
150 * Second-phase constructor. |
|
151 */ |
|
152 void ConstructL( const TUint aPriority, const TUint aListId, |
|
153 const TUint aStatus, const TCmFillRuleStatus aSelected ); |
|
154 |
|
155 |
|
156 private: // data |
|
157 |
|
158 HBufC* iUpnpClass; // owned |
|
159 HBufC8* iUri; // owned |
|
160 HBufC8* iItemId; // owned |
|
161 TUint iListId; |
|
162 TUint8 iDevId; |
|
163 TUint8 iPriority; |
|
164 TCmListItemStatus iStatus; |
|
165 TCmFillRuleStatus iSelected; |
|
166 TUint iDriveId; |
|
167 TInt iDriveNumber; |
|
168 |
|
169 }; |
|
170 |
|
171 #endif // __CMFILLLISTITEM_H |
|