1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/app/CVPbkDefaultAttribute.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,107 @@
1.4 +/*
1.5 +* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: An attribute class for contact defaults.
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +#ifndef CVPBKDEFAULTATTRIBUTE_H
1.23 +#define CVPBKDEFAULTATTRIBUTE_H
1.24 +
1.25 +// INCLUDE FILES
1.26 +#include <e32base.h>
1.27 +#include <mvpbkcontactattribute.h>
1.28 +#include <mvpbkcontactattributemanager.h>
1.29 +#include <vpbkpublicuid.h>
1.30 +#include <vpbkfieldtype.hrh>
1.31 +
1.32 +
1.33 +// CLASS DECLARATIONS
1.34 +/**
1.35 + * Virtual Phonebook default attribute for contacts.
1.36 + * Responsible for encapsulating the default attribute management for
1.37 + * contacts.
1.38 + *
1.39 + * The supported default types are declared in TVPbkDefaultType.
1.40 + */
1.41 +class CVPbkDefaultAttribute :
1.42 + public CBase,
1.43 + public MVPbkContactAttribute
1.44 + {
1.45 + public: // static data
1.46 + /**
1.47 + * KDefaultTypeNotDefined.
1.48 + */
1.49 + static const TVPbkDefaultType KDefaultTypeNotDefined = EVPbkDefaultTypeUndefined;
1.50 +
1.51 + /**
1.52 + * Returns the unique identifier associate with the default attribute.
1.53 + *
1.54 + * @return Default attribute implementation uid.
1.55 + */
1.56 + inline static TUid Uid() { return TUid::Uid(KVPbkDefaultAttributeImplementationUID); }
1.57 +
1.58 + public: // constructor and destructor
1.59 + /**
1.60 + * Two-phased constructor.
1.61 + *
1.62 + * @param aType New default's type.
1.63 + * @return New instance of this class.
1.64 + */
1.65 + IMPORT_C static CVPbkDefaultAttribute* NewL(
1.66 + TVPbkDefaultType aType);
1.67 +
1.68 + /**
1.69 + * Two-phased constructor.
1.70 + * Default type will be initialised to EVPbkDefaultTypeUndefined.
1.71 + *
1.72 + * @return New instance of this class.
1.73 + */
1.74 + IMPORT_C static CVPbkDefaultAttribute* NewL();
1.75 +
1.76 + /**
1.77 + * Destructor.
1.78 + */
1.79 + ~CVPbkDefaultAttribute();
1.80 +
1.81 + public: // interface
1.82 + /**
1.83 + * Set default type.
1.84 + *
1.85 + * @param aType New default's type
1.86 + */
1.87 + IMPORT_C void SetDefaultType(TVPbkDefaultType aType);
1.88 +
1.89 + /**
1.90 + * Returns default's type.
1.91 + *
1.92 + * @return Default's type.
1.93 + */
1.94 + IMPORT_C TVPbkDefaultType DefaultType() const;
1.95 +
1.96 + public: // from MVPbkContactAttribute
1.97 + TUid AttributeType() const;
1.98 + MVPbkContactAttribute* CloneLC() const;
1.99 +
1.100 + private: // implementation
1.101 + CVPbkDefaultAttribute();
1.102 +
1.103 + private: // Data
1.104 + /// Own: Default's type
1.105 + TVPbkDefaultType iDefaultType;
1.106 + };
1.107 +
1.108 +#endif // CVPBKDEFAULTATTRIBUTE_H
1.109 +
1.110 +// End of File