phoneengine/PhoneCntFinder/ContactService/inc/cphcntspeeddialimpl.h
branchRCL_3
changeset 62 5266b1f337bd
child 81 c26cc2a7c548
equal deleted inserted replaced
61:41a7f70b3818 62:5266b1f337bd
       
     1 /*
       
     2 * Copyright (c)  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:  Definition of CPhCntSpeedDialImpl class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPHCNTSPEEDDIALIMPL_H
       
    20 #define CPHCNTSPEEDDIALIMPL_H
       
    21 
       
    22 #include    <e32base.h>
       
    23 #include    "CPhCntSpeedDialMonitor.h"
       
    24 
       
    25 class CSpdiaDialogs;
       
    26 class MPhCntContactManager;
       
    27 class CPhCntSpeedDialContactLinkFetch;
       
    28 class CPhCntFetchContact;
       
    29 class CPhCntContactStores;
       
    30 class CPhCntContact;
       
    31 class CPhCntSpeedDialMonitor;
       
    32 class MPhoneCntPbkOwner;
       
    33 class CEikStatusPane;
       
    34 
       
    35 /**
       
    36  *  ?one_line_short_description
       
    37  *
       
    38  *  ?more_complete_description
       
    39  *
       
    40  *  @lib ?library
       
    41  *  @since S60 ?S60_version *** for example, S60 v3.0
       
    42  */
       
    43 NONSHARABLE_CLASS( CPhCntSpeedDialImpl ) 
       
    44     : public CPhCntSpeedDialMonitor
       
    45     {
       
    46     public:
       
    47         
       
    48         static CPhCntSpeedDialImpl* NewL( MPhoneCntPbkOwner& aPbkOwner );
       
    49 
       
    50         static CPhCntSpeedDialImpl* NewLC( MPhoneCntPbkOwner& aPbkOwner );
       
    51 
       
    52         virtual ~CPhCntSpeedDialImpl();
       
    53     
       
    54     public: // from base class CPhCntSpeedDialMonitor
       
    55 
       
    56          /**
       
    57          * From base class CPhCntSpeedDialMonitor
       
    58          * @since S60 v3.2
       
    59          * @see CPhCntSpeedDialMonitor
       
    60          */
       
    61         void GetSpeedDialFieldInfoL( TInt aSpeedDialPosition,
       
    62             TSpdDialFieldInfo& aFieldInfo ); 
       
    63          
       
    64         /**
       
    65          * From base class CPhCntSpeedDialMonitor
       
    66          * @since S60 v3.2
       
    67          * @see CPhCntSpeedDialMonitor
       
    68          */
       
    69         TInt GetSpeedDialFieldL( 
       
    70             TInt aSpeedDialPosition, 
       
    71             TDes& aPhoneNumber );
       
    72 
       
    73         /**
       
    74          * From base class CPhCntSpeedDialMonitor
       
    75          * @since S60 v3.2
       
    76          * @see CPhCntSpeedDialMonitor
       
    77          */
       
    78         TInt GetSpeedDialFieldL(
       
    79             TInt aSpeedDialPosition, 
       
    80             TDes& aPhoneNumber,
       
    81             TSpdDialFieldInfo& aFieldInfo );
       
    82             
       
    83             
       
    84         /**
       
    85          * From base class CPhCntSpeedDialMonitor
       
    86          * @since S60 v3.2
       
    87          * @see CPhCntSpeedDialMonitor
       
    88          */
       
    89         TInt AssignSpeedDialFieldL(
       
    90             TInt aSpeedDialPosition,
       
    91             TDes& aPhoneNumber );
       
    92 
       
    93         /**
       
    94          * From base class CPhCntSpeedDialMonitor
       
    95          * @since S60 v3.2
       
    96          * @see CPhCntSpeedDialMonitor
       
    97          */
       
    98         TInt AssignSpeedDialFieldL(
       
    99             TInt aSpeedDialPosition,
       
   100             TDes& aPhoneNumber,
       
   101             TSpdDialFieldInfo& aFieldInfo );
       
   102             
       
   103         /**
       
   104          * From base class CPhCntSpeedDialMonitor
       
   105          * @since S60 v3.2
       
   106          * @see CPhCntSpeedDialMonitor
       
   107          */
       
   108         virtual void Cancel();
       
   109         
       
   110         /**
       
   111          * From base class CPhCntSpeedDialMonitor
       
   112          * @since S60 v3.2
       
   113          * @see CPhCntSpeedDialMonitor
       
   114          */
       
   115         virtual CEikImage* CreateNumberTypeIconLC( TInt aNumberType );
       
   116 
       
   117     private:
       
   118 
       
   119         CPhCntSpeedDialImpl( MPhoneCntPbkOwner& aPbkOwner );
       
   120 
       
   121         void ConstructL();
       
   122 
       
   123         TInt FetchNumberL( TInt aSpeedDialPosition, TDes& aPhoneNumber );
       
   124                 
       
   125         TInt FetchContact( TInt aSpeedDialPosition, CPhCntContact*& aContact );
       
   126         
       
   127         void CopyNumberL( TDes& aAppendTo, const TDesC& aNumber );
       
   128         
       
   129         void ParseNumber( TDes& aNumber );
       
   130         
       
   131         /**
       
   132          * Setups the field info with new attributes.
       
   133          * @param aContact Contact information
       
   134          * @param aSpeedDialPosition A speed dial position.
       
   135          * @param aFieldInfo Speed dial contact information.
       
   136          */
       
   137         void CopyContactInfoToFieldInfoL( 
       
   138             CPhCntContact& aContact,
       
   139             TInt aSpeedDialPosition, 
       
   140             TSpdDialFieldInfo& aFieldInfo );
       
   141 
       
   142     private: // data
       
   143 
       
   144         /**
       
   145          * Contact manager for accessing virtual phonebook services.
       
   146          * Not own.
       
   147          */
       
   148         MPhCntContactManager& iContactManager;
       
   149         
       
   150         /**
       
   151          * Phonebook owner
       
   152          * Own.
       
   153          */ 
       
   154         MPhoneCntPbkOwner& iPbkOwner;
       
   155 
       
   156         /**
       
   157          * Fetches speed dial contact link.
       
   158          * Own.
       
   159          */
       
   160         CPhCntSpeedDialContactLinkFetch* iSpeedDialContactLinkFetcher;
       
   161         
       
   162         /**
       
   163          * Fetches speed dial contact using speed dial contact link.
       
   164          * Own.
       
   165          */
       
   166         CPhCntFetchContact* iContactFetcher;
       
   167         
       
   168         /**
       
   169          * Service for contact fetching.
       
   170          * Own.
       
   171          */
       
   172         CPhCntContactStores* iContactStores;
       
   173         
       
   174         /**
       
   175          * Speed Dial Dialogs.
       
   176          * Own.
       
   177          */
       
   178         CSpdiaDialogs* iSpdDial;   
       
   179     };
       
   180 
       
   181 
       
   182 #endif // CPHCNTSPEEDDIALIMPL_H