phonebookui/Phonebook/inc/CPbkRingingToneFetch.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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 *       Class for fetching ringing tones to phonebook.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __CPbkRingingToneFetch_H__
       
    21 #define __CPbkRingingToneFetch_H__
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>  // CBase
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CPbkContactItem;
       
    28 class CPbkContactEngine;
       
    29 class CFLDFileListContainer;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 /**
       
    33  * @internal Only Phonebook internal use supported!
       
    34  *
       
    35  * Class for Fetching ringing tones to phonebook.
       
    36  */
       
    37 class CPbkRingingToneFetch 
       
    38         : public CBase
       
    39     {
       
    40     public: // constructor & destructor
       
    41         /**
       
    42          * Creates a new instance of this class.
       
    43 		 * @param reference to phonebook engine
       
    44          */
       
    45         IMPORT_C static CPbkRingingToneFetch* NewL(CPbkContactEngine& aEngine);
       
    46 
       
    47         /**
       
    48          * Destructor.
       
    49          */
       
    50         ~CPbkRingingToneFetch();
       
    51 
       
    52     public: // interface
       
    53         /**
       
    54          * Fetch ringing tone.
       
    55 		 * @param aRingingToneFile the selected filename will be stored here
       
    56 		 * @return ETrue if user selected a file, EFalse otherwise
       
    57          */
       
    58         IMPORT_C TBool FetchRingingToneL(TFileName& aRingingToneFile);
       
    59 
       
    60         /**
       
    61          * Assign fetched ringing tone to the open contact aItem.
       
    62 		 * @param aItem the contact item to assign the tone with
       
    63 		 * @param aRingingToneFile the ringing tone to assign
       
    64          */
       
    65         IMPORT_C void SetRingingToneL(CPbkContactItem& aItem,
       
    66 			TFileName& aRingingToneFile);
       
    67 
       
    68     private: // implementation
       
    69         void ConstructL();
       
    70         CPbkRingingToneFetch(CPbkContactEngine& aEngine);
       
    71         void HandleRingingToneRemovalL(const TDesC& aOldTone);
       
    72         void SetMaxToneFileSizeL( CFLDFileListContainer* aFl );
       
    73         
       
    74     private: // data members
       
    75         /// Ref: contact engine reference
       
    76         CPbkContactEngine& iEngine;
       
    77         /// Own: prompt text for ringing tone popup list
       
    78         HBufC* iTitle;
       
    79         /// Own: text for emptying the ringing tone
       
    80         HBufC* iNoSound;
       
    81     };
       
    82 
       
    83 #endif // __CPbkRingingToneFetch_H__
       
    84 
       
    85 //  End of File