inc/mdcitem.h
changeset 0 c53acadfccc6
child 1 acef663c1218
equal deleted inserted replaced
-1:000000000000 0:c53acadfccc6
       
     1 /*
       
     2 * Copyright (c) 2007-2009 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:  common item object for MdE
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __MDCITEM_H__
       
    19 #define __MDCITEM_H__
       
    20 
       
    21 #include "mdscommoninternal.h"
       
    22 #include "mdcserializationtype.h"
       
    23 
       
    24 NONSHARABLE_CLASS(TMdCItem) : protected TMdCSerializationType
       
    25 	{
       
    26 	protected:
       
    27 		TMdCItem(TMdCStructTypes aType) : TMdCSerializationType( aType )
       
    28 			{
       
    29 			}
       
    30 		
       
    31 	public:
       
    32 		TItemId iId;
       
    33 		TDefId  iDefId;
       
    34 	};
       
    35 
       
    36 NONSHARABLE_CLASS(TMdCObject) : public TMdCItem
       
    37 	{
       
    38 	public:
       
    39 		IMPORT_C TMdCObject();
       
    40 
       
    41 		IMPORT_C static const TMdCObject& GetFromBufferL( CMdCSerializationBuffer& aBuffer );
       
    42 		IMPORT_C void SerializeL(CMdCSerializationBuffer& aBuffer);
       
    43 		IMPORT_C void DeserializeL(CMdCSerializationBuffer& aBuffer);
       
    44 
       
    45 	public:
       
    46 		TUint32 iFlags;
       
    47 		TUint32 iMediaId;
       
    48 		TUint32 iUsageCount;
       
    49 		TInt64 iGuidHigh;
       
    50 		TInt64 iGuidLow;
       
    51 		TMdCValueUnion iUri;
       
    52 		TMdCValueUnion iProperties;
       
    53 		TMdCValueUnion iFreeTexts;
       
    54 	};
       
    55 
       
    56 NONSHARABLE_CLASS(TMdCRelation) : public TMdCItem
       
    57 	{
       
    58 	public:
       
    59 		IMPORT_C TMdCRelation();
       
    60 
       
    61 		IMPORT_C static const TMdCRelation& GetFromBufferL( CMdCSerializationBuffer& aBuffer );
       
    62 		IMPORT_C void SerializeL(CMdCSerializationBuffer& aBuffer);
       
    63 		IMPORT_C void DeserializeL(CMdCSerializationBuffer& aBuffer);
       
    64 
       
    65 	public:
       
    66 		TItemId iLeftObjectId;
       
    67 		TItemId iRightObjectId;
       
    68 		TInt32 iParameter;
       
    69 		TInt64 iGuidHigh;
       
    70 		TInt64 iGuidLow;
       
    71 		TTime iLastModifiedDate;
       
    72 	};
       
    73 
       
    74 NONSHARABLE_CLASS(TMdCEvent) : public TMdCItem
       
    75 	{
       
    76 	public:
       
    77 		IMPORT_C TMdCEvent();
       
    78 
       
    79 		IMPORT_C static const TMdCEvent& GetFromBufferL( CMdCSerializationBuffer& aBuffer );
       
    80 		IMPORT_C void SerializeL(CMdCSerializationBuffer& aBuffer);
       
    81 		IMPORT_C void DeserializeL(CMdCSerializationBuffer& aBuffer);
       
    82 
       
    83 	public:
       
    84 		TItemId iObjectId;
       
    85 		TTime iTime;
       
    86 		TMdCValueUnion iSourceText;
       
    87 		TMdCValueUnion iParticipantText;
       
    88 	};
       
    89 
       
    90 NONSHARABLE_CLASS(TMdCProperty) : public TMdCSerializationType
       
    91 	{
       
    92 	public:
       
    93 		IMPORT_C TMdCProperty();
       
    94 		
       
    95 		IMPORT_C static const TMdCProperty& GetFromBufferL( CMdCSerializationBuffer& aBuffer );
       
    96 		IMPORT_C void SerializeL(CMdCSerializationBuffer& aBuffer);
       
    97 		IMPORT_C void DeserializeL(CMdCSerializationBuffer& aBuffer);
       
    98 
       
    99 	public:
       
   100 		TDefId iPropertyDefId;
       
   101 		TUint32 iModFlags;
       
   102 		TMdCValueUnion iValue;
       
   103 	};
       
   104 
       
   105 #endif /* __MDCITEM_H__ */