epoc32/include/app/CVPbkSpeedDialAttribute.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@4
     1
/*
williamr@4
     2
* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
williamr@4
     3
* All rights reserved.
williamr@4
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@4
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@4
     8
*
williamr@4
     9
* Initial Contributors:
williamr@4
    10
* Nokia Corporation - initial contribution.
williamr@4
    11
*
williamr@4
    12
* Contributors:
williamr@4
    13
*
williamr@4
    14
* Description:  Virtual Phonebook attribute class for contact speed dialing.
williamr@4
    15
*
williamr@4
    16
*/
williamr@4
    17
williamr@4
    18
williamr@4
    19
#ifndef CVPBKSPEEDDIALATTRIBUTE_H
williamr@4
    20
#define CVPBKSPEEDDIALATTRIBUTE_H
williamr@4
    21
williamr@4
    22
// INCLUDE FILES
williamr@4
    23
#include <e32base.h>
williamr@4
    24
#include <mvpbkcontactattribute.h>
williamr@4
    25
#include <mvpbkcontactattributemanager.h>
williamr@4
    26
#include <vpbkpublicuid.h>
williamr@4
    27
williamr@4
    28
// FORWARD DECLARATIONS
williamr@4
    29
williamr@4
    30
/**
williamr@4
    31
 * Virtual Phonebook Speed dial attribute.
williamr@4
    32
 * Responsible for encapsulating the speed dial attribute management for
williamr@4
    33
 * contacts. 
williamr@4
    34
 */
williamr@4
    35
class CVPbkSpeedDialAttribute : 
williamr@4
    36
        public CBase, 
williamr@4
    37
        public MVPbkContactAttribute
williamr@4
    38
    {
williamr@4
    39
    public: // static data
williamr@4
    40
        /**
williamr@4
    41
         * An undefined speed dial index. When this is used then implementation
williamr@4
    42
         * will assume that client is interested in all speed dial indexes.
williamr@4
    43
         */
williamr@4
    44
        static const TInt KSpeedDialIndexNotDefined = -1;
williamr@4
    45
        
williamr@4
    46
    public: // constructor and destructor
williamr@4
    47
        /**
williamr@4
    48
         * Two-phased constructor.
williamr@4
    49
         *
williamr@4
    50
         * @param aIndex    Speed dial index.
williamr@4
    51
         * @return A new instance of this class
williamr@4
    52
         */
williamr@4
    53
        IMPORT_C static CVPbkSpeedDialAttribute* NewL(TInt aIndex);
williamr@4
    54
                
williamr@4
    55
        /**
williamr@4
    56
         * Two-phased constructor.
williamr@4
    57
         * Index will be initialised with KSpeedDialIndexNotDefined.
williamr@4
    58
         * Using this constructor it's possible to handle all the
williamr@4
    59
         * contacts that have speed dials assigned. E.g. remove all speed
williamr@4
    60
         * dial assignments or list all speed dial assignments.
williamr@4
    61
         *
williamr@4
    62
         * @return A new instance of this class
williamr@4
    63
         */
williamr@4
    64
        IMPORT_C static CVPbkSpeedDialAttribute* NewL();      
williamr@4
    65
        
williamr@4
    66
        /**
williamr@4
    67
         * Destructor.
williamr@4
    68
         */          
williamr@4
    69
        ~CVPbkSpeedDialAttribute();
williamr@4
    70
                
williamr@4
    71
    public: // interface                
williamr@4
    72
        /**
williamr@4
    73
         * Sets new index for speed dial attribute.
williamr@4
    74
         *
williamr@4
    75
         * @param aIndex a new index
williamr@4
    76
         */
williamr@4
    77
        IMPORT_C void SetIndex(TInt aIndex);
williamr@4
    78
williamr@4
    79
        /**
williamr@4
    80
         * Returns index of the speed dial attribute.
williamr@4
    81
         *
williamr@4
    82
         * @return Index of the speed dial attribute.
williamr@4
    83
         */
williamr@4
    84
        IMPORT_C TInt Index() const;
williamr@4
    85
        
williamr@4
    86
        /**
williamr@4
    87
         * Internal identification of speed dial attribute.
williamr@4
    88
         * @return Unique id of the speed dial attribute.
williamr@4
    89
         */
williamr@4
    90
        inline static TUid Uid() 
williamr@4
    91
            { 
williamr@4
    92
            return TUid::Uid(KVPbkSpeedDialAttributeImplementationUID);
williamr@4
    93
            }
williamr@4
    94
        
williamr@4
    95
    public: // from MVPbkContactAttribute
williamr@4
    96
        TUid AttributeType() const;
williamr@4
    97
        MVPbkContactAttribute* CloneLC() const;        
williamr@4
    98
        
williamr@4
    99
    private: // implementation
williamr@4
   100
        CVPbkSpeedDialAttribute();
williamr@4
   101
        
williamr@4
   102
    private: // data
williamr@4
   103
        /// Own: Speed dial index
williamr@4
   104
        TInt iIndex;
williamr@4
   105
    };
williamr@4
   106
    
williamr@4
   107
#endif // CVPBKSPEEDDIALATTRIBUTE_H
williamr@4
   108
williamr@4
   109
// End of File