phonebookengines/contactsmodel/tsrc/asynaccess/inc/CntModelTesterSetToneToContacts.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CCntModelTesterSetToneToContacts_H__
       
    19 #define __CCntModelTesterSetToneToContacts_H__
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32base.h>
       
    23 //#include "MPbkBackgroundProcess.h"
       
    24 #include <cntdef.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CContactIdArray;
       
    28 class CContactDatabase;
       
    29 class CContactItem;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  * Assign ringing tone to group members process.
       
    35  */
       
    36 class CCntModelTesterSetToneToContacts  :
       
    37         public CBase        
       
    38     {
       
    39     public: // Interface
       
    40         /**
       
    41          * Creates a new instance of this class.
       
    42          *
       
    43          * @param aEngine   reference to a contact engine
       
    44          * @param aContacts contacts to delete
       
    45 		 * @param aRingingToneName ringing tone file name
       
    46          */
       
    47         static CCntModelTesterSetToneToContacts* NewL
       
    48             ( const CContactIdArray& aContacts,
       
    49               const TDesC& aRingingToneName);
       
    50 
       
    51         /**
       
    52          * Destructor.
       
    53          */
       
    54         ~CCntModelTesterSetToneToContacts ();
       
    55 
       
    56     public: 
       
    57         void StepL();
       
    58         TInt TotalNumberOfSteps();
       
    59         TBool IsProcessDone() const;
       
    60         void ProcessFinished();
       
    61         TInt HandleStepError(TInt aError);
       
    62         void ProcessCanceled();
       
    63         TInt GetCount();
       
    64 		TInt iSetCount;
       
    65     private:  // Implementation
       
    66         CCntModelTesterSetToneToContacts ();
       
    67         void ConstructL(const CContactIdArray& aContacts, const TDesC& aRingingToneName);
       
    68         TBool MoreContactsToSet() const;
       
    69         void Cancel();
       
    70         void SetRingingToneL(CContactItem &aContact);
       
    71 
       
    72     private:  // Data
       
    73     
       
    74         CContactDatabase* iDb;
       
    75         /// Own: initial number of contacts to assign a tone
       
    76         TInt iTotalContactsToSet;
       
    77         /// Own: ids of contacts to set ringing tone to
       
    78         CContactIdArray* iContacts;
       
    79         /// Own: count of contacts succesfully set
       
    80 
       
    81         /// Own: ringing tone file name
       
    82         HBufC* iRingingToneFile;
       
    83         
       
    84     };
       
    85 
       
    86 _LIT(KDbFileName,"c:t_asynaccess.cdb");
       
    87 #endif // __CCntModelTesterSetToneToContacts _H__
       
    88 
       
    89 // End of File