|
1 /* |
|
2 * Copyright (c) 2005 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: Utilities for DS Loader Framework |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __NSMLDSHOSTITEM_H__ |
|
20 #define __NSMLDSHOSTITEM_H__ |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <s32strm.h> |
|
25 #include <SyncMLDef.h> |
|
26 #include <SmlDataSyncDefs.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CSmlDataStoreFormat; |
|
30 class RSmlFilterDef; |
|
31 class MSmlSyncRelationship; |
|
32 class CNSmlDbCaps; |
|
33 class MSmlDataItemUidSet; |
|
34 class CDesC8Array; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 // ------------------------------------------------------------------------------------------------ |
|
39 // Class for transporting item parameters over IPC. |
|
40 // |
|
41 // @lib nsmldshostclient.lib |
|
42 // ------------------------------------------------------------------------------------------------ |
|
43 class CNSmlDSHostItem : public CBase |
|
44 { |
|
45 public: |
|
46 /** |
|
47 * Creates new instance of CNSmlDSHostItem based class. |
|
48 * @return CNSmlDSHostItem*. Newly created instance. |
|
49 */ |
|
50 IMPORT_C static CNSmlDSHostItem* NewL(); |
|
51 |
|
52 /** |
|
53 * Creates new instance of CNSmlDSHostItem based class. |
|
54 * @return CNSmlDSHostItem*. Newly created instance that is pushed to cleanup stack. |
|
55 */ |
|
56 IMPORT_C static CNSmlDSHostItem* NewLC(); |
|
57 |
|
58 /** |
|
59 * C++ Destructor. |
|
60 */ |
|
61 IMPORT_C ~CNSmlDSHostItem(); |
|
62 |
|
63 /** |
|
64 * This method externalizes class to stream. |
|
65 * @param aStream. Externalize is done to this stream. |
|
66 */ |
|
67 IMPORT_C void ExternalizeL( RWriteStream& aStream ) const; |
|
68 |
|
69 /** |
|
70 * This method internalizes class from stream. |
|
71 * @param aStream. Internalize is done from this stream. |
|
72 */ |
|
73 IMPORT_C void InternalizeL( RReadStream& aStream ); |
|
74 |
|
75 /** |
|
76 * Returns UID of item. |
|
77 * @return TSmlDbItemUid. UID of item. |
|
78 */ |
|
79 IMPORT_C TSmlDbItemUid Uid() const; |
|
80 |
|
81 /** |
|
82 * Sets UID of item. |
|
83 * @param aItemId. UID of item. |
|
84 */ |
|
85 IMPORT_C void SetUid( const TSmlDbItemUid aItemId ); |
|
86 |
|
87 /** |
|
88 * Returns fieldChange info. |
|
89 * @return TBool. ETrue if fieldChange is used. |
|
90 */ |
|
91 IMPORT_C TBool FieldChange() const; |
|
92 |
|
93 /** |
|
94 * Sets fieldChange info. |
|
95 * @param aFieldChange. ETrue if fieldChange is used. |
|
96 */ |
|
97 IMPORT_C void SetFieldChange( const TBool aFieldChange ); |
|
98 |
|
99 /** |
|
100 * Returns size of item. |
|
101 * @return TInt. Size of item. |
|
102 */ |
|
103 IMPORT_C TInt Size() const; |
|
104 |
|
105 /** |
|
106 * Sets size of item. |
|
107 * @param aSize. Size of item. |
|
108 */ |
|
109 IMPORT_C void SetSize( const TInt aSize ); |
|
110 |
|
111 /** |
|
112 * Returns UID of parent of item. |
|
113 * @return TSmlDbItemUid. UID of parent of item. |
|
114 */ |
|
115 IMPORT_C TSmlDbItemUid ParentUid() const; |
|
116 |
|
117 /** |
|
118 * Sets UID of parent of item. |
|
119 * @param aParentId. UID of parent of item. |
|
120 */ |
|
121 IMPORT_C void SetParentUid( const TSmlDbItemUid aParentId ); |
|
122 |
|
123 /** |
|
124 * Returns mime type of item. |
|
125 * @return HBufC8*. Mime type of item. |
|
126 */ |
|
127 IMPORT_C const HBufC8* MimeType() const; |
|
128 |
|
129 /** |
|
130 * Sets mime type of item. |
|
131 * @param aMimeType. Mime type of item. |
|
132 */ |
|
133 IMPORT_C void SetMimeTypeL( const TDesC8& aMimeType ); |
|
134 |
|
135 /** |
|
136 * Returns mime version of item. |
|
137 * @return HBufC8*. Mime version of item. |
|
138 */ |
|
139 IMPORT_C const HBufC8* MimeVer() const; |
|
140 |
|
141 /** |
|
142 * Sets mime version of item. |
|
143 * @param aMimeType. Mime version of item. |
|
144 */ |
|
145 IMPORT_C void SetMimeVerL( const TDesC8& aMimeType ); |
|
146 |
|
147 protected: |
|
148 /** |
|
149 * C++ constructor. |
|
150 */ |
|
151 IMPORT_C CNSmlDSHostItem(); |
|
152 |
|
153 /** |
|
154 * ConstrucL |
|
155 */ |
|
156 IMPORT_C void ConstructL(); |
|
157 |
|
158 protected: |
|
159 // UID of item |
|
160 TSmlDbItemUid iUid; |
|
161 // FieldChange or not |
|
162 TBool iFieldChange; |
|
163 // Size of item |
|
164 TInt iSize; |
|
165 // UID of parent of item |
|
166 TSmlDbItemUid iParentUid; |
|
167 |
|
168 private: |
|
169 // Mime type of item |
|
170 HBufC8* iMimeType; |
|
171 // Mime version of item |
|
172 HBufC8* iMimeVer; |
|
173 }; |
|
174 |
|
175 #endif // __NSMLDSHOSTITEM_H__ |
|
176 |
|
177 // End of File |