photosgallery/controllers/imageviewer/inc/glximageviewermanager.h
branchRCL_3
changeset 60 5b3385a43d68
child 75 01504893d9cb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/photosgallery/controllers/imageviewer/inc/glximageviewermanager.h	Wed Sep 01 12:33:26 2010 +0100
@@ -0,0 +1,105 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Image Viewer Manager header file : CCGlxImageViewerManager declaration
+*
+*/
+
+
+#ifndef GLXIMAGEVIEWERMANAGER_H
+#define GLXIMAGEVIEWERMANAGER_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <caf/manager.h>
+#include <imageconversion.h>
+// CLASS DECLARATION
+class RFile;
+class RFile64;
+
+/**
+ *  CGlxImageViewerManager
+ * 
+ */
+class CGlxImageViewerManager : public CBase
+    {
+public: // Constructors and destructor
+
+    /**
+     * Destructor.
+     */
+    ~CGlxImageViewerManager();
+
+    /**
+     * Singleton constructor.
+     */
+    IMPORT_C static CGlxImageViewerManager* InstanceL();
+
+public:
+    IMPORT_C HBufC* ImageUri();
+    IMPORT_C RFile64& ImageFileHandle();
+    IMPORT_C TBool IsPrivate();
+    IMPORT_C TBool IsPrivateGif();
+    IMPORT_C void DeleteInstance( void );
+    IMPORT_C void SetImageUriL(const TDesC& aFileName);
+    IMPORT_C void SetImageFileHandleL(const RFile& aFileHandle);
+    IMPORT_C void Reset();
+    IMPORT_C void CreateImageDecoderL();    
+    IMPORT_C void CloseImageDecoder();
+
+private:
+
+    /**
+     * Two-phased constructor.
+     */
+    static CGlxImageViewerManager* NewL();
+
+    /**
+     * Two-phased constructor.
+     */
+    static CGlxImageViewerManager* NewLC();
+
+    /**
+     * Constructor for performing 1st stage construction
+     */
+    CGlxImageViewerManager();
+
+    /**
+     * EPOC default constructor for performing 2nd stage construction
+     */
+    void ConstructL();
+
+private:
+    /// image file uri in case of Photos starting as Image viewer 
+    HBufC* iImageUri;
+
+    /// Handle to image file which will be shown in Image viewer
+    RFile64* iFile;
+
+    /// Flag that stores if the image file is in a private folder. 
+    /// ETrue means the image is private, else EFalse 
+    TBool iIsPrivate;
+
+    /// Content Access Manager
+    ContentAccess::CManager* iManager;
+    
+    /// Flag that stores if the gif file is in a private folder. 
+    /// ETrue means the gif is from private path, else EFalse 
+    TBool iIsPrivateGif;
+
+    /// Image Decoder, which keeps the file in use while viewing
+    CImageDecoder* iImageDecoder;
+    };
+
+#endif // GLXIMAGEVIEWERMANAGER_H