svgtviewer/SvgtViewerPlugin/SVGCodecInc/SVGConvert.h
changeset 0 632761c941a7
equal deleted inserted replaced
-1:000000000000 0:632761c941a7
       
     1 /*
       
     2 * Copyright (c) 2005 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:  ECom plugin to create the thumbnails from svg presentation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef SVGCONVERT_H
       
    21 #define SVGCONVERT_H
       
    22 
       
    23 #include <imageplugin.h>
       
    24 
       
    25 class CSvgReadCodec;
       
    26 class CFrameInfoStrings;
       
    27 
       
    28 /**
       
    29 * The PluginAPI for SVG content decoder. 
       
    30 * Intended to use it for the processing the SVG content.
       
    31 */
       
    32 
       
    33 class CSvgDecoder : public CImageDecoderPlugin
       
    34     {
       
    35 public:
       
    36 
       
    37     /**
       
    38     * Static constructor. Creates and returns a pointer to CSvgDecoder
       
    39     * @since 3.1
       
    40     * @return Pointer to the deocder instance.
       
    41     */
       
    42     static CSvgDecoder* NewL();
       
    43     
       
    44     /**
       
    45     * Destructor.
       
    46     */
       
    47     ~CSvgDecoder();
       
    48 
       
    49 public:    //From CImageDecoderPlugin
       
    50     /**
       
    51     * Returns the image type & image sub type of the frame number specified
       
    52     * @since 3.1
       
    53     * @param aFrameNumber
       
    54     * @param aImageType
       
    55     * @param aImageSubType
       
    56     * @return None.
       
    57     */
       
    58     void ImageType(TInt aFrameNumber, TUid& aImageType, TUid& aImageSubType) const; 
       
    59     
       
    60     /**
       
    61     * Returns the codec specific frame information stored in resource files.
       
    62     * This is a virtual funtion that each individual plugin must implement.
       
    63     * @param  aFs A handle to a file server session.
       
    64     * @param  aFrameNumber    The frame number to which the codec specific frame information
       
    65     *        applies (optional, defaults to zero).
       
    66     * @return A pointer to a newly allocated CFrameInfoStrings object.
       
    67     *        Ownership is transferred to the caller.
       
    68     */
       
    69     CFrameInfoStrings* FrameInfoStringsL(RFs& aFs, TInt aFrameNumber);
       
    70 
       
    71     TSize ContentSizeInTwips(const TSize aContentSizeInPixels) const;
       
    72     
       
    73 private:
       
    74     //Default constructor
       
    75     CSvgDecoder();
       
    76 
       
    77 private: //From CImageDecoderPlugin
       
    78 
       
    79 	/**
       
    80 	* Invokes the ReadFrameHeadersL() method of the supplied plugin.
       
    81     * The plugin's version of ReadFrameHeadersL() should read the image header \
       
    82     * information, create
       
    83 	* the required codec and read the frame headers.
       
    84 	* This is a virtual funtion that each individual plugin must implement.
       
    85 	*/
       
    86     void ScanDataL();
       
    87     
       
    88     /**
       
    89     * Reads the image header & data information. It populates the image information \ 
       
    90     * like content size, pixel depth.
       
    91     * @since 3.1
       
    92     */
       
    93     void ReadFormatL();
       
    94 
       
    95 private:    //Data members
       
    96     TPtrC8 iFileData;
       
    97     };
       
    98 
       
    99 
       
   100 #endif // SVGCONVERT_H
       
   101 // End of File
       
   102