phonebookui/Phonebook2/Commands/inc/CPbk2SetToneCmd.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     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:  A command for setting ringing tone.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBK2SETTONECMD_H
       
    20 #define CPBK2SETTONECMD_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <CPbk2SetToneBase.h>
       
    25 #include <MPbk2ContactRelocatorObserver.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class MPbk2ContactUiControl;
       
    29 class MVPbkStoreContact;
       
    30 class MVPbkFieldType;
       
    31 class CPbk2ContactRelocator;
       
    32 class MVPbkContactLinkArray;
       
    33 class MVPbkStoreContactField;
       
    34 class CPbk2FieldFocusHelper;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39  *  A command for setting ringing tone.
       
    40  *
       
    41  */
       
    42 NONSHARABLE_CLASS(CPbk2SetToneCmd) : 
       
    43         public CPbk2SetToneBase
       
    44     {
       
    45     public:  // Constructors and destructor
       
    46         /**
       
    47          * Creates a new instance of this class.
       
    48          * @param aUiControl    UI control.
       
    49          * @return A new instance of this class.
       
    50          */
       
    51         static CPbk2SetToneCmd* NewL(
       
    52                 MPbk2ContactUiControl& aUiControl );
       
    53         
       
    54         /**
       
    55          * Destructor.
       
    56          */
       
    57         virtual ~CPbk2SetToneCmd();
       
    58 
       
    59     private: // From MPbk2ContactRelocatorObserver
       
    60         void ContactRelocatedL(
       
    61                 MVPbkStoreContact* aRelocatedContact );
       
    62         void ContactRelocationFailed( TInt aReason,
       
    63                 MVPbkStoreContact* aContact );
       
    64         void ContactsRelocationFailed( TInt aReason,
       
    65                 CVPbkContactLinkArray* aContacts );
       
    66         void RelocationProcessComplete();
       
    67         
       
    68     private: // From MVPbkSingleContactOperationObserver
       
    69         void VPbkSingleContactOperationComplete(
       
    70                 MVPbkContactOperationBase& aOperation,
       
    71                 MVPbkStoreContact* aContact);
       
    72         void VPbkSingleContactOperationFailed(
       
    73                 MVPbkContactOperationBase& aOperation, 
       
    74                 TInt aError);
       
    75               
       
    76 	private: // From MVPbkContactObserver
       
    77         void ContactOperationCompleted(TContactOpResult aResult);
       
    78         void ContactOperationFailed(TContactOp aOpCode, 
       
    79                 TInt aErrorCode, TBool aErrorNotified);          
       
    80                 	
       
    81     private: // Implementation
       
    82         CPbk2SetToneCmd( MPbk2ContactUiControl& aUiControl );
       
    83         void ConstructL();
       
    84         void SetToneL();
       
    85         void DoRelocateContactsL();
       
    86         TBool ContactHasRingToneField( MVPbkStoreContact* aContact );
       
    87         
       
    88     private: // data
       
    89         /// Own: field focus preserver
       
    90         CPbk2FieldFocusHelper* iFieldFocusHelper;
       
    91     };
       
    92 
       
    93 #endif // CPBK2SETTONECMD_H
       
    94             
       
    95 // End of File