photosgallery/controllers/imageviewer/inc/glximageviewermanager.h
changeset 0 4e91876724a2
child 1 9ba538e329bd
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     1 /*
       
     2  ============================================================================
       
     3  Name		: glximageviewermanager.h
       
     4  Author	  : Hariharan Narayanan
       
     5  Version	 : 1.0
       
     6  Copyright   : /*
       
     7  * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     8  * All rights reserved.
       
     9  * This component and the accompanying materials are made available
       
    10  * under the terms of "Eclipse Public License v1.0"
       
    11  * which accompanies this distribution, and is available
       
    12  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
    13  *
       
    14  * Initial Contributors:
       
    15  * Nokia Corporation - initial contribution.
       
    16  *
       
    17  * Contributors:
       
    18  *
       
    19  * Description:    Image Viewer Manager
       
    20  *
       
    21  */
       
    22 
       
    23 /*
       
    24  * Description : CCGlxImageViewerManager declaration
       
    25  */
       
    26 
       
    27 #ifndef GLXIMAGEVIEWERMANAGER_H
       
    28 #define GLXIMAGEVIEWERMANAGER_H
       
    29 
       
    30 // INCLUDES
       
    31 #include <e32std.h>
       
    32 #include <e32base.h>
       
    33 
       
    34 // CLASS DECLARATION
       
    35 class RFile;
       
    36 class RFile64;
       
    37 
       
    38 /**
       
    39  *  CGlxImageViewerManager
       
    40  * 
       
    41  */
       
    42 class CGlxImageViewerManager : public CBase
       
    43     {
       
    44 public: // Constructors and destructor
       
    45 
       
    46     /**
       
    47      * Destructor.
       
    48      */
       
    49     ~CGlxImageViewerManager();
       
    50 
       
    51     /**
       
    52      * Singleton constructor.
       
    53      */
       
    54     static CGlxImageViewerManager* InstanceL();
       
    55     
       
    56 public:
       
    57     IMPORT_C inline HBufC* ImageUri( void );
       
    58     IMPORT_C inline RFile64& ImageFileHandle() const;
       
    59     IMPORT_C inline TBool IsPrivate();
       
    60     IMPORT_C inline void IncrementRefCount();
       
    61     IMPORT_C void DeleteInstance( void );
       
    62     IMPORT_C void SetImageUriL(const TDesC& aFileName);
       
    63     IMPORT_C void SetImageFileHandleL(const RFile& aFileHandle);
       
    64     IMPORT_C void Reset();
       
    65 
       
    66 private:
       
    67 
       
    68     /**
       
    69      * Two-phased constructor.
       
    70      */
       
    71     static CGlxImageViewerManager* NewL();
       
    72 
       
    73     /**
       
    74      * Two-phased constructor.
       
    75      */
       
    76     static CGlxImageViewerManager* NewLC();
       
    77 
       
    78     /**
       
    79      * Constructor for performing 1st stage construction
       
    80      */
       
    81     CGlxImageViewerManager();
       
    82 
       
    83     /**
       
    84      * EPOC default constructor for performing 2nd stage construction
       
    85      */
       
    86     void ConstructL();
       
    87     
       
    88 
       
    89 private:
       
    90     HBufC* iImageUri; /// image file uri in case of Photos starting as Image viewer 
       
    91     RFile64* iFile;  /// Handle to image file which will be shown in Image viewer
       
    92     TBool iIsPrivate; /// Flag that stores if the image file is in a private folder. ETrue means the image is private, else EFalse 
       
    93     TInt iRefCount; /// Reference count
       
    94     };
       
    95 
       
    96 #include "glximageviewermanager.inl"
       
    97 
       
    98 #endif // GLXIMAGEVIEWERMANAGER_H