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.
     1 /*
     2 * Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:  Virtual Phonebook attribute class for contact speed dialing.
    15 *
    16 */
    17 
    18 
    19 #ifndef CVPBKSPEEDDIALATTRIBUTE_H
    20 #define CVPBKSPEEDDIALATTRIBUTE_H
    21 
    22 // INCLUDE FILES
    23 #include <e32base.h>
    24 #include <mvpbkcontactattribute.h>
    25 #include <mvpbkcontactattributemanager.h>
    26 #include <vpbkpublicuid.h>
    27 
    28 // FORWARD DECLARATIONS
    29 
    30 /**
    31  * Virtual Phonebook Speed dial attribute.
    32  * Responsible for encapsulating the speed dial attribute management for
    33  * contacts. 
    34  */
    35 class CVPbkSpeedDialAttribute : 
    36         public CBase, 
    37         public MVPbkContactAttribute
    38     {
    39     public: // static data
    40         /**
    41          * An undefined speed dial index. When this is used then implementation
    42          * will assume that client is interested in all speed dial indexes.
    43          */
    44         static const TInt KSpeedDialIndexNotDefined = -1;
    45         
    46     public: // constructor and destructor
    47         /**
    48          * Two-phased constructor.
    49          *
    50          * @param aIndex    Speed dial index.
    51          * @return A new instance of this class
    52          */
    53         IMPORT_C static CVPbkSpeedDialAttribute* NewL(TInt aIndex);
    54                 
    55         /**
    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.
    61          *
    62          * @return A new instance of this class
    63          */
    64         IMPORT_C static CVPbkSpeedDialAttribute* NewL();      
    65         
    66         /**
    67          * Destructor.
    68          */          
    69         ~CVPbkSpeedDialAttribute();
    70                 
    71     public: // interface                
    72         /**
    73          * Sets new index for speed dial attribute.
    74          *
    75          * @param aIndex a new index
    76          */
    77         IMPORT_C void SetIndex(TInt aIndex);
    78 
    79         /**
    80          * Returns index of the speed dial attribute.
    81          *
    82          * @return Index of the speed dial attribute.
    83          */
    84         IMPORT_C TInt Index() const;
    85         
    86         /**
    87          * Internal identification of speed dial attribute.
    88          * @return Unique id of the speed dial attribute.
    89          */
    90         inline static TUid Uid() 
    91             { 
    92             return TUid::Uid(KVPbkSpeedDialAttributeImplementationUID);
    93             }
    94         
    95     public: // from MVPbkContactAttribute
    96         TUid AttributeType() const;
    97         MVPbkContactAttribute* CloneLC() const;        
    98         
    99     private: // implementation
   100         CVPbkSpeedDialAttribute();
   101         
   102     private: // data
   103         /// Own: Speed dial index
   104         TInt iIndex;
   105     };
   106     
   107 #endif // CVPBKSPEEDDIALATTRIBUTE_H
   108 
   109 // End of File