|
1 /* |
|
2 * Copyright (c) 2004 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: Changefinder header |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __NSMLSNAPSHOTITEM_H__ |
|
20 #define __NSMLSNAPSHOTITEM_H__ |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <syncml/SmlDataSyncDefs.h> |
|
25 |
|
26 // CLASS DECLARATION |
|
27 |
|
28 /** |
|
29 * TNSmlSnapshotItem. |
|
30 * |
|
31 * @lib nsmlchangefinder.lib |
|
32 */ |
|
33 class TNSmlSnapshotItem |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * C++ constructor |
|
38 */ |
|
39 IMPORT_C TNSmlSnapshotItem(); |
|
40 |
|
41 /** |
|
42 * C++ constructor. |
|
43 * @param aItemId UID value as TSmlDbItemUid. |
|
44 */ |
|
45 IMPORT_C TNSmlSnapshotItem( const TSmlDbItemUid& aItemId ); |
|
46 |
|
47 /** |
|
48 * Stream externalizer method. |
|
49 * @param aStream Stream this snapshot item will be externalized into. |
|
50 */ |
|
51 IMPORT_C void ExternalizeL( RWriteStream& aStream ) const; |
|
52 |
|
53 /** |
|
54 * Stream interlizer method. |
|
55 * @param aStream Stream this snapshot item will be internalized from. |
|
56 */ |
|
57 IMPORT_C void InternalizeL( RReadStream& aStream ); |
|
58 |
|
59 /** |
|
60 * Getter for last modification date value. |
|
61 * @return const TTime& Last modification date. |
|
62 */ |
|
63 IMPORT_C const TTime& LastChangedDate() const; |
|
64 |
|
65 /** |
|
66 * Setter for last modification date value. |
|
67 * @param aLastChangedDate Last modification date. |
|
68 */ |
|
69 IMPORT_C void SetLastChangedDate( const TTime& aLastChangedDate ); |
|
70 |
|
71 /** |
|
72 * Getter for item UID value. |
|
73 * @return const TSmlDbItemUid& item UID. |
|
74 */ |
|
75 IMPORT_C const TSmlDbItemUid& ItemId() const; |
|
76 |
|
77 /** |
|
78 * Setter for item UID value. |
|
79 * @param aItemId item UID. |
|
80 */ |
|
81 IMPORT_C void SetItemId( const TSmlDbItemUid& aItemId ); |
|
82 |
|
83 /** |
|
84 * Getter for parent UID value. |
|
85 * @return const TSmlDbItemUid& parent UID. |
|
86 */ |
|
87 IMPORT_C const TSmlDbItemUid& ParentId() const; |
|
88 |
|
89 /** |
|
90 * Setter for parent UID value. |
|
91 * @param aParentId parent UID. |
|
92 */ |
|
93 IMPORT_C void SetParentId( const TSmlDbItemUid& aParentId ); |
|
94 |
|
95 /** |
|
96 * Getter for soft delete value. |
|
97 * @return const TBool& soft delete value. |
|
98 */ |
|
99 IMPORT_C const TBool& SoftDelete() const; |
|
100 |
|
101 /** |
|
102 * Setter for soft delete value. |
|
103 * @param aSoftDelete soft delete value. |
|
104 */ |
|
105 IMPORT_C void SetSoftDelete( const TBool& aSoftDelete ); |
|
106 |
|
107 /** |
|
108 * Compare method for comparing last change dates of two snapshot items. Returns < 0 if |
|
109 * this item is smaller than aItem, returns 0 if both items are equal and > 0 if |
|
110 * aItem is greater than this snapshot item. |
|
111 * @param aItem Item which this item is compared to. |
|
112 * @return TInt Comparison result. |
|
113 */ |
|
114 IMPORT_C TInt Compare( const TNSmlSnapshotItem& aItem ) const; |
|
115 |
|
116 private: |
|
117 TBool iSoftDelete; |
|
118 TTime iLastChangedDate; |
|
119 TSmlDbItemUid iItemId; |
|
120 TSmlDbItemUid iParentId; |
|
121 }; |
|
122 |
|
123 #endif // __NSMLSNAPSHOTITEM_H__ |
|
124 |
|
125 // End of File |