mpengine/inc/mpmpxisolatedcollectionhelper.h
changeset 22 ecf06a08d4d9
child 38 b93f525c9244
equal deleted inserted replaced
20:82baf59ce8dd 22:ecf06a08d4d9
       
     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: isolated collection helper.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CMPMPXISOLATEDCOLLECTIONHELPER_H
       
    19 #define CMPMPXISOLATEDCOLLECTIONHELPER_H
       
    20 
       
    21 #include <mpxcollectionobserver.h>
       
    22 
       
    23 class CMPXCollectionOpenUtility;
       
    24 class CMPXCollectionPath;
       
    25 
       
    26 /*!
       
    27     \class MpMpxIsolatedCollectionHelperObserver
       
    28     \brief Observer interface for class CMpMpxIsolatedCollectionHelper
       
    29 
       
    30     This is a helper class to open an insolated collection.
       
    31 */
       
    32 class MMpMpxIsolatedCollectionHelperObserver
       
    33 {
       
    34 public:
       
    35 
       
    36     virtual void HandleIsolatedOpenL( const CMPXMedia& aEntries, 
       
    37             TInt aError ) = 0;
       
    38 };
       
    39 
       
    40 class CMpMpxIsolatedCollectionHelper : public CBase,
       
    41                                       public MMPXCollectionObserver
       
    42 {
       
    43 public:
       
    44 
       
    45     static CMpMpxIsolatedCollectionHelper* NewL( MMpMpxIsolatedCollectionHelperObserver* aObserver );
       
    46     static CMpMpxIsolatedCollectionHelper* NewLC( MMpMpxIsolatedCollectionHelperObserver* aObserver );
       
    47     virtual ~CMpMpxIsolatedCollectionHelper();
       
    48     void OpenCollectionL( CMPXCollectionPath& aPath );
       
    49     
       
    50 private:
       
    51     CMpMpxIsolatedCollectionHelper( MMpMpxIsolatedCollectionHelperObserver* aObserver );
       
    52     void ConstructL();
       
    53     void HandleOpenL( const CMPXMedia& aEntries,
       
    54                      TInt aIndex,TBool aComplete,TInt aError );
       
    55     void HandleOpenL( const CMPXCollectionPlaylist& aPlaylist,TInt aError );
       
    56     void HandleCollectionMessage( CMPXMessage* aMsg, TInt aErr );
       
    57     void HandleCollectionMediaL( const CMPXMedia& aMedia, TInt aError );
       
    58 
       
    59 private:
       
    60     MMpMpxIsolatedCollectionHelperObserver* iObserver;
       
    61     CMPXCollectionOpenUtility*              iIncrementalOpenUtil; //owned
       
    62     TBool                                   iFirstIncrementalOpen;
       
    63 
       
    64 };
       
    65 
       
    66 #endif // CMPMPXISOLATEDCOLLECTIONHELPER_H
       
    67     
       
    68 //EOF