crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbianImageLib/E32Image/Factory/SIFactoryE32Image.cs
changeset 0 818e61de6cd1
equal deleted inserted replaced
-1:000000000000 0:818e61de6cd1
       
     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:
       
    15 *
       
    16 */
       
    17 using System;
       
    18 using System.Collections.Generic;
       
    19 using System.Text;
       
    20 using System.IO;
       
    21 using SymbianUtils.Tracer;
       
    22 using SymbianImageLib.Common.Image;
       
    23 using SymbianImageLib.Common.Factory;
       
    24 using SymbianImageLib.Common.Streams;
       
    25 using SymbianImageLib.E32Image.Image;
       
    26 
       
    27 namespace SymbianImageLib.E32Image.Factory
       
    28 {
       
    29     internal class SIFactoryE32Image : SIFactory
       
    30     {
       
    31         #region Constructors
       
    32         public SIFactoryE32Image()
       
    33         {
       
    34         }
       
    35         #endregion
       
    36 
       
    37         #region From SymbianImageFactory
       
    38         public override SIImage CreateImage( ITracer aTracer, Stream aStream, string aName )
       
    39         {
       
    40             SIImage ret = null;
       
    41             //
       
    42             bool isSupported = SymbianImageE32.IsImageFile( aStream );
       
    43             if ( isSupported )
       
    44             {
       
    45                 ret = new SymbianImageE32( aName, (uint) aStream.Length, aStream.Position, new SIStream( aStream ), aTracer );
       
    46             }
       
    47             //
       
    48             return ret;
       
    49         }
       
    50         #endregion
       
    51     }
       
    52 }