phoneengine/PhoneCntFinder/inc/Misc/CPhCntSpeedDialMonitor.h
changeset 0 5f000ab63145
child 57 94dc1107e8b2
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2002 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:  It defines interface for speed dial for phone app.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPHCNTSPEEDDIALMONITOR_H
       
    20 #define CPHCNTSPEEDDIALMONITOR_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include    <e32base.h>
       
    24 #include <mphcntmatch.h>
       
    25 
       
    26 // CONSTANTS
       
    27 const TInt KPhCntContactItemNotFound = -1;
       
    28 const TInt KPhCntInvalidIndex = -1;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 class CSpdiaControl;
       
    32 class CEikImage;
       
    33 class MVPbkContactLink;
       
    34 class CPhCntContactId;
       
    35 
       
    36 /**
       
    37 *  It defines interface for speed dial for phone app.
       
    38 *
       
    39 *  @lib PhoneCntFinder
       
    40 *  @since 1.0
       
    41 */
       
    42 NONSHARABLE_CLASS( CPhCntSpeedDialMonitor )
       
    43     : public CBase
       
    44     {
       
    45     public: // New functions
       
    46 
       
    47         /**
       
    48         * Structure holding speed dial information.
       
    49         */
       
    50         struct TSpdDialFieldInfo
       
    51             {
       
    52             CPhCntContactId* iContactId;
       
    53             
       
    54             MPhCntMatch::TNumberType iNumberType;
       
    55             
       
    56             // Thumbnail index of a grid array.
       
    57             TInt iThumbIndex;
       
    58             };
       
    59         
       
    60         /**
       
    61         * Gets the speed dial number.
       
    62         *
       
    63         * @param aSpeedDialPosition a speed dial position
       
    64         * @return aPhoneNumber phone number
       
    65         * @return error code, KErrNone if success
       
    66         */
       
    67         virtual TInt GetSpeedDialFieldL( 
       
    68             TInt aSpeedDialPosition, 
       
    69             TDes& aPhoneNumber ) = 0;
       
    70 
       
    71         /**
       
    72         * Gets the speed dial number.
       
    73         *
       
    74         * @param aSpeedDialPosition a speed dial position
       
    75         * @return aPhoneNumber phone number
       
    76         * @return aFieldInfo speed dial contact information
       
    77         * @return error code, KErrNone if success
       
    78         */
       
    79         virtual TInt GetSpeedDialFieldL(
       
    80             TInt aSpeedDialPosition, 
       
    81             TDes& aPhoneNumber,
       
    82             TSpdDialFieldInfo& aFieldInfo ) = 0;
       
    83 
       
    84         /**
       
    85         * Assigns phone number to speed dial location
       
    86         *
       
    87         * @param aSpeedDialPosition the speed dial position
       
    88         * @return aPhoneNumber If the number is assigned successfully, phone
       
    89         *         return the phone number
       
    90         * @return KErrNone if successfully assigned, KErrNotFound if user
       
    91         *         cancel the assignation
       
    92         */
       
    93         virtual TInt AssignSpeedDialFieldL(
       
    94             TInt aSpeedDialPosition,
       
    95             TDes& aPhoneNumber ) = 0;
       
    96 
       
    97         /**
       
    98         * Assigns phone number to speed dial location
       
    99         *
       
   100         * @param aSpeedDialPosition the speed dial position
       
   101         * @return aPhoneNumber If the number is assigned successfully, phone
       
   102         *         return the phone number
       
   103         * @return aFieldInfo speed dial contact information
       
   104         * @return KErrNone if successfully assigned, KErrNotFound if user
       
   105         *         cancel the assignation
       
   106         */
       
   107         virtual TInt AssignSpeedDialFieldL(
       
   108             TInt aSpeedDialPosition,
       
   109             TDes& aPhoneNumber,
       
   110             TSpdDialFieldInfo& aFieldInfo ) = 0;
       
   111 
       
   112         /**
       
   113         * Cancel speed dialing assignment process
       
   114         */
       
   115         virtual void Cancel() = 0;
       
   116 
       
   117         /**
       
   118         * Create number type icon from phone book view
       
   119         * @param aNumberType the number type
       
   120         * @return returns a object of CEikImage
       
   121         */
       
   122         virtual CEikImage* CreateNumberTypeIconLC( TInt aNumberType ) = 0;
       
   123 
       
   124     };
       
   125 
       
   126 #endif      // CPHCNTSPEEDDIALMONITOR_H
       
   127             
       
   128 // End of File