btobexprofiles/obexserviceman/utils/inc/updatemusiccollection.h
branchRCL_3
changeset 56 9386f31cc85b
parent 55 613943a21004
child 61 269724087bed
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
     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 
       
    19 #ifndef UPDATEMUSICCOLLECTION_H_
       
    20 #define UPDATEMUSICCOLLECTION_H_
       
    21 
       
    22 
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 #include <mpxcollectionhelper.h>
       
    26 #include <mpxcollectionhelperobserver.h>
       
    27 #include <mpxplaybackutility.h>
       
    28 
       
    29 #include <mpxplaybackobserver.h>
       
    30 
       
    31 
       
    32 class MMPXCollectionHelperObserver;
       
    33 class MMPXPlaybackObserver;
       
    34 
       
    35 NONSHARABLE_CLASS( CUpdateMusicCollection ): public CBase ,
       
    36                                              public MMPXCollectionHelperObserver,
       
    37                                              public MMPXPlaybackObserver
       
    38 
       
    39     {
       
    40    
       
    41     public: //cunstructor and distructors
       
    42         
       
    43         static CUpdateMusicCollection* NewL();  // Constructor (public)
       
    44        
       
    45         void ConstructL(); 
       
    46         
       
    47         ~CUpdateMusicCollection();
       
    48         
       
    49     public: //callback functions from the observers
       
    50         
       
    51         // from MMPXCollectionHelperObserver
       
    52         // Called back after a call to
       
    53         // CCollectionHelper::AddL() to provide
       
    54         // status
       
    55         void HandleAddFileCompleteL( TInt aErr ); 
       
    56        
       
    57         // from MMPXPlaybackObserver
       
    58         // If aErr is not KErrNone, plugin might 
       
    59         // still call back with more info in the aMsg.
       
    60         void HandlePlaybackMessage( CMPXMessage* aMessage, TInt aError );
       
    61        
       
    62     public: //own function
       
    63         
       
    64         //add the music to misic collection
       
    65         void addToCollectionL(const TDesC& aFileName);
       
    66         
       
    67         //check if the type of the recieved file is supported by music player
       
    68         TInt isSupported (const TDesC16& aPtr); 
       
    69     
       
    70     protected:       
       
    71         
       
    72          CUpdateMusicCollection();
       
    73       
       
    74     private:
       
    75         
       
    76         MMPXCollectionHelper* iCollectionHelper;
       
    77         MMPXPlaybackUtility* iPlaybackUtility;
       
    78     };
       
    79 
       
    80 #endif /*UPDATEMUSICCOLLECTION_H_*/