2 * Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Virtual Phonebook attribute class for contact speed dialing.
19 #ifndef CVPBKSPEEDDIALATTRIBUTE_H
20 #define CVPBKSPEEDDIALATTRIBUTE_H
24 #include <mvpbkcontactattribute.h>
25 #include <mvpbkcontactattributemanager.h>
26 #include <vpbkpublicuid.h>
28 // FORWARD DECLARATIONS
31 * Virtual Phonebook Speed dial attribute.
32 * Responsible for encapsulating the speed dial attribute management for
35 class CVPbkSpeedDialAttribute :
37 public MVPbkContactAttribute
39 public: // static data
41 * An undefined speed dial index. When this is used then implementation
42 * will assume that client is interested in all speed dial indexes.
44 static const TInt KSpeedDialIndexNotDefined = -1;
46 public: // constructor and destructor
48 * Two-phased constructor.
50 * @param aIndex Speed dial index.
51 * @return A new instance of this class
53 IMPORT_C static CVPbkSpeedDialAttribute* NewL(TInt aIndex);
56 * Two-phased constructor.
57 * Index will be initialised with KSpeedDialIndexNotDefined.
58 * Using this constructor it's possible to handle all the
59 * contacts that have speed dials assigned. E.g. remove all speed
60 * dial assignments or list all speed dial assignments.
62 * @return A new instance of this class
64 IMPORT_C static CVPbkSpeedDialAttribute* NewL();
69 ~CVPbkSpeedDialAttribute();
73 * Sets new index for speed dial attribute.
75 * @param aIndex a new index
77 IMPORT_C void SetIndex(TInt aIndex);
80 * Returns index of the speed dial attribute.
82 * @return Index of the speed dial attribute.
84 IMPORT_C TInt Index() const;
87 * Internal identification of speed dial attribute.
88 * @return Unique id of the speed dial attribute.
90 inline static TUid Uid()
92 return TUid::Uid(KVPbkSpeedDialAttributeImplementationUID);
95 public: // from MVPbkContactAttribute
96 TUid AttributeType() const;
97 MVPbkContactAttribute* CloneLC() const;
99 private: // implementation
100 CVPbkSpeedDialAttribute();
103 /// Own: Speed dial index
107 #endif // CVPBKSPEEDDIALATTRIBUTE_H