calendarengines/versit2/inc/ICalProperty.h
changeset 0 f979ecb2b13e
child 15 21b79936b33a
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 #ifndef ICALPROPERTY_H
       
     2 #define ICALPROPERTY_H/*
       
     3 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
       
     4 * All rights reserved.
       
     5 * This component and the accompanying materials are made available
       
     6 * under the terms of "Eclipse Public License v1.0"
       
     7 * which accompanies this distribution, and is available
       
     8 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9 *
       
    10 * Initial Contributors:
       
    11 * Nokia Corporation - initial contribution.
       
    12 *
       
    13 * Contributors:
       
    14 *
       
    15 * Description:   Holds the definition of CICalProperty.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 // System includes.
       
    22 #include <e32base.h>	// CBase
       
    23 
       
    24 // Forward declarations.
       
    25 class CICalPropertyParam;
       
    26 class CICalValue;
       
    27 class CICalContentLineWriter;
       
    28 
       
    29 /**
       
    30 Class representing a property.
       
    31 @publishedPartner
       
    32 */
       
    33 class CICalProperty : public CBase
       
    34 	{
       
    35 public:	// Construction/destruction.
       
    36 	IMPORT_C static CICalProperty* NewL(const TDesC& aType, const TDesC& aValue);
       
    37 	IMPORT_C static CICalProperty* NewLC(const TDesC& aType, const TDesC& aValue);
       
    38 	
       
    39 	IMPORT_C static CICalProperty* NewL(const TDesC& aType, CICalValue* aValue);
       
    40 	IMPORT_C static CICalProperty* NewLC(const TDesC& aType, CICalValue* aValue);
       
    41 	
       
    42 	~CICalProperty();
       
    43 	
       
    44 	// Non-exported constructors.
       
    45 	static CICalProperty* NewL(const TDesC& aType);
       
    46 	static CICalProperty* NewLC(const TDesC& aType);
       
    47 
       
    48 public:	// Methods.
       
    49 	IMPORT_C const TDesC& Type() const;
       
    50 	IMPORT_C CICalPropertyParam& AddPropertyParamL(const TDesC& aType, CICalValue* aValue);
       
    51 	IMPORT_C CICalPropertyParam& AddPropertyParamL(const TDesC& aType, const TDesC& aValue);
       
    52 	IMPORT_C void AddValueL(const TDesC& aValue);
       
    53 	IMPORT_C void AddValueL(CICalValue* aValue);
       
    54 	IMPORT_C const RPointerArray<CICalPropertyParam>& Parameters() const;
       
    55 	IMPORT_C const RPointerArray<CICalValue>& Values() const;
       
    56 	IMPORT_C const CICalPropertyParam* FindParam(const TDesC& aType) const;
       
    57 	
       
    58 	CICalPropertyParam& CICalProperty::AddPropertyParamL();
       
    59 	void RemovePropertyParamL(const CICalPropertyParam& aParam);
       
    60 	void ExternalizeL(CICalContentLineWriter& aWriter);
       
    61 	
       
    62 private:	// Construction.
       
    63 	CICalProperty();
       
    64 	CICalProperty(CICalValue* aValue);
       
    65 	void ConstructL(const TDesC& aType);
       
    66 	void ConstructL(const TDesC& aType, const TDesC& aValue);
       
    67 	void ConstructL(const TDesC& aType, CICalValue* aValue);
       
    68 	
       
    69 private:	// Attributes.
       
    70 	HBufC* iType;
       
    71 	CICalValue* iValue;
       
    72 	RPointerArray<CICalPropertyParam> iParams;
       
    73 	RPointerArray<CICalValue> iValues;
       
    74 	};
       
    75 	
       
    76 #endif	// ICALPROPERTY_H
       
    77 
       
    78 // End of File