javauis/mmapi_qt/baseline/inc/mmmasnapshot.h
branchRCL_3
changeset 25 ae942d28ec0e
parent 17 0fd27995241b
equal deleted inserted replaced
24:6c158198356e 25:ae942d28ec0e
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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:  This header is for shapshots.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MMMASNAPSHOT_H
       
    20 #define MMMASNAPSHOT_H
       
    21 
       
    22 //  FORWARD DECLARATIONS
       
    23 class CFbsBitmap;
       
    24 class CMMAImageSettings;
       
    25 
       
    26 //  CLASS DEFINITION
       
    27 /**
       
    28 
       
    29 */
       
    30 
       
    31 NONSHARABLE_CLASS(MMMASnapshot)
       
    32 {
       
    33 public:     // Type definitions
       
    34     enum TEncoding
       
    35     {
       
    36         EBitmap = 0,    // Raw image format
       
    37         EEncoded        // Encoded image format
       
    38     };
       
    39 
       
    40 protected:  // Constructors and destructors
       
    41     virtual ~MMMASnapshot() {};     // Do not allow delete through this interface
       
    42 
       
    43 public:     // Abstract methods
       
    44     /**
       
    45      * Takes snapshot.
       
    46      *
       
    47      * @param aStatus Status will be informed when
       
    48      *        bitmap is ready or error occures.
       
    49      * @param aSize Snapshot size. If size is not specified (width=-1 or
       
    50      *        height=-1) default size is used.
       
    51      * @return Returns snapshot image's encoding type based on the requested MIME-type and
       
    52      *         snapshot size. Returned encoding type may differ from the requested as
       
    53      *         raw bitmap type is used if possibly requested encoding type is not found.
       
    54      */
       
    55     virtual TEncoding TakeSnapshotL(TRequestStatus* aStatus,
       
    56                                     const TSize& aSize,
       
    57                                     const CMMAImageSettings& aSettings) = 0;
       
    58 
       
    59     /**
       
    60      * Returns snapshot image.
       
    61      *
       
    62      * @returns Snapshot bitmap or NULL if TakeSnapshotL is not called or it failed.
       
    63      *          Caller takes ownership of the bitmap.
       
    64      */
       
    65     virtual CFbsBitmap* SnapshotBitmap() = 0;
       
    66 
       
    67     /**
       
    68      * Returns encoded snapshot image
       
    69      *
       
    70      * @return Encoded snapshot image or NULL if TakeSnapshotL is not called or if it failed
       
    71      *         Caller takes ownership of the pointer.
       
    72      */
       
    73     virtual HBufC8* SnapshotEncoded() = 0;
       
    74 
       
    75     // No data in MClass!!
       
    76 
       
    77 };
       
    78 
       
    79 #endif // MMMASNAPSHOT_H