commonuis/CommonUi/inc/DocImageHandler.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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:  Defines image handler class for document handler.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CDOCIMAGEHANDLER_H
       
    20 #define CDOCIMAGEHANDLER_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "DocDefaultHandler.h"  
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 
       
    27 // CONSTANS
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 *  Handler for image types.
       
    33 *  Extends the default handler only by save and copy function. 
       
    34 */
       
    35 NONSHARABLE_CLASS(CDocImageHandler) : public CDocDefaultHandler
       
    36     {
       
    37 
       
    38     public:        // Constructors and destructor
       
    39 
       
    40         /**
       
    41         * Two-phased constructor. 
       
    42         *
       
    43         * @param aDataType      Data type
       
    44         * @param aUid           UID of the handler app
       
    45         * @param aDocDispatcher Pointer to DocumentHandler instance
       
    46         *
       
    47         * @return               Constructed CDImageHandler
       
    48         */
       
    49         static CDocImageHandler* NewL(
       
    50             const TDataType& aDataType,
       
    51             const TUid& aUid,
       
    52             CDocumentHandler* aDocDispatcher );
       
    53 
       
    54         /**
       
    55         * Two-phased constructor. 
       
    56         *
       
    57         * @param aDataType      Data type
       
    58         * @param aUid           UID of the handler app
       
    59         * @param aDocDispatcher Pointer to DocumentHandler instance
       
    60         *
       
    61         * @return               Constructed CImageHandler
       
    62         */
       
    63         static CDocImageHandler* NewLC(
       
    64             const TDataType& aDataType, 
       
    65             const TUid& aUid,
       
    66             CDocumentHandler* aDocDispatcher );
       
    67 
       
    68         /**
       
    69         * Destructor
       
    70         */
       
    71         ~CDocImageHandler();
       
    72 
       
    73     public:       // New functions
       
    74 
       
    75     public:       // Functions from base classes
       
    76 
       
    77         /*
       
    78         * Always hide the file name extension as the UI specification
       
    79         * says. 
       
    80         *
       
    81         * @return ETrue
       
    82         */
       
    83         TBool HideFileExtension();
       
    84 
       
    85     private:          // New functions
       
    86 
       
    87         /**
       
    88         * Epoc constructor
       
    89         */
       
    90         void ConstructL();
       
    91         
       
    92         /**
       
    93         * Constructor
       
    94         * @param aDataType      Data type
       
    95         * @param aUid           UID of the handler app
       
    96         * @param aDocDispatcher Pointer to DocumentHandler instance
       
    97         */
       
    98         CDocImageHandler(
       
    99             const TDataType& aDataType,
       
   100             const TUid& aUid,
       
   101             CDocumentHandler* aDocDispatcher );
       
   102 
       
   103         /**
       
   104         * C++ copy constructor
       
   105 
       
   106         */
       
   107         CDocImageHandler( const CDocImageHandler& );
       
   108 
       
   109         /**
       
   110         * Prohibit the assignment operation
       
   111         */
       
   112         CDocImageHandler operator=( const CDocImageHandler& )  const;
       
   113 
       
   114     protected:
       
   115         
       
   116         /**
       
   117         * Populate appInfo with ImageViewer's information.
       
   118         */
       
   119         void PopulateAppInfo();
       
   120 
       
   121         /**
       
   122         * The maximum length of image names in MediaGallery's
       
   123         * folder. The lenght is hardcoded as there was not
       
   124         * any suitable place to retrieve it on runtime.
       
   125         *
       
   126         * @return 40
       
   127         */
       
   128         TInt MaxNameLen();
       
   129 
       
   130     private:          // Data
       
   131 
       
   132     };
       
   133 
       
   134 #endif      // CDOCIMAGEHANDLER_H
       
   135 
       
   136 // End of File