equal
deleted
inserted
replaced
27 #include <calentry.h> |
27 #include <calentry.h> |
28 //#include "calentryimpl.h" |
28 //#include "calentryimpl.h" |
29 #include <e32math.h> |
29 #include <e32math.h> |
30 |
30 |
31 #include <asshddefs.h> |
31 #include <asshddefs.h> |
32 #define KUserDataInt 4 |
32 |
33 |
33 |
34 //---------------------------------- CAgnEntry ------------------------------------------ |
34 //---------------------------------- CAgnEntry ------------------------------------------ |
35 |
35 |
36 EXPORT_C CAgnEntry* CAgnEntry::NewL(CCalEntry::TType aType) |
36 EXPORT_C CAgnEntry* CAgnEntry::NewL(CCalEntry::TType aType) |
37 { |
37 { |
409 if ( Location() != aEntry.Location() ) |
409 if ( Location() != aEntry.Location() ) |
410 { |
410 { |
411 return EFalse; |
411 return EFalse; |
412 } |
412 } |
413 |
413 |
414 if ( UserDataInt() != aEntry.UserDataInt() ) |
|
415 { |
|
416 return EFalse; |
|
417 } |
|
418 |
|
419 return ETrue; |
414 return ETrue; |
420 } |
415 } |
421 |
416 |
422 |
417 |
423 EXPORT_C const TDesC& CAgnEntry::AlarmSoundName() const |
418 EXPORT_C const TDesC& CAgnEntry::AlarmSoundName() const |
690 } |
685 } |
691 } |
686 } |
692 |
687 |
693 // Set the user integer of the stream. |
688 // Set the user integer of the stream. |
694 aStream.WriteInt32L( UserInt() ); |
689 aStream.WriteInt32L( UserInt() ); |
695 |
690 |
696 TInt skipCount( 0 ); |
691 // future DC proofing |
697 //skip count(4) for UserDataInt is added |
692 aStream.WriteUint32L(0); // number of bytes until end of entry |
698 //to read those many bytes after fixed length of agmentry. |
|
699 skipCount += KUserDataInt; |
|
700 |
|
701 // Number of bytes until end of entry |
|
702 aStream.WriteUint32L( skipCount ); |
|
703 aStream.WriteInt32L( UserDataInt() ); |
|
704 } |
693 } |
705 |
694 |
706 |
695 |
707 EXPORT_C void CAgnEntry::InternalizeL(RReadStream& aStream) |
696 EXPORT_C void CAgnEntry::InternalizeL(RReadStream& aStream) |
708 { |
697 { |
837 } |
826 } |
838 |
827 |
839 // Set the user integer of this entry from the stream. |
828 // Set the user integer of this entry from the stream. |
840 SetUserInt(aStream.ReadInt32L()); |
829 SetUserInt(aStream.ReadInt32L()); |
841 |
830 |
|
831 // future DC proofing |
842 size = aStream.ReadUint32L(); // number of bytes until end of entry |
832 size = aStream.ReadUint32L(); // number of bytes until end of entry |
843 |
|
844 if ( size >= KUserDataInt ) |
|
845 { |
|
846 SetUserDataInt( aStream.ReadInt32L() ); |
|
847 size -= KUserDataInt; |
|
848 } |
|
849 while (size > 0) |
833 while (size > 0) |
850 { |
834 { |
851 aStream.ReadUint8L(); // ignore data |
835 aStream.ReadUint8L(); // ignore data |
852 size--; |
836 size--; |
853 } |
837 } |
854 } |
838 } |
855 |
839 |
856 EXPORT_C CAgnEntry* CAgnEntry::CloneL() const |
840 EXPORT_C CAgnEntry* CAgnEntry::CloneL() const |
857 { |
841 { |
858 CAgnEntry* entry = NULL; |
842 CAgnEntry* entry = NULL; |
1021 if(aCopyType == CCalEntry::ECopyAll) |
1005 if(aCopyType == CCalEntry::ECopyAll) |
1022 { |
1006 { |
1023 HBufC8* guid = aSource.Guid().AllocL(); |
1007 HBufC8* guid = aSource.Guid().AllocL(); |
1024 SetGuid(guid); |
1008 SetGuid(guid); |
1025 } |
1009 } |
1026 // copy int |
|
1027 iUserDataInt = aSource.UserDataInt(); |
|
1028 } |
1010 } |
1029 |
1011 |
1030 EXPORT_C CCalEntry::TReplicationStatus CAgnEntry::ReplicationStatus() const |
1012 EXPORT_C CCalEntry::TReplicationStatus CAgnEntry::ReplicationStatus() const |
1031 /** Get ReplicationStatus |
1013 /** Get ReplicationStatus |
1032 |
1014 |
1250 } |
1232 } |
1251 |
1233 |
1252 iPhoneOwner = aAttendee; |
1234 iPhoneOwner = aAttendee; |
1253 } |
1235 } |
1254 |
1236 |
1255 EXPORT_C void CAgnEntry::ClearMRSpecificData() |
|
1256 { |
|
1257 // clears the iMeetingOrganizer and iAttendeeList. |
|
1258 if( iMeetingOrganizer ) |
|
1259 { |
|
1260 delete iMeetingOrganizer; |
|
1261 iMeetingOrganizer = NULL; |
|
1262 |
|
1263 } |
|
1264 if( iPhoneOwner ) |
|
1265 { |
|
1266 iPhoneOwner = NULL; |
|
1267 } |
|
1268 |
|
1269 if( iAttendeeList ) |
|
1270 { |
|
1271 iAttendeeList->ResetAndDestroy(); |
|
1272 delete iAttendeeList; |
|
1273 iAttendeeList = NULL; |
|
1274 } |
|
1275 } |
|
1276 |
1237 |
1277 EXPORT_C void CAgnEntry::SetDTStampUtcL(const TTime& aDTStampUtc) |
1238 EXPORT_C void CAgnEntry::SetDTStampUtcL(const TTime& aDTStampUtc) |
1278 /** |
1239 /** |
1279 @internalComponent |
1240 @internalComponent |
1280 */ |
1241 */ |
2123 |
2084 |
2124 TBool CAgnEntry::IsFlagSet(TFlags aFlag) const |
2085 TBool CAgnEntry::IsFlagSet(TFlags aFlag) const |
2125 { |
2086 { |
2126 return (iFlags & aFlag); |
2087 return (iFlags & aFlag); |
2127 } |
2088 } |
2128 |
|
2129 EXPORT_C void CAgnEntry::SetUserDataInt( TUint32 aUserInt ) |
|
2130 { |
|
2131 iUserDataInt = aUserInt; |
|
2132 } |
|
2133 |
|
2134 EXPORT_C TUint32 CAgnEntry::UserDataInt() const |
|
2135 { |
|
2136 return iUserDataInt; |
|
2137 } |
|