phonebookui/Phonebook2/CommandsExtension/inc/CPbk2SetImageCmd.h
changeset 0 e686773b3f54
child 15 e8e3147d53eb
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2005-2007 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 *     Set image command event handling class.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPBK2SETIMAGECMD_H
       
    21 #define CPBK2SETIMAGECMD_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "CPbk2ImageCmdBase.h"
       
    25 #include <MPbk2ImageOperationObservers.h> // MPbk2ImageSetObserver
       
    26 #include <MMGFetchVerifier.h>             // MMGFetchVerifier
       
    27 #include <MediaFileTypes.hrh>
       
    28 #include <badesca.h>
       
    29 
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class CAknWaitDialog;
       
    33 class CPbk2DrmManager;
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38  * Set image command event handling class.
       
    39  */
       
    40 NONSHARABLE_CLASS(CPbk2SetImageCmd) : 
       
    41         public CPbk2ImageCmdBase,
       
    42         private MPbk2ImageSetObserver,
       
    43         private MMGFetchVerifier
       
    44     {
       
    45     public:  // Constructors and destructor
       
    46         /**
       
    47          * Creates a new instance of this class.
       
    48          * @param aUiControl 	A related ui control
       
    49          * @return a new instance of this class.
       
    50          */
       
    51         static CPbk2SetImageCmd* NewL(
       
    52                 MPbk2ContactUiControl& aUiControl);
       
    53         
       
    54         /**
       
    55          * Destructor.
       
    56          */
       
    57         ~CPbk2SetImageCmd();
       
    58         
       
    59         /**
       
    60          * Wrap 'MGFetch::RunL'
       
    61          */
       
    62         static TBool MGFetchL( CDesCArray& aSelectedFiles,
       
    63                 TMediaFileType aMediaType,
       
    64                 TBool aMultiSelect,
       
    65                 MMGFetchVerifier* aVerifier );
       
    66         
       
    67     private: // from CPbk2ImageCmdBase
       
    68         TBool ExecuteCommandL();
       
    69         
       
    70     private: // from MPbkImageSetObserver
       
    71         void Pbk2ImageSetComplete(
       
    72                 MPbk2ImageOperation& aOperation);
       
    73         void Pbk2ImageSetFailed(
       
    74                 MPbk2ImageOperation& aOperation,
       
    75                 TInt aError);
       
    76 
       
    77     private: // from MMGFetchVerifier
       
    78         TBool VerifySelectionL(
       
    79                 const MDesCArray* aSelectedFiles);
       
    80         
       
    81     private:  // Implementation
       
    82         CPbk2SetImageCmd(
       
    83                 MPbk2ContactUiControl& aUiControl);
       
    84         void ConstructL();
       
    85         void Cancel();
       
    86         void DismissWaitNote();
       
    87         void SetImageRefL(
       
    88                 const TDesC& aFileName);
       
    89         
       
    90     private:    // Data
       
    91         /// Own: image set operation
       
    92         MPbk2ImageOperation* iImageOperation;
       
    93         /// Own: wait note dialog
       
    94         CAknWaitDialog* iWaitNote;
       
    95         /// Own: DRM support
       
    96         CPbk2DrmManager* iDrmManager;
       
    97     };
       
    98 
       
    99 #endif // CPBK2SETIMAGECMD_H
       
   100             
       
   101 // End of File