ui/uiengine/medialistwrapper/inc/glxmlgenericobserver.h
changeset 23 74c9f037fd5d
child 33 1ee2af37811f
equal deleted inserted replaced
5:f7f0874bfe7d 23:74c9f037fd5d
       
     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 /*glxmlgenericobserver.h*/
       
    19 
       
    20 #ifndef C_GLXMLGENERICOBSERVER_H
       
    21 #define C_GLXMLGENERICOBSERVER_H
       
    22 
       
    23 // Photos Headers
       
    24 #include <mglxmedialistobserver.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CGlxMediaList;
       
    28 class GlxMLWrapperPrivate;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 class CGlxMLGenericObserver: public CBase,
       
    32                               public MGlxMediaListObserver
       
    33 
       
    34     {
       
    35 public:
       
    36 
       
    37     /**
       
    38      * Two-phased constructor.
       
    39      *
       
    40      * @return Pointer to newly created object.
       
    41      */
       
    42    static CGlxMLGenericObserver* NewL(MGlxMediaList& aMediaList,
       
    43             GlxMLWrapperPrivate* aMLWrapperPrivate);
       
    44 
       
    45     /**
       
    46      * Destructor.
       
    47      */
       
    48     virtual ~CGlxMLGenericObserver();
       
    49 
       
    50 public: // from MGlxMediaListObserver
       
    51     void HandleItemAddedL( TInt aStartIndex, TInt aEndIndex, MGlxMediaList* aList );
       
    52     void HandleItemRemovedL( TInt aStartIndex, TInt aEndIndex, MGlxMediaList*/* aList */);
       
    53     void HandleAttributesAvailableL( TInt aItemIndex, 
       
    54         const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* aList );    
       
    55     void HandleFocusChangedL( NGlxListDefs::TFocusChangeType aType, 
       
    56     TInt aNewIndex, TInt aOldIndex, MGlxMediaList* aList );
       
    57     void HandleItemSelectedL(TInt aIndex, TBool aSelected, MGlxMediaList* aList );
       
    58     void HandleMessageL( const CMPXMessage& aMessage, MGlxMediaList* aList );
       
    59     void HandleError( TInt aError );
       
    60     void HandleCommandCompleteL( CMPXCommand* aCommandResult, TInt aError, 
       
    61         MGlxMediaList* aList );
       
    62     void HandleMediaL( TInt aListIndex, MGlxMediaList* aList );
       
    63     void HandleItemModifiedL( const RArray<TInt>& aItemIndexes, MGlxMediaList* aList );
       
    64 
       
    65 private:
       
    66 
       
    67     /**
       
    68      * C++ default constructor.
       
    69      */
       
    70     CGlxMLGenericObserver(MGlxMediaList& aMediaList,GlxMLWrapperPrivate* iMLWrapperPrivate);
       
    71 
       
    72     /**
       
    73      * By default Symbian 2nd phase constructor is private.
       
    74      */
       
    75     void ConstructL();
       
    76 private:
       
    77     // Instance of Media List
       
    78     MGlxMediaList& iMediaList;
       
    79     // Instance of GlxMLWrapperPrivate
       
    80     GlxMLWrapperPrivate* iMLWrapperPrivate;
       
    81    
       
    82     TSize iGridIconSize; //?
       
    83     };
       
    84 
       
    85 
       
    86 #endif  // C_GLXMLGENERICOBSERVER_H
       
    87 
       
    88 // End of File