engine/collectionframework/thumbnailcreator/inc/glxtndeletethumbnailstask.h
changeset 71 27f2d7aec52a
parent 69 45459746d5e8
child 72 0a8e959402e5
equal deleted inserted replaced
69:45459746d5e8 71:27f2d7aec52a
     1 /*
       
     2 * Copyright (c) 2008-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:   Definition of CGlxtnDeleteThumbnailsTask
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 /**
       
    21  * @internal reviewed 30/07/2007 by Simon Brooks
       
    22  */
       
    23 
       
    24 #ifndef C_GLXTNDELETETHUMBNAILSTASK_H
       
    25 #define C_GLXTNDELETETHUMBNAILSTASK_H
       
    26 
       
    27 // INCLUDES
       
    28 
       
    29 #include "glxtntask.h"
       
    30 
       
    31 // CONSTANTS
       
    32 
       
    33 // MACROS
       
    34 
       
    35 // DATA TYPES
       
    36 
       
    37 // FUNCTION PROTOTYPES
       
    38 
       
    39 // FORWARD DECLARATIONS
       
    40 
       
    41 class CGlxtnFileInfo;
       
    42 
       
    43 // CLASS DECLARATION
       
    44 
       
    45 /**
       
    46 * Task to delete all stored thumbnails for a media item.
       
    47 *
       
    48 * @author Dan Rhodes
       
    49 * @ingroup glx_thumbnail_creator
       
    50 */
       
    51 NONSHARABLE_CLASS(CGlxtnDeleteThumbnailsTask) : public CGlxtnClientTask
       
    52     {
       
    53     public:  // Constructors and destructor
       
    54 
       
    55         /**
       
    56         * Two-phased constructor.
       
    57         * @param iItemId Media ID of item whose thumbnails should be deleted.
       
    58         * @param aClient Client initiating the request.
       
    59         */
       
    60         static CGlxtnDeleteThumbnailsTask* NewL(const TGlxMediaId& aItemId,
       
    61                                         MGlxtnThumbnailCreatorClient& aClient);
       
    62 
       
    63         /**
       
    64         * Destructor.
       
    65         */
       
    66         virtual ~CGlxtnDeleteThumbnailsTask();
       
    67 
       
    68     protected:  // From CGlxtnTask
       
    69 
       
    70         TBool DoStartL(TRequestStatus& aStatus);
       
    71     	void DoCancel(); 
       
    72     	TBool DoRunL(TRequestStatus& aStatus);
       
    73         TBool DoRunError(TInt aError);
       
    74 
       
    75     private:
       
    76 
       
    77         /**
       
    78         * C++ default constructor.
       
    79         * @param iItemId Media ID of item whose thumbnails should be deleted.
       
    80         * @param aClient Client initiating the request.
       
    81         */
       
    82         CGlxtnDeleteThumbnailsTask(const TGlxMediaId& aItemId,
       
    83                                     MGlxtnThumbnailCreatorClient& aClient);
       
    84 
       
    85         /**
       
    86         * By default Symbian 2nd phase constructor is private.
       
    87         */
       
    88         void ConstructL();
       
    89 
       
    90     private:    // Data
       
    91         /** File information for item whose thumbnails are to be deleted */
       
    92         CGlxtnFileInfo* iInfo;
       
    93         /** Whether delete operation has been started */
       
    94         TBool iDeleting;
       
    95     };
       
    96 
       
    97 #endif  // C_GLXTNDELETETHUMBNAILSTASK_H
       
    98 
       
    99 // End of File