camerauis/cameraapp/generic/inc/camsnapshotrotator.h
changeset 1 f5ec9446e5bf
equal deleted inserted replaced
0:1ddebce53859 1:f5ec9446e5bf
       
     1 /*
       
     2 * Copyright (c) 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:  Utility class to rotate bitmaps*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __CAMSNAPSHOTROTATOR_H
       
    22 #define __CAMSNAPSHOTROTATOR_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <bitmaptransforms.h>
       
    26 
       
    27 #include "CamSyncRotatorAo.h"
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 // MACROS
       
    32 
       
    33 // DATA TYPES
       
    34 
       
    35 // FUNCTION PROTOTYPES
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 
       
    39 // CLASS DECLARATION
       
    40 class CCamAppController;
       
    41 
       
    42 /**
       
    43 *  Utility class to help in the rotating of bitmaps (for post-capture snapshot)
       
    44 *
       
    45 *  @since 5.1
       
    46 */
       
    47 class CCamSnapShotRotator : public CBase, public MBitmapRotationObserver
       
    48     {
       
    49  
       
    50     public:  // Constructors and destructor
       
    51         
       
    52         /**
       
    53         * Two-phased constructor.
       
    54         */
       
    55         static CCamSnapShotRotator* NewL( CCamAppController& aController );
       
    56         
       
    57         /**
       
    58         * Destructor.
       
    59         */
       
    60         virtual ~CCamSnapShotRotator();
       
    61 
       
    62     public: // New functions      
       
    63 
       
    64         /**
       
    65         * C++ default constructor.
       
    66         * @since 5.1
       
    67         * @param aBitmap The bitmap to rotate
       
    68         */
       
    69         void RotateL( CFbsBitmap* aBitmap );
       
    70 
       
    71         /**
       
    72         * Indicates rotation process state.
       
    73         * @since 5.1
       
    74         * @return ETrue if image rotation is in progress
       
    75         */
       
    76         TBool IsActive();
       
    77             
       
    78         /**
       
    79         * From MBitmapRotationObserver
       
    80         * Notification of bitmap rotation complete events
       
    81         * @param aErr KErrNone if successful
       
    82         */
       
    83         void RotationCompleteL( TInt aErr ); 
       
    84 
       
    85     private:
       
    86 
       
    87         /**
       
    88         * C++ default constructor.
       
    89         * @since 5.1
       
    90         */
       
    91         CCamSnapShotRotator( CCamAppController& aController );
       
    92 
       
    93         /**
       
    94         * By default Symbian 2nd phase constructor is private.
       
    95         * @since 5.1
       
    96         */
       
    97         void ConstructL();
       
    98 
       
    99     private:    // Data
       
   100   
       
   101         CCamAppController& iController; // not owned
       
   102         CFbsBitmap* iRotatedSnapshot;   // owned
       
   103         CCamSyncRotatorAo* iRotatorAo;  // owned
       
   104         
       
   105     };
       
   106 
       
   107 #endif      // __CAMSNAPSHOTROTATOR_H
       
   108             
       
   109 // End of File