photosgallery/controllers/imageviewer/inc/glximageviewermanager.h
branchRCL_3
changeset 60 5b3385a43d68
child 75 01504893d9cb
equal deleted inserted replaced
59:8e5f6eea9c9f 60:5b3385a43d68
       
     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: Image Viewer Manager header file : CCGlxImageViewerManager declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef GLXIMAGEVIEWERMANAGER_H
       
    20 #define GLXIMAGEVIEWERMANAGER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 #include <caf/manager.h>
       
    26 #include <imageconversion.h>
       
    27 // CLASS DECLARATION
       
    28 class RFile;
       
    29 class RFile64;
       
    30 
       
    31 /**
       
    32  *  CGlxImageViewerManager
       
    33  * 
       
    34  */
       
    35 class CGlxImageViewerManager : public CBase
       
    36     {
       
    37 public: // Constructors and destructor
       
    38 
       
    39     /**
       
    40      * Destructor.
       
    41      */
       
    42     ~CGlxImageViewerManager();
       
    43 
       
    44     /**
       
    45      * Singleton constructor.
       
    46      */
       
    47     IMPORT_C static CGlxImageViewerManager* InstanceL();
       
    48 
       
    49 public:
       
    50     IMPORT_C HBufC* ImageUri();
       
    51     IMPORT_C RFile64& ImageFileHandle();
       
    52     IMPORT_C TBool IsPrivate();
       
    53     IMPORT_C TBool IsPrivateGif();
       
    54     IMPORT_C void DeleteInstance( void );
       
    55     IMPORT_C void SetImageUriL(const TDesC& aFileName);
       
    56     IMPORT_C void SetImageFileHandleL(const RFile& aFileHandle);
       
    57     IMPORT_C void Reset();
       
    58     IMPORT_C void CreateImageDecoderL();    
       
    59     IMPORT_C void CloseImageDecoder();
       
    60 
       
    61 private:
       
    62 
       
    63     /**
       
    64      * Two-phased constructor.
       
    65      */
       
    66     static CGlxImageViewerManager* NewL();
       
    67 
       
    68     /**
       
    69      * Two-phased constructor.
       
    70      */
       
    71     static CGlxImageViewerManager* NewLC();
       
    72 
       
    73     /**
       
    74      * Constructor for performing 1st stage construction
       
    75      */
       
    76     CGlxImageViewerManager();
       
    77 
       
    78     /**
       
    79      * EPOC default constructor for performing 2nd stage construction
       
    80      */
       
    81     void ConstructL();
       
    82 
       
    83 private:
       
    84     /// image file uri in case of Photos starting as Image viewer 
       
    85     HBufC* iImageUri;
       
    86 
       
    87     /// Handle to image file which will be shown in Image viewer
       
    88     RFile64* iFile;
       
    89 
       
    90     /// Flag that stores if the image file is in a private folder. 
       
    91     /// ETrue means the image is private, else EFalse 
       
    92     TBool iIsPrivate;
       
    93 
       
    94     /// Content Access Manager
       
    95     ContentAccess::CManager* iManager;
       
    96     
       
    97     /// Flag that stores if the gif file is in a private folder. 
       
    98     /// ETrue means the gif is from private path, else EFalse 
       
    99     TBool iIsPrivateGif;
       
   100 
       
   101     /// Image Decoder, which keeps the file in use while viewing
       
   102     CImageDecoder* iImageDecoder;
       
   103     };
       
   104 
       
   105 #endif // GLXIMAGEVIEWERMANAGER_H