Exemplo n.º 1
0
        internal SIContentROFSCode(SIROFS aImage, string aName, uint aSize, long aPosition)
            : base(aImage)
        {
            // We need to give the E32Image access to the underlying ROFS image stream, but we don't
            // want to transfer ownership - ownership remains entirely with the SymbianImageROFS object.
            SIStream e32ImageStream = new SIStream((Stream)ImageStream, SIStream.TOwnershipType.EOwnedExternally);

            try
            {
                iE32Image = new SymbianImageE32(aName, aSize, aPosition, e32ImageStream, aImage);
                if (iE32Image.Count == 0)
                {
                    throw new Exception("Invalid E32Image file");
                }
            }
            catch (Exception e)
            {
                e32ImageStream.Close();
                throw e;
            }
        }
Exemplo n.º 2
0
 internal SIImage(ITracer aTracer, SIStream aStream, string aName)
 {
     iName   = aName;
     iTracer = aTracer;
     iStream = aStream;
 }
Exemplo n.º 3
0
        internal SymbianImageE32(string aImageName, uint aImageContentSize, long aImageContentOffset, SIStream aStream, ITracer aTracer)
            : base(aTracer, aStream, aImageName)
        {
            iContentOffsetWithinDataStream = aImageContentOffset;
            //
            using (SymbianStreamReaderLE reader = base.Stream.CreateReader())
            {
                reader.Seek(iContentOffsetWithinDataStream);
                iHeader = new SIHeaderE32Image(this, reader);
            }

            // Since we are a single e32 image, we have a single e32 Image file descriptor
            SIContentE32Image file = new SIContentE32Image(this, aImageName, aImageContentSize, aImageContentOffset);

            base.RegisterFile(file);
        }