phoneapp/phoneuiview/inc/cphonedtmfnumberlistquery.h
changeset 0 5f000ab63145
child 16 4393b07b8c5d
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 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: Definition of CPhoneDtmfNumberListQuery class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPHONEDTMFNUMBERLISTQUERY_H
       
    20 #define CPHONEDTMFNUMBERLISTQUERY_H
       
    21 
       
    22 #include    <AknQueryDialog.h>
       
    23 
       
    24     
       
    25 // CLASS DECLARATION
       
    26 class MPhoneQueryObserver; 
       
    27     
       
    28 /**
       
    29 *   DTMF number list query.
       
    30 *
       
    31 *   Shows DTMF list query. 
       
    32 *   By default list is formatted with 'Find' and 'Enter manually' items.
       
    33 *   In addition predefined DTMF of the contact can be seen in 
       
    34 *   list if available.
       
    35 *
       
    36 *   Otherwise base class can handle it.
       
    37 *
       
    38 *   @since 5.0
       
    39 */
       
    40 class CPhoneDtmfNumberListQuery : public CAknListQueryDialog
       
    41     {
       
    42     public:  // Constructors and destructor      
       
    43                
       
    44          /**
       
    45         * Creates new instance of CPhoneDtmfNumberListQuery
       
    46         * @param aCommandObserver callback observer
       
    47         * @param aQueryObserver  query observer
       
    48         * @param aSelectedDtmfNumber selected predefined dtmf number 
       
    49         * @return CPhoneDtmfNumberListQuery* object  
       
    50         */
       
    51         static CPhoneDtmfNumberListQuery* 
       
    52             CPhoneDtmfNumberListQuery::NewL( MEikCommandObserver& aCommandObserver,
       
    53                                              MPhoneQueryObserver& aQueryObserver,
       
    54                                              HBufC*& aSelectedDtmfNumber );
       
    55         
       
    56         /**
       
    57         * Destructor.
       
    58         */
       
    59         virtual ~CPhoneDtmfNumberListQuery();
       
    60     
       
    61     public:
       
    62         
       
    63         /**
       
    64         * Appends given string to DTMF array 
       
    65         * @param aString -string to be added 
       
    66         */    
       
    67         void AppendStringToArrayL( TDesC& aString );
       
    68         
       
    69     protected: // Functions from base classes
       
    70             
       
    71         /**
       
    72         * From base class, 
       
    73         * check if it is ok to exit.
       
    74         */
       
    75         TBool OkToExitL( TInt aButtonId );
       
    76             
       
    77         /**
       
    78         * From CEikDialog, initialization after layout.
       
    79         */
       
    80         void PostLayoutDynInitL();
       
    81         
       
    82 
       
    83         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
       
    84                                           TEventCode aType );
       
    85     
       
    86     private:
       
    87     
       
    88         /**
       
    89         * C++ constructor.
       
    90         * @param aCommandObserver callback observer
       
    91         * @param aQueryObserver  query observer
       
    92         * @param aSelectedDtmfNumber selected predefined dtmf number 
       
    93         */
       
    94         CPhoneDtmfNumberListQuery( MEikCommandObserver& aCommandObserver,
       
    95                                    MPhoneQueryObserver& aQueryObserver,
       
    96                                    HBufC*& aSelectedDtmfNumber  );
       
    97         
       
    98         
       
    99         /**
       
   100         * Symbian constructor
       
   101         */
       
   102         void ConstructL();
       
   103 
       
   104     private:    // Data
       
   105 
       
   106         MEikCommandObserver& iCommandObserver;
       
   107                 
       
   108         MPhoneQueryObserver& iQueryObserver;
       
   109         
       
   110         HBufC*& iSelectedDtmfNumber;
       
   111    
       
   112         // Index of selected item.
       
   113         TInt iIndex;
       
   114         
       
   115         // Contains predefined DTMF(s), 'Find' and 'Enter manually' items
       
   116         // Owned.
       
   117         CDesCArrayFlat iArray;
       
   118         
       
   119         
       
   120     };
       
   121 
       
   122 #endif      // CPHONEDTMFNUMBERLISTQUERY_H
       
   123             
       
   124 // End of File