epoc32/include/app/CVPbkSpeedDialAttribute.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/app/CVPbkSpeedDialAttribute.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,109 @@
     1.4 +/*
     1.5 +* Copyright (c) 2005-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:  Virtual Phonebook attribute class for contact speed dialing.
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#ifndef CVPBKSPEEDDIALATTRIBUTE_H
    1.23 +#define CVPBKSPEEDDIALATTRIBUTE_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 +
    1.31 +// FORWARD DECLARATIONS
    1.32 +
    1.33 +/**
    1.34 + * Virtual Phonebook Speed dial attribute.
    1.35 + * Responsible for encapsulating the speed dial attribute management for
    1.36 + * contacts. 
    1.37 + */
    1.38 +class CVPbkSpeedDialAttribute : 
    1.39 +        public CBase, 
    1.40 +        public MVPbkContactAttribute
    1.41 +    {
    1.42 +    public: // static data
    1.43 +        /**
    1.44 +         * An undefined speed dial index. When this is used then implementation
    1.45 +         * will assume that client is interested in all speed dial indexes.
    1.46 +         */
    1.47 +        static const TInt KSpeedDialIndexNotDefined = -1;
    1.48 +        
    1.49 +    public: // constructor and destructor
    1.50 +        /**
    1.51 +         * Two-phased constructor.
    1.52 +         *
    1.53 +         * @param aIndex    Speed dial index.
    1.54 +         * @return A new instance of this class
    1.55 +         */
    1.56 +        IMPORT_C static CVPbkSpeedDialAttribute* NewL(TInt aIndex);
    1.57 +                
    1.58 +        /**
    1.59 +         * Two-phased constructor.
    1.60 +         * Index will be initialised with KSpeedDialIndexNotDefined.
    1.61 +         * Using this constructor it's possible to handle all the
    1.62 +         * contacts that have speed dials assigned. E.g. remove all speed
    1.63 +         * dial assignments or list all speed dial assignments.
    1.64 +         *
    1.65 +         * @return A new instance of this class
    1.66 +         */
    1.67 +        IMPORT_C static CVPbkSpeedDialAttribute* NewL();      
    1.68 +        
    1.69 +        /**
    1.70 +         * Destructor.
    1.71 +         */          
    1.72 +        ~CVPbkSpeedDialAttribute();
    1.73 +                
    1.74 +    public: // interface                
    1.75 +        /**
    1.76 +         * Sets new index for speed dial attribute.
    1.77 +         *
    1.78 +         * @param aIndex a new index
    1.79 +         */
    1.80 +        IMPORT_C void SetIndex(TInt aIndex);
    1.81 +
    1.82 +        /**
    1.83 +         * Returns index of the speed dial attribute.
    1.84 +         *
    1.85 +         * @return Index of the speed dial attribute.
    1.86 +         */
    1.87 +        IMPORT_C TInt Index() const;
    1.88 +        
    1.89 +        /**
    1.90 +         * Internal identification of speed dial attribute.
    1.91 +         * @return Unique id of the speed dial attribute.
    1.92 +         */
    1.93 +        inline static TUid Uid() 
    1.94 +            { 
    1.95 +            return TUid::Uid(KVPbkSpeedDialAttributeImplementationUID);
    1.96 +            }
    1.97 +        
    1.98 +    public: // from MVPbkContactAttribute
    1.99 +        TUid AttributeType() const;
   1.100 +        MVPbkContactAttribute* CloneLC() const;        
   1.101 +        
   1.102 +    private: // implementation
   1.103 +        CVPbkSpeedDialAttribute();
   1.104 +        
   1.105 +    private: // data
   1.106 +        /// Own: Speed dial index
   1.107 +        TInt iIndex;
   1.108 +    };
   1.109 +    
   1.110 +#endif // CVPBKSPEEDDIALATTRIBUTE_H
   1.111 +
   1.112 +// End of File